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

610 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. <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. padding-bottom: 50rpx;
  235. }
  236. .header{
  237. width: 100%;
  238. .header-bg{
  239. position: relative;
  240. width: 100%;
  241. height: 400rpx;
  242. // background: red;
  243. .header-img{
  244. width: 100%;
  245. height: 400rpx;
  246. }
  247. .header-title{
  248. font-size: 32rpx;
  249. color: black;
  250. position: absolute;
  251. top: 100rpx;
  252. font-weight: 500;
  253. left: 50%;
  254. transform: translateX(-50%);
  255. }
  256. }
  257. .header-content{
  258. margin: 0 18rpx;
  259. margin-top: -150rpx;
  260. height: 256rpx;
  261. border-radius: 32rpx;
  262. border-width: 2rpx;
  263. padding: 40rpx;
  264. background: linear-gradient(180deg, #DEFFFF 0%, #FBFEFF 22.65%, #F0FBFF 100%);
  265. border: 2rpx solid #06DADC12;
  266. display: flex;
  267. flex-direction: column;
  268. gap: 28rpx;
  269. position: relative;
  270. .zuanshi{
  271. position: absolute;
  272. width: 190rpx;
  273. height: 190rpx;
  274. top: -80rpx;
  275. right: 0;
  276. .zuanshi-img{
  277. width: 190rpx;
  278. height: 190rpx;
  279. }
  280. }
  281. .VIP-img{
  282. width: 80rpx;
  283. height: 50rpx;
  284. }
  285. .border{
  286. width: 100%;
  287. // height: 2rpx;
  288. border: 2rpx solid;
  289. border-image-source: linear-gradient(90deg, rgba(228, 255, 255, 0) 0%, #C3EFEF 50.48%, rgba(228, 255, 255, 0) 100%);
  290. border-image-slice: 1;
  291. }
  292. .intro{
  293. font-size: 28rpx;
  294. line-height: 36rpx;
  295. letter-spacing: 0%;
  296. vertical-align: middle;
  297. color: #09B1B3;
  298. }
  299. .info{
  300. display: flex;
  301. justify-content: space-between;
  302. align-items: center;
  303. .avatar-box{
  304. display: flex;
  305. align-items: center;
  306. gap: 16rpx;
  307. .name{
  308. font-weight: 600;
  309. font-size: 36rpx;
  310. line-height: 44rpx;
  311. letter-spacing: 0%;
  312. vertical-align: middle;
  313. color: #252545;
  314. }
  315. .avatar{
  316. width: 60rpx;
  317. height: 60rpx;
  318. border-radius: 50%;
  319. }
  320. }
  321. }
  322. }
  323. }
  324. /* 会员权益样式 */
  325. .benefits-section {
  326. margin-top: 40rpx;
  327. padding: 0 30rpx;
  328. }
  329. .benefits-title {
  330. font-size: 36rpx;
  331. font-weight: bold;
  332. color: #191919;
  333. margin-bottom: 32rpx;
  334. }
  335. .benefits-list {
  336. display: flex;
  337. flex-direction: column;
  338. gap: 32rpx;
  339. }
  340. .benefit-item {
  341. background: #F8F8F8;
  342. border: 1px solid #FFFFFF;
  343. border-radius: 48rpx;
  344. padding: 27rpx 40rpx;
  345. display: flex;
  346. align-items: center;
  347. justify-content: space-between;
  348. }
  349. .benefit-content {
  350. flex: 1;
  351. margin-right: 40rpx;
  352. }
  353. .benefit-title {
  354. font-size: 32rpx;
  355. font-weight: 600;
  356. color: #333;
  357. margin-bottom: 16rpx;
  358. }
  359. .benefit-desc {
  360. font-size: 24rpx;
  361. color: #09B1B3;
  362. line-height: 36rpx;
  363. }
  364. .benefit-icon {
  365. width: 152rpx;
  366. height: 152rpx;
  367. // flex-shrink: 0;
  368. }
  369. .benefit-icon image {
  370. width: 100%;
  371. height: 100%;
  372. }
  373. /* 学习计划样式 */
  374. .study-plan-section {
  375. margin-top: 40rpx;
  376. padding: 0 30rpx;
  377. }
  378. .section-title {
  379. font-size: 36rpx;
  380. font-weight: 500;
  381. color: #191919;
  382. margin-bottom: 32rpx;
  383. }
  384. .plan-books {
  385. display: flex;
  386. justify-content: center;
  387. align-items: flex-end;
  388. gap: 78rpx;
  389. padding: 20rpx 0;
  390. }
  391. .plan-book-item {
  392. display: flex;
  393. flex-direction: column;
  394. align-items: center;
  395. transition: all 0.3s ease;
  396. &.active-book {
  397. transform: scale(1.15);
  398. .plan-book-cover {
  399. // box-shadow: 0 8rpx 24rpx rgba(6, 218, 220, 0.3);
  400. }
  401. }
  402. }
  403. .plan-book-cover {
  404. width: 172rpx;
  405. height: 230rpx;
  406. border-radius: 16rpx;
  407. overflow: hidden;
  408. margin-bottom: 16rpx;
  409. position: relative;
  410. box-shadow: 0px 4px 4px 0px #C0BCBA75;
  411. image {
  412. width: 100%;
  413. height: 100%;
  414. }
  415. .studying-badge {
  416. position: absolute;
  417. bottom: 0rpx;
  418. right: 0rpx;
  419. background: #00000099;
  420. color: #fff;
  421. padding: 6rpx 10rpx;
  422. border-radius: 20rpx;
  423. font-size: 18rpx;
  424. display: flex;
  425. align-items: center;
  426. justify-content: center;
  427. gap: 6rpx;
  428. .studying-icon{
  429. width: 10rpx;
  430. height: 10rpx;
  431. background: $primary-color;
  432. border-radius: 50%;
  433. }
  434. }
  435. }
  436. .plan-book-info {
  437. text-align: center;
  438. .plan-book-title {
  439. font-size: 28rpx;
  440. font-weight: 700;
  441. color: #333;
  442. margin-bottom: 8rpx;
  443. display: block;
  444. &.highlight-title {
  445. color: $primary-color;
  446. }
  447. }
  448. .plan-book-meta {
  449. display: flex;
  450. align-items: center;
  451. justify-content: center;
  452. gap: 8rpx;
  453. .plan-book-duration-icon {
  454. width: 20rpx;
  455. height: 20rpx;
  456. }
  457. .plan-book-grade {
  458. font-size: 24rpx;
  459. color: #999;
  460. &.highlight-title {
  461. color: $primary-color;
  462. }
  463. }
  464. .plan-book-duration {
  465. font-size: 24rpx;
  466. color: #999;
  467. &.highlight-title {
  468. color: $primary-color;
  469. }
  470. }
  471. }
  472. }
  473. /* 学习推荐样式 */
  474. .study-recommend-section {
  475. margin-top: 40rpx;
  476. padding: 0 30rpx;
  477. }
  478. .section-header {
  479. display: flex;
  480. align-items: center;
  481. justify-content: space-between;
  482. margin-bottom: 24rpx;
  483. .section-more {
  484. display: flex;
  485. align-items: center;
  486. gap: 4rpx;
  487. text {
  488. font-size: 24rpx;
  489. color: #8B8B8B;
  490. }
  491. }
  492. }
  493. .recommend-grid {
  494. display: flex;
  495. flex-wrap: wrap;
  496. gap: 32rpx;
  497. .recommend-grid-item {
  498. width: 208rpx;
  499. display: flex;
  500. flex-direction: column;
  501. .recommend-grid-cover {
  502. box-shadow: 0px 4px 4px 0px #C0BCBA75;
  503. width: 100%;
  504. height: 278rpx;
  505. border-radius: 16rpx;
  506. overflow: hidden;
  507. margin-bottom: 16rpx;
  508. image {
  509. width: 100%;
  510. height: 100%;
  511. }
  512. }
  513. .recommend-grid-info {
  514. padding: 6rpx;
  515. .recommend-grid-title {
  516. font-size: 28rpx;
  517. font-weight: 700;
  518. color: #333;
  519. margin-bottom: 14rpx;
  520. overflow: hidden;
  521. text-overflow: ellipsis;
  522. white-space: nowrap;
  523. }
  524. .recommend-grid-meta {
  525. display: flex;
  526. align-items: center;
  527. .recommend-grid-duration-icon {
  528. width: 24rpx;
  529. height: 24rpx;
  530. margin-right: 12rpx;
  531. }
  532. .recommend-grid-grade {
  533. font-size: 24rpx;
  534. color: #999;
  535. margin-right: 8rpx;
  536. }
  537. .recommend-grid-duration {
  538. font-size: 24rpx;
  539. color: #999;
  540. }
  541. }
  542. }
  543. }
  544. }
  545. </style>