index.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <u-popup :show="popupShow" bgColor="transparent" :safeAreaInsetBottom="false" @close="close">
  3. <view class="popupBox">
  4. <view class="popupBox_title">
  5. <image src="https://guess-shop.oss-cn-beijing.aliyuncs.com/static/online/img6.png" mode="" />
  6. <view>
  7. <view class="popupBox_title_l">下单成功</view>
  8. </view>
  9. </view>
  10. <view class="popupBox_content">
  11. <view>
  12. <view class="popupBox_content_price" v-if="form.orderAmount">
  13. <text>{{form.orderAmount.split('.')[0]}}</text>
  14. .{{form.orderAmount.split('.')[1]}}
  15. </view>
  16. <view class="popupBox_content_status">支付成功</view>
  17. <view class="popupBox_content_point" v-if="form.giftPoints">完成订单核销即可获得{{form.givePointsExpect}}个礼包兑换豆</view>
  18. <view class="popupBox_content_giftCenter" @click="$utils.openPage(banner)" v-if="form.giftPoints">
  19. <image :src="banner.image" mode="" />
  20. </view>
  21. <view class="popupBox_content_btn">
  22. <view class="popupBox_content_btn_l" @click="goBack()">返回景点</view>
  23. <view class="popupBox_content_btn_r" @click="goDetails()">订单详情</view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </u-popup>
  29. </template>
  30. <script>
  31. import { orderInfo, bannerList } from "@/api/home.js"
  32. export default {
  33. data () {
  34. return {
  35. popupShow: false,
  36. form: {},
  37. banner: {}
  38. }
  39. },
  40. mounted () {
  41. this.getBanner()
  42. },
  43. methods: {
  44. close () {
  45. this.popupShow = false
  46. },
  47. open (orderNo) {
  48. this.getOrderInfo(orderNo)
  49. this.popupShow = true
  50. },
  51. goBack () {
  52. uni.navigateBack()
  53. },
  54. goDetails () {
  55. uni.redirectTo({
  56. url: '/pages/order/orderDetails?orderNumber=' + this.form.orderNumber
  57. });
  58. },
  59. getOrderInfo (orderNo) {
  60. orderInfo(orderNo).then(res => {
  61. this.form = res.data
  62. })
  63. },
  64. // 获取广告
  65. getBanner () {
  66. bannerList('order_success_banner').then(res => {
  67. this.banner = res.data && res.data.length > 0 ? res.data[0] : {}
  68. })
  69. },
  70. }
  71. }
  72. </script>
  73. <style lang='scss' scoped>
  74. .popupBox {
  75. position: relative;
  76. .popupBox_title {
  77. width: 100%;
  78. position: absolute;
  79. top: -93rpx;
  80. z-index: 10;
  81. > image {
  82. width: 720rpx;
  83. height: 204rpx;
  84. }
  85. > view {
  86. display: flex;
  87. align-items: center;
  88. padding: 75rpx 0 0 30rpx;
  89. position: absolute;
  90. top: 0;
  91. left: 0;
  92. .popupBox_title_l {
  93. font-size: 48rpx;
  94. color: #ffffff;
  95. font-family: FZCuYuan-M03;
  96. margin-right: 100rpx;
  97. }
  98. }
  99. }
  100. .popupBox_content {
  101. padding: 60rpx 0rpx 0;
  102. background: linear-gradient(180deg, #c90700 0%, #ffe8e6 58%, #ffffff 32%);
  103. border-radius: 40rpx 40rpx 0rpx 0rpx;
  104. background-size: 100% 1900rpx;
  105. background-position-y: -100rpx;
  106. > view {
  107. background: linear-gradient(180deg, #ffedec, #ffffff);
  108. border-radius: 40rpx 40rpx 0rpx 0rpx;
  109. margin-top: 4rpx;
  110. position: relative;
  111. padding-top: 50rpx;
  112. z-index: 10;
  113. .popupBox_content_price {
  114. font-size: 40rpx;
  115. color: #fa353b;
  116. font-family: FZCuYuan-M03;
  117. text-align: center;
  118. text {
  119. font-size: 80rpx;
  120. font-family: FZCuYuan-M03;
  121. }
  122. }
  123. .popupBox_content_status {
  124. font-size: 26rpx;
  125. color: #666666;
  126. text-align: center;
  127. }
  128. .popupBox_content_point {
  129. background: #ffe3e2;
  130. border-radius: 29rpx;
  131. width: 533rpx;
  132. height: 58rpx;
  133. text-align: center;
  134. line-height: 60rpx;
  135. margin: 40rpx auto 0;
  136. font-size: 26rpx;
  137. color: #ff0008;
  138. }
  139. .popupBox_content_giftCenter {
  140. text-align: center;
  141. margin: 60rpx 0 50rpx;
  142. image {
  143. width: 690rpx;
  144. height: 148rpx;
  145. }
  146. }
  147. .popupBox_content_btn {
  148. padding: 4rpx 30rpx 60rpx;
  149. display: flex;
  150. justify-content: space-between;
  151. .popupBox_content_btn_l {
  152. width: 331rpx;
  153. height: 80rpx;
  154. border-radius: 40rpx;
  155. font-size: 32rpx;
  156. text-align: center;
  157. line-height: 80rpx;
  158. color: #fb0b03;
  159. border: 1rpx solid #fb0b03;
  160. }
  161. .popupBox_content_btn_r {
  162. width: 331rpx;
  163. height: 80rpx;
  164. border-radius: 41px;
  165. font-size: 32rpx;
  166. background: #fb0b03;
  167. color: #ffffff;
  168. text-align: center;
  169. line-height: 80rpx;
  170. }
  171. }
  172. }
  173. }
  174. }
  175. </style>