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 = {
}
},
navigation({ dispatch }) {
let { sessionId, corpId } = getParams()
let { sessionId, corpId ,id} = getParams()
const storage_corpId = util.getLocalStorage('dj_scrm_corpId')
if (!corpId) corpId = storage_corpId && storage_corpId.corpId
if (corpId && storage_corpId) {
......@@ -138,6 +138,7 @@ const actions = {
}
}
util.setLocalStorage('dj_scrm_corpId', { corpId })
if (id) util.setLocalStorage('dj_id', { id })
const storage_sessionId = util.getSessionId()
if (sessionId || storage_sessionId) {
state.showWindow = true
......
......@@ -45,8 +45,7 @@
</div>
</div>
<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="title">
{{ label.labelGroupType }}
......@@ -107,7 +106,7 @@
<van-popup v-model="showDatePicker" position="bottom" round>
<van-datetime-picker v-model="selectDate" type="date" title="选择年月日" :min-date="minDate" :max-date="maxDate" @confirm="confirmDate" @cancel="showDatePicker = false" />
</van-popup>
<make @success="successHandle" :externalUserIds="[id]" :chooseItems="userInfo.labelInfos" :isCustomer="false" ref="popRefs"></make>
<make @success="successHandle" :externalUserIds="[id]" :chooseItems="userInfo.labelInfos" :isCustomer="false" ref="popRefs"></make>
</div>
</template>
......@@ -273,6 +272,10 @@ export default {
this.userAgent = this.isMobile()
this.showLoading()
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,'测试测试')
// id = 'wo_pmOEQAAr93aXGLTNtAjLGZZxpwXuQ'
if (id || isTrue) {
......@@ -365,14 +368,15 @@ export default {
isShow: false
}
]
this.userInfo.labelInfos&&this.userInfo.labelInfos.forEach(ele => {
labelArray.forEach(label => {
if (ele.labelGroupInfo.labelGroupType == label.labelGroupType) {
label.children.push(ele)
}
this.userInfo.labelInfos &&
this.userInfo.labelInfos.forEach(ele => {
labelArray.forEach(label => {
if (ele.labelGroupInfo.labelGroupType == label.labelGroupType) {
label.children.push(ele)
}
})
})
})
console.log(labelArray)
this.labelArray = labelArray
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!