Commit ef15f9a6 by 前端

Merge branch 'wangzh_dev_2.0' into 'master'

缓存传参id

See merge request !4
2 parents 32b8cd40 539108b8
...@@ -128,7 +128,7 @@ const actions = { ...@@ -128,7 +128,7 @@ const actions = {
} }
}, },
navigation({ dispatch }) { navigation({ dispatch }) {
let { sessionId, corpId } = getParams() let { sessionId, corpId ,id} = getParams()
const storage_corpId = util.getLocalStorage('dj_scrm_corpId') const storage_corpId = util.getLocalStorage('dj_scrm_corpId')
if (!corpId) corpId = storage_corpId && storage_corpId.corpId if (!corpId) corpId = storage_corpId && storage_corpId.corpId
if (corpId && storage_corpId) { if (corpId && storage_corpId) {
...@@ -138,6 +138,7 @@ const actions = { ...@@ -138,6 +138,7 @@ const actions = {
} }
} }
util.setLocalStorage('dj_scrm_corpId', { corpId }) util.setLocalStorage('dj_scrm_corpId', { corpId })
if (id) util.setLocalStorage('dj_id', { id })
const storage_sessionId = util.getSessionId() const storage_sessionId = util.getSessionId()
if (sessionId || storage_sessionId) { if (sessionId || storage_sessionId) {
state.showWindow = true state.showWindow = true
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
</div> </div>
</div> </div>
<template v-for="(label, ids) in labelArray"> <template v-for="(label, ids) in labelArray">
<template v-if="(merchantModel == 2 && label.labelGroupType != '自店标签') || merchantModel == 1"> <template v-if="(merchantModel == 2 && label.labelGroupType != '自店标签') || merchantModel == 1">
<div class="detail-bg detail-third" :key="ids"> <div class="detail-bg detail-third" :key="ids">
<div class="title"> <div class="title">
...@@ -273,6 +272,10 @@ export default { ...@@ -273,6 +272,10 @@ export default {
this.userAgent = this.isMobile() this.userAgent = this.isMobile()
this.showLoading() this.showLoading()
let { id, customerId, isTrue } = this.getQuery() let { id, customerId, isTrue } = this.getQuery()
if(JSON.parse(window.localStorage.getItem('dj_id'))){
id = JSON.parse(window.localStorage.getItem('dj_id')).id
}
// console.log(id,'测试测试') // console.log(id,'测试测试')
// id = 'wo_pmOEQAAr93aXGLTNtAjLGZZxpwXuQ' // id = 'wo_pmOEQAAr93aXGLTNtAjLGZZxpwXuQ'
if (id || isTrue) { if (id || isTrue) {
...@@ -366,7 +369,8 @@ export default { ...@@ -366,7 +369,8 @@ export default {
} }
] ]
this.userInfo.labelInfos&&this.userInfo.labelInfos.forEach(ele => { this.userInfo.labelInfos &&
this.userInfo.labelInfos.forEach(ele => {
labelArray.forEach(label => { labelArray.forEach(label => {
if (ele.labelGroupInfo.labelGroupType == label.labelGroupType) { if (ele.labelGroupInfo.labelGroupType == label.labelGroupType) {
label.children.push(ele) label.children.push(ele)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!