瀏覽代碼

Merge branch 'dev' of http://git.pro.g107.net/guojy/dd_xcx into dev

哥哥玩剑魂呢 3 年之前
父節點
當前提交
4cbcd6a82f
共有 4 個文件被更改,包括 20 次插入11 次删除
  1. 12 1
      app.js
  2. 3 7
      pages/deploy/addMoney/addMoney.js
  3. 3 1
      pages/workbench/apply/apply.js
  4. 2 2
      pages/workbench/jk_B/jk_B.js

+ 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: '网络异常',

+ 3 - 7
pages/deploy/addMoney/addMoney.js

@@ -4,20 +4,16 @@ 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: 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) => {
-
     // })
   },
   //跳转

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

@@ -310,8 +310,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

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