ccj hace 3 años
padre
commit
b1e0d3d81a

+ 2 - 2
config/index.js

@@ -1,8 +1,8 @@
 const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
-	// baseUrlNew: 'http://192.168.1.120:8090/',
+	// baseUrlNew: 'http://192.168.1.103:8090/',
 	// baseUrlNew: 'http://192.168.1.103:9100/',
-	baseUrlNew: 'http://api1.eliangeyun.com/',
+	baseUrlNew: 'https://apitest.eliangeyun.com/',
 	// baseUrlNew: 'http://api1.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false

+ 1 - 0
pages/erpbusiness/QRCode/QRCode.vue

@@ -20,6 +20,7 @@
 		},
 		onReady() {
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
+				console.log("checkSession",res)
 					if (res.data.data == "INVALID") {
 						uni.showModal({
 							title: "登录提示",

+ 2 - 1
pages/public/code.vue

@@ -175,7 +175,8 @@
 							veriCode: "123456",}).then(res1 => {
 								if(res1.data.code==200){
 									uni.setStorageSync('pcUserInfo', res1.data.data)
-								}else{
+								}
+								else{
 									that.$api.doRequest('post','/commonUser/api/loginQuickly',{mobilePhone: '13333333333',
 									veriCode: "123456",}).then(res2 => {
 										uni.setStorageSync('pcUserInfo', res2.data.data)

+ 4 - 1
pages/public/login_account_number.vue

@@ -109,12 +109,15 @@
 				console.log("clinetId",this.clientId)
 				this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password,cid:this.clientId}).then(res => {
 					if(res.data.code==200){
+						console.log("userInfo",res.data.data)
 						uni.setStorageSync('userInfo', res.data.data)
 						this.$api.doRequest('post','/commonUser/api/loginQuickly',{mobilePhone: this.phone,
 						veriCode: "123456",}).then(res1 => {
+							console.log("loginQuickly",res)
 							if(res1.data.code==200){
 								uni.setStorageSync('pcUserInfo', res1.data.data)
-							}else{
+							}
+							else{
 								that.$api.doRequest('post','/commonUser/api/loginQuickly',{mobilePhone: '13333333333',
 								veriCode: "123456",}).then(res2 => {
 									uni.setStorageSync('pcUserInfo', res2.data.data)

+ 2 - 1
pages/public/register.vue

@@ -227,7 +227,8 @@
 							veriCode: "123456",}).then(res1 => {
 									if(res1.data.code==200){
 										uni.setStorageSync('pcUserInfo', res1.data.data)
-									}else{
+									}
+									else{
 										that.$api.doRequest('post','/commonUser/api/loginQuickly',{mobilePhone: '13333333333',
 										veriCode: "123456",}).then(res2 => {
 											uni.setStorageSync('pcUserInfo', res2.data.data)

+ 19 - 8
websocket_sdk.js

@@ -265,22 +265,33 @@ export default class Websocket {
 				userInfo = uni.getStorageSync('userInfo')
 			}
 			var pcUserInfo=uni.getStorageSync('pcUserInfo')
-			if(!pcUserInfo){
+			if(!pcUserInfo && userInfo){
 				uni.request({
-					url: baseUrlNew + '/auth/api/loginEnhanced',
+					url: baseUrlNew + '/commonUser/api/loginQuickly',
 					data: {
-						// companyName: "佳屹农",
-						// password: "y123456",
-						// username: "jyn"
-						companyName: "易粮易运",
-						password: "y123456",
-						username: "13333333333"
+						mobilePhone: userInfo.phone,
+						veriCode: "123456",
 					},
 					method: 'POST',
 					success: (res) => {						
 						if (res.statusCode === 200) {
 							uni.setStorageSync('pcUserInfo', res.data)
 						}
+						else{
+							uni.request({
+								url: baseUrlNew + '/commonUser/api/loginQuickly',
+								data: {
+									mobilePhone: "13333333333",
+									veriCode: "123456",
+								},
+								method: 'POST',
+								success: (res) => {						
+									if (res.statusCode === 200) {
+										uni.setStorageSync('pcUserInfo', res.data)
+									}
+								}
+							})
+						}
 					}
 				})
 			}