匿名评价
parent
a2474dddc0
commit
0a2e723acf
|
|
@ -2,7 +2,10 @@ import React, { Component } from 'react'
|
|||
import Taro, { getCurrentInstance } from '@tarojs/taro'
|
||||
import { View, Text, Image } from '@tarojs/components'
|
||||
import { AtRate } from 'taro-ui'
|
||||
import userIcon from '@/assets/imgs/user-icon.png'
|
||||
import {
|
||||
SpImage
|
||||
} from '@/components'
|
||||
// import userIcon from '@/assets/imgs/user-icon.png'
|
||||
import './index.scss'
|
||||
|
||||
export default class GoodsEvaluation extends Component {
|
||||
|
|
@ -96,12 +99,13 @@ export default class GoodsEvaluation extends Component {
|
|||
return (
|
||||
<View className='evaluation-item' onClick={this.handleSelectEvaluation.bind(this)} isBlack>
|
||||
<View className='evaluation-item__avator'>
|
||||
<Image
|
||||
{/* <Image
|
||||
src={info.anonymous ? userIcon : info.avatar}
|
||||
mode='aspectFill'
|
||||
className='avatar'
|
||||
fadeIn
|
||||
/>
|
||||
/> */}
|
||||
<SpImage className='avatar' src={'cart/niming.jpg'} width={80} height={80} isNew />
|
||||
</View>
|
||||
<View className='evaluation-item__main'>
|
||||
<View className='name-wrap'>
|
||||
|
|
|
|||
|
|
@ -3,11 +3,12 @@ import React, { useCallback, useState, useMemo } from 'react'
|
|||
import { View, Text, Image } from '@tarojs/components'
|
||||
import './index.scss'
|
||||
|
||||
const voidFunc = () => {}
|
||||
const voidFunc = () => { }
|
||||
|
||||
const SpButton = (props) => {
|
||||
const {
|
||||
resetText = '取消',
|
||||
showReset = true,
|
||||
confirmText = '确定',
|
||||
onConfirm = voidFunc,
|
||||
onReset = voidFunc
|
||||
|
|
@ -15,9 +16,9 @@ const SpButton = (props) => {
|
|||
|
||||
return (
|
||||
<View className='sp-button'>
|
||||
<View className='sp-button__reset' onClick={onReset}>
|
||||
{showReset && <View className='sp-button__reset' onClick={onReset}>
|
||||
{resetText}
|
||||
</View>
|
||||
</View>}
|
||||
<View className='sp-button__confirm' onClick={onConfirm}>
|
||||
{confirmText}
|
||||
</View>
|
||||
|
|
|
|||
|
|
@ -257,12 +257,15 @@ export default class TradeRate extends Component {
|
|||
</View>
|
||||
|
||||
<View className='submit-btn'>
|
||||
<SpButton
|
||||
<View className='submit-btn__confirm' onClick={this.handleClickSubmit.bind(this, true)}>
|
||||
立即评价
|
||||
</View>
|
||||
{/* <SpButton
|
||||
resetText='匿名评价'
|
||||
confirmText='立即评价'
|
||||
onConfirm={this.handleClickSubmit.bind(this, false)}
|
||||
onReset={this.handleClickSubmit.bind(this, true)}
|
||||
></SpButton>
|
||||
></SpButton> */}
|
||||
</View>
|
||||
</View>
|
||||
</SpPage>
|
||||
|
|
|
|||
|
|
@ -105,9 +105,25 @@ page {
|
|||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 40px;
|
||||
bottom: 0;
|
||||
padding-bottom: 50px;
|
||||
z-index: 88;
|
||||
background: #fff;
|
||||
&__confirm {
|
||||
// width: 58%;
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
/* prettier-ignore */
|
||||
border: 1PX solid var(--color-primary);
|
||||
background: var(--color-primary);
|
||||
height: 80px;
|
||||
border-radius: 6px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
box-sizing: border-box;
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ function CompEvaluation (props) {
|
|||
</View> */}
|
||||
<View className='evaluation-bd'>
|
||||
{list.map((item) => (
|
||||
<View className='evaluation-item-wrap' onClick={onViewMore}>
|
||||
<View className='evaluation-item-wrap'>
|
||||
<View className='item-hd'>
|
||||
<SpImage src={item.avatar} className='evaluation-icon' width={50} height={50} />
|
||||
<SpImage src={'cart/niming.jpg'} className='evaluation-icon' width={50} height={50} isNew />
|
||||
<Text className='evaluation-name'>{'匿名用户' || item.username}
|
||||
<Text style={{ marginLeft: '10rpx' }}>{fortmatStr(item.item_spec_desc)}</Text>
|
||||
</Text>
|
||||
|
|
@ -64,6 +64,7 @@ function CompEvaluation (props) {
|
|||
<View className="evaluation-content-line"></View>
|
||||
</View>
|
||||
))}
|
||||
<View className="click-all" onClick={onViewMore}>查看全部 <Text className='iconfont icon-qianwang-01'></Text></View>
|
||||
{list.length == 0 && <View className='default-msg'>暂无商品评价</View>}
|
||||
</View>
|
||||
</View>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,17 @@
|
|||
// margin-bottom: 20px;
|
||||
// }
|
||||
}
|
||||
.click-all {
|
||||
text-align: center;
|
||||
color: var(--color-primary);
|
||||
font-size: 24px;
|
||||
line-height: 24px;
|
||||
padding: 6px 20px 0 20px;
|
||||
.icon-qianwang-01 {
|
||||
font-size: 24px;
|
||||
line-height: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.evaluation-icon {
|
||||
margin-right: 16px;
|
||||
|
|
@ -44,12 +55,12 @@
|
|||
.item-hd {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: -8px;
|
||||
margin-bottom: -2px;
|
||||
}
|
||||
.evaluation-content {
|
||||
// padding-left: 50px;
|
||||
// padding-right: 16px;
|
||||
margin: 0 16px 0 50px;
|
||||
margin: 0 16px 0 60px;
|
||||
white-space: pre-wrap;
|
||||
font-size: 28px;
|
||||
// padding-bottom: 28px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue