9.20/1
This commit is contained in:
27
frontend/unpackage/dist/dev/mp-weixin/pages/my/about.js
vendored
Normal file
27
frontend/unpackage/dist/dev/mp-weixin/pages/my/about.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
methods: {
|
||||
openPolicy() {
|
||||
common_vendor.index.showModal({ title: "隐私协议", content: "隐私协议(静态占位)", showCancel: false });
|
||||
},
|
||||
openTerms() {
|
||||
common_vendor.index.showModal({ title: "用户协议", content: "用户协议(静态占位)", showCancel: false });
|
||||
},
|
||||
openComplaint() {
|
||||
common_vendor.index.showToast({ title: "暂未开通", icon: "none" });
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_assets._imports_0$1,
|
||||
b: common_vendor.o((...args) => $options.openPolicy && $options.openPolicy(...args)),
|
||||
c: common_vendor.o((...args) => $options.openTerms && $options.openTerms(...args)),
|
||||
d: common_vendor.o((...args) => $options.openComplaint && $options.openComplaint(...args))
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/about.js.map
|
||||
4
frontend/unpackage/dist/dev/mp-weixin/pages/my/about.json
vendored
Normal file
4
frontend/unpackage/dist/dev/mp-weixin/pages/my/about.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "关于与协议",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
frontend/unpackage/dist/dev/mp-weixin/pages/my/about.wxml
vendored
Normal file
1
frontend/unpackage/dist/dev/mp-weixin/pages/my/about.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="about"><view class="hero"><image class="logo" src="{{a}}" mode="aspectFit"/><text class="title">五金配件管家</text><text class="subtitle">专注小微门店的极简进销存</text></view><view class="card"><view class="row"><text class="label">版本</text><text class="value">1.0.0</text></view><view class="row"><text class="label">隐私协议</text><text class="link" bindtap="{{b}}">查看</text></view><view class="row"><text class="label">用户协议</text><text class="link" bindtap="{{c}}">查看</text></view><view class="row"><text class="label">个人信息安全投诉</text><text class="link" bindtap="{{d}}">提交</text></view></view></view>
|
||||
21
frontend/unpackage/dist/dev/mp-weixin/pages/my/about.wxss
vendored
Normal file
21
frontend/unpackage/dist/dev/mp-weixin/pages/my/about.wxss
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
.about { padding: 24rpx;
|
||||
}
|
||||
.hero { padding: 32rpx 24rpx; display: flex; flex-direction: column; align-items: center; gap: 10rpx;
|
||||
}
|
||||
.logo { width: 160rpx; height: 160rpx; border-radius: 32rpx;
|
||||
}
|
||||
.title { margin-top: 8rpx; font-size: 36rpx; font-weight: 800; color: #333;
|
||||
}
|
||||
.subtitle { font-size: 26rpx; color: #888;
|
||||
}
|
||||
.card { margin-top: 18rpx; background: #fff; border-radius: 16rpx; overflow: hidden;
|
||||
}
|
||||
.row { display: flex; align-items: center; padding: 24rpx; border-top: 1rpx solid #f2f2f2;
|
||||
}
|
||||
.label { color: #666;
|
||||
}
|
||||
.value { margin-left: auto; color: #333;
|
||||
}
|
||||
.link { margin-left: auto; color: #1aad19;
|
||||
}
|
||||
110
frontend/unpackage/dist/dev/mp-weixin/pages/my/index.js
vendored
Normal file
110
frontend/unpackage/dist/dev/mp-weixin/pages/my/index.js
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_http = require("../../common/http.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
avatarUrl: "/static/logo.png",
|
||||
shopName: "我的店铺",
|
||||
mobile: ""
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.fetchProfile();
|
||||
},
|
||||
computed: {
|
||||
mobileDisplay() {
|
||||
const m = String(this.mobile || "");
|
||||
return m.length === 11 ? m.slice(0, 3) + "****" + m.slice(7) : m || "未绑定手机号";
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async fetchProfile() {
|
||||
try {
|
||||
await common_http.get("/api/dashboard/overview");
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
const storeName = common_vendor.index.getStorageSync("SHOP_NAME") || "";
|
||||
const avatar = common_vendor.index.getStorageSync("USER_AVATAR") || "";
|
||||
const phone = common_vendor.index.getStorageSync("USER_MOBILE") || "";
|
||||
if (storeName)
|
||||
this.shopName = storeName;
|
||||
if (avatar)
|
||||
this.avatarUrl = avatar;
|
||||
this.mobile = phone;
|
||||
} catch (e) {
|
||||
}
|
||||
},
|
||||
onAvatarError() {
|
||||
this.avatarUrl = "/static/logo.png";
|
||||
},
|
||||
goVip() {
|
||||
common_vendor.index.showToast({ title: "VIP会员(开发中)", icon: "none" });
|
||||
},
|
||||
goMyOrders() {
|
||||
common_vendor.index.navigateTo({ url: "/pages/detail/index" });
|
||||
},
|
||||
goSupplier() {
|
||||
common_vendor.index.navigateTo({ url: "/pages/supplier/select" });
|
||||
},
|
||||
goCustomer() {
|
||||
common_vendor.index.navigateTo({ url: "/pages/customer/select" });
|
||||
},
|
||||
goCustomerQuote() {
|
||||
common_vendor.index.showToast({ title: "客户报价(开发中)", icon: "none" });
|
||||
},
|
||||
goShop() {
|
||||
common_vendor.index.showToast({ title: "店铺管理(开发中)", icon: "none" });
|
||||
},
|
||||
editProfile() {
|
||||
common_vendor.index.showToast({ title: "账号与安全(开发中)", icon: "none" });
|
||||
},
|
||||
goProductSettings() {
|
||||
common_vendor.index.navigateTo({ url: "/pages/product/settings" });
|
||||
},
|
||||
goSystemParams() {
|
||||
common_vendor.index.showToast({ title: "系统参数(开发中)", icon: "none" });
|
||||
},
|
||||
goAbout() {
|
||||
common_vendor.index.navigateTo({ url: "/pages/my/about" });
|
||||
},
|
||||
logout() {
|
||||
try {
|
||||
common_vendor.index.removeStorageSync("TOKEN");
|
||||
common_vendor.index.removeStorageSync("USER_AVATAR");
|
||||
common_vendor.index.removeStorageSync("USER_NAME");
|
||||
common_vendor.index.removeStorageSync("USER_MOBILE");
|
||||
common_vendor.index.removeStorageSync("SHOP_NAME");
|
||||
common_vendor.index.showToast({ title: "已退出", icon: "none" });
|
||||
setTimeout(() => {
|
||||
common_vendor.index.reLaunch({ url: "/pages/index/index" });
|
||||
}, 300);
|
||||
} catch (e) {
|
||||
common_vendor.index.reLaunch({ url: "/pages/index/index" });
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: $data.avatarUrl,
|
||||
b: common_vendor.o((...args) => $options.onAvatarError && $options.onAvatarError(...args)),
|
||||
c: common_vendor.t($data.shopName),
|
||||
d: common_vendor.t($options.mobileDisplay),
|
||||
e: common_vendor.o((...args) => $options.goVip && $options.goVip(...args)),
|
||||
f: common_vendor.o((...args) => $options.goMyOrders && $options.goMyOrders(...args)),
|
||||
g: common_vendor.o((...args) => $options.goSupplier && $options.goSupplier(...args)),
|
||||
h: common_vendor.o((...args) => $options.goCustomer && $options.goCustomer(...args)),
|
||||
i: common_vendor.o((...args) => $options.goCustomerQuote && $options.goCustomerQuote(...args)),
|
||||
j: common_vendor.o((...args) => $options.goShop && $options.goShop(...args)),
|
||||
k: common_vendor.o((...args) => $options.editProfile && $options.editProfile(...args)),
|
||||
l: common_vendor.o((...args) => $options.goProductSettings && $options.goProductSettings(...args)),
|
||||
m: common_vendor.o((...args) => $options.goSystemParams && $options.goSystemParams(...args)),
|
||||
n: common_vendor.o((...args) => $options.goAbout && $options.goAbout(...args)),
|
||||
o: common_vendor.o((...args) => $options.logout && $options.logout(...args))
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/index.js.map
|
||||
4
frontend/unpackage/dist/dev/mp-weixin/pages/my/index.json
vendored
Normal file
4
frontend/unpackage/dist/dev/mp-weixin/pages/my/index.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
frontend/unpackage/dist/dev/mp-weixin/pages/my/index.wxml
vendored
Normal file
1
frontend/unpackage/dist/dev/mp-weixin/pages/my/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="me"><view class="card user"><image class="avatar" src="{{a}}" mode="aspectFill" binderror="{{b}}"/><view class="meta"><text class="name">{{c}}</text><text class="phone">{{d}}</text><text class="role">老板</text></view></view><view class="group"><view class="group-title">会员与订单</view><view class="cell" bindtap="{{e}}"><text>VIP会员</text><text class="arrow">›</text></view><view class="cell" bindtap="{{f}}"><text>我的订单</text><text class="arrow">›</text></view></view><view class="group"><view class="group-title">基础管理</view><view class="cell" bindtap="{{g}}"><text>供应商管理</text><text class="arrow">›</text></view><view class="cell" bindtap="{{h}}"><text>客户管理</text><text class="arrow">›</text></view><view class="cell" bindtap="{{i}}"><text>客户报价</text><text class="arrow">›</text></view><view class="cell" bindtap="{{j}}"><text>店铺管理</text><text class="arrow">›</text></view></view><view class="group"><view class="group-title">设置中心</view><view class="cell" bindtap="{{k}}"><text>账号与安全</text><text class="desc">修改头像、姓名、密码</text><text class="arrow">›</text></view><view class="cell" bindtap="{{l}}"><text>商品设置</text><text class="arrow">›</text></view><view class="cell" bindtap="{{m}}"><text>系统参数</text><text class="desc">低价提示、默认收款、单行折扣等</text><text class="arrow">›</text></view><view class="cell" bindtap="{{n}}"><text>关于与协议</text><text class="arrow">›</text></view><view class="cell danger" bindtap="{{o}}"><text>退出登录</text></view></view></view>
|
||||
27
frontend/unpackage/dist/dev/mp-weixin/pages/my/index.wxss
vendored
Normal file
27
frontend/unpackage/dist/dev/mp-weixin/pages/my/index.wxss
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
.me { padding: 24rpx;
|
||||
}
|
||||
.card.user { display: flex; gap: 18rpx; padding: 22rpx; background: #fff; border-radius: 16rpx; box-shadow: 0 6rpx 16rpx rgba(0,0,0,0.06); align-items: center;
|
||||
}
|
||||
.avatar { width: 120rpx; height: 120rpx; border-radius: 60rpx; background: #f5f5f5;
|
||||
}
|
||||
.meta { display: flex; flex-direction: column; gap: 6rpx;
|
||||
}
|
||||
.name { font-size: 34rpx; font-weight: 700; color: #333;
|
||||
}
|
||||
.phone { font-size: 26rpx; color: #888;
|
||||
}
|
||||
.role { font-size: 22rpx; color: #999;
|
||||
}
|
||||
.group { margin-top: 24rpx; background: #fff; border-radius: 16rpx; overflow: hidden;
|
||||
}
|
||||
.group-title { padding: 18rpx 22rpx; font-size: 26rpx; color: #999; background: #fafafa;
|
||||
}
|
||||
.cell { display: flex; align-items: center; padding: 26rpx 22rpx; border-top: 1rpx solid #f0f0f0; color: #333;
|
||||
}
|
||||
.cell .desc { margin-left: auto; margin-right: 8rpx; font-size: 22rpx; color: #999;
|
||||
}
|
||||
.cell .arrow { margin-left: auto; color: #bbb;
|
||||
}
|
||||
.cell.danger { color: #dd524d; justify-content: center; font-weight: 700;
|
||||
}
|
||||
Reference in New Issue
Block a user