增加新模块
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
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="mine_warp"><view class="mine_header"><view wx:if="{{a}}" class="mine_data"><up-image wx:if="{{b}}" u-i="81c02944-0" bind:__l="__l" u-p="{{b}}"></up-image><view class="mine_info"><view class="mine_info_name"><text style="margin-right:20rpx">{{c}}</text><up-image wx:if="{{d}}" u-i="81c02944-1" bind:__l="__l" u-p="{{d}}"></up-image></view><view class="mine_info_id"><text style="margin-right:20rpx">ID:{{e}}</text><up-image wx:if="{{g}}" bindclick="{{f}}" u-i="81c02944-2" bind:__l="__l" u-p="{{g}}"></up-image></view></view></view><view wx:else class="mine_no_login_data"><view class="mine_data"><up-image wx:if="{{h}}" u-i="81c02944-3" bind:__l="__l" u-p="{{h}}"></up-image><view class="mine_info_not_login"> 未登录 </view></view><view bindtap="{{j}}" class="login_warp"><text style="margin-right:10rpx">立即登录</text><up-image wx:if="{{i}}" u-i="81c02944-4" bind:__l="__l" u-p="{{i}}"></up-image></view></view></view><view class="mine_content_warp"><view class="mine_content_comm_warp"><view class="mine_order_title"><view>我的订单</view><view class="mine_order_title_all" bindtap="{{l}}"><view style="margin-right:10rpx">全部</view><up-image wx:if="{{k}}" u-i="81c02944-5" bind:__l="__l" u-p="{{k}}"></up-image></view></view><view class="mine_order_list"><view wx:for="{{m}}" wx:for-item="item" wx:key="d" class="mine_fontsize_comm_warp order_list_item" bindtap="{{item.e}}"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view>{{item.c}}</view></view></view></view><view class="mine_content_comm_warp mine_top_comm_warp apply_list"><view wx:for="{{n}}" wx:for-item="item" wx:key="d" class="apply_item mine_fontsize_comm_warp" bindtap="{{item.e}}"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view>{{item.c}}</view></view></view><view class="mine_top_comm_warp enter_list"><view class="enter_item"><view><view class="enter_title">商家入驻</view><view class="enter_apply"><text class="enter_apply_title">申请</text><up-image wx:if="{{o}}" u-i="81c02944-8" bind:__l="__l" u-p="{{o}}"></up-image></view></view><up-image wx:if="{{p}}" u-i="81c02944-9" bind:__l="__l" u-p="{{p}}"></up-image></view><view class="enter_item"><view><view class="enter_title">企业/品牌入驻</view><view class="enter_apply"><text class="enter_apply_title">申请</text><up-image wx:if="{{q}}" u-i="81c02944-10" bind:__l="__l" u-p="{{q}}"></up-image></view></view><up-image wx:if="{{r}}" u-i="81c02944-11" bind:__l="__l" u-p="{{r}}"></up-image></view></view><view class="mine_content_comm_warp mine_top_comm_warp mine_tool_warp"><view class="mine_tool_title">服务工具</view><view class="tool_list"><view wx:for="{{s}}" wx:for-item="item" wx:key="d" class="tool_item" bindtap="{{item.e}}"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><text class="mine_fontsize_comm_warp">{{item.c}}</text></view></view></view></view></view>
|
||||
+173
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user