purchase-let/unpackage/dist/dev/mp-weixin/pages/my/my.js

95 lines
3.4 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const store_user = require("../../store/user.js");
const api_order = require("../../api/order.js");
require("../../utils/request.js");
require("../../config/app.js");
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");
(_easycom_up_navbar2 + _easycom_up_avatar2 + _easycom_up_cell2 + _easycom_up_cell_group2)();
}
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) {
(_easycom_up_navbar + _easycom_up_avatar + _easycom_up_cell + _easycom_up_cell_group)();
}
const _sfc_main = {
__name: "my",
setup(__props) {
const userStore = store_user.useUserStore();
const userInfo = userStore.userInfo;
const orderCount = common_vendor.ref({
no_pay: 0,
receiving: 0,
waiting: 0
});
const getOrderCount = () => {
api_order.orderCountApi().then((res) => {
orderCount.value = res.data;
});
};
getOrderCount();
const navTo = (type = 0) => {
common_vendor.index.navigateTo({
url: `/pagesOrder/order/order?type=${type}`
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
title: "我的",
bgColor: "rgba(0,0,0,0)",
autoBack: true
}),
b: common_vendor.p({
src: common_vendor.unref(userInfo).avatar,
size: "80"
}),
c: common_vendor.t(common_vendor.unref(userInfo).nickname),
d: common_vendor.t(common_vendor.unref(userInfo).id),
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({
title: "我的地址",
isLink: true,
url: "/pagesOrder/addressList/addressList"
}),
p: common_vendor.p({
title: "意见反馈",
isLink: true
}),
q: common_vendor.p({
title: "关于我们",
isLink: true
}),
r: common_vendor.p({
title: "退出登录",
isLink: true,
url: "/pages/login/login"
})
});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/里海数字乡村/purchase-let/pages/my/my.vue"]]);
wx.createPage(MiniProgramPage);