From e6a156a6a8bb6f1d3a17e9310269f53c56e10b42 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期一, 08 四月 2024 22:29:26 +0800
Subject: [PATCH] 问题修改

---
 packageDomain/pages/sampleBookList/applicationForm/index.js |   33 +++++++++++++++++++++++++++------
 1 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/packageDomain/pages/sampleBookList/applicationForm/index.js b/packageDomain/pages/sampleBookList/applicationForm/index.js
index 3622b8f..b1831f9 100644
--- a/packageDomain/pages/sampleBookList/applicationForm/index.js
+++ b/packageDomain/pages/sampleBookList/applicationForm/index.js
@@ -46,6 +46,18 @@
           'contactInfo.phone': JSON.parse(this.data.userInfo.data).phone,
           'contactInfo.detailedAddress': JSON.parse(this.data.userInfo.data).detailedAddress,
         })
+      } else {
+        wx.showModal({
+          title: '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', //鎻愮ず鐨勬爣棰�
+          content: '璇峰厛杩涜鏁欏笀璁よ瘉锛�', //鎻愮ず鐨勫唴瀹�
+          success: function (res) {
+            if (res.confirm) {
+              wx.navigateTo({
+                url: "/packageDomain/pages/teacherCertification/index",
+              });
+            }
+          }
+        })
       }
       if (wx.getStorageSync("paperBookList")) {
         this.setData({
@@ -66,6 +78,9 @@
 
   tabClick(item) {
     let that = this;
+    that.setData({
+      bookList: []
+    })
     if (item.detail.value == '1') {
       that.setData({
         active: item.detail.value,
@@ -143,11 +158,17 @@
     const {
       phoneError
     } = this.data;
-    const isPhoneNumber = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e.detail.value);
-    if (phoneError === isPhoneNumber) {
+    if (e.detail.value) {
+      const isPhoneNumber = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e.detail.value);
+      if (phoneError === isPhoneNumber) {
+        this.setData({
+          phoneError: !isPhoneNumber,
+          "contactInfo.phone": e.detail.value,
+        });
+      }
+    } else {
       this.setData({
-        phoneError: !isPhoneNumber,
-        "contactInfo.phone": e.detail.value,
+        phoneError: false,
       });
     }
   },
@@ -231,13 +252,13 @@
                 electronicBookList: [],
                 bookList: [],
               })
-              wx.setStorageSync("electronicBookList", that.data.electronicBookList);
+              wx.removeStorageSync("electronicBookList")
             } else {
               that.setData({
                 paperBookList: [],
                 bookList: [],
               })
-              wx.setStorageSync("paperBookList", that.data.paperBookList);
+              wx.removeStorageSync("paperBookList")
             }
             wx.showModal({
               title: '鎻愮ず锛�', //鎻愮ず鐨勬爣棰�

--
Gitblit v1.9.1