默认提交
Showing
3 changed files
with
28 additions
and
5 deletions
... | @@ -22,6 +22,7 @@ App({ | ... | @@ -22,6 +22,7 @@ App({ |
22 | this.share() | 22 | this.share() |
23 | }, | 23 | }, |
24 | globalData: { | 24 | globalData: { |
25 | configData: {}, | ||
25 | indexInfo: null, | 26 | indexInfo: null, |
26 | userInfo: null, | 27 | userInfo: null, |
27 | wxcode: store.getItem("wxcode"), | 28 | wxcode: store.getItem("wxcode"), | ... | ... |
... | @@ -55,6 +55,9 @@ module.exports = { | ... | @@ -55,6 +55,9 @@ module.exports = { |
55 | // 提现 | 55 | // 提现 |
56 | pointsWithDraw: '/points/withdraw', | 56 | pointsWithDraw: '/points/withdraw', |
57 | 57 | ||
58 | // 配置项 | ||
59 | config: '/constant', | ||
60 | |||
58 | areaQuery: 'https://api.k.wxpai.cn/bizproxy/kdapi/area', // post 区域查询 | 61 | areaQuery: 'https://api.k.wxpai.cn/bizproxy/kdapi/area', // post 区域查询 |
59 | 62 | ||
60 | uploadFile: '/kdapi/file/upload' //上传图片通用接口 | 63 | uploadFile: '/kdapi/file/upload' //上传图片通用接口 | ... | ... |
... | @@ -21,7 +21,8 @@ Page({ | ... | @@ -21,7 +21,8 @@ Page({ |
21 | code: "", // 手输入码 / 扫出的奖金码 | 21 | code: "", // 手输入码 / 扫出的奖金码 |
22 | memberCode: "", // 扫出的用户码 | 22 | memberCode: "", // 扫出的用户码 |
23 | isVerify: true, // 是否已经认证 | 23 | isVerify: true, // 是否已经认证 |
24 | options: {} | 24 | options: {}, |
25 | configData: {} | ||
25 | }, | 26 | }, |
26 | onShareAppMessage() {}, | 27 | onShareAppMessage() {}, |
27 | showAuth() { | 28 | showAuth() { |
... | @@ -33,8 +34,7 @@ Page({ | ... | @@ -33,8 +34,7 @@ Page({ |
33 | this.setData({ | 34 | this.setData({ |
34 | options: options | 35 | options: options |
35 | }) | 36 | }) |
36 | 37 | this.queryConfig(); | |
37 | |||
38 | }, | 38 | }, |
39 | 39 | ||
40 | onShow() { | 40 | onShow() { |
... | @@ -234,11 +234,15 @@ Page({ | ... | @@ -234,11 +234,15 @@ Page({ |
234 | */ | 234 | */ |
235 | onCashExchangeHanler(evt) { | 235 | onCashExchangeHanler(evt) { |
236 | let _this = this; | 236 | let _this = this; |
237 | let minPoints = Fen2Yuan(500); | 237 | let { |
238 | configData | ||
239 | } = _this.data; | ||
240 | let minPoints = configData.minPoints || 500; | ||
241 | let minPointsYuan = Fen2Yuan(minPoints); | ||
238 | 242 | ||
239 | wx.showModal({ | 243 | wx.showModal({ |
240 | title: '提示', | 244 | title: '提示', |
241 | content: `确认兑换所有奖金?\r\n(余额满${minPoints}元才能提现)`, | 245 | content: `确认兑换所有奖金?\r\n(余额满${minPointsYuan}元才能提现)`, |
242 | success(res) { | 246 | success(res) { |
243 | if (res.confirm) { | 247 | if (res.confirm) { |
244 | _this.queryPointsWithDraw(); | 248 | _this.queryPointsWithDraw(); |
... | @@ -337,6 +341,21 @@ Page({ | ... | @@ -337,6 +341,21 @@ Page({ |
337 | }); | 341 | }); |
338 | }, | 342 | }, |
339 | 343 | ||
344 | queryConfig() { | ||
345 | return new Promise((resolve, reject) => { | ||
346 | app.post({ | ||
347 | url: app.api.config, | ||
348 | data: {} | ||
349 | }).then((result) => { | ||
350 | this.setData({ | ||
351 | configData: result | ||
352 | }) | ||
353 | app.globalData.configData = result; | ||
354 | resolve(result); | ||
355 | }) | ||
356 | }); | ||
357 | }, | ||
358 | |||
340 | /** | 359 | /** |
341 | * 扫个人码 做任务,用户无感知 | 360 | * 扫个人码 做任务,用户无感知 |
342 | * 如果没有码,直接返回 | 361 | * 如果没有码,直接返回 | ... | ... |
-
Please register or sign in to post a comment