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
b0187041
authored
Sep 09, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
JS
parent
3dd4246e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
34 deletions
pages/person/exchange/index.js
pages/person/exchange/index.less
pages/person/exchange/index.wxml
utils/api.js
pages/person/exchange/index.js
View file @
b0187041
...
...
@@ -11,7 +11,8 @@ Page({
*/
data
:
{
tabIndex
:
1
,
integralBillsList
:
[]
integralBillsList
:
[],
userExchanges
:
[]
},
/**
...
...
@@ -65,14 +66,31 @@ Page({
/**
* 获取数据
*/
getData
:
function
(
url
,
type
)
{
getData
:
function
()
{
http
.
getData
(
apis
.
integralBillsList
,
'GET'
,
null
,
(
res
)
=>
{
let
url
=
''
;
if
(
this
.
data
.
tabIndex
==
1
)
{
url
=
apis
.
integralBillsList
;
}
else
if
(
this
.
data
.
tabIndex
==
2
)
{
url
=
apis
.
userExchangesList
;
}
http
.
getData
(
url
,
'GET'
,
null
,
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
setData
({
integralBillsList
:
res
.
data
});
if
(
this
.
data
.
tabIndex
==
1
)
{
this
.
setData
({
integralBillsList
:
res
.
data
});
}
else
if
(
this
.
data
.
tabIndex
==
2
)
{
this
.
setData
({
userExchanges
:
res
.
data
});
}
}
},
true
,
false
,
true
);
...
...
@@ -85,15 +103,21 @@ Page({
let
i
=
e
.
currentTarget
.
dataset
.
index
;
console
.
log
(
i
)
this
.
setData
({
tabIndex
:
i
,
});
this
.
getData
();
},
/**
* 跳转地址
*/
toUrl
:
function
()
{
wx
.
navigateTo
({
url
:
'/pages/person/withdrawal/index'
});
}
...
...
pages/person/exchange/index.less
View file @
b0187041
...
...
@@ -17,10 +17,11 @@
font-size: 22rpx;
line-height: 30rpx;
}
.t2s{
.t2s {
color: #EA1717;
font-size: 22rpx;
line-height: 30rpx;
line-height: 30rpx;
}
.t3 {
...
...
@@ -45,6 +46,7 @@
font-size: 24rpx;
color: #8A9299;
}
}
}
...
...
pages/person/exchange/index.wxml
View file @
b0187041
...
...
@@ -27,31 +27,30 @@
</block>
<block wx:else>
<view class="content">
<view class="list row verCenter bothSide boxsiz">
<view class="column">
<text class="t1">话费充值</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view class="t6">15012479484</view>
<view class="column">
<text class="t5">¥50</text>
<text class="t2">充值成功</text>
</view>
</view>
<view class="list row verCenter bothSide boxsiz">
<view class="column">
<text class="t1">话费充值</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view class="t6">15012479484</view>
<view class="column">
<text class="t5">¥50</text>
<text class="t2s">充值失败</text>
<block wx:for="{{userExchanges}}" wx:key="item">
<view class="list row verCenter bothSide boxsiz">
<view class="column">
<text class="t1">{{item.type}}</text>
<text class="t2">{{item.add_time}}</text>
</view>
<view class="t6">{{item.mobile}}</view>
<view class="column">
<text class="t5">¥{{item.amount}}</text>
<block wx:if="{{item.status == 1}}">
<text class="t2">充值成功</text>
</block>
<block wx:elif="{{item.status == 0}}">
<text class="t2">审核中</text>
</block>
<block wx:else>
<text class="t2s">充值失败</text>
</block>
</view>
</view>
</
view
>
</
block
>
</view>
</block>
<view class="btn">
<view class="btn"
bind:tap="toUrl"
>
<text class="icon iconfont iconiconxiantiaoshouji28"></text>
<text class="t1">提现兑换</text>
</view>
...
...
utils/api.js
View file @
b0187041
...
...
@@ -282,7 +282,7 @@ const apis = {
/**
* 兑换记录(话费充值, 微信转账)
*/
userExchanges
:
welfare_url
+
'/user_exchanges/list'
,
userExchanges
List
:
welfare_url
+
'/user_exchanges/list'
,
/**
* 兑换配置列表(话费, 微信兑换页面的可兑换项)
*/
...
...
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