diff --git a/public/index.html b/public/index.html index 55e0e78..4d125ad 100644 --- a/public/index.html +++ b/public/index.html @@ -4,6 +4,9 @@ + + + <%= webpackConfig.name %> diff --git a/src/store/modules/user.js b/src/store/modules/user.js index c288974..cc2af73 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -16,7 +16,8 @@ const getDefaultState = () => { return { token: getToken(), name: '', - avatar: '', + avatar: '', + is_number:false, // 是否可以编辑残疾证信息 roles: [] } } @@ -38,6 +39,9 @@ const mutations = { }, SET_ROLES: (state, roles) => { state.roles = roles + }, + SET_ISNUMBER:(state, is_number)=>{ + state.is_number = is_number } } @@ -79,19 +83,29 @@ const actions = { if (!response) { reject('身份验证失败请重新登录') - } + } + if(response["role"]){ + for(var k of response["role"]){ + if(k.name==='残疾证管理'){ + response["is_number"] = true + } + } + } + response["roles"] = ["admin"]; const { roles, name, - avatar + avatar, + is_number } = response - + commit('SET_AVATAR', avatar) commit('SET_ROLES', roles) commit('SET_NAME', name) - commit('SET_AVATAR', avatar) + commit('SET_AVATAR', avatar) + commit('SET_ISNUMBER', is_number) resolve(response) }).catch(error => { reject(error) diff --git a/src/views/record/components/addRecord.vue b/src/views/record/components/addRecord.vue index e11fef7..977f304 100644 --- a/src/views/record/components/addRecord.vue +++ b/src/views/record/components/addRecord.vue @@ -198,7 +198,7 @@ *残疾证:
- +
@@ -208,7 +208,7 @@ *残疾类别:
- + @@ -221,7 +221,7 @@ *残疾等级:
- + @@ -234,7 +234,7 @@ 残疾详情:
-
@@ -242,10 +242,10 @@