Przeglądaj źródła

update 代码优化

linweizeng 3 lat temu
rodzic
commit
a665e2fad7
2 zmienionych plików z 7 dodań i 19 usunięć
  1. 6 15
      pages/communication/communication.vue
  2. 1 4
      pages/jiance/manyi.vue

+ 6 - 15
pages/communication/communication.vue

@@ -77,13 +77,13 @@
 				<view style="width: 100%;">
 					<view style="text-align: right;width: 100%;" v-if="typeValue != '1'">
 						<view>
-							<u-button type="primary" size="mini" @click="qianming(0)" class="btn-back-color">
+							<u-button type="primary" size="mini" @click="qianming()" class="btn-back-color">
 								签名</u-button>
-							<u-button type="primary" size="mini" @click="deqianming(0)" style="margin-left: 15rpx;" v-if="form.keHu != ''">
+							<u-button type="error" size="mini" @click="deqianming()" style="margin-left: 15rpx;" v-if="form.keHu != ''">
 								取消</u-button>
 						</view>
 					</view>
-					<view style="width: 100%;" v-if="form.keHu != ''">
+					<view style="width: 100%;margin-top: 10rpx;" v-if="form.keHu != ''">
 						<image :src="form.keHu" style="width: 100%;height: 500rpx;border: 1px #eee solid;">
 						</image>
 					</view>
@@ -252,29 +252,20 @@
 			fail(e) {},
 			//弹出框显示
 			qianming(index) {
-				this.qianshow = true
-				this.qianIndex = index
 				this.popupShow = true
 			},
 			//清除签名
 			deqianming(index) {
-				if (index == 0) {
-					this.form.keHu = ''
-				}
+				this.form.keHu = ''
 			},
 			//保存签名
 			save(val) {
-				if (this.qianIndex == 0) {
-					this.form.keHu = val
-				}
-				this.qianshow = false
+				this.form.keHu = val
 				this.popupShow = false
 			},
 			//清除签名
 			clear(val) {
-				if (this.qianIndex == 0) {
-					this.form.keHu = ''
-				}
+				this.form.keHu = ''
 			},
 			/**
 			 * 关闭签名弹窗

+ 1 - 4
pages/jiance/manyi.vue

@@ -80,7 +80,7 @@
 							取消</u-button>
 					</view>
 				</view>
-				<view style="width: 100%;" v-if="qianMing != ''">
+				<view style="width: 100%;margin-top: 10rpx;" v-if="qianMing != ''">
 					<image :src="qianMing" style="width: 100%;height: 500rpx;border: 1px #eee solid;">
 					</image>
 				</view>
@@ -89,10 +89,7 @@
 		<view class="padding flex flex-direction">
 			<u-button type="success" class="btn btn-back-color" @click="onSubmit">提交
 			</u-button>
-			<!-- <button class="cu-btn bg-blue lg bg-mingjian" @click="onSubmit">提交</button> -->
 		</view>
-
-
 		<u-popup mode="center" v-model="popupShow">
 			<view style="padding: 30rpx;background: #FFFFFF;width: 100%;">
 				<view class="cu-form-group ">