四零语境前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

185 lines
4.7 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view class="plan-container">
  3. <!-- 主体内容 -->
  4. <view class="main-content">
  5. <!-- 内容卡片 -->
  6. <view class="content-card">
  7. <!-- 富文本内容 -->
  8. <view class="rich-text-container">
  9. <!-- <rich-text :nodes="richTextContent"></rich-text> -->
  10. <uv-parse :content="richTextContent" :tagStyle="style" :lazyLoad="true" ></uv-parse>
  11. </view>
  12. </view>
  13. </view>
  14. <!-- 底部固定报名栏 -->
  15. <view class="bottom-bar" v-if="type === 1 || type === '1'">
  16. <uv-button
  17. type="primary"
  18. text="报名"
  19. :custom-style="{
  20. width: '100%',
  21. height: '82rpx',
  22. borderRadius: '44rpx',
  23. backgroundColor: '#06DADC',
  24. fontSize: '36rpx',
  25. fontWeight: '500',
  26. border: '1px solid #06DADC'
  27. }"
  28. @click="handleSignUp"
  29. ></uv-button>
  30. <uv-safe-bottom></uv-safe-bottom>
  31. </view>
  32. <!-- 底部安全区域 -->
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. richTextContent: `
  40. <div style="padding: 0;">
  41. <div style="margin-bottom: 40rpx; padding: 40rpx; background: #f8f9fa; ">
  42. <h3 style="font-size: 36rpx; font-weight: bold; color: #333; margin: 0 0 20rpx 0;">灵活设置</h3>
  43. <p style="font-size: 28rpx; color: #666; line-height: 1.6; margin: 0 0 30rpx 0;">语音合成支持中文英文粤语四川话也可以合成中英混读语音</p>
  44. <div style="width: 100%; height: 300rpx; overflow: hidden; background: #eee;">
  45. <img src="/static/default-image.png" style="width: 100%; height: 100%; object-fit: cover; " />
  46. </div>
  47. </div>
  48. <div style="padding: 40rpx; background: #f8f9fa; ">
  49. <h3 style="font-size: 36rpx; font-weight: bold; color: #333; margin: 0 0 20rpx 0;">高拟真度</h3>
  50. <p style="font-size: 28rpx; color: #666; line-height: 1.6; margin: 0 0 30rpx 0;">基于业界领先技术构建的语音合成系统具备合成速度快合成语音自然流畅等特点合成语音拟真度高能够符合多样化的应用场景让设备和应用轻松发声人机语音交互效果更加逼真</p>
  51. <div style="width: 100%; height: 300rpx; overflow: hidden; background: #eee;">
  52. <img src="/static/default-image.png" style="width: 100%; height: 100%; object-fit: cover; " />
  53. </div>
  54. </div>
  55. </div>
  56. `,
  57. style: {
  58. img: 'borderRadius: 24rpx'
  59. },
  60. id: '',
  61. type: ''
  62. }
  63. },
  64. methods: {
  65. handleSignUp() {
  66. // console.log('点击报名')
  67. // 这里添加报名逻辑
  68. uni.navigateTo({
  69. url: '/subPages/home/submit?id=' + this.id
  70. })
  71. },
  72. },
  73. async onShow() {
  74. try{
  75. const askRes = await this.$api.home.getLinkDetails({
  76. id: this.id
  77. })
  78. if (askRes.code === 200){
  79. this.richTextContent = askRes.result.content
  80. this.type = askRes.result.type
  81. }
  82. } catch (error) {
  83. console.error('获取链接详情失败:', error)
  84. }
  85. },
  86. onLoad(options) {
  87. this.id = options.id
  88. this.type = options.type
  89. },
  90. }
  91. </script>
  92. <style scoped lang="scss">
  93. .plan-container {
  94. background: #fff;
  95. min-height: 100vh;
  96. display: flex;
  97. flex-direction: column;
  98. }
  99. .main-content {
  100. flex: 1;
  101. padding: 40rpx 32rpx 120rpx;
  102. }
  103. .title-section {
  104. margin-bottom: 40rpx;
  105. .main-title {
  106. font-size: 48rpx;
  107. font-weight: 700;
  108. color: $primary-text-color;
  109. line-height: 1.3;
  110. }
  111. }
  112. .content-card {
  113. background: #F8F8F8;
  114. border-radius: 32rpx;
  115. // padding: 48rpx 32rpx;
  116. // .feature-section {
  117. // margin-bottom: 60rpx;
  118. // &:last-child {
  119. // margin-bottom: 0;
  120. // }
  121. // .feature-title {
  122. // display: block;
  123. // font-size: 36rpx;
  124. // font-weight: 700;
  125. // color: $primary-text-color;
  126. // margin-bottom: 24rpx;
  127. // }
  128. // .feature-desc {
  129. // display: block;
  130. // font-size: 28rpx;
  131. // color: $secondary-text-color;
  132. // line-height: 1.6;
  133. // margin-bottom: 32rpx;
  134. // }
  135. // .feature-image {
  136. // width: 100%;
  137. // height: 320rpx;
  138. // border-radius: 24rpx;
  139. // overflow: hidden;
  140. // image {
  141. // width: 100%;
  142. // height: 100%;
  143. // }
  144. // }
  145. // }
  146. }
  147. .bottom-bar {
  148. position: fixed;
  149. bottom: 0;
  150. left: 0;
  151. right: 0;
  152. background: #fff;
  153. padding: 24rpx 50rpx;
  154. // border-top: 1rpx solid #f0f0f0;
  155. z-index: 999;
  156. }
  157. // 富文本容器样式
  158. .rich-text-container {
  159. width: 100%;
  160. border-radius: 36rpx;
  161. // img {
  162. // border-radius: 24rpx;
  163. // }
  164. }
  165. </style>