From 36f9c0534377a6daa0640faa96b7072532134253 Mon Sep 17 00:00:00 2001
From: meo <18801474720@163.com>
Date: Thu, 19 Sep 2019 18:11:03 +0800
Subject: [PATCH] =?UTF-8?q?[=E6=8E=88=E6=9D=83][=E4=BF=AE=E6=94=B9]:[?=
=?UTF-8?q?=E7=82=B9=E5=87=BB=E5=85=91=E6=8D=A2=E6=8E=88=E6=9D=83=E6=89=8B?=
=?UTF-8?q?=E6=9C=BA=E5=8F=B7]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/exchange/exchange.js | 22 ++++++++++++++++++----
pages/exchange/exchange.wxml | 2 +-
pages/getphoneInfo/index.js | 16 +++++++++++++++-
3 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/pages/exchange/exchange.js b/pages/exchange/exchange.js
index 58673e1..6e76116 100644
--- a/pages/exchange/exchange.js
+++ b/pages/exchange/exchange.js
@@ -9,7 +9,15 @@ Page({
* 页面的初始数据
*/
data: {
- navigationBarHeight
+ navigationBarHeight,
+ exchange:""
+ },
+ onLoad(options){
+ if (options&&options.exchange){
+ this.setData({
+ exchange: options.exchange
+ })
+ }
},
// 兑换
exchange(e){
@@ -24,7 +32,7 @@ Page({
})
return;
}
- that.checkPhoneStatus(e.detail.value.code,formId = e.detail.formId);
+ that.checkPhoneStatus(e.detail.value.code,e.detail.formId);
},
checkPhoneStatus: function (password, formId) {
let that = this;
@@ -42,7 +50,7 @@ Page({
*
*/
wx.redirectTo({
- url: "/pages/getphoneInfo/index",
+ url: `/pages/getphoneInfo/index?exchange=${password}`,
})
} else {
wx.showToast({
@@ -55,10 +63,16 @@ Page({
},
getCouponOrderByPassword(password, formId) {
let that = this;
+ let passwords;
+ if(that.data.exchange){
+ passwords = that.data.exchange
+ }else{
+ passwords = password
+ }
Http.post({
url: config.api.getCouponOrderByPassword,
data: {
- password: password,
+ password: passwords,
formId: formId
}
})
diff --git a/pages/exchange/exchange.wxml b/pages/exchange/exchange.wxml
index d72f224..0b3af9a 100644
--- a/pages/exchange/exchange.wxml
+++ b/pages/exchange/exchange.wxml
@@ -1,7 +1,7 @@