<!--pages/comment/comment.wxml-->
<view class="comment_allgoods comment-goods">
	<view class="comment_item" wx:for-item="good" wx:for-index="good_index" wx:key="{{good_index}}" wx:for="{{has_many_order_goods}}">
		<view class="goods">
			<view class="content a">
				<image src="{{good.thumb}}" mode='widthFix' />
				<view class="p name">{{good.title}}</view>
				<view class="p price">{{language['money']}}{{good.goods_price}}</view>
			</view>
			<view class="foot">
				<view class="action">
					<view class="span btn btn_1" data-index="{{good_index}}" data-evaluatebol="{{good.evaluatebol}}" catchtap="goEvaluate">{{iscomment?'填写评价':'查看评价'}}
						<block wx:if="{{good.evaluatebol}}">
							<van-icon name="arrow-down" />
						</block>
						<block wx:if="{{!good.evaluatebol}}">
							<van-icon name="arrow" />
						</block>
					</view>
				</view>
			</view>
			<view class="inner {{good.evaluatebol?'display':''}}">
				<view class="comment_view">
					<block wx:if='{{iscomment}}'>
						<view class="span label">评分：</view>
						<view class="stars">
							<van-rate value="{{level}}" bind:change="getStar" />
						</view>
					</block>
					<block wx:if='{{!iscomment}}'>
						<view class="span label">
							<van-rate value="{{comments[good_index]}}" disabled-color="#ff9900" disabled />
						</view>
					</block>
				</view>
				<view class="comment_textarea">
					<view class="textarea_wrap">
						<block wx:if='{{!disabled[good_index]}}'>
							<van-cell-group>
								<van-field disabled="{{disabled[good_index]}}" value="{{ comments[good_index] }}" type="textarea" placeholder="请输入评论内容，长度在5-100字之间"
								 border="{{ false }}" data-index="{{good_index}}" autosize="{{true}}" bind:blur="commentsinp" />
							</van-cell-group>
						</block>
						<block wx:if='{{disabled[good_index]}}'>
							<view class="option">{{comments[good_index]}}</view>
						</block>
					</view>
				</view>
				<block wx:if='{{!disabled[good_index]}}'>
					<view class="mod_btns">
						<view class="button {{btn_class[good_index]}}" data-good="{{good}}" data-goodindex="{{good_index}}" catchtap="toComment">发表评价</view>
					</view>
				</block>
			</view>
		</view>
	</view>
</view>
<!--<shopfoot></shopfoot>-->
