Commit 5318f27c by 潘琦

签约新增需求,cookie保存用户输入的签约信息;

parent 4aa3e4ae
......@@ -28,6 +28,7 @@ import {
} from 'mint-ui'
import 'mint-ui/lib/style.css'
import vueSignature from 'vue-signature'
import VueCookies from 'vue-cookies'
Vue.component(TabContainer.name, TabContainer)
Vue.component(TabContainerItem.name, TabContainerItem)
......@@ -46,6 +47,8 @@ Vue.component(Radio.name, Radio)
Vue.component(Checklist.name, Checklist)
Vue.use(InfiniteScroll)
Vue.use(vueSignature)
Vue.use(VueCookies)
VueCookies.config('7d')
Vue.prototype.$toast = Toast
Vue.prototype.$MessageBox = MessageBox
......
......@@ -4,6 +4,7 @@ const getters = {
userInfo: state => state.user.userInfo,
code: state => state.user.code,
authId: state => state.user.authId,
accountId: state => state.user.accountId
accountId: state => state.user.accountId,
signInfo: state => state.user.signInfo
}
export default getters
......@@ -17,6 +17,9 @@ const user = {
accountId: getStore({
name: 'account_id'
}) || '',
signInfo: getStore({
name: 'signInfo'
}),
userInfo: {}
},
actions: {
......@@ -34,6 +37,9 @@ const user = {
},
setAccountId ({ commit }, param) {
commit('SET_ACCOUNTID', param)
},
setSignInfo ({ commit }, param) {
commit('SET_SIGNINFO', param)
}
},
mutations: {
......@@ -80,6 +86,14 @@ const user = {
},
SET_USERIFNO: (state, userInfo) => {
state.userInfo = userInfo
},
SET_SIGNINFO: (state, info) => {
state.signInfo = info
setStore({
name: 'signInfo',
content: state.signInfo,
type: 'session'
})
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment