郭宇琦 3 өдөр өмнө
parent
commit
5b1bde677d

+ 10 - 0
pages/carDetail/carDetail.vue

@@ -227,7 +227,17 @@
 					success: function(res) {},
 				})
 			},
+			loadIsLogin() {
+				uni.navigateTo({
+					url: '/pages/loginRegister/login',
+				})
+			},
 			useCarBtn() {
+				const user_token = storage.getUserToken()
+				if (!user_token) {
+					this.loadIsLogin()
+					return
+				}
 				const pData = {
 					...this.car_detail,
 					price: this.price