四零语境前端代码仓库
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.

634 lines
14 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view class="container">
  3. <view class="header">
  4. <view class="header-bg">
  5. <image
  6. src="/static/会员背景.png"
  7. class="header-img"
  8. mode="scaleToFill"
  9. />
  10. <text class="header-title">会员中心</text>
  11. </view>
  12. <view class="header-content">
  13. <view class="zuanshi">
  14. <image
  15. src="/static/会员钻石.png"
  16. mode="scaleToFill"
  17. class="zuanshi-img"
  18. />
  19. </view>
  20. <image
  21. src="/static/VIP.png"
  22. mode="aspectFit"
  23. class="VIP-img"
  24. />
  25. <text class="intro">共19项会员特权 | 3 项年VIP专属特权</text>
  26. <view class="border" />
  27. <view class="info">
  28. <view class="avatar-box">
  29. <image
  30. :src="userInfo.avatar"
  31. mode="aspectFill"
  32. class="avatar"
  33. />
  34. <text class="name">{{userInfo.name}}</text>
  35. </view>
  36. <uv-button text="立即开通"
  37. @click="goRecharge"
  38. type="primary"
  39. :customStyle="{
  40. width: '160rpx',
  41. height: '60rpx',
  42. borderRadius: '198rpx',
  43. backgroundColor: '#06DADC',
  44. color: '#fff',
  45. fontSize: '28rpx',
  46. fontWeight: '500',
  47. lineHeight: '60rpx',
  48. letterSpacing: '0%',
  49. verticalAlign: 'middle',
  50. }" />
  51. </view>
  52. </view>
  53. </view>
  54. <!-- 立即开通会员按钮 -->
  55. <view class="member-button-section">
  56. <uv-button
  57. type="primary"
  58. text="立即开通会员"
  59. :custom-style="{
  60. width: '100%',
  61. height: '82rpx',
  62. borderRadius: '44rpx',
  63. backgroundColor: '#06DADC',
  64. fontSize: '36rpx',
  65. fontWeight: '500',
  66. border: '1px solid #06DADC'
  67. }"
  68. @click="goRecharge"
  69. ></uv-button>
  70. </view>
  71. <!-- 会员权益 -->
  72. <view class="benefits-section">
  73. <view class="benefits-title">会员权益</view>
  74. <view class="benefits-list">
  75. <!-- 碎片学习 系统掌握 -->
  76. <view class="benefit-item">
  77. <view class="benefit-content">
  78. <view class="benefit-title">碎片学习 系统掌握</view>
  79. <view class="benefit-desc">根据薄弱点智能推荐每节课3-5分钟碎片化完成系统学习</view>
  80. </view>
  81. <view class="benefit-icon">
  82. <image src="/static/会员图片1.png" mode="aspectFit"></image>
  83. </view>
  84. </view>
  85. <!-- 匹配水平 -->
  86. <view class="benefit-item">
  87. <view class="benefit-content">
  88. <view class="benefit-title">匹配水平</view>
  89. <view class="benefit-desc">依据水平精准推课不做无用功快速提升</view>
  90. </view>
  91. <view class="benefit-icon">
  92. <image src="/static/会员图片2.png" mode="aspectFit"></image>
  93. </view>
  94. </view>
  95. <!-- 科学闭环测 讲练结合 -->
  96. <view class="benefit-item">
  97. <view class="benefit-content">
  98. <view class="benefit-title">科学闭环测 讲练结合</view>
  99. <view class="benefit-desc">精心设计科学的学习流程 测试-讲解-练习-检验知识掌握更牢固</view>
  100. </view>
  101. <view class="benefit-icon">
  102. <image src="/static/会员图片3.png" mode="aspectFit"></image>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. <!-- 以下内容为成为会员才能看到的 -->
  108. <!-- 学习计划 -->
  109. <view class="study-plan-section">
  110. <view class="section-title">学习计划</view>
  111. <view class="plan-books">
  112. <view
  113. v-for="(book, index) in studyPlanBooks"
  114. :key="index"
  115. class="plan-book-item"
  116. :class="{ 'active-book': index === 1 }"
  117. >
  118. <view class="plan-book-cover">
  119. <image :src="book.cover" mode="aspectFill"></image>
  120. <!-- 学习中标识 -->
  121. <view v-if="index === 1" class="studying-badge">
  122. <view class="studying-icon"/>
  123. <text>学习中</text>
  124. </view>
  125. </view>
  126. <view class="plan-book-info">
  127. <text class="plan-book-title" :class="{ 'highlight-title': index === 1 }">{{ book.title }}</text>
  128. <view class="plan-book-meta" >
  129. <text class="plan-book-grade" :class="{ 'highlight-title': index === 1 }">{{ book.grade }}/</text>
  130. <image v-if="index !== 1" src="/static/播放图标.png" class="plan-book-duration-icon" />
  131. <image v-else src="/static/播放图标高亮.png" class="plan-book-duration-icon" />
  132. <text class="plan-book-duration" :class="{ 'highlight-title': index === 1 }">{{ book.duration }}</text>
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. <!-- 学习推荐 -->
  139. <view class="study-recommend-section">
  140. <view class="section-header">
  141. <text class="section-title">学习推荐</text>
  142. <view class="section-more">
  143. <text>更多</text>
  144. <uv-icon name="arrow-right" size="14" color="#8B8B8B"></uv-icon>
  145. </view>
  146. </view>
  147. <view class="recommend-grid">
  148. <view
  149. v-for="(book, index) in recommendBooks"
  150. :key="index"
  151. class="recommend-grid-item"
  152. >
  153. <view class="recommend-grid-cover">
  154. <image :src="book.cover" mode="aspectFill"></image>
  155. </view>
  156. <view class="recommend-grid-info">
  157. <text class="recommend-grid-title">{{ book.title }}</text>
  158. <view class="recommend-grid-meta">
  159. <text class="recommend-grid-grade">{{ book.grade }}/</text>
  160. <image src="/static/播放图标.png" class="recommend-grid-duration-icon" />
  161. <text class="recommend-grid-duration">{{ book.duration }}</text>
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. </view>
  167. </view>
  168. </template>
  169. <script>
  170. export default{
  171. data() {
  172. return {
  173. userInfo: {
  174. name: '战斗世界',
  175. avatar: '/static/默认头像.png'
  176. },
  177. // 学习计划书籍数据
  178. studyPlanBooks: [
  179. {
  180. cover: '/static/默认图片.png',
  181. title: '精讲短文',
  182. grade: '四级',
  183. duration: '03:24'
  184. },
  185. {
  186. cover: '/static/默认图片.png',
  187. title: '精讲短文',
  188. grade: '四级',
  189. duration: '03:24'
  190. },
  191. {
  192. cover: '/static/默认图片.png',
  193. title: '精讲短文',
  194. grade: '四级',
  195. duration: '03:24'
  196. }
  197. ],
  198. // 学习推荐书籍数据
  199. recommendBooks: [
  200. {
  201. cover: '/static/默认图片.png',
  202. title: '小王子',
  203. grade: '四级',
  204. duration: '03:24'
  205. },
  206. {
  207. cover: '/static/默认图片.png',
  208. title: '自私的巨人',
  209. grade: '四级',
  210. duration: '03:24'
  211. },
  212. {
  213. cover: '/static/默认图片.png',
  214. title: '百万英镑',
  215. grade: '四级',
  216. duration: '03:24'
  217. },
  218. {
  219. cover: '/static/默认图片.png',
  220. title: 'MATILDA',
  221. grade: '四级',
  222. duration: '03:24'
  223. },
  224. {
  225. cover: '/static/默认图片.png',
  226. title: 'Pride and Prejudice',
  227. grade: '四级',
  228. duration: '03:24'
  229. },
  230. {
  231. cover: '/static/默认图片.png',
  232. title: '温德尔·范·德拉南',
  233. grade: '四级',
  234. duration: '03:24'
  235. }
  236. ]
  237. }
  238. },
  239. methods: {
  240. goRecharge() {
  241. uni.navigateTo({
  242. url: '/subPages/member/recharge'
  243. })
  244. },
  245. },
  246. }
  247. </script>
  248. <style lang="scss" scoped>
  249. .container {
  250. min-height: 100%;
  251. padding-bottom: 50rpx;
  252. }
  253. .header{
  254. width: 100%;
  255. .header-bg{
  256. position: relative;
  257. width: 100%;
  258. height: 400rpx;
  259. // background: red;
  260. .header-img{
  261. width: 100%;
  262. height: 400rpx;
  263. }
  264. .header-title{
  265. font-size: 32rpx;
  266. color: black;
  267. position: absolute;
  268. top: 100rpx;
  269. font-weight: 500;
  270. left: 50%;
  271. transform: translateX(-50%);
  272. }
  273. }
  274. .header-content{
  275. margin: 0 18rpx;
  276. margin-top: -150rpx;
  277. height: 256rpx;
  278. border-radius: 32rpx;
  279. border-width: 2rpx;
  280. padding: 40rpx;
  281. background: linear-gradient(180deg, #DEFFFF 0%, #FBFEFF 22.65%, #F0FBFF 100%);
  282. border: 2rpx solid #06DADC12;
  283. display: flex;
  284. flex-direction: column;
  285. gap: 28rpx;
  286. position: relative;
  287. .zuanshi{
  288. position: absolute;
  289. width: 190rpx;
  290. height: 190rpx;
  291. top: -80rpx;
  292. right: 0;
  293. .zuanshi-img{
  294. width: 190rpx;
  295. height: 190rpx;
  296. }
  297. }
  298. .VIP-img{
  299. width: 80rpx;
  300. height: 50rpx;
  301. }
  302. .border{
  303. width: 100%;
  304. // height: 2rpx;
  305. border: 2rpx solid;
  306. border-image-source: linear-gradient(90deg, rgba(228, 255, 255, 0) 0%, #C3EFEF 50.48%, rgba(228, 255, 255, 0) 100%);
  307. border-image-slice: 1;
  308. }
  309. .intro{
  310. font-size: 28rpx;
  311. line-height: 36rpx;
  312. letter-spacing: 0%;
  313. vertical-align: middle;
  314. color: #09B1B3;
  315. }
  316. .info{
  317. display: flex;
  318. justify-content: space-between;
  319. align-items: center;
  320. .avatar-box{
  321. display: flex;
  322. align-items: center;
  323. gap: 16rpx;
  324. .name{
  325. font-weight: 600;
  326. font-size: 36rpx;
  327. line-height: 44rpx;
  328. letter-spacing: 0%;
  329. vertical-align: middle;
  330. color: #252545;
  331. }
  332. .avatar{
  333. width: 60rpx;
  334. height: 60rpx;
  335. border-radius: 50%;
  336. }
  337. }
  338. }
  339. }
  340. }
  341. /* 立即开通会员按钮样式 */
  342. .member-button-section {
  343. margin: 40rpx 50rpx;
  344. }
  345. /* 会员权益样式 */
  346. .benefits-section {
  347. margin-top: 40rpx;
  348. padding: 0 30rpx;
  349. }
  350. .benefits-title {
  351. font-size: 36rpx;
  352. font-weight: bold;
  353. color: #191919;
  354. margin-bottom: 32rpx;
  355. }
  356. .benefits-list {
  357. display: flex;
  358. flex-direction: column;
  359. gap: 32rpx;
  360. }
  361. .benefit-item {
  362. background: #F8F8F8;
  363. border: 1px solid #FFFFFF;
  364. border-radius: 48rpx;
  365. padding: 27rpx 40rpx;
  366. display: flex;
  367. align-items: center;
  368. justify-content: space-between;
  369. }
  370. .benefit-content {
  371. flex: 1;
  372. margin-right: 40rpx;
  373. }
  374. .benefit-title {
  375. font-size: 32rpx;
  376. font-weight: 600;
  377. color: #333;
  378. margin-bottom: 16rpx;
  379. }
  380. .benefit-desc {
  381. font-size: 24rpx;
  382. color: #09B1B3;
  383. line-height: 36rpx;
  384. }
  385. .benefit-icon {
  386. width: 152rpx;
  387. height: 152rpx;
  388. // flex-shrink: 0;
  389. }
  390. .benefit-icon image {
  391. width: 100%;
  392. height: 100%;
  393. }
  394. /* 学习计划样式 */
  395. .study-plan-section {
  396. margin-top: 40rpx;
  397. padding: 0 30rpx;
  398. }
  399. .section-title {
  400. font-size: 36rpx;
  401. font-weight: 500;
  402. color: #191919;
  403. margin-bottom: 32rpx;
  404. }
  405. .plan-books {
  406. display: flex;
  407. justify-content: center;
  408. align-items: flex-end;
  409. gap: 78rpx;
  410. padding: 20rpx 0;
  411. }
  412. .plan-book-item {
  413. display: flex;
  414. flex-direction: column;
  415. align-items: center;
  416. transition: all 0.3s ease;
  417. &.active-book {
  418. transform: scale(1.15);
  419. .plan-book-cover {
  420. // box-shadow: 0 8rpx 24rpx rgba(6, 218, 220, 0.3);
  421. }
  422. }
  423. }
  424. .plan-book-cover {
  425. width: 172rpx;
  426. height: 230rpx;
  427. border-radius: 16rpx;
  428. overflow: hidden;
  429. margin-bottom: 16rpx;
  430. position: relative;
  431. box-shadow: 0px 4px 4px 0px #C0BCBA75;
  432. image {
  433. width: 100%;
  434. height: 100%;
  435. }
  436. .studying-badge {
  437. position: absolute;
  438. bottom: 0rpx;
  439. right: 0rpx;
  440. background: #00000099;
  441. color: #fff;
  442. padding: 6rpx 10rpx;
  443. border-radius: 20rpx;
  444. font-size: 18rpx;
  445. display: flex;
  446. align-items: center;
  447. justify-content: center;
  448. gap: 6rpx;
  449. .studying-icon{
  450. width: 10rpx;
  451. height: 10rpx;
  452. background: $primary-color;
  453. border-radius: 50%;
  454. }
  455. }
  456. }
  457. .plan-book-info {
  458. text-align: center;
  459. .plan-book-title {
  460. font-size: 28rpx;
  461. font-weight: 700;
  462. color: #333;
  463. margin-bottom: 8rpx;
  464. display: block;
  465. &.highlight-title {
  466. color: $primary-color;
  467. }
  468. }
  469. .plan-book-meta {
  470. display: flex;
  471. align-items: center;
  472. justify-content: center;
  473. gap: 8rpx;
  474. .plan-book-duration-icon {
  475. width: 20rpx;
  476. height: 20rpx;
  477. }
  478. .plan-book-grade {
  479. font-size: 24rpx;
  480. color: #999;
  481. &.highlight-title {
  482. color: $primary-color;
  483. }
  484. }
  485. .plan-book-duration {
  486. font-size: 24rpx;
  487. color: #999;
  488. &.highlight-title {
  489. color: $primary-color;
  490. }
  491. }
  492. }
  493. }
  494. /* 学习推荐样式 */
  495. .study-recommend-section {
  496. margin-top: 40rpx;
  497. padding: 0 30rpx;
  498. }
  499. .section-header {
  500. display: flex;
  501. align-items: center;
  502. justify-content: space-between;
  503. margin-bottom: 24rpx;
  504. .section-more {
  505. display: flex;
  506. align-items: center;
  507. gap: 4rpx;
  508. text {
  509. font-size: 24rpx;
  510. color: #8B8B8B;
  511. }
  512. }
  513. }
  514. .recommend-grid {
  515. display: flex;
  516. flex-wrap: wrap;
  517. gap: 32rpx;
  518. .recommend-grid-item {
  519. width: 208rpx;
  520. display: flex;
  521. flex-direction: column;
  522. .recommend-grid-cover {
  523. box-shadow: 0px 4px 4px 0px #C0BCBA75;
  524. width: 100%;
  525. height: 278rpx;
  526. border-radius: 16rpx;
  527. overflow: hidden;
  528. margin-bottom: 16rpx;
  529. image {
  530. width: 100%;
  531. height: 100%;
  532. }
  533. }
  534. .recommend-grid-info {
  535. padding: 6rpx;
  536. .recommend-grid-title {
  537. font-size: 28rpx;
  538. font-weight: 700;
  539. color: #333;
  540. margin-bottom: 14rpx;
  541. overflow: hidden;
  542. text-overflow: ellipsis;
  543. white-space: nowrap;
  544. }
  545. .recommend-grid-meta {
  546. display: flex;
  547. align-items: center;
  548. .recommend-grid-duration-icon {
  549. width: 24rpx;
  550. height: 24rpx;
  551. margin-right: 12rpx;
  552. }
  553. .recommend-grid-grade {
  554. font-size: 24rpx;
  555. color: #999;
  556. margin-right: 8rpx;
  557. }
  558. .recommend-grid-duration {
  559. font-size: 24rpx;
  560. color: #999;
  561. }
  562. }
  563. }
  564. }
  565. }
  566. </style>