Commit 0658bb2d by 吕海涛

公告新增,解决冲突

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