郭宇琦 3 days ago
parent
commit
5b1bde677d
1 changed files with 10 additions and 0 deletions
  1. 10 0
      pages/carDetail/carDetail.vue

+ 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