Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
FlashMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
华国豪
FlashMan
Commits
01f94434
Commit
01f94434
authored
Jun 28, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绑定数据
parent
9b94bd02
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
37 deletions
+90
-37
member.js
pages/member/member.js
+21
-5
member.wxml
pages/member/member.wxml
+10
-9
memberCenter.js
pages/member/memberCenter/memberCenter.js
+32
-4
memberCenter.wxml
pages/member/memberCenter/memberCenter.wxml
+24
-16
memberCenter.wxss
pages/member/memberCenter/memberCenter.wxss
+3
-3
No files found.
pages/member/member.js
View file @
01f94434
...
@@ -5,13 +5,28 @@ Page({
...
@@ -5,13 +5,28 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
progress
:
20
,
progress
:
0
,
userInfo
:
{}
userInfo
:
{},
custormInfo
:
{},
memberNextExp
:
{},
gap
:
0
,
nextExp
:
0
,
},
},
getInfo
:
function
()
{
getInfo
:
function
()
{
let
_this
=
this
app
.
$apiJavaNew
(
"api/b2b/user/getSimpleUser"
,
{
account
:
this
.
data
.
userInfo
.
account
}).
then
(
res
=>
{
app
.
$apiJava
(
"api/b2b/user/getSimpleUser"
,
{
account
:
_this
.
data
.
userInfo
.
account
}).
then
(
res
=>
{
this
.
setData
({
console
.
log
(
res
)
custormInfo
:
res
,
})
}).
catch
(
err
=>
{
})
},
getUserMemberExp
:
function
()
{
app
.
$apiJavaNew
(
"api/member/getUserMemberExp"
,
{
customer
:
this
.
data
.
userInfo
.
customerAccountId
}).
then
(
res
=>
{
let
NextExp
=
(((
res
.
next
.
nextExp
-
res
.
next
.
gap
)
/
res
.
next
.
nextExp
)
*
100
).
toFixed
(
2
)
this
.
setData
({
progress
:
NextExp
,
gap
:
res
.
next
.
gap
,
nextExp
:
res
.
next
.
nextExp
-
res
.
next
.
gap
,
})
}).
catch
(
err
=>
{
})
}).
catch
(
err
=>
{
})
},
},
/**
/**
...
@@ -23,6 +38,7 @@ Page({
...
@@ -23,6 +38,7 @@ Page({
userInfo
:
userInfo
userInfo
:
userInfo
})
})
this
.
getInfo
()
this
.
getInfo
()
this
.
getUserMemberExp
()
},
},
/**
/**
...
...
pages/member/member.wxml
View file @
01f94434
...
@@ -9,13 +9,14 @@
...
@@ -9,13 +9,14 @@
<view class='mine2_info clearfix'>
<view class='mine2_info clearfix'>
<view class="boxF">
<view class="boxF">
<view class="boxS">
<view class="boxS">
<view class="boxT" style="background-image: url(http://b.hiphotos.baidu.com/image/pic/item/10dfa9ec8a1363272bc51737938fa0ec08fac78e.jpg);"></view>
<view class="boxT" wx:if="{{!custormInfo.photo}}" style="background-image: url(http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190628030353039.png);"></view>
<view wx:else class="boxT" style="background-image: url({{custormInfo.photo}});"></view>
</view>
</view>
</view>
</view>
<view class='inf-box'>
<view class='inf-box'>
<view class='top'>
<view class='top'>
<view class='name'>
唐杰
</view>
<view class='name'>
{{custormInfo.name}}
</view>
<view class='grade'><text>V
2
</text></view>
<view class='grade'><text>V
{{custormInfo.vipRate}}
</text></view>
<view class='progress-box'>
<view class='progress-box'>
<view class='progress-box-line' style='width: {{progress}}%'></view>
<view class='progress-box-line' style='width: {{progress}}%'></view>
</view>
</view>
...
@@ -24,24 +25,24 @@
...
@@ -24,24 +25,24 @@
<view class='addr'>
<view class='addr'>
<view class='addr-left'>
<view class='addr-left'>
<image src='../../images/menber/fangzi.png'></image>
<image src='../../images/menber/fangzi.png'></image>
<text>
唐菲旅行社
</text>
<text>
{{custormInfo.customerName}}
</text>
</view>
</view>
<view>
<view>
<image src='../../images/menber/phone.png'></image>
<image src='../../images/menber/phone.png'></image>
<text>
18911111489
</text>
<text>
{{custormInfo.mobile}}
</text>
</view>
</view>
</view>
</view>
<view class='kefu'>
<view class='kefu'>
<text>客服经理(
唐杰:15444444566
)</text>
<text>客服经理(
{{custormInfo.managers[0].emName}}:{{custormInfo.managers[0].mobile}}
)</text>
</view>
</view>
</view>
</view>
<view class='jiaoyi-box'>
<view class='jiaoyi-box'>
<view class='jiaoyi-box-left'>
<view class='jiaoyi-box-left'>
<view class='price'>¥ <text>
466989.00
</text></view>
<view class='price'>¥ <text>
{{custormInfo.monthTradeMoney}}
</text></view>
<view class='jiaoti-tit'>本月交易额</view>
<view class='jiaoti-tit'>本月交易额</view>
</view>
</view>
<view class='jiaoyi-box-right'>
<view class='jiaoyi-box-right'>
<view class='price'>¥ <text>
256589.00
</text></view>
<view class='price'>¥ <text>
{{custormInfo.sumTradeMoney}}
</text></view>
<view class='jiaoti-tit'>累计交易额</view>
<view class='jiaoti-tit'>累计交易额</view>
</view>
</view>
</view>
</view>
...
@@ -93,7 +94,7 @@
...
@@ -93,7 +94,7 @@
</view>
</view>
<view class="tablist">
<view class="tablist">
<view>
<view>
<navigator hover-class="Home_hover" url="/pages/member/memberCenter/memberCenter">
<navigator hover-class="Home_hover" url="/pages/member/memberCenter/memberCenter
?progress={{progress}}&gap={{gap}}&vip={{custormInfo.vipRate}}&nextExp={{nextExp}}
">
<image mode="aspectFit" src="../../images/menber/menu-hui.png"></image>
<image mode="aspectFit" src="../../images/menber/menu-hui.png"></image>
<view class='order-type-name'>会员中心</view>
<view class='order-type-name'>会员中心</view>
</navigator>
</navigator>
...
...
pages/member/memberCenter/memberCenter.js
View file @
01f94434
// pages/member/memberCenter/memberCenter.js
// pages/member/memberCenter/memberCenter.js
let
app
=
getApp
()
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
progress
:
20
,
progress
:
0
,
gap
:
0
,
vip
:
0
,
nextExp
:
0
,
memberrate
:
[],
},
getMemberRate
:
function
()
{
app
.
$apiJavaNew
(
"api/member/getmemberrate"
,
{
state
:
1
,
name
:
''
}).
then
(
res
=>
{
let
data
=
res
,
vip
=
this
.
data
.
vip
,
nextExp
=
600
;
res
.
map
((
x
,
index
)
=>
{
if
(
index
<=
vip
)
{
x
.
progress
=
x
.
tradeMoneyReq
>
0
?
((
nextExp
/
x
.
tradeMoneyReq
)
*
100
).
toFixed
(
2
)
:
0
}
else
{
x
.
progress
=
0
}
})
this
.
setData
({
memberrate
:
data
})
console
.
log
(
res
)
}).
catch
(
err
=>
{
})
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
setData
({
progress
:
Number
(
options
.
progress
),
gap
:
options
.
gap
,
vip
:
Number
(
options
.
vip
),
nextExp
:
options
.
nextExp
})
this
.
getMemberRate
()
},
},
/**
/**
...
...
pages/member/memberCenter/memberCenter.wxml
View file @
01f94434
<view class='member-center'>
<view class='member-center'>
<view class='member-center-top'>
<view class='member-center-top'>
<view class='left'>
<view class='left'>
V
2
V
{{vip}}
</view>
</view>
<view class='right'>
<view class='right'>
<view class='name'>V
2
普通会员</view>
<view class='name'>V
{{vip}}
普通会员</view>
<view class='reg'>
600
</view>
<view class='reg'>
{{nextExp}}
</view>
<view class='progress-box'>
<view class='progress-box'>
<view class='progress-box-line' style='width: {{progress}}%'></view>
<view class='progress-box-line' style='width: {{progress}}%'></view>
</view>
</view>
<view class='tips'>还差
234升级V3
尊享会员</view>
<view class='tips'>还差
{{gap}}升级V{{vip+1}}
尊享会员</view>
</view>
</view>
</view>
</view>
<view class='member-center-bottom'>
<view class='member-center-bottom'>
...
@@ -20,19 +20,31 @@
...
@@ -20,19 +20,31 @@
<view class='dengji'>
<view class='dengji'>
<scroll-view scroll-x>
<scroll-view scroll-x>
<view class='big-box'>
<view class='big-box'>
<view class='live-item'>
<view class='live-item'
wx:for="{{memberrate}}" wx:for-item="item" wx:for-index="index" wx:key="index"
>
<view class='live-item-left'>
<view class='live-item-left'>
<view class='live-item-left-img' style='background-image: url(http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190627045202190.png)'>
<view wx:if="{{index === 0 || index === 5}}" class='live-item-left-img' style='background-image: url(http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190627045202190.png)'>
V0
{{item.name}}
</view>
<view wx:elif="{{index === 1 || index === 6}}" class='live-item-left-img' style='background-image: url(http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190627045202206.png)'>
{{item.name}}
</view>
<view wx:elif="{{index === 2 || index === 7}}" class='live-item-left-img' style='background-image: url(http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190627045202161.png)'>
{{item.name}}
</view>
<view wx:elif="{{index === 3 || index === 8}}" class='live-item-left-img' style='background-image: url(http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190627045202195.png)'>
{{item.name}}
</view>
</view>
<view class='reg-num'>0</view>
<view wx:elif="{{index === 4 || index === 9}}" class='live-item-left-img' style='background-image: url(http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190627045202216.png)'>
{{item.name}}
</view>
<view class='reg-num'>{{item.tradeMoneyReq}}</view>
</view>
</view>
<view class='progress-small-box'>
<view class='progress-small-box'>
<view class='progress-small-box-line' style='width: {{
40
}}%'></view>
<view class='progress-small-box-line' style='width: {{
item.progress
}}%'></view>
<view class='radius'
style='left:{{40
-2}}%'></view>
<view class='radius'
wx:if="{{item.progress!==0}}" style='left:{{item.progress
-2}}%'></view>
</view>
</view>
</view>
</view>
<view class='live-item'>
<
!-- <
view class='live-item'>
<view class='live-item-left'>
<view class='live-item-left'>
<view class='live-item-left-img' style='background-image: url(http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190627045202206.png)'>
<view class='live-item-left-img' style='background-image: url(http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190627045202206.png)'>
V1
V1
...
@@ -41,7 +53,6 @@
...
@@ -41,7 +53,6 @@
</view>
</view>
<view class='progress-small-box'>
<view class='progress-small-box'>
<view class='progress-small-box-line' style='width: {{0}}%'></view>
<view class='progress-small-box-line' style='width: {{0}}%'></view>
<!-- <view class='radius' style='left:{{80}}%'></view> -->
</view>
</view>
</view>
</view>
<view class='live-item'>
<view class='live-item'>
...
@@ -53,7 +64,6 @@
...
@@ -53,7 +64,6 @@
</view>
</view>
<view class='progress-small-box'>
<view class='progress-small-box'>
<view class='progress-small-box-line' style='width: {{0}}%'></view>
<view class='progress-small-box-line' style='width: {{0}}%'></view>
<!-- <view class='radius' style='left:{{80}}%'></view> -->
</view>
</view>
</view>
</view>
<view class='live-item'>
<view class='live-item'>
...
@@ -65,7 +75,6 @@
...
@@ -65,7 +75,6 @@
</view>
</view>
<view class='progress-small-box'>
<view class='progress-small-box'>
<view class='progress-small-box-line' style='width: {{0}}%'></view>
<view class='progress-small-box-line' style='width: {{0}}%'></view>
<!-- <view class='radius' style='left:{{80}}%'></view> -->
</view>
</view>
</view>
</view>
<view class='live-item'>
<view class='live-item'>
...
@@ -77,9 +86,8 @@
...
@@ -77,9 +86,8 @@
</view>
</view>
<view class='progress-small-box'>
<view class='progress-small-box'>
<view class='progress-small-box-line' style='width: {{0}}%'></view>
<view class='progress-small-box-line' style='width: {{0}}%'></view>
<!-- <view class='radius' style='left:{{80}}%'></view> -->
</view>
</view>
</view>
</view>
-->
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
...
...
pages/member/memberCenter/memberCenter.wxss
View file @
01f94434
...
@@ -53,7 +53,7 @@ page {
...
@@ -53,7 +53,7 @@ page {
}
}
.progress-small-box{
.progress-small-box{
width: 70rpx;
width: 70rpx;
height:
4
rpx;
height:
10
rpx;
background:rgba(238,238,238,.8);
background:rgba(238,238,238,.8);
margin: -50rpx 10rpx 0 0;
margin: -50rpx 10rpx 0 0;
}
}
...
@@ -98,11 +98,11 @@ page {
...
@@ -98,11 +98,11 @@ page {
text-align: center;
text-align: center;
}
}
.live-item .live-item-left{
.live-item .live-item-left{
width:
8
0rpx;
width:
10
0rpx;
text-align: center;
text-align: center;
}
}
.live-item .live-item-left .live-item-left-img{
.live-item .live-item-left .live-item-left-img{
margin-left:
10
rpx;
margin-left:
25
rpx;
width: 60rpx;
width: 60rpx;
height: 60rpx;
height: 60rpx;
background-size:100% 100%;
background-size:100% 100%;
...
...
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