修复已知bug
parent
15759db8bc
commit
3581889d7a
|
|
@ -43,21 +43,20 @@ function CompEvaluation (props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={classNames('comp-evaluation', className)}>
|
<View className={classNames('comp-evaluation', className)}>
|
||||||
<View className='evaluation-hd'>
|
{/* <View className='evaluation-hd'>
|
||||||
<View className='title'>{`商品评价(${list.length})`}</View>
|
<View className='title'>{`商品评价(${list.length})`}</View>
|
||||||
{list.length > 0 && (
|
{list.length > 0 && (
|
||||||
<View className='extra-more' onClick={onViewMore}>
|
<View className='extra-more' onClick={onViewMore}>
|
||||||
{/* 查看全部 */}
|
|
||||||
<Text className='iconfont icon-qianwang-01'></Text>
|
<Text className='iconfont icon-qianwang-01'></Text>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View> */}
|
||||||
<View className='evaluation-bd'>
|
<View className='evaluation-bd'>
|
||||||
{list.map((item) => (
|
{list.map((item) => (
|
||||||
<View className='evaluation-item-wrap'>
|
<View className='evaluation-item-wrap'>
|
||||||
<View className='item-hd'>
|
<View className='item-hd'>
|
||||||
<SpImage src={item.avatar} className='evaluation-icon' width={50} height={50} />
|
<SpImage src={item.avatar} className='evaluation-icon' width={50} height={50} />
|
||||||
<Text className='evaluation-name'>{item.username || '匿名用户'}
|
<Text className='evaluation-name'>{'匿名用户' || item.username}
|
||||||
<Text style={{ marginLeft: '10rpx' }}>{fortmatStr(item.item_spec_desc)}</Text>
|
<Text style={{ marginLeft: '10rpx' }}>{fortmatStr(item.item_spec_desc)}</Text>
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
// padding: 24px 0;
|
// padding: 24px 0;
|
||||||
.evaluation-item-wrap {
|
.evaluation-item-wrap {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
margin-top: 20px;
|
||||||
// &:not(:last-child) {
|
// &:not(:last-child) {
|
||||||
// margin-bottom: 20px;
|
// margin-bottom: 20px;
|
||||||
// }
|
// }
|
||||||
|
|
|
||||||
|
|
@ -291,16 +291,15 @@ function EspierDetail (props) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// console.log("🚀 ~ data.introList:", data)
|
|
||||||
setState((draft) => {
|
setState((draft) => {
|
||||||
draft.info = {
|
draft.info = {
|
||||||
...data,
|
...data,
|
||||||
subscribe,
|
subscribe,
|
||||||
}
|
}
|
||||||
draft.introList = (data.introList || []).map((item) => {
|
draft.introList = (data.introList || []).concat([{ isOpen: false, id: '99999999', type: 'eva', title: '商品评价' }]).map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
isOpen: false
|
isOpen: false,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
draft.promotionActivity = data.promotionActivity
|
draft.promotionActivity = data.promotionActivity
|
||||||
|
|
@ -785,13 +784,15 @@ function EspierDetail (props) {
|
||||||
})
|
})
|
||||||
// if (!item.isOpen) {
|
// if (!item.isOpen) {
|
||||||
// setState((draft) => {
|
// setState((draft) => {
|
||||||
// draft.scrollTop = 742 + Math.random()
|
// draft.scrollTop = 1042 + Math.random() / 10
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
}}
|
}}
|
||||||
title={item.title}
|
title={item.title}
|
||||||
>
|
>
|
||||||
<SpHtml content={item.content} />
|
{item.type !== 'eva' ? <SpHtml content={item.content} /> :
|
||||||
|
<CompEvaluation list={evaluationList} itemId={info.itemId}></CompEvaluation>
|
||||||
|
}
|
||||||
</AtAccordion>
|
</AtAccordion>
|
||||||
<View onClick={() => {
|
<View onClick={() => {
|
||||||
setState((draft) => {
|
setState((draft) => {
|
||||||
|
|
@ -803,7 +804,7 @@ function EspierDetail (props) {
|
||||||
})
|
})
|
||||||
// if (!item.isOpen) {
|
// if (!item.isOpen) {
|
||||||
// setState((draft) => {
|
// setState((draft) => {
|
||||||
// draft.scrollTop = 742 + Math.random()
|
// draft.scrollTop = 1042 + Math.random() / 10
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
}}>
|
}}>
|
||||||
|
|
@ -813,7 +814,8 @@ function EspierDetail (props) {
|
||||||
</View>
|
</View>
|
||||||
</View>) : <View style={{ height: `calc(100% - 380px)` }}></View>}
|
</View>) : <View style={{ height: `calc(100% - 380px)` }}></View>}
|
||||||
{/* 商品评价 */}
|
{/* 商品评价 */}
|
||||||
<CompEvaluation list={evaluationList} itemId={info.itemId}></CompEvaluation>
|
|
||||||
|
{/* <CompEvaluation list={evaluationList} itemId={info.itemId}></CompEvaluation> */}
|
||||||
{isArray(historyList) ? <View className='bottom-box'>
|
{isArray(historyList) ? <View className='bottom-box'>
|
||||||
<View className="bottom-box-tit">浏览历史</View>
|
<View className="bottom-box-tit">浏览历史</View>
|
||||||
<ScrollView scrollX scrollWithAnimation showScrollbar={true} scrollLeft={0} className="shop-box">
|
<ScrollView scrollX scrollWithAnimation showScrollbar={true} scrollLeft={0} className="shop-box">
|
||||||
|
|
|
||||||
|
|
@ -227,11 +227,13 @@ function InvoiceInfo (props) {
|
||||||
|
|
||||||
// 预览文件
|
// 预览文件
|
||||||
const preview = (url, fileName) => {
|
const preview = (url, fileName) => {
|
||||||
|
Taro.showLoading({ title: '正在加载中', mask: true })
|
||||||
Taro.downloadFile({
|
Taro.downloadFile({
|
||||||
url: url,
|
url: url,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log("下载:", res)
|
console.log("下载:", res)
|
||||||
var filePath = res.tempFilePath
|
var filePath = res.tempFilePath
|
||||||
|
Taro.hideLoading()
|
||||||
Taro.openDocument({
|
Taro.openDocument({
|
||||||
filePath: filePath,
|
filePath: filePath,
|
||||||
fileType: getFileType(url),
|
fileType: getFileType(url),
|
||||||
|
|
@ -241,6 +243,9 @@ function InvoiceInfo (props) {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
fail: function (_) {
|
||||||
|
Taro.hideLoading()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取文件类型
|
// 获取文件类型
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue