wangxy пре 1 недеља
родитељ
комит
4692260a45
1 измењених фајлова са 9 додато и 8 уклоњено
  1. 9 8
      pages/admin/Hetong/Hetong.vue

+ 9 - 8
pages/admin/Hetong/Hetong.vue

@@ -6,7 +6,7 @@
 			<uni-icons class="nav-bar-right-icon bar-ml10" type="list" @click="handleGoLishi" size="30"></uni-icons>
 
 		</view>
-		<template v-if="info.id">
+		<template v-if="tId">
 			<view class="pdf-box"> 
 			 <image v-for="item in imgList" :mode="item.mode" :src="`data:image/png;base64,${item}`"></image> 
 			</view>
@@ -14,10 +14,10 @@
 		<template v-else>
 			<view class="no-hetong-box">暂无合同</view>
 		</template>
-		<view class="hetong-tip-box" v-if="info.id && info.status == 0">
+		<view class="hetong-tip-box" v-if="tId && info.status == 0">
 				  请务必仔细阅读上述内容,确认已完全理解所有条款后,点击【我已阅读】按钮完成签字确认。
 		</view>
-		<button v-if="info.id && info.status == 0" type="default" class="phone-green-btn ht-btn"
+		<button v-if="tId && 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">
@@ -42,7 +42,7 @@
 	} from "@dcloudio/uni-app"
 	import writeSign from "@/components/writeSign/index.vue"
   import {throttleAdvanced} from "@/utils/common.js"
-
+	const tId = ref(null)
 	const info = ref({})
 	const show = ref(false)
 	const popupRef = ref(null)
@@ -52,19 +52,20 @@
 		uni.navigateBack()
 	}
 	onLoad(({id}) => {
-		init(id)
+		tId.value = id;
+		init()
 	})
 
-	function init(id) {
+	function init() {
 		
-		if (!id) {
+		if (!tId.value) {
 			uni.showToast({
 				title: '数据异常,请确认路径是否完整'
 			})
 			return;
 		}
 		
-		httpApi.getHetongInfo({id}).then(res => {
+		httpApi.getHetongInfo({id:tId.value}).then(res => {
 			info.value = res.data;
 			imgList.value = res.data.base64List;
 			setTimeout(() => {