| | |
| | | LoginByUsername({ commit }, userInfo) { |
| | | return new Promise((resolve, reject) => { |
| | | loginByUsername(userInfo.tenantId, userInfo.username, md5(userInfo.password), userInfo.type, userInfo.key, userInfo.code).then(res => { |
| | | // debugger; |
| | | const data = res.data; |
| | | // console.log(res.data, 'datadatadatadatadata') |
| | | if (data.error_description) { |
| | | Message({ |
| | | message: data.error_description, |
| | |
| | | commit('DEL_ALL_TAG'); |
| | | commit('CLEAR_LOCK'); |
| | | } |
| | | resolve(); |
| | | resolve(data); |
| | | }).catch(error => { |
| | | reject(error); |
| | | }) |
| | |
| | | } |
| | | } |
| | | doItOnce(ele, "考试管理", "成绩查看"); |
| | | doItOnce(ele, "培训管理", "培训考试报名"); |
| | | doItOnce(ele, "培训管理", "培训考试成绩查看"); |
| | | addPath(ele, true); |
| | | }); |
| | | commit('SET_MENU_ALL', menu) |
| | |
| | | }, |
| | | SET_USER_INFO: (state, userInfo) => { |
| | | if (validatenull(userInfo.avatar)) { |
| | | userInfo.avatar = "/img/bg/img-logo.png"; |
| | | userInfo.avatar = "http://61.131.136.25:2081/zhba/upload/picture/mrtx.png"; |
| | | } |
| | | state.userInfo = userInfo; |
| | | setStore({ name: 'userInfo', content: state.userInfo }) |