coursePay.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="container">
  3. <view class="pay-content">
  4. <image :src="`${FILE_URL}/edu-icon/pay.png`" class="pay-img"></image>
  5. <text class="pay-text">支付成功</text>
  6. <button class="play-btn" @click="toWatch">点击观看</button>
  7. </view>
  8. <view class="pay-member">
  9. <text>个人会员或单位会员免费,点击现在入会></text>
  10. </view>
  11. </view>
  12. </template>
  13. <script setup>
  14. import { ref } from 'vue'
  15. import { onLoad } from '@dcloudio/uni-app'
  16. import configService from '@/utils/baseurl.js'
  17. const FILE_URL = configService.FILE_URL;
  18. const courseId = ref("");
  19. const toWatch = () => {
  20. // uni.redirectTo({
  21. // url:"/pages/goOnEdu/course/courseDetail/courseDetail?id=" + courseId.value
  22. // })
  23. uni.navigateBack({
  24. delta: 1
  25. });
  26. }
  27. onLoad((option) => {
  28. const { id } = option
  29. courseId.value = id
  30. console.log('onLoad')
  31. })
  32. </script>
  33. <style lang="scss" scoped>
  34. .container {
  35. height: 100vh;
  36. width: 100vw;
  37. // padding: 0 20rpx;
  38. }
  39. .pay-content{
  40. height: 70%;
  41. display: flex;
  42. flex-direction: column;
  43. justify-content: center;
  44. align-items: center;
  45. .pay-img{
  46. width: 180rpx;
  47. height: 180rpx;
  48. margin-bottom: 20rpx;
  49. }
  50. .pay-text{
  51. font-size: 70rpx;
  52. }
  53. .play-btn{
  54. margin-top: 100rpx;
  55. width: 200rpx;
  56. height: 70rpx;
  57. line-height: 70rpx;
  58. background-color: #0069f6;
  59. color: #fff;
  60. border-radius: 40rpx;
  61. }
  62. }
  63. .pay-member{
  64. color: red;
  65. text-align: center;
  66. font-size: 32rpx;
  67. }
  68. </style>