litian
2024-04-02 6a189829531106872319d1508d93a3e05573ce74
packageDomain/pages/sampleBookList/applicationForm/index.js
@@ -66,6 +66,9 @@
  tabClick(item) {
    let that = this;
    that.setData({
      bookList: []
    })
    if (item.detail.value == '1') {
      that.setData({
        active: item.detail.value,
@@ -143,11 +146,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 +240,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: '提示!', //提示的标题