Evaluate.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <template>
  2. <view>
  3. <!-- <titlenav></titlenav> -->
  4. <view class="evaluate">
  5. <view class="title">评价管理</view>
  6. <view class="tab">
  7. <view class="tabs" :class="{ active: item === active }" v-for="(item, index) in tabs" :key="index" @click="tab(item)">
  8. {{ item }}
  9. <view style="margin-top:12px"><view class="slip" :class="{ active: item === active }"></view></view>
  10. </view>
  11. </view>
  12. <view class="evaluateCon" v-for="(item, index) in lists" :key="index">
  13. <!-- <image v-if="userInfo" class="imgBox" :src="userInfo.avatar" ></image> -->
  14. <image class="evaluateImg" src="https://bpic.588ku.com/illus_water_img/21/07/05/ecab6de5a7b2972500459ba95cf97deb.jpg"></image>
  15. <view class="conr">
  16. <view class="name">
  17. <!-- <view class="txt1" v-if="userInfo">{{ userInfo.nickname }}</view> -->
  18. <view class="text1">奥斯特洛夫斯基</view>
  19. <view class="text2">{{item.createdAt}}</view>
  20. </view>
  21. <view class="give">
  22. <image class="imgBox2" src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-06-11-21-07FIiyRFOr.png"></image>
  23. <view class="text1">赞了该商品</view>
  24. </view>
  25. <view class="remark">{{item.remark}}</view>
  26. <view class="image">
  27. <view><image class="img" @click="preview(item.image, getImgs(lists))" :src="item.image" alt=""></image></view>
  28. </view>
  29. <view class="Yreply" v-if="item.reply">
  30. <text><span>已回复:</span>{{item.reply}}</text>
  31. <view class="dele" @click="dele">删除</view>
  32. </view>
  33. <view class="reply" @click="reply" v-else>
  34. <image class="img" src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-26-17-12-07ypKLdnaL.png"></image>
  35. <text class="text1">回复</text>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import { mapState } from 'vuex';
  44. import Titlenav from '../components/Titlenav.vue';
  45. export default {
  46. components: {
  47. Titlenav
  48. },
  49. data() {
  50. return {
  51. active: '全部',
  52. tabs: ['全部', '已回复', '未回复'],
  53. lists: [
  54. {
  55. image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-54-36URxMKUXs.jpg',
  56. reply:'感谢您的认可,祝您生活愉快,欢迎下次点餐,欢迎下次点餐…',
  57. remark:'好吃',
  58. createdAt: '2021-05-20',
  59. },
  60. {
  61. image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-56-45UCHrCoTS.gif',
  62. reply:'',
  63. remark:'不好吃',
  64. createdAt: '2021-05-21',
  65. }
  66. ]
  67. };
  68. },
  69. computed: {
  70. ...mapState(['systemInfo', 'userInfo'])
  71. },
  72. methods: {
  73. tab(item) {
  74. this.active = item;
  75. },
  76. getImgs(list) {
  77. return list.map(item => {
  78. return item.image;
  79. });
  80. },
  81. dele(){},
  82. reply(){}
  83. }
  84. };
  85. </script>
  86. <style lang="scss" scoped>
  87. .evaluate {
  88. margin: 10px 20px 0 20px;
  89. .title {
  90. font-size: 24px;
  91. font-weight: bold;
  92. color: #000000;
  93. line-height: 33px;
  94. margin-bottom: 20px;
  95. }
  96. .tab {
  97. display: flex;
  98. align-items: center;
  99. width: 100%;
  100. padding: 0 7px;
  101. background: #fff;
  102. height: 44px;
  103. .tabs {
  104. font-size: 16px;
  105. font-weight: 400;
  106. color: #c8c9cc;
  107. line-height: 22px;
  108. z-index: 88;
  109. margin: 9px 34px 0 0;
  110. &.active {
  111. font-size: 18px;
  112. color: #214bbe;
  113. font-weight: bold;
  114. }
  115. .slip {
  116. width: 16px;
  117. margin: 0 auto;
  118. &.active {
  119. border-bottom: 2px solid #214bbe;
  120. border-radius: 2px;
  121. }
  122. }
  123. }
  124. }
  125. .evaluateCon {
  126. display: flex;
  127. margin-top: 20px;
  128. border-bottom: 1px solid #f5f7fa;
  129. .evaluateImg {
  130. width: 41px;
  131. height: 36px;
  132. border-radius: 50%;
  133. margin-right: 8px;
  134. display: block;
  135. }
  136. .conr {
  137. width: 100%;
  138. .name {
  139. display: flex;
  140. align-items: center;
  141. font-weight: 400;
  142. justify-content: space-between;
  143. .text1 {
  144. font-size: 15px;
  145. color: #000000;
  146. line-height: 24px;
  147. }
  148. .text2 {
  149. font-size: 13px;
  150. font-weight: 400;
  151. color: #939599;
  152. line-height: 22px;
  153. }
  154. }
  155. .give {
  156. display: flex;
  157. align-items: center;
  158. margin: 4px 0;
  159. .imgBox2 {
  160. width: 16px;
  161. height: 16px;
  162. border-radius: 0;
  163. }
  164. .text1 {
  165. font-size: 13px;
  166. font-weight: 400;
  167. color: #939599;
  168. line-height: 24px;
  169. margin-left: 4px;
  170. }
  171. }
  172. .remark {
  173. font-size: 13px;
  174. font-weight: 400;
  175. color: #000000;
  176. line-height: 22px;
  177. }
  178. .image {
  179. display: flex;
  180. align-items: center;
  181. .img {
  182. width: 80px;
  183. height: 80px;
  184. border-radius: 8px;
  185. margin: 5px 12px 0 0;
  186. }
  187. }
  188. }
  189. .reply {
  190. display: flex;
  191. align-items: center;
  192. place-content: flex-end;
  193. margin-bottom: 9px;
  194. .img {
  195. width: 24px;
  196. height: 24px;
  197. }
  198. .text1 {
  199. font-size: 14px;
  200. font-weight: bold;
  201. color: #214bbe;
  202. line-height: 24px;
  203. margin-left: 6px;
  204. }
  205. }
  206. .Yreply{
  207. width: 100%;
  208. padding: 12px;
  209. font-size: 13px;
  210. font-weight: 400;
  211. color: #000000;
  212. background: #F5F7FA;
  213. border-radius: 0px 8px 8px 8px;
  214. line-height: 22px;
  215. margin: 16px 0 10px;
  216. span{
  217. color: #939599;
  218. }
  219. .dele{
  220. color: #939599;
  221. text-align: right;
  222. }
  223. }
  224. }
  225. }
  226. </style>