Commit ee4d5580 authored by youjie's avatar youjie

no message

parent 6998146c
...@@ -94,7 +94,7 @@ service.interceptors.request.use( ...@@ -94,7 +94,7 @@ service.interceptors.request.use(
// //TODO:用户登录的特殊处理, // //TODO:用户登录的特殊处理,
// } else { // } else {
// // 如果保存有token,则取,否则不添加Authorization // // 如果保存有token,则取,否则不添加Authorization
// if (localStorage.vuex && JSON.parse(localStorage.vuex).user?.token) { // if (Store.state && Store.state.user?.token) {
// //TODO:Access_TOKEN 的获取,需要根据实际业务情况进行调整 // //TODO:Access_TOKEN 的获取,需要根据实际业务情况进行调整
// const token = Store.state.user?.token // const token = Store.state.user?.token
// const tokenType = token.token_type // const tokenType = token.token_type
......
...@@ -95,7 +95,7 @@ service.interceptors.request.use( ...@@ -95,7 +95,7 @@ service.interceptors.request.use(
// //TODO:用户登录的特殊处理, // //TODO:用户登录的特殊处理,
// } else { // } else {
// // 如果保存有token,则取,否则不添加Authorization // // 如果保存有token,则取,否则不添加Authorization
// if (localStorage.vuex && JSON.parse(localStorage.vuex).user?.token) { // if (Store.state && Store.state.user?.token) {
// //TODO:Access_TOKEN 的获取,需要根据实际业务情况进行调整 // //TODO:Access_TOKEN 的获取,需要根据实际业务情况进行调整
// const token = Store.state.user?.token // const token = Store.state.user?.token
// const tokenType = token.token_type // const tokenType = token.token_type
......
...@@ -31,11 +31,11 @@ const request = (cmd:string,msg:any): Promise<HttpResponse>=>{ ...@@ -31,11 +31,11 @@ const request = (cmd:string,msg:any): Promise<HttpResponse>=>{
let key = ""; let key = "";
let groupId = 0 let groupId = 0
let timestamp = (new Date()).valueOf(); let timestamp = (new Date()).valueOf();
if (localStorage.vuex && JSON.parse(localStorage.vuex).user?.token) { if (Store.state && Store.state.user?.token) {
token = Store.state.user?.token?.access_token token = Store.state.user?.token?.access_token
key = Store.state.user?.secretKey key = Store.state.user?.secretKey
} }
if (localStorage.vuex && JSON.parse(localStorage.vuex).user?.userDetail) { if (Store.state && Store.state.user?.userDetail) {
groupId = Store.state.user?.userDetail?.groupId groupId = Store.state.user?.userDetail?.groupId
} }
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase(); var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
......
...@@ -31,11 +31,11 @@ const request = (cmd:string,msg:any): Promise<HttpResponse>=>{ ...@@ -31,11 +31,11 @@ const request = (cmd:string,msg:any): Promise<HttpResponse>=>{
let key = ""; let key = "";
let groupId = 0 let groupId = 0
let timestamp = (new Date()).valueOf(); let timestamp = (new Date()).valueOf();
if (localStorage.vuex && JSON.parse(localStorage.vuex).user?.token) { if (Store.state && Store.state.user?.token) {
token = Store.state.user?.token?.access_token token = Store.state.user?.token?.access_token
key = Store.state.user?.secretKey key = Store.state.user?.secretKey
} }
if (localStorage.vuex && JSON.parse(localStorage.vuex).user?.userDetail) { if (Store.state && Store.state.user?.userDetail) {
groupId = Store.state.user?.userDetail?.groupId groupId = Store.state.user?.userDetail?.groupId
} }
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase(); var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</div> </div>
</div> </div>
<div class="text-center"> <div class="text-center">
<q-btn color="primary" unelevated class="q-px-xl" :label="$t('v101.iknow')" v-close-popup /> <q-btn color="primary" unelevated class="q-px-xl" :label="$t('v101.iknow')" v-close-popup @click="show=false"/>
</div> </div>
</q-card> </q-card>
</q-dialog> </q-dialog>
......
...@@ -26,7 +26,7 @@ export default defineComponent({ ...@@ -26,7 +26,7 @@ export default defineComponent({
pageTitle.value = t('hotelorder.pageTitle') pageTitle.value = t('hotelorder.pageTitle')
setTitle(pageTitle.value) setTitle(pageTitle.value)
let CustomerId let CustomerId
if (localStorage.vuex && JSON.parse(localStorage.vuex).user?.userDetail) { if (Store.state && Store.state.user?.userDetail) {
CustomerId = Store.state.user?.userDetail?.customerId CustomerId = Store.state.user?.userDetail?.customerId
} }
const search=reactive({ const search=reactive({
......
...@@ -292,7 +292,7 @@ ...@@ -292,7 +292,7 @@
</div> </div>
<div class="col-12 row"> <div class="col-12 row">
<div class="row q-mb-md" :class="{'col-6':$q.platform.is.desktop,'col-12':$q.platform.is.mobile}" v-for="item in sureMsg.roomGroup"> <div class="row q-mb-md" :class="{'col-6':$q.platform.is.desktop,'col-12':$q.platform.is.mobile}" v-for="item in sureMsg.roomGroup">
<span class="" :class="{'HotelSure-text q-px-lg':$q.platform.is.desktop,'HotelSure-textMobile q-pr-sm':$q.platform.is.mobile}"><span class="text-red"></span> <span class="" :class="{'HotelSure-text q-px-lg':$q.platform.is.desktop,'HotelSure-textMobile q-pr-sm':$q.platform.is.mobile}"><span class="text-red">*</span>
{{$t('v101.scatteredOrder.fangjian')}} {{$t('v101.scatteredOrder.fangjian')}}
{{item.roomCount}} {{item.roomCount}}
</span> </span>
...@@ -604,7 +604,7 @@ ...@@ -604,7 +604,7 @@
}) })
}) })
let CustomerId let CustomerId
if (localStorage.vuex && JSON.parse(localStorage.vuex).user?.userDetail) { if (Store.state && Store.state.user?.userDetail) {
CustomerId = Store.state.user?.userDetail?.customerId CustomerId = Store.state.user?.userDetail?.customerId
data.sureMsg.CustomerId=CustomerId data.sureMsg.CustomerId=CustomerId
} }
......
...@@ -8,7 +8,11 @@ import mutations from './mutations' ...@@ -8,7 +8,11 @@ import mutations from './mutations'
import modules from './modules' import modules from './modules'
import { StateType } from '../@types' import { StateType } from '../@types'
import SecureLS from "secure-ls"; import SecureLS from "secure-ls";
var ls = new SecureLS({ isCompression: false }); var ls = new SecureLS({
encodingType: "aes", //加密类型
isCompression: false,
encryptionSecret: "encryption", //PBKDF2值
});
// provide typings for `this.$store` // provide typings for `this.$store`
declare module '@vue/runtime-core' { declare module '@vue/runtime-core' {
...@@ -33,17 +37,17 @@ const store: VuexStore<StateType> = createStore<StateType>({ ...@@ -33,17 +37,17 @@ const store: VuexStore<StateType> = createStore<StateType>({
// for dev mode and --debug builds only // for dev mode and --debug builds only
strict: !!process.env.DEBUGGING, strict: !!process.env.DEBUGGING,
plugins: [ plugins: [
createPersistedState({
paths: ['app', 'user']
})
// createPersistedState({ // createPersistedState({
// key: "vuex", // paths: ['app', 'user']
// storage: {
// getItem: (key) => ls.get(key),
// setItem: (key, value) => ls.set(key, value),
// removeItem: (key) => ls.remove(key),
// },
// }) // })
createPersistedState({
key: "vuex",
storage: {
getItem: (key) => ls.get(key),
setItem: (key, value) => ls.set(key, value),
removeItem: (key) => ls.remove(key),
},
})
] ]
}) })
......
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