Ver Fonte

Merge branch 'deploy' of http://git.chelingzhu.com/chelingzhu-web/qhsxKx-mini-html into deploy

1004749546@qq.com há 4 anos atrás
pai
commit
562a77cf60
4 ficheiros alterados com 12 adições e 12 exclusões
  1. 1 1
      App.vue
  2. 1 1
      libs/axios.js
  3. 9 9
      pages/index/index.vue
  4. 1 1
      store/index.js

+ 1 - 1
App.vue

@@ -1,6 +1,6 @@
 <script>
 	// const uat_URL = 'http://md.test.zyucgj.com/saas/clz/' // 预发布
-	const uat_URL = 'http://192.168.16.105:8103/cw-wechat/' // 本地
+	const uat_URL = 'http://192.168.16.103:8103/cw-wechat/' // 本地
 	const pro_URL = 'https://car.zyucgj.com/saas/clz/'  // 生产
 	const buildType = 0 // 打包环境对应类型,1 生产 0 预发布
 	const buildURL = buildType ? pro_URL : uat_URL // 打包后实际对应的url

+ 1 - 1
libs/axios.js

@@ -8,7 +8,7 @@ const request = (opts, hasToken) => {
 	const header = {
 			'Content-Type': 'application/json;charset=UTF-8'
 		}
-	if(!hasToken){
+	if(!hasToken&&opts.url!='login'){
 		header['X-AUTH-TOKEN'] = authorization
 	}	
 	//此token是登录成功后后台返回保存在storage中的

+ 9 - 9
pages/index/index.vue

@@ -242,16 +242,16 @@
 			},
 			// 扫码洗车
 			scanCode () {
-				// uni.navigateTo({
-				// 	url: '/pages/getOrder/getOrder'
-				// })
 				if (this.hasLogin) {
-					uni.scanCode({
-					    success: function (res) {
-					        console.log('条码类型:' + res.scanType);
-					        console.log('条码内容:' + res.result);
-					    }
-					});
+					uni.navigateTo({
+						url: '/pages/getOrder/getOrder'
+					})
+					// uni.scanCode({
+					//     success: function (res) {
+					//         console.log('条码类型:' + res.scanType);
+					//         console.log('条码内容:' + res.result);
+					//     }
+					// });
 				} else {
 					uni.navigateTo({
 						url: '/pages/login/login'

+ 1 - 1
store/index.js

@@ -69,7 +69,7 @@ const store = new Vuex.Store({
 			let userInfo = state.vuex_userData
 			let url = getApp().globalData.baseUrl
 			let wsBaseUrl = url.indexOf("https:")>=0 ? url.replace("https:","wss:") : url.replace("http:","ws:")
-			let wsUrl = wsBaseUrl + 'websocket'
+			let wsUrl = wsBaseUrl + 'websocket/16546'
 			// 开始连接
 			state.vuex_socket = uni.connectSocket({
 			    url: wsUrl, // ws 请求地址