index.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <app-layout>
  3. <view class='finish-box'>
  4. <view class='top-box dir-top-nowrap cross-center main-center'>
  5. <image class='img' src='/static/image/icon/order/icon-comment.png'></image>
  6. <text class='comment'>评价成功</text>
  7. <view class='dir-left-nowrap btn-box'>
  8. <app-jump-button url="/pages/index/index" open_type="redirect">
  9. <view class='btn text-1 main-center cross-center'>返回首页</view>
  10. </app-jump-button>
  11. <app-jump-button open_type="back">
  12. <view :style="{'color': getTheme.color}" class="btn text-2 main-center cross-center">查看订单</view>
  13. </app-jump-button>
  14. </view>
  15. </view>
  16. <block v-if="goodsList && goodsList.length">
  17. <view class="recommend">
  18. <view class="recommend-title dir-left-nowrap main-center">
  19. <view class="dir-left-nowrap cross-center">
  20. <view class="border"></view>
  21. <image src="/static/image/icon/icon-favorite.png"></image>
  22. <view class="text">您或许喜欢</view>
  23. <view class="border"></view>
  24. </view>
  25. </view>
  26. <u-ordinary-list :is-under-line-price="isListUnderlinePrice == 1 ? true : false" :isShowAttr="true" :list="goodsList" :theme="getTheme" :list-style="2"></u-ordinary-list>
  27. </view>
  28. </block>
  29. </view>
  30. </app-layout>
  31. </template>
  32. <script>
  33. import { mapGetters, mapState } from "vuex";
  34. import uOrdinaryList from '../../../components/page-component/u-goods-list/u-ordinary-list.vue';
  35. export default {
  36. data() {
  37. return {
  38. goodsList: [],
  39. page: 1,
  40. load: false,
  41. args: false,
  42. }
  43. },
  44. components: {
  45. uOrdinaryList
  46. },
  47. methods: {
  48. getRecommend: function () {
  49. let self = this;
  50. self.$showLoading();
  51. self.$request({
  52. url: self.$api.goods.new_recommend,
  53. data: {
  54. type: 'order_comment',
  55. }
  56. }).then(response => {
  57. self.$hideLoading();
  58. if (response.code === 0) {
  59. const goods_list = response.data.list;
  60. if (goods_list && goods_list.length) {
  61. self.goodsList = goods_list
  62. }
  63. }
  64. }).catch(() => {
  65. self.hideLoading();
  66. });
  67. }
  68. },
  69. onLoad() { this.$commonLoad.onload();
  70. this.getRecommend();
  71. },
  72. computed: {
  73. ...mapGetters('mallConfig', {
  74. getTheme: 'getTheme',
  75. }),
  76. ...mapState({
  77. isListUnderlinePrice: state => state.mallConfig.mall.setting.is_list_underline_price
  78. })
  79. },
  80. }
  81. </script>
  82. <style lang="scss" scoped>
  83. .finish-box {
  84. position: absolute;
  85. width: 100%;
  86. height: 100%;
  87. .top-box {
  88. background: #fff;
  89. .img {
  90. width: 230#{rpx};
  91. height: 180#{rpx};
  92. margin-top: 72#{rpx};
  93. }
  94. .comment {
  95. color: $uni-important-color-black;
  96. margin: 40#{rpx} 0 48#{rpx};
  97. font-weight: 800;
  98. font-size: $uni-font-size-import-two;
  99. }
  100. .btn-box {
  101. margin-bottom: 48#{rpx};
  102. }
  103. .btn {
  104. height: 72#{rpx};
  105. width: 200#{rpx};
  106. border-radius: 36#{rpx};
  107. font-size: 28#{rpx};
  108. border: 1#{rpx} solid $uni-weak-color-one;
  109. margin: 0 34#{rpx};
  110. }
  111. .text-2 {
  112. border: 1#{rpx} solid ;
  113. }
  114. }
  115. }
  116. .finish-box .like-box {
  117. font-size: 24#{rpx};
  118. padding: 48#{rpx} 0 32#{rpx};
  119. color: $uni-general-color-two;
  120. }
  121. .finish-box .like-box .text {
  122. margin: 0 24#{rpx};
  123. }
  124. .finish-box .like-box view {
  125. color: $uni-general-color-two;
  126. }
  127. .recommend {
  128. margin-top: 24#{rpx};
  129. background-color: #F7F7F7;
  130. .recommend-title {
  131. margin: #{40rpx} 0 #{32rpx} 0;
  132. font-size: $uni-font-size-weak-one;
  133. color: $uni-general-color-two;
  134. padding-top: 20#{rpx};
  135. .border {
  136. border-top: #{1rpx} solid #bbbbbb;
  137. height: 0;
  138. width: #{40rpx};
  139. margin: 0 #{24rpx};
  140. }
  141. image {
  142. width: #{24rpx};
  143. height: #{24rpx};
  144. display: block;
  145. margin-right: #{12rpx};
  146. }
  147. }
  148. }
  149. </style>