kk.shi 3 年 前
コミット
7e4147ea4d
共有7 個のファイルを変更した177 個の追加21 個の削除を含む
  1. 2 1
      app.json
  2. 1 1
      pages/integral/exchange.js
  3. 19 19
      pages/integral/integral.js
  4. 77 0
      pages/integral/success.js
  5. 4 0
      pages/integral/success.json
  6. 9 0
      pages/integral/success.wxml
  7. 65 0
      pages/integral/success.wxss

+ 2 - 1
app.json

@@ -33,7 +33,8 @@
     "pages/integral/integral",
     "components/step/step",
     "pages/integral/exchange",
-    "pages/integral/instructions"
+    "pages/integral/instructions",
+    "pages/integral/success"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 1 - 1
pages/integral/exchange.js

@@ -89,7 +89,7 @@ Page({
         channelid: '',
         shopid: '',
         storeid: '',
-        mobile: '13816922995'
+        mobile: getMobileCache()
     }).then(res => {
         const data = res.data
         data.forEach((v) => {

+ 19 - 19
pages/integral/integral.js

@@ -80,7 +80,7 @@ Page({
     this.getBannerList()
     if(getMobileCache() != ''){
         Integralinfo.getBalance({
-            mobile: '13816922995', 
+            mobile: getMobileCache(), 
             callbackUrl: '../integral/integral.wxml',
             fingerprint: '',
             sessionid: '',
@@ -287,9 +287,9 @@ getPhoneNumber(e) {
         var reg = /^(\d{3})\d{4}(\d{4})$/;
         this.setData({
             isLogin: true,
-            setPhone: '13816922995',
-            mobile:  '13816922995',
-            phone: '13816922995'.replace(reg, "$1****$2")
+            setPhone: getMobileCache(),
+            mobile:  getMobileCache(),
+            phone: getMobileCache().replace(reg, "$1****$2")
         })     
         // console.log(this.data.setPhone)
         // console.log(this.data.mobile)
@@ -322,7 +322,7 @@ getphoneClick() {
         //     title: '加载中'
         // });
         Integralinfo.getBalance({
-            mobile: '13816922995', 
+            mobile: getMobileCache(), 
             callbackUrl: '../integral/integral.wxml',
             fingerprint: '',
             sessionid: '',
@@ -335,8 +335,8 @@ getphoneClick() {
                 var reg = /^(\d{3})\d{4}(\d{4})$/;
                 this.setData({
                    integralNum: arr.data,
-                   setPhone:  '13816922995',
-                   phone: this.data.setPhone.replace(reg, "$1****$2"),
+                   setPhone: getMobileCache(),
+                   phone: getMobileCache().replace(reg, "$1****$2"),
                 })
                 // this.data.integralNum = arr.data
                 // var reg = /^(\d{3})\d{4}(\d{4})$/;
@@ -476,7 +476,7 @@ addClick(e) {
 /** 刷新 */
 shuaxinClick() {
     Integralinfo.getBalance({
-        mobile:  '13816922995', 
+        mobile:  getMobileCache(), 
         callbackUrl: '../integral/integral.wxml',
         fingerprint: '',
         sessionid: '',
@@ -494,8 +494,8 @@ shuaxinClick() {
             var reg = /^(\d{3})\d{4}(\d{4})$/;
             this.setData({
                integralNum: arr.data,
-               setPhone:  '13816922995',
-               phone: this.data.setPhone.replace(reg, "$1****$2"),
+               setPhone:  getMobileCache(),
+               phone: getMobileCache().replace(reg, "$1****$2"),
             })
            
         }
@@ -542,7 +542,7 @@ paymentClick() {
         Integralinfo.getOrder({
             fingerprint:'',
             list: data,
-            mobile: this.data.setPhone, 
+            mobile: getMobileCache(), 
             tgid: this.data.tgid,
             sessionid:'',
             shopid: this.data.shopid
@@ -560,7 +560,7 @@ paymentClick() {
                             order_no: res.data.order_no,
                             step: res.data.step,
                             date: Math.round(new Date().getTime() / 1000).toString(),
-                            mobile: this.data.mobile
+                            mobile: getMobileCache()
                         },
                     })
                     wx.setStorageSync('orderDetails', JSON.stringify(this.data.active1obj))
@@ -616,7 +616,7 @@ paymentClick() {
             // #endif
             Integralinfo.getPayOnce({
                 fingerprint: '',
-                mobile: this.data.mobile,
+                mobile: getMobileCache(),
                 optCode: this.data.active2code,
                 order_no: this.data.active1obj.order_no,
                 orderId: this.data.active1obj.orderId,
@@ -648,7 +648,7 @@ paymentClick() {
                         wx.setStorageSync('orderDetails', null)
                         wx.hideLoading();
                         wx.navigateTo({
-                            url: '../success/success?row=' + JSON.stringify(obj)
+                            url: '../integral/success?row=' + JSON.stringify(obj)
                         })
                     } else {
                         wx.hideLoading();
@@ -673,7 +673,7 @@ paymentClick() {
         } else if (this.data.activeNum === 0 && this.data.active1code !== '') {
             Integralinfo.getPayOnce({
                 fingerprint: '',
-                mobile: this.data.mobile,
+                mobile: getMobileCache(),
                 optCode: this.data.active1code,
                 orderId: this.data.active1obj.orderId,
                 order_no: this.data.active1obj.order_no,
@@ -738,7 +738,7 @@ paymentClick() {
             console.log('发送短信')
             Integralinfo.getPaySend({
                 order_no: this.data.active1obj.order_no,
-                mobile: this.data.mobile,
+                mobile: getMobileCache(),
                 shopid: this.data.shopid,
             }).then(res => {
                         if (res.code === '0000') {
@@ -774,7 +774,7 @@ paymentClick() {
         if ((this.data.activeNum === 1 && this.data.codeName === '重新获取验证码') && this.data.active1obj.step === 1) {
             Integralinfo.getSendCmccSms({
                 orderId: this.data.active1obj.orderId,
-                mobile: this.data.mobile,
+                mobile: getMobileCache(),
                 shopid: this.data.shopid
             }).then(res => {
                     if (res.code === '0000') {
@@ -808,7 +808,7 @@ paymentClick() {
             if (this.data.activeNum === 0 && this.data.codeName === '重新获取验证码') {
                 Integralinfo.getSendCmccSms({
                     orderId: this.data.active1obj.orderId,
-                    mobile: this.data.mobile,
+                    mobile: getMobileCache(),
                     shopid: this.data.shopid
                 }).then(res => {
                         if (res.code === '0000') {
@@ -837,7 +837,7 @@ paymentClick() {
                 console.log('短信')
                 Integralinfo.getPaySend({
                     order_no: this.data.active1obj.order_no,
-                    mobile: this.data.mobile,
+                    mobile: getMobileCache(),
                     shopid: this.data.shopid,
                 }).then(res => {
                         if (res.code === '0000') {

+ 77 - 0
pages/integral/success.js

@@ -0,0 +1,77 @@
+// pages/integral/success.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  },
+
+  toInstructions(){
+    wx.navigateTo({
+      url: '../integral/instructions'
+  })
+  },
+  toCard(){
+    wx.navigateTo({
+      url: '../integral/exchange'
+  })
+  }
+})

+ 4 - 0
pages/integral/success.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "兑换成功",
+  "usingComponents": {}
+}

+ 9 - 0
pages/integral/success.wxml

@@ -0,0 +1,9 @@
+<!--pages/integral/success.wxml-->
+  <view class="top">
+    <view class="success-img"></view>
+    <view class="success-text">恭喜您兑换成功</view>
+  </view>
+  <view class="bottom flex-column">
+    <view class="success-card" catchtap="toCard">查看卡券</view>
+    <view class="success-instructions" catchtap="toInstructions">查看使用说明</view>
+  </view>

+ 65 - 0
pages/integral/success.wxss

@@ -0,0 +1,65 @@
+/* pages/integral/success.wxss */
+page{
+  display:flex;
+  flex-flow: column nowrap;
+  justify-content: left;
+  align-items: center;
+  box-sizing: border-box;
+}
+
+/* 垂直方向布局,水平居中 **/
+.flex-column{
+  display: flex;
+  flex-flow: column nowrap;
+  align-items: center;
+  justify-content: left;
+}
+
+/* 水平方向布局,垂直居中 **/
+.flex-row{
+  display: flex;
+  flex-flow: row nowrap;
+  align-items: center;
+  justify-content: center;
+}
+
+.success-style{
+  width: 750rpx;
+  height: 100%;
+  justify-content: space-between;
+}
+
+.top{
+  margin-top: 20rpx;
+  font-size: 38rpx;
+  font-weight: bold;
+}
+
+.bottom{
+  width: 750rpx;
+  margin-top: 70vh;
+}
+
+.success-card{ 
+  width: 650rpx;
+  height: 100rpx;
+  background-color: chocolate;
+  color: #ffffff;
+  text-align: center;
+  border-radius: 10rpx;
+  font-size: 40rpx;
+  line-height: 100rpx;
+  margin-bottom: 20rpx;
+  border: 2rpx solid #949191f7;
+}
+
+.success-instructions{
+  width: 650rpx;
+  height: 100rpx;
+  background-color: #f5f5f5;
+  text-align: center;
+  border-radius: 10rpx;
+  font-size: 40rpx;
+  line-height: 100rpx;
+  border: 2rpx solid #949191f7;
+}