增加新模块
This commit is contained in:
+287
@@ -0,0 +1,287 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const utils_auth = require("../../utils/auth.js");
|
||||
const utils_enumUtils = require("../../utils/enumUtils.js");
|
||||
const utils_index = require("../../utils/index.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
userData: {},
|
||||
// 当前登录对象
|
||||
orderTemplList: [
|
||||
{
|
||||
id: utils_enumUtils.ORDER_TYPE.UNPAID,
|
||||
title: "待支付",
|
||||
url: "/static/mine/order_unpaid.png",
|
||||
path: "/pages/mine_order/mine_order"
|
||||
},
|
||||
{
|
||||
id: utils_enumUtils.ORDER_TYPE.UNSHIPPED,
|
||||
title: "待发货",
|
||||
url: "/static/mine/order_unshipped.png",
|
||||
path: "/pages/mine_order/mine_order"
|
||||
},
|
||||
{
|
||||
id: utils_enumUtils.ORDER_TYPE.NOT_RECEIVE,
|
||||
title: "待收货",
|
||||
url: "/static/mine/order_notReceive.png",
|
||||
path: "/pages/mine_order/mine_order"
|
||||
},
|
||||
{
|
||||
id: utils_enumUtils.ORDER_TYPE.AFTER_SALE,
|
||||
title: "退款售后",
|
||||
url: "/static/mine/order_afterSale.png",
|
||||
path: "/pages/mine_order/mine_order"
|
||||
}
|
||||
],
|
||||
applyList: [
|
||||
{
|
||||
id: 1,
|
||||
title: "钱包",
|
||||
url: "/static/mine/apply_purse.png",
|
||||
path: "/pages/mine_purse/mine_purse"
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: "抽奖",
|
||||
url: "/static/mine/apply_prize.png",
|
||||
path: "/pages/turntable/turntable"
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: "HM",
|
||||
url: "/static/mine/apply_hm.png"
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: "贡献值",
|
||||
url: "/static/mine/apply_gx.png"
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: "数据",
|
||||
url: "/static/mine/apply_sj.png"
|
||||
}
|
||||
],
|
||||
// 应用模版
|
||||
toolList: [
|
||||
{
|
||||
id: 1,
|
||||
title: "IM聊天",
|
||||
url: "/static/mine/tool_im.png"
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: "我的团队",
|
||||
url: "/static/mine/tool_team.png"
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: "邀请好友",
|
||||
url: "/static/mine/tool_invite.png",
|
||||
path: "/pages/invite_friends/invite_friends"
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: "加速次数",
|
||||
url: "/static/mine/tool_js.png"
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: "地址管理",
|
||||
url: "/static/mine/tool_dz.png",
|
||||
path: "/pages/mine_address/mine_address"
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
title: "卡券",
|
||||
url: "/static/mine/tool_kj.png"
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
title: "联系客服",
|
||||
url: "/static/mine/tool_kf.png"
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
title: "商学院资讯",
|
||||
url: "/static/mine/tool_sxy.png"
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
title: "实名认证",
|
||||
url: "/static/mine/tool_sm.png",
|
||||
path: "/pages/mine_authentication/mine_authentication"
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
title: "银行卡管理",
|
||||
url: "/static/mine/tool_card.png",
|
||||
path: "/pages/mine_bank_card/mine_bank_card"
|
||||
}
|
||||
]
|
||||
// 工具
|
||||
};
|
||||
},
|
||||
onShow: function() {
|
||||
this.userData = utils_auth.getStorageFun(utils_auth.USER_DATA);
|
||||
},
|
||||
methods: {
|
||||
copyData: utils_index.copyData,
|
||||
/**
|
||||
* 跳转到工具
|
||||
* @param {Object} item
|
||||
*/
|
||||
jumpTool(item) {
|
||||
if (item.path) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: item.path
|
||||
});
|
||||
}
|
||||
},
|
||||
jumpOrder(item) {
|
||||
let path = "/pages/mine_order/mine_order";
|
||||
if (item && Object.keys(item).length !== 0) {
|
||||
path = "/pages/mine_order/mine_order?type=" + item.id;
|
||||
} else {
|
||||
path = "/pages/mine_order/mine_order?type=0";
|
||||
}
|
||||
common_vendor.index.navigateTo({
|
||||
url: path
|
||||
});
|
||||
},
|
||||
jumpLogin() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
||||
_easycom_up_image2();
|
||||
}
|
||||
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
||||
if (!Math) {
|
||||
_easycom_up_image();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $data.userData && Object.keys($data.userData).length !== 0
|
||||
}, $data.userData && Object.keys($data.userData).length !== 0 ? {
|
||||
b: common_vendor.p({
|
||||
src: "/static/mine/avatar.png",
|
||||
shape: "circle",
|
||||
width: "80",
|
||||
height: "80",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t($data.userData.name || "暂无昵称"),
|
||||
d: common_vendor.p({
|
||||
src: "/static/mine/lv01.png",
|
||||
width: "10",
|
||||
height: "18",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
e: common_vendor.t($data.userData.userId),
|
||||
f: common_vendor.o(($event) => $options.copyData($data.userData.userId)),
|
||||
g: common_vendor.p({
|
||||
src: "/static/common/copy.png",
|
||||
width: "14",
|
||||
height: "14",
|
||||
bgColor: "#f1f6ff00"
|
||||
})
|
||||
} : {
|
||||
h: common_vendor.p({
|
||||
src: "/static/mine/avater_not.png",
|
||||
shape: "circle",
|
||||
width: "80",
|
||||
height: "80",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
i: common_vendor.p({
|
||||
src: "/static/common/right_y_st.png",
|
||||
width: "18",
|
||||
height: "18",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
j: common_vendor.o((...args) => $options.jumpLogin && $options.jumpLogin(...args))
|
||||
}, {
|
||||
k: common_vendor.p({
|
||||
src: "/static/common/right.png",
|
||||
width: "14",
|
||||
height: "14",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
l: common_vendor.o(($event) => $options.jumpOrder({})),
|
||||
m: common_vendor.f($data.orderTemplList, (item, k0, i0) => {
|
||||
return {
|
||||
a: "81c02944-6-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.url,
|
||||
width: "30",
|
||||
height: "30",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t(item.title),
|
||||
d: item.id,
|
||||
e: common_vendor.o(($event) => $options.jumpOrder(item), item.id)
|
||||
};
|
||||
}),
|
||||
n: common_vendor.f($data.applyList, (item, k0, i0) => {
|
||||
return {
|
||||
a: "81c02944-7-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.url,
|
||||
width: "36",
|
||||
height: "36",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t(item.title),
|
||||
d: item.id,
|
||||
e: common_vendor.o(($event) => $options.jumpTool(item), item.id)
|
||||
};
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
src: "/static/common/right_y.png",
|
||||
width: "14",
|
||||
height: "14",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
src: "/static/mine/enter_sj.png",
|
||||
width: "50",
|
||||
height: "50",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
q: common_vendor.p({
|
||||
src: "/static/common/right_y.png",
|
||||
width: "14",
|
||||
height: "14",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
src: "/static/mine/enter_pp.png",
|
||||
width: "50",
|
||||
height: "50",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
s: common_vendor.f($data.toolList, (item, k0, i0) => {
|
||||
return {
|
||||
a: "81c02944-12-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.url,
|
||||
width: "30",
|
||||
height: "30",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t(item.title),
|
||||
d: item.id,
|
||||
e: common_vendor.o(($event) => $options.jumpTool(item), item.id)
|
||||
};
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine/mine.js.map
|
||||
Reference in New Issue
Block a user