index.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. <template>
  2. <view :data-theme="theme">
  3. <view class="my-order">
  4. <view class='list'>
  5. <view class='item' v-for="(item,index) in replyList" :key="index">
  6. <view class='title acea-row row-between-wrapper'>
  7. <navigator :url="`/pages/merchant/home/index?merId=${item.merId}`" hover-class="none">
  8. <view class="acea-row row-middle">
  9. <text class='iconfont icon-shangjiadingdan mr10'></text>
  10. <text class="mr10">{{item.merName}}</text>
  11. <text class='iconfont icon-xiangyou'></text>
  12. </view>
  13. </navigator>
  14. </view>
  15. <view @click='goProDetails(item)' class='item-info acea-row row-between row-top'>
  16. <view class='pictrue'>
  17. <easy-loadimage :image-src="item.image"></easy-loadimage>
  18. <!-- <image :src='item.image'></image> -->
  19. </view>
  20. <view class='text acea-row row-between'>
  21. <view class='name line2'>{{item.productName}}</view>
  22. <view class='money'>
  23. <view>¥{{item.price}}</view>
  24. <view>x{{item.payNum}}</view>
  25. </view>
  26. <view class="sku">规格:{{ item.sku?item.sku:'无' }}</view>
  27. </view>
  28. </view>
  29. <view class='bottom acea-row row-right row-middle'>
  30. <view class='bnt bg_color' @click='evaluateTap(item)'>去评价</view>
  31. </view>
  32. </view>
  33. <view class='loadingicon acea-row row-center-wrapper'>
  34. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{replyList.length>0?loadTitle:''}}
  35. </view>
  36. <emptyPage v-if="replyList.length == 0 && !loading" title="暂无评论~" :imgSrc="urlDomain+'crmebimage/presets/noEvaluate.png'"></emptyPage>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. // +----------------------------------------------------------------------
  43. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  44. // +----------------------------------------------------------------------
  45. // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
  46. // +----------------------------------------------------------------------
  47. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  48. // +----------------------------------------------------------------------
  49. // | Author: CRMEB Team <admin@crmeb.com>
  50. // +----------------------------------------------------------------------
  51. import {
  52. orderReplyList
  53. } from '@/api/order.js';
  54. import {toLogin} from '@/libs/login.js';
  55. import {mapGetters} from "vuex";
  56. import emptyPage from '@/components/emptyPage.vue'
  57. import easyLoadimage from '@/components/base/easy-loadimage.vue';
  58. import {goProductDetail} from "../../../libs/order";
  59. const app = getApp();
  60. export default {
  61. data() {
  62. return {
  63. urlDomain: this.$Cache.get("imgHost"),
  64. loading: false, //是否加载中
  65. loadend: false, //是否加载完毕
  66. loadTitle: '显示更多', //提示语
  67. replyList: [], //订单数组
  68. page: 1,
  69. limit: 20,
  70. isShow: false,
  71. theme: app.globalData.theme
  72. };
  73. },
  74. computed: mapGetters(['isLogin']),
  75. components: {
  76. emptyPage,
  77. easyLoadimage
  78. },
  79. // 滚动监听
  80. onPageScroll(e) {
  81. // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
  82. uni.$emit('scroll');
  83. },
  84. onShow() {
  85. uni.setNavigationBarTitle({
  86. title: '评价列表'
  87. })
  88. let that = this;
  89. if (this.isLogin) {
  90. this.loadend = false;
  91. this.page = 1;
  92. this.$set(this, 'replyList', []);
  93. this.getReplyList();
  94. } else {
  95. toLogin();
  96. }
  97. },
  98. methods: {
  99. returns(){
  100. uni.navigateBack()
  101. },
  102. evaluateTap(item) {
  103. uni.navigateTo({
  104. url: "/pages/goods/goods_comment_con/index?orderNo=" + item.orderNo + "&id=" + item.id
  105. })
  106. },
  107. /**
  108. * 去商品详情productType,商品类型:0-普通,1-秒杀,2-砍价,3-拼团,4-视频号
  109. */
  110. goProDetails: function(item) {
  111. goProductDetail(item.productId, 0, `&typeNum=${item.productType}`)
  112. },
  113. /**
  114. * 获取订单列表
  115. */
  116. getReplyList: function() {
  117. let that = this;
  118. if (that.loadend) return;
  119. if (that.loading) return;
  120. that.loading = true;
  121. that.loadTitle = '显示更多';
  122. orderReplyList({
  123. page: that.page,
  124. limit: that.limit,
  125. }).then(res => {
  126. let list = res.data.list || [];
  127. let loadend = list.length < that.limit;
  128. that.replyList = that.$util.SplitArray(list, that.replyList);
  129. that.$set(that, 'replyList', that.replyList);
  130. that.loadend = loadend;
  131. that.loading = false;
  132. that.loadTitle = loadend ? "" : '显示更多';
  133. that.page = that.page + 1;
  134. that.isShow = true;
  135. }).catch(err => {
  136. that.loading = false;
  137. that.loadTitle = '显示更多';
  138. })
  139. },
  140. },
  141. onReachBottom: function() {
  142. this.getReplyList();
  143. }
  144. }
  145. </script>
  146. <style scoped lang="scss">
  147. .sku{
  148. font-size: 24rpx;
  149. color: #999999;
  150. margin: 10rpx 0;
  151. }
  152. .icon-shangjiadingdan{
  153. font-size: 28rpx;
  154. }
  155. .icon-xiangyou{
  156. font-size: 10rpx;
  157. }
  158. .my-order .header {
  159. height: 250rpx;
  160. padding: 0 30rpx;
  161. }
  162. .my-order .header .picTxt {
  163. height: 190rpx;
  164. }
  165. .my-order .header .picTxt .text {
  166. color: rgba(255, 255, 255, 0.8);
  167. font-size: 26rpx;
  168. font-family: 'Guildford Pro';
  169. }
  170. .my-order .header .picTxt .text .name {
  171. font-size: 34rpx;
  172. font-weight: bold;
  173. color: #fff;
  174. margin-bottom: 20rpx;
  175. }
  176. .my-order .header .picTxt .pictrue {
  177. width: 122rpx;
  178. height: 109rpx;
  179. }
  180. .my-order .header .picTxt .pictrue image{
  181. width: 100%;
  182. height: 100%;
  183. }
  184. .my-order .nav {
  185. background-color: #fff;
  186. border-top: 1px solid #F5F5F5;
  187. // margin: -60rpx 0 0;
  188. }
  189. .my-order .nav .item {
  190. text-align: center;
  191. font-size: 26rpx;
  192. color: #282828;
  193. padding: 26rpx 30rpx;
  194. display: inline-block;
  195. background-color: #fff;
  196. }
  197. .my-order .nav .item.on {
  198. /* #ifdef H5 || MP */
  199. font-weight: bold;
  200. /* #endif */
  201. /* #ifdef APP-PLUS */
  202. color: #000;
  203. /* #endif */
  204. position: relative;
  205. }
  206. .my-order .nav .item.on ::after{
  207. content: '';
  208. width: 78rpx;
  209. height: 4rpx;
  210. @include main_bg_color(theme);
  211. position: absolute;
  212. bottom: 2rpx;
  213. left: 30rpx;
  214. }
  215. .my-order .nav .item .num {
  216. margin-top: 18rpx;
  217. }
  218. .my-order .list {
  219. width: 690rpx;
  220. margin: 14rpx auto 0 auto;
  221. }
  222. .my-order .list .item {
  223. background-color: #fff;
  224. border-radius: 14rpx;
  225. margin-bottom: 14rpx;
  226. }
  227. .my-order .list .item .title {
  228. height: 84rpx;
  229. padding: 0 24rpx;
  230. border-bottom: 1rpx solid #eee;
  231. font-size: 28rpx;
  232. color: #282828;
  233. }
  234. .my-order .list .item .title .sign {
  235. font-size: 24rpx;
  236. padding: 0 13rpx;
  237. height: 36rpx;
  238. margin-right: 15rpx;
  239. border-radius: 18rpx;
  240. @include coupons_border_color(theme);
  241. @include main_color(theme);
  242. }
  243. .my-order .list .item .item-info {
  244. padding: 0 24rpx;
  245. margin-top: 22rpx;
  246. }
  247. .my-order .list .item .item-info .pictrue {
  248. width: 120rpx;
  249. height: 120rpx;
  250. }
  251. .my-order .list .item .item-info .pictrue image , /deep/.easy-loadimage,uni-image {
  252. width: 100%;
  253. height: 100%;
  254. border-radius: 14rpx;
  255. }
  256. .my-order .list .item .item-info .text {
  257. width: 500rpx;
  258. font-size: 28rpx;
  259. color: #999;
  260. }
  261. .my-order .list .item .item-info .text .name {
  262. width: 350rpx;
  263. color: #282828;
  264. }
  265. .my-order .list .item .item-info .text .money {
  266. text-align: right;
  267. }
  268. .font_color{
  269. @include main_color(theme);
  270. }
  271. .my-order .list .item .totalPrice {
  272. font-size: 26rpx;
  273. color: #282828;
  274. text-align: right;
  275. margin: 27rpx 0 0 30rpx;
  276. padding: 0 30rpx 30rpx 0;
  277. border-bottom: 1rpx solid #eee;
  278. }
  279. .my-order .list .item .totalPrice .money {
  280. font-size: 28rpx;
  281. font-weight: bold;
  282. @include price_color(theme);
  283. }
  284. .my-order .list .item .bottom {
  285. height: 107rpx;
  286. padding: 0 30rpx;
  287. }
  288. .my-order .list .item .bottom .bnt {
  289. // width: 176rpx;
  290. height: 60rpx;
  291. text-align: center;
  292. line-height: 60rpx;
  293. @include main_color(theme);
  294. border-radius: 50rpx;
  295. font-size: 27rpx;
  296. padding: 0 30rpx;
  297. @include coupons_border_color(theme);
  298. }
  299. .my-order .list .item .bottom .bnt.cancelBnt {
  300. border: 1rpx solid #ddd;
  301. color: #aaa;
  302. }
  303. .my-order .list .item .bottom .bnt~.bnt {
  304. margin-left: 17rpx;
  305. }
  306. .noCart {
  307. margin-top: 171rpx;
  308. padding-top: 0.1rpx;
  309. }
  310. .noCart .pictrue {
  311. width: 414rpx;
  312. height: 336rpx;
  313. margin: 78rpx auto 56rpx auto;
  314. }
  315. .noCart .pictrue image {
  316. width: 100%;
  317. height: 100%;
  318. }
  319. /deep/.tui-red{
  320. @include main_bg_color(theme);
  321. }
  322. /deep/.tui-red-outline{
  323. @include main_color(theme);
  324. @include coupons_border_color(theme);
  325. }
  326. </style>