Commit ce49bcff authored by Damon's avatar Damon

数据错乱问题

parent 6cde5207
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="backView"> <view class="backView">
<view class="ph-pr-arr" v-for="(dataItem, index) in list" :key="index"> <view class="ph-pr-arr" v-for="(dataItem, index) in list" :key="index">
<template v-if="dataItem.data.length > 0"> <template v-if="dataItem.data.length > 0">
<view class="topTitle"><text class="topFont">{{ dataItem.title }}</text><text>(不同系统对应不同模板)</text></view> <view class="topTitle"><text class="topFont">{{ dataItem.title }}</text><text>(不同系统对应不同水印)</text></view>
<view class="ph-pr-content"> <view class="ph-pr-content">
<view v-for="(item,ikey) in dataItem.data" <view v-for="(item,ikey) in dataItem.data"
:class="param[dataItem.type] === item.id ? 'select-item-view' : 'item-view'" :class="param[dataItem.type] === item.id ? 'select-item-view' : 'item-view'"
...@@ -111,13 +111,12 @@ ...@@ -111,13 +111,12 @@
//选择 点击 //选择 点击
itemClick: function(type, item, ikey) { itemClick: function(type, item, ikey) {
switch (type) { switch (type) {
case 'classifyId': case 'classifyId':
this.param = { this.param = {
classifyId: item.id, classifyId: item.id,
systemId: '', systemId: '',
brandId: '' brandId: '',
} }
this.selectedAll = false this.selectedAll = false
this.systemList = this.classifyList[ikey].child this.systemList = this.classifyList[ikey].child
......
...@@ -111,14 +111,14 @@ ...@@ -111,14 +111,14 @@
const currentItem = photo.currentItem const currentItem = photo.currentItem
currentItem.imageList.unshift(path) currentItem.imageList.unshift(path)
// 从缓存数据中找到修改对象并替换 // 从缓存数据中找到修改对象并替换
const data = cache.getCache(currentItem.system_id) const data = cache.getCache(photo.product.systemId)
data.result.forEach(v => { data.result.forEach(v => {
const index = v.list.findIndex(item => item._id === currentItem._id) const index = v.list.findIndex(item => item._id === currentItem._id)
if (index > -1) { if (index > -1) {
v.list[index] = currentItem v.list[index] = currentItem
} }
}) })
cache.setCache(currentItem.system_id, data) cache.setCache(photo.product.systemId, data)
}, },
saveLocal(path){ saveLocal(path){
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
......
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