chengjie 6 vuotta sitten
vanhempi
commit
cffbcda348
4 muutettua tiedostoa jossa 33 lisäystä ja 8 poistoa
  1. 4 0
      pages/main/detail.js
  2. 3 2
      pages/main/detail.wxml
  3. 16 6
      pages/main/detail.wxss
  4. 10 0
      utils/main.js

+ 4 - 0
pages/main/detail.js

@@ -45,11 +45,13 @@ Page({
45
       height=960;
45
       height=960;
46
       height2=670;
46
       height2=670;
47
     }
47
     }
48
+
48
     that.setData({
49
     that.setData({
49
       Containnerheight: height,
50
       Containnerheight: height,
50
       Containnerheight2: height-height2,
51
       Containnerheight2: height-height2,
51
       IsShowAnswer: [0, 0],
52
       IsShowAnswer: [0, 0],
52
       CanUndo: 1,
53
       CanUndo: 1,
54
+      IsIphoneX: main.checkIsIPhoneX(),
53
     });
55
     });
54
 
56
 
55
     innerAudioContext1 = wx.createInnerAudioContext();
57
     innerAudioContext1 = wx.createInnerAudioContext();
@@ -58,6 +60,8 @@ Page({
58
     this.getList();
60
     this.getList();
59
 
61
 
60
     this.getColor();
62
     this.getColor();
63
+
64
+    
61
   },
65
   },
62
   onShow: function () {
66
   onShow: function () {
63
     var that = this;
67
     var that = this;

+ 3 - 2
pages/main/detail.wxml

@@ -133,7 +133,7 @@
133
   <view class='footer' wx:if="{{NumberNew+NumberReview+NumberHistory>0}}" bindtap="onShowAnswer" ></view>
133
   <view class='footer' wx:if="{{NumberNew+NumberReview+NumberHistory>0}}" bindtap="onShowAnswer" ></view>
134
   <view class='footer1 footer' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}"></view>
134
   <view class='footer1 footer' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}"></view>
135
 
135
 
136
-  <block wx:if="{{IsShowAnswer[1]}}">
136
+  <view class="panelFooter FlexColumn" wx:if="{{IsShowAnswer[1]}}">
137
     <view class="panelBottomAnswer0" style='background:linear-gradient({{Color.BackColor20}},{{Color.BackColor2}});'></view>
137
     <view class="panelBottomAnswer0" style='background:linear-gradient({{Color.BackColor20}},{{Color.BackColor2}});'></view>
138
     <view class='panelBottomAnswer panelBottom FlexRow' style='background-color:{{Color.BackColor2}};color:{{Color.FrontColor2}};'>
138
     <view class='panelBottomAnswer panelBottom FlexRow' style='background-color:{{Color.BackColor2}};color:{{Color.FrontColor2}};'>
139
       <view class="Answer FlexColumn" hover-class="AnswerHover{{Color.ID}}" catchtap='gotoNext' data-time="{{TaskInfo.Number0}}" data-btnnumber="0">
139
       <view class="Answer FlexColumn" hover-class="AnswerHover{{Color.ID}}" catchtap='gotoNext' data-time="{{TaskInfo.Number0}}" data-btnnumber="0">
@@ -161,7 +161,8 @@
161
         </view>
161
         </view>
162
       </view>
162
       </view>
163
     </view>
163
     </view>
164
-  </block>
164
+    <view class="iphoneX" wx:if="{{IsIphoneX}}"></view>
165
+  </view>
165
 </view>
166
 </view>
166
 
167
 
167
 <view wx:if="{{IsShowNumberInfo}}" catchtap='closeNumberContainner' class="numberContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>
168
 <view wx:if="{{IsShowNumberInfo}}" catchtap='closeNumberContainner' class="numberContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>

+ 16 - 6
pages/main/detail.wxss

@@ -1,4 +1,4 @@
1
-.container {
1
+ .container {
2
   justify-content: flex-start;
2
   justify-content: flex-start;
3
   font-weight: 500;
3
   font-weight: 500;
4
 }
4
 }
@@ -222,21 +222,31 @@
222
 
222
 
223
 /* 底部记忆选择 */
223
 /* 底部记忆选择 */
224
 
224
 
225
-.panelBottomAnswer0 {
226
-  height: 20rpx;
225
+.panelFooter{
227
   width: 100%;
226
   width: 100%;
228
   position: fixed;
227
   position: fixed;
229
-  bottom: 130rpx;
228
+  bottom: 0;
229
+  z-index: 10;
230
+}
231
+
232
+.panelBottomAnswer0 {
233
+  width: 100%;
234
+  height: 20rpx;
230
   z-index: 10;
235
   z-index: 10;
231
 }
236
 }
232
 
237
 
233
 .panelBottomAnswer {
238
 .panelBottomAnswer {
234
   width: 100%;
239
   width: 100%;
235
-  position: fixed;
236
-  bottom: 0;
237
   font-size: 20rpx;
240
   font-size: 20rpx;
238
   justify-content: space-between;
241
   justify-content: space-between;
239
   z-index: 10;
242
   z-index: 10;
243
+  height:130rpx;
244
+}
245
+
246
+.iphoneX{
247
+  width: 100%;
248
+  height: 80rpx;
249
+  z-index: 10;
240
 }
250
 }
241
 
251
 
242
 .Answer {
252
 .Answer {

+ 10 - 0
utils/main.js

@@ -673,6 +673,15 @@ function updateSearchList(obj){
673
   app.globalData.SearchItem = obj.Value;
673
   app.globalData.SearchItem = obj.Value;
674
 }
674
 }
675
 
675
 
676
+function checkIsIPhoneX(){
677
+  var isIphoneX = false;
678
+  if (app.globalData.systemInfo.model.indexOf("iPhone X")>=0
679
+    || app.globalData.systemInfo.model.indexOf("iPhone X") >= 0) {
680
+    isIphoneX = true;
681
+  }
682
+  return isIphoneX;
683
+}
684
+
676
 function getPinyin(pinyin) {
685
 function getPinyin(pinyin) {
677
   var result = [];
686
   var result = [];
678
   var arr = getPinyinArray();
687
   var arr = getPinyinArray();
@@ -2195,4 +2204,5 @@ module.exports = {
2195
   getTempImage: getTempImage,
2204
   getTempImage: getTempImage,
2196
   getTaskTodayList: getTaskTodayList,
2205
   getTaskTodayList: getTaskTodayList,
2197
   updateSearchList: updateSearchList,
2206
   updateSearchList: updateSearchList,
2207
+  checkIsIPhoneX: checkIsIPhoneX,
2198
 }
2208
 }