success.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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. uni.$emit('refreshOrder');
  39. },
  40. methods: {
  41. copyOrderSn(text) {
  42. // 复制方法
  43. uni.setClipboardData({
  44. data:text,
  45. success:()=>{
  46. uni.showToast({
  47. title:'内容已成功复制到剪切板',
  48. icon:'none'
  49. })
  50. }
  51. });
  52. },
  53. goOrderDetails(id){
  54. uni.redirectTo({
  55. url: "/pages_user/user/storeOrderDetail?id="+id
  56. })
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss">
  62. page{
  63. height: 100%;
  64. }
  65. .content{
  66. height: 100%;
  67. display: flex;
  68. flex-direction: column;
  69. justify-content: space-between;
  70. .inner{
  71. padding: 20upx;
  72. .top{
  73. box-sizing: border-box;
  74. background: #FFFFFF;
  75. border-radius: 16upx;
  76. display: flex;
  77. flex-direction: column;
  78. align-items: center;
  79. padding: 50upx 0upx;
  80. .title{
  81. font-size: 40upx;
  82. font-family: PingFang SC;
  83. font-weight: 500;
  84. color: #222222;
  85. line-height: 1;
  86. text-align: center;
  87. }
  88. .icon{
  89. margin: 60upx 0upx;
  90. width: 100upx;
  91. height: 100upx;
  92. }
  93. }
  94. .order-info{
  95. margin-top: 20upx;
  96. background: #FFFFFF;
  97. border-radius: 16upx;
  98. padding: 40upx 30upx;
  99. .title{
  100. font-size: 30upx;
  101. font-family: PingFang SC;
  102. font-weight: bold;
  103. color: #222222;
  104. line-height: 1;
  105. }
  106. .item{
  107. margin-top: 40upx;
  108. display: flex;
  109. align-items: center;
  110. justify-content: space-between;
  111. .label{
  112. font-size: 26upx;
  113. font-family: PingFang SC;
  114. font-weight: 500;
  115. color: #666666;
  116. line-height: 1;
  117. }
  118. .text{
  119. font-size: 26upx;
  120. font-family: PingFang SC;
  121. font-weight: 500;
  122. color: #222222;
  123. line-height: 32upx;
  124. }
  125. .cont-text{
  126. font-size: 26upx;
  127. font-family: PingFang SC;
  128. font-weight: 500;
  129. color: #666666;
  130. .bold{
  131. color: #111111;
  132. }
  133. }
  134. .sn-box{
  135. display: flex;
  136. align-items: center;
  137. .copy-btn{
  138. width: 58upx;
  139. height: 32upx;
  140. line-height: 32upx;
  141. text-align: center;
  142. font-size: 22upx;
  143. font-family: PingFang SC;
  144. font-weight: 500;
  145. color: #222222;
  146. background: #F5F5F5;
  147. border-radius: 4upx;
  148. margin-left: 24upx;
  149. }
  150. }
  151. }
  152. .line{
  153. width: 100%;
  154. height: 1px;
  155. background: #F0F0F0;
  156. margin-top: 30upx;
  157. }
  158. }
  159. }
  160. .btn-box{
  161. margin-top: 20upx;
  162. box-sizing: border-box;
  163. display: flex;
  164. align-items: center;
  165. .btn{
  166. width: 155upx;
  167. height: 64upx;
  168. line-height: 64upx;
  169. font-size: 26upx;
  170. font-family: PingFang SC;
  171. font-weight: 500;
  172. text-align: center;
  173. border-radius: 32upx;
  174. &.cancel{
  175. border: 1px solid #DDDDDD;
  176. color: #666666;
  177. }
  178. }
  179. }
  180. }
  181. </style>