|
|
@@ -3,6 +3,7 @@ const common_vendor = require("../../common/vendor.js");
|
|
|
const utils_assets = require("../../utils/assets.js");
|
|
|
const api_system_customer = require("../../api/system/customer.js");
|
|
|
const api_auth_index = require("../../api/auth/index.js");
|
|
|
+const api_system_phone = require("../../api/system/phone.js");
|
|
|
const ErpTabBar = () => "../../components/erp-tab-bar.js";
|
|
|
const ErpNavBar = () => "../../components/erp-nav-bar.js";
|
|
|
const _sfc_main = {
|
|
|
@@ -12,11 +13,12 @@ const _sfc_main = {
|
|
|
assets: utils_assets.assets,
|
|
|
isLogin: false,
|
|
|
customerInfo: null,
|
|
|
+ servicePhone: "13888888888",
|
|
|
orderStates: [
|
|
|
- { label: "待审核", icon: utils_assets.assets.minePendingReview },
|
|
|
- { label: "待签批", icon: utils_assets.assets.minePendingSign },
|
|
|
- { label: "生产中", icon: utils_assets.assets.mineProducing },
|
|
|
- { label: "已完成", icon: utils_assets.assets.mineCompleted }
|
|
|
+ { label: "待审核", tabIndex: 2, icon: utils_assets.assets.minePendingReview },
|
|
|
+ { label: "待签批", tabIndex: 4, icon: utils_assets.assets.minePendingSign },
|
|
|
+ { label: "生产中", tabIndex: 5, icon: utils_assets.assets.mineProducing },
|
|
|
+ { label: "已完成", tabIndex: 6, icon: utils_assets.assets.mineCompleted }
|
|
|
],
|
|
|
menuList: [
|
|
|
{ label: "用户协议", icon: utils_assets.assets.mineProtocol, id: "agreement" },
|
|
|
@@ -31,14 +33,25 @@ const _sfc_main = {
|
|
|
if (this.isLogin) {
|
|
|
this.loadCustomerInfo();
|
|
|
}
|
|
|
+ this.loadServicePhone();
|
|
|
},
|
|
|
methods: {
|
|
|
+ async loadServicePhone() {
|
|
|
+ try {
|
|
|
+ const res = await api_system_phone.getPhone();
|
|
|
+ if (res.data && res.data.servicePhone) {
|
|
|
+ this.servicePhone = res.data.servicePhone;
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ common_vendor.index.__f__("error", "at pages/mine/index.vue:134", "加载客服电话失败", e);
|
|
|
+ }
|
|
|
+ },
|
|
|
async loadCustomerInfo() {
|
|
|
try {
|
|
|
const res = await api_system_customer.getMyInfo();
|
|
|
this.customerInfo = res.data;
|
|
|
} catch (e) {
|
|
|
- common_vendor.index.__f__("error", "at pages/mine/index.vue:129", "[mine] 加载客户信息失败", e);
|
|
|
+ common_vendor.index.__f__("error", "at pages/mine/index.vue:142", "[mine] 加载客户信息失败", e);
|
|
|
}
|
|
|
},
|
|
|
goToLogin() {
|
|
|
@@ -71,7 +84,7 @@ const _sfc_main = {
|
|
|
try {
|
|
|
await api_auth_index.logout();
|
|
|
} catch (e) {
|
|
|
- common_vendor.index.__f__("error", "at pages/mine/index.vue:162", "[mine] 退出登录接口失败", e);
|
|
|
+ common_vendor.index.__f__("error", "at pages/mine/index.vue:175", "[mine] 退出登录接口失败", e);
|
|
|
}
|
|
|
common_vendor.index.removeStorageSync("token");
|
|
|
common_vendor.index.removeStorageSync("isLogin");
|
|
|
@@ -92,14 +105,14 @@ const _sfc_main = {
|
|
|
} else if (menu.id === "service") {
|
|
|
common_vendor.index.showModal({
|
|
|
title: "联系客服",
|
|
|
- content: "客服电话:138-8888-8888",
|
|
|
+ content: "客服电话:" + this.servicePhone,
|
|
|
confirmText: "立即拨打",
|
|
|
confirmColor: "#C1001C",
|
|
|
cancelColor: "#999999",
|
|
|
success: (res) => {
|
|
|
if (res.confirm) {
|
|
|
common_vendor.index.makePhoneCall({
|
|
|
- phoneNumber: "13888888888"
|
|
|
+ phoneNumber: this.servicePhone
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
@@ -143,7 +156,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
a: item.icon,
|
|
|
b: common_vendor.t(item.label),
|
|
|
c: index,
|
|
|
- d: common_vendor.o(($event) => $options.goToOrderList(index + 1), index)
|
|
|
+ d: common_vendor.o(($event) => $options.goToOrderList(item.tabIndex), index)
|
|
|
};
|
|
|
}),
|
|
|
o: common_vendor.f($data.menuList, (menu, index, i0) => {
|
|
|
@@ -157,7 +170,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
p: $data.assets.mineArrow,
|
|
|
q: $data.isLogin
|
|
|
}, $data.isLogin ? {
|
|
|
- r: common_vendor.o((...args) => $options.handleLogout && $options.handleLogout(...args), "0c")
|
|
|
+ r: common_vendor.o((...args) => $options.handleLogout && $options.handleLogout(...args), "d1")
|
|
|
} : {}, {
|
|
|
s: common_vendor.p({
|
|
|
active: "mine"
|