增加新功能

This commit is contained in:
hejiangming
2025-03-23 20:36:06 +08:00
parent 2ae62b59ed
commit 78270eeda0
184 changed files with 2690 additions and 1496 deletions
+32 -20
View File
@@ -2,7 +2,7 @@
const common_vendor = require("../../common/vendor.js");
const utils_enumUtils = require("../../utils/enumUtils.js");
const api_common = require("../../api/common.js");
const api_login = require("../../api/login.js");
const api_auth = require("../../api/auth.js");
const utils_auth = require("../../utils/auth.js");
const InputCodeComm = () => "../../components/code-comm/code-comm.js";
const _sfc_main = {
@@ -28,8 +28,9 @@ const _sfc_main = {
// 是否显示
isPolicy: false,
// 是否同意
countdown: false
countdown: false,
// 清空倒计时
butLoading: false
};
},
methods: {
@@ -49,13 +50,16 @@ const _sfc_main = {
});
return;
}
this.butLoading = true;
let response = {};
if (this.loginWay === "password")
;
else {
if (this.loginWay === "password") {
params.mobile = form.name;
params.password = form.password;
response = await api_auth.loginbypw(params);
} else {
params.mobile = form.name;
params.smsCode = form.code;
response = await api_login.loginbysms(params);
response = await api_auth.loginbysms(params);
}
const data = response.data;
utils_auth.setStorageFun(utils_auth.TOKEN_NAME, data.token);
@@ -63,11 +67,14 @@ const _sfc_main = {
const userInfo = {
avatar: data.avatarUrl,
name: data.name,
userId: data.userId
userId: data.userId,
grade: data.grade,
inviteCode: data.inviteCode
};
utils_auth.setStorageFun(utils_auth.USER_DATA, userInfo);
let currentTimeStamp = (/* @__PURE__ */ new Date()).getTime();
utils_auth.setStorageFun(utils_auth.USER_LOGIN_TIME, currentTimeStamp);
this.butLoading = false;
this.$refs.uToastRef.show({
type: "success",
message: response.msg
@@ -77,10 +84,8 @@ const _sfc_main = {
}, 2e3);
},
checkNameParam(val) {
common_vendor.index.__f__("log", "at pages/login/login.vue:175", "val", val);
},
checkParam(val) {
common_vendor.index.__f__("log", "at pages/login/login.vue:178", "val", val);
},
/**
* 获取手机验证码
@@ -100,6 +105,7 @@ const _sfc_main = {
type: utils_enumUtils.SMS_TYPE.LOGIN
};
const response = await api_common.getUserList(params);
common_vendor.index.__f__("log", "at pages/login/login.vue:208", "responseresponseresponse", response);
if (response && response.bizcode === 100) {
this.$refs.uToastRef.show({
type: "success",
@@ -120,17 +126,19 @@ if (!Array) {
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
const _easycom_up_count_down2 = common_vendor.resolveComponent("up-count-down");
const _easycom_up_loading_icon2 = common_vendor.resolveComponent("up-loading-icon");
const _easycom_up_checkbox2 = common_vendor.resolveComponent("up-checkbox");
const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast");
(_easycom_up_image2 + _easycom_up_input2 + _easycom_up_count_down2 + _easycom_up_checkbox2 + _easycom_up_toast2)();
(_easycom_up_image2 + _easycom_up_input2 + _easycom_up_count_down2 + _easycom_up_loading_icon2 + _easycom_up_checkbox2 + _easycom_up_toast2)();
}
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
const _easycom_up_count_down = () => "../../uni_modules/uview-plus/components/u-count-down/u-count-down.js";
const _easycom_up_loading_icon = () => "../../uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.js";
const _easycom_up_checkbox = () => "../../uni_modules/uview-plus/components/u-checkbox/u-checkbox.js";
const _easycom_up_toast = () => "../../uni_modules/uview-plus/components/u-toast/u-toast.js";
if (!Math) {
(_easycom_up_image + _easycom_up_input + _easycom_up_count_down + _easycom_up_checkbox + _easycom_up_toast)();
(_easycom_up_image + _easycom_up_input + _easycom_up_count_down + _easycom_up_loading_icon + _easycom_up_checkbox + _easycom_up_toast)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
@@ -207,18 +215,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
modelValue: $data.form.code
})
}), {
v: common_vendor.o((...args) => $options.loginFun && $options.loginFun(...args)),
w: $data.loginWay === "password"
v: common_vendor.p({
color: "#FFFFFF",
show: $data.butLoading
}),
w: common_vendor.o((...args) => $options.loginFun && $options.loginFun(...args)),
x: $data.loginWay === "password"
}, $data.loginWay === "password" ? {
x: common_vendor.o(($event) => $data.loginWay = "code")
y: common_vendor.o(($event) => $data.loginWay = "code")
} : {}, {
y: $data.loginWay === "code"
z: $data.loginWay === "code"
}, $data.loginWay === "code" ? {
z: common_vendor.o(($event) => $data.loginWay = "password")
A: common_vendor.o(($event) => $data.loginWay = "password")
} : {}, {
A: common_vendor.o((...args) => $options.jumpRegister && $options.jumpRegister(...args)),
B: common_vendor.o(($event) => $data.isPolicy = $event),
C: common_vendor.p({
B: common_vendor.o((...args) => $options.jumpRegister && $options.jumpRegister(...args)),
C: common_vendor.o(($event) => $data.isPolicy = $event),
D: common_vendor.p({
name: "isCheck",
usedAlone: true,
shape: "circle",
@@ -227,7 +239,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
iconSize: "18",
checked: $data.isPolicy
}),
D: common_vendor.sr("uToastRef", "e4e4508d-9")
E: common_vendor.sr("uToastRef", "e4e4508d-10")
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-e4e4508d"]]);