珠宝小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

232 lines
4.4 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. <template>
  2. <view class="page">
  3. <!-- 导航栏 -->
  4. <navbar title="订单中心" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
  5. <!-- 订单筛选 -->
  6. <view class="tabs">
  7. <uv-tabs :list="tabs" :activeStyle="{color : '#fff', fontWeight : 600}" lineColor="#fff"
  8. :inactiveStyle="{color: 'rgba(255,255,255,.8)'}" lineHeight="8rpx" lineWidth="50rpx" :current="current"
  9. :scrollable="false" @click="clickTabs"></uv-tabs>
  10. </view>
  11. <view class="list">
  12. <view class="item" v-for="(item, index) in list" @click="toOrderDetail(item.id)" :key="index">
  13. <view class="top">
  14. <view class="service">
  15. <!-- <text>{{item.projectId_dictText}}</text>
  16. <text>{{item.type_dictText}}</text> -->
  17. </view>
  18. <view class="status">
  19. <text> {{ tabs[Number(item.state) + 1].name }}</text>
  20. </view>
  21. </view>
  22. <view class="content" :key="index" v-for="(good, index) in item.commonOrderSkuList">
  23. <view class="left">
  24. <image mode="aspectFill" :src="good.image && good.image.split(',')[0]"></image>
  25. </view>
  26. <view class="right">
  27. <view class="text-hidden-1">
  28. 商品{{good.title}}
  29. </view>
  30. <view class="text-hidden-1">
  31. 规格{{good.sku}}
  32. </view>
  33. <view class="text-hidden-1">
  34. 数量{{good.num}}
  35. </view>
  36. <!-- <view class="text-hidden-1">
  37. 总计时间{{item.useTime}}分钟
  38. </view> -->
  39. </view>
  40. </view>
  41. <view class="bottom">
  42. <view class="price">
  43. 实付款<text class="num">{{item.price}}</text>
  44. </view>
  45. <!-- <view class="b1">
  46. 查看物流
  47. </view> -->
  48. <view @click.stop="toPayOrder(item)" class="b2" v-if="item.state == 0">
  49. 立即付款
  50. </view>
  51. <view class="b2" @click.stop="confirmOrder(item)" v-if="item.state == 2">
  52. 确认收货
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <tabber select="order" />
  58. </view>
  59. </template>
  60. <script>
  61. import {
  62. mapGetters
  63. } from 'vuex'
  64. import mixinsList from '@/mixins/list.js'
  65. import mixinsOrder from '@/mixins/order.js'
  66. import tabber from '@/components/base/tabbar.vue'
  67. export default {
  68. mixins: [mixinsList, mixinsOrder],
  69. components: {
  70. tabber,
  71. },
  72. computed: {},
  73. data() {
  74. return {
  75. tabs: [{
  76. name: '全部'
  77. },
  78. {
  79. name: '待付款'
  80. },
  81. {
  82. name: '待发货'
  83. },
  84. {
  85. name: '待收货'
  86. },
  87. {
  88. name: '已完成'
  89. }
  90. ],
  91. current: 0,
  92. mixinsListApi: 'getOrderPageList',
  93. }
  94. },
  95. onLoad(args) {
  96. this.current = args.type || 0
  97. this.clickTabs({
  98. index: this.current
  99. })
  100. },
  101. onShow() {},
  102. methods: {
  103. //点击tab栏
  104. clickTabs({
  105. index
  106. }) {
  107. console.log(index);
  108. if (index == 0) {
  109. delete this.queryParams.state
  110. } else {
  111. this.queryParams.state = index - 1
  112. }
  113. this.getData()
  114. },
  115. //跳转订单详情页面
  116. toOrderDetail(id) {
  117. uni.navigateTo({
  118. url: '/pages_order/order/orderDetail?id=' + id
  119. })
  120. },
  121. }
  122. }
  123. </script>
  124. <style scoped lang="scss">
  125. .page {}
  126. .tabs {
  127. background: $uni-color;
  128. }
  129. .list {
  130. .item {
  131. width: calc(100% - 40rpx);
  132. background-color: #fff;
  133. margin: 20rpx;
  134. box-sizing: border-box;
  135. border-radius: 16rpx;
  136. padding: 30rpx;
  137. .top {
  138. display: flex;
  139. justify-content: space-between;
  140. align-items: center;
  141. font-size: 30rpx;
  142. .service {}
  143. .status {
  144. font-size: 26rpx;
  145. font-weight: 600;
  146. }
  147. }
  148. .content {
  149. display: flex;
  150. margin: 10rpx 0;
  151. .left {
  152. width: 150rpx;
  153. height: 150rpx;
  154. border-radius: 10rpx;
  155. image {
  156. width: 150rpx;
  157. height: 150rpx;
  158. border-radius: 10rpx;
  159. }
  160. }
  161. .right {
  162. width: calc(100% - 160rpx);
  163. color: #777;
  164. font-size: 24rpx;
  165. padding-left: 20rpx;
  166. line-height: 40rpx;
  167. background-color: #F8F8F8;
  168. }
  169. }
  170. .bottom {
  171. display: flex;
  172. justify-content: space-between;
  173. font-size: 25rpx;
  174. .price {
  175. font-weight: 900;
  176. text {
  177. color: #ff780099;
  178. font-size: 30rpx;
  179. }
  180. }
  181. .b1 {
  182. border: 1px solid #777;
  183. color: #777;
  184. box-sizing: border-box;
  185. }
  186. .b2 {
  187. background: $uni-color;
  188. color: #fff;
  189. display: flex;
  190. align-items: center;
  191. justify-content: center;
  192. }
  193. view {
  194. margin: 12rpx;
  195. border-radius: 28rpx;
  196. padding: 16rpx 48rpx;
  197. margin-bottom: 0;
  198. }
  199. }
  200. }
  201. }
  202. </style>