Переглянути джерело

fix(修改移动积分页面显示) 修改下过单后异常退出后进入重新拉起输入框

xing.li 3 роки тому
батько
коміт
3bdeef2659
2 змінених файлів з 16 додано та 7 видалено
  1. 12 3
      pages/integral/integral.js
  2. 4 4
      pages/integral/integral.wxss

+ 12 - 3
pages/integral/integral.js

@@ -92,7 +92,8 @@ Page({
     // 获取优惠券列表
     this.getCouponList()
     if(getMobileCache() != ''){
-        this.findIntegral()
+        // this.findIntegral()
+        this.getphoneClick()
     }  
   },
 
@@ -410,6 +411,7 @@ getphoneClick() {
                 let dateNum = Math.round(new Date().getTime() / 1000).toString()
                 if (wx.getStorageSync('orderDetails') != '' && this.data.mobile === JSON.parse(wx
                         .getStorageSync('orderDetails')).mobile) {
+                            console.log(dateNum - JSON.parse(wx.getStorageSync('orderDetails')).date)
                     if (dateNum - JSON.parse(wx.getStorageSync('orderDetails')).date <= 120) {
                         const data = JSON.parse(wx.getStorageSync('orderDetails'))
                         if (dateNum - data.date < 60) {
@@ -436,6 +438,8 @@ getphoneClick() {
                                 activeNum: 0,
                             })
                         }
+                    }else{
+                        wx.setStorageSync('orderDetails', null)
                     }
                 }
             } 
@@ -636,6 +640,7 @@ paymentClick() {
                             date: Math.round(new Date().getTime() / 1000).toString(),
                             mobile: getMobileCache()
                         },
+                       
                     })
                     wx.setStorageSync('orderDetails', JSON.stringify(this.data.active1obj))
                     if (res.data.step === 1) {
@@ -663,10 +668,10 @@ paymentClick() {
 
             }).catch(error=>{
                 console.log('zhifu')
-                console.log(error)
+                console.log(error.data.message)
                 wx.showToast({
                     icon: 'none',
-                    title: '请一分钟后再选择'
+                    title: error.data.message
                 })
             })
         }
@@ -846,6 +851,10 @@ paymentClick() {
             }).catch(error=>{
                 console.log('chongxin')
                 console.log(error)
+                wx.showToast({
+                    icon: 'none',
+                    title: error.data.message
+                })
             });
         } else {
             if (this.data.activeNum === 0 && this.data.codeName === '重新获取验证码') {

+ 4 - 4
pages/integral/integral.wxss

@@ -521,7 +521,7 @@ page {
   position: fixed;
   width: 600rpx;
   height: 590rpx;
-  top: 35% !important;
+  top: 30% !important;
   left: 50%;
   transform: translate(-50%, -50%);
   background-color: white;
@@ -562,9 +562,9 @@ page {
 }
 
 .payment-code-input {
-  margin: 0 auto;
-  margin-top: 10rpx;
-  margin-bottom: 16rpx;
+  /* margin: 0 auto; */
+  /* margin-top: 10rpx; */
+  /* margin-bottom: 16rpx; */
   box-sizing: border-box;
   border-bottom: 2rpx solid #DCDFE6;
   text-align: center;