Kaynağa Gözat

客户页面

wangxy 1 hafta önce
ebeveyn
işleme
228a745c8d
2 değiştirilmiş dosya ile 12 ekleme ve 16 silme
  1. 10 14
      pages/admin/Hetong/Hetong.vue
  2. 2 2
      pages/admin/Hetong/HetongInfo.vue

+ 10 - 14
pages/admin/Hetong/Hetong.vue

@@ -6,18 +6,15 @@
 			<uni-icons class="nav-bar-right-icon bar-ml10" type="list" @click="handleGoLishi" size="30"></uni-icons>
 
 		</view>
-		<template v-if="tId">
+		<template>
 			<view class="pdf-box"> 
 			 <image v-for="item in imgList" mode="aspectFit" :src="`data:image/png;base64,${item}`" @click="previewBase64Image(`data:image/png;base64,${item}`)"></image>
 			</view>
 		</template>
-		<template v-else>
-			<view class="no-hetong-box">暂无合同</view>
-		</template>
-		<view class="hetong-tip-box" v-if="tId && info.status == 0">
+		<view class="hetong-tip-box" v-if="info.status == 0">
 				  请务必仔细阅读上述内容,确认已完全理解所有条款后,点击【我已阅读】按钮完成签字确认。
 		</view>
-		<button v-if="tId && info.status == 0" type="default" class="phone-green-btn ht-btn"
+		<button v-if="info.status == 0" type="default" class="phone-green-btn ht-btn"
 			@click="handleQianming">我已阅读</button>
 
 		<uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">
@@ -63,20 +60,19 @@
     timer1.value = null;
 	}
 	onLoad(({id}) => {
-		tId.value = id;
-		init()
+    tId.value = id;
+		init(id)
 	})
 
-	function init() {
-		
-		if (!tId.value) {
+	function init(id) {
+		if (!id) {
 			uni.showToast({
 				title: '数据异常,请确认路径是否完整'
 			})
 			return;
 		}
-		
-		httpApi.getHetongInfo({id:tId.value}).then(res => {
+
+		httpApi.getHetongInfo({id}).then(res => {
 			info.value = res.data;
 			imgList.value = res.data.base64List;
 		}).finally(() => {
@@ -121,7 +117,7 @@
     })
 
     httpApi.getHetongQianming({
-      id: info.value.id,
+      id: tId.value,
       yifangBase64: img.replace(/^data:image\/\w+;base64,/, ''), // 当前接口,只有唯一yifangBase64 + id
     }).then(res => {
       if (res.data) {

+ 2 - 2
pages/admin/Hetong/HetongInfo.vue

@@ -13,10 +13,10 @@
       </view>
       </template>
 	  
-	  <view class="hetong-tip-box" v-if="tId && info.status == 0">
+	  <view class="hetong-tip-box" v-if="info.status == 0">
 		  请务必仔细阅读上述内容,确认已完全理解所有条款后,点击【我已阅读】按钮完成签字确认。
 	  </view>
-	  <button @click="handleQianming" v-if="tId && info.status == 0"
+	  <button @click="handleQianming" v-if="info.status == 0"
 	  class="phone-green-btn ht-btn"  type="default">我已阅读</button>
 	  
 	  <uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">