'1207'
This commit is contained in:
parent
457c8fb9f1
commit
dbb1723309
@ -13,7 +13,7 @@ module.exports = {
|
||||
proxyTable: {},
|
||||
|
||||
// Various Dev Server settings
|
||||
host: '192.168.0.106', // can be overwritten by process.env.HOST
|
||||
host: '192.168.1.8', // can be overwritten by process.env.HOST
|
||||
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||
autoOpenBrowser: false,
|
||||
errorOverlay: true,
|
||||
|
@ -1,11 +1,15 @@
|
||||
const registerUrl = 'https://www.yjkaoshi.cn/signup/'
|
||||
const loginUrl = 'https://www.yjkaoshi.cn/signup/'
|
||||
const signUrl = 'https://www.yjkaoshi.cn/signup/'
|
||||
const personInfoUrl = 'https://www.yjkaoshi.cn/signup/'
|
||||
// const registerUrl = 'http://192.168.0.109:8070/signup/'
|
||||
// const loginUrl = 'http://192.168.0.109:8070/signup/'
|
||||
// const signUrl = 'http://192.168.0.109:8070/signup/'
|
||||
// const personInfoUrl = 'http://192.168.0.109:8070/signup/'
|
||||
// const registerUrl = 'https://www.yjkaoshi.cn/signup/'
|
||||
// const loginUrl = 'https://www.yjkaoshi.cn/signup/'
|
||||
// const signUrl = 'https://www.yjkaoshi.cn/signup/'
|
||||
// const personInfoUrl = 'https://www.yjkaoshi.cn/signup/'
|
||||
const registerUrl = 'http://1.180.60.42:8092/signup/'
|
||||
const loginUrl = 'http://1.180.60.42:8092/signup/'
|
||||
const signUrl = 'http://1.180.60.42:8092/signup/'
|
||||
const personInfoUrl = 'http://1.180.60.42:8092/signup/'
|
||||
// const registerUrl = 'http://175.24.42.217:9101/signup/'
|
||||
// const loginUrl = 'http://175.24.42.217:9101/signup/'
|
||||
// const signUrl = 'http://175.24.42.217:9101/signup/'
|
||||
// const personInfoUrl = 'http://175.24.42.217:9101/signup/'
|
||||
export default {
|
||||
registerUrl,
|
||||
loginUrl,
|
||||
|
@ -28,7 +28,7 @@
|
||||
<router-link to="/login">
|
||||
<img src="@/assets/images/login-box1.png" alt="">
|
||||
</router-link>
|
||||
<a href="https://www.yjkaoshi.cn/signup/" target="_blank">
|
||||
<a href="http://1.180.60.42:8092/signup/" target="_blank">
|
||||
<img src="@/assets/images/login-box2.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
|
@ -44,46 +44,49 @@ export default {
|
||||
var self = this
|
||||
var reg=/^[1][3,4,5,6,7,8,9][0-9]{9}$/;
|
||||
var pwdReg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]*$/;
|
||||
if (!self.registerInfo.username) {
|
||||
self.$layer.msg('用户名不能为空')
|
||||
return
|
||||
}
|
||||
if (!self.registerInfo.password) {
|
||||
self.$layer.msg('密码不能为空')
|
||||
return
|
||||
}
|
||||
if (!self.registerInfo.passwordSame) {
|
||||
self.$layer.msg('请再次输入密码')
|
||||
return
|
||||
}
|
||||
if (!reg.test(self.registerInfo.username)) {
|
||||
self.$layer.msg('用户名应为有效手机号码')
|
||||
return
|
||||
}
|
||||
if (self.registerInfo.password != self.registerInfo.passwordSame) {
|
||||
self.$layer.msg('两次输入的密码不一致')
|
||||
return
|
||||
}
|
||||
if (!pwdReg.test(self.registerInfo.password)) {
|
||||
self.$layer.msg('密码应由字母和数字组成')
|
||||
return
|
||||
}
|
||||
if (self.registerInfo.username && self.registerInfo.password && self.registerInfo.passwordSame) {
|
||||
self.isLoading = true
|
||||
axios.post(self.url + 'app/register/default', self.registerInfo).then(function (res) {
|
||||
if (res.status == '200') {
|
||||
if (!self.isLoading) {
|
||||
if (!self.registerInfo.username) {
|
||||
self.$layer.msg('用户名不能为空')
|
||||
return
|
||||
}
|
||||
if (!self.registerInfo.password) {
|
||||
self.$layer.msg('密码不能为空')
|
||||
return
|
||||
}
|
||||
if (!self.registerInfo.passwordSame) {
|
||||
self.$layer.msg('请再次输入密码')
|
||||
return
|
||||
}
|
||||
if (!reg.test(self.registerInfo.username)) {
|
||||
self.$layer.msg('用户名应为有效手机号码')
|
||||
return
|
||||
}
|
||||
if (self.registerInfo.password != self.registerInfo.passwordSame) {
|
||||
self.$layer.msg('两次输入的密码不一致')
|
||||
return
|
||||
}
|
||||
if (!pwdReg.test(self.registerInfo.password)) {
|
||||
self.$layer.msg('密码应由字母和数字组成')
|
||||
return
|
||||
}
|
||||
if (self.registerInfo.username && self.registerInfo.password && self.registerInfo.passwordSame) {
|
||||
self.isLoading = true
|
||||
axios.post(self.url + 'app/register/default', self.registerInfo).then(function (res) {
|
||||
if (res.status == '200') {
|
||||
self.isLoading = false
|
||||
self.$layer.msg('注册成功')
|
||||
setTimeout(function () {
|
||||
self.$router.push('/login')
|
||||
}, 1500)
|
||||
}
|
||||
}).catch(function (error) {
|
||||
// self.$layer.msg(error.response.data.message)
|
||||
self.$layer.msg('用户名可能已存在')
|
||||
self.isLoading = false
|
||||
self.$layer.msg('注册成功')
|
||||
setTimeout(function () {
|
||||
self.$router.push('/login')
|
||||
}, 1500)
|
||||
}
|
||||
}).catch(function (error) {
|
||||
self.$layer.msg(error.response.data.msg)
|
||||
self.isLoading = false
|
||||
})
|
||||
} else {
|
||||
self.$layer.msg('用户名或密码不能为空')
|
||||
})
|
||||
} else {
|
||||
self.$layer.msg('用户名或密码不能为空')
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user