Эх сурвалжийг харах

fix:项目详情表单加入星号

songzhen 2 сар өмнө
parent
commit
1394bfb1a2

+ 3 - 0
src/components/TravelProjectDetail/BookInfo.vue

@@ -50,12 +50,14 @@
           <van-field
             v-model="customerName"
             label="联系人"
+            required
             maxlength="50"
             placeholder="请输入联系人"
           />
           <van-field
             v-model="customerMobile"
             label="联系电话"
+            required
             type="tel"
             maxlength="20"
             placeholder="请输入联系电话"
@@ -70,6 +72,7 @@
           <van-field
             v-model="customerWechat"
             label="微信"
+            required
             maxlength="50"
             placeholder="请输入微信"
           />

+ 4 - 0
src/pages/t/[id].client.vue

@@ -117,6 +117,10 @@ function handleSubmitInfo() {
     return;
   }
 
+  if (!bookInfo.customerWechat) {
+    showToast("请输入微信号");
+    return;
+  }
   submitLoading.value = true;
   request("/website/tourism/myOrder/add", {
     method: "post",

+ 4 - 4
src/utils/request.js

@@ -70,10 +70,10 @@ const handleServerError = async (code, msg) => {
   if (code === "UNAUTHORIZED_LOGIN") {
     const authStore = useAuthStore();
     authStore.cleanToken();
-    // await navigateTo({
-    //   path: '/login',
-    //   replace: true
-    // })
+    await navigateTo({
+      path: "/login",
+      replace: true,
+    });
     return;
   }
   if (msg) {