evaluate.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <template>
  2. <view class="flex-index-css evaluate-box box-border-box">
  3. <scroll-view scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
  4. <view>
  5. <view class="card-box flex-justify-space align-items-center">
  6. <view class="align-items-center">
  7. <view class="fs-64 fc-FF7F00 fw-600 mr-12">{{shopScore}}</view>
  8. <EnEva :num="shopScore"></EnEva>
  9. </view>
  10. <view class="align-items-center">
  11. <!-- <view class="mr-30">
  12. <view class="fs-24 mb-4 fw-400">味道</view>
  13. <view class="fs-32 fw-b">4.2</view>
  14. </view>
  15. <view class="mr-30">
  16. <view class="fs-24 mb-4 fw-400">包装</view>
  17. <view class="fs-32 fw-b">4.2</view>
  18. </view> -->
  19. <view class="pj-num">
  20. <view class="fs-24 mb-4 fc-9 fw-400">评价数量</view>
  21. <view class="fs-32 fw-b">{{commentTotal}}</view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="card-box align-items-center">
  26. <view class="list-item fs-28" @click="selectType(item.id)" :class="type==item.id?'s-item':'n-item'"
  27. v-for="(item,i) in list" :key="i">{{item.name}}{{item.num||''}}</view>
  28. </view>
  29. <view class="card-box" v-for="(item,i) in commentData" :key="i">
  30. <view class="item-head flex-justify-space mb-22">
  31. <view class="display-flex">
  32. <image class="left-img mr-16" :src="item.head_img" mode="scaleToFill"></image>
  33. <view class="mt-5">
  34. <view class="fs-28 fw-600">{{item.nickname}}</view>
  35. <view class="fs-24 fc-9">{{item.created_date}}</view>
  36. </view>
  37. </view>
  38. <!-- <image @click="openPop" class="right-img" src="@/static/img/takeout/ddd.png" mode=""></image> -->
  39. </view>
  40. <view class="align-items-center mb-16">
  41. <EnEva :num="item.grade"></EnEva>
  42. <view class="fs-24 fc-9 ml-16">{{item.grade == 1?'很差':item.grade == 2?'差':item.grade == 3?'一般':item.grade == 4?'棒':'非常棒'}}</view>
  43. </view>
  44. <view class="fs-32 fw-400 mb-16">
  45. {{item.content}}
  46. </view>
  47. <view class="flex-wrap-wrap">
  48. <image v-for="(itemImages,iImages) in item.images" :key="i" @click="lookImg(i,item)" class="list-img"
  49. :src="itemImages" mode="scaleToFill"></image>
  50. </view>
  51. <view class="bgc-F3F4F6 b-rad-12 box-border-box p-24" v-if="item.shop_reply">
  52. <view class="flex-justify-space align-items-center mb-12">
  53. <view class="fs-28 fw-600 fc-6">商家回复</view>
  54. <view class="fs-24 fc-9 fw-400">{{item.reply_time}}</view>
  55. </view>
  56. <view class="fs-24 fc-6 fw-400">
  57. {{item.shop_reply}}
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </scroll-view>
  63. <uni-popup ref="popup" type="bottom">
  64. <view class="pop-box" @click.stop="closePop">
  65. <view class="pop-box-1" v-if="tup">
  66. <view @click.stop="tup=false" class="text-align-center fs-32 fw-600 mb-20">我要举报</view>
  67. <view class="text-align-center fs-32 fw-600">取消</view>
  68. </view>
  69. <view v-else class="flex-index-css">
  70. <view class="flex-1"></view>
  71. <view class="pop-box-2 box-border-box p-24">
  72. <view class="pop-box-2-1 fs-36 fw-600 text-align-center mb-28">
  73. 选择举报理由
  74. <view class="pop-box-2-2" @click.stop="tup=true">
  75. <uni-icons type="closeempty" size="24"></uni-icons>
  76. </view>
  77. </view>
  78. <view class="pop-item text-align-center fs-32" v-for="(item,i) in reasonList" :key="i"
  79. @click.stop="report(item)">
  80. {{item.name}}
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. </uni-popup>
  86. </view>
  87. </template>
  88. <script>
  89. import {
  90. shopComment
  91. } from "@/api/shop.js"
  92. import EnEva from '@/components/en-utils/en-eva/en-eva.vue';
  93. import tools from "@/service/tools";
  94. export default {
  95. name: "evaluate-box",
  96. components: {
  97. EnEva
  98. },
  99. props: {
  100. shopScore: {},
  101. shopId: {}
  102. },
  103. data() {
  104. return {
  105. type: 0,
  106. list: [{
  107. name: '全部',
  108. id: 0
  109. },
  110. {
  111. name: '很棒',
  112. id: 1,
  113. },
  114. {
  115. name: '一般',
  116. id: 2
  117. },
  118. {
  119. name: '失望',
  120. id: 3
  121. },
  122. {
  123. name: '有图',
  124. id: 4
  125. },
  126. ],
  127. commentData: [],
  128. commentTotal: '',
  129. tup: true,
  130. reasonList: [{
  131. name: '政治敏感',
  132. id: 1
  133. },
  134. {
  135. name: '色情低俗',
  136. id: 2
  137. },
  138. {
  139. name: '恶意辱骂',
  140. id: 3
  141. },
  142. {
  143. name: '违法违规',
  144. id: 4
  145. },
  146. {
  147. name: '垃圾广告',
  148. id: 5
  149. },
  150. {
  151. name: '涉未成年',
  152. id: 6
  153. },
  154. ]
  155. }
  156. },
  157. mounted() {
  158. this.shopComment()
  159. },
  160. methods: {
  161. lookImg(i, item) {
  162. tools.lookBigImg(i, item)
  163. },
  164. selectType(type) {
  165. if (this.type != type) {
  166. this.type = type
  167. this.commentData = []
  168. this.shopComment()
  169. }
  170. },
  171. scrolltolower() {
  172. console.log('触底');
  173. },
  174. openPop() {
  175. this.$refs.popup.open();
  176. },
  177. closePop() {
  178. this.$refs.popup.close();
  179. this.tup = true;
  180. },
  181. report(item) {
  182. this.closePop()
  183. },
  184. shopComment() {
  185. shopComment({shop_id: this.shopId,status: this.type}).then((res) => {
  186. if(res.code == 1) {
  187. this.commentTotal = res.data.total
  188. if(res.data.items.length> 0) {
  189. this.commentData.push(...res.data.items)
  190. }
  191. }
  192. })
  193. }
  194. },
  195. }
  196. </script>
  197. <style scoped lang="scss">
  198. .pj-num{
  199. padding: 0 24rpx 0 52rpx;
  200. border-left: 2rpx solid #F5F5F5;
  201. }
  202. .evaluate-box {
  203. background-color: #F5F4F9;
  204. padding: 16rpx 24rpx;
  205. .card-box {
  206. box-sizing: border-box;
  207. padding: 24rpx;
  208. background-color: #fff;
  209. border-radius: 20rpx;
  210. margin-bottom: 20rpx;
  211. }
  212. .list-item {
  213. min-width: 56rpx;
  214. height: 52rpx;
  215. border-radius: 8rpx;
  216. text-align: center;
  217. line-height: 52rpx;
  218. margin-right: 20rpx;
  219. padding: 0 16rpx;
  220. }
  221. .s-item {
  222. background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
  223. color: #fff;
  224. }
  225. .n-item {
  226. background: #F3F4F6;
  227. color: #333;
  228. }
  229. .item-head {
  230. .left-img {
  231. width: 80rpx;
  232. height: 80rpx;
  233. border-radius: 50%;
  234. }
  235. .right-img {
  236. width: 30rpx;
  237. height: 6rpx;
  238. }
  239. }
  240. .list-img {
  241. width: 210rpx;
  242. height: 210rpx;
  243. border-radius: 12rpx;
  244. margin: 0 10rpx 10rpx 0;
  245. }
  246. .list-img:nth-child(3) {
  247. margin-right: 0 !important;
  248. }
  249. .list-img:nth-child(6) {
  250. margin-right: 0 !important;
  251. }
  252. .list-img:nth-child(9) {
  253. margin-right: 0 !important;
  254. }
  255. .pop-box {
  256. width: 100%;
  257. height: 100vh;
  258. // background-color: #999;
  259. position: relative;
  260. .pop-box-1 {
  261. position: absolute;
  262. bottom: 20rpx;
  263. left: 24rpx;
  264. view {
  265. width: 702rpx;
  266. height: 88rpx;
  267. line-height: 88rpx;
  268. background: #FFFFFF;
  269. border-radius: 16rpx;
  270. }
  271. }
  272. .pop-box-2 {
  273. width: 100%;
  274. height: 820rpx;
  275. background: #FFFFFF;
  276. border-radius: 24rpx 24rpx 0rpx 0rpx;
  277. .pop-box-2-1 {
  278. position: relative;
  279. .pop-box-2-2 {
  280. position: absolute;
  281. top: 0;
  282. right: 0;
  283. }
  284. }
  285. .pop-item {
  286. width: 100%;
  287. height: 92rpx;
  288. line-height: 92rpx;
  289. background: #F3F4F6;
  290. border-radius: 200rpx;
  291. margin-bottom: 24rpx;
  292. }
  293. }
  294. }
  295. }
  296. </style>