feat:初始化
This commit is contained in:
parent
aa26889f03
commit
4ab85b16d7
6
dist/dev/mp-weixin/app.json
vendored
6
dist/dev/mp-weixin/app.json
vendored
@ -7,12 +7,12 @@
|
||||
],
|
||||
"subPackages": [],
|
||||
"window": {
|
||||
"navigationBarBackgroundColor": "#3da605",
|
||||
"navigationBarTextStyle": "white"
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTextStyle": "black"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#000000",
|
||||
"selectedColor": "#3DA605",
|
||||
"selectedColor": "#0082FA",
|
||||
"backgroundColor": "#ffffff",
|
||||
"borderStyle": "black",
|
||||
"list": [
|
||||
|
||||
@ -2,24 +2,29 @@
|
||||
const common_vendor = require("../vendor.js");
|
||||
const gen_Apis = require("../../gen/Apis.js");
|
||||
const common_libraries_apiLoading = require("../libraries/apiLoading.js");
|
||||
const wxworkId = "ww8e14f3d20774c997";
|
||||
const wxAppId = "wx2d8208625006f74e";
|
||||
const useWeAppAuthStore = common_vendor.defineStore("we_app_auth", () => {
|
||||
const loading = common_vendor.ref(true);
|
||||
const hasError = common_vendor.ref(false);
|
||||
const data = common_vendor.ref({
|
||||
user: { id: 0, username: "" }
|
||||
user: { id: 0, username: "" },
|
||||
work_info: { session_key: "", openid: "" },
|
||||
environment: ""
|
||||
});
|
||||
function login(app) {
|
||||
var _a, _b, _c;
|
||||
const res = common_vendor.index.getSystemInfoSync();
|
||||
data.value.environment = res == null ? void 0 : res.environment;
|
||||
console.log(res == null ? void 0 : res.environment, "res?.environment");
|
||||
if ((res == null ? void 0 : res.environment) === "wxwork") {
|
||||
(_b = (_a = common_vendor.index) == null ? void 0 : _a.qy) == null ? void 0 : _b.login({
|
||||
success: function(loginRes) {
|
||||
console.log(loginRes);
|
||||
getWorkToken(app, loginRes.code);
|
||||
common_vendor.index.qy.login({
|
||||
success: function(res2) {
|
||||
console.log(res2);
|
||||
getWorkToken(app, res2.code);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
(_c = common_vendor.index) == null ? void 0 : _c.login({
|
||||
common_vendor.index.login({
|
||||
provider: "weixin",
|
||||
//使用微信登录
|
||||
success: function(loginRes) {
|
||||
@ -30,17 +35,15 @@ const useWeAppAuthStore = common_vendor.defineStore("we_app_auth", () => {
|
||||
}
|
||||
}
|
||||
const getWorkToken = (app, code) => {
|
||||
gen_Apis.Apis.Login.Auth.WorkLogin({ code, app_id: "ww8e14f3d20774c997" }).then((res) => {
|
||||
var _a, _b, _c, _d;
|
||||
gen_Apis.Apis.Login.Auth.WorkLogin({ code, app_id: wxworkId }).then((res) => {
|
||||
var _a, _b, _c, _d, _e;
|
||||
console.log("登录", res == null ? void 0 : res.data);
|
||||
data.value.user = (_a = res.data) == null ? void 0 : _a.user;
|
||||
data.value.work_info = (_b = res.data) == null ? void 0 : _b.work_info;
|
||||
loading.value = false;
|
||||
common_vendor.index.setStorageSync("ACCESS_TOKEN_CUSTOMER", (_c = (_b = res == null ? void 0 : res.data) == null ? void 0 : _b.token) == null ? void 0 : _c.token);
|
||||
common_vendor.index.setStorageSync("ACCESS_TOKEN_CUSTOMER", (_d = (_c = res == null ? void 0 : res.data) == null ? void 0 : _c.token) == null ? void 0 : _d.token);
|
||||
app == null ? void 0 : app.appContext.config.globalProperties.$isResolve();
|
||||
if (!((_d = res.data) == null ? void 0 : _d.user)) {
|
||||
common_vendor.index.redirectTo({
|
||||
url: "/pages/login"
|
||||
});
|
||||
if (!((_e = res.data) == null ? void 0 : _e.user)) {
|
||||
return false;
|
||||
}
|
||||
}).catch(() => {
|
||||
@ -49,7 +52,7 @@ const useWeAppAuthStore = common_vendor.defineStore("we_app_auth", () => {
|
||||
});
|
||||
};
|
||||
const getWXToken = (app, code) => {
|
||||
gen_Apis.Apis.Login.Auth.Login({ code, app_id: "wx09b52ea34b5e8855" }).then((res) => {
|
||||
gen_Apis.Apis.Login.Auth.Login({ code, app_id: wxAppId }).then((res) => {
|
||||
var _a, _b, _c, _d;
|
||||
console.log("登录", res == null ? void 0 : res.data);
|
||||
data.value.user = (_a = res.data) == null ? void 0 : _a.user;
|
||||
@ -57,9 +60,6 @@ const useWeAppAuthStore = common_vendor.defineStore("we_app_auth", () => {
|
||||
common_vendor.index.setStorageSync("ACCESS_TOKEN_CUSTOMER", (_c = (_b = res == null ? void 0 : res.data) == null ? void 0 : _b.token) == null ? void 0 : _c.token);
|
||||
app == null ? void 0 : app.appContext.config.globalProperties.$isResolve();
|
||||
if (!((_d = res.data) == null ? void 0 : _d.user)) {
|
||||
common_vendor.index.redirectTo({
|
||||
url: "/pages/login"
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}).catch(() => {
|
||||
@ -75,12 +75,25 @@ const useWeAppAuthStore = common_vendor.defineStore("we_app_auth", () => {
|
||||
hasError.value = false;
|
||||
});
|
||||
}
|
||||
const handleUserLoginWxwork = async (from_data) => {
|
||||
var _a, _b;
|
||||
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Login.Auth.BindWork, {
|
||||
app_id: wxAppId,
|
||||
session_key: (_b = (_a = data == null ? void 0 : data.value) == null ? void 0 : _a.work_info) == null ? void 0 : _b.session_key,
|
||||
iv: from_data == null ? void 0 : from_data.iv,
|
||||
encrypted_data: from_data == null ? void 0 : from_data.encryptedData
|
||||
}).then((res) => {
|
||||
me();
|
||||
common_vendor.index.navigateBack({ delta: 1 });
|
||||
});
|
||||
};
|
||||
const handleUserLogin = async (from_data) => {
|
||||
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Login.Auth.BindPhoneNumber, {
|
||||
app_id: "wx09b52ea34b5e8855",
|
||||
app_id: wxAppId,
|
||||
...from_data
|
||||
}).then((res) => {
|
||||
me();
|
||||
common_vendor.index.navigateBack({ delta: 1 });
|
||||
});
|
||||
};
|
||||
return {
|
||||
@ -89,7 +102,8 @@ const useWeAppAuthStore = common_vendor.defineStore("we_app_auth", () => {
|
||||
data,
|
||||
login,
|
||||
me,
|
||||
handleUserLogin
|
||||
handleUserLogin,
|
||||
handleUserLoginWxwork
|
||||
};
|
||||
});
|
||||
exports.useWeAppAuthStore = useWeAppAuthStore;
|
||||
|
||||
1
dist/dev/mp-weixin/common/vendor.js
vendored
1
dist/dev/mp-weixin/common/vendor.js
vendored
@ -12762,7 +12762,6 @@ exports.o = o;
|
||||
exports.onHide = onHide;
|
||||
exports.onLaunch = onLaunch;
|
||||
exports.onLoad = onLoad;
|
||||
exports.onMounted = onMounted;
|
||||
exports.onShareAppMessage = onShareAppMessage;
|
||||
exports.onShareTimeline = onShareTimeline;
|
||||
exports.onShow = onShow;
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
<view style="{{'background:' + e + ';' + ('background-size:' + '100% 100%') + ';' + f}}" class="card_content" bindtap="{{g}}"><view wx:if="{{a}}" class="card_header" style="{{'border-bottom:' + c}}"><view class="title">{{b}}</view><view class="right_value"><slot name="right_value"></slot></view></view><view wx:if="{{d}}" class="card_body"><slot></slot></view></view>
|
||||
@ -1,31 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "hs-custom-title",
|
||||
props: ["title", "objStyle"],
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const titleValue = common_vendor.ref("标题");
|
||||
const capsuleRect = common_vendor.ref({});
|
||||
common_vendor.watch(
|
||||
() => props.title,
|
||||
(newVal) => {
|
||||
titleValue.value = newVal;
|
||||
console.log(newVal, "title");
|
||||
}
|
||||
);
|
||||
common_vendor.onMounted(() => {
|
||||
titleValue.value = props.title;
|
||||
capsuleRect.value = common_vendor.index.getMenuButtonBoundingClientRect();
|
||||
console.log(capsuleRect.value, "capsuleRect");
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.t(titleValue.value || "标题"),
|
||||
b: common_vendor.s(`padding-top:${capsuleRect.value.top}px;height:${capsuleRect.value.height}px;line-height:${capsuleRect.value.height}px;${props == null ? void 0 : props.objStyle}`)
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-4e15f08c"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/components/hs-custom-title/hs-custom-title.vue"]]);
|
||||
wx.createComponent(Component);
|
||||
@ -1,4 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
<view class="custom-title data-v-4e15f08c" style="{{b}}">{{a}}</view>
|
||||
@ -1,6 +0,0 @@
|
||||
.custom-title.data-v-4e15f08c {
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
<picker class="data-v-7a35584e" mode="date" bindchange="{{d}}"><view class="nchl_day_picker data-v-7a35584e"><text class="data-v-7a35584e">{{a}}</text><uni-icons wx:if="{{b}}" class="data-v-7a35584e" u-i="7a35584e-0" bind:__l="__l" u-p="{{c}}"></uni-icons></view></picker>
|
||||
@ -1,4 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
<view class="day_select data-v-b04b217e"><view wx:for="{{a}}" wx:for-item="i" wx:key="b" class="{{['data-v-b04b217e', i.c]}}" bindtap="{{i.d}}">{{i.a}}</view></view>
|
||||
@ -1,8 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"hs-day-picker": "../../../components/hs-day-picker/hs-day-picker",
|
||||
"hs-card": "../../../components/hs-card/hs-card",
|
||||
"my-day-select": "./daySelect"
|
||||
}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
<hs-card class="data-v-a9a28d4d" u-s="{{['d']}}" u-i="a9a28d4d-0" bind:__l="__l"><view class="data-v-a9a28d4d"><view class="data_header data-v-a9a28d4d"><my-day-select wx:if="{{b}}" class="data-v-a9a28d4d" u-i="a9a28d4d-1,a9a28d4d-0" bind:__l="__l" bindupdateValueModel="{{a}}" u-p="{{b}}"/><hs-day-picker wx:if="{{d}}" class="data-v-a9a28d4d" u-i="a9a28d4d-2,a9a28d4d-0" bind:__l="__l" bindupdateValueModel="{{c}}" u-p="{{d}}"/></view><view class="data_total_price data-v-a9a28d4d"><view class="data_title data-v-a9a28d4d">交易金额(元)</view><view class="prices data-v-a9a28d4d"><text class="data-v-a9a28d4d">¥</text>0.00 </view></view><view class="data_item_list data-v-a9a28d4d"><view class="data_item data-v-a9a28d4d"><view class="data_label data-v-a9a28d4d">订单数(笔)</view><view class="data_value data-v-a9a28d4d">321</view></view><view class="data_item data-v-a9a28d4d"><view class="data_label data-v-a9a28d4d">总重量(Kg)</view><view class="data_value data-v-a9a28d4d">321</view></view><view class="data_item data-v-a9a28d4d"><view class="data_label data-v-a9a28d4d">总计件</view><view class="data_value data-v-a9a28d4d">321</view></view></view></view></hs-card>
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
<view class="user_info data-v-ac65dc11"><view class="avatar_info data-v-ac65dc11"></view><view class="user_info_content data-v-ac65dc11"><view class="user_name data-v-ac65dc11"> 黄师傅007 <text class="data-v-ac65dc11">187****0092</text></view><view class="data-v-ac65dc11"> 员工 </view></view><view class="add_btn data-v-ac65dc11"><uni-icons wx:if="{{a}}" class="data-v-ac65dc11" u-i="ac65dc11-0" bind:__l="__l" u-p="{{a}}"></uni-icons></view></view>
|
||||
5
dist/dev/mp-weixin/pages/index/index.js
vendored
5
dist/dev/mp-weixin/pages/index/index.js
vendored
@ -5,7 +5,6 @@ require("./model.js");
|
||||
require("./method.js");
|
||||
require("../../common/libraries/request.js");
|
||||
const common_store_useWeAppAuthStore = require("../../common/store/useWeAppAuthStore.js");
|
||||
require("../../common/libraries/userUserLogin.js");
|
||||
require("../../common/libraries/updateMenu.js");
|
||||
require("../../common/libraries/day.js");
|
||||
require("../../gen/Apis.js");
|
||||
@ -30,13 +29,13 @@ const _sfc_defineComponent = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
});
|
||||
common_vendor.onShareAppMessage(() => {
|
||||
return {
|
||||
title: "废品回收助手",
|
||||
title: "",
|
||||
path: "/pages/index/index"
|
||||
};
|
||||
});
|
||||
common_vendor.onShareTimeline(() => {
|
||||
return {
|
||||
title: "废品回收助手",
|
||||
title: "",
|
||||
path: "/pages/index/index"
|
||||
};
|
||||
});
|
||||
|
||||
1
dist/dev/mp-weixin/pages/index/index.json
vendored
1
dist/dev/mp-weixin/pages/index/index.json
vendored
@ -1,6 +1,5 @@
|
||||
{
|
||||
"navigationBarTitleText": "首页",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"cc-root-view": "../../common/components/cc-root-view/cc-root-view"
|
||||
}
|
||||
|
||||
2
dist/dev/mp-weixin/pages/index/index.wxml
vendored
2
dist/dev/mp-weixin/pages/index/index.wxml
vendored
@ -1 +1 @@
|
||||
<cc-root-view u-s="{{['d']}}" u-i="76f3138a-0" bind:__l="__l"><view class="HomePage"> 2 </view></cc-root-view>
|
||||
<cc-root-view u-s="{{['d']}}" u-i="76f3138a-0" bind:__l="__l"> 2 </cc-root-view>
|
||||
20
dist/dev/mp-weixin/pages/index/index.wxss
vendored
20
dist/dev/mp-weixin/pages/index/index.wxss
vendored
@ -1,23 +1,3 @@
|
||||
page {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.HomePage {
|
||||
background: linear-gradient(180deg, #44ba04 0%, #44ba04 300rpx, #f8f8f8 650rpx);
|
||||
padding-bottom: 190rpx;
|
||||
}
|
||||
.OrderTitle {
|
||||
display: flex;
|
||||
padding: 0 30rpx;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
.OrderTitle .more_btn {
|
||||
color: #3da605;
|
||||
font-size: 27rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
.footer_group_btn {
|
||||
padding: 30rpx;
|
||||
}
|
||||
55
dist/dev/mp-weixin/pages/login.js
vendored
55
dist/dev/mp-weixin/pages/login.js
vendored
@ -17,12 +17,35 @@ if (!Math) {
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "login",
|
||||
setup(__props) {
|
||||
common_vendor.ref("");
|
||||
common_vendor.ref({
|
||||
username: "",
|
||||
password: ""
|
||||
});
|
||||
const auth = common_store_useWeAppAuthStore.useWeAppAuthStore();
|
||||
let CheckedVal = common_vendor.ref(false);
|
||||
const handleGetPhoneNumberWxwork = () => {
|
||||
if (!privacyToast()) {
|
||||
return;
|
||||
}
|
||||
common_vendor.index.showLoading({
|
||||
title: "正在登录...",
|
||||
mask: true
|
||||
});
|
||||
common_vendor.index.qy.getMobile({
|
||||
success: function(res) {
|
||||
console.log(res, "res");
|
||||
if ((res == null ? void 0 : res.errMsg) === "qy__getMobile:ok") {
|
||||
auth == null ? void 0 : auth.handleUserLoginWxwork(res);
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: "获取手机号失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const handleGetPhoneNumber = async (data) => {
|
||||
if (!CheckedVal.value) {
|
||||
return false;
|
||||
@ -60,23 +83,37 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
}
|
||||
});
|
||||
};
|
||||
common_vendor.onShow(() => {
|
||||
console.log(auth == null ? void 0 : auth.data, "res");
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(handleGetPhoneNumber),
|
||||
b: common_vendor.o(privacyToast),
|
||||
var _a, _b, _c, _d;
|
||||
return common_vendor.e({
|
||||
a: ((_b = (_a = common_vendor.unref(auth)) == null ? void 0 : _a.data) == null ? void 0 : _b.environment) === "wxwork"
|
||||
}, ((_d = (_c = common_vendor.unref(auth)) == null ? void 0 : _c.data) == null ? void 0 : _d.environment) === "wxwork" ? {
|
||||
b: common_vendor.o(handleGetPhoneNumberWxwork),
|
||||
c: common_vendor.p({
|
||||
type: "primary",
|
||||
size: "md",
|
||||
label: "快捷登录",
|
||||
openType: common_vendor.unref(CheckedVal) ? "getPhoneNumber" : ""
|
||||
}),
|
||||
d: common_vendor.o(previewPdf),
|
||||
e: common_vendor.o(($event) => common_vendor.isRef(CheckedVal) ? CheckedVal.value = $event : CheckedVal = $event),
|
||||
label: "快捷登录1"
|
||||
})
|
||||
} : {
|
||||
d: common_vendor.o(handleGetPhoneNumber),
|
||||
e: common_vendor.o(privacyToast),
|
||||
f: common_vendor.p({
|
||||
type: "primary",
|
||||
size: "md",
|
||||
label: "快捷登录2",
|
||||
openType: common_vendor.unref(CheckedVal) ? "getPhoneNumber" : ""
|
||||
})
|
||||
}, {
|
||||
g: common_vendor.o(previewPdf),
|
||||
h: common_vendor.o(($event) => common_vendor.isRef(CheckedVal) ? CheckedVal.value = $event : CheckedVal = $event),
|
||||
i: common_vendor.p({
|
||||
policyName: "《用户协议》",
|
||||
isAgree: common_vendor.unref(CheckedVal)
|
||||
})
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
2
dist/dev/mp-weixin/pages/login.wxml
vendored
2
dist/dev/mp-weixin/pages/login.wxml
vendored
@ -1 +1 @@
|
||||
<view class="login_content"><view class="header"></view><view class="group_des"><view class="label"> 助手 </view><view class="des"><text>还没有账号?</text> 请在公众号联系管理员 </view></view><view class="group_from"></view><view class="footer_btn"><hs-button wx:if="{{c}}" bindonGetPhoneNumber="{{a}}" bindclick="{{b}}" u-i="499dbccf-0" bind:__l="__l" u-p="{{c}}"/><view class="footer_des"> 小程序只供合作企业用户使用,无法登录请联系管理员 </view></view><view class="PrivacyPolicy"><hs-private-policy wx:if="{{f}}" bindclickPolicy="{{d}}" u-i="499dbccf-1" bind:__l="__l" bindupdateIsAgree="{{e}}" u-p="{{f}}"/></view></view>
|
||||
<view class="login_content"><view class="header"></view><view class="group_des"><view class="label"> 助手 </view><view class="des"><text>还没有账号?</text> 请在公众号联系管理员 </view></view><view class="group_from"></view><view class="footer_btn"><hs-button wx:if="{{a}}" bindclick="{{b}}" u-i="499dbccf-0" bind:__l="__l" u-p="{{c}}"/><hs-button wx:else bindonGetPhoneNumber="{{d}}" bindclick="{{e}}" u-i="499dbccf-1" bind:__l="__l" u-p="{{f||''}}"/><view class="footer_des"> 小程序只供合作企业用户使用,无法登录请联系管理员 </view></view><view class="PrivacyPolicy"><hs-private-policy wx:if="{{i}}" bindclickPolicy="{{g}}" u-i="499dbccf-2" bind:__l="__l" bindupdateIsAgree="{{h}}" u-p="{{i}}"/></view></view>
|
||||
47
dist/dev/mp-weixin/pages/me/components/list.js
vendored
47
dist/dev/mp-weixin/pages/me/components/list.js
vendored
@ -1,47 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const pages_me_model = require("../model.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
_easycom_uni_icons2();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "list",
|
||||
setup(__props) {
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.f(common_vendor.unref(pages_me_model.useModel).list, (i, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: (i == null ? void 0 : i.type) === "service"
|
||||
}, (i == null ? void 0 : i.type) === "service" ? {
|
||||
b: i == null ? void 0 : i.icon,
|
||||
c: common_vendor.t(i == null ? void 0 : i.label),
|
||||
d: "5b065f8a-0-" + i0,
|
||||
e: common_vendor.p({
|
||||
type: "right",
|
||||
size: "15",
|
||||
color: "#888"
|
||||
}),
|
||||
f: `items_${index}`
|
||||
} : {
|
||||
g: i == null ? void 0 : i.icon,
|
||||
h: common_vendor.t(i == null ? void 0 : i.label),
|
||||
i: "5b065f8a-1-" + i0,
|
||||
j: common_vendor.p({
|
||||
type: "right",
|
||||
size: "15",
|
||||
color: "#888"
|
||||
}),
|
||||
k: `items_btn_${index}`
|
||||
});
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/pages/me/components/list.vue"]]);
|
||||
wx.createComponent(Component);
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
<view class="menu_list"><block wx:for="{{a}}" wx:for-item="i"><view wx:if="{{i.a}}" class="items" key="{{i.f}}"><button open-type="contact" class="contact_btn"><view class="items_label"><image src="{{i.b}}" mode="heightFix"/>{{i.c}}</view><uni-icons wx:if="{{i.e}}" u-i="{{i.d}}" bind:__l="__l" u-p="{{i.e}}"></uni-icons></button></view><view wx:else class="items" key="{{i.k}}"><view class="items_label"><image src="{{i.g}}" mode="heightFix"/>{{i.h}}</view><uni-icons wx:if="{{i.j}}" u-i="{{i.i}}" bind:__l="__l" u-p="{{i.j}}"></uni-icons></view></block></view>
|
||||
@ -1,8 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const _sfc_main = {};
|
||||
function _sfc_render(_ctx, _cache) {
|
||||
return {};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-312672de"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/pages/me/components/showData.vue"]]);
|
||||
wx.createComponent(Component);
|
||||
@ -1,4 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
<view class="show_data data-v-312672de"><view class="items data-v-312672de"><view class="label data-v-312672de"> 全部订单 </view><view class="value data-v-312672de"> 32 </view></view><view class="items data-v-312672de"><view class="label data-v-312672de"> 待付款 </view><view class="value data-v-312672de"> 32 </view></view><view class="items data-v-312672de"><view class="label data-v-312672de"> 已付款 </view><view class="value data-v-312672de"> 32 </view></view><view class="items data-v-312672de"><view class="label data-v-312672de"> 已完成 </view><view class="value data-v-312672de"> 32 </view></view></view>
|
||||
@ -1,19 +0,0 @@
|
||||
.show_data.data-v-312672de {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
padding: 40rpx 30rpx;
|
||||
justify-content: space-between;
|
||||
text-align: center;
|
||||
margin: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.show_data .label.data-v-312672de {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
.show_data .value.data-v-312672de {
|
||||
font-weight: 600;
|
||||
font-size: 33rpx;
|
||||
padding-top: 5rpx;
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const _sfc_main = {};
|
||||
function _sfc_render(_ctx, _cache) {
|
||||
return {};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5bade6a5"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/pages/me/components/useInfo.vue"]]);
|
||||
wx.createComponent(Component);
|
||||
@ -1,4 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
<view class="user_info data-v-5bade6a5"><view class="avatar_info data-v-5bade6a5"></view><view class="user_info_content data-v-5bade6a5"><view class="user_name data-v-5bade6a5"> 黄师傅007 <text class="data-v-5bade6a5">187****0092</text></view><view class="data-v-5bade6a5"> 员工 </view></view></view>
|
||||
@ -1,27 +0,0 @@
|
||||
.user_info.data-v-5bade6a5 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 30rpx 20rpx 30rpx;
|
||||
}
|
||||
.user_info .avatar_info.data-v-5bade6a5 {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 40rpx;
|
||||
background: rgba(229, 229, 229, 0.34);
|
||||
}
|
||||
.user_info .user_info_content.data-v-5bade6a5 {
|
||||
flex: 1;
|
||||
padding: 0 0 0 30rpx;
|
||||
color: #fff;
|
||||
font-size: 27rpx;
|
||||
}
|
||||
.user_info .user_info_content .user_name.data-v-5bade6a5 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
.user_info .user_info_content text.data-v-5bade6a5 {
|
||||
padding-left: 40rpx;
|
||||
font-size: 27rpx;
|
||||
}
|
||||
17
dist/dev/mp-weixin/pages/me/index.js
vendored
17
dist/dev/mp-weixin/pages/me/index.js
vendored
@ -5,28 +5,13 @@ const common_store_useWeAppAuthStore = require("../../common/store/useWeAppAuthS
|
||||
require("./method.js");
|
||||
require("../../gen/Apis.js");
|
||||
require("../../common/libraries/apiLoading.js");
|
||||
if (!Array) {
|
||||
const _easycom_hs_custom_title2 = common_vendor.resolveComponent("hs-custom-title");
|
||||
_easycom_hs_custom_title2();
|
||||
}
|
||||
const _easycom_hs_custom_title = () => "../../components/hs-custom-title/hs-custom-title.js";
|
||||
if (!Math) {
|
||||
(_easycom_hs_custom_title + MyUserInfo + MyShowData + MyList)();
|
||||
}
|
||||
const MyList = () => "./components/list.js";
|
||||
const MyUserInfo = () => "./components/useInfo.js";
|
||||
const MyShowData = () => "./components/showData.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
getApp();
|
||||
common_store_useWeAppAuthStore.useWeAppAuthStore();
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
title: "个人中心"
|
||||
})
|
||||
};
|
||||
return {};
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
9
dist/dev/mp-weixin/pages/me/index.json
vendored
9
dist/dev/mp-weixin/pages/me/index.json
vendored
@ -1,11 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"hs-custom-title": "../../components/hs-custom-title/hs-custom-title",
|
||||
"my-list": "./components/list",
|
||||
"my-user-info": "./components/useInfo",
|
||||
"my-show-data": "./components/showData"
|
||||
}
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
dist/dev/mp-weixin/pages/me/index.wxml
vendored
2
dist/dev/mp-weixin/pages/me/index.wxml
vendored
@ -1 +1 @@
|
||||
<view class="me_page"><hs-custom-title wx:if="{{a}}" u-i="c52c16b6-0" bind:__l="__l" u-p="{{a}}"/><my-user-info u-i="c52c16b6-1" bind:__l="__l"/><my-show-data u-i="c52c16b6-2" bind:__l="__l"/><my-list u-i="c52c16b6-3" bind:__l="__l"/></view>
|
||||
<view> 1 </view>
|
||||
56
dist/dev/mp-weixin/pages/me/index.wxss
vendored
56
dist/dev/mp-weixin/pages/me/index.wxss
vendored
@ -1,57 +1,5 @@
|
||||
.me_page {
|
||||
background: linear-gradient(180deg, #44ba04 0%, #44ba04 300rpx, #fff 650rpx);
|
||||
}
|
||||
.me_data_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 30rpx 40rpx 10rpx 40rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.me_data_item .items {
|
||||
flex: 1;
|
||||
padding: 30rpx 0;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.me_data_item .items .label {
|
||||
font-size: 23rpx;
|
||||
padding-bottom: 10rpx;
|
||||
color: #999;
|
||||
}
|
||||
.me_data_item .items .value {
|
||||
color: #f00;
|
||||
font-size: 33rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.menu_list {
|
||||
padding: 30rpx;
|
||||
}
|
||||
.menu_list .items {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
font-size: 26rpx;
|
||||
box-shadow: 0px 2px 4px 1px rgba(0, 0, 0, 0.1);
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.menu_list .items .items_label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.menu_list .items image {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin: 0 20rpx 0 0;
|
||||
}
|
||||
.menu_list .items .contact_btn {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0;
|
||||
page {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.contact_btn {
|
||||
border: none !important;
|
||||
|
||||
25
dist/dev/mp-weixin/pages/me/model.js
vendored
25
dist/dev/mp-weixin/pages/me/model.js
vendored
@ -1,27 +1,2 @@
|
||||
"use strict";
|
||||
require("../../common/vendor.js");
|
||||
const useModel = {
|
||||
list: [
|
||||
{
|
||||
label: "我的客户",
|
||||
path: "/MERCHANT/me/merchant/index",
|
||||
icon: "/static/svg/me_customer.svg"
|
||||
},
|
||||
{
|
||||
label: "我的订单",
|
||||
path: "https://nchl-dev.oss-cn-shenzhen.aliyuncs.com/uploads/cs-test/01JTM6CBGHTYPB7E4D4XENA2P7.pdf",
|
||||
icon: "/static/svg/me_order.svg"
|
||||
},
|
||||
{
|
||||
label: "客服",
|
||||
icon: "/static/svg/me_service.svg",
|
||||
type: "service"
|
||||
},
|
||||
{
|
||||
label: "退出登录",
|
||||
icon: "/static/svg/me_exit.svg",
|
||||
type: "logout"
|
||||
}
|
||||
]
|
||||
};
|
||||
exports.useModel = useModel;
|
||||
|
||||
2
dist/dev/mp-weixin/project.config.json
vendored
2
dist/dev/mp-weixin/project.config.json
vendored
@ -13,7 +13,7 @@
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "",
|
||||
"appid": "wx09b52ea34b5e8855",
|
||||
"appid": "wx2d8208625006f74e",
|
||||
"projectname": "",
|
||||
"condition": {
|
||||
"search": {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"condition": {},
|
||||
"projectname": "%E5%BA%9F%E5%93%81%E5%9B%9E%E6%94%B6%E5%BC%80%E5%8F%91",
|
||||
"projectname": "%E8%80%81%E6%9D%BF%E5%BC%80%E5%8F%91",
|
||||
"setting": {
|
||||
"compileHotReLoad": true,
|
||||
"urlCheck": false,
|
||||
|
||||
@ -1,72 +0,0 @@
|
||||
"use strict";
|
||||
const uni_modules_uniIcons_components_uniIcons_uniicons_file_vue = require("./uniicons_file_vue.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const getVal = (val) => {
|
||||
const reg = /^[0-9]*$/g;
|
||||
return typeof val === "number" || reg.test(val) ? val + "px" : val;
|
||||
};
|
||||
const _sfc_main = {
|
||||
name: "UniIcons",
|
||||
emits: ["click"],
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: "#333333"
|
||||
},
|
||||
size: {
|
||||
type: [Number, String],
|
||||
default: 16
|
||||
},
|
||||
customPrefix: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
fontFamily: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
icons: uni_modules_uniIcons_components_uniIcons_uniicons_file_vue.fontData
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
unicode() {
|
||||
let code = this.icons.find((v) => v.font_class === this.type);
|
||||
if (code) {
|
||||
return code.unicode;
|
||||
}
|
||||
return "";
|
||||
},
|
||||
iconSize() {
|
||||
return getVal(this.size);
|
||||
},
|
||||
styleObj() {
|
||||
if (this.fontFamily !== "") {
|
||||
return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`;
|
||||
}
|
||||
return `color: ${this.color}; font-size: ${this.iconSize};`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
_onClick() {
|
||||
this.$emit("click");
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.s($options.styleObj),
|
||||
b: common_vendor.n("uniui-" + $props.type),
|
||||
c: common_vendor.n($props.customPrefix),
|
||||
d: common_vendor.n($props.customPrefix ? $props.type : ""),
|
||||
e: common_vendor.o((...args) => $options._onClick && $options._onClick(...args))
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
|
||||
wx.createComponent(Component);
|
||||
@ -1,4 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
<text style="{{a}}" class="{{['uni-icons', b, c, d]}}" bindtap="{{e}}"><slot></slot></text>
|
||||
File diff suppressed because one or more lines are too long
@ -1,648 +0,0 @@
|
||||
"use strict";
|
||||
const fontData = [
|
||||
{
|
||||
font_class: "arrow-down",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "arrow-left",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "arrow-right",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "arrow-up",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "auth",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "auth-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "back",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "bars",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "calendar",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "calendar-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "camera",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "camera-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "cart",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "cart-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "chat",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "chat-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "chatboxes",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "chatboxes-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "chatbubble",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "chatbubble-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "checkbox",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "checkbox-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "checkmarkempty",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "circle",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "circle-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "clear",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "close",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "closeempty",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "cloud-download",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "cloud-download-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "cloud-upload",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "cloud-upload-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "color",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "color-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "compose",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "contact",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "contact-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "down",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "bottom",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "download",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "download-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "email",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "email-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "eye",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "eye-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "eye-slash",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "eye-slash-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "fire",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "fire-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "flag",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "flag-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "folder-add",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "folder-add-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "font",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "forward",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "gear",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "gear-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "gift",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "gift-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "hand-down",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "hand-down-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "hand-up",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "hand-up-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "headphones",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "heart",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "heart-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "help",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "help-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "home",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "home-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "image",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "image-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "images",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "images-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "info",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "info-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "left",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "link",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "list",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "location",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "location-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "locked",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "locked-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "loop",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "mail-open",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "mail-open-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "map",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "map-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "map-pin",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "map-pin-ellipse",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "medal",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "medal-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "mic",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "mic-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "micoff",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "micoff-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "minus",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "minus-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "more",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "more-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "navigate",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "navigate-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "notification",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "notification-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "paperclip",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "paperplane",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "paperplane-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "person",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "person-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "personadd",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "personadd-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "personadd-filled-copy",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "phone",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "phone-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "plus",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "plus-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "plusempty",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "pulldown",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "pyq",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "qq",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "redo",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "redo-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "refresh",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "refresh-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "refreshempty",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "reload",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "right",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "scan",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "search",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "settings",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "settings-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "shop",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "shop-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "smallcircle",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "smallcircle-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "sound",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "sound-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "spinner-cycle",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "staff",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "staff-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "star",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "star-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "starhalf",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "trash",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "trash-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "tune",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "tune-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "undo",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "undo-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "up",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "top",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "upload",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "upload-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "videocam",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "videocam-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "vip",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "vip-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "wallet",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "wallet-filled",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "weibo",
|
||||
unicode: ""
|
||||
},
|
||||
{
|
||||
font_class: "weixin",
|
||||
unicode: ""
|
||||
}
|
||||
];
|
||||
exports.fontData = fontData;
|
||||
28
src/common/libraries/phoneValidator.ts
Normal file
28
src/common/libraries/phoneValidator.ts
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* 验证中国大陆手机号格式
|
||||
* @param phone 待验证的手机号字符串
|
||||
* @returns 验证结果 boolean
|
||||
*
|
||||
* 验证规则:
|
||||
* 1. 11位数字
|
||||
* 2. 1开头
|
||||
* 3. 第二位为3-9的数字
|
||||
* 4. 其余位为0-9的数字
|
||||
*/
|
||||
export function validatePhoneNumber(phone: string): boolean {
|
||||
// 基础格式校验
|
||||
if (!phone || typeof phone !== 'string') return false;
|
||||
|
||||
// 正则表达式验证
|
||||
return /^1[3-9]\d{9}$/.test(phone);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号脱敏处理
|
||||
* @param phone 原始手机号
|
||||
* @returns 脱敏后的手机号字符串 (如: 138****1234)
|
||||
*/
|
||||
export function maskPhoneNumber(phone: string): string {
|
||||
if (!validatePhoneNumber(phone)) return phone;
|
||||
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
|
||||
}
|
||||
@ -2,7 +2,9 @@ import { Apis } from '@/gen/Apis'
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import { getApiLoading } from '../libraries/apiLoading'
|
||||
import { setTabBar } from '../libraries/setTabBar'
|
||||
const wxworkId='ww8e14f3d20774c997' //企微id
|
||||
const wxAppId='wx2d8208625006f74e' //小程序id
|
||||
|
||||
|
||||
type DataType = {
|
||||
user?: {
|
||||
@ -11,26 +13,32 @@ type DataType = {
|
||||
}
|
||||
orgs?: { id?: number; name?: string }[]
|
||||
selectedOrg?: { id?: number; name?: string; is_show_procedure?: number }
|
||||
work_info?:{session_key:string,openid:string},
|
||||
environment?:string
|
||||
}
|
||||
|
||||
export const useWeAppAuthStore = defineStore('we_app_auth', () => {
|
||||
const loading = ref<boolean>(true)
|
||||
const hasError = ref<boolean>(false)
|
||||
const data = ref<DataType>({
|
||||
user: { id: 0, username: '' }
|
||||
user: { id: 0, username: '' },
|
||||
work_info:{session_key:'',openid:''},
|
||||
environment:""
|
||||
})
|
||||
|
||||
function login(app: any) {
|
||||
const res = uni.getSystemInfoSync()
|
||||
const res:any = uni.getSystemInfoSync()
|
||||
data.value.environment = res?.environment
|
||||
console.log(res?.environment,'res?.environment')
|
||||
if (res?.environment === 'wxwork') {
|
||||
uni?.qy?.login({
|
||||
success: function (loginRes) {
|
||||
console.log(loginRes)
|
||||
getWorkToken(app, loginRes.code)
|
||||
uni.qy.login({
|
||||
success: function (res:any) {
|
||||
console.log(res)
|
||||
getWorkToken(app, res.code)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni?.login({
|
||||
uni.login({
|
||||
provider: 'weixin', //使用微信登录
|
||||
success: function (loginRes) {
|
||||
console.log(loginRes)
|
||||
@ -40,18 +48,19 @@ export const useWeAppAuthStore = defineStore('we_app_auth', () => {
|
||||
}
|
||||
}
|
||||
const getWorkToken = (app: any, code: string) => {
|
||||
Apis.Login.Auth.WorkLogin({ code: code, app_id: 'ww8e14f3d20774c997' })
|
||||
Apis.Login.Auth.WorkLogin({ code: code, app_id:wxworkId })
|
||||
.then(res => {
|
||||
console.log('登录', res?.data)
|
||||
data.value.user = res.data?.user
|
||||
data.value.work_info = res.data?.work_info
|
||||
loading.value = false
|
||||
uni.setStorageSync(import.meta.env.VITE_ACCESS_TOKEN_KEY, res?.data?.token?.token)
|
||||
app?.appContext.config.globalProperties.$isResolve()
|
||||
if (!res.data?.user) {
|
||||
//未绑定账号
|
||||
uni.redirectTo({
|
||||
url: '/pages/login'
|
||||
})
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/login'
|
||||
// })
|
||||
return false
|
||||
}
|
||||
})
|
||||
@ -62,7 +71,7 @@ export const useWeAppAuthStore = defineStore('we_app_auth', () => {
|
||||
}
|
||||
|
||||
const getWXToken = (app: any, code: string) => {
|
||||
Apis.Login.Auth.Login({ code: code, app_id: 'wx09b52ea34b5e8855' })
|
||||
Apis.Login.Auth.Login({ code: code, app_id: wxAppId })
|
||||
.then(res => {
|
||||
console.log('登录', res?.data)
|
||||
data.value.user = res.data?.user
|
||||
@ -71,9 +80,9 @@ export const useWeAppAuthStore = defineStore('we_app_auth', () => {
|
||||
app?.appContext.config.globalProperties.$isResolve()
|
||||
if (!res.data?.user) {
|
||||
//未绑定账号
|
||||
uni.redirectTo({
|
||||
url: '/pages/login'
|
||||
})
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/login'
|
||||
// })
|
||||
return false
|
||||
}
|
||||
})
|
||||
@ -91,17 +100,33 @@ export const useWeAppAuthStore = defineStore('we_app_auth', () => {
|
||||
hasError.value = false
|
||||
})
|
||||
}
|
||||
|
||||
//企微绑定
|
||||
const handleUserLoginWxwork = async (from_data: {
|
||||
iv?: string
|
||||
encryptedData?: string
|
||||
}) => {
|
||||
getApiLoading(Apis.Login.Auth.BindWork, {
|
||||
app_id: wxAppId,
|
||||
session_key: data?.value?.work_info?.session_key,
|
||||
iv: from_data?.iv,
|
||||
encrypted_data: from_data?.encryptedData
|
||||
}).then(res => {
|
||||
me()
|
||||
uni.navigateBack({delta:1})
|
||||
})
|
||||
}
|
||||
//小程序快捷绑定
|
||||
const handleUserLogin = async (from_data: {
|
||||
code?: string
|
||||
phone?: string
|
||||
phone_validate_code?: string
|
||||
}) => {
|
||||
getApiLoading(Apis.Login.Auth.BindPhoneNumber, {
|
||||
app_id: 'wx09b52ea34b5e8855',
|
||||
app_id: wxAppId,
|
||||
...from_data
|
||||
}).then(res => {
|
||||
me()
|
||||
uni.navigateBack({delta:1})
|
||||
})
|
||||
}
|
||||
|
||||
@ -111,6 +136,7 @@ export const useWeAppAuthStore = defineStore('we_app_auth', () => {
|
||||
data,
|
||||
login,
|
||||
me,
|
||||
handleUserLogin
|
||||
handleUserLogin,
|
||||
handleUserLoginWxwork
|
||||
}
|
||||
})
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
"quickapp": {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin": {
|
||||
"appid": "wx09b52ea34b5e8855",
|
||||
"appid": "wx2d8208625006f74e",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
},
|
||||
|
||||
@ -16,16 +16,13 @@
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "首页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/me/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "个人中心"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -40,12 +37,12 @@
|
||||
}
|
||||
},
|
||||
"globalStyle": {
|
||||
"navigationBarBackgroundColor": "#3da605",
|
||||
"navigationBarTextStyle": "white"
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTextStyle": "black"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#000000",
|
||||
"selectedColor": "#3DA605",
|
||||
"selectedColor": "#0082FA",
|
||||
"backgroundColor": "#ffffff",
|
||||
"borderStyle": "black",
|
||||
"list": [
|
||||
|
||||
@ -1,58 +0,0 @@
|
||||
<template>
|
||||
<view class="day_select">
|
||||
<view
|
||||
v-for="(i, index) in listDay"
|
||||
:key="index"
|
||||
:class="`day_items ${i?.value === props.day ? 'active' : ''}`"
|
||||
@click="handleSelect(i?.value)"
|
||||
>
|
||||
{{ i?.label }}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
const props = defineProps(['day'])
|
||||
import { getDay } from '@/common/libraries/day'
|
||||
const emit = defineEmits(['update:valueModel'])
|
||||
const handleSelect = (day: string) => {
|
||||
emit('update:valueModel', day)
|
||||
}
|
||||
const listDay = ref([
|
||||
{
|
||||
label: '今天',
|
||||
value: getDay()
|
||||
},
|
||||
{
|
||||
label: '昨天',
|
||||
value: getDay(1)
|
||||
},
|
||||
{
|
||||
label: '前天',
|
||||
value: getDay(2)
|
||||
}
|
||||
])
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.day_select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 340rpx;
|
||||
height: 55rpx;
|
||||
line-height: 55rpx;
|
||||
border: 1px solid #44ba04;
|
||||
border-radius: 100rpx;
|
||||
font-size: 27rpx;
|
||||
color: #44ba04;
|
||||
overflow: hidden;
|
||||
.day_items {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
border-radius: 100rpx;
|
||||
}
|
||||
.active {
|
||||
background-color: #44ba04;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,80 +0,0 @@
|
||||
<template>
|
||||
<hs-card>
|
||||
<view>
|
||||
<view class="data_header">
|
||||
<MyDaySelect :day="useModel.formData.day" v-model:valueModel="useModel.formData.day" />
|
||||
<hs-day-picker v-model:valueModel="useModel.formData.day" icon="calendar" />
|
||||
</view>
|
||||
<view class="data_total_price">
|
||||
<view class="data_title">交易金额(元)</view>
|
||||
<view class="prices"> <text>¥</text>0.00 </view>
|
||||
</view>
|
||||
<view class="data_item_list">
|
||||
<view class="data_item">
|
||||
<view class="data_label">订单数(笔)</view>
|
||||
<view class="data_value">321</view>
|
||||
</view>
|
||||
<view class="data_item">
|
||||
<view class="data_label">总重量(Kg)</view>
|
||||
<view class="data_value">321</view>
|
||||
</view>
|
||||
<view class="data_item">
|
||||
<view class="data_label">总计件</view>
|
||||
<view class="data_value">321</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</hs-card>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { watch } from 'vue'
|
||||
import MyDaySelect from './daySelect.vue'
|
||||
import useModel from '../model'
|
||||
import method from '../method'
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.data_header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx 0 40rpx 0;
|
||||
}
|
||||
.data_total_price {
|
||||
text-align: center;
|
||||
padding: 10rpx 0 30rpx 0;
|
||||
.data_title {
|
||||
color: #999;
|
||||
font-size: 25rpx;
|
||||
padding-bottom: 8rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.prices {
|
||||
color: #f00;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
text {
|
||||
font-size: 25rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.data_item_list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
padding-bottom: 40rpx;
|
||||
.data_item {
|
||||
width: 33.333%;
|
||||
padding: 20rpx 0 0 0;
|
||||
text-align: center;
|
||||
.data_label {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
padding-bottom: 8rpx;
|
||||
}
|
||||
.data_value {
|
||||
font-weight: 600;
|
||||
font-size: 35rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,47 +0,0 @@
|
||||
<template>
|
||||
<view class="user_info">
|
||||
<view class="avatar_info"> </view>
|
||||
<view class="user_info_content">
|
||||
<view class="user_name"> 黄师傅007 <text>187****0092</text></view>
|
||||
<view> 员工 </view>
|
||||
</view>
|
||||
<view class="add_btn">
|
||||
<uni-icons type="plus" size="24" color="#3da605"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.user_info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 30rpx 20rpx 30rpx;
|
||||
.avatar_info {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 40rpx;
|
||||
background: rgba(229, 229, 229, 0.34);
|
||||
}
|
||||
.user_info_content {
|
||||
flex: 1;
|
||||
padding: 0 0 0 30rpx;
|
||||
color: #fff;
|
||||
font-size: 27rpx;
|
||||
.user_name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
text {
|
||||
padding-left: 40rpx;
|
||||
font-size: 27rpx;
|
||||
}
|
||||
}
|
||||
.add_btn {
|
||||
padding: 10rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,12 +1,11 @@
|
||||
<template>
|
||||
<cc-root-view>
|
||||
<view class="HomePage"> 2 </view>
|
||||
2
|
||||
</cc-root-view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
const App = getApp()
|
||||
import MyShowData from './components/showData.vue'
|
||||
import MyUserInfo from './components/useInfo.vue'
|
||||
|
||||
import { onShareAppMessage, onShareTimeline, onShow } from '@dcloudio/uni-app'
|
||||
import { setTabBarData } from '@/common/libraries/setTabBar'
|
||||
const auth = useWeAppAuthStore()
|
||||
@ -14,7 +13,6 @@ import useModel from './model'
|
||||
import method from './method'
|
||||
import { useWeAppAuthStore } from '@/common'
|
||||
import { getCurrentInstance, ref } from 'vue'
|
||||
import useUser from '@/common/libraries/userUserLogin'
|
||||
onShow(async () => {
|
||||
setTabBarData(0)
|
||||
await getCurrentInstance()?.appContext.config.globalProperties.$onLaunched
|
||||
@ -22,13 +20,13 @@ onShow(async () => {
|
||||
|
||||
onShareAppMessage(() => {
|
||||
return {
|
||||
title: '废品回收助手',
|
||||
title: '',
|
||||
path: '/pages/index/index'
|
||||
}
|
||||
})
|
||||
onShareTimeline(() => {
|
||||
return {
|
||||
title: '废品回收助手',
|
||||
title: '',
|
||||
path: '/pages/index/index'
|
||||
}
|
||||
})
|
||||
|
||||
@ -1,28 +1,12 @@
|
||||
page {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.HomePage {
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
#44ba04 0%,
|
||||
#44ba04 300rpx,
|
||||
#f8f8f8 650rpx
|
||||
);
|
||||
padding-bottom: 190rpx;
|
||||
}
|
||||
.OrderTitle {
|
||||
display: flex;
|
||||
padding: 0 30rpx;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
.more_btn {
|
||||
color: #3da605;
|
||||
font-size: 27rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
.footer_group_btn {
|
||||
padding: 30rpx;
|
||||
}
|
||||
// .HomePage {
|
||||
// background: linear-gradient(
|
||||
// 180deg,
|
||||
// #44ba04 0%,
|
||||
// #44ba04 300rpx,
|
||||
// #f8f8f8 650rpx
|
||||
// );
|
||||
// padding-bottom: 190rpx;
|
||||
// }
|
||||
|
||||
@ -30,10 +30,18 @@
|
||||
<hs-button
|
||||
type="primary"
|
||||
size="md"
|
||||
label="快捷登录"
|
||||
label="快捷登录1"
|
||||
@click="handleGetPhoneNumberWxwork"
|
||||
v-if="auth?.data?.environment ==='wxwork'"
|
||||
/>
|
||||
<hs-button
|
||||
type="primary"
|
||||
size="md"
|
||||
label="快捷登录2"
|
||||
:openType="CheckedVal ? 'getPhoneNumber' : ''"
|
||||
@onGetPhoneNumber="handleGetPhoneNumber"
|
||||
@click="privacyToast"
|
||||
v-else
|
||||
/>
|
||||
<view class="footer_des"> 小程序只供合作企业用户使用,无法登录请联系管理员 </view>
|
||||
</view>
|
||||
@ -48,7 +56,9 @@
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
const environment = ref('')
|
||||
import { useWeAppAuthStore } from '@/common'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { ref } from 'vue'
|
||||
const from_data = ref({
|
||||
username: '',
|
||||
@ -58,19 +68,30 @@ const from_data = ref({
|
||||
const auth = useWeAppAuthStore()
|
||||
let CheckedVal = ref(false)
|
||||
|
||||
const onSubmit = () => {
|
||||
if (!privacyToast()) {
|
||||
return false
|
||||
}
|
||||
if (!from_data.value.username || !from_data.value.password) {
|
||||
//在企业微信上获取手机号绑定
|
||||
const handleGetPhoneNumberWxwork = () =>{
|
||||
if(!privacyToast()){return}
|
||||
uni.showLoading({
|
||||
title: '正在登录...',
|
||||
mask: true
|
||||
})
|
||||
uni.qy.getMobile({
|
||||
success: function (res:any) {
|
||||
console.log(res,'res')
|
||||
if (res?.errMsg === "qy__getMobile:ok") {
|
||||
auth?.handleUserLoginWxwork(res)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请输入帐号和密码!',
|
||||
title: '获取手机号失败',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// auth.handleUserLogin(from_data.value);
|
||||
},
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
//绑定手机
|
||||
const handleGetPhoneNumber = async (data: { detail: { code: string } }) => {
|
||||
if (!CheckedVal.value) {
|
||||
@ -112,6 +133,10 @@ const previewPdf = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onShow(()=>{
|
||||
console.log(auth?.data,'res')
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.login_content {
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
<template>
|
||||
<view class="menu_list">
|
||||
<template v-for="(i, index) in useModel.list">
|
||||
<view class="items" v-if="i?.type === 'service'" :key="`items_${index}`">
|
||||
<button open-type="contact" class="contact_btn">
|
||||
<view class="items_label"> <image :src="i?.icon" mode="heightFix" />{{ i?.label }} </view>
|
||||
<uni-icons type="right" size="15" color="#888"></uni-icons>
|
||||
</button>
|
||||
</view>
|
||||
<view class="items" v-else :key="`items_btn_${index}`">
|
||||
<view class="items_label"> <image :src="i?.icon" mode="heightFix" />{{ i?.label }} </view>
|
||||
<uni-icons type="right" size="15" color="#888"></uni-icons>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import useModel from '../model'
|
||||
</script>
|
||||
@ -1,41 +0,0 @@
|
||||
<template>
|
||||
<view class="show_data">
|
||||
<view class="items">
|
||||
<view class="label"> 全部订单 </view>
|
||||
<view class="value"> 32 </view>
|
||||
</view>
|
||||
<view class="items">
|
||||
<view class="label"> 待付款 </view>
|
||||
<view class="value"> 32 </view>
|
||||
</view>
|
||||
<view class="items">
|
||||
<view class="label"> 已付款 </view>
|
||||
<view class="value"> 32 </view>
|
||||
</view>
|
||||
<view class="items">
|
||||
<view class="label"> 已完成 </view>
|
||||
<view class="value"> 32 </view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.show_data {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
padding: 40rpx 30rpx;
|
||||
justify-content: space-between;
|
||||
text-align: center;
|
||||
margin: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
.label {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
.value {
|
||||
font-weight: 600;
|
||||
font-size: 33rpx;
|
||||
padding-top: 5rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,39 +0,0 @@
|
||||
<template>
|
||||
<view class="user_info">
|
||||
<view class="avatar_info"> </view>
|
||||
<view class="user_info_content">
|
||||
<view class="user_name"> 黄师傅007 <text>187****0092</text></view>
|
||||
<view> 员工 </view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.user_info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 30rpx 20rpx 30rpx;
|
||||
.avatar_info {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 40rpx;
|
||||
background: rgba(229, 229, 229, 0.34);
|
||||
}
|
||||
.user_info_content {
|
||||
flex: 1;
|
||||
padding: 0 0 0 30rpx;
|
||||
color: #fff;
|
||||
font-size: 27rpx;
|
||||
.user_name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
text {
|
||||
padding-left: 40rpx;
|
||||
font-size: 27rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,21 +1,14 @@
|
||||
<template>
|
||||
<view class="me_page">
|
||||
<hs-custom-title title="个人中心" />
|
||||
<MyUserInfo />
|
||||
<MyShowData />
|
||||
<MyList />
|
||||
<view>
|
||||
1
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import useModel from './model'
|
||||
import { setTabBarData } from '@/common/libraries/setTabBar'
|
||||
import { getCurrentInstance } from 'vue'
|
||||
import { useWeAppAuthStore } from '@/common'
|
||||
import MyList from './components/list.vue'
|
||||
import MyUserInfo from './components/useInfo.vue'
|
||||
import MyShowData from './components/showData.vue'
|
||||
|
||||
import method from './method'
|
||||
const App = getApp()
|
||||
const auth = useWeAppAuthStore()
|
||||
|
||||
@ -1,60 +1,7 @@
|
||||
.me_page {
|
||||
background: linear-gradient(180deg, #44ba04 0%, #44ba04 300rpx, #fff 650rpx);
|
||||
page {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.me_data_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 30rpx 40rpx 10rpx 40rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
.items {
|
||||
flex: 1;
|
||||
padding: 30rpx 0;
|
||||
font-size: 28rpx;
|
||||
.label {
|
||||
font-size: 23rpx;
|
||||
padding-bottom: 10rpx;
|
||||
color: #999;
|
||||
}
|
||||
.value {
|
||||
color: #f00;
|
||||
font-size: 33rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu_list {
|
||||
padding: 30rpx;
|
||||
.items {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
font-size: 26rpx;
|
||||
box-shadow: 0px 2px 4px 1px rgba(0, 0, 0, 0.1);
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
.items_label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
image {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin: 0 20rpx 0 0;
|
||||
}
|
||||
.contact_btn {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.contact_btn {
|
||||
border: none !important; /* 去掉边框 */
|
||||
background-color: transparent; /* 去掉背景色 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user