chengjie 6 년 전
부모
커밋
cffbcda348
4개의 변경된 파일33개의 추가작업 그리고 8개의 파일을 삭제
  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 45
       height=960;
46 46
       height2=670;
47 47
     }
48
+
48 49
     that.setData({
49 50
       Containnerheight: height,
50 51
       Containnerheight2: height-height2,
51 52
       IsShowAnswer: [0, 0],
52 53
       CanUndo: 1,
54
+      IsIphoneX: main.checkIsIPhoneX(),
53 55
     });
54 56
 
55 57
     innerAudioContext1 = wx.createInnerAudioContext();
@@ -58,6 +60,8 @@ Page({
58 60
     this.getList();
59 61
 
60 62
     this.getColor();
63
+
64
+    
61 65
   },
62 66
   onShow: function () {
63 67
     var that = this;

+ 3 - 2
pages/main/detail.wxml

@@ -133,7 +133,7 @@
133 133
   <view class='footer' wx:if="{{NumberNew+NumberReview+NumberHistory>0}}" bindtap="onShowAnswer" ></view>
134 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 137
     <view class="panelBottomAnswer0" style='background:linear-gradient({{Color.BackColor20}},{{Color.BackColor2}});'></view>
138 138
     <view class='panelBottomAnswer panelBottom FlexRow' style='background-color:{{Color.BackColor2}};color:{{Color.FrontColor2}};'>
139 139
       <view class="Answer FlexColumn" hover-class="AnswerHover{{Color.ID}}" catchtap='gotoNext' data-time="{{TaskInfo.Number0}}" data-btnnumber="0">
@@ -161,7 +161,8 @@
161 161
         </view>
162 162
       </view>
163 163
     </view>
164
-  </block>
164
+    <view class="iphoneX" wx:if="{{IsIphoneX}}"></view>
165
+  </view>
165 166
 </view>
166 167
 
167 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 2
   justify-content: flex-start;
3 3
   font-weight: 500;
4 4
 }
@@ -222,21 +222,31 @@
222 222
 
223 223
 /* 底部记忆选择 */
224 224
 
225
-.panelBottomAnswer0 {
226
-  height: 20rpx;
225
+.panelFooter{
227 226
   width: 100%;
228 227
   position: fixed;
229
-  bottom: 130rpx;
228
+  bottom: 0;
229
+  z-index: 10;
230
+}
231
+
232
+.panelBottomAnswer0 {
233
+  width: 100%;
234
+  height: 20rpx;
230 235
   z-index: 10;
231 236
 }
232 237
 
233 238
 .panelBottomAnswer {
234 239
   width: 100%;
235
-  position: fixed;
236
-  bottom: 0;
237 240
   font-size: 20rpx;
238 241
   justify-content: space-between;
239 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 252
 .Answer {

+ 10 - 0
utils/main.js

@@ -673,6 +673,15 @@ function updateSearchList(obj){
673 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 685
 function getPinyin(pinyin) {
677 686
   var result = [];
678 687
   var arr = getPinyinArray();
@@ -2195,4 +2204,5 @@ module.exports = {
2195 2204
   getTempImage: getTempImage,
2196 2205
   getTaskTodayList: getTaskTodayList,
2197 2206
   updateSearchList: updateSearchList,
2207
+  checkIsIPhoneX: checkIsIPhoneX,
2198 2208
 }