Browse Source

Merge branch 'dev'

347617796@qq.com 4 years ago
parent
commit
4782243fa5

+ 18 - 4
app.js

@@ -63,7 +63,7 @@ App({
             }
             resolve(res);
           } else if (res.data.code == 401) {
-            that.globalData.showToast("登录已过期");
+            that.globalData.showToast("授权已过期");
             // reject(res);
           } else {
             that.globalData.showToast(res.data.msg)
@@ -105,7 +105,7 @@ App({
             }
             resolve(res);
           } else if (res.data.code == 401) {
-            that.globalData.showToast("登录已过期");
+            that.globalData.showToast("授权已过期");
             // reject(res);
           } else {
             that.globalData.showToast(res.data.msg)
@@ -149,7 +149,7 @@ App({
             }
             resolve(res);
           } else if (res.data.code == 401) {
-            that.globalData.showToast("登录已过期");
+            that.globalData.showToast("授权已过期");
             reject(res);
           } else {
             that.globalData.showToast(res.data.msg);
@@ -256,7 +256,21 @@ App({
               that.globalData.showToast(res.msg)
             }
           }).catch(err => {
-            console.log(err);
+            if (err.data.code == 2001) {
+              dd.confirm({
+                title: '尊敬的用户',
+                content: '您当前的套餐已到期',
+                confirmButtonText: '去续费',
+                cancelButtonText: '暂不需要',
+                success: (result) => {
+                  if (result.confirm) {
+                    dd.reLaunch({
+                      url: `../../deploy/addMoney/addMoney`
+                    })
+                  }
+                },
+              });
+            }
           })
         },
         fail: function (err) {

+ 3 - 3
package-lock.json

@@ -87,9 +87,9 @@
       }
     },
     "dingtalk-jsapi": {
-      "version": "2.13.9",
-      "resolved": "https://registry.npm.taobao.org/dingtalk-jsapi/download/dingtalk-jsapi-2.13.9.tgz?cache=0&sync_timestamp=1605844810094&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdingtalk-jsapi%2Fdownload%2Fdingtalk-jsapi-2.13.9.tgz",
-      "integrity": "sha1-5u+MXKAm0zbo1qbC6WAZb+IFAUM=",
+      "version": "2.13.20",
+      "resolved": "https://registry.npm.taobao.org/dingtalk-jsapi/download/dingtalk-jsapi-2.13.20.tgz",
+      "integrity": "sha1-DLN/cZiU4BrenyHTC0itnDdmpwQ=",
       "requires": {
         "promise-polyfill": "^7.1.0"
       }

+ 5 - 3
pages/deploy/integralRule/integralRule.js

@@ -90,14 +90,16 @@ Page({
     })
   },
   // 递归
-  getItem(id, arr) {
+  getItems(id, arr) {
     var obj = {};
     for (let i = 0; i < arr.length; i++) {
       if (id == arr[i].id) {
         obj = arr[i];
         break;
       } else if (arr[i].child.length > 0) {
-        obj = this.getItem(id, arr[i].child)
+        if(this.getItems(id, arr[i].child).id){
+           obj =this.getItems(id, arr[i].child)
+        } 
       }
     }
     return obj;
@@ -112,7 +114,7 @@ Page({
           item_list[i][k].pt_Obj = this.data.types.filter((item) => {
             return item_list[i][k].pt_id == item.id
           })
-          item_list[i][k].typeName = that.getItem(item_list[i][k].rule_id, rule_tree);
+          item_list[i][k].typeName = that.getItems(item_list[i][k].rule_id, rule_tree);
           list.push(item_list[i][k])
         }
       }

+ 1 - 0
pages/workbench/index/index.acss

@@ -205,6 +205,7 @@
 
 .numPoint {
   width: 100rpx;
+  margin: 0 auto
 }
 
 .li {

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

@@ -290,7 +290,7 @@ Page({
     var http3 = app.$get2("api/integral/review/list", { type: 'waiting',source_type:0, page: 1, pt_id: 0 })
     var ranking = app.$get('api/integral/statistics/ranking/list', { page: 1, page_size: 5 })// 获取排行榜
     var task = app.$get('api/integral/statistics/task/pie', { month: app.globalData.month })// 管理者奖扣任务柱状图
-    var work = app.$get('api/integral/work/list', { status: 'running',page: 1,pt_id: 0})// 管理者奖扣任务柱状图
+    var work = app.$get('api/integral/work/list', { status: 'running',page: 1,pt_id: 0, source_type: 0})// 管理者奖扣任务柱状图
     Promise.all([http1, http2, http3, ranking, task,work]).then(function (values) {
       if (values[0]) {
         let data = values[0].data.data;