95 lines
3.4 KiB
JavaScript
Raw Normal View History

2024-04-25 18:02:30 +08:00
"use strict";
const common_vendor = require("../../common/vendor.js");
2024-04-30 18:08:36 +08:00
const store_user = require("../../store/user.js");
2024-05-06 15:32:45 +08:00
const api_order = require("../../api/order.js");
require("../../utils/request.js");
require("../../config/app.js");
2024-04-25 18:02:30 +08:00
if (!Array) {
const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar");
const _easycom_up_avatar2 = common_vendor.resolveComponent("up-avatar");
const _easycom_up_cell2 = common_vendor.resolveComponent("up-cell");
const _easycom_up_cell_group2 = common_vendor.resolveComponent("up-cell-group");
2024-04-26 18:04:56 +08:00
(_easycom_up_navbar2 + _easycom_up_avatar2 + _easycom_up_cell2 + _easycom_up_cell_group2)();
2024-04-25 18:02:30 +08:00
}
const _easycom_up_navbar = () => "../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
const _easycom_up_avatar = () => "../../uni_modules/uview-plus/components/u-avatar/u-avatar.js";
const _easycom_up_cell = () => "../../uni_modules/uview-plus/components/u-cell/u-cell.js";
const _easycom_up_cell_group = () => "../../uni_modules/uview-plus/components/u-cell-group/u-cell-group.js";
if (!Math) {
2024-04-26 18:04:56 +08:00
(_easycom_up_navbar + _easycom_up_avatar + _easycom_up_cell + _easycom_up_cell_group)();
2024-04-25 18:02:30 +08:00
}
const _sfc_main = {
__name: "my",
setup(__props) {
2024-04-30 18:08:36 +08:00
const userStore = store_user.useUserStore();
const userInfo = userStore.userInfo;
2024-05-06 15:32:45 +08:00
const orderCount = common_vendor.ref({
no_pay: 0,
receiving: 0,
waiting: 0
});
const getOrderCount = () => {
api_order.orderCountApi().then((res) => {
orderCount.value = res.data;
});
};
getOrderCount();
2024-04-26 18:04:56 +08:00
const navTo = (type = 0) => {
common_vendor.index.navigateTo({
url: `/pagesOrder/order/order?type=${type}`
});
};
2024-04-25 18:02:30 +08:00
return (_ctx, _cache) => {
2024-05-06 15:32:45 +08:00
return common_vendor.e({
2024-04-25 18:02:30 +08:00
a: common_vendor.p({
2024-04-26 18:04:56 +08:00
title: "我的",
2024-04-29 10:44:50 +08:00
bgColor: "rgba(0,0,0,0)",
autoBack: true
2024-04-25 18:02:30 +08:00
}),
b: common_vendor.p({
2024-04-30 18:08:36 +08:00
src: common_vendor.unref(userInfo).avatar,
2024-04-26 18:04:56 +08:00
size: "80"
2024-04-25 18:02:30 +08:00
}),
2024-04-30 18:08:36 +08:00
c: common_vendor.t(common_vendor.unref(userInfo).nickname),
d: common_vendor.t(common_vendor.unref(userInfo).id),
2024-05-06 15:32:45 +08:00
e: orderCount.value.no_pay
}, orderCount.value.no_pay ? {
f: common_vendor.t(orderCount.value.no_pay)
} : {}, {
g: common_vendor.o(($event) => navTo(1)),
h: orderCount.value.waiting
}, orderCount.value.waiting ? {
i: common_vendor.t(orderCount.value.waiting)
} : {}, {
j: common_vendor.o(($event) => navTo(2)),
k: orderCount.value.receiving
}, orderCount.value.receiving ? {
l: common_vendor.t(orderCount.value.receiving)
} : {}, {
m: common_vendor.o(($event) => navTo(3)),
n: common_vendor.o(($event) => navTo()),
o: common_vendor.p({
2024-04-26 18:04:56 +08:00
title: "我的地址",
2024-04-27 18:02:43 +08:00
isLink: true,
url: "/pagesOrder/addressList/addressList"
2024-04-25 18:02:30 +08:00
}),
2024-05-06 15:32:45 +08:00
p: common_vendor.p({
2024-04-26 18:04:56 +08:00
title: "意见反馈",
isLink: true
2024-04-25 18:02:30 +08:00
}),
2024-05-06 15:32:45 +08:00
q: common_vendor.p({
2024-04-26 18:04:56 +08:00
title: "关于我们",
isLink: true
2024-04-25 18:02:30 +08:00
}),
2024-05-06 15:32:45 +08:00
r: common_vendor.p({
2024-04-28 18:08:57 +08:00
title: "退出登录",
2024-04-27 18:02:43 +08:00
isLink: true,
url: "/pages/login/login"
2024-04-25 18:02:30 +08:00
})
2024-05-06 15:32:45 +08:00
});
2024-04-25 18:02:30 +08:00
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/里海数字乡村/purchase-let/pages/my/my.vue"]]);
wx.createPage(MiniProgramPage);