347617796@qq.com 2 年之前
父节点
当前提交
098f86ca42

+ 17 - 15
app.js

@@ -2,8 +2,8 @@ import { showToast } from './utils/feedback'
 import { formatTime, arrRemoveObj, getTypeItem,setCache } from './utils/util'
 // import * as socketApi from './utils/websocket'
 
-const baseUrl = "https://dp-test.g107.com/";//测试
-// const baseUrl = "https://app109758.eapps.dingtalkcloud.com/";//正式
+// const baseUrl = "https://dp-test.g107.com/";//测试
+const baseUrl = "https://app109758.eapps.dingtalkcloud.com/";//正式
 var that;
 var yearArr = [];
 var year = formatTime(new Date()).year;
@@ -14,8 +14,8 @@ App({
   //自定义全局变量
   globalData: {
     baseUrl: baseUrl,
-    webScoketUrl: "test-ding.g107.com",//webScoket测试
-    // webScoketUrl: "app109758.eapps.dingtalkcloud.com",
+    // webScoketUrl: "test-ding.g107.com",//webScoket测试
+    webScoketUrl: "app109758.eapps.dingtalkcloud.com/pc",
     showToast: showToast,//提示框
     arrRemoveObj: arrRemoveObj,//删除数组的某一项
     year: formatTime(new Date()).year,//当前年
@@ -68,7 +68,7 @@ App({
               that.globalData.token = res.data.refresh_token
             }
             resolve(res);
-          } else if (res.data.code == 2001) {
+          } else if (res.data.code == 5555) {
             that.globalData.showToast(res.data.msg);
             dd.reLaunch({
               url: `../../index/excessive/excessive`
@@ -114,7 +114,7 @@ App({
               that.globalData.token = res.data.refresh_token
             }
             resolve(res);
-          } else if (res.data.code == 2001) {
+          } else if (res.data.code == 5555) {
             that.globalData.showToast(res.data.msg);
             dd.reLaunch({
               url: `../../index/excessive/excessive`
@@ -162,13 +162,13 @@ App({
               that.globalData.token = res.data.refresh_token
             }
             resolve(res);
-          } else if (res.data.code == 2001) {
+          } else if (res.data.code == 5555) {
             that.globalData.showToast(res.data.msg);
             dd.reLaunch({
               url: `../../index/excessive/excessive`
             })
             reject(res);
-          } else if (res.data.code == 3000) {
+          } else if (res.data.code == 4000||res.data.code == 4001) { //企业未初始化
             reject(res);
           } else {
             that.globalData.showToast(res.data.msg);
@@ -221,25 +221,27 @@ App({
           that.$post('api/ding/login', { authCode: res.authCode, corpId: corpId }).then(res => {
             if (res.data.code == 1) {
               let user = res.data.data;
-              console.log(JSON.stringify(user));
-              if (user.is_official == 1) {
+              // console.log(JSON.stringify(user));
+              if (user.is_official == 1&&user.is_scope == 1) {
                 that.globalData.token = user.token;
                 that.globalData.userData = user;
                 that.setRouters();
                 callBack(true);
               } else {
-                callBack(false);
+                if(user.is_official == 0){//用户未启用
+                    callBack(false);
+                }
+                if(user.is_scope == 0){//用户未授权
+                    callBack(false,true);
+                }
               }
-            } else if (res.data.code == 3000) {
-              that.globalData.showToast("员工信息同步中,请稍后进入")
             } else {
-              console.log(res)
               that.globalData.showToast(res.msg)
             }
           }).catch(err => {
             errBack(err.data);
             return
-            if (err.data.code == 2001) {
+            if (err.data.code == 5555) {
               dd.confirm({
                 title: '尊敬的用户',
                 content: '你当前的套餐已到期',

+ 2 - 2
pages/home/actionplanDetails/actionplanDetails.axml

@@ -12,7 +12,7 @@
       <view class="flex-box-ce" style="font-size:.27rem;" catchTap="showText">{{ detailsTIt }}
         <text class="iconfont icon-wenhao" style="margin-left:0.1rem;color:#969799;font-size:0.28rem;"></text>
       </view>
-      <button v:if="{{isShowAdd&&!has_finish}}" onTap="save" style="width: 1.45rem;
+      <button a:if="{{isShowAdd&&!has_finish}}" onTap="save" style="width: 1.45rem;
           height: .5rem;
           border-radius: 1.45rem;
           line-height:0.5rem;
@@ -23,7 +23,7 @@
           margin-top: .04rem;">保存
       </button>
     </view>
-    <view class="margin-bottom" v:if="{{isShowAdd&&!has_finish}}">
+    <view class="margin-bottom" a:if="{{isShowAdd&&!has_finish}}">
       <view class="page-section-demo">
         <textarea onInput="bindTextAreaBlur" value="{{titValue}}" auto-height placeholder="请输入{{detailsTIt}}" maxlength="200" />
       </view>

+ 1 - 0
pages/home/actionplanList/actionplanList.js

@@ -83,6 +83,7 @@ Page({
             }
           });
         });
+        // console.log(actionPlanList)
         this.setData({
           backlogList: actionPlanList
         })

+ 3 - 3
pages/home/performanceDetails/performanceDetails.js

@@ -965,8 +965,8 @@ Page({
             arr.score_infos = [];
             arr.planIndex = [keys, index]; // 当打开执行计划时的下标
             let tar = null;
-            if (this.initData(arr.result)) {
-              tar = this.initData(arr.result) + arr.unit;
+            if(arr.result!==null&&arr.result!==''){
+                tar=arr.result + arr.unit
             }
             arr.tabList = [
               {
@@ -983,7 +983,7 @@ Page({
               //   lab: '指标类型',
               //   prop: this.indexType(this.initData(arr.type))
               // },
-              { lab: '目标值', prop: this.initData(arr.target) ? + this.initData(arr.target) + arr.unit : '' },
+              { lab: '目标值', prop: arr.target ? arr.target +''+ arr.unit:''  },
               { lab: '结果值', prop: tar },
               { lab: '加扣分上限', prop: this.initData(arr.point_limit) },
               // { lab: '考核标准', prop: this.initData(arr.per_remark) },

+ 11 - 5
pages/index/begin/begin.js

@@ -10,18 +10,24 @@ Page({
     that.loginAll();
   },
   loginAll() {
-    app.login(app.globalData.corpId, function (is) {
+    app.login(app.globalData.corpId, function (is,is2) {
       if (is) {
         dd.reLaunch({
           url: '../../home/home/home'
         })
       } else {
-        dd.reLaunch({
-          url: '../noJurisdiction/noJurisdiction'
-        })
+        if(is2){
+          dd.reLaunch({
+            url: '../noJurisdiction/noJurisdiction?id=1'
+          }) 
+        }else{
+          dd.reLaunch({
+            url: '../noJurisdiction/noJurisdiction'
+          })
+        }
       }
     }, function (data) {
-      if (data.code == 3000) {
+      if (data.code == 4000||data.code == 4001) {
         if (that.data.num == 3) { return false }
         setTimeout(function () {
           let num = that.data.num;

+ 2 - 1
pages/index/noJurisdiction/noJurisdiction.axml

@@ -5,7 +5,8 @@
         你当前未授权自己进入应用,请修改应用的可见范围为全部或包含自己,如需咨询客服,请到你企业专属的功道云服务群咨询
       </view>
       <view a:else>
-        当前用户未授权进入系统,请联系管理员为你【启用绩效管理】,如需咨询客服,请到你企业专属的功道云服务群咨询
+        <text a:if="{{id==0}}">当前用户未启用进入系统,请联系管理员为你【启用绩效管理】,如需咨询客服,请到你企业专属的功道云服务群咨询</text>
+        <text a:else>当前用户未授权进入系统,请联系管理员将你纳入绩效应用</text>
       </view>
   </view>
 </view>

+ 4 - 2
pages/index/noJurisdiction/noJurisdiction.js

@@ -4,8 +4,10 @@ Page({
   data: {
     isCreator: false,
     creatorName:'',
+    id:0
   },
-  onLoad() {
-      this.setData({isCreator: app.globalData.isCreator,creatorName:app.globalData.corpMessage.creators})
+  onLoad(e) {
+      this.setData({isCreator: app.globalData.isCreator,creatorName:app.globalData.corpMessage.creators,id:e.id? e.id:0})
+      console.log(this.data.id)
   },
 });