diff --git a/src/minePages/order/item.vue b/src/minePages/order/item.vue index 36dc0e2..41fa6de 100644 --- a/src/minePages/order/item.vue +++ b/src/minePages/order/item.vue @@ -36,7 +36,7 @@ - + 车辆到达指定位置后请点击开始换电按钮 @@ -132,6 +132,8 @@ import { ref,inject,computed } from 'vue' import { onUnload } from '@dcloudio/uni-app' import { dzbzxq,starthz,gethzmsg } from '@/utils/service' + import conf from '@/utils/config' + const props = withDefaults(defineProps<{ n:any index:string|number @@ -174,8 +176,8 @@ }) if(props.n.status == 2){ uni.connectSocket({ - //url: `ws://192.168.5.14:9104/wechat/websocket/${uni.getStorageSync('wxuid')}`, - url:`ws://api.evo-techina.com/wechat/websocket/${uni.getStorageSync('wxuid')}`, + url: `ws://api.evo-techina.com/websocket/${uni.getStorageSync('wxuid')}`, + //url:`ws://api.evo-techina.com/wechat/websocket/${uni.getStorageSync('wxuid')}`, header: { 'content-type': 'application/json' } @@ -223,13 +225,13 @@ }else if(n == 3){ return '启动对中机构' }else if(n == 4){ - return '取新电池' - }else if(n == 5){ return '拆旧电池' - }else if(n == 6){ - return '装新电池' - }else if(n == 7){ + }else if(n == 5){ return '存旧电池' + }else if(n == 6){ + return '取新电池' + }else if(n == 7){ + return '装新电池' }else if(n == 8){ return '换电完成' } diff --git a/src/pages/home/index.vue b/src/pages/home/index.vue index 5648a96..a901661 100644 --- a/src/pages/home/index.vue +++ b/src/pages/home/index.vue @@ -196,16 +196,16 @@ let isinit = true onLoad((opt:any) => { hdzcode.value = opt.hdzcode - if(uni.getStorageSync('wxuid')){ - loginstate({ - wuid:uni.getStorageSync('wxuid') - }).then((rps:any) => { - if(rps.data && rps.data.wxToken){ - uni.setStorageSync('wxToken',rps.data.wxToken) - } - getinfo() - }) - } + // if(uni.getStorageSync('wxuid')){ + // loginstate({ + // wuid:uni.getStorageSync('wxuid') + // }).then((rps:any) => { + // if(rps.data && rps.data.wxToken){ + // uni.setStorageSync('wxToken',rps.data.wxToken) + // } + // getinfo() + // }) + // } }) onShow(() => { diff --git a/src/utils/config.ts b/src/utils/config.ts index 70b7c50..e04f97d 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -9,13 +9,16 @@ const development = { //apiBaseUrl:'https://587910rq36.zicp.fun' //'/fetch/' //'http://192.168.110.73:8082/' //https://xcjf.56365.cc/' //'/fetch'//网站域名接口地址参考,发布小程序和APP时使用 // #endif //apiBaseUrl:'http://192.168.5.213:9100/gateway' - apiBaseUrl:'http://192.168.5.14:9104', + //apiBaseUrl:'http://192.168.5.14:9104', + apiBaseUrl:'https://api.evo-techina.com', + ws:'ws://192.168.5.14:9104' } const production = { //apiBaseUrl:'http://124.239.176.15:8888', - apiBaseUrl:'https://api.evo-techina.com' + apiBaseUrl:'https://api.evo-techina.com', + ws:'ws://api.evo-techina.com' //API_URL:'http://chuangcheng.56365.cc' //测试环境 } diff --git a/src/utils/request.ts b/src/utils/request.ts index 473d8b4..e8783b8 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -1,4 +1,4 @@ -//import conf from './config' +import conf from './config' let httpList:any[] = [] @@ -86,7 +86,7 @@ export function request(method:any,url:string,data?:any,isLoading?:any){ }) } -//终端请求 +//中断请求 export function abort() { httpList.forEach(n => { n.abort()