Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
5723292a
Commit
5723292a
authored
Jun 03, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
aed6a493
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
33 deletions
+31
-33
user-center.vue
pages/user-center/user-center.vue
+22
-29
api.js
plugin/api.js
+9
-4
No files found.
pages/user-center/user-center.vue
View file @
5723292a
...
...
@@ -35,38 +35,20 @@
<view
class=
"account_bar"
v-if=
"meueData.user_center.is_account_status == 1"
>
<view
class=
"account_bar_item"
v-for=
"(item,index) in meueData.user_center.account"
@
click=
"goUrl(item.link_url)"
:key=
"index"
>
<Text
:style=
"
{ color: secondary }">0
</Text>
<!-- 优惠券 -->
<Text
:style=
"
{ color: secondary }" v-if="item.link_url=='/pages/coupon/index/index'">
{{
user_info
.
coupon
}}
</Text>
<!-- 积分 -->
<Text
:style=
"
{ color: secondary }" v-if="item.link_url=='/pages/user-center/integral-detail/integral-detail'">
{{
user_info
.
integral
}}
</Text>
<!-- 余额 -->
<Text
:style=
"
{ color: secondary }" v-if="item.link_url=='/pages/balance/balance'">
{{
user_info
.
balance
}}
</Text>
<!-- 卡券 -->
<Text
:style=
"
{ color: secondary }" v-if="item.link_url=='/pages/card/index/index'">
{{
user_info
.
card
}}
</Text>
<view
class=
"footprint_item_bottom"
>
<image
:src=
"item.icon_url"
style=
"width: 26rpx;height: 26rpx;"
></image>
<Text
style=
"margin-left: 10rpx;"
>
{{
item
.
name
}}
</Text>
</view>
</view>
<view
style=
"width: 1px;height: 60rpx;background: #f5f5f5;"
v-if=
"meueData.user_center.account_bar.integral.status == 1"
></view>
<!--
<view
class=
"account_bar_item"
v-if=
"meueData.user_center.account_bar.balance.status == 1"
@
click=
"goUrl('/pages/balance/balance')"
>
<Text
:style=
"
{ color: secondary }">
{{
user_info
.
balance
}}
</Text>
<view
class=
"footprint_item_bottom"
>
<image
:src=
"meueData.user_center.account_bar.balance.icon"
style=
"width: 26rpx;height: 26rpx;"
></image>
<Text
style=
"margin-left: 10rpx;"
>
{{
meueData
.
user_center
.
account_bar
.
balance
.
text
}}
</Text>
</view>
</view>
<view
style=
"width: 1px;height: 60rpx;background: #f5f5f5;"
v-if=
"meueData.user_center.account_bar.balance.status == 1"
></view>
<view
class=
"account_bar_item"
v-if=
"meueData.user_center.account_bar.coupon.status == 1"
>
<Text
:style=
"
{ color: secondary }">
{{
user_info
.
coupon
}}
</Text>
<view
class=
"footprint_item_bottom"
>
<image
:src=
"meueData.user_center.account_bar.coupon.icon"
style=
"width: 26rpx;height: 26rpx;"
></image>
<Text
style=
"margin-left: 10rpx;"
>
{{
meueData
.
user_center
.
account_bar
.
coupon
.
text
}}
</Text>
</view>
</view>
<view
style=
"width: 1px;height: 60rpx;background: #f5f5f5;"
v-if=
"meueData.user_center.account_bar.coupon.status == 1"
></view>
<view
class=
"account_bar_item"
v-if=
"meueData.user_center.account_bar.card.status == 1"
>
<Text
:style=
"
{ color: secondary }">
{{
user_info
.
card
}}
</Text>
<view
class=
"footprint_item_bottom"
>
<image
:src=
"meueData.user_center.account_bar.card.icon"
style=
"width: 26rpx;height: 26rpx;"
></image>
<Text
style=
"margin-left: 10rpx;"
>
{{
meueData
.
user_center
.
account_bar
.
card
.
text
}}
</Text>
</view>
</view>
-->
</view>
<view
class=
"order_bar"
v-if=
"meueData.user_center.is_order_bar_status == 1"
>
...
...
@@ -75,7 +57,16 @@
<view
class=
"order_bar_item"
v-for=
"(item, index) in meueData.user_center.order_bar"
:key=
"index"
:name=
"item.name"
@
click=
"goUrl(item.link_url)"
>
<image
:src=
"item.icon_url"
style=
"width: 66rpx;height: 60rpx;"
></image>
<Text
style=
"margin-top: 10rpx;"
>
{{
item
.
name
}}
</Text>
<view
v-if=
"item.num > 0"
class=
"badge"
:style=
"
{ background: mainColor }">
{{
item
.
num
}}
</view>
<!-- 待付款 -->
<view
v-if=
"item.link_url =='/pages/order/index/index?status=1'&&user_info.MyOrder.NonPayment>0"
class=
"badge"
:style=
"
{ background: mainColor }">
{{
user_info
.
MyOrder
.
NonPayment
}}
</view>
<!-- 待发货 -->
<view
v-if=
"item.link_url =='/pages/order/index/index?status=2'&&user_info.MyOrder.WaitSendGoods>0"
class=
"badge"
:style=
"
{ background: mainColor }">
{{
user_info
.
MyOrder
.
WaitSendGoods
}}
</view>
<!-- 待收货 -->
<view
v-if=
"item.link_url =='/pages/order/index/index?status=3'&&user_info.MyOrder.WaitReceiving>0"
class=
"badge"
:style=
"
{ background: mainColor }">
{{
user_info
.
MyOrder
.
WaitReceiving
}}
</view>
<!-- 待评价 -->
<view
v-if=
"item.link_url =='/pages/order/index/index?status=4'&&user_info.MyOrder.WaitCommentNum>0"
class=
"badge"
:style=
"
{ background: mainColor }">
{{
user_info
.
MyOrder
.
WaitCommentNum
}}
</view>
<!-- 售后 -->
<view
v-if=
"item.link_url =='/pages/order/index/index?status=5'&&user_info.MyOrder.AfterSaleNum>0"
class=
"badge"
:style=
"
{ background: mainColor }">
{{
user_info
.
MyOrder
.
AfterSaleNum
}}
</view>
</view>
</view>
</view>
...
...
@@ -102,6 +93,7 @@
</view>
</view>
<!--
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth>
-->
<tabbars></tabbars>
</view>
</
template
>
...
...
@@ -169,7 +161,7 @@ export default {
uni
.
setNavigationBarTitle
({
title
:
'用户中心'
});
this
.
userinfo
();
//
this.userinfo();
this
.
getmeue
();
},
methods
:
{
...
...
@@ -202,7 +194,7 @@ export default {
uni
.
hideNavigationBarLoading
();
//this.isloading = false;
this
.
meueData
=
res
.
data
.
config
;
// this.user_info = res.data.user_center
;
this
.
user_info
=
res
.
data
.
user_info
;
}
);
},
...
...
@@ -289,6 +281,7 @@ export default {
align-items
:
center
;
justify-content
:
space-between
;
border-right
:
1px
solid
#d1d1d1
;
width
:
25%
;
}
.userStyle
.account_bar_item
:last-child
{
border-right
:
0
;
...
...
plugin/api.js
View file @
5723292a
...
...
@@ -44,9 +44,10 @@ export default {
'content-type'
:
"application/json"
},
data
:
{
"MallBaseId"
:
0
,
"TenantId"
:
0
,
"OpenId"
:
this
.
GetOpenId
(),
"MallBaseId"
:
1
,
"TenantId"
:
1
,
"OpenId"
:
this
.
GetOpenId
().
OpenId
,
UserId
:
this
.
GetOpenId
().
UserId
,
MiniAppId
:
this
.
GetMiniAppId
(),
msg
:
param
.
data
},
...
...
@@ -78,7 +79,11 @@ export default {
}
//获取OpenId
Vue
.
prototype
.
GetOpenId
=
function
()
{
return
'ow_7I5ZQKhAB66yvOTGI35Xk-Kmg'
var
obj
=
{
OpenId
:
'ow_7I5ZQKhAB66yvOTGI35Xk-Kmg'
,
UserId
:
19992
}
return
obj
}
//公用判断图片地址 判断是否包含http
Vue
.
prototype
.
getIconLink
=
function
(
url
)
{
...
...
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