init
This commit is contained in:
165
unpackage/dist/dev/mp-weixin/pages/mine/index.js
vendored
Normal file
165
unpackage/dist/dev/mp-weixin/pages/mine/index.js
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
"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)();
|
||||
}
|
||||
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)();
|
||||
}
|
||||
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
|
||||
});
|
||||
common_vendor.onLoad((options) => {
|
||||
});
|
||||
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;
|
||||
});
|
||||
};
|
||||
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);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: uid.value > 0
|
||||
}, uid.value > 0 ? {
|
||||
b: common_vendor.p({
|
||||
size: "large"
|
||||
}),
|
||||
c: common_vendor.t(userInfo.nickName),
|
||||
d: common_vendor.t(userInfo.user_id)
|
||||
} : {
|
||||
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: "店铺订单"
|
||||
}),
|
||||
v: common_vendor.p({
|
||||
title: "店铺管理"
|
||||
}),
|
||||
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: "全部"
|
||||
}),
|
||||
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: "联系我们"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-569e925a"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine/index.js.map
|
||||
11
unpackage/dist/dev/mp-weixin/pages/mine/index.json
vendored
Normal file
11
unpackage/dist/dev/mp-weixin/pages/mine/index.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/mine/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/mine/index.wxml
vendored
Normal file
@@ -0,0 +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>
|
||||
91
unpackage/dist/dev/mp-weixin/pages/mine/index.wxss
vendored
Normal file
91
unpackage/dist/dev/mp-weixin/pages/mine/index.wxss
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-569e925a {
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
}
|
||||
.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);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0px 10px;
|
||||
gap: 15px;
|
||||
}
|
||||
.user-info-style.data-v-569e925a {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.nickname.data-v-569e925a {
|
||||
font-size: 20px;
|
||||
/* 大字体 */
|
||||
font-weight: bold;
|
||||
/* 加粗 */
|
||||
color: #333;
|
||||
/* 深色文字 */
|
||||
margin-bottom: 5px;
|
||||
/* 与UID的间距 */
|
||||
}
|
||||
.user-id.data-v-569e925a {
|
||||
font-size: 14px;
|
||||
/* 小字体 */
|
||||
color: #fff;
|
||||
/* 浅色文字 */
|
||||
}
|
||||
.content.data-v-569e925a {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* align-items: center; */
|
||||
background-color: #f2f3f5;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
Reference in New Issue
Block a user