Commit 58813088 by 梁建民

好友助力

parent 07ecad60
......@@ -20,6 +20,12 @@ Page({
onLoad: function (options) {
let exchange_id = options.exchange_id;
wx.setStorage({
key: "exchange_id",
data: exchange_id
});
this.setData({
exchange_id: exchange_id
});
......@@ -76,8 +82,11 @@ Page({
* 助力
*/
assistance: function () {
let exchange_id = wx.getStorageSync('exchange_id');
http.getData(apis.assistsAdd, 'GET', {
exchange_id: this.data.exchange_id
exchange_id: exchange_id
}, (res) => {
if (res.errcode === 0) {
this.getData();
......@@ -93,10 +102,12 @@ Page({
/**
* 获取数据
*/
getData: function (type) {
getData: function () {
let exchange_id = wx.getStorageSync('exchange_id');
http.getData(apis.assistsList, 'GET', {
exchange_id: this.data.exchange_id
exchange_id: exchange_id
}, (res) => {
if (res.errcode === 0) {
this.setData({
......@@ -105,7 +116,7 @@ Page({
} else if (res.errcode === -1) {
wx.setStorage({
key: "help_exchange_id",
data: this.data.exchange_id
data: exchange_id
});
}
}, true, false, true);
......
......@@ -340,6 +340,13 @@
"pathName": "pages/person/withdrawalsuccess/index",
"query": "money=10",
"scene": null
},
{
"id": -1,
"name": "pages/person/helpfriend/index",
"pathName": "pages/person/helpfriend/index",
"query": "exchange_id=34",
"scene": null
}
]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment