deming/pages/mine/index.vue

392 lines
10 KiB
Vue
Raw Normal View History

2020-05-29 09:10:25 +00:00
<template>
<view class="mine">
<view class="mine-top">
<view class="top">
2020-08-01 08:36:48 +00:00
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="110"></u-avatar>
2020-06-01 08:51:11 +00:00
<view class="user-info">
<view class="info-left">
2020-08-09 10:39:35 +00:00
<view class="user-nickname u-line-1">{{ userInfo.member_nickname }}</view>
2020-06-08 07:23:23 +00:00
<view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')">
2020-07-29 11:01:10 +00:00
<image src="/static/image/mine/13.png"></image>
2020-07-25 09:51:01 +00:00
<view class="rank-title">{{ userInfo.member_grade_name }}</view>
2020-06-01 08:51:11 +00:00
</view>
</view>
<view class="info-right">
2020-06-29 00:47:37 +00:00
<view class="info-phone">{{ userInfo.member_mobile | phoneFormat }}</view>
2020-07-03 09:44:58 +00:00
<view class="user-rank">等级:{{ userInfo.member_level }}</view>
2020-06-01 08:51:11 +00:00
</view>
</view>
2020-06-08 07:23:23 +00:00
<view class="member-service" @click="toOtherPage('/mine/MemberServe')">会员服务</view>
2020-06-01 08:51:11 +00:00
</view>
<view class="bottom">
2020-08-07 03:59:08 +00:00
<view @click="toOtherPage('/mine/GoodsCollection')">
2020-07-07 09:47:00 +00:00
<view>{{ userInfo.member_fav_goods_num || 0 }}</view>
2020-06-01 08:51:11 +00:00
<view>商品收藏</view>
2020-08-07 03:59:08 +00:00
</view>
2020-08-05 09:38:11 +00:00
<!-- <view @click="toOtherPage('/mine/StoreCollection')">
2020-07-28 12:47:31 +00:00
<view>{{ userInfo.member_fav_store_num || 0 }}</view>
2020-06-01 08:51:11 +00:00
<view>店铺收藏</view>
2020-08-04 13:13:47 +00:00
</view> -->
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/mine/ImageTextCollection')">
2020-08-03 12:59:24 +00:00
<view>{{ userInfo.member_fav_article_num || 0 }}</view>
2020-06-01 08:51:11 +00:00
<view>图文收藏</view>
</view>
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/mine/Integral')">
2020-07-28 12:47:31 +00:00
<view>{{ userInfo.member_points || 0 }}</view>
2020-06-01 08:51:11 +00:00
<view>积分数</view>
</view>
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/mine/MineConcerns')">
2020-07-28 12:47:31 +00:00
<view>{{ userInfo.member_snsfrend_num || 0 }}</view>
2020-06-01 08:51:11 +00:00
<view>关注</view>
</view>
2020-05-29 09:10:25 +00:00
</view>
</view>
<view class="mine-container">
2020-06-01 08:51:11 +00:00
<view class="order">
<view class="title">
<view class="title-text">我的订单</view>
2020-06-08 07:23:23 +00:00
<view class="more" @click="toOtherPage('/order/Index')">
2020-08-11 03:12:32 +00:00
<view class="title-text-more">查看全部订单</view>
2020-08-12 14:00:01 +00:00
<u-icon name="arrow-right" color="#999" size="22"></u-icon>
2020-06-02 03:42:13 +00:00
</view>
2020-06-01 08:51:11 +00:00
</view>
<view class="content">
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/order/Index?current=1')">
2020-07-29 11:01:10 +00:00
<image src="/static/image/mine/6.png"></image>
2020-06-01 08:51:11 +00:00
<view>待支付</view>
</view>
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/order/Index?current=2')">
2020-07-31 13:47:41 +00:00
<image src="/static/image/mine/35.png"></image>
<view>待发货</view>
2020-06-01 08:51:11 +00:00
</view>
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/order/Index?current=3')">
2020-07-29 11:01:10 +00:00
<image src="/static/image/mine/2.png"></image>
2020-06-01 08:51:11 +00:00
<view>待收货</view>
</view>
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/order/Index?current=4')">
2020-07-29 11:01:10 +00:00
<image src="/static/image/mine/1.png"></image>
2020-06-01 08:51:11 +00:00
<view>试穿试送</view>
</view>
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/order/Index?current=5')">
2020-08-04 11:08:04 +00:00
<image src="/static/image/mine/37.png"></image>
<view>拼团中</view>
</view>
2020-08-13 04:13:12 +00:00
<view @click="toOtherPage('/order/Index?current=6')">
2020-08-11 02:23:04 +00:00
<image src="/static/image/mine/3.png"></image>
<view>待评价</view>
</view>
2020-08-13 04:13:12 +00:00
<view @click="toOtherPage('/order/Index?current=7')">
2020-08-11 03:12:32 +00:00
<image src="/static/image/mine/9.png"></image>
<view>售后</view>
</view>
2020-06-01 08:51:11 +00:00
</view>
</view>
<view class="tool">
<view class="title">我的工具</view>
<view class="content">
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/tool/SendWash')">
2020-07-29 11:01:10 +00:00
<image src="/static/image/mine/20.png"></image>
2020-06-01 08:51:11 +00:00
<view>送洗</view>
</view>
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/tool/Manicure')">
2020-07-29 11:01:10 +00:00
<image src="/static/image/mine/19.png"></image>
2020-06-01 08:51:11 +00:00
<view>美甲</view>
</view>
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/tool/MineHistory')">
2020-07-29 11:01:10 +00:00
<image src="/static/image/mine/18.png"></image>
2020-06-01 08:51:11 +00:00
<view>足迹</view>
</view>
2020-07-08 10:14:41 +00:00
<view @click="toOtherPage('/tool/MineCoupon')">
2020-07-29 11:01:10 +00:00
<image src="/static/image/mine/25.png"></image>
2020-07-08 10:14:41 +00:00
<view>优惠券</view>
</view>
2020-06-01 08:51:11 +00:00
</view>
</view>
<view class="more-tool">
<view class="title">更多工具</view>
<view class="content">
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/more/Address')">
2020-07-29 11:01:10 +00:00
<image src="/static/image/mine/17.png"></image>
2020-06-01 08:51:11 +00:00
<view>收货地址</view>
</view>
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/more/AfterSalesHelp')">
2020-08-11 02:00:06 +00:00
<image src="/static/image/mine/38.png"></image>
2020-06-01 08:51:11 +00:00
<view>售后政策</view>
</view>
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/more/MineHelp')">
2020-07-29 11:01:10 +00:00
<image src="/static/image/mine/16.png"></image>
2020-06-01 08:51:11 +00:00
<view>使用帮助</view>
</view>
2020-06-08 07:23:23 +00:00
<view @click="toOtherPage('/more/Complaints')">
2020-07-29 11:01:10 +00:00
<image src="/static/image/mine/15.png"></image>
2020-06-01 08:51:11 +00:00
<view>投诉意见</view>
</view>
</view>
</view>
2020-05-29 09:10:25 +00:00
</view>
</view>
</template>
<script>
2020-07-31 00:45:30 +00:00
import { mapState } from 'vuex';
2020-05-29 09:10:25 +00:00
export default {
2020-07-31 00:45:30 +00:00
computed: {
...mapState(['hasLogin', 'token'])
},
2020-05-29 09:10:25 +00:00
data() {
return {
2020-07-03 01:08:53 +00:00
userInfo: {},
2020-05-29 09:10:25 +00:00
};
2020-06-29 00:47:37 +00:00
},
filters: {
phoneFormat(value) {
2020-06-29 09:24:57 +00:00
return value ? value.replace(/^(\d{3})\d*(\d{4})$/, '$1****$2') : '';
2020-06-29 00:47:37 +00:00
}
},
2020-07-08 10:14:41 +00:00
onShow() {
2020-07-31 00:45:30 +00:00
// 尝试登录
if (!this.hasLogin) {
uni.navigateTo({
url: "../../pageA/login/login"
})
}
2020-06-29 00:47:37 +00:00
this.getUserInfo();
},
2020-06-08 07:23:23 +00:00
onNavigationBarButtonTap() {
2020-06-18 06:57:26 +00:00
this.toOtherPage("/setting/Index");
2020-06-08 07:23:23 +00:00
},
2020-06-02 07:35:19 +00:00
methods: {
2020-06-29 00:47:37 +00:00
getUserInfo() {
this.$u.api.getMemberInfo().then(res => {
2020-08-07 03:59:08 +00:00
// uni.stopPullDownRefresh();
2020-06-29 00:47:37 +00:00
if (res.errCode == 0) {
2020-07-14 02:13:27 +00:00
// this.userInfo = res.data.MemberArray;
this.$set(this, 'userInfo', res.data.MemberArray);
2020-06-29 00:47:37 +00:00
}
})
},
2020-06-02 07:35:19 +00:00
toOtherPage(url) {
uni.navigateTo({
2020-06-08 07:23:23 +00:00
url: '/pageE' + url
2020-06-02 07:35:19 +00:00
});
}
}
2020-05-29 09:10:25 +00:00
};
</script>
<style lang="scss" scoped>
.mine {
2020-07-31 00:45:30 +00:00
min-height: calc(calc(100vh - var(--window-top)));
2020-06-01 08:51:11 +00:00
background: #ECECEC;
.mine-top {
2020-06-29 00:47:37 +00:00
// width: 100%;
2020-06-01 08:51:11 +00:00
height: 272rpx;
2020-08-13 03:54:44 +00:00
background-color: #FF7807;
2020-06-01 08:51:11 +00:00
.top {
2020-06-02 03:42:13 +00:00
padding: 40rpx 0 0 30rpx;
2020-06-01 08:51:11 +00:00
display: flex;
2020-06-02 03:42:13 +00:00
align-items: center;
margin-bottom: 40rpx;
2020-06-01 08:51:11 +00:00
.user-info {
2020-07-06 09:32:29 +00:00
margin-left: 30rpx;
2020-06-01 08:51:11 +00:00
display: flex;
.info-left {
margin-right: 15rpx;
.user-nickname {
2020-08-09 10:39:35 +00:00
width: 100rpx;
2020-06-01 08:51:11 +00:00
font-size: 30rpx;
color: rgba(51,51,51,1);
margin-bottom: 19rpx;
}
.user-medal {
2020-06-02 03:42:13 +00:00
display: flex;
2020-08-09 10:39:35 +00:00
// width: 110rpx;
2020-06-02 03:42:13 +00:00
// height: 25rpx;
2020-06-01 08:51:11 +00:00
background: linear-gradient(269deg,rgba(175,175,175,1) 0%,rgba(224,224,224,1) 100%);
border-radius: 13rpx;
2020-06-08 07:23:23 +00:00
align-items: center;
padding: 0 17rpx 0 10rpx;
2020-07-29 11:01:10 +00:00
> image {
2020-06-08 07:23:23 +00:00
margin-right: 9rpx;
2020-06-01 08:51:11 +00:00
width: 20rpx;
height: 22rpx;
2020-07-29 11:01:10 +00:00
flex-shrink: 0;
2020-06-01 08:51:11 +00:00
}
.rank-title {
font-size: 16rpx;
color: rgba(51,51,51,1);
}
}
}
.info-right {
.info-phone {
font-size: 24rpx;
color: rgba(51,51,51,1);
margin-bottom: 26rpx;
}
.user-rank {
2020-06-02 03:42:13 +00:00
font-size: 24rpx;
2020-06-01 08:51:11 +00:00
color: rgba(51,51,51,1);
}
}
}
.member-service {
2020-06-02 03:42:13 +00:00
height: 52rpx;
line-height: 52rpx;
2020-06-01 08:51:11 +00:00
box-sizing: content-box;
margin-left: auto;
2020-06-02 03:42:13 +00:00
padding: 0 51rpx 0 22rpx;
background: rgba(255,255,255,0.32);
2020-06-01 08:51:11 +00:00
border-radius: 26rpx 0 0 26rpx;
2020-06-02 03:42:13 +00:00
font-size: 26rpx;
color:rgba(51,51,51,1);
2020-06-01 08:51:11 +00:00
}
}
.bottom {
display: flex;
2020-08-12 14:00:01 +00:00
justify-content: space-around;
padding: 0 10rpx;
box-sizing: border-box;
2020-06-01 08:51:11 +00:00
> view {
text-align: center;
2020-08-11 03:12:32 +00:00
font-size: 26rpx;
font-weight: 500;
color: #333;
2020-06-02 03:42:13 +00:00
> view:first-child {
margin-bottom: 10rpx;
}
2020-06-01 08:51:11 +00:00
}
}
}
.mine-container {
2020-07-30 12:33:16 +00:00
@mixin image-size($image-width, $image-height) {
> image {
width: $image-width !important;
height: $image-height !important;
}
}
2020-07-29 11:01:10 +00:00
@mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) {
2020-06-01 08:51:11 +00:00
box-sizing: border-box;
2020-08-12 14:00:01 +00:00
width: 750rpx;
2020-06-01 08:51:11 +00:00
background: rgba(255,255,255,1);
2020-08-12 14:00:01 +00:00
// border-radius: 10rpx;
margin: 20rpx auto 0;
2020-06-01 08:51:11 +00:00
.title {
2020-08-12 14:00:01 +00:00
display: flex;
align-items: center;
2020-06-01 08:51:11 +00:00
height: 76rpx;
2020-08-12 14:00:01 +00:00
padding: 0 20rpx;
2020-06-01 08:51:11 +00:00
font-size: 28rpx;
2020-08-11 03:12:32 +00:00
color: #666;
2020-08-12 14:00:01 +00:00
border-bottom: 1px solid #ececec;
// &::after {
// content: "";
// position: absolute;
// width: 650rpx;
// height: 1rpx;
// background: rgba(234,234,234,1);
// bottom: 0;
// left: 50%;
// transform: translate(-50%,0);
// }
2020-06-01 08:51:11 +00:00
}
2020-08-11 03:12:32 +00:00
.title-text-more {
font-size: 24rpx;
color: #999;
}
2020-06-01 08:51:11 +00:00
.content {
2020-08-12 14:00:01 +00:00
padding: $content-padding-top 20rpx $content-padding-bottom;
2020-06-01 08:51:11 +00:00
display: flex;
> view {
text-align: center;
2020-07-29 11:01:10 +00:00
> image {
width: $image-width;
2020-06-01 08:51:11 +00:00
height: $image-height;
margin-bottom: 15rpx;
2020-07-29 11:01:10 +00:00
flex-shrink: 0;
2020-06-01 08:51:11 +00:00
}
> view {
font-size: 22rpx;
color: rgba(102,102,102,1);
}
}
}
}
.order {
@include common-mine(
$content-padding-top: 22rpx,
$content-padding-bottom: 30rpx,
2020-07-29 11:01:10 +00:00
$image-height: 36rpx,
2020-07-31 01:59:22 +00:00
$image-width: 36rpx
2020-06-01 08:51:11 +00:00
);
.title {
justify-content: space-between;
2020-06-02 03:42:13 +00:00
.more {
display: flex;
align-items: center;
2020-07-29 11:01:10 +00:00
> image {
width: 19rpx;
2020-06-02 03:42:13 +00:00
height: 19rpx;
margin-left: 10rpx;
2020-07-29 11:01:10 +00:00
flex-shrink: 0;
2020-06-02 03:42:13 +00:00
}
}
2020-06-01 08:51:11 +00:00
}
.content {
2020-08-11 03:12:32 +00:00
align-items: center;
2020-06-01 08:51:11 +00:00
justify-content: space-between;
2020-08-07 03:59:08 +00:00
> view {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
}
2020-07-30 12:33:16 +00:00
> view:nth-child(1){
2020-08-11 03:12:32 +00:00
@include image-size($image-width: 36rpx, $image-height: 34rpx);
2020-07-30 12:33:16 +00:00
}
> view:nth-child(2){
2020-08-11 03:12:32 +00:00
@include image-size($image-width: 38rpx, $image-height: 36rpx);
2020-07-30 12:33:16 +00:00
}
> view:nth-child(3){
2020-08-11 03:12:32 +00:00
@include image-size($image-width: 40rpx, $image-height: 36rpx);
2020-07-30 12:33:16 +00:00
}
> view:nth-child(4){
2020-08-11 03:12:32 +00:00
@include image-size($image-width: 38rpx, $image-height: 38rpx);
2020-07-30 12:33:16 +00:00
}
> view:nth-child(5){
2020-08-11 03:12:32 +00:00
@include image-size($image-width: 36rpx, $image-height: 40rpx);
2020-07-30 12:33:16 +00:00
}
> view:nth-child(6){
2020-08-11 03:12:32 +00:00
@include image-size($image-width: 36rpx, $image-height: 40rpx);
2020-07-30 12:33:16 +00:00
}
2020-06-01 08:51:11 +00:00
}
}
.tool {
@include common-mine(
2020-08-05 14:44:08 +00:00
$content-padding-top: 24rpx,
2020-06-01 08:51:11 +00:00
$content-padding-bottom: 25rpx,
2020-07-29 11:01:10 +00:00
$image-height: 71rpx,
2020-07-31 01:59:22 +00:00
$image-width: 71rpx
2020-06-01 08:51:11 +00:00
);
.content {
> view:not(:last-child) {
margin-right: 58rpx;
}
}
}
.more-tool {
@include common-mine(
2020-08-05 14:44:08 +00:00
$content-padding-top: 24rpx,
2020-06-01 08:51:11 +00:00
$content-padding-bottom: 48rpx,
2020-07-29 11:01:10 +00:00
$image-height: 71rpx,
2020-07-31 01:59:22 +00:00
$image-width: 71rpx
2020-06-01 08:51:11 +00:00
);
.content {
> view:not(:last-child) {
margin-right: 46rpx;
}
}
}
}
2020-05-29 09:10:25 +00:00
}
</style>