diff --git a/config.js b/config.js index eba1e12..80b1294 100644 --- a/config.js +++ b/config.js @@ -2,14 +2,14 @@ var app_url = 'https://cogapi.scszsj.com'; // 如果是本地测试环境 if(process.env.NODE_ENV === 'development'){ //#ifdef H5 - app_url = 'http://gg.com/index.php'; //http://cogapitest.scszsj.com http://gg.com/index.php + app_url = 'http://cogapitest.scszsj.com'; //http://cogapitest.scszsj.com http://gg.com/index.php //#endif } // 如果是生产环境,h5环境下直接读取url if(process.env.NODE_ENV === 'production'){ //#ifdef H5 // app_url = window.location.protocol+'//' + window.location.host+'/index.php'; http://cogapitest.scszsj.com https://cogapi.scszsj.com - app_url = 'http://gg.com/index.php'; + app_url = 'http://cogapitest.scszsj.com'; //#endif } diff --git a/pages/login.vue b/pages/login.vue index aa5488d..c0e1e39 100644 --- a/pages/login.vue +++ b/pages/login.vue @@ -111,9 +111,7 @@ }, methods:{ getCaptcha(){ - this._get('user.Login/generateCaptcha',{ - timestamp: '1784172260', - signature: '1547f362dca32f7f7cbacb1b0c4661906b2d5e6a5bac3b322331f11d8ae7d7cd', + this._get('user.Useropen/generateCaptcha',{ },res=>{ console.log(res,33) if(res.code==1){ @@ -179,7 +177,7 @@ return; } - this._post('user.Login/sendCode',{ + this._post('user.Useropen/sendCode',{ mobile: this.formData.mobile, type: 'login', },res=>{ @@ -236,7 +234,7 @@ }) return; } - this._post('user.Login/smslogin',{ + this._post('user.Useropen/smslogin',{ mobile: this.formData.mobile, code: this.formData.code, captcha: this.formData.captcha, @@ -298,13 +296,11 @@ }) return; } - this._post('user.Login/phonelogin',{ + this._post('user.Useropen/phonelogin',{ mobile: this.formData.mobile, password: this.formData.password, captcha: this.formData.captcha, captchaKey: this.formData.captchaKey, - timestamp: '1784172260', - signature: '1547f362dca32f7f7cbacb1b0c4661906b2d5e6a5bac3b322331f11d8ae7d7cd', },res=>{ uni.setStorageSync('token',res.data.token) uni.showToast({ diff --git a/pages/login - 副本.vue b/pages/login111.vue similarity index 96% rename from pages/login - 副本.vue rename to pages/login111.vue index c0e1e39..aa5488d 100644 --- a/pages/login - 副本.vue +++ b/pages/login111.vue @@ -111,7 +111,9 @@ }, methods:{ getCaptcha(){ - this._get('user.Useropen/generateCaptcha',{ + this._get('user.Login/generateCaptcha',{ + timestamp: '1784172260', + signature: '1547f362dca32f7f7cbacb1b0c4661906b2d5e6a5bac3b322331f11d8ae7d7cd', },res=>{ console.log(res,33) if(res.code==1){ @@ -177,7 +179,7 @@ return; } - this._post('user.Useropen/sendCode',{ + this._post('user.Login/sendCode',{ mobile: this.formData.mobile, type: 'login', },res=>{ @@ -234,7 +236,7 @@ }) return; } - this._post('user.Useropen/smslogin',{ + this._post('user.Login/smslogin',{ mobile: this.formData.mobile, code: this.formData.code, captcha: this.formData.captcha, @@ -296,11 +298,13 @@ }) return; } - this._post('user.Useropen/phonelogin',{ + this._post('user.Login/phonelogin',{ mobile: this.formData.mobile, password: this.formData.password, captcha: this.formData.captcha, captchaKey: this.formData.captchaKey, + timestamp: '1784172260', + signature: '1547f362dca32f7f7cbacb1b0c4661906b2d5e6a5bac3b322331f11d8ae7d7cd', },res=>{ uni.setStorageSync('token',res.data.token) uni.showToast({