فهرست منبع

调整 续费连接过期问题

guojy 1 سال پیش
والد
کامیت
bbe6d3d047

+ 1 - 1
pages/begin/begin.js

@@ -13,7 +13,7 @@ Page({
   },
   loginAll2(){
     openLink({
-     url: 'https://h5.dingtalk.com/open-market/share.html?shareGoodsCode=D34E5A30A9AC7FC6327AB5E6D2D145418457E59F16C3FC9649BF22BF44CFA3D039FDE4A69694381C&token=523cb2f0e79525ea9b1719c0c5765a6b&shareUid=C5EB7B5C85793F3D909B2AC4771E12D7#/'
+     url: 'https://h5.dingtalk.com/appcenter/detail.html?showmenu=false&dd_share=false&dd_progress=false&goodsCode=DT_GOODS_881607043109331'
     })
   },
   loginAll(){

+ 1 - 1
pages/deploy/addMoney/addMoney.js

@@ -13,7 +13,7 @@ Page({
     //   console.log(res.data.data.url)
       openLink({
           // url: res.data.data.url
-			url: 'https://h5.dingtalk.com/open-market/share.html?shareGoodsCode=D34E5A30A9AC7FC6327AB5E6D2D145418457E59F16C3FC9649BF22BF44CFA3D039FDE4A69694381C&token=523cb2f0e79525ea9b1719c0c5765a6b&shareUid=C5EB7B5C85793F3D909B2AC4771E12D7#/'
+			url: 'https://h5.dingtalk.com/appcenter/detail.html?showmenu=false&dd_share=false&dd_progress=false&goodsCode=DT_GOODS_881607043109331'
       })
     // })
   },

+ 2 - 2
pages/deploy/serveMore/serveMore.js

@@ -29,11 +29,11 @@ Page({
       var index = e.target.dataset.index;
       if(index==1){
         openLink({
-          url: 'https://h5.dingtalk.com/open-market/share.html?shareGoodsCode=D34E5A30A9AC7FC6327AB5E6D2D145418457E59F16C3FC9649BF22BF44CFA3D039FDE4A69694381C&token=523cb2f0e79525ea9b1719c0c5765a6b&shareUid=C5EB7B5C85793F3D909B2AC4771E12D7#/'
+          url: 'https://h5.dingtalk.com/appcenter/detail.html?showmenu=false&dd_share=false&dd_progress=false&goodsCode=DT_GOODS_881607043109331'
         })
       }else{
         openLink({
-          url: 'https://h5.dingtalk.com/open-market/share.html?shareGoodsCode=D34E5A30A9AC7FC6FFCEB2BDEB2843187AD1B5AEDE67E69071118DA99D930127EBA311197B397B15&token=9bd3efbe751f453b82eb2548ba2c1b24&shareUid=3CD14812691CE211608BAD1C2A09D307#/'
+          url: 'https://h5.dingtalk.com/appcenter/detail.html?showmenu=false&dd_share=false&dd_progress=false&goodsCode=DT_GOODS_881649645924368'
         })
       }      
   },

+ 11 - 2
pages/workbench/index/index.js

@@ -61,6 +61,8 @@ Page({
     day:0,
     dateIndex:0,
     isShowVlink:false,//是否显示关注
+
+    isJr:true,
   },
   onLoad() {
     that = this;
@@ -241,6 +243,9 @@ Page({
   },
   opneWebSocket() {
     let data={type:"es_info",recorder_id:app.globalData.userData.id,month:app.globalData.month};
+    that.setData({
+      // isJr: false
+    })
     app.globalData.socketApi.sendData(data, (res) => {
       if (res.code == 1&&res.type=='es_info') {
           let data = res.result;
@@ -253,7 +258,8 @@ Page({
           }
           that.getLsit();
           that.setData({
-            userData: data
+            userData: data,
+            // isJr:true
           })
           app.globalData.socketApi.closewebsocket();
       }
@@ -296,6 +302,9 @@ Page({
   },
   openUrl(e) {
     var url = e.target.dataset.url;
+    if(!this.data.isJr){
+        return false
+    }
     if (url == 'all') {
       dd.switchTab({
         url: '../../statistics/index/index'
@@ -345,7 +354,7 @@ Page({
     let accedence_time=moment(app.globalData.userData.accedence_time).format('YYYY-MM-DD');
     // let accedence_time='2023-10-12'
     let date = moment().format('YYYY-MM-DD');
-    console.log(accedence_time,date)
+    // console.log(accedence_time,date)
     if (that.data.title||accedence_time==date) {
       return
     }

+ 1 - 1
pages/workbench/review/review.js

@@ -59,7 +59,7 @@ Page({
     }
   },
   onUnload (){
-    app.globalData.socketApi.closewebsocket();
+    // app.globalData.socketApi.closewebsocket();
   },
   //选择员工
   onConfirmStaff(data) {

+ 13 - 2
utils/websocket.js

@@ -6,7 +6,7 @@ import { showToast } from './feedback'
 
 // 手动关闭 websocket
 let closewebsocket = () => {
-  console.log("关闭")
+  // console.log("关闭")
   ws = false;
   dd.offSocketOpen();
   dd.offSocketMessage();
@@ -24,6 +24,7 @@ let initWebSocket = (callback,is) => {
 
   // 打开
   dd.onSocketOpen((res) => {
+    // console.log("打开了",res)
     if(dd.globalData.token){
       let wsData = {
         type: 'auth',
@@ -34,6 +35,8 @@ let initWebSocket = (callback,is) => {
     }
     ws = true;
     callback()
+  },(err)=>{
+    console.log("打开失败了",err)
   });
   // 监听信息
   dd.onSocketMessage((res) => {
@@ -56,7 +59,15 @@ let initWebSocket = (callback,is) => {
   let url=is? 'wss://' + dd.globalData.webScoketUrl + '/ws2/':'wss://' + dd.globalData.webScoketUrl + '/ws/'
   // url='wss://app55493.eapps.dingtalkcloud.com/ws2/'
   dd.connectSocket({
-    url:url
+    url:url,
+    success: (res) => {
+      console.log("成功了",res)
+    },
+    fail: (res) => {
+      console.log("失败了",res)
+    },
+    complete: () => {},
+    
   });
 }
 // 发送消息