From 110b6b66982f0c02a70a3291d54c1f19693138ee Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期六, 03 八月 2024 15:42:46 +0800
Subject: [PATCH] 1

---
 pages/login/supplier-login.vue |   71 +++++++++++++++++++++++------------
 manifest.json                  |    2 
 pages/user/supplier-user.vue   |    2 
 3 files changed, 49 insertions(+), 26 deletions(-)

diff --git a/manifest.json b/manifest.json
index 782394c..2848179 100644
--- a/manifest.json
+++ b/manifest.json
@@ -49,7 +49,7 @@
     "quickapp" : {},
     /* 快应用特有相关 */
     "mp-weixin" : {
-        "appid" : "wx6d0ecc4e18710458",
+        "appid" : "wx1441324401626290",
         "setting" : {
             "urlCheck" : false,
             "es6" : true,
diff --git a/pages/login/supplier-login.vue b/pages/login/supplier-login.vue
index a16e302..f17e16f 100644
--- a/pages/login/supplier-login.vue
+++ b/pages/login/supplier-login.vue
@@ -84,7 +84,7 @@
 </template>
 <script>
 	export default {
-		onLoad(options) {
+		async onLoad(options) {
 			// #ifdef PUB_CUSTOMER
 			var query = options.q && decodeURIComponent(options.q) || ''
 			var querydto = {}
@@ -102,6 +102,22 @@
 			console.log('options query111', querydto)
 			// this.optionsStr = JSON.stringify(options) || ''
 			if (querydto.partnerUserId) {
+				//通过接口获取名称,兼容,url上不能放中文的情况
+
+				// if (!querydto.partnerUserName) {
+				// 	this.$message.showLoading()
+				// 	const resname = await this.$http.request('get', '/api/', {
+				// 		params: {
+				// 			id: querydto.partnerUserId
+				// 		}
+				// 	})
+				// 	this.$message.hideLoading()
+				// 	if (resname.code == 0) {
+				// 		querydto.partnerUserName = resname.name || ''
+				// 	}
+
+				// }
+				
 				if (this.$storage.getItem('token')) {
 					console.log('to login 1')
 					this.$message.showLoading()
@@ -112,6 +128,8 @@
 							tmp.$message.hideLoading()
 							if (tmp.currentInfo && tmp.currentInfo.id || tmp.$storage.getItem('token')) {
 								await this.$store.dispatch('getCurrentInfo');
+
+
 								//这种已经登录的
 								//确定是注册绑定还是重新绑定
 								tmp.$nextTick(() => {
@@ -126,10 +144,12 @@
 									}
 									uni.showModal({
 										...tt,
-										success: (res) => {
+										success: async (res) => {
+
 											if (res.confirm) {
 												//清空登录信息,
-												this.$store.commit('updateLogin', false)
+												this.$store.commit('updateLogin',
+													false)
 												setTimeout(() => {
 													uni.navigateTo({
 														url: `/sub_pages/customer/customer-info/customer-info?source=step&partnerUserId=${querydto.partnerUserId}&partnerUserName=${querydto.partnerUserName}`
@@ -138,7 +158,8 @@
 											}
 											if (res.cancel) {
 												if (!tmp.currentInfo.customerDTO) {
-													tmp.$message.showToast('您尚未完善信息无法绑定')
+													tmp.$message.showToast(
+														'您尚未完善信息无法绑定')
 													return
 												} else {
 													if (tmp.currentInfo.customerDTO
@@ -186,26 +207,28 @@
 			}
 			// #endif
 
-		},
-		onShareAppMessage() {
-			let that = this;
-			var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
-			var url =
-				`/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
-			return {
-				title: "花满芫",
-				path: url,
-			}
-		},
-		onShareTimeline() {
-			let that = this;
-			var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
-			var url =
-				`/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
-			return {
-				title: "花满芫",
-				path: url,
-			}
+		},
+		onShareAppMessage() {
+			let that = this;
+			var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO &&
+				currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || ''
+			var url =
+				`/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
+			return {
+				title: "花满芫",
+				path: url,
+			}
+		},
+		onShareTimeline() {
+			let that = this;
+			var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO &&
+				currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || ''
+			var url =
+				`/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
+			return {
+				title: "花满芫",
+				path: url,
+			}
 		},
 		data() {
 			return {
diff --git a/pages/user/supplier-user.vue b/pages/user/supplier-user.vue
index 552aac9..93c7b95 100644
--- a/pages/user/supplier-user.vue
+++ b/pages/user/supplier-user.vue
@@ -439,7 +439,7 @@
 										dto[tarr[0]] = dto[tarr[1]]
 									}
 								}
-								dto['name'] = dto['partnerUserName'] || dto['partnerUserId'] || '佚名'
+								dto['name'] = dto['partnerUserName'] || ''
 								dto['userId'] = dto['partnerUserId'] || ''
 
 							} else {

--
Gitblit v1.9.3