6.7 内拍修改

This commit is contained in:
jl-zhoujl2
2022-06-07 13:54:50 +08:00
parent 0bf23cfce6
commit cb764d7bcb
2 changed files with 41 additions and 15 deletions

View File

@ -10,6 +10,8 @@ import { getProvince } from '../AuctionAnnouncementData/service';
import { getList, getSfbm } from './service';
import { saveDateTimeFormatter } from '@/utils/DateUtils';
import { isNotEmpty } from '@/utils/CommonUtils';
import { pictureDisplayPath } from '@/utils/DownloadUtils';
import { getFilelist } from '@/services/download_';
export default () => {
//获取用户数据
@ -54,8 +56,16 @@ export default () => {
isNotEmpty(kssj.current) ? params['kssj'] = kssj.current : null;
isNotEmpty(jssj.current) ? params['jssj'] = jssj.current : null;
setLoading(true);
await getList(params).then(res => {
await getList(params).then(async res => {
if (res?.code == 200) {
for (const ite of res?.data.records) {
await getFilelist([ite.dfzp]).then(response => {//获取主图
if (response?.success && response?.data?.length > 0) {
const returnUrl = window.location.origin + pictureDisplayPath + '?filePath=' + response?.data[0].filePath;
ite["dfzpUrl"] = returnUrl;
}
})
}
setProductList(res?.data.records);
}
}).finally(() => {
@ -132,7 +142,6 @@ export default () => {
}
//点击商品进入详情
const cardClick = (id: string) => {
console.log('cardClick', id)
let projectData = {
id: id
};
@ -260,7 +269,8 @@ export default () => {
<img
alt="example"
height="245px"
src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
// src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
src={item.dfzpUrl}
/>
}
onClick={() => cardClick(item.id)}