|
|
@@ -1,215 +1,290 @@
|
|
|
<template>
|
|
|
- <div class="user">
|
|
|
- <div class="top">
|
|
|
- <van-image class="user-icon" width="60" height="60" fit="fill" radius="100" :src="userInfo.avatar" />
|
|
|
- <div class="user-name">{{ userInfo.nickname }}</div>
|
|
|
- <!-- <div class="code">我的邀请码:16523516</div> -->
|
|
|
-
|
|
|
- </div>
|
|
|
+ <div class="user">
|
|
|
+ <div class="top">
|
|
|
+ <van-image
|
|
|
+ class="user-icon"
|
|
|
+ width="60"
|
|
|
+ height="60"
|
|
|
+ fit="fill"
|
|
|
+ radius="100"
|
|
|
+ :src="userInfo.avatar"
|
|
|
+ />
|
|
|
+ <div class="user-name">{{ userInfo.nickname }}</div>
|
|
|
+ <!-- <div class="code">我的邀请码:16523516</div> -->
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="order">
|
|
|
- <van-cell style="padding:30px 15px 10px;" title-class="order-title" value-class="order-val" title="我的订单" is-link value="查看全部" @click="goNext('orderList')" />
|
|
|
- <van-grid class="order-menu" :column-num="4" :border="false">
|
|
|
- <van-grid-item @click="goNext('orderList', { chooseTab: 1 })">
|
|
|
- <div class="grid-info">
|
|
|
- <img src="../assets/info_icon_dingdan_daifahuo.png" class="order-img" alt />
|
|
|
- <div class="text">待付款</div>
|
|
|
- <div class="tag" v-if="badge.NOT_PAID">{{ badge.NOT_PAID }}</div>
|
|
|
- </div>
|
|
|
- </van-grid-item>
|
|
|
- <van-grid-item text="待发货" @click="goNext('orderList', { chooseTab: 2 })">
|
|
|
- <div class="grid-info">
|
|
|
- <img src="../assets/info_icon_dingdan_daifukuan.png" class="order-img" alt />
|
|
|
- <div class="text">待发货</div>
|
|
|
- <div class="tag" v-if="badge.NOT_CONFIRMED">{{ badge.NOT_CONFIRMED }}</div>
|
|
|
- </div>
|
|
|
- </van-grid-item>
|
|
|
- <van-grid-item text="待收货" @click="goNext('orderList', { chooseTab: 3 })">
|
|
|
- <div class="grid-info">
|
|
|
- <img src="../assets/info_icon_dingdan_daishouhuo.png" class="order-img" alt />
|
|
|
- <div class="text">待收货</div>
|
|
|
- <div class="tag" v-if="badge.CONFIRMED">{{ badge.CONFIRMED }}</div>
|
|
|
- </div>
|
|
|
- </van-grid-item>
|
|
|
-
|
|
|
- <van-grid-item text="待评价" @click="goNext('orderList', { chooseTab: 3 })">
|
|
|
- <div class="grid-info">
|
|
|
- <img src="../assets/info_icon_dingdan_daipingjia.png" class="order-img" alt />
|
|
|
- <div class="text">待评价</div>
|
|
|
- <div class="tag" v-if="badge.CONFIRMED">{{ badge.CONFIRMED }}</div>
|
|
|
- </div>
|
|
|
- </van-grid-item>
|
|
|
- </van-grid>
|
|
|
- </div>
|
|
|
+ <div class="order">
|
|
|
+ <van-cell
|
|
|
+ style="padding:30px 15px 10px;"
|
|
|
+ title-class="order-title"
|
|
|
+ value-class="order-val"
|
|
|
+ title="我的订单"
|
|
|
+ is-link
|
|
|
+ value="查看全部"
|
|
|
+ @click="goNext('orderList')"
|
|
|
+ />
|
|
|
+ <van-grid class="order-menu" :column-num="4" :border="false">
|
|
|
+ <van-grid-item @click="goNext('orderList', { chooseTab: 1 })">
|
|
|
+ <div class="grid-info">
|
|
|
+ <img
|
|
|
+ src="../assets/info_icon_dingdan_daifukuan.png"
|
|
|
+ class="order-img"
|
|
|
+ alt
|
|
|
+ />
|
|
|
+ <div class="text">待付款</div>
|
|
|
+ <div class="tag" v-if="badge.NOT_PAID">
|
|
|
+ {{ badge.NOT_PAID }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </van-grid-item>
|
|
|
+ <van-grid-item
|
|
|
+ text="待发货"
|
|
|
+ @click="goNext('orderList', { chooseTab: 2 })"
|
|
|
+ >
|
|
|
+ <div class="grid-info">
|
|
|
+ <img
|
|
|
+ src="../assets/info_icon_dingdan_daifahuo.png"
|
|
|
+ class="order-img"
|
|
|
+ alt
|
|
|
+ />
|
|
|
+ <div class="text">待发货</div>
|
|
|
+ <div class="tag" v-if="badge.NOT_CONFIRMED">
|
|
|
+ {{ badge.NOT_CONFIRMED }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </van-grid-item>
|
|
|
+ <van-grid-item
|
|
|
+ text="待收货"
|
|
|
+ @click="goNext('orderList', { chooseTab: 3 })"
|
|
|
+ >
|
|
|
+ <div class="grid-info">
|
|
|
+ <img
|
|
|
+ src="../assets/info_icon_dingdan_daishouhuo.png"
|
|
|
+ class="order-img"
|
|
|
+ alt
|
|
|
+ />
|
|
|
+ <div class="text">待收货</div>
|
|
|
+ <div class="tag" v-if="badge.CONFIRMED">
|
|
|
+ {{ badge.CONFIRMED }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </van-grid-item>
|
|
|
|
|
|
- <div class="menu-list">
|
|
|
+ <van-grid-item
|
|
|
+ text="待评价"
|
|
|
+ @click="goNext('orderList', { chooseTab: 3 })"
|
|
|
+ >
|
|
|
+ <div class="grid-info">
|
|
|
+ <img
|
|
|
+ src="../assets/info_icon_dingdan_daipingjia.png"
|
|
|
+ class="order-img"
|
|
|
+ alt
|
|
|
+ />
|
|
|
+ <div class="text">待评价</div>
|
|
|
+ <div class="tag" v-if="badge.CONFIRMED">
|
|
|
+ {{ badge.CONFIRMED }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </van-grid-item>
|
|
|
+ </van-grid>
|
|
|
+ </div>
|
|
|
|
|
|
- <van-cell-group :border="false" >
|
|
|
- <!-- <van-cell title="我的优惠券" title-class="menu-title" @click="goNext('collection')" is-link>
|
|
|
+ <div class="menu-list">
|
|
|
+ <van-cell-group :border="false">
|
|
|
+ <!-- <van-cell title="我的优惠券" title-class="menu-title" @click="goNext('collection')" is-link>
|
|
|
<img src="../assets/info_icon_list_01(1).png" class="menu-img" slot="icon" alt />
|
|
|
</van-cell> -->
|
|
|
- <van-cell title="帮助中心" title-class="menu-title" @click="goNext('rule')" is-link>
|
|
|
- <img src="../assets/info_icon_list_01.png" class="menu-img" slot="icon" alt />
|
|
|
- </van-cell>
|
|
|
- <van-cell title="联系客服" title-class="menu-title" @click="takephone" is-link>
|
|
|
- <img src="../assets/info_icon_list_01(2).png" class="menu-img" slot="icon" alt />
|
|
|
- </van-cell>
|
|
|
- <van-cell title="资料设置" title-class="menu-title" @click="goNext('setting')" is-link>
|
|
|
- <img src="../assets/info_icon_list_01(3).png" class="menu-img" slot="icon" alt />
|
|
|
- </van-cell>
|
|
|
- </van-cell-group>
|
|
|
+ <van-cell
|
|
|
+ title="帮助中心"
|
|
|
+ title-class="menu-title"
|
|
|
+ @click="goNext('rule')"
|
|
|
+ is-link
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ src="../assets/info_icon_list_01.png"
|
|
|
+ class="menu-img"
|
|
|
+ slot="icon"
|
|
|
+ alt
|
|
|
+ />
|
|
|
+ </van-cell>
|
|
|
+ <van-cell
|
|
|
+ title="联系客服"
|
|
|
+ title-class="menu-title"
|
|
|
+ @click="takephone"
|
|
|
+ is-link
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ src="../assets/info_icon_list_01(2).png"
|
|
|
+ class="menu-img"
|
|
|
+ slot="icon"
|
|
|
+ alt
|
|
|
+ />
|
|
|
+ </van-cell>
|
|
|
+ <van-cell
|
|
|
+ title="资料设置"
|
|
|
+ title-class="menu-title"
|
|
|
+ @click="goNext('setting')"
|
|
|
+ is-link
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ src="../assets/info_icon_list_01(3).png"
|
|
|
+ class="menu-img"
|
|
|
+ slot="icon"
|
|
|
+ alt
|
|
|
+ />
|
|
|
+ </van-cell>
|
|
|
+ </van-cell-group>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { mapState } from 'vuex'
|
|
|
+import { mapState } from "vuex";
|
|
|
export default {
|
|
|
- name: '',
|
|
|
- data() {
|
|
|
- return {
|
|
|
- hasAddress: false,
|
|
|
- badge: {}
|
|
|
+ name: "",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ hasAddress: false,
|
|
|
+ badge: {}
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(["userInfo", "showBar"])
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ // this.$http.get('/address/all').then(res => {
|
|
|
+ // if (res.content.length > 0) {
|
|
|
+ // this.hasAddress = true;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // this.$http.get('/order/badge').then(res => {
|
|
|
+ // this.badge = res;
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ bindAli() {
|
|
|
+ window.location.href =
|
|
|
+ location.origin + "/alipay/auth?userId=" + this.userInfo.id;
|
|
|
+ }
|
|
|
}
|
|
|
- },
|
|
|
- computed: {
|
|
|
- ...mapState(['userInfo', 'showBar'])
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- // this.$http.get('/address/all').then(res => {
|
|
|
- // if (res.content.length > 0) {
|
|
|
- // this.hasAddress = true;
|
|
|
- // }
|
|
|
- // });
|
|
|
- // this.$http.get('/order/badge').then(res => {
|
|
|
- // this.badge = res;
|
|
|
- // });
|
|
|
- },
|
|
|
- methods: {
|
|
|
- bindAli() {
|
|
|
- window.location.href =
|
|
|
- location.origin + '/alipay/auth?userId=' + this.userInfo.id
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
.user {
|
|
|
- position: relative;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
.top {
|
|
|
- height: 120px;
|
|
|
- background: rgba(184, 28, 34, 1);
|
|
|
- border-radius: 8px;
|
|
|
- margin: 45px 15px 0;
|
|
|
- padding: 43px 0 0;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- box-sizing: border-box;
|
|
|
-
|
|
|
- .user-icon {
|
|
|
- position: absolute;
|
|
|
- left: 50%;
|
|
|
- transform: translateX(-50%);
|
|
|
- top: 15px;
|
|
|
- }
|
|
|
-
|
|
|
- .user-name {
|
|
|
- font-size: 18px;
|
|
|
- font-weight: bold;
|
|
|
- color: rgba(255, 255, 255, 1);
|
|
|
- line-height: 25px;
|
|
|
- }
|
|
|
-
|
|
|
- .code {
|
|
|
- font-size: 12px;
|
|
|
- color: rgba(255, 255, 255, 1);
|
|
|
- line-height: 17px;
|
|
|
- margin-top: 11px;
|
|
|
- }
|
|
|
+ height: 100px;
|
|
|
+ background: rgba(184, 28, 34, 1);
|
|
|
+ border-radius: 8px;
|
|
|
+ margin: 45px 15px 0;
|
|
|
+ padding: 45px 0 0;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ box-sizing: border-box;
|
|
|
+
|
|
|
+ .user-icon {
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ top: 15px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .user-name {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ line-height: 25px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .code {
|
|
|
+ font-size: 12px;
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ line-height: 17px;
|
|
|
+ margin-top: 11px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.order {
|
|
|
- height: 140px;
|
|
|
- background: rgba(255, 255, 255, 1);
|
|
|
- border-radius: 4px;
|
|
|
-// overflow: hidden;
|
|
|
-
|
|
|
- .order-title {
|
|
|
- font-size: 20px;
|
|
|
- font-weight: bold;
|
|
|
- color: rgba(0, 0, 0, 1);
|
|
|
- }
|
|
|
-
|
|
|
- .order-val {
|
|
|
- font-size: 13px;
|
|
|
- color: rgba(153, 153, 153, 1);
|
|
|
- }
|
|
|
-
|
|
|
- .order-img {
|
|
|
- width: 30px;
|
|
|
- height: 30px;
|
|
|
- display: block;
|
|
|
- margin-bottom: 3px;
|
|
|
- }
|
|
|
- .text {
|
|
|
- font-size: 13px;
|
|
|
- color: rgba(26, 26, 26, 1);
|
|
|
- line-height: 18px;
|
|
|
- }
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ border-radius: 4px;
|
|
|
+ // overflow: hidden;
|
|
|
+
|
|
|
+ .order-title {
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: rgba(0, 0, 0, 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ .order-val {
|
|
|
+ font-size: 13px;
|
|
|
+ color: rgba(153, 153, 153, 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ .order-img {
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ display: block;
|
|
|
+ margin-bottom: 3px;
|
|
|
+ }
|
|
|
+ .text {
|
|
|
+ font-size: 13px;
|
|
|
+ color: rgba(26, 26, 26, 1);
|
|
|
+ line-height: 18px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.menu-list {
|
|
|
- margin: 20px 0 0;
|
|
|
- background-color: #f7f9fa;
|
|
|
-
|
|
|
- .menu-img {
|
|
|
- width: 24px;
|
|
|
- height: 24px;
|
|
|
- margin-right: 10px;
|
|
|
- }
|
|
|
-
|
|
|
- .menu-title {
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(0, 0, 0, 1);
|
|
|
- }
|
|
|
-
|
|
|
- .menu-not-val {
|
|
|
- font-size: 13px;
|
|
|
- color: rgba(255, 143, 0, 1);
|
|
|
- }
|
|
|
+ margin: 20px 0 0;
|
|
|
+ background-color: #f7f9fa;
|
|
|
+
|
|
|
+ .menu-img {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-title {
|
|
|
+ font-size: 14px;
|
|
|
+ color: rgba(0, 0, 0, 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-not-val {
|
|
|
+ font-size: 13px;
|
|
|
+ color: rgba(255, 143, 0, 1);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.grid-info {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- position: relative;
|
|
|
-
|
|
|
- .tag {
|
|
|
- min-width: 17px;
|
|
|
- height: 17px;
|
|
|
- background: rgba(255, 39, 0, 1);
|
|
|
- border-radius: 17px;
|
|
|
- font-size: 12px;
|
|
|
- font-weight: bold;
|
|
|
- color: rgba(255, 255, 255, 1);
|
|
|
- line-height: 17px;
|
|
|
- padding: 0 2px;
|
|
|
- position: absolute;
|
|
|
- right: 0;
|
|
|
- top: -5px;
|
|
|
- text-align: center;
|
|
|
- box-sizing: border-box;
|
|
|
- // transform: translateX(50%);
|
|
|
- }
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .tag {
|
|
|
+ min-width: 17px;
|
|
|
+ height: 17px;
|
|
|
+ background: rgba(255, 39, 0, 1);
|
|
|
+ border-radius: 17px;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ line-height: 17px;
|
|
|
+ padding: 0 2px;
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ top: -5px;
|
|
|
+ text-align: center;
|
|
|
+ box-sizing: border-box;
|
|
|
+ // transform: translateX(50%);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.order-menu {
|
|
|
- margin: 0 15px;
|
|
|
- background: rgba(255, 255, 255, 1);
|
|
|
- box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.1);
|
|
|
- border-radius: 8px;
|
|
|
- padding: 4px 0;
|
|
|
+ margin: 0 15px;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.1);
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 4px 0;
|
|
|
}
|
|
|
</style>
|