|
|
@@ -116,7 +116,7 @@ if (uni.restoreGlobal) {
|
|
|
function resolveEasycom(component, easycom) {
|
|
|
return typeof component === "string" ? easycom : component;
|
|
|
}
|
|
|
- const BASE_URL = "http://192.168.1.118:8080";
|
|
|
+ const BASE_URL = "http://192.168.0.104:8080";
|
|
|
const CLIENT_ID = "3";
|
|
|
const PLATFORM_CODE = "FlfAppPlatformCodeX9kR7mT3wQ5vZ8nB1jY6pD4sL0hC2gA";
|
|
|
const PLATFORM_ID = 2;
|
|
|
@@ -212,30 +212,6 @@ if (uni.restoreGlobal) {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- function loginBySms(phonenumber, smsCode) {
|
|
|
- return request({
|
|
|
- url: "/auth/login",
|
|
|
- method: "POST",
|
|
|
- needToken: false,
|
|
|
- data: {
|
|
|
- tenantId: TENANT_ID,
|
|
|
- platformId: PLATFORM_ID,
|
|
|
- phonenumber,
|
|
|
- smsCode,
|
|
|
- clientId: CLIENT_ID,
|
|
|
- grantType: "fulfiller_sms"
|
|
|
- // 使用履约者专用认证策略
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- function sendSmsCode(phonenumber) {
|
|
|
- return request({
|
|
|
- url: "/resource/sms/code",
|
|
|
- method: "GET",
|
|
|
- needToken: false,
|
|
|
- data: { phonenumber }
|
|
|
- });
|
|
|
- }
|
|
|
function logout() {
|
|
|
return request({
|
|
|
url: "/auth/logout",
|
|
|
@@ -245,7 +221,7 @@ if (uni.restoreGlobal) {
|
|
|
const logic$9 = {
|
|
|
data() {
|
|
|
return {
|
|
|
- currentTab: 0,
|
|
|
+ currentTab: 1,
|
|
|
// 0: 免密, 1: 密码
|
|
|
mobile: "",
|
|
|
code: "",
|
|
|
@@ -270,35 +246,36 @@ if (uni.restoreGlobal) {
|
|
|
}
|
|
|
this.showAgreementModal = true;
|
|
|
},
|
|
|
- async getVerifyCode() {
|
|
|
- if (this.currentTab === 1)
|
|
|
- return;
|
|
|
- if (this.countDown > 0)
|
|
|
- return;
|
|
|
- if (!this.mobile || this.mobile.length !== 11) {
|
|
|
- uni.showToast({ title: "请输入正确的手机号", icon: "none" });
|
|
|
- return;
|
|
|
- }
|
|
|
- try {
|
|
|
- const res = await sendSmsCode(this.mobile);
|
|
|
- this.countDown = 60;
|
|
|
- this.timer = setInterval(() => {
|
|
|
- this.countDown--;
|
|
|
- if (this.countDown <= 0) {
|
|
|
- clearInterval(this.timer);
|
|
|
- }
|
|
|
- }, 1e3);
|
|
|
- const devCode = res.data;
|
|
|
- if (devCode) {
|
|
|
- this.code = devCode;
|
|
|
- uni.showToast({ title: "验证码: " + devCode, icon: "none", duration: 3e3 });
|
|
|
- } else {
|
|
|
- uni.showToast({ title: "验证码已发送", icon: "none" });
|
|
|
- }
|
|
|
- } catch (err) {
|
|
|
- formatAppLog("error", "at pages/login/logic.js:60", "发送验证码失败:", err);
|
|
|
- }
|
|
|
- },
|
|
|
+ /* async getVerifyCode() {
|
|
|
+ if (this.currentTab === 1) return;
|
|
|
+ if (this.countDown > 0) return;
|
|
|
+ if (!this.mobile || this.mobile.length !== 11) {
|
|
|
+ uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ const res = await sendSmsCode(this.mobile);
|
|
|
+ // 发送成功,启动倒计时
|
|
|
+ this.countDown = 60;
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.countDown--;
|
|
|
+ if (this.countDown <= 0) {
|
|
|
+ clearInterval(this.timer);
|
|
|
+ }
|
|
|
+ }, 1000);
|
|
|
+ // TODO 【生产环境必须删除】开发模式下后端会返回验证码,自动填入方便测试
|
|
|
+ const devCode = res.data;
|
|
|
+ if (devCode) {
|
|
|
+ this.code = devCode;
|
|
|
+ uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
|
|
|
+ } else {
|
|
|
+ uni.showToast({ title: '验证码已发送', icon: 'none' });
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ __f__('error','at pages/login/logic.js:60','发送验证码失败:', err);
|
|
|
+ }
|
|
|
+ }, */
|
|
|
async handleLogin() {
|
|
|
var _a;
|
|
|
if (!this.isAgreed) {
|
|
|
@@ -309,27 +286,20 @@ if (uni.restoreGlobal) {
|
|
|
uni.showToast({ title: "请输入手机号", icon: "none" });
|
|
|
return;
|
|
|
}
|
|
|
- if (this.currentTab === 0) {
|
|
|
- if (!this.code) {
|
|
|
- uni.showToast({ title: "请输入验证码", icon: "none" });
|
|
|
- return;
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (!this.password) {
|
|
|
- uni.showToast({ title: "请输入密码", icon: "none" });
|
|
|
- return;
|
|
|
- }
|
|
|
+ if (!this.password) {
|
|
|
+ uni.showToast({ title: "请输入密码", icon: "none" });
|
|
|
+ return;
|
|
|
}
|
|
|
if (this.loginLoading)
|
|
|
return;
|
|
|
this.loginLoading = true;
|
|
|
+ uni.showLoading({
|
|
|
+ title: "登录中...",
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
try {
|
|
|
let res;
|
|
|
- if (this.currentTab === 0) {
|
|
|
- res = await loginBySms(this.mobile, this.code);
|
|
|
- } else {
|
|
|
- res = await loginByPassword(this.mobile, this.password);
|
|
|
- }
|
|
|
+ res = await loginByPassword(this.mobile, this.password);
|
|
|
const token = ((_a = res.data) == null ? void 0 : _a.access_token) || res.access_token;
|
|
|
if (token) {
|
|
|
setToken(token);
|
|
|
@@ -341,9 +311,10 @@ if (uni.restoreGlobal) {
|
|
|
});
|
|
|
}, 1e3);
|
|
|
} catch (err) {
|
|
|
- formatAppLog("error", "at pages/login/logic.js:114", "登录失败:", err);
|
|
|
+ formatAppLog("error", "at pages/login/logic.js:123", "登录失败:", err);
|
|
|
} finally {
|
|
|
this.loginLoading = false;
|
|
|
+ uni.hideLoading();
|
|
|
}
|
|
|
},
|
|
|
goToRecruit() {
|
|
|
@@ -385,39 +356,10 @@ if (uni.restoreGlobal) {
|
|
|
})
|
|
|
]),
|
|
|
vue.createElementVNode("view", { class: "tabs" }, [
|
|
|
- vue.createElementVNode(
|
|
|
- "view",
|
|
|
- {
|
|
|
- class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === 0 }]),
|
|
|
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.currentTab = 0)
|
|
|
- },
|
|
|
- [
|
|
|
- vue.createElementVNode("text", { class: "tab-text" }, "免密登录"),
|
|
|
- _ctx.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
|
- key: 0,
|
|
|
- class: "tab-indicator"
|
|
|
- })) : vue.createCommentVNode("v-if", true)
|
|
|
- ],
|
|
|
- 2
|
|
|
- /* CLASS */
|
|
|
- ),
|
|
|
- vue.createElementVNode("view", { class: "divider" }),
|
|
|
- vue.createElementVNode(
|
|
|
- "view",
|
|
|
- {
|
|
|
- class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === 1 }]),
|
|
|
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.currentTab = 1)
|
|
|
- },
|
|
|
- [
|
|
|
- vue.createElementVNode("text", { class: "tab-text" }, "密码登录"),
|
|
|
- _ctx.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
|
- key: 0,
|
|
|
- class: "tab-indicator"
|
|
|
- })) : vue.createCommentVNode("v-if", true)
|
|
|
- ],
|
|
|
- 2
|
|
|
- /* CLASS */
|
|
|
- )
|
|
|
+ vue.createElementVNode("view", { class: "tab-item active" }, [
|
|
|
+ vue.createElementVNode("text", { class: "tab-text" }, "密码登录"),
|
|
|
+ vue.createElementVNode("view", { class: "tab-indicator" })
|
|
|
+ ])
|
|
|
]),
|
|
|
vue.createElementVNode("view", { class: "form-area" }, [
|
|
|
vue.createElementVNode("view", { class: "input-group" }, [
|
|
|
@@ -432,7 +374,7 @@ if (uni.restoreGlobal) {
|
|
|
type: "number",
|
|
|
placeholder: "手机号",
|
|
|
"placeholder-style": "color: #ccc",
|
|
|
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.mobile = $event),
|
|
|
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.mobile = $event),
|
|
|
maxlength: "11"
|
|
|
},
|
|
|
null,
|
|
|
@@ -442,56 +384,20 @@ if (uni.restoreGlobal) {
|
|
|
[vue.vModelText, _ctx.mobile]
|
|
|
])
|
|
|
]),
|
|
|
- _ctx.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
|
- key: 0,
|
|
|
- class: "input-group"
|
|
|
- }, [
|
|
|
- vue.withDirectives(vue.createElementVNode(
|
|
|
- "input",
|
|
|
- {
|
|
|
- class: "input",
|
|
|
- type: "number",
|
|
|
- placeholder: "验证码",
|
|
|
- "placeholder-style": "color: #ccc",
|
|
|
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.code = $event),
|
|
|
- maxlength: "6"
|
|
|
- },
|
|
|
- null,
|
|
|
- 512
|
|
|
- /* NEED_PATCH */
|
|
|
- ), [
|
|
|
- [vue.vModelText, _ctx.code]
|
|
|
- ]),
|
|
|
- vue.createElementVNode("view", {
|
|
|
- class: "get-code-btn",
|
|
|
- onClick: _cache[4] || (_cache[4] = (...args) => _ctx.getVerifyCode && _ctx.getVerifyCode(...args))
|
|
|
- }, [
|
|
|
- vue.createElementVNode(
|
|
|
- "text",
|
|
|
- { class: "code-text" },
|
|
|
- vue.toDisplayString(_ctx.countDown > 0 ? `${_ctx.countDown}s后重试` : "获取验证码"),
|
|
|
- 1
|
|
|
- /* TEXT */
|
|
|
- )
|
|
|
- ])
|
|
|
- ])) : vue.createCommentVNode("v-if", true),
|
|
|
- _ctx.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
|
- key: 1,
|
|
|
- class: "input-group"
|
|
|
- }, [
|
|
|
+ vue.createElementVNode("view", { class: "input-group" }, [
|
|
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
|
class: "input",
|
|
|
password: !_ctx.showPassword,
|
|
|
type: "text",
|
|
|
placeholder: "请输入密码",
|
|
|
"placeholder-style": "color: #ccc",
|
|
|
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.password = $event)
|
|
|
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.password = $event)
|
|
|
}, null, 8, ["password"]), [
|
|
|
[vue.vModelText, _ctx.password]
|
|
|
]),
|
|
|
vue.createElementVNode("view", {
|
|
|
class: "eye-icon",
|
|
|
- onClick: _cache[6] || (_cache[6] = ($event) => _ctx.showPassword = !_ctx.showPassword)
|
|
|
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.showPassword = !_ctx.showPassword)
|
|
|
}, [
|
|
|
_ctx.showPassword ? (vue.openBlock(), vue.createElementBlock("svg", {
|
|
|
key: 0,
|
|
|
@@ -555,25 +461,17 @@ if (uni.restoreGlobal) {
|
|
|
})
|
|
|
]))
|
|
|
])
|
|
|
- ])) : vue.createCommentVNode("v-if", true),
|
|
|
- _ctx.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
|
- key: 2,
|
|
|
- class: "forgot-pwd"
|
|
|
- }, [
|
|
|
- vue.createElementVNode("text", {
|
|
|
- onClick: _cache[7] || (_cache[7] = (...args) => _ctx.goToForgotPwd && _ctx.goToForgotPwd(...args))
|
|
|
- }, "忘记密码?")
|
|
|
- ])) : vue.createCommentVNode("v-if", true),
|
|
|
+ ]),
|
|
|
vue.createElementVNode("button", {
|
|
|
class: "login-btn",
|
|
|
- onClick: _cache[8] || (_cache[8] = (...args) => _ctx.handleLogin && _ctx.handleLogin(...args))
|
|
|
+ onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleLogin && _ctx.handleLogin(...args))
|
|
|
}, "登 录"),
|
|
|
vue.createElementVNode("view", { class: "agreement" }, [
|
|
|
vue.createElementVNode(
|
|
|
"view",
|
|
|
{
|
|
|
class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
|
|
|
- onClick: _cache[9] || (_cache[9] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
|
|
|
+ onClick: _cache[4] || (_cache[4] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
|
|
|
},
|
|
|
[
|
|
|
_ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
|
|
|
@@ -588,19 +486,19 @@ if (uni.restoreGlobal) {
|
|
|
vue.createTextVNode(" 我已经阅读并同意 "),
|
|
|
vue.createElementVNode("text", {
|
|
|
class: "link",
|
|
|
- onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => _ctx.showAgreement(1), ["stop"]))
|
|
|
+ onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => _ctx.showAgreement(1), ["stop"]))
|
|
|
}, "《用户服务协议》"),
|
|
|
vue.createTextVNode(" 和 "),
|
|
|
vue.createElementVNode("text", {
|
|
|
class: "link",
|
|
|
- onClick: _cache[11] || (_cache[11] = vue.withModifiers(($event) => _ctx.showAgreement(2), ["stop"]))
|
|
|
+ onClick: _cache[6] || (_cache[6] = vue.withModifiers(($event) => _ctx.showAgreement(2), ["stop"]))
|
|
|
}, "《隐私政策》")
|
|
|
])
|
|
|
])
|
|
|
]),
|
|
|
vue.createElementVNode("view", {
|
|
|
class: "footer-recruit",
|
|
|
- onClick: _cache[12] || (_cache[12] = (...args) => _ctx.goToRecruit && _ctx.goToRecruit(...args))
|
|
|
+ onClick: _cache[7] || (_cache[7] = (...args) => _ctx.goToRecruit && _ctx.goToRecruit(...args))
|
|
|
}, [
|
|
|
vue.createElementVNode("view", { class: "recruit-badge" }, [
|
|
|
(vue.openBlock(), vue.createElementBlock("svg", {
|
|
|
@@ -630,7 +528,7 @@ if (uni.restoreGlobal) {
|
|
|
visible: _ctx.showAgreementModal,
|
|
|
title: _ctx.agreementTitle,
|
|
|
content: _ctx.agreementContent,
|
|
|
- onClose: _cache[13] || (_cache[13] = ($event) => _ctx.showAgreementModal = false)
|
|
|
+ onClose: _cache[8] || (_cache[8] = ($event) => _ctx.showAgreementModal = false)
|
|
|
}, null, 8, ["visible", "title", "content"])
|
|
|
])
|
|
|
]);
|
|
|
@@ -1038,32 +936,31 @@ if (uni.restoreGlobal) {
|
|
|
}
|
|
|
},
|
|
|
// 验证码
|
|
|
- async getVerifyCode() {
|
|
|
- if (this.countDown > 0)
|
|
|
- return;
|
|
|
- if (!this.formData.mobile || this.formData.mobile.length !== 11) {
|
|
|
- uni.showToast({ title: "请输入正确的手机号", icon: "none" });
|
|
|
- return;
|
|
|
- }
|
|
|
- try {
|
|
|
- const res = await sendSmsCode(this.formData.mobile);
|
|
|
- this.countDown = 60;
|
|
|
- this.timer = setInterval(() => {
|
|
|
- this.countDown--;
|
|
|
- if (this.countDown <= 0)
|
|
|
- clearInterval(this.timer);
|
|
|
- }, 1e3);
|
|
|
- const devCode = res.data;
|
|
|
- if (devCode) {
|
|
|
- this.formData.code = devCode;
|
|
|
- uni.showToast({ title: "验证码: " + devCode, icon: "none", duration: 3e3 });
|
|
|
- } else {
|
|
|
- uni.showToast({ title: "验证码已发送", icon: "none" });
|
|
|
+ /* async getVerifyCode() {
|
|
|
+ if (this.countDown > 0) return;
|
|
|
+ if (!this.formData.mobile || this.formData.mobile.length !== 11) {
|
|
|
+ uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
|
|
|
+ return;
|
|
|
}
|
|
|
- } catch (err) {
|
|
|
- formatAppLog("error", "at pages/recruit/logic.js:168", "发送验证码失败:", err);
|
|
|
- }
|
|
|
- },
|
|
|
+ try {
|
|
|
+ const res = await sendSmsCode(this.formData.mobile);
|
|
|
+ this.countDown = 60;
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.countDown--;
|
|
|
+ if (this.countDown <= 0) clearInterval(this.timer);
|
|
|
+ }, 1000);
|
|
|
+ // TODO 【生产环境必须删除】开发模式自动填入验证码
|
|
|
+ const devCode = res.data;
|
|
|
+ if (devCode) {
|
|
|
+ this.formData.code = devCode;
|
|
|
+ uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
|
|
|
+ } else {
|
|
|
+ uni.showToast({ title: '验证码已发送', icon: 'none' });
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ __f__('error','at pages/recruit/logic.js:168','发送验证码失败:', err);
|
|
|
+ }
|
|
|
+ }, */
|
|
|
// 城市选择器 logic(从后端加载)
|
|
|
async openCityPicker() {
|
|
|
this.showCityPicker = true;
|
|
|
@@ -1221,35 +1118,6 @@ if (uni.restoreGlobal) {
|
|
|
])
|
|
|
])
|
|
|
]),
|
|
|
- vue.createElementVNode("view", { class: "form-item" }, [
|
|
|
- vue.createElementVNode("text", { class: "label" }, "验证码"),
|
|
|
- vue.createElementVNode("view", { class: "input-box" }, [
|
|
|
- vue.withDirectives(vue.createElementVNode(
|
|
|
- "input",
|
|
|
- {
|
|
|
- class: "input",
|
|
|
- type: "number",
|
|
|
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.code = $event),
|
|
|
- placeholder: "验证码"
|
|
|
- },
|
|
|
- null,
|
|
|
- 512
|
|
|
- /* NEED_PATCH */
|
|
|
- ), [
|
|
|
- [vue.vModelText, _ctx.formData.code]
|
|
|
- ]),
|
|
|
- vue.createElementVNode(
|
|
|
- "text",
|
|
|
- {
|
|
|
- class: "get-code-text",
|
|
|
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.getVerifyCode && _ctx.getVerifyCode(...args))
|
|
|
- },
|
|
|
- vue.toDisplayString(_ctx.countDown > 0 ? _ctx.countDown + "s" : "获取验证码"),
|
|
|
- 1
|
|
|
- /* TEXT */
|
|
|
- )
|
|
|
- ])
|
|
|
- ]),
|
|
|
vue.createElementVNode("view", { class: "form-item" }, [
|
|
|
vue.createElementVNode("text", { class: "label" }, "姓名"),
|
|
|
vue.createElementVNode("view", { class: "input-box" }, [
|
|
|
@@ -1258,7 +1126,7 @@ if (uni.restoreGlobal) {
|
|
|
{
|
|
|
class: "input",
|
|
|
type: "text",
|
|
|
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.formData.name = $event)
|
|
|
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.name = $event)
|
|
|
},
|
|
|
null,
|
|
|
512
|
|
|
@@ -1273,7 +1141,7 @@ if (uni.restoreGlobal) {
|
|
|
vue.createElementVNode("view", { class: "gender-group" }, [
|
|
|
vue.createElementVNode("view", {
|
|
|
class: "radio-item",
|
|
|
- onClick: _cache[4] || (_cache[4] = ($event) => _ctx.formData.gender = 1)
|
|
|
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.formData.gender = 1)
|
|
|
}, [
|
|
|
vue.createElementVNode(
|
|
|
"text",
|
|
|
@@ -1296,7 +1164,7 @@ if (uni.restoreGlobal) {
|
|
|
]),
|
|
|
vue.createElementVNode("view", {
|
|
|
class: "radio-item",
|
|
|
- onClick: _cache[5] || (_cache[5] = ($event) => _ctx.formData.gender = 2)
|
|
|
+ onClick: _cache[3] || (_cache[3] = ($event) => _ctx.formData.gender = 2)
|
|
|
}, [
|
|
|
vue.createElementVNode(
|
|
|
"text",
|
|
|
@@ -1323,7 +1191,7 @@ if (uni.restoreGlobal) {
|
|
|
vue.createElementVNode("text", { class: "label" }, "生日"),
|
|
|
vue.createElementVNode("view", {
|
|
|
class: "input-box",
|
|
|
- onClick: _cache[6] || (_cache[6] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
|
|
|
+ onClick: _cache[4] || (_cache[4] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
|
|
|
}, [
|
|
|
vue.createElementVNode(
|
|
|
"text",
|
|
|
@@ -1352,14 +1220,14 @@ if (uni.restoreGlobal) {
|
|
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
|
class: "input",
|
|
|
password: !_ctx.showPwd,
|
|
|
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => _ctx.formData.password = $event),
|
|
|
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.formData.password = $event),
|
|
|
placeholder: "设置登录密码"
|
|
|
}, null, 8, ["password"]), [
|
|
|
[vue.vModelText, _ctx.formData.password]
|
|
|
]),
|
|
|
vue.createElementVNode("view", {
|
|
|
class: "monkey-icon",
|
|
|
- onClick: _cache[8] || (_cache[8] = ($event) => _ctx.showPwd = !_ctx.showPwd)
|
|
|
+ onClick: _cache[6] || (_cache[6] = ($event) => _ctx.showPwd = !_ctx.showPwd)
|
|
|
}, [
|
|
|
_ctx.showPwd ? (vue.openBlock(), vue.createElementBlock("svg", {
|
|
|
key: 0,
|
|
|
@@ -1447,7 +1315,7 @@ if (uni.restoreGlobal) {
|
|
|
vue.createElementVNode("text", { class: "label" }, "工作城市"),
|
|
|
vue.createElementVNode("view", {
|
|
|
class: "input-box",
|
|
|
- onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openCityPicker && _ctx.openCityPicker(...args))
|
|
|
+ onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openCityPicker && _ctx.openCityPicker(...args))
|
|
|
}, [
|
|
|
vue.createElementVNode(
|
|
|
"text",
|
|
|
@@ -1476,7 +1344,7 @@ if (uni.restoreGlobal) {
|
|
|
vue.createElementVNode("text", { class: "label" }, "服务站点"),
|
|
|
vue.createElementVNode("view", {
|
|
|
class: "input-box",
|
|
|
- onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openStationPicker && _ctx.openStationPicker(...args))
|
|
|
+ onClick: _cache[8] || (_cache[8] = (...args) => _ctx.openStationPicker && _ctx.openStationPicker(...args))
|
|
|
}, [
|
|
|
vue.createElementVNode(
|
|
|
"text",
|
|
|
@@ -1506,23 +1374,23 @@ if (uni.restoreGlobal) {
|
|
|
"view",
|
|
|
{
|
|
|
class: vue.normalizeClass(["picker-mask", { show: _ctx.showCityPicker }]),
|
|
|
- onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
|
|
|
+ onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
|
|
|
},
|
|
|
[
|
|
|
vue.createElementVNode("view", {
|
|
|
class: "picker-content",
|
|
|
- onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
|
|
|
+ onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
|
|
|
}, ["stop"]))
|
|
|
}, [
|
|
|
vue.createElementVNode("view", { class: "picker-header" }, [
|
|
|
vue.createElementVNode("text", {
|
|
|
class: "picker-btn-cancel",
|
|
|
- onClick: _cache[11] || (_cache[11] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
|
|
|
+ onClick: _cache[9] || (_cache[9] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
|
|
|
}, "取消"),
|
|
|
vue.createElementVNode("text", { class: "picker-title" }, "请选择工作城市"),
|
|
|
vue.createElementVNode("text", {
|
|
|
class: "picker-btn-confirm",
|
|
|
- onClick: _cache[12] || (_cache[12] = (...args) => _ctx.confirmCity && _ctx.confirmCity(...args))
|
|
|
+ onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmCity && _ctx.confirmCity(...args))
|
|
|
}, "确定")
|
|
|
]),
|
|
|
vue.createElementVNode("view", { class: "picker-body" }, [
|
|
|
@@ -1589,12 +1457,12 @@ if (uni.restoreGlobal) {
|
|
|
"view",
|
|
|
{
|
|
|
class: vue.normalizeClass(["picker-mask", { show: _ctx.showStationPicker }]),
|
|
|
- onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
|
|
|
+ onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
|
|
|
},
|
|
|
[
|
|
|
vue.createElementVNode("view", {
|
|
|
class: "picker-content",
|
|
|
- onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
|
|
|
+ onClick: _cache[14] || (_cache[14] = vue.withModifiers(() => {
|
|
|
}, ["stop"]))
|
|
|
}, [
|
|
|
vue.createElementVNode("view", {
|
|
|
@@ -1604,7 +1472,7 @@ if (uni.restoreGlobal) {
|
|
|
vue.createElementVNode("text", {
|
|
|
class: "picker-btn-cancel",
|
|
|
style: { "position": "absolute", "left": "30rpx" },
|
|
|
- onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
|
|
|
+ onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
|
|
|
}, "取消"),
|
|
|
vue.createElementVNode("text", { class: "picker-title" }, "选择服务站点")
|
|
|
]),
|
|
|
@@ -1637,7 +1505,7 @@ if (uni.restoreGlobal) {
|
|
|
"view",
|
|
|
{
|
|
|
class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
|
|
|
- onClick: _cache[18] || (_cache[18] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
|
|
|
+ onClick: _cache[16] || (_cache[16] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
|
|
|
},
|
|
|
[
|
|
|
_ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
|
|
|
@@ -1652,14 +1520,14 @@ if (uni.restoreGlobal) {
|
|
|
vue.createTextVNode("我已阅读并同意 "),
|
|
|
vue.createElementVNode("text", {
|
|
|
style: { "color": "#2979ff" },
|
|
|
- onClick: _cache[19] || (_cache[19] = vue.withModifiers((...args) => _ctx.openPrivacy && _ctx.openPrivacy(...args), ["stop"]))
|
|
|
+ onClick: _cache[17] || (_cache[17] = vue.withModifiers((...args) => _ctx.openPrivacy && _ctx.openPrivacy(...args), ["stop"]))
|
|
|
}, "《宠宝履约者说明》")
|
|
|
])
|
|
|
]),
|
|
|
vue.createElementVNode("view", { class: "footer-btn-area" }, [
|
|
|
vue.createElementVNode("button", {
|
|
|
class: "submit-btn",
|
|
|
- onClick: _cache[20] || (_cache[20] = (...args) => _ctx.goToAuth && _ctx.goToAuth(...args))
|
|
|
+ onClick: _cache[18] || (_cache[18] = (...args) => _ctx.goToAuth && _ctx.goToAuth(...args))
|
|
|
}, "下一步,实名认证")
|
|
|
])
|
|
|
]),
|
|
|
@@ -1667,30 +1535,30 @@ if (uni.restoreGlobal) {
|
|
|
"view",
|
|
|
{
|
|
|
class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
|
|
|
- onClick: _cache[25] || (_cache[25] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
|
|
|
+ onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
|
|
|
},
|
|
|
[
|
|
|
vue.createElementVNode("view", {
|
|
|
class: "picker-content",
|
|
|
- onClick: _cache[24] || (_cache[24] = vue.withModifiers(() => {
|
|
|
+ onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
|
|
|
}, ["stop"]))
|
|
|
}, [
|
|
|
vue.createElementVNode("view", { class: "picker-header" }, [
|
|
|
vue.createElementVNode("text", {
|
|
|
class: "picker-btn-cancel",
|
|
|
- onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
|
|
|
+ onClick: _cache[19] || (_cache[19] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
|
|
|
}, "取消"),
|
|
|
vue.createElementVNode("text", { class: "picker-title" }, "选择出生日期"),
|
|
|
vue.createElementVNode("text", {
|
|
|
class: "picker-btn-confirm",
|
|
|
- onClick: _cache[22] || (_cache[22] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
|
|
|
+ onClick: _cache[20] || (_cache[20] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
|
|
|
}, "确定")
|
|
|
]),
|
|
|
vue.createElementVNode("picker-view", {
|
|
|
class: "picker-view",
|
|
|
"indicator-style": "height: 50px;",
|
|
|
value: _ctx.pickerValue,
|
|
|
- onChange: _cache[23] || (_cache[23] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
|
|
|
+ onChange: _cache[21] || (_cache[21] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
|
|
|
}, [
|
|
|
vue.createElementVNode("picker-view-column", null, [
|
|
|
(vue.openBlock(true), vue.createElementBlock(
|
|
|
@@ -1762,7 +1630,7 @@ if (uni.restoreGlobal) {
|
|
|
visible: _ctx.showPrivacy,
|
|
|
title: _ctx.privacyTitle,
|
|
|
content: _ctx.privacyContent,
|
|
|
- onClose: _cache[26] || (_cache[26] = ($event) => _ctx.showPrivacy = false)
|
|
|
+ onClose: _cache[24] || (_cache[24] = ($event) => _ctx.showPrivacy = false)
|
|
|
}, null, 8, ["visible", "title", "content"])
|
|
|
]);
|
|
|
}
|
|
|
@@ -2673,8 +2541,8 @@ if (uni.restoreGlobal) {
|
|
|
orderStats: {
|
|
|
total: 0,
|
|
|
reject: 0,
|
|
|
- award: 0,
|
|
|
- punishment: 0
|
|
|
+ completed: 0,
|
|
|
+ price: 0
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
@@ -2738,7 +2606,7 @@ if (uni.restoreGlobal) {
|
|
|
async loadOrderStats() {
|
|
|
try {
|
|
|
const res = await getOrderCount();
|
|
|
- this.orderStats = res.data || { total: 0, reject: 0, award: 0, punishment: 0 };
|
|
|
+ this.orderStats = res.data || { total: 0, reject: 0, completed: 0, price: 0 };
|
|
|
} catch (err) {
|
|
|
formatAppLog("error", "at pages/home/logic.js:118", "获取订单统计失败:", err);
|
|
|
}
|
|
|
@@ -2809,8 +2677,9 @@ if (uni.restoreGlobal) {
|
|
|
this.showRejectModal = false;
|
|
|
this.currentOrder = null;
|
|
|
this.loadTaskList();
|
|
|
+ this.loadOrderStats();
|
|
|
} catch (err) {
|
|
|
- formatAppLog("error", "at pages/home/logic.js:186", "拒绝接单失败:", err);
|
|
|
+ formatAppLog("error", "at pages/home/logic.js:187", "拒绝接单失败:", err);
|
|
|
uni.showToast({ title: "操作失败", icon: "none" });
|
|
|
} finally {
|
|
|
uni.hideLoading();
|
|
|
@@ -2835,8 +2704,9 @@ if (uni.restoreGlobal) {
|
|
|
this.currentOrder = null;
|
|
|
this.loadTaskList();
|
|
|
this.loadProfile();
|
|
|
+ this.loadOrderStats();
|
|
|
} catch (err) {
|
|
|
- formatAppLog("error", "at pages/home/logic.js:210", "接单失败:", err);
|
|
|
+ formatAppLog("error", "at pages/home/logic.js:212", "接单失败:", err);
|
|
|
uni.showToast({ title: "接单失败", icon: "none" });
|
|
|
}
|
|
|
},
|
|
|
@@ -2862,7 +2732,7 @@ if (uni.restoreGlobal) {
|
|
|
name: name || "目的地",
|
|
|
address: address || "默认地址",
|
|
|
success: function() {
|
|
|
- formatAppLog("log", "at pages/home/logic.js:236", "打开导航成功: " + mapType);
|
|
|
+ formatAppLog("log", "at pages/home/logic.js:238", "打开导航成功: " + mapType);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -2891,7 +2761,7 @@ if (uni.restoreGlobal) {
|
|
|
this.isFilterShow = false;
|
|
|
},
|
|
|
goToDetail(item) {
|
|
|
- formatAppLog("log", "at pages/home/logic.js:265", "Go to detail", item);
|
|
|
+ formatAppLog("log", "at pages/home/logic.js:267", "Go to detail", item);
|
|
|
},
|
|
|
async loadTaskList() {
|
|
|
try {
|
|
|
@@ -2905,7 +2775,7 @@ if (uni.restoreGlobal) {
|
|
|
const res = await getPendingOrders(params);
|
|
|
this.taskList = (res.rows || []).map((item) => this.transformOrder(item));
|
|
|
} catch (err) {
|
|
|
- formatAppLog("error", "at pages/home/logic.js:279", "获取订单列表失败:", err);
|
|
|
+ formatAppLog("error", "at pages/home/logic.js:281", "获取订单列表失败:", err);
|
|
|
uni.showToast({ title: "加载失败", icon: "none" });
|
|
|
this.taskList = [];
|
|
|
}
|
|
|
@@ -2946,7 +2816,8 @@ if (uni.restoreGlobal) {
|
|
|
price: (item.price / 100).toFixed(2),
|
|
|
timeLabel: "服务时间",
|
|
|
time: item.serviceTime,
|
|
|
- petAvatar: "/static/dog.png",
|
|
|
+ petAvatar: item.petAvatar || "/static/dog.png",
|
|
|
+ petAvatarUrl: item.petAvatarUrl || "",
|
|
|
petName: item.petName,
|
|
|
petBreed: item.breed,
|
|
|
petGender: "M",
|
|
|
@@ -3085,7 +2956,7 @@ if (uni.restoreGlobal) {
|
|
|
1
|
|
|
/* TEXT */
|
|
|
),
|
|
|
- vue.createElementVNode("text", { class: "label" }, "累计接单")
|
|
|
+ vue.createElementVNode("text", { class: "label" }, "全部订单")
|
|
|
]),
|
|
|
vue.createElementVNode("view", { class: "divider" }),
|
|
|
vue.createElementVNode("view", { class: "stat-item" }, [
|
|
|
@@ -3103,22 +2974,22 @@ if (uni.restoreGlobal) {
|
|
|
vue.createElementVNode(
|
|
|
"text",
|
|
|
{ class: "num" },
|
|
|
- vue.toDisplayString(_ctx.orderStats.award),
|
|
|
+ vue.toDisplayString(_ctx.orderStats.completed),
|
|
|
1
|
|
|
/* TEXT */
|
|
|
),
|
|
|
- vue.createElementVNode("text", { class: "label" }, "奖励订单")
|
|
|
+ vue.createElementVNode("text", { class: "label" }, "完成订单")
|
|
|
]),
|
|
|
vue.createElementVNode("view", { class: "divider" }),
|
|
|
vue.createElementVNode("view", { class: "stat-item" }, [
|
|
|
vue.createElementVNode(
|
|
|
"text",
|
|
|
{ class: "num" },
|
|
|
- vue.toDisplayString(_ctx.orderStats.punishment),
|
|
|
+ vue.toDisplayString((_ctx.orderStats.price / 100).toFixed(2)),
|
|
|
1
|
|
|
/* TEXT */
|
|
|
),
|
|
|
- vue.createElementVNode("text", { class: "label" }, "惩罚订单")
|
|
|
+ vue.createElementVNode("text", { class: "label" }, "服务总得")
|
|
|
])
|
|
|
])
|
|
|
]),
|
|
|
@@ -3316,7 +3187,7 @@ if (uni.restoreGlobal) {
|
|
|
vue.createElementVNode("view", { class: "pet-card" }, [
|
|
|
vue.createElementVNode("image", {
|
|
|
class: "pet-avatar",
|
|
|
- src: item.petAvatar,
|
|
|
+ src: item.petAvatarUrl || item.petAvatar,
|
|
|
mode: "aspectFill"
|
|
|
}, null, 8, ["src"]),
|
|
|
vue.createElementVNode("view", { class: "pet-info" }, [
|
|
|
@@ -3980,7 +3851,8 @@ if (uni.restoreGlobal) {
|
|
|
price: (order.price / 100).toFixed(2),
|
|
|
timeLabel: "服务时间",
|
|
|
time: order.serviceTime || "",
|
|
|
- petAvatar: "/static/dog.png",
|
|
|
+ petAvatar: order.petAvatar || "/static/dog.png",
|
|
|
+ petAvatarUrl: order.petAvatarUrl || "",
|
|
|
petName: order.petName || "",
|
|
|
petBreed: order.breed || "",
|
|
|
startLocation: order.fromAddress || "",
|
|
|
@@ -4058,7 +3930,7 @@ if (uni.restoreGlobal) {
|
|
|
name: name || "目的地",
|
|
|
address: address || "默认地址",
|
|
|
success: function() {
|
|
|
- formatAppLog("log", "at pages/orders/logic.js:208", "打开导航成功: " + mapType);
|
|
|
+ formatAppLog("log", "at pages/orders/logic.js:209", "打开导航成功: " + mapType);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -4226,7 +4098,7 @@ if (uni.restoreGlobal) {
|
|
|
this.loadOrders();
|
|
|
}, 1500);
|
|
|
} catch (err) {
|
|
|
- formatAppLog("error", "at pages/orders/logic.js:370", "取消订单失败:", err);
|
|
|
+ formatAppLog("error", "at pages/orders/logic.js:371", "取消订单失败:", err);
|
|
|
uni.showToast({ title: "取消失败", icon: "none" });
|
|
|
} finally {
|
|
|
uni.hideLoading();
|
|
|
@@ -4527,7 +4399,7 @@ if (uni.restoreGlobal) {
|
|
|
vue.createElementVNode("view", { class: "pet-card" }, [
|
|
|
vue.createElementVNode("image", {
|
|
|
class: "pet-avatar",
|
|
|
- src: item.petAvatar,
|
|
|
+ src: item.petAvatarUrl || item.petAvatar,
|
|
|
mode: "aspectFill"
|
|
|
}, null, 8, ["src"]),
|
|
|
vue.createElementVNode("view", { class: "pet-info" }, [
|