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

599 lines
14 KiB

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