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