瀏覽代碼

游客权限设置

laiguoran 4 年之前
父節點
當前提交
80df0b02c9
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      app/middleware/tender_check.js
  2. 2 2
      app/service/tender_tourist.js

+ 1 - 1
app/middleware/tender_check.js

@@ -64,8 +64,8 @@ module.exports = options => {
             const isTenderTourist = yield this.service.tenderTourist.getDataByCondition({ tid: tender.id, user_id: accountId });
             // 判断访问人是否具有游客身份
             tender.isTourist = isTenderTourist !== null;
+            // 游客权限
             tender.touristPermission = yield this.service.tenderTourist.getTouristPermission(isTenderTourist);
-            console.log(tender.touristPermission);
             if (auditorsId.indexOf(accountId) === -1 && tender.data.user_id !== accountId &&
                 (tenderPermission === null || tenderPermission === undefined || tenderPermission.indexOf('2') === -1) &&
                 stageAuditorsId.indexOf(accountId) === -1 && changeAuditorsId.indexOf(accountId) === -1 &&

+ 2 - 2
app/service/tender_tourist.js

@@ -7,7 +7,7 @@
  * @date 2021/4/8
  * @version
  */
-const touristPermission = require('../const/tourist_permission').defaultPermission;
+const touristPermissionConst = require('../const/tourist_permission').defaultPermission;
 module.exports = app => {
 
     class TenderTourist extends app.BaseService {
@@ -65,7 +65,7 @@ module.exports = app => {
             if (info && info.permission) {
                 return info.permission;
             }
-            return touristPermission;
+            return touristPermissionConst;
         }
     }