Explorar el Código

fix:加载提示和canvas层级问题

xuqiaoying hace 3 años
padre
commit
321f968476
Se han modificado 2 ficheros con 26 adiciones y 16 borrados
  1. 21 13
      pages2/appointment/order.vue
  2. 5 3
      pages5/examList/index.vue

+ 21 - 13
pages2/appointment/order.vue

@@ -76,23 +76,25 @@
           八、本人承诺遵守《应考人员安全承诺书》中所有承诺内容,若因有瞒报、谎报造成新冠肺炎疫情传播的,一经查实,由本人承担相应的法律和经济责任。
         </view>
       </view>
-      <view v-if="reportStatus == 1" class="appointmentItem">
+      <view v-if="reportStatus == 1" class="appointmentItem ">
         <view class="title"><text class="star_red">*</text>签名板</view>
         <view class="dis_stys">
           <text style="color: #999999">请在下方签名区进行签名</text>
           <text @click="retDraw" mode="">清空</text>
         </view>
         <view class="handCenter">
-           <!-- v-if="!form[item.fieldKey]" -->
-          <canvas
-            class="handWriting"
-            disable-scroll="true"
-            :catchtouchmove="true"
-            @touchstart="uploadScaleStart"
-            @touchmove="uploadScaleMove"
-            @touchend="uploadScaleEnd"
-            canvas-id="handWriting"
-          ></canvas>
+          <view v-show="!address_show" class="can_vas">
+            <canvas
+              class="handWriting"
+              disable-scroll="true"
+              :catchtouchmove="true"
+              @touchstart="uploadScaleStart"
+              @touchmove="uploadScaleMove"
+              @touchend="uploadScaleEnd"
+              canvas-id="handWriting"
+            ></canvas>
+          </view>
+          <view v-show="address_show" class="no_true"></view>
           <!-- <view
             v-else
             style="width: 100%; height: 100%; position: relative"
@@ -363,6 +365,10 @@ export default {
       }
     },
     submits() {
+      uni.showLoading({
+        title: '拼命加载中...',
+        mask:true,
+      })
       var copyData = JSON.parse(JSON.stringify(this.activeList));
       const index = copyData.findIndex((item) => item.checked);
       var data = {
@@ -390,6 +396,7 @@ export default {
           goodsId: this.goodsId,
           orderGoodsId: this.orderGoodsId,
         });
+        uni.hideLoading()
       }
       if (this.dataId === 2) {
         this.$api.addApply(data).then((res) => {
@@ -400,9 +407,10 @@ export default {
           } else {
             uni.showToast({
               icon: "none",
-              title: res.data.msg,
+              title: res.data.msg || '预约失败,请重新预约',
             });
           }
+          uni.hideLoading()
         });
       }
       this.isUploading = false
@@ -528,7 +536,7 @@ page {
       margin-bottom: 16rpx;
     }
     .handCenter {
-      .handWriting {
+      .handWriting, .no_true {
         width: 100%;
         height: 400rpx;
         background: #fff;

+ 5 - 3
pages5/examList/index.vue

@@ -44,7 +44,7 @@
 							<view class="btn-line">
 								<!-- mockActivity 1是活动模考,0否 && (!item.handStatus || item.handStatus == 0)-->
 								<view v-if="item.mockActivity == 1 && (!item.handStatus || item.handStatus == 0) " class="btn"
-									:class="{'test-disabled': item.activityStartTime < nowTime }"
+									:class="{'test-disabled': !(item.activityStartTime < nowTime) }"
 								 	@click="goExamCount(item,index)">去考试</view>
 								<view v-else>
 								<view class="btn test-disabled" v-if="goTest(item)" @click="goExamCount(item,index)">去考试</view>
@@ -167,6 +167,7 @@ export default {
 				applyName:''
 			},
 			nowTime:0,
+			sysTime: Date.now(),
 			dateFrom:'',
 			dateTo:'',
 			isRepeat:false,
@@ -222,8 +223,9 @@ export default {
 		}
 	},
 	onShow() {
-		console.log('sfhdsofhsoh-----onshow', this.itemIndex)
+		
 		this.nowTime = +this.$method.timest();
+		console.log('sfhdsofhsoh-----onshow', this.itemIndex, this.nowTime)
 		// if(this.itemIndex !== '') {
 		// 	this.refreshByIndex();
 		// }
@@ -344,7 +346,7 @@ export default {
 		async goExamCount(item,index) {
 			console.log('item', item)
 			if (item.mockActivity && item.mockActivity == 1) {
-				if (item.activityStartTime < this.nowTime) {
+				if (!(item.activityStartTime < this.nowTime)) {
 					return
 				}
 				await this.$http({