Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
zhiliang-light-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ddc356b9
authored
2020-03-10 18:48:36 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
70f2b522
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
5 deletions
src/app.js
src/http/api.js
src/pages/index/index.js
src/app.js
View file @
ddc356b
...
...
@@ -22,6 +22,7 @@ App({
this
.
share
()
},
globalData
:
{
configData
:
{},
indexInfo
:
null
,
userInfo
:
null
,
wxcode
:
store
.
getItem
(
"wxcode"
),
...
...
src/http/api.js
View file @
ddc356b
...
...
@@ -55,6 +55,9 @@ module.exports = {
// 提现
pointsWithDraw
:
'/points/withdraw'
,
// 配置项
config
:
'/constant'
,
areaQuery
:
'https://api.k.wxpai.cn/bizproxy/kdapi/area'
,
// post 区域查询
uploadFile
:
'/kdapi/file/upload'
//上传图片通用接口
...
...
src/pages/index/index.js
View file @
ddc356b
...
...
@@ -21,7 +21,8 @@ Page({
code
:
""
,
// 手输入码 / 扫出的奖金码
memberCode
:
""
,
// 扫出的用户码
isVerify
:
true
,
// 是否已经认证
options
:
{}
options
:
{},
configData
:
{}
},
onShareAppMessage
()
{},
showAuth
()
{
...
...
@@ -33,8 +34,7 @@ Page({
this
.
setData
({
options
:
options
})
this
.
queryConfig
();
},
onShow
()
{
...
...
@@ -234,11 +234,15 @@ Page({
*/
onCashExchangeHanler
(
evt
)
{
let
_this
=
this
;
let
minPoints
=
Fen2Yuan
(
500
);
let
{
configData
}
=
_this
.
data
;
let
minPoints
=
configData
.
minPoints
||
500
;
let
minPointsYuan
=
Fen2Yuan
(
minPoints
);
wx
.
showModal
({
title
:
'提示'
,
content
:
`确认兑换所有奖金?\r\n(余额满
${
minPoints
}
元才能提现)`
,
content
:
`确认兑换所有奖金?\r\n(余额满
${
minPoints
Yuan
}
元才能提现)`
,
success
(
res
)
{
if
(
res
.
confirm
)
{
_this
.
queryPointsWithDraw
();
...
...
@@ -337,6 +341,21 @@ Page({
});
},
queryConfig
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
url
:
app
.
api
.
config
,
data
:
{}
}).
then
((
result
)
=>
{
this
.
setData
({
configData
:
result
})
app
.
globalData
.
configData
=
result
;
resolve
(
result
);
})
});
},
/**
* 扫个人码 做任务,用户无感知
* 如果没有码,直接返回
...
...
Please
register
or
sign in
to post a comment