coursePay.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 && courseView === '2'" @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 courseView = ref("");
  30. const toWatch = () => {
  31. // uni.redirectTo({
  32. // url:"/pages/goOnEdu/course/courseDetail/courseDetail?id=" + courseId.value
  33. // })
  34. uni.navigateBack({
  35. delta: 2
  36. });
  37. }
  38. onLoad((option) => {
  39. const { id, viewMode } = option
  40. courseId.value = id
  41. courseView.value = viewMode
  42. authStore.loadUserInfo()
  43. isMember.value = authStore.userInfo.isMember == '0' ? false : true
  44. // console.log('onLoad')
  45. })
  46. </script>
  47. <style lang="scss" scoped>
  48. .container {
  49. height: 100vh;
  50. width: 100vw;
  51. // padding: 0 20rpx;
  52. }
  53. .pay-content{
  54. height: 70%;
  55. display: flex;
  56. flex-direction: column;
  57. justify-content: center;
  58. align-items: center;
  59. .pay-img{
  60. width: 180rpx;
  61. height: 180rpx;
  62. margin-bottom: 20rpx;
  63. }
  64. .pay-text{
  65. font-size: 70rpx;
  66. }
  67. .play-btn{
  68. margin-top: 100rpx;
  69. // width: 200rpx;
  70. height: 70rpx;
  71. line-height: 70rpx;
  72. background-color: #0069f6;
  73. color: #fff;
  74. border-radius: 40rpx;
  75. }
  76. }
  77. .pay-member{
  78. color: red;
  79. text-align: center;
  80. font-size: 32rpx;
  81. }
  82. </style>