diff --git a/.env.production b/.env.production index 385721d..483f607 100644 --- a/.env.production +++ b/.env.production @@ -4,4 +4,4 @@ ENV = 'production' # base api VUE_APP_BASE_API = 'http://ginadmin.hxgk.group/api' VUE_APP_BASE_API1 = 'http://ginadmin.hxgk.group/hrapi' -VUE_APP_BASE_API2 = 'http://ginadmin.hxgk.group/fileapi' +VUE_APP_BASE_API2 = 'http://ginadmin.hxgk.group/kpiapi' diff --git a/src/App.vue b/src/App.vue index abcef53..b4a22e8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -44,18 +44,18 @@ export default { }, mounted(){ -window.addEventListener('hashchange',()=>{ -var currentPath = window.location.hash.slice(1); // 获取输入的路由 + window.addEventListener('hashchange',()=>{ + var currentPath = window.location.hash.slice(1); // 获取输入的路由 + console.log('动态跳转------------->',currentPath) + if(this.$router.path !== currentPath){ + console.log('动态跳转') + // this.$router.push(currentPath); // 动态跳转 -if(this.$router.path !== currentPath){ - console.log('动态跳转') -// this.$router.push(currentPath); // 动态跳转 + } -} - -},false); + },false); -} + } } diff --git a/src/api/systemaccredit/systemapi.js b/src/api/systemaccredit/systemapi.js index d3f2681..7a51690 100644 --- a/src/api/systemaccredit/systemapi.js +++ b/src/api/systemaccredit/systemapi.js @@ -16,4 +16,13 @@ export const getSystemMenuThree = (data) => { method: 'post', data: data }) +} + +//编辑权限 +export const editPower = (data) => { + return request({ + url: '/powerpc/edit_power_new', + method: 'post', + data: data + }) } \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index fc999e9..a9267ae 100644 --- a/src/permission.js +++ b/src/permission.js @@ -13,7 +13,7 @@ const whiteList = ['/login'] // no redirect whitelist router.beforeEach(async(to, from, next) => { // start progress bar NProgress.start() - + console.log("路由拦截---->",to) // set page title document.title = getPageTitle(to.meta.title) diff --git a/src/utils/request.js b/src/utils/request.js index a3369d0..6042527 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -58,7 +58,7 @@ service.interceptors.response.use( */ response => { const res = response.data - console.log("res.code") + console.log("res.code---------->") console.log(res.code) // if the custom code is not 20000, it is judged as an error. if (res.code !== 0) { @@ -90,7 +90,7 @@ service.interceptors.response.use( // return Promise.reject(Error).catch(Error=>{console.log(Error)}) // return Promise.reject(new Error(res.msg || 'Error')) } else { - console.log("成功") + console.log("成功---->",res) return res } }, diff --git a/src/utils/requestFile.js b/src/utils/requestFile.js index 6cce14c..91283b6 100644 --- a/src/utils/requestFile.js +++ b/src/utils/requestFile.js @@ -70,7 +70,8 @@ service.interceptors.response.use( }) }) } - return Promise.reject(new Error(res.msg || 'Error')) + // return Promise.reject(new Error(res.msg || 'Error')) + return res } else { return res } diff --git a/src/views/ce/index.vue b/src/views/ce/index.vue index 7581618..8edfa66 100644 --- a/src/views/ce/index.vue +++ b/src/views/ce/index.vue @@ -14,7 +14,7 @@ import { scancode } from '@/api/user' } }, async created () { - console.log(this.$route.query) + console.log("this.$route.query--->",this.$route.query) setToken(this.$route.query.token) setKey(this.$route.query.key) this.$store.commit('user/setToken', this.$route.query.token) @@ -35,7 +35,7 @@ import { scancode } from '@/api/user' this.$store.commit('user/setUserInfo', res.data.userinfo) this.$store.commit('user/setToken', res.data.token) this.$store.commit('user/setKey', res.data.key) - console.log(JSON.parse(sessionStorage.getItem('userinfo'))) + console.log("userinfo----------------->",JSON.parse(sessionStorage.getItem('userinfo'))) // this.$store.state.变量名 this.$router.push('/') // this.$router.push('/') diff --git a/src/views/login/wxLogin - 副本.vue b/src/views/login/wxLogin - 副本.vue new file mode 100644 index 0000000..0211821 --- /dev/null +++ b/src/views/login/wxLogin - 副本.vue @@ -0,0 +1,382 @@ + + + + + + + diff --git a/src/views/login/wxLogin.vue b/src/views/login/wxLogin.vue index 0211821..d4224d3 100644 --- a/src/views/login/wxLogin.vue +++ b/src/views/login/wxLogin.vue @@ -145,7 +145,8 @@ export default { } }, created() { - this.getWeChat() + // this.getWeChat() + this.getNewWeChatLogin() this.loginVerify() this.curYear = new Date().getFullYear() }, @@ -267,7 +268,44 @@ export default { this.picPath = ele.data.picPath this.loginForm.captchaId = ele.data.captchaId }) - } + }, + //新扫码登录 + getNewWeChatLogin () { + // 动态引入企业微信js文件 + const s = document.createElement('script') + s.type = 'text/javascript' + // s.src = 'http://rescdn.qqmail.com/node/ww/wwopenmng/js/sso/wwLogin-1.0.0.js' + s.src = 'http://wwcdn.weixin.qq.com/node/wework/wwopen/js/wwLogin-1.2.7.js?v=1.2.7' + const wxElement = document.body.appendChild(s) + // 调用企业微信二维码方法 + wxElement.onload = function () { + // window.WwLogin({ + // id: 'weChat', // 需要显示的容器id + // appid: 'ww02f310301953277a', // 公众号appid wx******* + // agentid: '1000036', // 公众号agentid wx******* + // scope: 'snsapi_login', // 网页默认即可 + // redirect_uri: 'https%3A%2F%2Fkpi.hxgk.group%2Fjumpapiurl%2Fscancode', // 授权成功后回调的url,需要在企业微信配置,我的方法是回调到自己的weChatBack页面 + // state: Math.ceil(Math.random() * 1000), // 可设置为简单的随机数加session用来校验 + // style: 'black', // 提供"black"、"white"可选。二维码的样式 + // href: '' // 外部css文件url,需要https + // }) + var wwLogin = new WwLogin({ + "id": "weChat", + "appid": "ww02f310301953277a", + "agentid": "1000036", + "redirect_uri": "https%3A%2F%2Fkpi.hxgk.group%2Fkpiapi%2Fbase%2Fscan_qrcode_callback%3Fvisit%3Dpc", + "state": Math.ceil(Math.random() * 1000), + "href": "", + "lang": "zh", + }); + window.wwLogin + } + }, + + + + + } } diff --git a/src/views/permission/permissionSetting.vue b/src/views/permission/permissionSetting.vue index 772284b..57a8a0b 100644 --- a/src/views/permission/permissionSetting.vue +++ b/src/views/permission/permissionSetting.vue @@ -42,7 +42,7 @@
全选
-
+
{{iteam.name}}
diff --git a/src/views/purview/postpower.vue b/src/views/purview/postpower.vue index 0b48d70..2186815 100644 --- a/src/views/purview/postpower.vue +++ b/src/views/purview/postpower.vue @@ -28,7 +28,20 @@ - + + + + + 本岗位 + 本部门 + 本分部 + 指定行政组织 + 所有 + + + + + -