1) 修复对话图片上传

This commit is contained in:
zhangds 2022-06-24 16:09:12 +08:00
parent 5d76ccdf7a
commit e0779faaa9
2 changed files with 7 additions and 5 deletions

View File

@ -15,7 +15,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/goods.js?v1">
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/goods_new.js?v2">
</script>
<!--

View File

@ -260,9 +260,10 @@ export default class adduserinfo extends React.Component {
const obj2 = []
if(picItem.describe_url){
let id_name = `${new Date().getTime()}`;
picItem?.describe_url.map((item) => {
obj1.push({ src: item, id: `${new Date().getTime()}`, type:"add", name:`${picItem.name}`})
obj2.push({ url: item, id: `${new Date().getTime()}`, type:"add", name:`${picItem.name}` })
obj1.push({ src: item, id: `${id_name}`, type:"add", name:`${picItem.name}`})
obj2.push({ url: item, id: `${id_name}`, type:"add", name:`${picItem.name}` })
})
}
console.log(" picItem =>", picItem);
@ -337,6 +338,7 @@ export default class adduserinfo extends React.Component {
autoplay: 3000
})
clearTimeout(timer)
debugger
timer = setTimeout(() => {
if (arr.length > this.state.productpic.length) {
//新增
@ -386,7 +388,7 @@ export default class adduserinfo extends React.Component {
let temp_arr2 = this.state.productpic
for (let i = 0; i < temp_arr.length; i++) {
let temp = temp_arr[i]
if (arr.indexOf(temp.name) > -1) {
if (arr.indexOf(temp.id) > -1) {
temp_arr2.push(temp)
}
}
@ -399,7 +401,7 @@ export default class adduserinfo extends React.Component {
let pic_arr = this.state.productpic
for (let i = 0; i < arr.length; i++) {
let temp = pic_arr.find((o) => {
return o.name == arr[i]
return o.id == arr[i]
})
temp_arr[i] = temp
}