|
@@ -211,7 +211,8 @@
|
|
} from '@/config/cache';
|
|
} from '@/config/cache';
|
|
import {
|
|
import {
|
|
userCenterInfo,
|
|
userCenterInfo,
|
|
- copyrightImageApi
|
|
|
|
|
|
+ copyrightImageApi,
|
|
|
|
+ getOrderMenu
|
|
} from '@/api/user.js';
|
|
} from '@/api/user.js';
|
|
import {
|
|
import {
|
|
MerchantBelongListApi,
|
|
MerchantBelongListApi,
|
|
@@ -374,7 +375,8 @@
|
|
onShow: function() {
|
|
onShow: function() {
|
|
if (this.isLogin) {
|
|
if (this.isLogin) {
|
|
this.getUserCenterInfo();
|
|
this.getUserCenterInfo();
|
|
- this.getMerchantList()
|
|
|
|
|
|
+ this.getOrderMenu();
|
|
|
|
+ this.getMerchantList();
|
|
}
|
|
}
|
|
this.copyrightImage();
|
|
this.copyrightImage();
|
|
this.showSkeleton = false
|
|
this.showSkeleton = false
|
|
@@ -394,6 +396,16 @@
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
/**
|
|
/**
|
|
|
|
+ * 获取用户订单状态菜单
|
|
|
|
+ */
|
|
|
|
+ async getOrderMenu() {
|
|
|
|
+ const { data } = await getOrderMenu();
|
|
|
|
+ this.orderMenu = data.map(item => {
|
|
|
|
+ return {...item,title: item.name,num: 0}
|
|
|
|
+ });
|
|
|
|
+ this.getOrderData();
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
* 发现列表滑动中用到的方法
|
|
* 发现列表滑动中用到的方法
|
|
*/
|
|
*/
|
|
onScroll() {
|
|
onScroll() {
|
|
@@ -545,12 +557,6 @@
|
|
userCenterInfo().then(res => {
|
|
userCenterInfo().then(res => {
|
|
let data = res.data;
|
|
let data = res.data;
|
|
this.userInfo = data;
|
|
this.userInfo = data;
|
|
- this.orderMenu = data.orderMenu.map(item => ({
|
|
|
|
- ...item,
|
|
|
|
- title: item.name,
|
|
|
|
- num: 0
|
|
|
|
- }));
|
|
|
|
- this.getOrderData();
|
|
|
|
this.$store.commit("SETUID", data.id);
|
|
this.$store.commit("SETUID", data.id);
|
|
this.$store.commit("SetIsEmployee", data.isEmployee);
|
|
this.$store.commit("SetIsEmployee", data.isEmployee);
|
|
this.$set(this, 'centerMenu', data.centerMenu);
|
|
this.$set(this, 'centerMenu', data.centerMenu);
|