diff --git a/App.vue b/App.vue index d8f0889..9d79478 100644 --- a/App.vue +++ b/App.vue @@ -7,11 +7,13 @@ //正式 // url: 'https://hsg.dctpay.com/brest', // imgUrl: 'https://hsg.dctpay.com/filesystem/', - // imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/', + // imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/', + // wsssocket:'wss://hsgcs.dctpay.com/msg/WebSocket/', //测试 url: 'https://hsgcs.dctpay.com/brest', imgUrl: 'https://hsgcs.dctpay.com/filesystem/', - imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/', + imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/', + wsssocket:'wss://hsgcs.dctpay.com/msg/WebSocket/', userInfo: "", openId: '', code: '', diff --git a/manifest.json b/manifest.json index b0774de..ab60d0c 100644 --- a/manifest.json +++ b/manifest.json @@ -68,5 +68,12 @@ "uniStatistics" : { "enable" : false }, - "vueVersion" : "2" + "vueVersion" : "2", + "h5" : { + "title" : "嗨森逛商家端", + "router" : { + "mode" : "hash", + "base" : "/merchantH5/" + } + } } diff --git a/pages/login/login/login.vue b/pages/login/login/login.vue index 4dec6c1..dc60474 100644 --- a/pages/login/login/login.vue +++ b/pages/login/login/login.vue @@ -2,7 +2,7 @@ - + diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue index 77a1534..0f2e60d 100644 --- a/pages/tabBar/home/home.vue +++ b/pages/tabBar/home/home.vue @@ -106,7 +106,7 @@ socketio() { let that = this; uni.connectSocket({ - url: 'ws://139.159.177.244:9302/brest/WebSocket/' + app.globalData.userInfo.merchantStore.id + url: app.globalData.wsssocket + app.globalData.userInfo.merchantStore.id }); uni.onSocketOpen(function(res) { console.log('WebSocket连接已打开!'); @@ -119,13 +119,18 @@ uni.onSocketMessage(function(res) { let innerAudioContext = uni.createInnerAudioContext(); //创建音频文件 innerAudioContext.autoplay = false; //不自动播放 - innerAudioContext.src = res.data; //音频文件链接 - that.innerAudioContext = innerAudioContext; + innerAudioContext.src = JSON.parse(res.data).voice; //音频文件链接 + that.innerAudioContext = innerAudioContext; + that.orderList = []; + that.pageNum = 1; + that.getGasOrderList(); that.startAudio(); - console.log('收到服务器内容:' + res.data); + console.log('收到服务器内容:' + JSON.parse(res.data).voice); }); uni.onSocketClose(function(res) { console.log('WebSocket 已关闭!'); + uni.closeSocket(); + that.socketio(); }); }, //搜索条件 @@ -249,7 +254,7 @@ } .counimgs { - width: 60px; + width: 60px; max-height: 60px; } diff --git a/pages/tabBar/user/user.vue b/pages/tabBar/user/user.vue index fac1ba2..0792fe5 100644 --- a/pages/tabBar/user/user.vue +++ b/pages/tabBar/user/user.vue @@ -100,7 +100,8 @@ //跳转 jumpdesfun(item) { if (item.title == '退出登录') { - this.logout(); + this.logout(); + uni.closeSocket(); } uni.navigateTo({ url: item.url diff --git a/pages/user/updateOilgun/updateOilgun.vue b/pages/user/updateOilgun/updateOilgun.vue index 9f6e323..3530ee3 100644 --- a/pages/user/updateOilgun/updateOilgun.vue +++ b/pages/user/updateOilgun/updateOilgun.vue @@ -1,7 +1,7 @@