index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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 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. <app-goods-list :list="goodsList"></app-goods-list>
  27. </view>
  28. </block>
  29. </view>
  30. </app-layout>
  31. </template>
  32. <script>
  33. import appGoodsList from "../../../components/page-component/app-goods-list/app-goods-list.vue";
  34. export default {
  35. data() {
  36. return {
  37. goodsList: [],
  38. page: 1,
  39. load: false,
  40. args: false,
  41. }
  42. },
  43. components: {
  44. 'app-goods-list': appGoodsList,
  45. },
  46. methods: {
  47. getRecommend: function () {
  48. let self = this;
  49. self.$showLoading();
  50. self.$request({
  51. url: self.$api.goods.new_recommend,
  52. data: {
  53. type: 'order_comment',
  54. }
  55. }).then(response => {
  56. self.$hideLoading();
  57. if (response.code === 0) {
  58. const goods_list = response.data.list;
  59. if (goods_list && goods_list.length) {
  60. self.goodsList = goods_list
  61. }
  62. }
  63. }).catch(() => {
  64. self.hideLoading();
  65. });
  66. }
  67. },
  68. onLoad() {
  69. this.getRecommend();
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. .finish-box {
  75. position: absolute;
  76. width: 100%;
  77. height: 100%;
  78. .top-box {
  79. background: #fff;
  80. .img {
  81. width: 230#{rpx};
  82. height: 180#{rpx};
  83. margin-top: 72#{rpx};
  84. }
  85. .comment {
  86. color: $uni-important-color-black;
  87. margin: 40#{rpx} 0 48#{rpx};
  88. font-weight: 800;
  89. font-size: $uni-font-size-import-two;
  90. }
  91. .btn-box {
  92. margin-bottom: 48#{rpx};
  93. }
  94. .btn {
  95. height: 72#{rpx};
  96. width: 200#{rpx};
  97. border-radius: 36#{rpx};
  98. font-size: 28#{rpx};
  99. border: 1#{rpx} solid $uni-weak-color-one;
  100. margin: 0 34#{rpx};
  101. }
  102. .text-2 {
  103. border: 1#{rpx} solid $uni-important-color-red;
  104. color: $uni-important-color-red;
  105. }
  106. }
  107. }
  108. .finish-box .like-box {
  109. font-size: 24#{rpx};
  110. padding: 48#{rpx} 0 32#{rpx};
  111. color: $uni-general-color-two;
  112. }
  113. .finish-box .like-box .text {
  114. margin: 0 24#{rpx};
  115. }
  116. .finish-box .like-box view {
  117. color: $uni-general-color-two;
  118. }
  119. .recommend {
  120. margin-top: 24#{rpx};
  121. background-color: #F7F7F7;
  122. .recommend-title {
  123. margin: #{40rpx} 0 #{32rpx} 0;
  124. font-size: $uni-font-size-weak-one;
  125. color: $uni-general-color-two;
  126. padding-top: 20#{rpx};
  127. .border {
  128. border-top: #{1rpx} solid #bbbbbb;
  129. height: 0;
  130. width: #{40rpx};
  131. margin: 0 #{24rpx};
  132. }
  133. image {
  134. width: #{24rpx};
  135. height: #{24rpx};
  136. display: block;
  137. margin-right: #{12rpx};
  138. }
  139. }
  140. }
  141. </style>