Commit 0658bb2d by 吕海涛

公告新增,解决冲突

parent 07415e22
...@@ -26,6 +26,14 @@ const getters = { ...@@ -26,6 +26,14 @@ const getters = {
return {} return {}
} }
}, },
brandList: state => {
let arr = Object.keys(state.business.brandList);
if (arr.length > 0) {
return JSON.parse(state.business.brandList)
} else {
return []
}
},
areaCodeObj: state => { areaCodeObj: state => {
let arr = Object.keys(state.business.areaCodeObj); let arr = Object.keys(state.business.areaCodeObj);
if (arr.length > 0) { if (arr.length > 0) {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* *
*/ */
import { getplatformList } from "@/port/set-request"; import { getplatformList } from "@/port/set-request";
import { color } from "echarts/lib/theme/light";
const state = { const state = {
areaCodeObj: sessionStorage.getItem('areaCodeObj') || {}, areaCodeObj: sessionStorage.getItem('areaCodeObj') || {},
...@@ -12,7 +13,7 @@ const state = { ...@@ -12,7 +13,7 @@ const state = {
orderStatus: sessionStorage.getItem('orderStatus') || '', orderStatus: sessionStorage.getItem('orderStatus') || '',
productJJInfo: sessionStorage.getItem('productJJInfo') || {}, productJJInfo: sessionStorage.getItem('productJJInfo') || {},
orderDetail: sessionStorage.getItem('orderDetail') || {}, orderDetail: sessionStorage.getItem('orderDetail') || {},
brandList: sessionStorage.getItem('brandList') || [] brandList: sessionStorage.getItem('brandList') || [],
} }
const mutations = { const mutations = {
SET_AREACODE(state, payload) { SET_AREACODE(state, payload) {
...@@ -36,6 +37,7 @@ const mutations = { ...@@ -36,6 +37,7 @@ const mutations = {
sessionStorage.setItem('productJJInfo', payload) sessionStorage.setItem('productJJInfo', payload)
}, },
SET_BRANDLIST(state, payload) { SET_BRANDLIST(state, payload) {
console.log(payload)
state.brandList = payload state.brandList = payload
sessionStorage.setItem('brandList', payload) sessionStorage.setItem('brandList', payload)
...@@ -71,9 +73,8 @@ const actions = { ...@@ -71,9 +73,8 @@ const actions = {
/** 测试环境注释 */ /** 测试环境注释 */
res.data.forEach(item => { res.data.forEach(item => {
item.brandUrl = item.brandUrl + '/brand'; item.brandUrl = item.brandUrl + '/brand';
}) })
console.log(res.data);
let data = res.data; let data = res.data;
commit('SET_BRANDLIST', JSON.stringify(data)) commit('SET_BRANDLIST', JSON.stringify(data))
......
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
computed: { computed: {
brandLists() { brandLists() {
let brandList = this.$store.getters.brandList; let brandList = this.$store.getters.brandList;
if(brandList.length === 0) { if(brandList.length === 0) {
return new Promise(() =>{ return new Promise(() =>{
this.$store.dispatch('business/getBrandList') this.$store.dispatch('business/getBrandList')
......
...@@ -339,7 +339,7 @@ ...@@ -339,7 +339,7 @@
text-align: right; text-align: right;
" "
>操作人:</span >操作人:</span
>{{ userInfo.name }}</span >{{ JSON.parse($store.getters.userInfo).name }}</span
> >
</div> </div>
</div> </div>
...@@ -778,7 +778,6 @@ export default { ...@@ -778,7 +778,6 @@ export default {
userInfo: "user/userInfo", userInfo: "user/userInfo",
}), }),
brandLists() { brandLists() {
let brandList = this.$store.getters.brandList; let brandList = this.$store.getters.brandList;
if (brandList.length === 0) { if (brandList.length === 0) {
return new Promise(() => { return new Promise(() => {
...@@ -1100,7 +1099,7 @@ export default { ...@@ -1100,7 +1099,7 @@ export default {
options1: [], options1: [],
}; };
userLog(json, obj.testurl, obj.platformId).then((res) => { userLog(json, obj.brandUrl, obj.platformId).then((res) => {
if (res.status == 200) { if (res.status == 200) {
if (res.data) { if (res.data) {
this.getOrderLogList = res.data.content; this.getOrderLogList = res.data.content;
......
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