coursePay.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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" v-if="!isMember" @click="toJoin">
  9. <text>个人会员或单位会员免费,点击现在入会></text>
  10. </view>
  11. </view>
  12. </template>
  13. <script setup>
  14. import { ref, computed } from 'vue'
  15. import { onLoad } from '@dcloudio/uni-app'
  16. import configService from '@/utils/baseurl.js'
  17. const FILE_URL = configService.FILE_URL;
  18. import {
  19. useAuthStore
  20. } from '@/store/authStore'
  21. const authStore = useAuthStore();
  22. const isMember = ref(null)
  23. const toJoin = () =>{
  24. uni.navigateTo({
  25. url: '/pages/joinClub/joinClub'
  26. })
  27. }
  28. const courseId = ref("");
  29. const toWatch = () => {
  30. // uni.redirectTo({
  31. // url:"/pages/goOnEdu/course/courseDetail/courseDetail?id=" + courseId.value
  32. // })
  33. uni.navigateBack({
  34. delta: 2
  35. });
  36. }
  37. onLoad((option) => {
  38. const { id } = option
  39. courseId.value = id
  40. authStore.loadUserInfo()
  41. isMember.value = authStore.userInfo.isMember == '0' ? false : true
  42. // console.log('onLoad')
  43. })
  44. </script>
  45. <style lang="scss" scoped>
  46. .container {
  47. height: 100vh;
  48. width: 100vw;
  49. // padding: 0 20rpx;
  50. }
  51. .pay-content{
  52. height: 70%;
  53. display: flex;
  54. flex-direction: column;
  55. justify-content: center;
  56. align-items: center;
  57. .pay-img{
  58. width: 180rpx;
  59. height: 180rpx;
  60. margin-bottom: 20rpx;
  61. }
  62. .pay-text{
  63. font-size: 70rpx;
  64. }
  65. .play-btn{
  66. margin-top: 100rpx;
  67. // width: 200rpx;
  68. height: 70rpx;
  69. line-height: 70rpx;
  70. background-color: #0069f6;
  71. color: #fff;
  72. border-radius: 40rpx;
  73. }
  74. }
  75. .pay-member{
  76. color: red;
  77. text-align: center;
  78. font-size: 32rpx;
  79. }
  80. </style>