index.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <template>
  2. <view class="orderVerifica">
  3. <capsule :showBorder="true">
  4. <template v-slot:top>
  5. <view class="shop-top">
  6. <view class="back-icon" @click="backClick">
  7. <tui-icon name="arrowleft" :size="36" color="#000"></tui-icon>
  8. </view>
  9. <view class="shop-name">订单核销</view>
  10. </view>
  11. </template>
  12. </capsule>
  13. <view class="order-number">订单编号:139529738377368</view>
  14. <view class="verifica-container">
  15. <view class="verifica-info">
  16. <view class="info-state">订单状态:(待核销已付款)</view>
  17. <view class="info-state">商户:麦乐鸡烤肉店 </view>
  18. <view class="info-price">
  19. <view class="all-price">
  20. 商品总价:¥<text>199.99</text>
  21. </view>
  22. <view class="all-price">
  23. 实付款:¥<text>198.99</text>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="verifica-product">
  28. <view class="verifica-time">
  29. <text>创建时间</text>
  30. <text>2024-06-01 11:29:42</text>
  31. </view>
  32. <view class="commodity-list">
  33. <view class="commodity-item">
  34. <view class="item-left">
  35. <view class="left-image">
  36. <image
  37. src="https://img2.baidu.com/it/u=1700149007,2105278410&fm=253&fmt=auto&app=138&f=JPEG?w=400&h=400" />
  38. </view>
  39. <view class="left-text">
  40. <view class="text-title">嘿嘿嘿</view>
  41. <!-- <template v-if="item2.productName == '扫码付款商品'">
  42. <view class="text-price">扫码付款商品</view>
  43. </template> -->
  44. <template>
  45. <view class="text-price">小份</view>
  46. <view class="text-price">x1</view>
  47. </template>
  48. </view>
  49. </view>
  50. <view class="item-right">¥99.00</view>
  51. </view>
  52. </view>
  53. <view class="gifts">
  54. <view class="gifs-left">赠送代金券</view>
  55. <view class="gifs-right">¥1 x 1</view>
  56. </view>
  57. <view class="verifica-code">
  58. <text>核销码</text>
  59. <text>4561-JFHXDKHGM8</text>
  60. </view>
  61. </view>
  62. <view class="verifica-btn">
  63. <view class="btn">确认核销</view>
  64. </view>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. import { orderGetById } from '@/config/index.js'
  70. export default {
  71. onLoad(props){
  72. console.log(props);
  73. this.orderId = props.orderId
  74. this.getOrderDetail()
  75. },
  76. data() {
  77. return {
  78. // 订单详情
  79. orderDetail:{},
  80. orderId:null
  81. }
  82. },
  83. methods: {
  84. // 获取订单详情
  85. async getOrderDetail(){
  86. try {
  87. let res = await orderGetById({orderId:this.orderId})
  88. console.log(res);
  89. } catch (error) {
  90. }
  91. },
  92. backClick() {
  93. uni.navigateBack()
  94. }
  95. },
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. .orderVerifica {
  100. .shop-top {
  101. width: 100%;
  102. height: 100%;
  103. position: relative;
  104. z-index: 999;
  105. @include flex(center);
  106. .back-icon {
  107. position: absolute;
  108. left: 0;
  109. top: 50%;
  110. transform: translateY(-50%);
  111. }
  112. .shop-name {
  113. color: #000;
  114. }
  115. }
  116. .order-number {
  117. margin: 32rpx 0;
  118. color: #999999;
  119. font-size: 28rpx;
  120. padding-left: 32rpx;
  121. }
  122. .verifica-container {
  123. padding: 0 60rpx;
  124. .verifica-info {
  125. display: flex;
  126. flex-direction: column;
  127. gap: 12rpx;
  128. color: #3D3D3D;
  129. font-size: 28rpx;
  130. font-weight: 600;
  131. padding-bottom: 20rpx;
  132. border-bottom: 2rpx solid #D8D8D8;
  133. text {
  134. color: #EA1717;
  135. }
  136. .info-price {
  137. @include flex(space-between);
  138. }
  139. }
  140. .verifica-product {
  141. padding: 12rpx 0 20rpx;
  142. border-bottom: 2rpx solid #D8D8D8;
  143. .verifica-time {
  144. @include flex(space-between);
  145. color: #999999;
  146. font-size: 24rpx;
  147. }
  148. .commodity-list {
  149. width: 100%;
  150. display: flex;
  151. justify-content: center;
  152. gap: 12rpx;
  153. flex-direction: column;
  154. margin: 20rpx 0 36rpx;
  155. .commodity-item {
  156. display: flex;
  157. justify-content: space-between;
  158. .item-left {
  159. display: flex;
  160. gap: 12rpx;
  161. .left-image {
  162. width: 124rpx;
  163. height: 124rpx;
  164. image {
  165. width: 100%;
  166. height: 100%;
  167. border-radius: 12rpx;
  168. }
  169. }
  170. .left-text {
  171. display: flex;
  172. flex-direction: column;
  173. gap: 6rpx;
  174. .text-title {
  175. color: #333333;
  176. font-size: 28rpx;
  177. }
  178. .text-price {
  179. font-size: 24rpx;
  180. color: #999999;
  181. }
  182. }
  183. }
  184. .item-right {
  185. color: #333333;
  186. font-size: 28rpx;
  187. }
  188. }
  189. }
  190. .gifts {
  191. @include flex(space-between);
  192. font-size: 28rpx;
  193. color: #333333;
  194. .gifs-right {
  195. color: #ea1717;
  196. }
  197. }
  198. .verifica-code {
  199. color: #3D3D3D;
  200. font-size: 28rpx;
  201. @include flex(space-between);
  202. margin-top: 32rpx;
  203. }
  204. }
  205. .verifica-btn{
  206. padding-top: 72rpx;
  207. display: flex;
  208. justify-content: flex-end;
  209. .btn{
  210. width: 246rpx;
  211. height: 88rpx;
  212. text-align: center;
  213. line-height: 88rpx;
  214. color: #FFFFFF;
  215. font-size: 28rpx;
  216. border-radius: 50rpx;
  217. background: linear-gradient(180deg, #FE4B1E 0%, #FB8857 100%);
  218. }
  219. }
  220. }
  221. }
  222. </style>