service.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <template>
  2. <view>
  3. <navbar v-model="screenHeight" title-color="#ffffff" background="#1b43c4" :iSimmersive="false" :placeholder="true" title="售后列表"></navbar>
  4. <mescroll-body
  5. ref="mescrollRef"
  6. @init="mescrollInit"
  7. @down="downCallback"
  8. @up="upCallback"
  9. :height="screenHeight+'px'"
  10. >
  11. <view class="list-wrap">
  12. <view class="list-box">
  13. <view class="list-item-box" v-for="(item,index) in result" :key="index">
  14. <view class="top">
  15. <text class="order-type">{{item.type}}</text>
  16. <text class="time">{{item.create_time}}</text>
  17. <text class="satus">{{item.order_status}}</text>
  18. </view>
  19. <view class="goods-box" @click="$utils.navigateTo('order/detail',{ id: item.order_id })">
  20. <view class="goods-item clear" v-for="(value,j) in item.item" :key="j">
  21. <view class="goods-img">
  22. <image :src="value.thumb_image">
  23. </view>
  24. <view class="goods-info">
  25. <view class="t">
  26. <text>{{value.title}}</text>
  27. <text>¥{{value.price}}</text>
  28. </view>
  29. <view class="b">
  30. <text>{{value.spec}}</text>
  31. <text>× {{value.nums}}</text>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="order" :class="{addBorder:item.active==6}">
  37. <view class="total">
  38. 共{{item.item.length}}件商品,总金额
  39. <view>¥<text>{{item.order_amount}}</text></view>
  40. </view>
  41. </view>
  42. <view class="botttom" v-if="item.active!=6">
  43. <text class="pay" @click="$utils.navigateTo('order/detail',{ id: item.order_id })">订单详情</text>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </mescroll-body>
  49. </view>
  50. </template>
  51. <script>
  52. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  53. import navbar from "@/components/navbar/navbar";
  54. export default {
  55. mixins: [MescrollMixin],
  56. components: {
  57. navbar
  58. },
  59. data() {
  60. return {
  61. screenHeight: 0,
  62. result: []
  63. };
  64. },
  65. onLoad(options){
  66. },
  67. methods: {
  68. downCallback(){
  69. this.$utils.showLoading();
  70. setTimeout(()=>{
  71. this.mescroll.resetUpScroll();
  72. },1200);
  73. },
  74. triggerDownScroll(){
  75. this.mescroll.triggerDownScroll();
  76. },
  77. upCallback(page) {
  78. this.$utils.hideLoading();
  79. this.$http.getOrderService({
  80. page: page.num
  81. }).then((result)=>{
  82. this.mescroll.endByPage(result.data.list.length, result.data.total);
  83. if(result.status==1){
  84. if(page.num == 1) this.result = [];
  85. this.result = this.result.concat(result.data.list);
  86. }else if(result.status == -1){
  87. this.mescroll.endErr();
  88. }
  89. }).catch(error=>{
  90. this.mescroll.endErr();
  91. });
  92. }
  93. }
  94. }
  95. </script>
  96. <style lang="scss" scoped>
  97. .list-wrap{
  98. margin-top: 20rpx;
  99. }
  100. .list-box{
  101. display: flex;
  102. flex-direction: column;
  103. flex-wrap: wrap;
  104. .list-item-box {
  105. width: 95%;
  106. margin: 20rpx 2.5%;
  107. background-color: #fff;
  108. border-radius: 12rpx;
  109. .top{
  110. height: 90rpx;
  111. line-height: 90rpx;
  112. font-size: 30rpx;
  113. border-bottom: 2rpx solid #eee;
  114. .order-type{
  115. font-size: 28rpx;
  116. margin-right: 10rpx;
  117. color: #666;
  118. }
  119. text:first-child{
  120. float: left;
  121. padding-left: 20rpx;
  122. }
  123. text:last-child{
  124. font-size: 28rpx;
  125. float: right;
  126. padding-right: 20rpx;
  127. }
  128. }
  129. .goods-box{
  130. padding: 0 20rpx;
  131. .goods-item {
  132. padding-top: 20rpx;
  133. .goods-img {
  134. width: 154rpx;
  135. height: 154rpx;
  136. display: inline-block;
  137. float: left;
  138. image{
  139. width: 100%;
  140. height: 100%;
  141. }
  142. }
  143. .goods-info {
  144. display: inline-block;
  145. width: 72%;
  146. font-size: 28rpx;
  147. float: right;
  148. .t {
  149. width: 100%;
  150. height: 90rpx;
  151. text:first-child{
  152. float: left;
  153. display: -webkit-box;overflow: hidden;-webkit-line-clamp: 2;
  154. -webkit-box-orient: vertical;
  155. width: 70%;
  156. }
  157. text:last-child{
  158. width: 30%;
  159. float: right;
  160. text-align: right;
  161. }
  162. }
  163. .b{
  164. width: 100%;
  165. height: 80rpx;
  166. font-size: 26rpx;
  167. text:first-child{
  168. float: left;
  169. color: #999;
  170. }
  171. text:last-child{
  172. float: right;
  173. color: #666;
  174. }
  175. }
  176. }
  177. }
  178. }
  179. .order{
  180. width: 100%;
  181. height: 90rpx;
  182. line-height: 90rpx;
  183. border-bottom: 2rpx solid #eee;
  184. .total {
  185. height: 90rpx;
  186. line-height: 90rpx;
  187. text-align: right;
  188. font-size: 28rpx;
  189. padding-right: 20rpx;
  190. view {
  191. display: inline-block;
  192. color: red;
  193. text{
  194. font-style: normal;
  195. font-size: 32rpx;
  196. }
  197. }
  198. }
  199. }
  200. .botttom{
  201. width: 100%;
  202. height: 110rpx;
  203. line-height: 110rpx;
  204. text-align: right;
  205. text{
  206. font-size: 28rpx;
  207. text-align: center;
  208. border-radius: 30rpx;
  209. background-color: #fff;
  210. padding: 16rpx 30rpx;
  211. margin-right: 20rpx;
  212. }
  213. text.cancel{
  214. color: #333;
  215. border: 2rpx solid #ddd;
  216. }
  217. text.pay {
  218. background-color: #e93323;
  219. color: #fff;
  220. }
  221. }
  222. }
  223. }
  224. </style>