weizong song 2 weeks ago
parent 14d4ea21c9
commit 7cfb609630

@ -37,8 +37,8 @@ export function getAuthMenu(token) {
export function getMsg(param) {
return request({
url: '/api/admin/auth/send-sms',
method: 'get',
params:param,
method: 'post',
data: param,
isLoading: false
})
}
@ -46,8 +46,8 @@ export function getMsg(param) {
export function loginMsg(param) {
return request({
url: '/api/admin/auth/sms-login',
method: 'get',
params:param,
method: 'post',
data: param,
isLoading: false
})
}

@ -76,14 +76,16 @@ const actions = {
loginMsg({
commit
}, userInfo) {
const {
mobile,
code
const {
mobile,
code,
challenge_id
} = userInfo
return new Promise((resolve, reject) => {
loginMsg({
mobile: mobile,
code: code
mobile: mobile,
code: code,
challenge_id: challenge_id
}).then(response => {
console.log(response)
const {

@ -96,9 +96,12 @@
hasSend: false,
count: 60,
sendTimer: null,
loginForm: {
username: '',
password: ''
loginForm: {
username: '',
password: '',
mobile: '',
code: '',
challenge_id: ''
},
loginRules: {
username: [{
@ -168,7 +171,8 @@
getMsg({
mobile: this.loginForm.mobile
}).then(res => {
this.base.showMessage("发送成功",'success')
this.base.showMessage("发送成功",'success')
this.loginForm.challenge_id = res.challenge_id
// this.$Message.success('')
// 60s
this.hasSend = true
@ -194,6 +198,10 @@
this.base.showMessage("请输入验证码",'error')
return
}
if (this.base.isNull(this.loginForm.challenge_id)) {
this.base.showMessage("请先获取验证码",'error')
return
}
this.loading = true
let that = this
this.$store.dispatch('user/loginMsg', this.loginForm).then(() => {

@ -32,7 +32,7 @@ module.exports = {
// outputDir: '/Users/mac/Documents/朗业/2024/s-苏州科技商学院/wx.sstbc.com/public/admin',
// 测试
// outputDir: '/Users/mac/Documents/朗业/2025/s-苏州科技商学院/wx.sstbc.com/public/admin',
outputDir: '/Users/mac/Documents/朗业/2026/s-苏州科技商学院/code/wx.sstbc.com/public/admin',
outputDir: '../backend/public/admin',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save