paySuccess.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <view class="common-page">
  3. <view class="header-box" :style="{
  4. paddingBottom: '30rpx',
  5. backgroundColor: '#F8F9FA'
  6. }" id="headerBox" ref="headerBox">
  7. <view class="navbar-box display-flex-content-center" :style="{
  8. height: `${topData.height}px`,
  9. paddingTop: `${topData.top}px`,
  10. paddingBottom: '40rpx',
  11. color: '#666666',
  12. fontSize: '34rpx',
  13. fontWeight: 'bold'
  14. }">
  15. <view @click="toHome" style="position: absolute;left:30rpx">
  16. <u-icon size="20" name="arrow-left" color="#666666"></u-icon>
  17. </view>
  18. <text></text>
  19. </view>
  20. <view class="success-con fs16">
  21. <view class="display-flex-content-center">
  22. <u-icon size="50rpx" name="checkmark-circle-fill" color="#E2B98E" ></u-icon>
  23. <text class="fw700 ml5 success-title-text">支付成功</text>
  24. </view>
  25. <view class="text-center mtr20 mt5">我们会在48小时内进行发货,请留意物流信息噢~</view>
  26. </view>
  27. </view>
  28. <view class="content-box mt10">
  29. <!-- 订单编号 -->
  30. <view class="common-card">
  31. <view style="margin: 0 auto;display: flex;align-items: center;justify-content: center;" >
  32. <text class="goods-price">¥<text style="font-family: D-DIN-Bold;font-weight: 700; font-size: 40rpx;">{{detailData.payment_amount}}</text></text>
  33. </view>
  34. <u-divider :dashed="true"></u-divider>
  35. <text style="color: #888888">订单编号: </text>
  36. <text style="color: #333333;margin-left: 12rpx"> {{ detailData.order_no}}</text>
  37. <!-- 已选商品 -->
  38. <view class="display-flex-center" style="margin-top: 30rpx" v-for="(item, index) in goodsList" :key="index">
  39. <image style="width: 155rpx; height: 155rpx; border-radius: 10rpx;margin-right: 10rpx;flex-shrink: 0;"
  40. :src="item.goods_cover" mode="aspectFill">
  41. </image>
  42. <view class="ml10">
  43. <view class="display-flex-center mb10">
  44. <text class=" text-overflow-single goods-name" >{{item.goods_name}}</text>
  45. </view>
  46. <view class="display-flex-center mb10">
  47. <text class="color-71 flex-shrink">规格:</text>
  48. <text class=" text-overflow-single">{{item.goods_spec}}</text>
  49. </view>
  50. <view class="display-flex-center">
  51. <text class="color-71 flex-shrink">数量:</text>
  52. <text class=" text-overflow-single">{{item.stock_sales}}</text>
  53. </view>
  54. </view>
  55. </view>
  56. <u-divider :dashed="true"></u-divider>
  57. <view class="display-flex-center" style="justify-content: space-between;">
  58. <text class="color-71 flex-shrink">支付时间:</text>
  59. <text class="fw600 text-overflow-single">{{detailData.payment_datetime}}</text>
  60. </view>
  61. </view>
  62. </view>
  63. <view style="margin-top: 40rpx;width: 100%;display: flex;justify-content: center;align-items: center;">
  64. <view class="btn-to-home" @click="toHome"><span>返回首页</span></view>
  65. <view class="btn-to-order" @click="toOrder"><span>查看订单</span></view>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. export default {
  71. data() {
  72. return {
  73. orderNo: '',
  74. goodsList: [
  75. {}, {}
  76. ],
  77. detailData: {},
  78. topData: {
  79. top: 0,
  80. height: 0
  81. },
  82. }
  83. },
  84. onLoad(options) {
  85. this.orderNo = options.orderNo
  86. // const mData = uni.getStorageSync('selectTaskData') || undefined
  87. },
  88. onShow() {
  89. const topData = uni.getMenuButtonBoundingClientRect()
  90. this.topData.top = topData.top
  91. this.topData.height = topData.height
  92. this.getOrderDetail()
  93. },
  94. methods: {
  95. getOrderDetail() {
  96. this.$api.orderDetail({ order_no: this.orderNo }).then(res => {
  97. this.detailData = res.data
  98. this.goodsList = res.data.items || []
  99. this.truckData = res.data.truck
  100. })
  101. },
  102. toHome() {
  103. uni.switchTab({
  104. url: '/pages/home/index'
  105. })
  106. },
  107. toOrder() {
  108. uni.navigateTo({
  109. url: `/subPages/orderDetail/orderDetail?orderNo=${this.detailData.order_no}`
  110. })
  111. }
  112. }
  113. }
  114. </script>
  115. <style lang="scss" scoped>
  116. .common-page {
  117. height: 100vh;
  118. overflow-y: auto;
  119. // padding: 20rpx;
  120. color: #2C2C2C;
  121. padding-bottom: 188rpx;
  122. box-sizing: border-box;
  123. }
  124. .coupon-list {
  125. padding: 30rpx 20rpx;
  126. background-color: #fff;
  127. border-radius: 20rpx 20rpx 0 0;
  128. }
  129. .goods-name{
  130. font-family: PingFang SC-Bold;
  131. font-weight: 400;
  132. font-size: 28rpx;
  133. color: #333333;
  134. line-height: 40rpx;
  135. text-align: left;
  136. font-style: normal;
  137. text-transform: none;
  138. // 加粗
  139. font-weight: bold;
  140. }
  141. .content-box {
  142. padding: 20rpx;
  143. }
  144. .goods-price{
  145. font-family: D-DIN-Regular;
  146. font-weight: 400;
  147. font-size: 28rpx;
  148. color: #333333;
  149. line-height: 48rpx;
  150. text-align: center;
  151. font-style: normal;
  152. text-transform: none;
  153. }
  154. .navbar-box {
  155. position: relative;
  156. }
  157. .btn-to-home{
  158. width: 300rpx;
  159. height: 88rpx;
  160. background: #FFFFFF;
  161. border-radius: 292rpx 292rpx 292rpx 292rpx;
  162. font-family: PingFang SC, PingFang SC-Medium;
  163. font-weight: 400;
  164. font-size: 32rpx;
  165. color: #333333;
  166. line-height: 36rpx;
  167. text-align: center;
  168. font-style: normal;
  169. text-transform: none;
  170. display: flex;justify-content: center;align-items: center;
  171. }
  172. .btn-to-order{
  173. margin-left:30rpx;
  174. width: 300rpx;
  175. height: 88rpx;
  176. background: #F4EEE8;
  177. border-radius: 292rpx 292rpx 292rpx 292rpx;
  178. font-family: PingFang SC, PingFang SC-Medium;
  179. font-weight: 400;
  180. font-size: 32rpx;
  181. color: #C29556;
  182. line-height: 36rpx;
  183. text-align: center;
  184. font-style: normal;
  185. text-transform: none;
  186. display: flex;justify-content: center;align-items: center;
  187. }
  188. .success-title-text{
  189. font-family: PingFang SC, PingFang SC;
  190. font-weight: 400;
  191. font-size: 40rpx;
  192. color: #333333;
  193. line-height: 50rpx;
  194. text-align: center;
  195. font-style: normal;
  196. text-transform: none;
  197. // 加粗
  198. font-weight: bold;
  199. }
  200. .text-center{
  201. font-family: PingFang SC, PingFang SC;
  202. font-weight: 400;
  203. font-size: 24rpx;
  204. color: #666666;
  205. line-height: 40rpx;
  206. text-align: center;
  207. font-style: normal;
  208. text-transform: none;
  209. }
  210. .good-card {
  211. padding: 38rpx 22rpx;
  212. color: #7A7A7A;
  213. ::v-deep {
  214. .u-textarea {
  215. background: #F6F6F6;
  216. border-radius: 12rpx 12rpx 12rpx 12rpx;
  217. border: none;
  218. padding: 18rpx;
  219. .u-textarea__count {
  220. background-color: transparent !important;
  221. }
  222. }
  223. }
  224. }
  225. .goods-list {
  226. margin: 0 30rpx;
  227. padding: 30rpx 0;
  228. border-bottom: 1rpx solid #F5F5F5;
  229. }
  230. .goods-total {
  231. justify-content: flex-end;
  232. margin: 27rpx 20rpx;
  233. }
  234. </style>