myPingJia.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. <template>
  2. <view style="padding-bottom: 20rpx">
  3. <view class="padding-tb-sm margin-lr u-border-bottom" v-for="(item, index) in EvaluateList" :key="index">
  4. <view class="flex justify-between align-center" @click="gotoShop(item.shopId, item)">
  5. <view class="flex align-center">
  6. <u-avatar :src="item.shopCover" size="65"></u-avatar>
  7. <view class="margin-left-sm" style="line-height: 46upx">{{ item.shopName ? item.shopName : '匿名' }}</view>
  8. <view class="flex margin-left-sm">
  9. <u-icon v-for="ite in item.score" :key="ite" color="#FCD202" name="star-fill"></u-icon>
  10. </view>
  11. </view>
  12. <view>{{ item.createTime }}</view>
  13. </view>
  14. <view style="display: flex">
  15. <view class="margin-top-sm" :style="!item.shopReplyMessage ? 'width: 90%;' : ''">{{ item.evaluateMessage }}</view>
  16. <view class="flex padding-top-sm margin-right" @tap="goShow(index)" v-if="!item.shopReplyMessage">
  17. <!-- <image src="../../static/images/order/pinglun.png" style="width: 20px;height: 20px;"></image> -->
  18. </view>
  19. </view>
  20. <view class="margin-top-sm" v-if="item.shopReplyMessage">
  21. <view class="flex align-center">
  22. <view class="flex align-center text-df" style="color: #999999">
  23. <view class="text-df">商家回复:</view>
  24. {{ item.shopReplyMessage }}
  25. </view>
  26. </view>
  27. <!-- <view class="text-lg padding-left margin-left-xl">{{dataDet.shopReplyMessage}}</view> -->
  28. </view>
  29. <view class="flex" style="width: 100%; margin-top: 20rpx; flex-wrap: wrap" v-if="item.pictures">
  30. <image
  31. @click="lookImgs(ind, item.pictures)"
  32. :src="ite"
  33. v-for="(ite, ind) in item.pictures"
  34. :key="ind"
  35. style="width: 200rpx; height: 200rpx; margin-right: 10rpx; margin-bottom: 10rpx"
  36. mode=""
  37. ></image>
  38. </view>
  39. <view class="flex justify-end" style="width: 100%; color: #999999" @click="deletePj(item)">删除</view>
  40. </view>
  41. <empty v-if="EvaluateList.length <= 0"></empty>
  42. </view>
  43. </template>
  44. <script>
  45. import empty from '../../components/empty.vue'
  46. export default {
  47. components: {
  48. empty
  49. },
  50. data() {
  51. return {
  52. pinglun: '',
  53. count: 0,
  54. show: false,
  55. customStyle: {
  56. color: '#333333',
  57. background: '#FCD202',
  58. marginRight: '20rpx',
  59. border: 0
  60. },
  61. customStyle1: {
  62. color: '#333333',
  63. background: '#F2F2F2',
  64. marginRight: '20rpx',
  65. border: 0
  66. },
  67. cashDeposit: [],
  68. EvaluateData: {},
  69. EvaluateList: [],
  70. grade: '',
  71. page: 1,
  72. size: 10,
  73. isShow: false,
  74. oneData: [],
  75. titleData: [],
  76. shopDet: {}
  77. }
  78. },
  79. onShow() {
  80. this.getList()
  81. },
  82. onPullDownRefresh() {
  83. this.page = 1
  84. this.getList()
  85. },
  86. onReachBottom: function () {
  87. this.page = this.page + 1
  88. this.getList()
  89. },
  90. methods: {
  91. deletepjrequest(id) {
  92. let data = {
  93. id: id
  94. }
  95. this.$Request.getT('/app/order/deleteEvaluateById', data).then((res) => {
  96. uni.hideLoading()
  97. if (res.code == 0) {
  98. uni.showToast({
  99. title: '删除成功'
  100. })
  101. this.page = 1
  102. this.getList()
  103. } else {
  104. uni.showToast({
  105. title: res.msg,
  106. icon: 'none'
  107. })
  108. }
  109. })
  110. },
  111. //删除评价
  112. deletePj(item) {
  113. let that = this
  114. uni.showModal({
  115. title: '提示',
  116. content: '确定删除此评价?',
  117. complete(ret) {
  118. if (ret.confirm) {
  119. //删除评价的接口
  120. that.deletepjrequest(item.id)
  121. }
  122. }
  123. })
  124. },
  125. //去商铺
  126. gotoShop(shopId, item) {
  127. uni.navigateTo({
  128. url: '/pages/index/shop/index?shopId=' + shopId + '&shopTypeId=' + item.shopTypeId+'&lat='+uni.getStorageSync('lat')+'&lng='+uni.getStorageSync('lng')
  129. })
  130. },
  131. //预览图片
  132. lookImgs(index, imgs) {
  133. uni.previewImage({
  134. current: index,
  135. urls: imgs
  136. })
  137. },
  138. goShow(index) {
  139. this.orderNumber = this.EvaluateList[index].orderNumber
  140. this.show = true
  141. },
  142. sel(e) {
  143. this.grade = e
  144. this.count = e
  145. this.page = 1
  146. this.getList()
  147. },
  148. open(data) {
  149. console.log(data)
  150. this.oneData = data
  151. this.titleData = data.goods
  152. this.isShow = true
  153. },
  154. close() {
  155. this.isShow = false
  156. },
  157. // 获取评价列表
  158. getList() {
  159. let data = {
  160. page: this.page,
  161. limit: this.size
  162. }
  163. this.$Request.getT('/app/order/getEvaluateList', data).then((res) => {
  164. if (res.code == 0 && res.data) {
  165. // this.EvaluateData = res.data
  166. res.data.records.map((item) => {
  167. if (item.pictures) {
  168. item.pictures = item.pictures.split(',')
  169. } else {
  170. item.pictures = []
  171. }
  172. })
  173. if (this.page == 1) {
  174. this.EvaluateList = res.data.records
  175. } else {
  176. this.EvaluateList = [...this.EvaluateList, ...res.data.records]
  177. }
  178. }
  179. })
  180. }
  181. }
  182. }
  183. </script>
  184. <style lang="scss">
  185. page {
  186. background-color: #ffffff;
  187. }
  188. .box1 {
  189. position: absolute;
  190. background: #000000;
  191. width: 750rpx;
  192. height: 100vh;
  193. opacity: 0.4;
  194. }
  195. .moudes {
  196. width: 650rpx;
  197. position: absolute;
  198. background: #ffffff;
  199. top: 0;
  200. left: 0;
  201. right: 0;
  202. bottom: 0;
  203. margin: auto;
  204. height: 700rpx;
  205. border-radius: 10rpx;
  206. .bt {
  207. font-size: 30rpx;
  208. font-weight: bold;
  209. }
  210. .pjImg {
  211. width: 200rpx;
  212. height: 200rpx;
  213. }
  214. .navBox {
  215. .avtiter {
  216. width: 80rpx;
  217. height: 80rpx;
  218. border-radius: 40rpx;
  219. margin-right: 15rpx;
  220. }
  221. padding-left: 30rpx;
  222. padding-top: 30rpx;
  223. display: flex;
  224. align-items: center;
  225. .userName {
  226. font-size: 28rpx;
  227. font-weight: bold;
  228. }
  229. }
  230. }
  231. .nrTxt {
  232. display: inline-block;
  233. width: 500rpx;
  234. }
  235. .navList {
  236. text-align: center;
  237. margin-top: 30rpx;
  238. padding-left: 30rpx;
  239. padding-right: 30rpx;
  240. display: flex;
  241. justify-content: center;
  242. .xq {
  243. font-size: 30rpx;
  244. font-weight: bolder;
  245. text-align: center;
  246. }
  247. }
  248. .contentTxt {
  249. view {
  250. margin-bottom: 30rpx;
  251. display: flex;
  252. align-items: center;
  253. }
  254. .title {
  255. font-size: 30rpx;
  256. font-weight: bold;
  257. color: #000000;
  258. margin-right: 15rpx;
  259. }
  260. .imgRsc {
  261. width: 100rpx;
  262. height: 100rpx;
  263. border-radius: 10rpx;
  264. }
  265. }
  266. .list_1 {
  267. position: absolute;
  268. }
  269. .btn {
  270. width: 690upx;
  271. height: 88upx;
  272. margin: 30upx auto;
  273. background: #fcd202;
  274. box-shadow: 0px 10upx 20upx 0upx #ffd9b3;
  275. border-radius: 16upx;
  276. display: flex;
  277. align-items: center;
  278. justify-content: center;
  279. color: #000000;
  280. }
  281. .one {
  282. background: #ffffff;
  283. margin-top: 20rpx;
  284. display: flex;
  285. justify-content: space-between;
  286. padding: 20rpx;
  287. .imgSrc {
  288. width: 100rpx;
  289. height: 100rpx;
  290. vertical-align: middle;
  291. margin-right: 20rpx;
  292. border-radius: 10rpx;
  293. }
  294. .name {
  295. margin-top: 10rpx;
  296. margin-bottom: 20rpx;
  297. font-size: 24rpx;
  298. color: #000000;
  299. }
  300. .timer {
  301. font-size: 20rpx;
  302. color: #b3b3c4;
  303. }
  304. .contentTxt {
  305. font-size: 24rpx;
  306. color: #000000;
  307. }
  308. }
  309. </style>