Bläddra i källkod

授权手机号调整

kk.shi 3 år sedan
förälder
incheckning
ed874d3199
1 ändrade filer med 4 tillägg och 3 borttagningar
  1. 4 3
      pages/integral/integral.js

+ 4 - 3
pages/integral/integral.js

@@ -297,6 +297,7 @@ hideModal() {
 
 /**授权手机号 */
 getPhoneNumber(e) {
+    let that = this;
     getPhoneNumberSync(e, async () => {
         console.log(e)
         if (getMobileCache() == '') {
@@ -336,14 +337,14 @@ scoreClick() {
 
 // 查询积分
 getphoneClick() {
-    console.log(this.data.setPhone)
-    if (!(/^1[3456789]\d{9}$/.test(this.data.setPhone))) {
+    console.log(getMobileCache())
+    if (!(/^1[3456789]\d{9}$/.test(getMobileCache()))) {
         wx.showToast({
             title: '填写正确手机号',
             icon: 'error',
             duration: 2000
         });
-    } else if (this.data.setPhone != '') {
+    } else if (getMobileCache() != '') {
         // wx.showLoading({
         //     title: '加载中'
         // });