| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- <template>
- <view class="flex-index-css evaluate-box box-border-box">
- <scroll-view scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
- <view>
- <view class="card-box flex-justify-space align-items-center">
- <view class="align-items-center">
- <view class="fs-64 fc-FF7F00 fw-600 mr-12">{{shopScore}}</view>
- <EnEva :num="shopScore"></EnEva>
- </view>
- <view class="align-items-center">
- <!-- <view class="mr-30">
- <view class="fs-24 mb-4 fw-400">味道</view>
- <view class="fs-32 fw-b">4.2</view>
- </view>
- <view class="mr-30">
- <view class="fs-24 mb-4 fw-400">包装</view>
- <view class="fs-32 fw-b">4.2</view>
- </view> -->
- <view class="pj-num">
- <view class="fs-24 mb-4 fc-9 fw-400">评价数量</view>
- <view class="fs-32 fw-b">{{commentTotal}}</view>
- </view>
- </view>
- </view>
- <view class="card-box align-items-center">
- <view class="list-item fs-28" @click="selectType(item.id)" :class="type==item.id?'s-item':'n-item'"
- v-for="(item,i) in list" :key="i">{{item.name}}{{item.num||''}}</view>
- </view>
- <view class="card-box" v-for="(item,i) in commentData" :key="i">
- <view class="item-head flex-justify-space mb-22">
- <view class="display-flex">
- <image class="left-img mr-16" :src="item.head_img" mode="scaleToFill"></image>
- <view class="mt-5">
- <view class="fs-28 fw-600">{{item.nickname}}</view>
- <view class="fs-24 fc-9">{{item.created_date}}</view>
- </view>
- </view>
- <!-- <image @click="openPop" class="right-img" src="@/static/img/takeout/ddd.png" mode=""></image> -->
- </view>
- <view class="align-items-center mb-16">
- <EnEva :num="item.grade"></EnEva>
- <view class="fs-24 fc-9 ml-16">{{item.grade == 1?'很差':item.grade == 2?'差':item.grade == 3?'一般':item.grade == 4?'棒':'非常棒'}}</view>
- </view>
- <view class="fs-32 fw-400 mb-16">
- {{item.content}}
- </view>
- <view class="flex-wrap-wrap">
- <image v-for="(itemImages,iImages) in item.images" :key="i" @click="lookImg(iImages,item.images)" class="list-img"
- :src="itemImages" mode="scaleToFill"></image>
- </view>
- <view class="bgc-F3F4F6 b-rad-12 box-border-box p-24" v-if="item.shop_reply">
- <view class="flex-justify-space align-items-center mb-12">
- <view class="fs-28 fw-600 fc-6">商家回复</view>
- <view class="fs-24 fc-9 fw-400">{{item.reply_time}}</view>
- </view>
- <view class="fs-24 fc-6 fw-400">
- {{item.shop_reply}}
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- <uni-popup ref="popup" type="bottom">
- <view class="pop-box" @click.stop="closePop">
- <view class="pop-box-1" v-if="tup">
- <view @click.stop="tup=false" class="text-align-center fs-32 fw-600 mb-20">我要举报</view>
- <view class="text-align-center fs-32 fw-600">取消</view>
- </view>
- <view v-else class="flex-index-css">
- <view class="flex-1"></view>
- <view class="pop-box-2 box-border-box p-24">
- <view class="pop-box-2-1 fs-36 fw-600 text-align-center mb-28">
- 选择举报理由
- <view class="pop-box-2-2" @click.stop="tup=true">
- <uni-icons type="closeempty" size="24"></uni-icons>
- </view>
- </view>
- <view class="pop-item text-align-center fs-32" v-for="(item,i) in reasonList" :key="i"
- @click.stop="report(item)">
- {{item.name}}
- </view>
- </view>
- </view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import {
- shopComment
- } from "@/api/shop.js"
- import EnEva from '@/components/en-utils/en-eva/en-eva.vue';
- import tools from "@/service/tools";
- export default {
- name: "evaluate-box",
- components: {
- EnEva
- },
- props: {
- shopScore: {},
- shopId: {}
- },
- data() {
- return {
- type: 0,
- list: [{
- name: '全部',
- id: 0
- },
- {
- name: '很棒',
- id: 1,
- },
- {
- name: '一般',
- id: 2
- },
- {
- name: '失望',
- id: 3
- },
- {
- name: '有图',
- id: 4
- },
- ],
- commentData: [],
- commentTotal: '',
- tup: true,
- reasonList: [{
- name: '政治敏感',
- id: 1
- },
- {
- name: '色情低俗',
- id: 2
- },
- {
- name: '恶意辱骂',
- id: 3
- },
- {
- name: '违法违规',
- id: 4
- },
- {
- name: '垃圾广告',
- id: 5
- },
- {
- name: '涉未成年',
- id: 6
- },
- ]
- }
- },
- mounted() {
- this.shopComment()
- },
- methods: {
- lookImg(i, item) {
- tools.lookBigImg(i, item)
- },
- selectType(type) {
- if (this.type != type) {
- this.type = type
- this.commentData = []
- this.shopComment()
- }
- },
- scrolltolower() {
- console.log('触底');
- },
- openPop() {
- this.$refs.popup.open();
- },
- closePop() {
- this.$refs.popup.close();
- this.tup = true;
- },
- report(item) {
- this.closePop()
- },
- shopComment() {
- shopComment({shop_id: this.shopId,status: this.type}).then((res) => {
- if(res.code == 1) {
- this.commentTotal = res.data.total
- if(res.data.items.length> 0) {
- this.commentData.push(...res.data.items)
- }
- }
- })
- }
- },
- }
- </script>
- <style scoped lang="scss">
- .pj-num{
- padding: 0 24rpx 0 52rpx;
- border-left: 2rpx solid #F5F5F5;
- }
- .evaluate-box {
- background-color: #F5F4F9;
- padding: 16rpx 24rpx;
- .card-box {
- box-sizing: border-box;
- padding: 24rpx;
- background-color: #fff;
- border-radius: 20rpx;
- margin-bottom: 20rpx;
- }
- .list-item {
- min-width: 56rpx;
- height: 52rpx;
- border-radius: 8rpx;
- text-align: center;
- line-height: 52rpx;
- margin-right: 20rpx;
- padding: 0 16rpx;
- }
- .s-item {
- background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
- color: #fff;
- }
- .n-item {
- background: #F3F4F6;
- color: #333;
- }
- .item-head {
- .left-img {
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- }
- .right-img {
- width: 30rpx;
- height: 6rpx;
- }
- }
- .list-img {
- width: 210rpx;
- height: 210rpx;
- border-radius: 12rpx;
- margin: 0 10rpx 10rpx 0;
- }
- .list-img:nth-child(3) {
- margin-right: 0 !important;
- }
- .list-img:nth-child(6) {
- margin-right: 0 !important;
- }
- .list-img:nth-child(9) {
- margin-right: 0 !important;
- }
- .pop-box {
- width: 100%;
- height: 100vh;
- // background-color: #999;
- position: relative;
- .pop-box-1 {
- position: absolute;
- bottom: 20rpx;
- left: 24rpx;
- view {
- width: 702rpx;
- height: 88rpx;
- line-height: 88rpx;
- background: #FFFFFF;
- border-radius: 16rpx;
- }
- }
- .pop-box-2 {
- width: 100%;
- height: 820rpx;
- background: #FFFFFF;
- border-radius: 24rpx 24rpx 0rpx 0rpx;
- .pop-box-2-1 {
- position: relative;
- .pop-box-2-2 {
- position: absolute;
- top: 0;
- right: 0;
- }
- }
- .pop-item {
- width: 100%;
- height: 92rpx;
- line-height: 92rpx;
- background: #F3F4F6;
- border-radius: 200rpx;
- margin-bottom: 24rpx;
- }
- }
- }
- }
- </style>
|