From d54dc04ae25b73ee0c7c588c6523d94624f052e3 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 05 六月 2026 10:09:13 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/gtzxinglijicun

---
 small-program/shop/pages/login/login.vue |   46 +++++++++++++++++++---------------------------
 1 files changed, 19 insertions(+), 27 deletions(-)

diff --git a/small-program/shop/pages/login/login.vue b/small-program/shop/pages/login/login.vue
index 105b659..481dda0 100644
--- a/small-program/shop/pages/login/login.vue
+++ b/small-program/shop/pages/login/login.vue
@@ -15,7 +15,10 @@
 
 			<view class="input-row password-row">
 				<u-icon name="lock" size="30" color="#B8B8B8"></u-icon>
-				<input v-model="form.password" class="input-field" password type="text" placeholder="璇疯緭鍏ュ瘑鐮�" placeholder-style="color: #999999;" />
+				<input v-model="form.password" class="input-field" :password="!showPassword" placeholder="璇疯緭鍏ュ瘑鐮�" placeholder-style="color: #999999;" />
+				<view class="password-toggle" @click="showPassword = !showPassword">
+					<u-icon :name="showPassword ? 'eye' : 'eye-off'" size="20" color="#B8B8B8"></u-icon>
+				</view>
 			</view>
 			<view class="input-divider"></view>
 		</view>
@@ -26,9 +29,9 @@
 			<image class="agree-icon" :src="agreed ? '/static/icon/ic_accept_sel@2x.png' : '/static/icon/ic_accept@2x.png'" mode="aspectFit" @tap="agreed = !agreed"></image>
 			<view class="agreement-text-wrap">
 				<text class="agreement-text">鎴戝凡闃呰骞跺悓鎰�</text>
-				<text class="agreement-link" @click="goToService(0)">銆婄敤鎴锋湇鍔″崗璁��</text>
+				<text class="agreement-link" @click="goToService(2)">銆婇棬搴楁湇鍔″崗璁��</text>
 				<text class="agreement-text">鍙�</text>
-				<text class="agreement-link" @click="goToService(1)">銆婄敤鎴烽殣绉佹斂绛栥��</text>
+				<text class="agreement-link" @click="goToService(3)">銆婇棬搴楅殣绉佹斂绛栥��</text>
 			</view>
 		</view>
 	</view>
@@ -44,6 +47,7 @@
 		data() {
 			return {
 				agreed: false,
+				showPassword: false,
 				form: {
 					telephone: '',
 					password: ''
@@ -52,7 +56,6 @@
 		},
 		onLoad() {
 			// 闈欓粯鐧诲綍
-		
 			if (this.userInfo.bindShopId) {
 				uni.showLoading({
 					title:'鐧诲綍涓�...'
@@ -71,7 +74,7 @@
 									}
 									uni.hideLoading();
 									// setTimeout(() => {
-										uni.reLaunch({
+										uni.navigateTo({
 											url: '/shop/pages/store-home/store-home'
 										});
 									// }, 1000)
@@ -88,7 +91,7 @@
 			}
 		},
 		methods: {
-			async handleLogin() {
+			handleLogin() {
 				if (!this.form.telephone) {
 					uni.showToast({
 						title: '璇疯緭鍏ヨ处鍙�',
@@ -110,14 +113,11 @@
 					})
 					return
 				}
-				uni.showLoading({ title: '鐧诲綍涓�...', mask: true })
-				try {
-					const res = await this.$u.api.shopLogin({
-						openid: this.openid,
-						password: this.form.password,
-						telephone: this.form.telephone
-					})
-					uni.hideLoading()
+				this.$u.api.shopLogin({
+					openid: this.openid,
+					password: this.form.password,
+					telephone: this.form.telephone
+				}).then(async res => {
 					if (res.code === 200) {
 						this.$store.commit('setUserType', 1)
 						this.$store.commit('setShopToken', res.data.token)
@@ -132,19 +132,8 @@
 								url: '/shop/pages/store-home/store-home'
 							});
 						}, 1500)
-					} else {
-						uni.showToast({
-							title: res.msg || '鐧诲綍澶辫触',
-							icon: 'none'
-						})
 					}
-				} catch (err) {
-					uni.hideLoading()
-					uni.showToast({
-						title: '鐧诲綍澶辫触',
-						icon: 'none'
-					})
-				}
+				})
 			},
 			goToService(type) {
 				uni.navigateTo({
@@ -195,6 +184,10 @@
 	.password-row {
 		margin-top: 18rpx;
 	}
+	
+	.password-toggle {
+		padding: 10rpx;
+	}
 
 	.input-field {
 		flex: 1;
@@ -229,7 +222,6 @@
 	}
 
 	.agreement-row {
-		background: #D9F3FF;
 		margin-top: 60rpx;
 		display: flex;
 		align-items: flex-start;

--
Gitblit v1.9.3