From eadac1981bc3bbe51fed32e4be5fe0d2672653e0 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 26 二月 2026 17:15:34 +0800
Subject: [PATCH] 经销商管理

---
 mini-program/App.vue |  175 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 167 insertions(+), 8 deletions(-)

diff --git a/mini-program/App.vue b/mini-program/App.vue
index 81add46..13baf01 100644
--- a/mini-program/App.vue
+++ b/mini-program/App.vue
@@ -5,7 +5,8 @@
 		computed: {
 			...mapState(['userInfo', 'token'])
 		},
-		onLaunch: async function() {
+		onLaunch: async function(options) {
+			// this.dealRecShopUserBiz(options) 
 			// 鐧诲綍
 			var that = this;
 			if (!this.token) {
@@ -26,7 +27,7 @@
 							// 鍒ゆ柇鏈夋棤鐢ㄦ埛淇℃伅
 							if (res.data.member) {
 								await that.$store.commit('setUserInfo', res.data.member)
-								await that.$store.commit('setOpenId', res.data.member.openid)
+								await that.$store.commit('setOpenId', res.data.member.openId)
 							}
 							// 璁剧疆瀹氫綅
 							await that.checkLocationAuth()
@@ -44,13 +45,51 @@
 				await that.checkLocationAuth()
 			}
 		},
-		onShow: function() {
-			console.log('App Show')
+		onShow:async function(options) {
+			this.dealRecShopUserBiz(options) 
 		},
 		onHide: function() {
 			console.log('App Hide')
 		},
 		methods: {
+			async dealRecShopUserBiz(options){
+				console.error("鍚姩鍙傛暟",options)
+				if(options.query && options.query.userId){
+					if(!this.userInfo || !this.userInfo.id){
+						await this.$store.commit('setRecUserId',options.query.userId)
+					}
+				}
+				if(options.query && options.query.scene &&  options.query.scene.length){
+					if(options.query.scene.indexOf("sid_")>=0){
+						 let s = options.query.scene.indexOf("sid_")+4;
+						 var shopId = '';
+						 let e = options.query.scene.length
+						 let ts =  options.query.scene.slice(s, e)
+						 e = ts.length
+						 if(ts.indexOf("&")>0){
+							 e =ts.indexOf("&")
+						 }
+						 if(e>0){
+							shopId =ts.slice(0, e)
+						 } 
+						 if(shopId){
+							 if(this.userInfo&& this.userInfo.id){
+								 try{
+									 let res = await this.$u.api.bindShopInfo({ code })
+									 if(res.code != 200){
+										 await this.$store.commit('setRecShopId',shopId)
+									 }
+								 }catch(e){
+									  await this.$store.commit('setRecShopId',shopId)
+								 }
+							 }else{
+								 await this.$store.commit('setRecShopId',shopId)
+							 }
+							 
+						 }
+					}
+				}
+			},
 			checkLocationAuth() {
 			    uni.getSetting({
 			        success: (res) => {
@@ -102,14 +141,14 @@
 					success: function (addr) {
 						const locParam = { latitude: addr.latitude, longitude: addr.longitude };
 						const qqmapsdk = new QQMapWX({
-							key: 'FJKBZ-W5BW3-QGV3M-OEJKT-3H5K7-7FFPM'
+							key: 'HEIBZ-QJLLM-SZ36X-6ZBHI-S6Y2J-S6FND'
 						});
-						// 鑵捐鍦板浘閫嗗湴鐞嗙紪鐮�
+						console.log(locParam)
 						qqmapsdk.reverseGeocoder({
 							locParam,
 							success: function(res) {
 								console.log(res, '==================鑾峰彇鍦板潃');
-								that.$store.commit('setPosition', )
+								that.$store.commit('setPosition', res.result)
 								that.$isResolve()
 							},
 							fail: (err) => {
@@ -126,4 +165,124 @@
 
 <style lang="scss">
 	@import "uview-ui/index.scss";
-</style>
+	/*姣忎釜椤甸潰鍏叡css */
+	.tc {
+		width: calc(100vw - 148rpx);
+		.tc-btn {
+			width: 100%;
+			height: 102rpx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			border-top: 1rpx solid #EEEEEE;
+			.tc-btn-item {
+				flex: 1;
+				height: 100%;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-weight: 400;
+				font-size: 32rpx;
+				color: #666666;
+				border-right: 1rpx solid #EEEEEE;
+				&:last-child {
+					border: none !important;
+				}
+			}
+		}
+		.tc-contemt {
+			width: 100%;
+			padding: 40rpx 0;
+			box-sizing: border-box;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+			.tc-contemt-title {
+				width: 100%;
+				text-align: center;
+				font-weight: 600;
+				font-size: 32rpx;
+				color: #111111;
+			}
+			.tc-contemt-nr {
+				width: 472rpx;
+				text-align: center;
+				font-weight: 400;
+				font-size: 28rpx;
+				color: #333333;
+				margin-top: 40rpx;
+			}
+		}
+	}
+	.nomore{
+		margin-top: 30rpx;
+		width: 100%;
+		text-align: center;
+		font-size: 24rpx;
+		color: #666666;
+	}
+	.phone {
+		width: 100%;
+		padding-top: 40rpx;
+		box-sizing: border-box;
+		.phone-botton {
+			width: 100%;
+			height: 88rpx;
+			line-height: 88rpx;
+			text-align: center;
+			font-weight: 500;
+			font-size: 32rpx;
+			color: #FFFFFF;
+			background: #00BC12;
+			border-radius: 44rpx;
+			margin-top: 60rpx;
+		}
+		.phone-head {
+			width: 100%;
+			text-align: center;
+			justify-content: space-between; 
+			margin-bottom: 40rpx;
+			text {
+				font-weight: 800;
+				font-size: 32rpx;
+				color: #222222;
+			}
+		}
+		 
+		.phone-item {
+			width: 100%;
+			text-align: center;
+			display: flex;
+			justify-content: center;
+			flex-direction: column;
+			// border-bottom: 1rpx solid #eeeeee;
+			line-height: 78rpx;
+			button{
+				border: 1rpx white solid;
+				display: inline;
+				width: 300rpx;
+				font-weight: 500;
+				font-size: 32rpx;
+				line-height: 32rpx;
+				color: #222222;
+			}
+			image{
+				width: 28rpx;
+				height: 28rpx;
+				margin-right: 30rpx;
+			}
+			.line{
+				width: 100%;
+				height: 1rpx;
+				background-color: #f2f2f2
+			}
+			text {
+				font-weight: 500;
+				font-size: 28rpx;
+				line-height: 28rpx;
+				color: #222222;
+			}
+		}
+	}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3