main #98

Merged
charles merged 7 commits from main into prod 2026-04-27 11:07:18 +08:00
Showing only changes of commit 89fed5a6ea - Show all commits

View File

@ -699,14 +699,14 @@ export default {
//
getCode() {
//
if (!this.loginForm.username || !/^1[3-9]\d{9}$/.test(this.loginForm.username)) {
if (!this.loginForm.mobile || !/^1[3-9]\d{9}$/.test(this.loginForm.mobile)) {
this.$message.error('请输入正确的手机号');
return;
}
// 使APImobileaction_type
getCodeAPI({
mobile: this.loginForm.username,
mobile: this.loginForm.mobile,
action_type: 'login'
}).then((res) => {
console.log(res);
@ -815,45 +815,25 @@ export default {
this.capsTooltip = key && key.length === 1 && key >= "A" && key <= "Z";
},
// -
//
handleLogin(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
// API
let apiOneIphone = {
const loginParams = {
username: this.loginForm.username,
domain_name: this.photosUrl?.domain_name ? this.photosUrl.domain_name : '',
password: this.passwordEncryption(this.loginForm.password),
mobile: this.loginForm.mobile,
vcode: this.loginForm.vcode,
codeid: this.loginForm.codeid,
wechat_openid: this.wechat_openid
}
let apiOne = {
username: this.loginForm.username,
domain_name: this.photosUrl?.domain_name ? this.photosUrl.domain_name : '',
password: this.passwordEncryption(this.loginForm.password),
wechat_openid: this.wechat_openid
}
let apiTwoIphone = {
username: this.loginForm.username,
vcode: this.loginForm.vcode,
codeid: this.loginForm.codeid,
wechat_openid: this.wechat_openid
}
let apiTwo = {
username: this.loginForm.username,
password: this.passwordEncryption(this.loginForm.password),
}
// API
logintypeAPI(this.loginType === '0' ? apiOne : apiOneIphone).then(res => {
logintypeAPI(loginParams).then(res => {
if (res.status == true) {
this.loading = true;
//
this.$store
.dispatch("user/login", this.loginType === '0' ? apiTwo : apiTwoIphone)
.dispatch("user/login", loginParams)
.then((res) => {
this.loading = false;