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

607 lines
14 KiB

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