Commit 5318f27c by 潘琦

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

parent 4aa3e4ae
...@@ -28,6 +28,7 @@ import { ...@@ -28,6 +28,7 @@ import {
} from 'mint-ui' } from 'mint-ui'
import 'mint-ui/lib/style.css' import 'mint-ui/lib/style.css'
import vueSignature from 'vue-signature' import vueSignature from 'vue-signature'
import VueCookies from 'vue-cookies'
Vue.component(TabContainer.name, TabContainer) Vue.component(TabContainer.name, TabContainer)
Vue.component(TabContainerItem.name, TabContainerItem) Vue.component(TabContainerItem.name, TabContainerItem)
...@@ -46,6 +47,8 @@ Vue.component(Radio.name, Radio) ...@@ -46,6 +47,8 @@ Vue.component(Radio.name, Radio)
Vue.component(Checklist.name, Checklist) Vue.component(Checklist.name, Checklist)
Vue.use(InfiniteScroll) Vue.use(InfiniteScroll)
Vue.use(vueSignature) Vue.use(vueSignature)
Vue.use(VueCookies)
VueCookies.config('7d')
Vue.prototype.$toast = Toast Vue.prototype.$toast = Toast
Vue.prototype.$MessageBox = MessageBox Vue.prototype.$MessageBox = MessageBox
......
...@@ -4,6 +4,7 @@ const getters = { ...@@ -4,6 +4,7 @@ const getters = {
userInfo: state => state.user.userInfo, userInfo: state => state.user.userInfo,
code: state => state.user.code, code: state => state.user.code,
authId: state => state.user.authId, authId: state => state.user.authId,
accountId: state => state.user.accountId accountId: state => state.user.accountId,
signInfo: state => state.user.signInfo
} }
export default getters export default getters
...@@ -17,6 +17,9 @@ const user = { ...@@ -17,6 +17,9 @@ const user = {
accountId: getStore({ accountId: getStore({
name: 'account_id' name: 'account_id'
}) || '', }) || '',
signInfo: getStore({
name: 'signInfo'
}),
userInfo: {} userInfo: {}
}, },
actions: { actions: {
...@@ -34,6 +37,9 @@ const user = { ...@@ -34,6 +37,9 @@ const user = {
}, },
setAccountId ({ commit }, param) { setAccountId ({ commit }, param) {
commit('SET_ACCOUNTID', param) commit('SET_ACCOUNTID', param)
},
setSignInfo ({ commit }, param) {
commit('SET_SIGNINFO', param)
} }
}, },
mutations: { mutations: {
...@@ -80,6 +86,14 @@ const user = { ...@@ -80,6 +86,14 @@ const user = {
}, },
SET_USERIFNO: (state, userInfo) => { SET_USERIFNO: (state, userInfo) => {
state.userInfo = 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