diff --git a/config/index.js b/config/index.js
index 0deddbd..ab089dc 100644
--- a/config/index.js
+++ b/config/index.js
@@ -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,
diff --git a/src/assets/public/url.js b/src/assets/public/url.js
index 460824f..a78418f 100644
--- a/src/assets/public/url.js
+++ b/src/assets/public/url.js
@@ -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,
diff --git a/src/pages/Index/Components/Notice.vue b/src/pages/Index/Components/Notice.vue
index c12cae3..9e9ccb1 100644
--- a/src/pages/Index/Components/Notice.vue
+++ b/src/pages/Index/Components/Notice.vue
@@ -28,7 +28,7 @@
-
+
diff --git a/src/pages/Register/Register.vue b/src/pages/Register/Register.vue
index d47877f..a75b560 100644
--- a/src/pages/Register/Register.vue
+++ b/src/pages/Register/Register.vue
@@ -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('用户名或密码不能为空')
+ }
}
}
},