From 529d0b8982cf30f57ba7e366c0f822c1d82c0b69 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 07 五月 2024 13:37:27 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/1.0.1' into 1.0.1

---
 wx/pages/policyDetails/policyDetails.vue |   74 +++++++++++++++++++++---------------
 1 files changed, 43 insertions(+), 31 deletions(-)

diff --git a/wx/pages/policyDetails/policyDetails.vue b/wx/pages/policyDetails/policyDetails.vue
index 92b0078..a948035 100644
--- a/wx/pages/policyDetails/policyDetails.vue
+++ b/wx/pages/policyDetails/policyDetails.vue
@@ -106,7 +106,7 @@
 				<u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鐢宠閫�鍥�" @click="show = true"></u-button>
 				<view style="width: 44rpx; height: 50rpx;"></view>
 				 <!-- @click="show1 = true" -->
-				<u-button type="primary" shape="circle" color="#437CB3" text="绛剧讲鎶曚繚鍗�" @click="openmessage(4)"></u-button>
+				<u-button type="primary" shape="circle" color="#437CB3" :loading="loading" text="绛剧讲鎶曚繚鍗�" @click="openmessage(4)"></u-button>
 			</view>
 			<!-- 寰呭嚭璐� -->
 			<view class="details_footer" v-if="info.statusCollect === 1">
@@ -123,8 +123,8 @@
 		<template v-else>
 			<!-- 寰呯缃� -->
 			<view class="details_footer" v-if="info.statusCollect === 7 || info.statusCollect === 28">
-				<u-button type="primary" shape="circle" color="#437CB3" text="绛剧讲纭涔�" @click="openmessage(2)" v-if="info.status !== 21"></u-button>
-				<u-button type="primary" shape="circle" color="#437CB3" text="绛剧讲鐢宠鍗�" @click="openmessage(3)" v-if="info.status === 21"></u-button>
+				<u-button type="primary" shape="circle" color="#437CB3" text="绛剧讲纭涔�" :loading="loading" @click="openmessage(2)" v-if="info.status !== 21"></u-button>
+				<u-button type="primary" shape="circle" color="#437CB3" text="绛剧讲鐢宠鍗�" :loading="loading" @click="openmessage(3)" v-if="info.status === 21"></u-button>
 			</view>
 			<!-- 寰呭鏍�/寰呭嚭鍗� -->
 			<view class="details_footer" v-if="info.statusCollect === 22 || info.statusCollect === 0 || info.statusCollect === 1 || info.statusCollect === 23">
@@ -138,7 +138,7 @@
 			</view>
 			<!-- 鎶曚繚涓� -->
 			<view class="details_footer" v-if="info.statusCollect === 26 && info.unionApplyTbdStatus !== 0">
-				<u-button type="primary" shape="circle" color="#437CB3" text="绛剧讲鎶曚繚鍗�" @click="openmessage(1)"></u-button>
+				<u-button type="primary" shape="circle" color="#437CB3" :loading="loading" text="绛剧讲鎶曚繚鍗�" @click="openmessage(1)"></u-button>
 			</view>
 			<!-- 淇濋殰涓� -->
 			<view class="details_footer" v-if="info.statusCollect === 27">
@@ -192,7 +192,9 @@
 				code: '',
 				num: 0,
 				error: false,
-				timer: null
+				timer: null,
+				
+				loading: false
 			};
 		},
 		computed: {
@@ -229,13 +231,14 @@
 			},
 			// 鎵撳紑鍙戦�侀獙璇佺爜寮圭獥
 			openmessage(type) {
-				this.code = ''
-				clearInterval(this.timer)
-				this.error = ''
-				this.timer = null
-				this.num = 0
+				// this.code = ''
+				// clearInterval(this.timer)
+				// this.error = ''
+				// this.timer = null
+				// this.num = 0
 				this.type = type
-				this.show1 = true
+				// this.show1 = true
+				this.confirm1()
 			},
 			signApplication() {
 				uni.navigateTo({
@@ -313,25 +316,28 @@
 				this.show = false
 			},
 			confirm1() {
-				if (!this.code) {
-					this.error = 1
-					return
-				}
+				// if (!this.code) {
+				// 	this.error = 1
+				// 	return
+				// }
 				// 绛剧讲鎶曚繚鍗�
+				this.loading = true
 				if (this.type === 1) {
 					this.$u.api.getSignWTBTBDLink({
 						code: this.code,
 						businessId: this.info.id
 					}).then(res => {
+						this.loading = false
 						if (res.code === 200) {
-							this.error = ''
-							this.show1 = false
+							// this.error = ''
+							// this.show1 = false
 							uni.navigateTo({
 								url: `/pages/webView/webView?url=${encodeURIComponent(res.data)}`
 							})
-						} else {
-							this.error = 2
 						}
+						//  else {
+						// 	this.error = 2
+						// }
 					})
 				// 纭涔�
 				} else if (this.type === 2) {
@@ -340,14 +346,16 @@
 						code: this.code
 					}).then(res => {
 						if (res.code === 200) {
-							this.error = ''
-							this.show1 = false
+							this.loading = false
+							// this.error = ''
+							// this.show1 = false
 							uni.navigateTo({
 								url: `/pages/webView/webView?url=${encodeURIComponent(res.data)}`
 							})
-						} else {
-							this.error = 2
 						}
+						//  else {
+						// 	this.error = 2
+						// }
 					})
 				// 绛剧讲鐢宠鍗� --- 濮旀墭
 				} else if (this.type === 3) {
@@ -356,14 +364,16 @@
 						code: this.code
 					}).then(res => {
 						if (res.code === 200) {
-							this.error = ''
-							this.show1 = false
+							this.loading = false
+							// this.error = ''
+							// this.show1 = false
 							uni.navigateTo({
 								url: `/pages/webView/webView?url=${encodeURIComponent(res.data)}`
 							})
-						} else {
-							this.error = 2
 						}
+						//  else {
+						// 	this.error = 2
+						// }
 					})
 				// 绛剧讲鐢宠鍗� --- 鐩翠繚
 				} else if (this.type === 4) {
@@ -373,17 +383,19 @@
 						if (res.code === 200) {
 							this.$u.api.getSignLink(this.info.id)
 								.then(data => {
+									this.loading = false
 									if (data.code === 200) {
-										this.error = ''
-										this.show1 = false
+										// this.error = ''
+										// this.show1 = false
 										uni.navigateTo({
 											url: `/pages/webView/webView?url=${encodeURIComponent(data.data)}`
 										})
 									}
 								})
-						} else {
-							this.error = 2
 						}
+						//  else {
+						// 	this.error = 2
+						// }
 					})
 				}
 			},

--
Gitblit v1.9.3