处理订单列表
This commit is contained in:
145
unpackage/dist/dev/mp-weixin/pages/mine/index.js
vendored
145
unpackage/dist/dev/mp-weixin/pages/mine/index.js
vendored
@@ -1,77 +1,42 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_user = require("../../api/user.js");
|
||||
const utils_helper = require("../../utils/helper.js");
|
||||
const api_order = require("../../api/order.js");
|
||||
const api_config = require("../../api/config.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_avatar2 = common_vendor.resolveComponent("nut-avatar");
|
||||
const _easycom_nut_icon2 = common_vendor.resolveComponent("nut-icon");
|
||||
const _easycom_nut_grid_item2 = common_vendor.resolveComponent("nut-grid-item");
|
||||
const _easycom_nut_grid2 = common_vendor.resolveComponent("nut-grid");
|
||||
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
|
||||
const _easycom_nut_cell2 = common_vendor.resolveComponent("nut-cell");
|
||||
(_easycom_nut_avatar2 + _easycom_nut_icon2 + _easycom_nut_grid_item2 + _easycom_nut_grid2 + _easycom_nut_cell_group2 + _easycom_nut_cell2)();
|
||||
(_easycom_nut_avatar2 + _easycom_nut_icon2 + _easycom_nut_grid_item2 + _easycom_nut_grid2 + _easycom_nut_cell_group2)();
|
||||
}
|
||||
const _easycom_nut_avatar = () => "../../uni_modules/nutui-uni/components/avatar/avatar.js";
|
||||
const _easycom_nut_icon = () => "../../uni_modules/nutui-uni/components/icon/icon.js";
|
||||
const _easycom_nut_grid_item = () => "../../uni_modules/nutui-uni/components/griditem/griditem.js";
|
||||
const _easycom_nut_grid = () => "../../uni_modules/nutui-uni/components/grid/grid.js";
|
||||
const _easycom_nut_cell_group = () => "../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
|
||||
const _easycom_nut_cell = () => "../../uni_modules/nutui-uni/components/cell/cell.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_avatar + _easycom_nut_icon + _easycom_nut_grid_item + _easycom_nut_grid + _easycom_nut_cell_group + _easycom_nut_cell)();
|
||||
(_easycom_nut_avatar + _easycom_nut_icon + _easycom_nut_grid_item + _easycom_nut_grid + _easycom_nut_cell_group)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const audit = common_vendor.ref(true);
|
||||
const showMyOrder = common_vendor.ref(false);
|
||||
const phone = common_vendor.ref("");
|
||||
const uid = common_vendor.ref(0);
|
||||
const userInfo = common_vendor.reactive({});
|
||||
const countInfo = common_vendor.reactive({
|
||||
all: 0,
|
||||
payment: 0,
|
||||
delivery: 0,
|
||||
received: 0
|
||||
});
|
||||
const staffName = common_vendor.ref("");
|
||||
common_vendor.onLoad((options) => {
|
||||
init();
|
||||
});
|
||||
const makePhoneCall = (phoneNumber) => {
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:163", 123);
|
||||
common_vendor.index.makePhoneCall({
|
||||
phoneNumber,
|
||||
success: () => {
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:167", "拨打电话成功");
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages/mine/index.vue:170", "拨打电话失败:", err);
|
||||
}
|
||||
});
|
||||
};
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:179", "getConfig=====>", res);
|
||||
audit.value = res.appConfig.is_audit == 1;
|
||||
phone.value = res.appConfig.shop_phone;
|
||||
});
|
||||
const init = () => {
|
||||
common_vendor.index.getStorageSync("user_name");
|
||||
let staff_name = common_vendor.index.getStorageSync("staff_name");
|
||||
common_vendor.index.getStorageSync("role");
|
||||
let user_id = common_vendor.index.getStorageSync("uid");
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:188", "staff_name", staff_name);
|
||||
uid.value = user_id;
|
||||
staffName.value = staff_name;
|
||||
};
|
||||
common_vendor.onShow(() => {
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:190", "init");
|
||||
let userId = common_vendor.index.getStorageSync("uid");
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:193", "userId", userId);
|
||||
uid.value = userId;
|
||||
getConfig();
|
||||
if (uid.value > 0) {
|
||||
api_user.fetchUserInfo().then((res) => {
|
||||
Object.assign(userInfo, res);
|
||||
showMyOrder.value = true;
|
||||
api_order.fetchOrderTotalCount().then((res2) => {
|
||||
Object.assign(countInfo, res2);
|
||||
});
|
||||
});
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:203", "init");
|
||||
init();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
@@ -80,81 +45,25 @@ const _sfc_main = {
|
||||
b: common_vendor.p({
|
||||
size: "large"
|
||||
}),
|
||||
c: common_vendor.t(userInfo.nickName),
|
||||
d: common_vendor.t(userInfo.user_id)
|
||||
} : {
|
||||
c: common_vendor.t(staffName.value),
|
||||
d: common_vendor.t(uid.value)
|
||||
} : {}, {
|
||||
e: common_vendor.p({
|
||||
name: "my"
|
||||
}),
|
||||
f: common_vendor.p({
|
||||
size: "large"
|
||||
}),
|
||||
g: common_vendor.o(($event) => common_vendor.unref(utils_helper.goToLoginPage)()),
|
||||
h: common_vendor.o(($event) => common_vendor.unref(utils_helper.goToLoginPage)())
|
||||
}, {
|
||||
i: common_vendor.p({
|
||||
name: "people"
|
||||
}),
|
||||
j: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/store")),
|
||||
k: common_vendor.p({
|
||||
text: "商城配置"
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
name: "refresh"
|
||||
}),
|
||||
m: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/price")),
|
||||
n: common_vendor.p({
|
||||
text: "价格调整"
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
name: "shop"
|
||||
}),
|
||||
p: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/goodsList")),
|
||||
q: common_vendor.p({
|
||||
text: "商品管理"
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
name: "order"
|
||||
}),
|
||||
s: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/shopOrder/index?tab=0")),
|
||||
t: common_vendor.p({
|
||||
text: "店铺订单"
|
||||
f: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/order/index?tab=0")),
|
||||
g: common_vendor.p({
|
||||
text: "订单管理"
|
||||
}),
|
||||
v: common_vendor.p({
|
||||
title: "店铺管理"
|
||||
h: common_vendor.p({
|
||||
name: "eye"
|
||||
}),
|
||||
w: showMyOrder.value && !audit.value
|
||||
}, showMyOrder.value && !audit.value ? {
|
||||
x: common_vendor.t(countInfo.all),
|
||||
y: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/order/index?tab=0")),
|
||||
z: common_vendor.p({
|
||||
text: "全部"
|
||||
i: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/order/shopOrder/index?tab=0")),
|
||||
j: common_vendor.p({
|
||||
text: "运营数据"
|
||||
}),
|
||||
A: common_vendor.t(countInfo.payment),
|
||||
B: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/order/index?tab=1")),
|
||||
C: common_vendor.p({
|
||||
text: "待付款"
|
||||
}),
|
||||
D: common_vendor.t(countInfo.delivery),
|
||||
E: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/order/index?tab=2")),
|
||||
F: common_vendor.p({
|
||||
text: "待发货"
|
||||
}),
|
||||
G: common_vendor.t(countInfo.received),
|
||||
H: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/order/index?tab=3")),
|
||||
I: common_vendor.p({
|
||||
text: "待收货"
|
||||
}),
|
||||
J: common_vendor.p({
|
||||
title: "我的订单"
|
||||
})
|
||||
} : {}, {
|
||||
K: common_vendor.o(($event) => makePhoneCall(phone.value)),
|
||||
L: common_vendor.p({
|
||||
title: phone.value
|
||||
}),
|
||||
M: common_vendor.p({
|
||||
title: "联系我们"
|
||||
k: common_vendor.p({
|
||||
title: ""
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"nut-avatar": "../../uni_modules/nutui-uni/components/avatar/avatar",
|
||||
"nut-icon": "../../uni_modules/nutui-uni/components/icon/icon",
|
||||
"nut-grid-item": "../../uni_modules/nutui-uni/components/griditem/griditem",
|
||||
"nut-grid": "../../uni_modules/nutui-uni/components/grid/grid",
|
||||
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
|
||||
"nut-cell": "../../uni_modules/nutui-uni/components/cell/cell"
|
||||
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup"
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<view class="page-content data-v-569e925a"><view wx:if="{{a}}" class="user-inner data-v-569e925a"><view class="data-v-569e925a"><nut-avatar wx:if="{{b}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-0" bind:__l="__l" u-p="{{b}}">用户</nut-avatar></view><view class="user-info-style data-v-569e925a"><text class="nickname data-v-569e925a">{{c}}</text><text class="user-id data-v-569e925a">UID:{{d}}</text></view></view><view wx:else class="user-inner data-v-569e925a"><view class="data-v-569e925a" bindtap="{{g}}"><nut-avatar wx:if="{{f}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-1" bind:__l="__l" u-p="{{f}}"><nut-icon wx:if="{{e}}" class="data-v-569e925a" u-i="569e925a-2,569e925a-1" bind:__l="__l" u-p="{{e}}"/></nut-avatar></view><view class="data-v-569e925a" bindtap="{{h}}"><text class="data-v-569e925a">点击登录</text></view></view><view class="content data-v-569e925a"><nut-cell-group wx:if="{{v}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-3" bind:__l="__l" u-p="{{v}}"><nut-grid class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-4,569e925a-3" bind:__l="__l"><nut-grid-item wx:if="{{k}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{j}}" u-i="569e925a-5,569e925a-4" bind:__l="__l" u-p="{{k}}"><nut-icon wx:if="{{i}}" class="data-v-569e925a" u-i="569e925a-6,569e925a-5" bind:__l="__l" u-p="{{i}}"></nut-icon></nut-grid-item><nut-grid-item wx:if="{{n}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{m}}" u-i="569e925a-7,569e925a-4" bind:__l="__l" u-p="{{n}}"><nut-icon wx:if="{{l}}" class="data-v-569e925a" u-i="569e925a-8,569e925a-7" bind:__l="__l" u-p="{{l}}"></nut-icon></nut-grid-item><nut-grid-item wx:if="{{q}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{p}}" u-i="569e925a-9,569e925a-4" bind:__l="__l" u-p="{{q}}"><nut-icon wx:if="{{o}}" class="data-v-569e925a" u-i="569e925a-10,569e925a-9" bind:__l="__l" u-p="{{o}}"></nut-icon></nut-grid-item><nut-grid-item wx:if="{{t}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{s}}" u-i="569e925a-11,569e925a-4" bind:__l="__l" u-p="{{t}}"><nut-icon wx:if="{{r}}" class="data-v-569e925a" u-i="569e925a-12,569e925a-11" bind:__l="__l" u-p="{{r}}"></nut-icon></nut-grid-item></nut-grid></nut-cell-group><nut-cell-group wx:if="{{w}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-13" bind:__l="__l" u-p="{{J}}"><nut-grid class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-14,569e925a-13" bind:__l="__l"><nut-grid-item wx:if="{{z}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{y}}" u-i="569e925a-15,569e925a-14" bind:__l="__l" u-p="{{z}}">{{x}}</nut-grid-item><nut-grid-item wx:if="{{C}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{B}}" u-i="569e925a-16,569e925a-14" bind:__l="__l" u-p="{{C}}">{{A}}</nut-grid-item><nut-grid-item wx:if="{{F}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{E}}" u-i="569e925a-17,569e925a-14" bind:__l="__l" u-p="{{F}}">{{D}}</nut-grid-item><nut-grid-item wx:if="{{I}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{H}}" u-i="569e925a-18,569e925a-14" bind:__l="__l" u-p="{{I}}">{{G}}</nut-grid-item></nut-grid></nut-cell-group><nut-cell-group wx:if="{{M}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-19" bind:__l="__l" u-p="{{M}}"><nut-cell wx:if="{{L}}" class="data-v-569e925a" bindclick="{{K}}" u-i="569e925a-20,569e925a-19" bind:__l="__l" u-p="{{L}}"></nut-cell></nut-cell-group></view></view>
|
||||
<view class="page-content data-v-569e925a"><view wx:if="{{a}}" class="user-inner data-v-569e925a"><view class="data-v-569e925a"><nut-avatar wx:if="{{b}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-0" bind:__l="__l" u-p="{{b}}">用户</nut-avatar></view><view class="user-info-style data-v-569e925a"><text class="nickname data-v-569e925a">{{c}}</text><text class="user-id data-v-569e925a">UID:{{d}}</text></view></view><view class="content data-v-569e925a"><nut-cell-group wx:if="{{k}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-1" bind:__l="__l" u-p="{{k}}"><nut-grid class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-2,569e925a-1" bind:__l="__l"><nut-grid-item wx:if="{{g}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{f}}" u-i="569e925a-3,569e925a-2" bind:__l="__l" u-p="{{g}}"><nut-icon wx:if="{{e}}" class="data-v-569e925a" u-i="569e925a-4,569e925a-3" bind:__l="__l" u-p="{{e}}"></nut-icon></nut-grid-item><nut-grid-item wx:if="{{j}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{i}}" u-i="569e925a-5,569e925a-2" bind:__l="__l" u-p="{{j}}"><nut-icon wx:if="{{h}}" class="data-v-569e925a" u-i="569e925a-6,569e925a-5" bind:__l="__l" u-p="{{h}}"></nut-icon></nut-grid-item></nut-grid></nut-cell-group></view></view>
|
||||
@@ -54,12 +54,12 @@
|
||||
}
|
||||
.user-inner.data-v-569e925a {
|
||||
background: linear-gradient(30deg, rgba(198, 77, 255, 0.99), rgba(102, 204, 255, 0.99));
|
||||
height: 150px;
|
||||
width: calc(100% - 20px);
|
||||
height: 300rpx;
|
||||
width: calc(100% - 40rpx);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0px 10px;
|
||||
gap: 15px;
|
||||
padding: 0px 20rpx;
|
||||
gap: 30rpx;
|
||||
}
|
||||
.user-info-style.data-v-569e925a {
|
||||
display: flex;
|
||||
@@ -67,25 +67,17 @@
|
||||
align-items: flex-start;
|
||||
}
|
||||
.nickname.data-v-569e925a {
|
||||
font-size: 20px;
|
||||
/* 大字体 */
|
||||
font-weight: bold;
|
||||
/* 加粗 */
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
/* 深色文字 */
|
||||
margin-bottom: 5px;
|
||||
/* 与UID的间距 */
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.user-id.data-v-569e925a {
|
||||
font-size: 14px;
|
||||
/* 小字体 */
|
||||
font-size: 26rpx;
|
||||
color: #fff;
|
||||
/* 浅色文字 */
|
||||
}
|
||||
.content.data-v-569e925a {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* align-items: center; */
|
||||
background-color: #f2f3f5;
|
||||
padding: 0px 10px;
|
||||
padding: 0px 20rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user