success.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. <!-- 支付成功 -->
  2. <template>
  3. <view class="success" :style="{ background: 'url(' + bgImg + ') #F4F5F9' }">
  4. <view class="success_status">
  5. <view class="status flex aic">
  6. <image class="pay_img" :src="payImg"></image>
  7. <view class="status_text">支付成功</view>
  8. </view>
  9. <view class="status_tip">套餐购买成功 请查看账单明细</view>
  10. </view>
  11. <view class="success_content">
  12. <view class="success_info">
  13. <view class="">
  14. <view class="success_item flex jcsb aic">
  15. <view class="flex aic">
  16. <view class="label">收件地址</view>
  17. <text class="bold">{{ orderInfo.email }}</text>
  18. </view>
  19. <!-- <view class="success_btn" @click="copyText()">复制</view>-->
  20. </view>
  21. <view class="success_item flex aic">
  22. <view class="label">收件人</view>
  23. <text>{{ orderInfo.recipientName }}({{orderInfo.email}})</text>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="line" :style="{ background: `url(${successImg}) no-repeat` }">
  28. <view class="line-circle"></view>
  29. </view>
  30. <view class="detail">
  31. <view class="detail_item flex aic jcsb">
  32. <text>订单金额</text>
  33. <view class="datas flex">
  34. <text>{{orderInfo.totalAmount}}元</text>
  35. </view>
  36. </view>
  37. <view class="detail_item flex aic jcsb">
  38. <text>套餐名称</text>
  39. <view class="datas flex">
  40. <text>{{ orderInfo.packageName }}</text>
  41. <view class="copy">详情</view>
  42. </view>
  43. </view>
  44. <view class="detail_item flex aic jcsb">
  45. <text>套餐内容</text>
  46. <view class="datas flex">
  47. <text>{{orderInfo.quantity}}条 (每条15-20s)</text>
  48. </view>
  49. </view>
  50. <view class="detail_item flex aic jcsb">
  51. <text>支付方式</text>
  52. <view class="datas flex">
  53. <text>微信支付</text>
  54. </view>
  55. </view>
  56. <view class="detail_item flex aic jcsb">
  57. <text>订单编号</text>
  58. <view class="datas flex">
  59. <text>{{ orderInfo.orderNumber }}</text>
  60. <view class="copy" @click="copyText()">复制</view>
  61. </view>
  62. </view>
  63. <view class="detail_item flex aic jcsb">
  64. <text>订单时间</text>
  65. <view class="datas flex">
  66. <text>{{orderInfo.createDate}}</text>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="btns">
  72. <view class="bind" @click="bindCard">查看详情</view>
  73. <view class="back" @click="goHome">返回首页</view>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. import {copy} from "@/utils/utils";
  79. import {getOrderDetail} from "../../apis/order";
  80. import {goHome} from "../../utils/utils";
  81. export default {
  82. components: {},
  83. data() {
  84. return {
  85. orderId: '',
  86. orderInfo: {
  87. packageName:"",
  88. createDate:"",
  89. orderNumber:'',
  90. shootingRequirements:'',
  91. email:'',
  92. },
  93. bgImg: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/bg_top%403x.png",
  94. payImg: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_paysuccess.png",
  95. successImg: 'https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/img_quekou.png'
  96. };
  97. },
  98. onLoad(options) {
  99. if (options.orderId) this.orderId = options.orderId
  100. this.getData()
  101. },
  102. computed: {
  103. },
  104. watch: {},
  105. methods: {
  106. getData() {
  107. getOrderDetail({orderId: this.orderId}).then(res => {
  108. this.orderInfo = res
  109. })
  110. },
  111. goHome(){
  112. goHome()
  113. },
  114. // 复制
  115. copyText(num) {
  116. copy(num)
  117. }
  118. },
  119. created() {
  120. },
  121. mounted() {
  122. },
  123. }
  124. </script>
  125. <style lang='scss' scoped>
  126. .success {
  127. width: 100%;
  128. position: absolute;
  129. top: 0;
  130. bottom: 0;
  131. display: flex;
  132. flex-direction: column;
  133. background-size: contain !important;
  134. background-repeat: no-repeat !important;
  135. background-position: top;
  136. padding: 0 24rpx;
  137. .success_status {
  138. margin-top: 64rpx;
  139. display: flex;
  140. flex-direction: column;
  141. align-items: center;
  142. .pay_img {
  143. width: 48rpx;
  144. height: 48rpx;
  145. margin-left: 16rpx;
  146. }
  147. .status_text {
  148. font-weight: 500;
  149. font-size: 40rpx;
  150. color: #0D121A;
  151. }
  152. .status_tip {
  153. font-weight: 400;
  154. font-size: 28rpx;
  155. color: #9EA3B1;
  156. margin-top: 20rpx;
  157. }
  158. }
  159. .success_content {
  160. border-radius: 32rpx;
  161. overflow: hidden;
  162. margin-top: 64rpx;
  163. .success_info {
  164. background-color: #fff;
  165. padding: 36rpx 32rpx 8rpx;
  166. .success_item {
  167. margin-bottom: 20rpx;
  168. .label {
  169. min-width: 120rpx;
  170. font-weight: 400;
  171. font-size: 28rpx;
  172. color: #9EA3B1;
  173. margin-right: 16rpx;
  174. }
  175. text {
  176. font-size: 32rpx;
  177. color: #0D121A;
  178. }
  179. }
  180. }
  181. .success_btn {
  182. width: 80rpx;
  183. height: 40rpx;
  184. font-weight: 500;
  185. background: #F4F5F9;
  186. border-radius: 48rpx;
  187. font-size: 24rpx;
  188. color: #0D121A;
  189. text-align: center;
  190. line-height: 40rpx;
  191. }
  192. .line {
  193. width: 100%;
  194. height: 40rpx;
  195. background-size: cover !important;
  196. padding: 0 32rpx;
  197. display: flex;
  198. justify-content: center;
  199. align-items: center;
  200. .line-circle {
  201. width: 100%;
  202. border: 2rpx dashed #EDEDED;
  203. height: 2rpx;
  204. }
  205. }
  206. .detail {
  207. background-color: #fff;
  208. padding: 32rpx 32rpx 40rpx;
  209. .detail_item {
  210. margin-bottom: 36rpx;
  211. text {
  212. white-space: nowrap;
  213. font-weight: 400;
  214. font-size: 28rpx;
  215. color: #0D121A;
  216. }
  217. .datas {
  218. .copy {
  219. width: 80rpx;
  220. height: 40rpx;
  221. background: #F4F5F9;
  222. border-radius: 48rpx;
  223. font-weight: 500;
  224. font-size: 24rpx;
  225. color: #061714;
  226. text-align: center;
  227. line-height: 40rpx;
  228. margin-left: 16rpx;
  229. }
  230. }
  231. }
  232. .detail_item:nth-last-child(1) {
  233. margin-bottom: 0;
  234. }
  235. }
  236. .success_title {
  237. color: #9DA3A2;
  238. }
  239. }
  240. .btns {
  241. padding: 96rpx 32rpx;
  242. view {
  243. width: 100%;
  244. height: 84rpx;
  245. // border-radius: 48rpx;
  246. display: flex;
  247. justify-content: center;
  248. align-items: center;
  249. font-size: 32rpx;
  250. }
  251. .bind {
  252. color: #061714;
  253. margin-bottom: 32rpx;
  254. font-weight: 500rpx;
  255. background: linear-gradient(140deg, #246AF1 0%, #2F98EF 100%);
  256. }
  257. .back {
  258. font-weight: bold;
  259. background: #FFFFFF;
  260. // border: 4rpx solid #E7EAEA;
  261. color: #061714;
  262. }
  263. }
  264. .ml16 {
  265. margin-left: 16rpx;
  266. }
  267. }
  268. </style>