正在显示
2 个修改的文件
包含
37 行增加
和
101 行删除
| 1 | 1 | var express = require("express"); |
| 2 | 2 | var payRoll = require("../json/payRoll.json"); |
| 3 | 3 | |
| 4 | -exports = module.exports = function (IoC, policies, settings) { | |
| 5 | - var app = this; | |
| 6 | - var router = express.Router(); | |
| 7 | - var router2 = express.Router(); | |
| 8 | - var controller = IoC.create("controllers/auth"); | |
| 9 | - | |
| 10 | - if (settings.prefix.length > 0) { | |
| 11 | - // router.get("/index", controller.index); | |
| 12 | - router.get("/signOut", controller.signOut); | |
| 13 | - } | |
| 4 | +module.exports = (app) => { | |
| 5 | + const { router, controller } = app; | |
| 6 | + console.log('hhhhhhhh哈哈哈哈哈哈',app); | |
| 7 | + // router.get("/index", controller.index); | |
| 8 | + router.get("/signOut", controller.signOut); | |
| 14 | 9 | |
| 15 | 10 | router.get("/img/*", controller.getImg); |
| 16 | 11 | |
| 17 | - router2.get("/", controller.indexPrefix); | |
| 12 | + router.get("/", controller.indexPrefix); | |
| 18 | 13 | |
| 19 | 14 | router.get("/productDes", controller.productDes); |
| 20 | 15 | |
| ... | ... | @@ -28,37 +23,21 @@ exports = module.exports = function (IoC, policies, settings) { |
| 28 | 23 | |
| 29 | 24 | router.post("/doLogin", controller.doLogin); |
| 30 | 25 | |
| 31 | - router2.get("/signOut", controller.signOut); | |
| 26 | + router.get("/signOut", controller.signOut); | |
| 32 | 27 | |
| 33 | 28 | router.post("/smsCodes", controller.smsCodes); |
| 34 | 29 | |
| 35 | 30 | router.post("/tenants", controller.tenants); |
| 36 | 31 | |
| 37 | - router.post("/resetPass", policies.ensureLoggedOut(), controller.resetPass); | |
| 32 | + router.post("/resetPass", controller.resetPass); | |
| 38 | 33 | |
| 39 | - router.post( | |
| 40 | - "/updatePassword", | |
| 41 | - policies.ensureLoggedOut(), | |
| 42 | - controller.updatePassword | |
| 43 | - ); | |
| 34 | + router.post("/updatePassword", controller.updatePassword); | |
| 44 | 35 | |
| 45 | - router.post( | |
| 46 | - "/loadUserInfo", | |
| 47 | - policies.ensureLoggedOut(), | |
| 48 | - controller.loadUserInfo | |
| 49 | - ); | |
| 36 | + router.post("/loadUserInfo", controller.loadUserInfo); | |
| 50 | 37 | |
| 51 | - router.post( | |
| 52 | - "/getUploaderToken", | |
| 53 | - policies.ensureLoggedOut(), | |
| 54 | - controller.getUploaderToken | |
| 55 | - ); | |
| 38 | + router.post("/getUploaderToken", controller.getUploaderToken); | |
| 56 | 39 | |
| 57 | - router.post( | |
| 58 | - "/delOSSObject", | |
| 59 | - policies.ensureLoggedOut(), | |
| 60 | - controller.delOSSObject | |
| 61 | - ); | |
| 40 | + router.post("/delOSSObject", controller.delOSSObject); | |
| 62 | 41 | |
| 63 | 42 | router.post("/smsVerification", controller.smsVerification); |
| 64 | 43 | |
| ... | ... | @@ -74,35 +53,19 @@ exports = module.exports = function (IoC, policies, settings) { |
| 74 | 53 | // controller.healthMonitor |
| 75 | 54 | // ) |
| 76 | 55 | |
| 77 | - router.post( | |
| 78 | - "/getUserRoles", | |
| 79 | - policies.ensureLoggedOut(), | |
| 80 | - controller.getUserRoles | |
| 81 | - ); | |
| 56 | + router.post("/getUserRoles", controller.getUserRoles); | |
| 82 | 57 | |
| 83 | - router.post("/getRoles", policies.ensureLoggedOut(), controller.getRoles); | |
| 58 | + router.post("/getRoles", controller.getRoles); | |
| 84 | 59 | |
| 85 | - router.post( | |
| 86 | - "/updateUserRoles", | |
| 87 | - policies.ensureLoggedOut(), | |
| 88 | - controller.updateUserRoles | |
| 89 | - ); | |
| 60 | + router.post("/updateUserRoles", controller.updateUserRoles); | |
| 90 | 61 | |
| 91 | - router.post("/getTenant", policies.ensureLoggedOut(), controller.getTenant); | |
| 62 | + router.post("/getTenant", controller.getTenant); | |
| 92 | 63 | |
| 93 | - router.post( | |
| 94 | - "/updateTenant", | |
| 95 | - policies.ensureLoggedOut(), | |
| 96 | - controller.updateTenant | |
| 97 | - ); | |
| 64 | + router.post("/updateTenant", controller.updateTenant); | |
| 98 | 65 | |
| 99 | 66 | router.get("/offer/:requestId", controller.offer); |
| 100 | 67 | |
| 101 | - router.post( | |
| 102 | - "/onboardStatus", | |
| 103 | - policies.ensureLoggedOut(), | |
| 104 | - controller.onboardStatus | |
| 105 | - ); | |
| 68 | + router.post("/onboardStatus", controller.onboardStatus); | |
| 106 | 69 | |
| 107 | 70 | router.get("/downloadApp", controller.dowloadApp); |
| 108 | 71 | |
| ... | ... | @@ -116,48 +79,25 @@ exports = module.exports = function (IoC, policies, settings) { |
| 116 | 79 | |
| 117 | 80 | router.post("/changePassForRegister", controller.changePassForRegister); |
| 118 | 81 | |
| 119 | - router.post( | |
| 120 | - "/changeTenant", | |
| 121 | - policies.ensureLoggedOut(), | |
| 122 | - controller.changeTenant | |
| 123 | - ); | |
| 82 | + router.post("/changeTenant", controller.changeTenant); | |
| 124 | 83 | |
| 125 | 84 | router.post("/hr/sendRejectOffer", controller.sendRejectOffer); |
| 126 | 85 | |
| 127 | 86 | router.post("/hr/acceptOffer", controller.acceptOffer); |
| 128 | 87 | |
| 129 | - router.post("/imTokens", policies.ensureLoggedOut(), controller.imTokens); | |
| 88 | + router.post("/imTokens", controller.imTokens); | |
| 130 | 89 | |
| 131 | - router.post( | |
| 132 | - "/listChannels", | |
| 133 | - policies.ensureLoggedOut(), | |
| 134 | - controller.listChannels | |
| 135 | - ); | |
| 90 | + router.post("/listChannels", controller.listChannels); | |
| 136 | 91 | |
| 137 | - router.post( | |
| 138 | - "/getTastLink", | |
| 139 | - policies.ensureLoggedOut(), | |
| 140 | - controller.getTastLink | |
| 141 | - ); | |
| 92 | + router.post("/getTastLink", controller.getTastLink); | |
| 142 | 93 | |
| 143 | - router.get("/filemeta", policies.ensureLoggedOut(), controller.filemeta); | |
| 94 | + router.get("/filemeta", controller.filemeta); | |
| 144 | 95 | |
| 145 | - router.get( | |
| 146 | - "/getCustomerQrcode", | |
| 147 | - policies.ensureLoggedOut(), | |
| 148 | - controller.getCustomerQrcode | |
| 149 | - ); | |
| 96 | + router.get("/getCustomerQrcode", controller.getCustomerQrcode); | |
| 150 | 97 | |
| 151 | - router.get( | |
| 152 | - "/getPositionQrcode", | |
| 153 | - policies.ensureLoggedOut(), | |
| 154 | - controller.getPositionQrcode | |
| 155 | - ); | |
| 156 | - router.get( | |
| 157 | - //微店模板路由 | |
| 158 | - "/minishop/:id", | |
| 159 | - controller.weidianTempLate | |
| 160 | - ); | |
| 98 | + router.get("/getPositionQrcode", controller.getPositionQrcode); | |
| 99 | + | |
| 100 | + router.get("/minishop/:id", controller.weidianTempLate); | |
| 161 | 101 | |
| 162 | 102 | router.get("/wso-workai", controller.workaiSecurityOAuth); |
| 163 | 103 | |
| ... | ... | @@ -170,17 +110,10 @@ exports = module.exports = function (IoC, policies, settings) { |
| 170 | 110 | |
| 171 | 111 | router.get("/getShortToken", controller.getShortToken); |
| 172 | 112 | |
| 173 | - router.get("/gainianrenli/*",controller.getImg) | |
| 174 | - router.get("/waifu_img/*",controller.getImg) | |
| 175 | - router.get("/my_img/*",controller.getImg) | |
| 176 | - router.get("/invoice_file_icon/*",controller.getImg) | |
| 177 | - router.get("/gainianrenli/*",controller.getImg) | |
| 178 | - router.get("/claim_icons/*",controller.getImg) | |
| 179 | - | |
| 180 | - app.use("/", router); | |
| 181 | - | |
| 182 | - app.use("/index", router2); | |
| 113 | + router.get("/gainianrenli/*", controller.getImg); | |
| 114 | + router.get("/waifu_img/*", controller.getImg); | |
| 115 | + router.get("/my_img/*", controller.getImg); | |
| 116 | + router.get("/invoice_file_icon/*", controller.getImg); | |
| 117 | + router.get("/gainianrenli/*", controller.getImg); | |
| 118 | + router.get("/claim_icons/*", controller.getImg); | |
| 183 | 119 | }; |
| 184 | - | |
| 185 | -exports["@require"] = ["$container", "policies", "igloo/settings"]; | |
| 186 | -exports["@singleton"] = true; | ... | ... |
| ... | ... | @@ -11,13 +11,16 @@ |
| 11 | 11 | "egg-scripts": "^2.11.0" |
| 12 | 12 | }, |
| 13 | 13 | "devDependencies": { |
| 14 | + "async": "^3.2.3", | |
| 14 | 15 | "autod": "^3.0.1", |
| 15 | 16 | "autod-egg": "^1.1.0", |
| 16 | 17 | "egg-bin": "^4.11.0", |
| 17 | 18 | "egg-ci": "^1.11.0", |
| 18 | 19 | "egg-mock": "^3.21.0", |
| 19 | 20 | "eslint": "^5.13.0", |
| 20 | - "eslint-config-egg": "^7.1.0" | |
| 21 | + "eslint-config-egg": "^7.1.0", | |
| 22 | + "passport": "^0.5.2", | |
| 23 | + "urlencode": "^1.1.0" | |
| 21 | 24 | }, |
| 22 | 25 | "engines": { |
| 23 | 26 | "node": ">=10.0.0" | ... | ... |
请
注册
或
登录
后发表评论