1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <template>
- <view>
- <view v-for="(item,index) in assesslist" :key="index" class="uni-padding-wrap" style="border-bottom: 1px solid #EEEEEE;padding-bottom: 10upx;">
- <view class="uni-comment">
- <view class="uni-comment-list">
- <view class="uni-comment-face"><image style="width: 100%;height: 100%;" :src="item.member_avatar"></image></view>
- <view class="uni-comment-body">
- <view class="uni-comment-top">
- <text style="font-size: 28upx;color: #303133">{{item.member_truename}}</text>
- <uniIcon type="star" size="16"></uniIcon>
- </view>
- <view class="uni-comment-date">
- <text style="color: #909399;font-size: 20upx;">{{item.geval_addtime}}</text>
- </view>
- </view>
- <view>
- <van-rate
- :value="item.geval_scores"
- void-icon="star"
- void-color="#eee"
- color="#ee0a24"
- readonly='true'
- />
- </view>
- </view>
- <view style="color: #303133;font-size: 28upx;" class="uni-comment-content">{{item.geval_content}}</view>
- <view>
- <image v-for="(items, index) in item.images" @click="shoupicture(items)" :key="index" :src="items" style="width: 100upx;height: 100upx;float:left;"></image>
- </view>
- </view>
- </view>
- <view style="text-align: center;" v-if="assesslist.length == 0">
- 暂无评价
- </view>
-
- <unipopup :images="images" :show="ishow"/>
-
- </view>
- </template>
- <script>
- import assess from '@/component/assess.vue' // 评价列表
- import unipopup from '@/component/openpictrue.vue'
- export default{
- components: {
- assess,
- unipopup
- },
- data(){
- return {
- goodId: 0,
- ishow: false,
- images: '',
- assesslist:[],
- store_id: 0
- }
- },
- onLoad(options) {
- this.goodId = options.goodId; // 商品Id
- this.store_id = options.store_id;
- this.getassess();
- uni.$on('changshow', (e) => {
- this.changeshow();
- })
- // changshow
- },
- methods: {
- shoupicture(e) {
- this.images = e;
- this.ishow = true;
- console.log(this.ishow)
- },
- changeshow() {
- this.ishow = false;
- },
- getassess() {
- this.request({
- url: '/api/index.php?do=getevaluategoods',
- method: 'post',
- data: {
- goodsid: this.goodId
- },
- success: (res) => {
- console.log(res.data);
- res.data.forEach(item => {
- item.images = item.geval_image.split(',');
- })
- this.assesslist = res.data;
- console.log(this.assesslist)
- }
- })
- }
- }
- }
- </script>
- <style>
- </style>
|