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
250ef05d
authored
Sep 04, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add
parent
c8d39dde
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
335 additions
and
105 deletions
app.wxss
pages/person/invitation/index.js
pages/person/invitation/index.wxml
pages/person/invitationrecord/index.js
pages/person/invitationrecord/index.wxml
pages/person/withdrawal/index.js
pages/person/withdrawal/index.less
pages/person/withdrawal/index.wxml
pages/person/withdrawal/index.wxss
project.config.json
app.wxss
View file @
250ef05d
...
...
@@ -10,7 +10,7 @@ image {
vertical-align: middle;
}
.va-m{
.va-m
{
vertical-align: middle;
}
...
...
@@ -53,7 +53,7 @@ image {
align-items: center;
}
.boxFlex{
.boxFlex
{
-webkit-box-flex: 1;
-moz-box-flex: 1;
-webkit-flex: 1;
...
...
@@ -61,7 +61,15 @@ image {
flex: 1;
}
.tc{
.boxFlexs {
-webkit-box-flex: 2;
-moz-box-flex: 2;
-webkit-flex: 2;
-ms-flex: 2;
flex: 2;
}
.tc {
text-align: center;
}
...
...
@@ -124,7 +132,7 @@ image {
.placeholderClass {
color: #adb6bf;
font-size:28rpx;
font-size:
28rpx;
}
/* /头部搜索公共样式 */
...
...
@@ -135,7 +143,7 @@ image {
.nodata .img {
width: 600rpx;
height:393rpx;
height:
393rpx;
margin: 0 auto;
}
...
...
@@ -287,22 +295,26 @@ image {
background-color: #0d84d1;
box-shadow: 0px 6px 10px 0px rgba(97, 160, 242, 0.3);
}
.btn-com-disable{
.btn-com-disable {
background-color: #DAE1E7;
}
.data-bottom{
padding:24rpx 60rpx;
.data-bottom {
padding: 24rpx 60rpx;
}
.data-bottom .line{
height:1px;
border-top:1px solid #F0F4F7;
flex:0 0 200rpx;
.data-bottom .line {
height: 1px;
border-top: 1px solid #F0F4F7;
flex: 0 0 200rpx;
}
.data-bottom .text{
.data-bottom .text {
font-size: 26rpx;
color:#8A9299;
flex:1;
color:
#8A9299;
flex:
1;
text-align: center;
}
...
...
@@ -313,10 +325,12 @@ image {
overflow: hidden;
transition: height linear .25s;
}
.tip.noheight{
height:0;
.tip.noheight {
height: 0;
}
.tip .close-icon {
color: #d8dfe6;
}
...
...
@@ -341,16 +355,19 @@ image {
.tip-c .pc-url {
color: #61a0f2;
}
/***消息模块的公共样式*/
.message-item {
margin-left: 25rpx;
padding: 24rpx 24rpx 24rpx 0;
}
.message-avar {
height: 68rpx;
width: 68rpx;
border-radius: 50% 50%;
}
.system-avar {
flex: 0 0 68rpx;
background-color: #52cca8;
...
...
@@ -363,6 +380,7 @@ image {
font-size: 40rpx;
color: #fff;
}
.message-l-view {
margin-left: 24rpx;
}
...
...
@@ -388,9 +406,11 @@ image {
color: #adb6bf;
padding-bottom: 12rpx;
}
.message-t-text{
.message-t-text {
white-space: normal;
}
/**询报价列表**/
/**字体**/
@import 'res/fonts/iconfont.wxss'
\ No newline at end of file
pages/person/invitation/index.js
View file @
250ef05d
// pages/person/invitation/index.js
const
http
=
require
(
'../../../utils/util.js'
);
import
{
apis
}
from
'../../../utils/api.js'
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
invitesInfo
:
{}
},
/**
...
...
@@ -26,7 +31,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
getData
();
},
/**
...
...
@@ -56,4 +61,54 @@ Page({
onReachBottom
:
function
()
{
},
/**
* 分享
*/
onShareAppMessage
:
function
(
res
)
{
http
.
getData
(
apis
.
invitesAdd
,
'GET'
,
{
user_id
:
this
.
data
.
invitesInfo
.
user_id
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
}
},
false
,
false
,
true
);
return
{
title
:
'邀请好友'
,
path
:
"/pages/person/invitation/index"
}
},
toUrl
:
function
(
e
)
{
if
(
this
.
data
.
invitesInfo
.
amount
<=
0
)
{
wx
.
showToast
({
title
:
'您暂未成功邀请好友'
,
icon
:
'none'
,
duration
:
2000
});
return
false
;
}
else
{
wx
.
navigateTo
({
url
:
'/pages/person/withdrawal/index'
});
}
},
/**
* 获取数据
*/
getData
:
function
(
type
)
{
http
.
getData
(
apis
.
invitesInfo
,
'GET'
,
null
,
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
setData
({
invitesInfo
:
res
.
data
});
}
},
true
,
false
,
true
);
}
})
\ No newline at end of file
pages/person/invitation/index.wxml
View file @
250ef05d
...
...
@@ -16,20 +16,20 @@
<view class="show-text row verCenter rowCenter">
<view class="column boxFlex tc">
<text class="t1">邀请人数</text>
<text class="t2 mt">
12
</text>
<
text class="t3">邀请记录</text
>
<text class="t2 mt">
{{invitesInfo.count}}
</text>
<
navigator url="/pages/person/invitationrecord/index" class="t3">邀请记录</navigator
>
</view>
<view class="column boxFlex tc">
<text class="t1">获得红包</text>
<view class="mt">
<text class="t2">
0.00
</text>
<text class="t2">
{{invitesInfo.amount}}
</text>
<text class="t1">元</text>
</view>
<text class="t3">立即提现</text>
<text class="t3"
bind:tap="toUrl"
>立即提现</text>
</view>
</view>
</view>
<button class="btn">立即邀请赚钱</button>
<button class="btn"
open-type="share"
>立即邀请赚钱</button>
<view class="show-ico row verCenter avarage">
<view class="column">
<text class="icon iconfont iconjuxing6"></text>
...
...
pages/person/invitationrecord/index.js
View file @
250ef05d
// pages/person/invitationrecord/index.js
const
http
=
require
(
'../../../utils/util.js'
);
import
{
apis
}
from
'../../../utils/api.js'
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
invitesList
:
[]
},
/**
...
...
@@ -26,7 +30,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
getData
();
},
/**
...
...
@@ -56,4 +60,20 @@ Page({
onReachBottom
:
function
()
{
},
/**
* 获取数据
*/
getData
:
function
(
type
)
{
http
.
getData
(
apis
.
invitesList
,
'GET'
,
null
,
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
setData
({
invitesList
:
res
.
data
});
}
},
true
,
false
,
true
);
}
})
\ No newline at end of file
pages/person/invitationrecord/index.wxml
View file @
250ef05d
<view class="invitationrecord" hover-class="none" hover-stop-propagation="false">
<block wx:if="{{invitesList.length > 0}}">
<block wx:for="{{invitesList}}" wx:key="item">
<view class="wrap row bothSide verCenter bor">
<view class="column">
<text class="t1">深圳市猎芯科技有限公司
</text>
<text class="t1">{{item.invited_user_name}}
</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view class="row verCenter">
<text class="t3">+</text>
<text class="t4">¥0.05
</text>
<text class="t4">¥{{item.amount}}
</text>
</view>
</view>
<view class="wrap row bothSide verCenter bor">
<view class="column">
<text class="t1">深圳市猎芯科技有限公司</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view class="row verCenter">
<text class="t3">+</text>
<text class="t4">¥0.05</text>
</view>
</block>
</block>
<block wx:else>
<view class="nodata">
<image src="/res/images/imgs/noxb.png" class="img"></image>
<view class="h3 bold">暂无邀请记录</view>
</view>
</block>
</view>
\ No newline at end of file
pages/person/withdrawal/index.js
View file @
250ef05d
// pages/person/withdrawal/index.js
const
http
=
require
(
'../../../utils/util.js'
);
import
{
apis
}
from
'../../../utils/api.js'
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
tabIndex
:
1
tabIndex
:
1
,
exchangeSettings
:
{},
integral
:
''
,
can_exchange
:
''
,
mobile
:
''
,
indexOf
:
-
1
,
weixin_exchange_info
:
{}
},
/**
...
...
@@ -26,7 +36,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
getData
(
1
);
},
/**
...
...
@@ -57,6 +67,38 @@ Page({
},
/**
* 获取数据
*/
getData
:
function
(
type
)
{
http
.
getData
(
apis
.
exchangeSettings
,
'GET'
,
{
type
:
type
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
setData
({
exchangeSettings
:
res
.
data
,
integral
:
res
.
integral
,
can_exchange
:
res
.
can_exchange
,
mobile
:
res
.
mobile
,
weixin_exchange_info
:
res
.
weixin_exchange_info
});
}
},
true
,
false
,
true
);
},
/**
* 选择金额
*/
tab
:
function
(
e
)
{
let
index
=
e
.
currentTarget
.
dataset
.
index
;
this
.
setData
({
indexOf
:
index
});
},
/**
* tab切换
*/
switchTab
:
function
(
e
)
{
...
...
@@ -64,12 +106,106 @@ Page({
if
(
i
==
1
)
{
this
.
setData
({
tabIndex
:
1
tabIndex
:
1
,
indexOf
:
-
1
});
this
.
getData
(
1
);
}
else
if
(
i
==
2
)
{
this
.
setData
({
tabIndex
:
2
tabIndex
:
2
,
indexOf
:
-
1
});
this
.
getData
(
2
);
}
},
/**
* 提现
*/
withdrawal
:
function
(
e
)
{
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
;
},
/**
* 提交
*/
submit
:
function
(
e
)
{
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
;
if
(
exchange_id
)
{
http
.
getData
(
apis
.
userExchanges
,
'GET'
,
{
exchange_id
:
exchange_id
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
wx
.
navigateTo
({
url
:
'/pages/person/withdrawalsuccess/index'
});
}
else
{
wx
.
showToast
({
title
:
res
.
errmsg
,
icon
:
'none'
,
duration
:
2000
});
}
},
true
,
false
,
true
);
}
}
...
...
pages/person/withdrawal/index.less
View file @
250ef05d
...
...
@@ -142,13 +142,13 @@
font-size: 32rpx;
color: #515559;
line-height: 45rpx;
font-weight: 600;
}
.t2 {
font-size: 22rpx;
color: #8A9299;
line-height: 30px;
line-height: 30
r
px;
}
&.curr {
...
...
@@ -210,3 +210,7 @@
}
}
}
.opacity {
opacity: 0.5;
}
\ No newline at end of file
pages/person/withdrawal/index.wxml
View file @
250ef05d
...
...
@@ -18,81 +18,45 @@
<text class="t1">红包提现</text>
</view>
</view>
<block wx:if="{{tabIndex ==
'1'
}}">
<block wx:if="{{tabIndex ==
1
}}">
<view class="content">
<view class="inp boxsiz row bothSide verCenter">
<view class="boxFlex">
<input type="text" placeholder="" value="
15012479484" class="inpt"
></input>
<view class="boxFlex
s
">
<input type="text" placeholder="" value="
{{mobile}}" class="inpt" disabled
></input>
</view>
<text class="boxFlex t1">默认注册号码</text>
</view>
<view class="bar boxsiz row verCenter">
<text class="t1">兑换话费</text>
<text class="t2">账户红包:¥
10.94
</text>
<text class="t2">账户红包:¥
{{integral}}
</text>
</view>
<view class="list row avarage boxsiz">
<view class="wrap column rowCenter verCenter">
<text class="t1">10元</text>
<text class="t2">剩余名额:10</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">20元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">30元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">50元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">100元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">200元</text>
<text class="t2">剩余名额:20</text>
<view class="list row boxsiz">
<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>
</view>
<button class="btn">立即兑换</button>
<button class="btn
{{can_exchange == -1 ? 'opacity':''}}" bind:tap="submit
">立即兑换</button>
</view>
</block>
<block wx:elif="{{tabIndex ==
'2'
}}">
<block wx:elif="{{tabIndex ==
2
}}">
<view class="content">
<view class="bar boxsiz row verCenter">
<text class="t1">红包提现</text>
<text class="t2">账户红包:¥
10.94
</text>
<text class="t2">账户红包:¥
{{integral}}
</text>
</view>
<view class="list row avarage boxsiz">
<view class="wrap column rowCenter verCenter">
<text class="t1">1元</text>
<text class="t2">剩余名额:10</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">5元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">10元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">20元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">50元</text>
<text class="t2">剩余名额:20</text>
</view>
<view class="wrap column rowCenter verCenter">
<text class="t1">100元</text>
<text class="t2">剩余名额:20</text>
<view class="list row boxsiz">
<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>
</view>
<button class="btn">申请提现</button>
<text class="fr-txt">好友助力,已完成(
2
/2)</text>
<button class="btn
{{can_exchange == -1 ? 'opacity':''}}" bind:tap="submit
">申请提现</button>
<text class="fr-txt">好友助力,已完成(
{{weixin_exchange_info.exchanging}}
/2)</text>
</view>
</block>
<view class="txt column">
...
...
pages/person/withdrawal/index.wxss
View file @
250ef05d
...
...
@@ -119,11 +119,12 @@
font-size: 32rpx;
color: #515559;
line-height: 45rpx;
font-weight: 600;
}
.withdrawal .content .list .wrap .t2 {
font-size: 22rpx;
color: #8A9299;
line-height: 30px;
line-height: 30
r
px;
}
.withdrawal .content .list .wrap.curr {
background: #ffffff;
...
...
@@ -171,3 +172,6 @@
line-height: 42rpx;
color: #8A9299;
}
.opacity {
opacity: 0.5;
}
project.config.json
View file @
250ef05d
...
...
@@ -69,9 +69,31 @@
"scene"
:
null
},
{
"id"
:
2
,
"name"
:
"pages/person/withdrawal/index"
,
"pathName"
:
"pages/person/withdrawal/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/welfare/index"
,
"pathName"
:
"pages/person/welfare/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/invitation/index"
,
"pathName"
:
"pages/person/invitation/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/invitationrecord/index"
,
"pathName"
:
"pages/person/invitationrecord/index"
,
"query"
:
""
,
"scene"
:
null
}
]
...
...
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