Explorar o código

移动积分手机号

kk.shi %!s(int64=3) %!d(string=hai) anos
pai
achega
5e8de16a4a
Modificáronse 4 ficheiros con 57 adicións e 82 borrados
  1. 50 10
      pages/integral/integral.js
  2. 3 3
      pages/integral/integral.wxml
  3. 1 61
      project.private.config.json
  4. 3 8
      utils/request.js

+ 50 - 10
pages/integral/integral.js

@@ -532,7 +532,6 @@ paymentClick() {
             shopid: this.data.shopid
         }).then(res => {
                 if (res.code === '0000') {
-                    this.codeSetInterval(60)
                     this.setData({
                         codeName: '60s后重新获取',
                         paymentStatus: true,
@@ -557,6 +556,8 @@ paymentClick() {
                             activeNum: 0,
                         })
                     }
+                    this.getPaySend()
+                    this.codeSetInterval(60)
                 } else {
                     console.log(res.data.message)
                     console.log(this.data.integralNum,this.data.mobile,JSON.stringify(data))
@@ -587,9 +588,9 @@ paymentClick() {
     nextCodeClick() {
         console.log(this.data.activeNum,this.data.active2code)
         if (this.data.activeNum === 1 && this.data.active2code !== '') {
-            uni.showLoading({
-                title: '兑换中'
-            });
+            // wx.showLoading({
+            //     title: '兑换中'
+            // });
             // let fingerprint = ''
             // let sessionid = ''
 
@@ -601,10 +602,10 @@ paymentClick() {
                 fingerprint: '',
                 mobile: this.data.mobile,
                 optCode: this.data.active2code,
-                order_no: this.active1obj.order_no,
-                orderId: this.active1obj.orderId,
+                order_no: this.data.active1obj.order_no,
+                orderId: this.data.active1obj.orderId,
                 sessionid: '',
-                shopid: this.shopid
+                shopid: this.data.shopid
             }).then(res => {
                     if (res.code === '0000') {
                         const obj = {
@@ -623,8 +624,10 @@ paymentClick() {
                         this.data.couponList.forEach((v)=>{
                             v.quantity = 0
                         })
-                        this.paymentStatus = false
-                        this.paymentBgStatus = false
+                        this.setData({
+                            paymentStatus: false,
+                            paymentBgStatus: false,
+                        })
                         wx.setStorageSync('orderDetails', null)
                         wx.hideLoading();
                         wx.navigateTo({
@@ -713,8 +716,44 @@ paymentClick() {
         }, 1000)
     },
 
+    getPaySend(){
+        if (this.data.activeNum === 1) {
+            console.log('发送短信')
+                Integralinfo.getPaySend({
+                    order_no: this.data.active1obj.order_no,
+                    mobile: this.data.mobile,
+                    shopid: this.data.shopid,
+                }).then(res => {
+                        if (res.code === '0000') {
+                            this.setData({
+                                codeName: '60s后重新获取',
+                            })
+                            this.codeSetInterval(60)
+                        } else {
+                            this.setData({
+                                showToastObj: {
+                                    icon: 'iconSueecss',
+                                    title: res.message,
+                                    status: true
+                                }
+                            })
+                            setTimeout(() => {
+                                this.setData({
+                                    showToastObj: {
+                                        icon: 'iconSueecss',
+                                        title: res.message,
+                                        status: false
+                                    }
+                                })
+                            }, 2500)
+                        }
+                })
+        }
+    },
+
     // 重新获取短信
     getCodeClick() {
+        console.log(this.data.activeNum,this.data.codeName,this.data.active1obj.step)
         if ((this.data.activeNum === 1 && this.data.codeName === '重新获取验证码') && this.data.active1obj.step === 1) {
             Integralinfo.getSendCmccSms({
                 orderId: this.data.active1obj.orderId,
@@ -726,7 +765,7 @@ paymentClick() {
                             codeName: '60s后重新获取',
                         })
                         this.codeSetInterval(60)
-                        const obj = this.active1obj
+                        const obj = this.data.active1obj
                         obj.date = Math.round(new Date().getTime() / 1000).toString()
                         wx.setStorageSync('orderDetails', JSON.stringify(obj))
                     } else {
@@ -778,6 +817,7 @@ paymentClick() {
                         }
                 });
             } else if (this.data.activeNum === 1 && this.data.codeName === '重新获取验证码') {
+                console.log('短信')
                 Integralinfo.getPaySend({
                     order_no: this.data.active1obj.order_no,
                     mobile: this.data.mobile,

+ 3 - 3
pages/integral/integral.wxml

@@ -124,7 +124,7 @@
     <text>查询移动积分</text>
   </view>
   <view class="score-phone">
-    <input class="score-input" type="number" model="setPhone" focus="true" maxlength="11" placeholder="请输入手机号码" />
+    <input class="score-input" type="number" model:value="{{setPhone}}" focus="true" maxlength="11" placeholder="请输入手机号码" />
   </view>
   <view class="score-btn">
     <view class="score-cancel">
@@ -164,11 +164,11 @@
     </view>
     <view class="payment-code-input" wx:if="{{activeNum === 0}}">
       <text class="payment-iconfont payment-iconyanzhengma payment-code-input-text"></text>
-      <input type="payment-number" model="active1code" focus="true" maxlength="6" placeholder="输入6位数验证码" />
+      <input type="payment-number" model:value="{{active1code}}" focus="true" maxlength="6" placeholder="输入6位数验证码" />
     </view>
     <view class="payment-code-input" wx:if="{{activeNum === 1}}">
       <text class="payment-iconfont payment-iconyanzhengma payment-code-input-text"></text>
-      <input type="payment-number" model="active2code" focus="true" maxlength="6" placeholder="输入6位数验证码" />
+      <input type="payment-number"  model:value="{{active2code}}" focus="true" maxlength="6" placeholder="输入6位数验证码" />
     </view>
     <view class="payment-code-btn">
       <button class="payment-button" type="payment-default" hover-class="navigator-hover" catchtap="nextCodeClick">确

+ 1 - 61
project.private.config.json

@@ -170,67 +170,7 @@
         },
         {
           "name": "",
-          "pathName": "pages/welfareMall/feedback/feedback",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "",
-          "pathName": "pages/welfareMall/refundInfo/refundInfo",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "",
-          "pathName": "pages/welfareMall/buyInfo/buyInfo",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "",
-          "pathName": "pages/welfareMall/activityInfo/activityInfo",
-          "query": "activityId=wGxvdw5qLa-132",
-          "scene": null
-        },
-        {
-          "name": "",
-          "pathName": "pages/welfareMall/couponFitFood/index",
-          "query": "couponId=V0746sZKv1-164&couponName=%E8%96%AF%E6%9D%A1%E4%BB%A3%E9%87%91%E5%88%B842%EF%BC%88%E9%83%A8%E5%88%86%E9%97%A8%E5%BA%97-%E6%B5%8B%E8%AF%95%EF%BC%89",
-          "scene": null
-        },
-        {
-          "name": "pages/welfareMall/activityInfo/activityInfo",
-          "pathName": "pages/welfareMall/activityInfo/activityInfo",
-          "query": "activityId=ZBJvj407nG-142",
-          "scene": null
-        },
-        {
-          "name": "pages/welfareMall/activityInfo/activityInfo",
-          "pathName": "pages/welfareMall/activityInfo/activityInfo",
-          "query": "activityId=AYy7AEO7zJ-145",
-          "scene": null
-        },
-        {
-          "name": "pages/welfareMall/activityInfo/activityInfo",
-          "pathName": "pages/welfareMall/activityInfo/activityInfo",
-          "query": "activityId=N6bmw5BqQw-146",
-          "scene": null
-        },
-        {
-          "name": "pages/welfareMall/activityInfo/activityInfo",
-          "pathName": "pages/welfareMall/activityInfo/activityInfo",
-          "query": "activityId=o2QmB3G7Pk-143",
-          "scene": null
-        },
-        {
-          "name": "pages/welfareMall/activityInfo/activityInfo",
-          "pathName": "pages/welfareMall/activityInfo/activityInfo",
-          "query": "activityId=GzYqbLGmj3-125&channel=1111",
-          "scene": null
-        },
-        {
-          "name": "",
-          "pathName": "pages/welfareMall/coupon/coupon",
+          "pathName": "pages/integral/integral",
           "query": "",
           "scene": null,
           "launchMode": "default"

+ 3 - 8
utils/request.js

@@ -2,11 +2,11 @@ import util, { isFunc } from './util.js'
 class request {
 
     //本地的
-//   static BASE_URL = 'http://localhost:8014/'
+  //  static BASE_URL = 'http://localhost:8014/'
 //   pre环境的
 //   static BASE_URL = 'https://oapi.shpr.top/'
 //   正式的
-     static BASE_URL = 'https://vapi.hsayi.com/'
+   static BASE_URL = 'https://vapi.hsayi.com/'
 //   @todo需要修改正式的域名
 
   static HEAD = {
@@ -84,7 +84,7 @@ class request {
     let nonce = Math.floor(Math.random() * 1000).toString()
     let signStr = timestamp+nonce+""+"U6Watb875eCiX4Lq";
     let sign =  util.sha1(signStr).toString();
-    
+
     let signHeadInfo = {
         "SIGN":sign,
         "NONCE":nonce,
@@ -118,11 +118,6 @@ class request {
                             catchErrorFunc(res?.data)
                         }
                     } else {
-                        var authUrl = this.BASE_URL+"open/wxapp/auth-mobile";
-                        if(url == authUrl && res?.data.code==401){
-                              getApp().login();
-                        }
-                       
                         wx.showToast({
                             title: res?.data?.msg,
                             icon: "none"