myPingJia.vue 6.9 KB

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