修复已知bug 新增商品评论功能
parent
0e7ad5270f
commit
2fa4f8034a
|
|
@ -15,11 +15,11 @@ export default class GoodsEvaluation extends Component {
|
||||||
showComment: false
|
showComment: false
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor (props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
styles: { height: '220rpx' }
|
styles: { height: '200rpx' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -48,6 +48,28 @@ export default class GoodsEvaluation extends Component {
|
||||||
this.props.onReplyRate() && this.props.onReplyRate(info)
|
this.props.onReplyRate() && this.props.onReplyRate(info)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fortmatStr (desc) {
|
||||||
|
console.log("🚀 ~ GoodsEvaluation ~ desc:", desc)
|
||||||
|
let desc_info = '颜色分类:'
|
||||||
|
if (desc) {
|
||||||
|
try {
|
||||||
|
const descArr = desc.split(',')
|
||||||
|
descArr.forEach((item, index) => {
|
||||||
|
let [_, value] = item.split(':')
|
||||||
|
if (index === 1) {
|
||||||
|
value = value.substring(0, value.length - 1)
|
||||||
|
}
|
||||||
|
if (index === 2) {
|
||||||
|
value = '尺码:' + value
|
||||||
|
}
|
||||||
|
desc_info += value + ';'
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return desc_info
|
||||||
|
}
|
||||||
|
|
||||||
/*previewImg (url, e) {
|
/*previewImg (url, e) {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
this.props.onPreviewImg() && this.props.onPreviewImg(url)
|
this.props.onPreviewImg() && this.props.onPreviewImg(url)
|
||||||
|
|
@ -59,6 +81,9 @@ export default class GoodsEvaluation extends Component {
|
||||||
if (!info) {
|
if (!info) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
if (info.item_spec_desc) {
|
||||||
|
info.item_spec_desc_txt = this.fortmatStr(info.item_spec_desc)
|
||||||
|
}
|
||||||
|
|
||||||
if (pathRoute === 'detail') {
|
if (pathRoute === 'detail') {
|
||||||
if (info && info.picList) {
|
if (info && info.picList) {
|
||||||
|
|
@ -68,19 +93,23 @@ export default class GoodsEvaluation extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className='evaluation-item' onClick={this.handleSelectEvaluation.bind(this)}>
|
<View className='evaluation-item' onClick={this.handleSelectEvaluation.bind(this)} isBlack>
|
||||||
<View className='evaluation-item__avator'>
|
<View className='evaluation-item__avator'>
|
||||||
<Image
|
<Image
|
||||||
src={info.anonymous ? userIcon : info.avatar}
|
src={info.anonymous ? userIcon : info.avatar}
|
||||||
mode='aspectFill'
|
mode='aspectFill'
|
||||||
className='avatar'
|
className='avatar'
|
||||||
|
fadeIn
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View className='evaluation-item__main'>
|
<View className='evaluation-item__main'>
|
||||||
<View className='name-wrap'>
|
<View className='name-wrap'>
|
||||||
<Text className='name'>{info.anonymous ? '匿名用户' : info.username}</Text>
|
<View className='name'>{info.anonymous ? '匿名用户' : info.username}
|
||||||
<AtRate size='12' value={info.star} />
|
<Text style={{ marginLeft: '10rpx' }}>{info.item_spec_desc_txt}</Text>
|
||||||
|
</View>
|
||||||
|
<AtRate size='14' value={info.star} />
|
||||||
</View>
|
</View>
|
||||||
<View className='desc'>{info.content}</View>
|
<View className='desc'>{info.content}</View>
|
||||||
{info.rate_pic_num > 0 && (
|
{info.rate_pic_num > 0 && (
|
||||||
|
|
@ -97,6 +126,8 @@ export default class GoodsEvaluation extends Component {
|
||||||
style={`height: ${styles.height}`}
|
style={`height: ${styles.height}`}
|
||||||
src={imgUrl}
|
src={imgUrl}
|
||||||
mode='aspectFill'
|
mode='aspectFill'
|
||||||
|
fadeIn
|
||||||
|
lazyLoad
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
@import "../../style/imports.scss";
|
@import '../../style/imports.scss';
|
||||||
|
|
||||||
.evaluation-item {
|
.evaluation-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 48px 0 0 0;
|
padding: 20px 0 0 0;
|
||||||
&__avator {
|
&__avator {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
|
|
@ -15,17 +15,18 @@
|
||||||
}
|
}
|
||||||
&__main {
|
&__main {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding-bottom: 48px;
|
padding-bottom: 20px;
|
||||||
margin-left: 25px;
|
margin-left: 25px;
|
||||||
border-bottom: 2px solid rgba(0, 0, 0, 0.05);
|
border-bottom: 2px solid rgba(0, 0, 0, 0.05);
|
||||||
.name-wrap {
|
.name-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
margin-bottom: 22px;
|
margin-bottom: 22px;
|
||||||
.name {
|
.name {
|
||||||
font-size: 28px;
|
font-size: 24px;
|
||||||
color: rgba(0, 0, 0, 0.6);
|
color: #b1b1b1;
|
||||||
}
|
}
|
||||||
.at-rate__icon--on {
|
.at-rate__icon--on {
|
||||||
color: #000000;
|
color: #000000;
|
||||||
|
|
@ -35,32 +36,37 @@
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
line-height: 1.54;
|
line-height: 1.54;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
@include multi-ellipsis(2)
|
// @include multi-ellipsis(2)
|
||||||
}
|
}
|
||||||
.evaluation_imgs {
|
.evaluation_imgs {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: space-between;
|
||||||
border-radius: 15px;
|
// border-radius: 15px;
|
||||||
margin-top: 48px;
|
margin-top: 20px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
.img-box {
|
.img-box {
|
||||||
width: 33%;
|
width: 32%;
|
||||||
margin-right: 0.5%;
|
border-radius: 6px;
|
||||||
}
|
overflow: hidden;
|
||||||
.img-box:nth-child(3n) {
|
// margin-right: 0.5%;
|
||||||
width: 33%;
|
&:nth-child(n + 4) {
|
||||||
margin-right: 0;
|
margin-top: 6px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// .img-box:nth-child(3n) {
|
||||||
|
// width: 33%;
|
||||||
|
// margin-right: 0;
|
||||||
|
// }
|
||||||
.img-rate {
|
.img-rate {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* #ifdef h5 */
|
/* #ifdef h5 */
|
||||||
height: 240px;
|
height: 240px;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.reply-comment{
|
.reply-comment {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
.text {
|
.text {
|
||||||
|
|
@ -68,7 +74,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.marginBottom10{
|
.marginBottom10 {
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,16 +12,16 @@ $button-height: 80px;
|
||||||
// border: 1px solid #444444;
|
// border: 1px solid #444444;
|
||||||
|
|
||||||
&__reset {
|
&__reset {
|
||||||
width: 58%;
|
width: 46%;
|
||||||
padding-right: 8%;
|
// padding-right: 8%;
|
||||||
color: var(--color-primary);
|
color: var(--color-primary);
|
||||||
height: 80px;
|
height: 80px;
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
border: 1PX solid #E5E5E5;
|
border: 1PX solid #E5E5E5;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0px;
|
||||||
border-radius: 40px;
|
border-radius: 6px;
|
||||||
color: #444;
|
color: #444;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 80px;
|
line-height: 80px;
|
||||||
|
|
@ -29,12 +29,13 @@ $button-height: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__confirm {
|
&__confirm {
|
||||||
width: 58%;
|
// width: 58%;
|
||||||
|
width: 46%;
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
border: 1PX solid var(--color-primary);
|
border: 1PX solid var(--color-primary);
|
||||||
background: var(--color-primary);
|
background: var(--color-primary);
|
||||||
height: 80px;
|
height: 80px;
|
||||||
border-radius: 40px;
|
border-radius: 6px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ const initialState = {
|
||||||
isExpanded: false
|
isExpanded: false
|
||||||
}
|
}
|
||||||
function SpCoupon (props) {
|
function SpCoupon (props) {
|
||||||
const { info, children, onClick = () => { }, isNew } = props
|
const { info, children, onClick = () => { }, isNew, isNotUse = false } = props
|
||||||
const [state, setState] = useImmer(initialState)
|
const [state, setState] = useImmer(initialState)
|
||||||
const { isExpanded } = state
|
const { isExpanded } = state
|
||||||
if (!info) {
|
if (!info) {
|
||||||
|
|
@ -47,7 +47,7 @@ function SpCoupon (props) {
|
||||||
const couponTagBg = info.tagClass === 'used' || info.tagClass === 'overdue' || !info.valid ? invalidBg : bg
|
const couponTagBg = info.tagClass === 'used' || info.tagClass === 'overdue' || !info.valid ? invalidBg : bg
|
||||||
|
|
||||||
return (<View className="coupons-list-item" key={`coupon-item__${id}`} style={styleNames({
|
return (<View className="coupons-list-item" key={`coupon-item__${id}`} style={styleNames({
|
||||||
background: `url(${process.env.APP_IMAGE_CDN_NEW}/member/${couponStatus ? couponStatus != 1 ? "quan-hui" : "quan-lan" : info.tagClass === 'used' ? 'quan-hui' : 'quan-lan'}.png) no-repeat`,
|
background: `url(${process.env.APP_IMAGE_CDN_NEW}/member/${((couponStatus && couponStatus != 1) || (info.tagClass === 'used' || info.tagClass === 'overdue') || isNotUse) ? "quan-hui" : "quan-lan"}.png) no-repeat`,
|
||||||
'background-size': '100% 100%'
|
'background-size': '100% 100%'
|
||||||
})}>
|
})}>
|
||||||
<View className="coupons-list-item-left">
|
<View className="coupons-list-item-left">
|
||||||
|
|
@ -62,8 +62,10 @@ function SpCoupon (props) {
|
||||||
<View className="coupons-list-item-desc">有效日期:{beginDate}至{endDate}</View>}
|
<View className="coupons-list-item-desc">有效日期:{beginDate}至{endDate}</View>}
|
||||||
</View>
|
</View>
|
||||||
{/* !valid || */}
|
{/* !valid || */}
|
||||||
{info.tagClass === 'used' || info.tagClass === 'overdue' ? <View className="coupons-list-item-btn">已{info.tagClass === 'used' ? '使用' : '过期'}</View>
|
{!isNotUse && <>
|
||||||
: <View className="coupons-list-item-btn" onClick={onClick}>立即{isNew ? '兑换' : '使用'}</View>}
|
{info.tagClass === 'used' || info.tagClass === 'overdue' ? <View className="coupons-list-item-btn">已{info.tagClass === 'used' ? '使用' : '过期'}</View>
|
||||||
|
: <View className="coupons-list-item-btn" onClick={onClick}>立即{isNew ? '兑换' : '使用'}</View>}
|
||||||
|
</>}
|
||||||
</View>
|
</View>
|
||||||
</View>)
|
</View>)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ function SpGoodsCell (props) {
|
||||||
descArr.forEach((item, index) => {
|
descArr.forEach((item, index) => {
|
||||||
let [_, value] = item.split(':')
|
let [_, value] = item.split(':')
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
value = value.substring(0, 2)
|
value = value.substring(0, value.length - 1)
|
||||||
}
|
}
|
||||||
desc_info += value + ' '
|
desc_info += value + ' '
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ function SpGoodsPrice (props) {
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
!isPoint && <SpPrice size={36} className='sale-price' value={price} showSeparator noDecimal={false} />
|
!isPoint && <SpPrice size={36} className='sale-price' value={price} showSeparator noDecimal />
|
||||||
}
|
}
|
||||||
{/* {marketPrice > 0 && enMarketPrice && (
|
{/* {marketPrice > 0 && enMarketPrice && (
|
||||||
<SpPrice className='mkt-price' lineThrough value={marketPrice} />
|
<SpPrice className='mkt-price' lineThrough value={marketPrice} />
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ function SpOrderItem (props) {
|
||||||
descArr.forEach((item, index) => {
|
descArr.forEach((item, index) => {
|
||||||
let [_, value] = item.split(':')
|
let [_, value] = item.split(':')
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
value = value.substring(0, 2)
|
value = value.substring(0, value.length - 1)
|
||||||
}
|
}
|
||||||
desc_info += value + ' '
|
desc_info += value + ' '
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@ const initialState = {
|
||||||
skuText: '',
|
skuText: '',
|
||||||
num: 1,
|
num: 1,
|
||||||
loading: false,
|
loading: false,
|
||||||
isClickSku: false
|
isClickSku: false,
|
||||||
|
isClickNum: false
|
||||||
}
|
}
|
||||||
|
|
||||||
function SpSkuSelect (props, ref) {
|
function SpSkuSelect (props, ref) {
|
||||||
|
|
@ -58,13 +59,19 @@ function SpSkuSelect (props, ref) {
|
||||||
specItems.forEach((item) => {
|
specItems.forEach((item) => {
|
||||||
const key = item.specItem.map((spec) => spec.specId).join('_')
|
const key = item.specItem.map((spec) => spec.specId).join('_')
|
||||||
skuDictRef.current[key] = item
|
skuDictRef.current[key] = item
|
||||||
if (item.store > 0) {
|
console.log("🚀 ~ item库存为:", key, item.specItem.map((item) => item.specName).join('_'), item.store)
|
||||||
} else {
|
|
||||||
// console.log("🚀 ~ item库存为0:", key, item.specItem.map((item) => item.specName).join('_'))
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
let selItem = null
|
||||||
|
if (skuList.length === 3) {
|
||||||
|
const [a, b, c] = skuList
|
||||||
|
if (a?.skuValue.length > 0 && b?.skuValue.length > 0 && c?.skuValue.length > 0) {
|
||||||
|
const key = [a.skuValue[0].specId, b.skuValue[0].specId, c.skuValue[0].specId].join('_')
|
||||||
|
const item = skuDictRef.current[key]
|
||||||
|
selItem = key && item && item.store > 0 && ['onsale'].includes(item.approveStatus) ? item : null
|
||||||
|
}
|
||||||
|
}
|
||||||
// 默认选中有库存并且前端可销售的sku
|
// 默认选中有库存并且前端可销售的sku
|
||||||
const defaultSpecItem = specItems.find((item) => item.store > 0 && ['onsale'].includes(item.approveStatus))
|
const defaultSpecItem = selItem ?? specItems.find((item) => item.store > 0 && ['onsale'].includes(item.approveStatus))
|
||||||
let selection = Array(specItems.length).fill(null)
|
let selection = Array(specItems.length).fill(null)
|
||||||
if (defaultSpecItem) {
|
if (defaultSpecItem) {
|
||||||
selection = defaultSpecItem.specItem.map((item) => item.specId)
|
selection = defaultSpecItem.specItem.map((item) => item.specId)
|
||||||
|
|
@ -145,11 +152,16 @@ function SpSkuSelect (props, ref) {
|
||||||
const key = _selection.join('_')
|
const key = _selection.join('_')
|
||||||
const row = skuDictRef.current[key] || {}
|
const row = skuDictRef.current[key] || {}
|
||||||
if (disabledSet.has(specId)) return
|
if (disabledSet.has(specId)) return
|
||||||
|
if (!state.isClickNum) {
|
||||||
|
setState((draft) => {
|
||||||
|
draft.isClickNum = idx === 2
|
||||||
|
})
|
||||||
|
}
|
||||||
setState(
|
setState(
|
||||||
(draft) => {
|
(draft) => {
|
||||||
draft.selection[idx] = specId //null
|
draft.selection[idx] = specId //null
|
||||||
draft.curImage = 1
|
draft.curImage = 1
|
||||||
draft.isClickSku = idx === 2 || row.store > 0
|
draft.isClickSku = draft.isClickNum ? row.store > 0 : idx === 2
|
||||||
},
|
},
|
||||||
(row) => {
|
(row) => {
|
||||||
calcDisabled(row.selection, idx)
|
calcDisabled(row.selection, idx)
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ export const TRADE_ITEM = {
|
||||||
descArr.forEach((item, index) => {
|
descArr.forEach((item, index) => {
|
||||||
let [_, value] = item.split(':')
|
let [_, value] = item.split(':')
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
value = value.substring(0, 2)
|
value = value.substring(0, value.length - 1)
|
||||||
}
|
}
|
||||||
desc_info += value + ' '
|
desc_info += value + ' '
|
||||||
})
|
})
|
||||||
|
|
@ -112,7 +112,7 @@ export const TRADE_AFTER_SALES_ITEM = {
|
||||||
descArr.forEach((item, index) => {
|
descArr.forEach((item, index) => {
|
||||||
let [_, value] = item.split(':')
|
let [_, value] = item.split(':')
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
value = value.substring(0, 2)
|
value = value.substring(0, value.length - 1)
|
||||||
}
|
}
|
||||||
desc_info += value + ' '
|
desc_info += value + ' '
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,8 @@ import {
|
||||||
FloatMenuItem,
|
FloatMenuItem,
|
||||||
GoodsEvaluation,
|
GoodsEvaluation,
|
||||||
GoodsComment,
|
GoodsComment,
|
||||||
SpNavBar
|
SpNavBar,
|
||||||
|
SpPage
|
||||||
} from '@/components'
|
} from '@/components'
|
||||||
import api from '@/api'
|
import api from '@/api'
|
||||||
import { withBackToTop, withPager } from '@/hocs'
|
import { withBackToTop, withPager } from '@/hocs'
|
||||||
|
|
@ -24,7 +25,7 @@ export default class Evaluation extends Component {
|
||||||
addGlobalClass: true
|
addGlobalClass: true
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor (props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
|
|
@ -156,23 +157,23 @@ export default class Evaluation extends Component {
|
||||||
render () {
|
render () {
|
||||||
const { showBackToTop, evaluationList, showCommentPanel } = this.state
|
const { showBackToTop, evaluationList, showCommentPanel } = this.state
|
||||||
|
|
||||||
if (!evaluationList.length) {
|
// if (!evaluationList.length) {
|
||||||
return <Loading />
|
// return <Loading />
|
||||||
}
|
// }
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className='page-goods-evaluation'>
|
<SpPage loading={!evaluationList.length} className='page-goods-evaluation has-navbar' title={"评价列表"}>
|
||||||
<SpNavBar title='评论列表' leftIconType='chevron-left' />
|
{/* <SpNavBar title='评论列表' leftIconType='chevron-left' /> */}
|
||||||
<ScrollView className='goods-detail__scroll' onScrollToLower={this.nextPage} scrollY>
|
<ScrollView className='goods-detail__scroll' onScrollToLower={this.nextPage} style={{ top: 'var(--nav-height)' }} scrollY>
|
||||||
<View className='goods-evaluation-wrap'>
|
<View className='goods-evaluation-wrap'>
|
||||||
<View className='evaluation-list'>
|
<View className='evaluation-list'>
|
||||||
{evaluationList.map((item) => {
|
{evaluationList.length > 0 && evaluationList.map((item) => {
|
||||||
return (
|
return (
|
||||||
<GoodsEvaluation
|
<GoodsEvaluation
|
||||||
info={item}
|
info={item}
|
||||||
key={item.rate_id}
|
key={item.rate_id}
|
||||||
pathRoute='espier-evaluation'
|
pathRoute='espier-evaluation'
|
||||||
showComment
|
// showComment
|
||||||
onReplyRate={this.handleClickViewEvaluation.bind(this, item)}
|
onReplyRate={this.handleClickViewEvaluation.bind(this, item)}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
@ -197,7 +198,7 @@ export default class Evaluation extends Component {
|
||||||
onReplyRate={this.handleReplyRate.bind(this)}
|
onReplyRate={this.handleReplyRate.bind(this)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</View>
|
</SpPage>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
@import "@/style/imports";
|
@import '@/style/imports';
|
||||||
|
|
||||||
.page-goods-evaluation {
|
.page-goods-evaluation {
|
||||||
/* #ifdef h5 */
|
/* #ifdef h5 */
|
||||||
padding-top: $navigate-height-h5;
|
padding-top: $navigate-height-h5;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
.goods-detail__scroll {
|
.goods-detail__scroll {
|
||||||
@include page-scroll($navigate-height);
|
@include page-scroll(var(--nav-height), 40px);
|
||||||
|
top: var(--nav-height);
|
||||||
/* #ifdef h5 */
|
/* #ifdef h5 */
|
||||||
@include page-scroll($navigate-height-h5);
|
@include page-scroll($navigate-height-h5);
|
||||||
top:47px;
|
top: 47px;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
}
|
}
|
||||||
.goods-evaluation-wrap {
|
.goods-evaluation-wrap {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 30px 32px;
|
padding: 0 32px;
|
||||||
.evaluation-title {
|
.evaluation-title {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import './rate.scss'
|
||||||
)
|
)
|
||||||
export default class TradeRate extends Component {
|
export default class TradeRate extends Component {
|
||||||
$instance = getCurrentInstance()
|
$instance = getCurrentInstance()
|
||||||
constructor (props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
|
|
@ -184,9 +184,12 @@ export default class TradeRate extends Component {
|
||||||
})
|
})
|
||||||
await api.trade.createOrderRate(params)
|
await api.trade.createOrderRate(params)
|
||||||
Taro.hideLoading()
|
Taro.hideLoading()
|
||||||
Taro.navigateTo({
|
// Taro.navigateTo({
|
||||||
url: `/marketing/pages/item/success`
|
// url: `/marketing/pages/item/success`
|
||||||
})
|
// })
|
||||||
|
setTimeout(() => {
|
||||||
|
Taro.navigateBack()
|
||||||
|
}, 300)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 确认原有功能
|
// TODO: 确认原有功能
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "@/style/imports";
|
@import '@/style/imports';
|
||||||
|
|
||||||
page {
|
page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -8,7 +8,7 @@ page {
|
||||||
.trade-rate {
|
.trade-rate {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #f5f5f5;
|
// background: #f5f5f5;
|
||||||
// padding: 20px;
|
// padding: 20px;
|
||||||
padding-bottom: 120px;
|
padding-bottom: 120px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
@ -40,15 +40,15 @@ page {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* #ifdef h5 */
|
/* #ifdef h5 */
|
||||||
&__hd{
|
&__hd {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
.goods-item__img{
|
.goods-item__img {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* #endif */
|
/* #endif */
|
||||||
}
|
}
|
||||||
.rate-wrap {
|
.rate-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -93,7 +93,7 @@ page {
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
}
|
}
|
||||||
.upload-imgs {
|
.upload-imgs {
|
||||||
.at-image-picker__flex-box {
|
.at-image-picker__flex-box {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
@ -105,24 +105,23 @@ page {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 40px;
|
||||||
z-index: 88;
|
z-index: 88;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* #ifdef h5 */
|
/* #ifdef h5 */
|
||||||
*{
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.trade-rate {
|
||||||
|
.footer {
|
||||||
|
padding: 20px 24px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
}
|
}
|
||||||
.trade-rate {
|
}
|
||||||
.footer {
|
/* #endif */
|
||||||
padding: 20px 24px;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* #endif */
|
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ function CashierResult (props) {
|
||||||
<AtButton
|
<AtButton
|
||||||
type='primary'
|
type='primary'
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
Taro.redirectTo({ url: `/subpage/pages/trade/detail?id=${orderId}&type=pointitem` })
|
Taro.redirectTo({ url: `/subpage/pages/trade/detail?id=${orderId}` })
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
订单详情
|
订单详情
|
||||||
|
|
|
||||||
|
|
@ -160,8 +160,8 @@ const CompSeries = (props) => {
|
||||||
</View>
|
</View>
|
||||||
<SpImage
|
<SpImage
|
||||||
className={classNames(imgType ? 'cat-img' : 'cat-img-no')}
|
className={classNames(imgType ? 'cat-img' : 'cat-img-no')}
|
||||||
mode='aspectFit'
|
mode={currentID === '18' ? 'aspectFill' : 'aspectFit'}
|
||||||
height={windowWidth > 400 ? 276 : 240}
|
height={currentID === '18' ? 350 : windowWidth > 400 ? 278 : 242}
|
||||||
src={item.img}
|
src={item.img}
|
||||||
/>
|
/>
|
||||||
</View> : <View
|
</View> : <View
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,9 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
// @include page-scroll(var(--nav-height), $tabbar-height);
|
||||||
|
// height: calc(100% - $tabbar-height - 20px);
|
||||||
|
padding-bottom: 30px;
|
||||||
.category-content {
|
.category-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
@ -133,10 +136,11 @@
|
||||||
&__img {
|
&__img {
|
||||||
// width: 156px;
|
// width: 156px;
|
||||||
// height: 230px;
|
// height: 230px;
|
||||||
margin-top: 24px;
|
margin-top: 4px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
box-sizing: border-box;
|
||||||
border-bottom: 2px solid #bcbcbc;
|
border-bottom: 2px solid #bcbcbc;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
color: #0e0e0e;
|
color: #0e0e0e;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { SpImage } from '@/components'
|
||||||
import { classNames } from '@/utils'
|
import { classNames } from '@/utils'
|
||||||
import './comp-evaluation.scss'
|
import './comp-evaluation.scss'
|
||||||
|
|
||||||
function CompEvaluation(props) {
|
function CompEvaluation (props) {
|
||||||
const { className, list = [], itemId } = props
|
const { className, list = [], itemId } = props
|
||||||
|
|
||||||
const onViewMore = () => {
|
const onViewMore = () => {
|
||||||
|
|
@ -19,13 +19,35 @@ function CompEvaluation(props) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const fortmatStr = (desc) => {
|
||||||
|
let desc_info = '颜色分类:'
|
||||||
|
if (desc) {
|
||||||
|
try {
|
||||||
|
const descArr = desc.split(',')
|
||||||
|
descArr.forEach((item, index) => {
|
||||||
|
let [_, value] = item.split(':')
|
||||||
|
if (index === 1) {
|
||||||
|
value = value.substring(0, value.length - 1)
|
||||||
|
}
|
||||||
|
if (index === 2) {
|
||||||
|
value = '尺码:' + value
|
||||||
|
}
|
||||||
|
desc_info += value + ';'
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return desc_info
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
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>
|
||||||
)}
|
)}
|
||||||
|
|
@ -35,12 +57,15 @@ function CompEvaluation(props) {
|
||||||
<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>
|
<Text className='evaluation-name'>{item.username || '匿名用户'}
|
||||||
|
<Text style={{ marginLeft: '10rpx' }}>{fortmatStr(item.item_spec_desc)}</Text>
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View className='evaluation-content'>{item.content}</View>
|
<View className='evaluation-content'>{item.content}</View>
|
||||||
|
<View className="evaluation-content-line"></View>
|
||||||
</View>
|
</View>
|
||||||
))}
|
))}
|
||||||
{list.length == 0 && <View className='default-msg'>暂无商品评论</View>}
|
{list.length == 0 && <View className='default-msg'>暂无商品评价</View>}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,31 @@
|
||||||
.comp-evaluation {
|
.comp-evaluation {
|
||||||
margin: 0 16px;
|
// margin: 0 16px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 0 16px;
|
padding: 0 30px;
|
||||||
box-shadow: 0px 2px 10px 0px #eae7e0;
|
// box-shadow: 0px 2px 10px 0px #eae7e0;
|
||||||
.evaluation-hd {
|
.evaluation-hd {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 24px 0;
|
padding: 40px 10px 26px;
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
border-bottom: 1PX solid #ddd;
|
// border-bottom: 1PX solid #ddd;
|
||||||
.extra-more {
|
.extra-more {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: var(--color-primary);
|
color: var(--color-primary);
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
|
.icon-qianwang-01 {
|
||||||
|
font-size: 26px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.evaluation-bd {
|
.evaluation-bd {
|
||||||
padding: 24px 0;
|
// padding: 24px 0;
|
||||||
.evaluation-item-wrap {
|
.evaluation-item-wrap {
|
||||||
&:not(:last-child) {
|
margin-bottom: 20px;
|
||||||
margin-bottom: 32px;
|
// &:not(:last-child) {
|
||||||
}
|
// margin-bottom: 20px;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.evaluation-icon {
|
.evaluation-icon {
|
||||||
|
|
@ -34,14 +38,26 @@
|
||||||
}
|
}
|
||||||
.evaluation-name {
|
.evaluation-name {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
color: #777;
|
color: #b1b1b1;
|
||||||
}
|
}
|
||||||
.item-hd {
|
.item-hd {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
|
margin-bottom: -8px;
|
||||||
}
|
}
|
||||||
.evaluation-content {
|
.evaluation-content {
|
||||||
margin-top: 16px;
|
// padding-left: 50px;
|
||||||
|
// padding-right: 16px;
|
||||||
|
margin: 0 16px 0 50px;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
font-size: 28px;
|
||||||
|
// padding-bottom: 28px;
|
||||||
|
@include multi-ellipsis(2);
|
||||||
|
&-line {
|
||||||
|
margin: 0 16px 0 50px;
|
||||||
|
padding-top: 28px;
|
||||||
|
border-bottom: 1px solid #9e9e9e80;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.default-msg {
|
.default-msg {
|
||||||
color: #999;
|
color: #999;
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ function EspierDetail (props) {
|
||||||
if (id) {
|
if (id) {
|
||||||
fetch()
|
fetch()
|
||||||
// getPackageList()
|
// getPackageList()
|
||||||
// getEvaluationList()
|
getEvaluationList()
|
||||||
}
|
}
|
||||||
}, [id])
|
}, [id])
|
||||||
|
|
||||||
|
|
@ -291,7 +291,7 @@ function EspierDetail (props) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log("🚀 ~ data.introList:", data)
|
// console.log("🚀 ~ data.introList:", data)
|
||||||
setState((draft) => {
|
setState((draft) => {
|
||||||
draft.info = {
|
draft.info = {
|
||||||
...data,
|
...data,
|
||||||
|
|
@ -710,9 +710,6 @@ function EspierDetail (props) {
|
||||||
</View>
|
</View>
|
||||||
</View>} */}
|
</View>} */}
|
||||||
|
|
||||||
{/* 商品评价 */}
|
|
||||||
{/* <CompEvaluation list={evaluationList} itemId={info.itemId}></CompEvaluation> */}
|
|
||||||
|
|
||||||
{/* 店铺 */}
|
{/* 店铺 */}
|
||||||
{VERSION_PLATFORM && <CompStore info={info.distributorInfo} />}
|
{VERSION_PLATFORM && <CompStore info={info.distributorInfo} />}
|
||||||
|
|
||||||
|
|
@ -731,7 +728,7 @@ function EspierDetail (props) {
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
onChange={(skuText, curItem, idx) => {
|
onChange={(skuText, curItem, idx) => {
|
||||||
console.log("🚀 ~ curItem:", curItem, idx)
|
// console.log("🚀 ~ curItem:", curItem, idx)
|
||||||
curItem && setState((draft) => {
|
curItem && setState((draft) => {
|
||||||
draft.skuText = skuText
|
draft.skuText = skuText
|
||||||
draft.curItem = curItem
|
draft.curItem = curItem
|
||||||
|
|
@ -786,11 +783,11 @@ function EspierDetail (props) {
|
||||||
})
|
})
|
||||||
draft.introList[index].isOpen = !item.isOpen
|
draft.introList[index].isOpen = !item.isOpen
|
||||||
})
|
})
|
||||||
if (!item.isOpen) {
|
// if (!item.isOpen) {
|
||||||
setState((draft) => {
|
// setState((draft) => {
|
||||||
draft.scrollTop = 1010 + Math.random()
|
// draft.scrollTop = 742 + Math.random()
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
}}
|
}}
|
||||||
title={item.title}
|
title={item.title}
|
||||||
>
|
>
|
||||||
|
|
@ -804,17 +801,19 @@ function EspierDetail (props) {
|
||||||
})
|
})
|
||||||
draft.introList[index].isOpen = !item.isOpen
|
draft.introList[index].isOpen = !item.isOpen
|
||||||
})
|
})
|
||||||
if (!item.isOpen) {
|
// if (!item.isOpen) {
|
||||||
setState((draft) => {
|
// setState((draft) => {
|
||||||
draft.scrollTop = 1010 + Math.random()
|
// draft.scrollTop = 742 + Math.random()
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
}}>
|
}}>
|
||||||
{item.isOpen ? <AtIcon value='subtract' size='16' color='#000' /> :
|
{item.isOpen ? <AtIcon value='subtract' size='16' color='#000' /> :
|
||||||
<AtIcon value='add' size='16' color='#000' />}
|
<AtIcon value='add' size='16' color='#000' />}
|
||||||
{item.isOpen ? <></> : <View className="line"></View>}
|
{item.isOpen ? <></> : <View className="line"></View>}
|
||||||
</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>
|
||||||
{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">
|
||||||
|
|
|
||||||
|
|
@ -111,11 +111,11 @@
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
// padding: 0 30px;
|
// padding: 0 30px;
|
||||||
// box-shadow: 0px 2px 10px 0px #eae7e0;
|
// box-shadow: 0px 2px 10px 0px #eae7e0;
|
||||||
height: calc(100vh - #{$page-ipx-footer-height} - var(--nav-height));
|
// height: calc(100vh - #{$page-ipx-footer-height} - var(--nav-height));
|
||||||
// padding-bottom: calc(#{$page-ipx-footer-height} + 30px);
|
// padding-bottom: calc(#{$page-ipx-footer-height} + 30px);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow-y: scroll;
|
// overflow-y: scroll;
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
width: 0px;
|
width: 0px;
|
||||||
height: 0px;
|
height: 0px;
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,12 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0px 50px;
|
padding: 0px 50px;
|
||||||
|
.left-container,
|
||||||
|
.right-container {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
.goods-list-wrap {
|
.goods-list-wrap {
|
||||||
// width: 345px;
|
// width: 345px;
|
||||||
margin-bottom: 28px;
|
margin-bottom: 28px;
|
||||||
|
|
|
||||||
|
|
@ -324,7 +324,7 @@ export default class TradeItem extends Component {
|
||||||
{info.aftersales_bn ? '售后进度' : '申请售后'}
|
{info.aftersales_bn ? '售后进度' : '申请售后'}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{false && info.is_rate == 0 && !info.aftersales_bn && <Button
|
{info.is_rate == 0 && !info.aftersales_bn && <Button
|
||||||
className='btn-action'
|
className='btn-action'
|
||||||
style={`background: ${colors.data[0].primary};width:120rpx`}
|
style={`background: ${colors.data[0].primary};width:120rpx`}
|
||||||
// onClick={this.handleClickBtn.bind(this, 'detail')}
|
// onClick={this.handleClickBtn.bind(this, 'detail')}
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,8 @@ export default class TradeList extends Component {
|
||||||
const { status = 0, evaluate = 1 } = this.$instance.router.params
|
const { status = 0, evaluate = 1 } = this.$instance.router.params
|
||||||
const _tabList = JSON.parse(JSON.stringify(this.state.tabList))
|
const _tabList = JSON.parse(JSON.stringify(this.state.tabList))
|
||||||
if (evaluate == 1) {
|
if (evaluate == 1) {
|
||||||
// _tabList.push({ title: '待评价', status: '7', is_rate: 0 })
|
_tabList.push({ title: '待评价', status: '7', is_rate: 0 })
|
||||||
_tabList.push({ title: '已完成', status: '7', is_rate: 0 })
|
_tabList.push({ title: '已完成', status: '3', is_rate: 0 })
|
||||||
_tabList.push({ title: '售后', status: '---', is_rate: 0 })
|
_tabList.push({ title: '售后', status: '---', is_rate: 0 })
|
||||||
}
|
}
|
||||||
const tabIdx = _tabList.findIndex((tab) => tab.status === status)
|
const tabIdx = _tabList.findIndex((tab) => tab.status === status)
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ function CouponPicker (props) {
|
||||||
{couponListInVaild.length > 0 ? <View className='invalid-title'>不可用优惠券</View> : ''}
|
{couponListInVaild.length > 0 ? <View className='invalid-title'>不可用优惠券</View> : ''}
|
||||||
{couponListInVaild.map((item, index) => (
|
{couponListInVaild.map((item, index) => (
|
||||||
<View className='coupon-item-wrap' key={`coupon-item__${index}`}>
|
<View className='coupon-item-wrap' key={`coupon-item__${index}`}>
|
||||||
<SpCoupon info={item} onClick={onChangeSelectCoupon.bind(this, item)} />
|
<SpCoupon info={item} onClick={onChangeSelectCoupon.bind(this, item)} isNotUse />
|
||||||
{/* <SpCheckboxNew onChange={onChangeSelectCoupon.bind(this, item)} disabled={!item.valid} checked={select == item.code}/> */}
|
{/* <SpCheckboxNew onChange={onChangeSelectCoupon.bind(this, item)} disabled={!item.valid} checked={select == item.code}/> */}
|
||||||
</View>
|
</View>
|
||||||
))}
|
))}
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ const initialState = {
|
||||||
waitRecevieNum: 0,
|
waitRecevieNum: 0,
|
||||||
waitEvaluateNum: 0,
|
waitEvaluateNum: 0,
|
||||||
afterSalesNum: 0,
|
afterSalesNum: 0,
|
||||||
|
finishNum: 0,
|
||||||
zitiNum: 0,
|
zitiNum: 0,
|
||||||
deposit: 0,
|
deposit: 0,
|
||||||
isOpen: false
|
isOpen: false
|
||||||
|
|
@ -313,6 +314,7 @@ function MemberIndex (props) {
|
||||||
// normal_payed_daishouhuo: 0 // 待收货
|
// normal_payed_daishouhuo: 0 // 待收货
|
||||||
// normal_payed_daiziti: 0 //待自提订单
|
// normal_payed_daiziti: 0 //待自提订单
|
||||||
// normal_payed_notdelivery: 4 // 已付款未发货 or 已付款已发货
|
// normal_payed_notdelivery: 4 // 已付款未发货 or 已付款已发货
|
||||||
|
// normal_finish:1 //已完成
|
||||||
|
|
||||||
const {
|
const {
|
||||||
aftersales, // 待处理售后
|
aftersales, // 待处理售后
|
||||||
|
|
@ -320,7 +322,8 @@ function MemberIndex (props) {
|
||||||
normal_payed_daifahuo, // 待发货
|
normal_payed_daifahuo, // 待发货
|
||||||
normal_payed_daishouhuo, // 待收货
|
normal_payed_daishouhuo, // 待收货
|
||||||
normal_payed_daiziti, // 待自提订单
|
normal_payed_daiziti, // 待自提订单
|
||||||
normal_not_rate // 待评论
|
normal_not_rate, // 待评论
|
||||||
|
normal_finish
|
||||||
} = resTrade
|
} = resTrade
|
||||||
|
|
||||||
setState((draft) => {
|
setState((draft) => {
|
||||||
|
|
@ -333,6 +336,7 @@ function MemberIndex (props) {
|
||||||
draft.afterSalesNum = aftersales
|
draft.afterSalesNum = aftersales
|
||||||
draft.zitiNum = normal_payed_daiziti
|
draft.zitiNum = normal_payed_daiziti
|
||||||
draft.waitEvaluateNum = normal_not_rate
|
draft.waitEvaluateNum = normal_not_rate
|
||||||
|
draft.finishNum = normal_finish
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -598,9 +602,9 @@ function MemberIndex (props) {
|
||||||
>
|
>
|
||||||
<View className='order-item-view'>
|
<View className='order-item-view'>
|
||||||
<SpImage src='member/daifahuo.png' className='icon-style' isNew />
|
<SpImage src='member/daifahuo.png' className='icon-style' isNew />
|
||||||
{state.waitRecevieNum + state.waitSendNum > 0 && (
|
{state.waitSendNum > 0 && (
|
||||||
<View className='order-bradge'>
|
<View className='order-bradge'>
|
||||||
<Text>{state.waitRecevieNum + state.waitSendNum}</Text>
|
<Text>{state.waitSendNum}</Text>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
<Text className='order-txt'>待发货</Text>
|
<Text className='order-txt'>待发货</Text>
|
||||||
|
|
@ -622,29 +626,29 @@ function MemberIndex (props) {
|
||||||
</SpLogin>
|
</SpLogin>
|
||||||
<SpLogin
|
<SpLogin
|
||||||
className='order-item'
|
className='order-item'
|
||||||
onChange={handleClickLink.bind(this, '/subpage/pages/trade/list?status=7')}
|
onChange={handleClickLink.bind(this, '/subpage/pages/trade/list?status=3')}
|
||||||
>
|
>
|
||||||
<View className='order-item-view'>
|
<View className='order-item-view'>
|
||||||
<SpImage src='member/yiwancheng.png' className='icon-style' isNew />
|
<SpImage src='member/yiwancheng.png' className='icon-style' isNew />
|
||||||
{state.waitEvaluateNum > 0 && (
|
{state.finishNum > 0 && (
|
||||||
<View className='order-bradge'>
|
<View className='order-bradge'>
|
||||||
<Text>{state.waitEvaluateNum}</Text>
|
<Text>{state.finishNum}</Text>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
<Text className='order-txt'>已完成</Text>
|
<Text className='order-txt'>已完成</Text>
|
||||||
</View>
|
</View>
|
||||||
</SpLogin>
|
</SpLogin>
|
||||||
{/* 先隐藏评价功能 02-24 */}
|
{/* 先隐藏评价功能 02-24 */}
|
||||||
{false && <SpLogin
|
{<SpLogin
|
||||||
className='order-item'
|
className='order-item'
|
||||||
// /subpage/pages/trade/after-sale
|
// /subpage/pages/trade/after-sale
|
||||||
onChange={handleClickLink.bind(this, '/subpage/pages/trade/list?status=7')}
|
onChange={handleClickLink.bind(this, '/subpage/pages/trade/list?status=7')}
|
||||||
>
|
>
|
||||||
<View className='order-item-view'>
|
<View className='order-item-view'>
|
||||||
<SpImage src='member/pingjia.png' className='icon-style' mode='aspectFit' height={42} isNew />
|
<SpImage src='member/pingjia.png' className='icon-style' mode='aspectFit' height={42} isNew />
|
||||||
{state.afterSalesNum > 0 && (
|
{state.waitEvaluateNum > 0 && (
|
||||||
<View className='order-bradge'>
|
<View className='order-bradge'>
|
||||||
<Text>{state.afterSalesNum}</Text>
|
<Text>{state.waitEvaluateNum}</Text>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
<Text className='order-txt'>评价</Text>
|
<Text className='order-txt'>评价</Text>
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@
|
||||||
padding: 30px 16px 50px;
|
padding: 30px 16px 50px;
|
||||||
.comp-panel {
|
.comp-panel {
|
||||||
&-bd {
|
&-bd {
|
||||||
padding: 24px 50px;
|
padding: 24px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
.extra {
|
.extra {
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ function TradeAfterSale (props) {
|
||||||
<View className="iconfont icon-arrowRight" style={{ color: tabList[curTabIdx] > -1 ? '#000' : '#a5a5a5' }}></View>
|
<View className="iconfont icon-arrowRight" style={{ color: tabList[curTabIdx] > -1 ? '#000' : '#a5a5a5' }}></View>
|
||||||
</View>
|
</View>
|
||||||
</Picker>
|
</Picker>
|
||||||
</View> : aftersales?.progress != 12 ? <View className="after-item">
|
</View> : aftersales?.progress && aftersales.progress != 12 ? <View className="after-item">
|
||||||
<View className="after-item-label">售后单号:{afterSaleTid}</View>
|
<View className="after-item-label">售后单号:{afterSaleTid}</View>
|
||||||
<View className="after-item-label" style={{ fontSize: '30rpx', display: 'flex', alignItems: 'flex-end', justifyContent: 'space-between', opacity: '80', margin: '36rpx 0 50rpx 0', lineHeight: '0.8' }}>
|
<View className="after-item-label" style={{ fontSize: '30rpx', display: 'flex', alignItems: 'flex-end', justifyContent: 'space-between', opacity: '80', margin: '36rpx 0 50rpx 0', lineHeight: '0.8' }}>
|
||||||
<Text style={{ marginRight: '20rpx', fontWeight: 'bold' }}>{['', '售后审核通过,请您发货并填写物流单号', '等待商家确认收货', '已驳回', '已完成', '退款驳回', '退款完成', '已关闭', '商家确认收货,等待审核退款', '退款处理中'][aftersales?.progress || 0]}</Text>
|
<Text style={{ marginRight: '20rpx', fontWeight: 'bold' }}>{['', '售后审核通过,请您发货并填写物流单号', '等待商家确认收货', '已驳回', '已完成', '退款驳回', '退款完成', '已关闭', '商家确认收货,等待审核退款', '退款处理中'][aftersales?.progress || 0]}</Text>
|
||||||
|
|
@ -337,40 +337,42 @@ function TradeAfterSale (props) {
|
||||||
</View>
|
</View>
|
||||||
</View> : null}
|
</View> : null}
|
||||||
|
|
||||||
<View className="after-item" style={{ display: 'flex', alignItems: 'flex-end', justifyContent: 'space-between', marginBottom: '30rpx' }}>
|
{aftersales?.progress >= 1 && aftersales?.progress != 3 && <>
|
||||||
<Text style={{ fontSize: '24rpx', marginTop: '-10rpx' }}>退货单号填写</Text>
|
<View className="after-item" style={{ display: 'flex', alignItems: 'flex-end', justifyContent: 'space-between', marginBottom: '30rpx' }}>
|
||||||
{aftersales?.hasAftersalesAddress && <Text onClick={() => setState(draft => { draft.isAddrOpened = true })} style={{ fontSize: '20rpx', borderBottom: '1px solid #000', padding: '0 0 4rpx', marginTop: '-10rpx', lineHeight: 0.8 }}>查看退货地址</Text>}
|
<Text style={{ fontSize: '24rpx', marginTop: '-10rpx' }}>退货单号填写</Text>
|
||||||
</View>
|
{aftersales?.hasAftersalesAddress && <Text onClick={() => setState(draft => { draft.isAddrOpened = true })} style={{ fontSize: '20rpx', borderBottom: '1px solid #000', padding: '0 0 4rpx', marginTop: '-10rpx', lineHeight: 0.8 }}>查看退货地址</Text>}
|
||||||
<View className="after-item mt-40" style={{ marginBottom: '50rpx' }}>
|
|
||||||
{!aftersales?.hasSendbackData ? <Picker
|
|
||||||
mode='selector'
|
|
||||||
rangeKey='name'
|
|
||||||
range={expressList}
|
|
||||||
onChange={onChangeExpress}
|
|
||||||
>
|
|
||||||
<View className="after-item-input">
|
|
||||||
<View className={`input-txt`}>{`${getLogisticName() || '请选择快递公司'}`}</View>
|
|
||||||
<View className="iconfont icon-arrowRight" style={{ color: getLogisticName() ? '#000' : '#a5a5a5' }}></View>
|
|
||||||
</View>
|
|
||||||
</Picker> : <View className="after-item-input">
|
|
||||||
<View className={`input-txt color-hui`}>{`${aftersales?.sendbackData?.name || ''}`}</View>
|
|
||||||
</View>}
|
|
||||||
</View>
|
|
||||||
<View className="after-item mt-40" style={{ marginBottom: '50rpx' }}>
|
|
||||||
<View className="after-item-input">
|
|
||||||
{!aftersales?.hasSendbackData ? <Input className="desc-ipt" value={logi_no} placeholder='物流单号' onInput={(e) => {
|
|
||||||
setState(draft => {
|
|
||||||
draft.logi_no = e.detail.value
|
|
||||||
})
|
|
||||||
}}></Input>
|
|
||||||
:
|
|
||||||
<View className={`input-txt color-hui`}>{`${aftersales?.sendbackData?.logi_no || ''}`}</View>}
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
<View className="after-item mt-40" style={{ marginBottom: '50rpx' }}>
|
||||||
<View style={{ margin: '0 auto', marginBottom: '70rpx', textAlign: 'center' }}>
|
{!aftersales?.hasSendbackData ? <Picker
|
||||||
{/* <AtButton type='primary' onClick={onSubmitExp}>确认上传</AtButton> */}
|
mode='selector'
|
||||||
<Text onClick={() => handleClickCopy(aftersales?.sendbackData?.logi_no || '')} style={{ fontSize: '20rpx', borderBottom: '1px solid #000', lineHeight: 0.8 }}>复制物流单号</Text>
|
rangeKey='name'
|
||||||
</View>
|
range={expressList}
|
||||||
|
onChange={onChangeExpress}
|
||||||
|
>
|
||||||
|
<View className="after-item-input">
|
||||||
|
<View className={`input-txt`}>{`${getLogisticName() || '请选择快递公司'}`}</View>
|
||||||
|
<View className="iconfont icon-arrowRight" style={{ color: getLogisticName() ? '#000' : '#a5a5a5' }}></View>
|
||||||
|
</View>
|
||||||
|
</Picker> : <View className="after-item-input">
|
||||||
|
<View className={`input-txt color-hui`}>{`${aftersales?.sendbackData?.name || ''}`}</View>
|
||||||
|
</View>}
|
||||||
|
</View>
|
||||||
|
<View className="after-item mt-40" style={{ marginBottom: '50rpx' }}>
|
||||||
|
<View className="after-item-input">
|
||||||
|
{!aftersales?.hasSendbackData ? <Input className="desc-ipt" value={logi_no} placeholder='物流单号' onInput={(e) => {
|
||||||
|
setState(draft => {
|
||||||
|
draft.logi_no = e.detail.value
|
||||||
|
})
|
||||||
|
}}></Input>
|
||||||
|
:
|
||||||
|
<View className={`input-txt color-hui`}>{`${aftersales?.sendbackData?.logi_no || ''}`}</View>}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View style={{ margin: '0 auto', marginBottom: '70rpx', textAlign: 'center' }}>
|
||||||
|
{/* <AtButton type='primary' onClick={onSubmitExp}>确认上传</AtButton> */}
|
||||||
|
<Text onClick={() => handleClickCopy(aftersales?.sendbackData?.logi_no || '')} style={{ fontSize: '20rpx', borderBottom: '1px solid #000', lineHeight: 0.8 }}>复制物流单号</Text>
|
||||||
|
</View>
|
||||||
|
</>}
|
||||||
|
|
||||||
{/* <SpTabs current={curTabIdx} tablist={tabList} onChange={(e) => {
|
{/* <SpTabs current={curTabIdx} tablist={tabList} onChange={(e) => {
|
||||||
setState(draft => {
|
setState(draft => {
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
}
|
}
|
||||||
.btn-wrap {
|
.btn-wrap {
|
||||||
padding: 50px;
|
padding: 50px;
|
||||||
margin-bottom: 100px;
|
// margin-bottom: 100px;
|
||||||
.at-button__text {
|
.at-button__text {
|
||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue