347617796@qq.com 3 anos atrás
pai
commit
aad9a1211e

+ 12 - 1
app.js

@@ -30,7 +30,6 @@ App({
     isCreator: false,//是否是创始人
     corpMessage: '',//企业套餐信息
     usersList: [],//缓存的人员列表
-
   },
   //获取积分类型
   getTypes(callBack) {
@@ -56,6 +55,7 @@ App({
           'Accept': Accept ? Accept : ''
         },
         data: data,
+        timeout:10000,
         dataType: 'json',
         success: function (res) {
           if (res.data.code == 1) {
@@ -92,6 +92,7 @@ App({
       dd.httpRequest({
         url: baseUrl + url,
         method: 'GET',
+        timeout:10000,
         headers: {
           'Content-Type': 'application/x-www-form-urlencoded',
           'A-Token': that.globalData.token,
@@ -141,6 +142,7 @@ App({
           'A-Token': that.globalData.token,
           'Accept': Accept ? Accept : ''
         },
+        timeout:10000,
         data: data,
         dataType: 'json',
         success: function (res) {
@@ -160,6 +162,15 @@ App({
           }
         },
         fail: function (res) {
+          if(res.error==19||res.error==13){
+            if(url=='api/integral/review/a/entry'||url=='api/integral/point/entry'){
+              	let sum=0;
+                if(data){
+                  sum=Number(JSON.parse(data.items).length)*Number(JSON.parse(data.members).length);
+                }
+                that.$post('api/e', {sum:sum,message:'钉钉小程序'}).then(res => {})
+            }
+          }
           if (res.errorMessage == 'NETWORK ERROR') {
             dd.alert({
               title: '网络异常',

+ 5 - 9
pages/deploy/addMoney/addMoney.js

@@ -4,21 +4,17 @@ import 'dingtalk-jsapi/entry/mobile';
 import openLink from 'dingtalk-jsapi/api/biz/util/openLink';
 Page({
   data: {},
-  onLoad(query) {
+  onLoad() {
     that = this;
     dd.setNavigationBar({ title: "续费升级" });
   },
   openUrl() {
-    // app.$get("api/order/goods/sku", { callback: "page/deploy/sku/sku", goods_code: 'DT_GOODS_881607043109331' }).then((res) => {
+    app.$get("api/order/goods/sku", { callback: "page/deploy/sku/sku", goods_code: 'DT_GOODS_881634105565156' }).then((res) => {
       openLink({
-        url: 'https://h5.dingtalk.com/open-market/share.html?shareGoodsCode=D34E5A30A9AC7FC6327AB5E6D2D145418457E59F16C3FC969F1A50AEF2E5E320588012470F1AB045&token=d37751d45abad15178adf60f936d7c28&shareUid=C5EB7B5C85793F3D909B2AC4771E12D7'
+          url: res.data.data.url
+        // url: 'https://h5.dingtalk.com/open-market/share.html?shareGoodsCode=D34E5A30A9AC7FC6327AB5E6D2D145418457E59F16C3FC969F1A50AEF2E5E320588012470F1AB045&token=d37751d45abad15178adf60f936d7c28&shareUid=C5EB7B5C85793F3D909B2AC4771E12D7'
       })
-      // this.setData({
-      //   src: res.data.data.url
-      // })
-    // }, (err) => {
-
-    // })
+    })
   },
   //跳转
   openView() {

+ 3 - 1
pages/workbench/apply/apply.js

@@ -278,8 +278,10 @@ Page({
               app.globalData.showToast("已上传");
             }
           },
+          fail: function (res) {
+            app.globalData.showToast("上传失败");
+          }
         });
-
       },
       fail: function (res) {
         app.globalData.showToast("上传失败");

+ 2 - 2
pages/workbench/jk_B/jk_B.js

@@ -210,8 +210,8 @@ Page({
               app.globalData.showToast("已上传");
             }
           },
-          fail: (err) => {
-            console.log(err);
+          fail: function (res) {
+            app.globalData.showToast("上传失败");
           }
         });