success.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <template>
  2. <view class="content">
  3. <view class="inner">
  4. <view class="top">
  5. <text class="title">支付成功</text>
  6. <image class="icon" src="../../static/images/success.png" ></image>
  7. <view class="btn-box">
  8. <view class="btn cancel" @click="goOrderDetails(order.id)"> 查看订单</view>
  9. </view>
  10. </view>
  11. <!-- 订单详情查看 -->
  12. <view class="order-info">
  13. <view class="title">订单信息</view>
  14. <view class="item">
  15. <text class="label">订单编号</text>
  16. <view class="sn-box">
  17. <text class="text">{{order.orderCode}}</text>
  18. <view class="copy-btn" @click="copyOrderSn(order.orderCode)">复制</view>
  19. </view>
  20. </view>
  21. <view class="item">
  22. <text class="label">下单时间</text>
  23. <text class="text">{{order.createTime}}</text>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. order:null,
  34. }
  35. },
  36. onLoad(option) {
  37. this.order=JSON.parse(option.order)
  38. },
  39. methods: {
  40. copyOrderSn(text) {
  41. // 复制方法
  42. uni.setClipboardData({
  43. data:text,
  44. success:()=>{
  45. uni.showToast({
  46. title:'内容已成功复制到剪切板',
  47. icon:'none'
  48. })
  49. }
  50. });
  51. },
  52. goOrderDetails(id){
  53. uni.redirectTo({
  54. url: "/pages_user/user/storeOrderDetail?id="+id
  55. })
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. page{
  62. height: 100%;
  63. }
  64. .content{
  65. height: 100%;
  66. display: flex;
  67. flex-direction: column;
  68. justify-content: space-between;
  69. .inner{
  70. padding: 20upx;
  71. .top{
  72. box-sizing: border-box;
  73. background: #FFFFFF;
  74. border-radius: 16upx;
  75. display: flex;
  76. flex-direction: column;
  77. align-items: center;
  78. padding: 50upx 0upx;
  79. .title{
  80. font-size: 40upx;
  81. font-family: PingFang SC;
  82. font-weight: 500;
  83. color: #222222;
  84. line-height: 1;
  85. text-align: center;
  86. }
  87. .icon{
  88. margin: 60upx 0upx;
  89. width: 100upx;
  90. height: 100upx;
  91. }
  92. }
  93. .order-info{
  94. margin-top: 20upx;
  95. background: #FFFFFF;
  96. border-radius: 16upx;
  97. padding: 40upx 30upx;
  98. .title{
  99. font-size: 30upx;
  100. font-family: PingFang SC;
  101. font-weight: bold;
  102. color: #222222;
  103. line-height: 1;
  104. }
  105. .item{
  106. margin-top: 40upx;
  107. display: flex;
  108. align-items: center;
  109. justify-content: space-between;
  110. .label{
  111. font-size: 26upx;
  112. font-family: PingFang SC;
  113. font-weight: 500;
  114. color: #666666;
  115. line-height: 1;
  116. }
  117. .text{
  118. font-size: 26upx;
  119. font-family: PingFang SC;
  120. font-weight: 500;
  121. color: #222222;
  122. line-height: 32upx;
  123. }
  124. .cont-text{
  125. font-size: 26upx;
  126. font-family: PingFang SC;
  127. font-weight: 500;
  128. color: #666666;
  129. .bold{
  130. color: #111111;
  131. }
  132. }
  133. .sn-box{
  134. display: flex;
  135. align-items: center;
  136. .copy-btn{
  137. width: 58upx;
  138. height: 32upx;
  139. line-height: 32upx;
  140. text-align: center;
  141. font-size: 22upx;
  142. font-family: PingFang SC;
  143. font-weight: 500;
  144. color: #222222;
  145. background: #F5F5F5;
  146. border-radius: 4upx;
  147. margin-left: 24upx;
  148. }
  149. }
  150. }
  151. .line{
  152. width: 100%;
  153. height: 1px;
  154. background: #F0F0F0;
  155. margin-top: 30upx;
  156. }
  157. }
  158. }
  159. .btn-box{
  160. margin-top: 20upx;
  161. box-sizing: border-box;
  162. display: flex;
  163. align-items: center;
  164. .btn{
  165. width: 155upx;
  166. height: 64upx;
  167. line-height: 64upx;
  168. font-size: 26upx;
  169. font-family: PingFang SC;
  170. font-weight: 500;
  171. text-align: center;
  172. border-radius: 32upx;
  173. &.cancel{
  174. border: 1px solid #DDDDDD;
  175. color: #666666;
  176. }
  177. }
  178. }
  179. }
  180. </style>