Browse Source

bug 修复

lilei 4 years ago
parent
commit
a1af742b44
6 changed files with 6 additions and 6 deletions
  1. 1 1
      App.vue
  2. 1 3
      libs/axios.js
  3. 1 0
      pages/login/login.vue
  4. 2 1
      pages/userCenter/index.vue
  5. 1 0
      pages/work/index/index.vue
  6. 0 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 - 3
libs/axios.js

@@ -2,8 +2,7 @@ const baseUrl = getApp().globalData.baseUrl
 //带Token请求
 const request = (opts, hasToken) => {
 	const authorization = getApp().globalData.token
-	console.log(opts, 'opts')
-	console.log(authorization,'authorization')
+	// console.log(authorization,'authorization')
 	//  hasToken是否传入token,为true则不传token
 	const header = {
 			'Content-Type': 'application/json;charset=UTF-8'
@@ -18,7 +17,6 @@ const request = (opts, hasToken) => {
 		method: opts.method,
 		header: opts.header ? opts.header : header
 	}
-	console.log(DefaultOpts, 'DefaultOpts')
 	let promise = new Promise(function(resolve, reject) {
 		uni.request(DefaultOpts).then(
 			(res) => {

+ 1 - 0
pages/login/login.vue

@@ -41,6 +41,7 @@
 				console.log(e.target.encryptedData,'eeeeeee')
 				if (e.target.errMsg === 'getPhoneNumber:ok') {
 					uni.login({
+						provider: 'weixin',
 						success(res) {
 							login({
 								code: res.code,

+ 2 - 1
pages/userCenter/index.vue

@@ -36,9 +36,10 @@
 				}
 			};
 		},
-		onLoad() {
+		onShow() {
 			let _this = this
 			uni.getUserInfo({
+				provider: 'weixin',
 				success(e) {
 					console.log(e)
 					_this.userInfo = e.userInfo

+ 1 - 0
pages/work/index/index.vue

@@ -141,6 +141,7 @@ export default {
 		startWashCar(){
 			this.step= 0;
 			this.showStart = true;
+			this.$store.commit("$sendWebsocket",'start')
 			// 启动成功
 			setTimeout(() => {
 				this.status = 'working';

+ 0 - 1
store/index.js

@@ -101,7 +101,6 @@ const store = new Vuex.Store({
 			state.vuex_heartInterId = setInterval(function () {
 				console.log(state.vuex_socket.readyState)
 				if(state.vuex_socket.readyState != 1){
-					_this.commit("$closeWebsocket")
 					state.vuex_socket = uni.connectSocket({
 					    url: wsUrl, // ws 请求地址
 					    complete: ()=> {