diff --git a/src/api/hospital.js b/src/api/hospital.js index 2cc7fb0..69f3540 100644 --- a/src/api/hospital.js +++ b/src/api/hospital.js @@ -8,12 +8,22 @@ export const queryHosiptal = () => { }) }; //根据医院id获取须知 -export const queryArticleDetail = (id) => { +export const queryArticleDetail = (createDept) => { return request({ - url: '/api/blade-business/article/detail-by-id', + url: '/api/blade-business/article/detail-publish', method: 'get', params:{ - id + createDept + } + }) +}; +//查询改用户是否在黑名单内 +export const checkBacklist = (cupCardNo) => { + return request({ + url: '/api/blade-business/blacklist/user-blacklist', + method: 'get', + params:{ + cupCardNo } }) }; \ No newline at end of file diff --git a/src/store/index.js b/src/store/index.js index fcb424e..666ee36 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -9,9 +9,19 @@ export default new Vuex.Store({ userInfo: sessionStorage.getItem('userInfo') || null } }, + getters: { + getUserInfo: state => { + return state.userInfo + } + }, mutations: { setUserInfo(state,userInfo){ state.userInfo = userInfo; } }, + actions: { + getInfo({commit},data) { + commit('setUserInfo',data) + } + }, }); diff --git a/src/utils/aisdapp.js b/src/utils/aisdapp.js index 23db127..0375fc1 100644 --- a/src/utils/aisdapp.js +++ b/src/utils/aisdapp.js @@ -1,3 +1,4 @@ +import store from "../store"; let urlCreatesign = urldomaincreatesign let urlGateway = urldomaingateway const appmark = "sdzwapp" @@ -7,7 +8,7 @@ let userType = "1" //用户类型 1个人 2法人 /** * 通过jssdk方法获取APP本地用户票据 */ -export const getUserInfo = () => { +export const getUserInfo = (callback) => { lightAppJssdk.user.getTicket({ success: function (data) { //成功回调 @@ -112,6 +113,7 @@ export const getUserInfoByToken = (userToken) => { if (data.retcode == "000000") { const userInfo = data.data sessionStorage.setItem('userInfo',userInfo); + // store.commit('setUserInfo',userInfo); location.reload(); // const userObj = JSON.parse(userInfo); // lightAppJssdk.notification.alert({ @@ -146,8 +148,10 @@ export const findCorUserByToken = (userToken) => { const data = JSON.parse(value) if (data.retcode == "000000") { - const userInfo = JSON.stringify(data.data) - document.getElementById("userinfo").innerText = userInfo + const userInfo = data.data; + sessionStorage.setItem('userInfo',userInfo); + store.commit('setUserInfo',userInfo); + // document.getElementById("userinfo").innerText = userInfo } else { } }) diff --git a/src/views/Guidance.vue b/src/views/Guidance.vue index 9a8fe5d..f2f0b94 100644 --- a/src/views/Guidance.vue +++ b/src/views/Guidance.vue @@ -1,7 +1,7 @@