checkFinish.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view class="page-cont">
  3. <view class="icon-cont">
  4. <u-icon class="icon" name="checkmark" color="#fff" size="80"></u-icon>
  5. <view>支付成功</view>
  6. <view class="num-cont">
  7. <view>
  8. {{payNum}}
  9. </view>
  10. <u-image mode="scaleToFill" width="40rpx" height="40rpx" src="/static/ledou.png"></u-image>
  11. </view>
  12. </view>
  13. <view class="back-btn">
  14. <u-button :custom-style="btnStyle" @click="toHome">返回首页</u-button>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. btnStyle: {
  23. backgroundColor: '#07c160',
  24. color:'#fff'
  25. },
  26. payNum: 0 //支付乐豆数
  27. }
  28. },
  29. onLoad(option) {
  30. console.log(option,'option')
  31. this.payNum = option.num
  32. // 开启分享
  33. uni.showShareMenu({
  34. withShareTicket: true,
  35. menus: ['shareAppMessage', 'shareTimeline']
  36. })
  37. },
  38. methods: {
  39. // 返回首页
  40. toHome() {
  41. uni.reLaunch({
  42. url: '/pages/index/index'
  43. })
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="less">
  49. page{
  50. height: 100%;
  51. }
  52. .page-cont{
  53. width: 100%;
  54. height: 100%;
  55. background-color: #fff;
  56. padding: 0 40upx;
  57. .icon-cont{
  58. width: 100%;
  59. height: 400upx;
  60. display: flex;
  61. flex-direction: column;
  62. align-items: center;
  63. justify-content: center;
  64. .num-cont{
  65. display: flex;
  66. color: red;
  67. font-size: 36upx;
  68. font-weight: 600;
  69. }
  70. >view{
  71. font-size: 30upx;
  72. margin-top: 40upx;
  73. }
  74. }
  75. .icon{
  76. width: 120upx;
  77. height: 120upx;
  78. background-color: #07c160;
  79. display: flex;
  80. justify-content: center;
  81. border-radius: 50%;
  82. }
  83. .back-btn{
  84. margin-top: 40upx;
  85. }
  86. }
  87. </style>