Commit 58813088 by 梁建民

好友助力

parent 07ecad60
...@@ -20,6 +20,12 @@ Page({ ...@@ -20,6 +20,12 @@ Page({
onLoad: function (options) { onLoad: function (options) {
let exchange_id = options.exchange_id; let exchange_id = options.exchange_id;
wx.setStorage({
key: "exchange_id",
data: exchange_id
});
this.setData({ this.setData({
exchange_id: exchange_id exchange_id: exchange_id
}); });
...@@ -76,8 +82,11 @@ Page({ ...@@ -76,8 +82,11 @@ Page({
* 助力 * 助力
*/ */
assistance: function () { assistance: function () {
let exchange_id = wx.getStorageSync('exchange_id');
http.getData(apis.assistsAdd, 'GET', { http.getData(apis.assistsAdd, 'GET', {
exchange_id: this.data.exchange_id exchange_id: exchange_id
}, (res) => { }, (res) => {
if (res.errcode === 0) { if (res.errcode === 0) {
this.getData(); this.getData();
...@@ -93,10 +102,12 @@ Page({ ...@@ -93,10 +102,12 @@ Page({
/** /**
* 获取数据 * 获取数据
*/ */
getData: function (type) { getData: function () {
let exchange_id = wx.getStorageSync('exchange_id');
http.getData(apis.assistsList, 'GET', { http.getData(apis.assistsList, 'GET', {
exchange_id: this.data.exchange_id exchange_id: exchange_id
}, (res) => { }, (res) => {
if (res.errcode === 0) { if (res.errcode === 0) {
this.setData({ this.setData({
...@@ -105,7 +116,7 @@ Page({ ...@@ -105,7 +116,7 @@ Page({
} else if (res.errcode === -1) { } else if (res.errcode === -1) {
wx.setStorage({ wx.setStorage({
key: "help_exchange_id", key: "help_exchange_id",
data: this.data.exchange_id data: exchange_id
}); });
} }
}, true, false, true); }, true, false, true);
......
...@@ -340,6 +340,13 @@ ...@@ -340,6 +340,13 @@
"pathName": "pages/person/withdrawalsuccess/index", "pathName": "pages/person/withdrawalsuccess/index",
"query": "money=10", "query": "money=10",
"scene": null "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