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 @@