Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8d091cde
authored
Oct 10, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
9c55a194
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
85 deletions
pages/person/withdrawal/index.js
pages/person/withdrawal/index.wxml
project.config.json
utils/api.js
pages/person/withdrawal/index.js
View file @
8d091cde
...
...
@@ -197,75 +197,26 @@ Page({
*/
withdrawalfn
:
function
()
{
if
(
this
.
data
.
can_exchange
===
0
)
{
wx
.
showToast
({
title
:
'今天已经兑换过了,请明天再来吧'
,
icon
:
'none'
,
duration
:
2000
});
return
false
;
}
else
if
(
this
.
data
.
can_exchange
===
-
1
)
{
wx
.
showToast
({
title
:
'用户无法兑换,用户未认证'
,
icon
:
'none'
,
duration
:
2000
});
return
false
;
}
if
(
this
.
data
.
indexOf
==
-
1
)
{
wx
.
showToast
({
title
:
'请选择金额'
,
icon
:
'none'
,
duration
:
2000
});
return
false
;
}
let
exchange_id
=
this
.
data
.
exchangeSettings
[
this
.
data
.
indexOf
].
id
;
let
money
=
this
.
data
.
exchangeSettings
[
this
.
data
.
indexOf
].
amount
*
1
;
let
exchange_id
=
this
.
data
.
weixin_exchange_info
.
exchange_id
;
let
money
=
10
;
if
(
exchange_id
)
{
if
(
this
.
data
.
official_account_bind
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'请关注公众号,才能提现'
,
showCancel
:
false
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'请关注公众号,才能提现'
,
showCancel
:
false
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
navigateTo
({
url
:
'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzU3NDkzMDQ5OA==&scene=124#wechat_redirect'
});
}
}
})
}
}
})
}
else
{
http
.
getData
(
apis
.
userExchangesConfirm
,
'GET'
,
{
exchange_id
:
exchange_id
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
wx
.
navigateTo
({
url
:
'/pages/person/withdrawalsuccess/index?money='
+
money
});
}
else
{
wx
.
showToast
({
title
:
res
.
errmsg
,
icon
:
'none'
,
duration
:
2000
});
}
},
true
,
false
,
true
);
}
http
.
getData
(
apis
.
userExchangesConfirm
,
'GET'
,
{
exchange_id
:
exchange_id
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
wx
.
navigateTo
({
url
:
'/pages/person/withdrawalsuccess/index?money='
+
money
});
}
else
{
wx
.
showToast
({
title
:
res
.
errmsg
,
icon
:
'none'
,
duration
:
2000
});
}
},
true
,
false
,
true
);
}
},
...
...
pages/person/withdrawal/index.wxml
View file @
8d091cde
...
...
@@ -47,12 +47,20 @@
<text class="t1">红包提现</text>
<text class="t2">账户红包:¥{{integral}}</text>
</view>
<view class="list row boxsiz">
<view class="list row boxsiz
{{weixin_exchange_info.assist_count == 2 ? 'opacity':''}}
">
<block wx:for="{{exchangeSettings}}" wx:key="item" wx:for-index="index">
<view class="wrap column rowCenter verCenter boxsiz {{index == indexOf ? 'curr':''}}" data-index="{{index}}" data-id="{{item.id}}" data-stock="{{item.stock}}" bind:tap="tab">
<text class="t1">{{item.name}}</text>
<text class="t2">剩余名额:{{item.stock}}</text>
</view>
<block wx:if="{{weixin_exchange_info.assist_count == 2}}">
<view class="wrap column rowCenter verCenter boxsiz {{index == indexOf ? 'curr':''}}" data-index="{{index}}" data-id="{{item.id}}" data-stock="{{item.stock}}">
<text class="t1">{{item.name}}</text>
<text class="t2">剩余名额:{{item.stock}}</text>
</view>
</block>
<block wx:else>
<view class="wrap column rowCenter verCenter boxsiz {{index == indexOf ? 'curr':''}}" data-index="{{index}}" data-id="{{item.id}}" data-stock="{{item.stock}}" bind:tap="tab">
<text class="t1">{{item.name}}</text>
<text class="t2">剩余名额:{{item.stock}}</text>
</view>
</block>
</block>
</view>
<block wx:if="{{weixin_exchange_info.assist_count == 2}}">
...
...
project.config.json
View file @
8d091cde
...
...
@@ -333,6 +333,13 @@
"pathName"
:
"pages/person/withdrawalsuccess/index"
,
"query"
:
"money=10"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/withdrawalsuccess/index"
,
"pathName"
:
"pages/person/withdrawalsuccess/index"
,
"query"
:
"money=10"
,
"scene"
:
null
}
]
}
...
...
utils/api.js
View file @
8d091cde
const
auth_url
=
'https://authapi.icsales.com'
;
const
so_url
=
'https://soapi.icsales.com'
;
const
offer_url
=
"https://offerapi.icsales.com"
;
const
user_url
=
'https://userapi.icsales.com'
;
const
goods_url
=
'https://goodsapi.icsales.com'
;
const
home_url
=
'https://home.icsales.com'
;
const
welfare_url
=
'https://welfareapi.icsales.com'
//
const auth_url = 'http://authapi.icsales.cc';
//
const so_url = 'http://soapi.icsales.cc';
//
const offer_url = "http://offerapi.icsales.cc";
//
const user_url = 'http://userapi.icsales.cc';
//
const goods_url = 'http://goodsapi.icsales.cc';
//
const home_url = 'http://home.icsales.cc';
//
const welfare_url = 'http://welfareapi.icsales.cc';
//
const auth_url = 'https://authapi.icsales.com';
//
const so_url = 'https://soapi.icsales.com';
//
const offer_url = "https://offerapi.icsales.com";
//
const user_url = 'https://userapi.icsales.com';
//
const goods_url = 'https://goodsapi.icsales.com';
//
const home_url = 'https://home.icsales.com';
//
const welfare_url = 'https://welfareapi.icsales.com'
const
auth_url
=
'http://authapi.icsales.cc'
;
const
so_url
=
'http://soapi.icsales.cc'
;
const
offer_url
=
"http://offerapi.icsales.cc"
;
const
user_url
=
'http://userapi.icsales.cc'
;
const
goods_url
=
'http://goodsapi.icsales.cc'
;
const
home_url
=
'http://home.icsales.cc'
;
const
welfare_url
=
'http://welfareapi.icsales.cc'
;
const
apis
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment