Browse Source

'还差阅读部分'

hfll
hflllll 1 month ago
parent
commit
2f30bd5f1d
11 changed files with 459 additions and 19 deletions
  1. +7
    -0
      App.vue
  2. +7
    -1
      pages.json
  3. +8
    -0
      pages/index/member.vue
  4. BIN
      static/会员1.png
  5. BIN
      static/会员2.png
  6. BIN
      static/会员3.png
  7. BIN
      static/修饰箭头.png
  8. BIN
      static/小程序标题.png
  9. +14
    -11
      subPages/login/login.vue
  10. +8
    -7
      subPages/login/userInfo.vue
  11. +415
    -0
      subPages/member/recharge.vue

+ 7
- 0
App.vue View File

@ -7,6 +7,13 @@
},
async onShow() {
// if(!uni.getStorageSync('token')){
// uni.redirectTo({
// url: '/subPages/login/login',
// })
// }
console.log(uni.getStorageSync('token'));
console.log('App Show')
await this.$store.dispatch('initData')
// console.log('')


+ 7
- 1
pages.json View File

@ -41,7 +41,7 @@
{
"path": "login/userInfo",
"style": {
"navigationBarTitleText": "补充信息"
"navigationStyle": "custom"
}
},
{
@ -113,6 +113,12 @@
"style": {
"navigationBarTitleText": "提现"
}
},
{
"path": "member/recharge",
"style": {
"navigationStyle": "custom"
}
}
]
}


+ 8
- 0
pages/index/member.vue View File

@ -35,6 +35,7 @@
<text class="name">{{userInfo.name}}</text>
</view>
<uv-button text="立即开通"
@click="goRecharge"
type="primary"
:customStyle="{
width: '160rpx',
@ -232,6 +233,13 @@ export default{
]
}
},
methods: {
goRecharge() {
uni.navigateTo({
url: '/subPages/member/recharge'
})
}
},
}
</script>


BIN
static/会员1.png View File

Before After
Width: 398  |  Height: 150  |  Size: 83 KiB

BIN
static/会员2.png View File

Before After
Width: 398  |  Height: 150  |  Size: 79 KiB

BIN
static/会员3.png View File

Before After
Width: 398  |  Height: 150  |  Size: 81 KiB

BIN
static/修饰箭头.png View File

Before After
Width: 750  |  Height: 22  |  Size: 391 B

BIN
static/小程序标题.png View File

Before After
Width: 445  |  Height: 53  |  Size: 4.1 KiB

+ 14
- 11
subPages/login/login.vue View File

@ -1,7 +1,7 @@
<template>
<view class="login-container">
<!-- 背景图 -->
<image class="bg-image" src="@/subPages/static/登录_背景图.png" mode="aspectFill"></image>
<!-- <image class="bg-image" src="@/subPages/static/登录_背景图.png" mode="aspectFill"></image> -->
<!-- 主要内容 -->
<view class="content">
@ -14,11 +14,11 @@
<!-- 登录按钮区域 -->
<view class="login-section">
<button class="login-btn" @click="handleLogin">
授权手机号登录
登录
</button>
<button class="guest-btn" @click="handleGuestLogin">
暂不登录
取消登录
</button>
<!-- 协议文本 -->
@ -29,10 +29,10 @@
<view class="checkbox-inner" v-if="isAgreed"></view>
</view>
</view>
<text >阅读并同意我们的
<text class="link-text" @click="showServiceAgreement">服务协议与隐私条款</text>
<text></text>
<text class="link-text" @click="showPrivacyPolicy">个人信息保护指引</text>
<text >我已阅读并同意
<text class="link-text" @click="showServiceAgreement">服务协议</text>
<text></text>
<text class="link-text" @click="showPrivacyPolicy">隐私政策</text>
</text>
</view>
</view>
@ -71,6 +71,9 @@ export default {
//
handleLogin() {
uni.redirectTo({ url: '/subPages/login/userInfo' })
return
if (!this.isAgreed) {
this.$refs.serviceModal.open();
this.$refs.guideModal.open();
@ -146,7 +149,7 @@ export default {
width: 100vw;
height: 100vh;
overflow: hidden;
background: #E8FBFB;
.bg-image {
position: absolute;
top: 0;
@ -211,9 +214,9 @@ export default {
width: 630rpx;
height: 88rpx;
margin-bottom: 60rpx;
border: 2rpx solid $secondary-text-color;
border: 2rpx solid $primary-color;
border-radius: 44rpx;
color: $secondary-text-color;
color: $primary-color;
font-size: 32rpx;
font-weight: 400;
background-color: transparent;
@ -264,7 +267,7 @@ export default {
display: flex;
.link-text {
color: $primary-color;
text-decoration: underline;
// text-decoration: underline;
}
}
}


+ 8
- 7
subPages/login/userInfo.vue View File

@ -38,7 +38,7 @@
</view>
<!-- 手机号 -->
<view class="form-item">
<!-- <view class="form-item">
<text class="form-label">手机号</text>
<view class="phone-container" v-if="!userInfo.phone">
<button
@ -51,24 +51,24 @@
</view>
<text class="form-label" v-else>{{ userInfo.phone }}</text>
</view>
-->
<!-- 所在部门 -->
<view class="form-item">
<!-- <view class="form-item">
<text class="form-label">所在部门</text>
<view class="department-container" @click="showDepartmentPicker">
<text class="department-text" :class="{ 'active': userInfo.department.title }">{{ userInfo.department.title || '请选择' }}</text>
<uv-icon name="arrow-down" size="20" color="#000"></uv-icon>
</view>
</view>
</view> -->
<!-- 备注 -->
<view class="form-item ">
<!-- <view class="form-item ">
<text class="form-label">备注<text class="form-remark">(非必填)</text></text>
<input
class="form-input"
v-model="userInfo.remark"
/>
</view>
</view> -->
</view>
@ -113,7 +113,7 @@ export default {
},
async onLoad() {
this.calculateContainerHeight();
await this.getUserInfo();
// await this.getUserInfo();
},
computed: {
//
@ -317,6 +317,7 @@ export default {
.user-info-container {
background-color: #fff;
box-sizing: border-box;
padding-top: 200rpx;
}
.content {


+ 415
- 0
subPages/member/recharge.vue View File

@ -0,0 +1,415 @@
<template>
<view class="container">
<view class="header">
<view class="header-bg">
<image
src="/static/会员背景.png"
class="header-img"
mode="scaleToFill"
/>
<text class="header-title">会员开通</text>
<!-- 加一个推出箭头 -->
<view class="header-icon" @click="goBack">
<uv-icon name="arrow-left" color="#000" size="20" />
</view>
<!-- 轮播容器 -->
<view class="uv-demo-block swiper-container">
<uv-swiper
bgColor="transparent"
:list="list"
previousMargin="70"
nextMargin="70"
acceleration
height="85"
circular
:autoplay="false"
radius="5"
>
</uv-swiper>
<button class="swiper-btn">
已选择
</button>
<image
class="swiper-arrow"
src="/static/修饰箭头.png"
mode="aspectFill"
/>
</view>
</view>
</view>
<!-- 会员套餐选择容器 -->
<view class="membership-container">
<!-- 套餐选择 -->
<view class="package-list">
<view
class="package-item"
:class="{ 'active': selectedPackage === index }"
v-for="(item, index) in packageList"
:key="index"
@click="selectPackage(index)"
>
<view class="info">
<!-- 赠送标识 -->
<view class="gift-tag" v-if="item.gift">
赠送{{ item.gift }}
</view>
<view class="package-title">{{ item.title }}</view>
<view class="package-price">¥{{ getInt(item.price) }}.<text class="package-decimal">{{ getDecimal(item.price) }}</text></view>
<view class="package-original">¥{{ item.originalPrice }}</view>
</view>
<view class="package-btn" :class="{ 'active': selectedPackage === index }">
{{ selectedPackage === index ? '已选择' : '点击选择' }}
</view>
</view>
</view>
<!-- 优惠券选择 -->
<view class="coupon-section">
<view class="coupon-title">选择优惠券</view>
<view class="coupon-selector" @click="selectCoupon">
<text class="coupon-text">请选择</text>
<uv-icon name="arrow-right" color="#999" size="16" />
</view>
</view>
</view>
<!-- 会员权益 -->
<view class="benefits-section">
<view class="benefits-title">会员权益</view>
<view class="benefits-list">
<!-- 碎片学习 系统掌握 -->
<view class="benefit-item">
<view class="benefit-content">
<view class="benefit-title">碎片学习 系统掌握</view>
<view class="benefit-desc">根据薄弱点智能推荐每节课3-5分钟碎片化完成系统学习</view>
</view>
<view class="benefit-icon">
<image src="/static/会员图片1.png" mode="aspectFit"></image>
</view>
</view>
<!-- 匹配水平 -->
<view class="benefit-item">
<view class="benefit-content">
<view class="benefit-title">匹配水平</view>
<view class="benefit-desc">依据水平精准推课不做无用功快速提升</view>
</view>
<view class="benefit-icon">
<image src="/static/会员图片2.png" mode="aspectFit"></image>
</view>
</view>
<!-- 科学闭环测 讲练结合 -->
<view class="benefit-item">
<view class="benefit-content">
<view class="benefit-title">科学闭环测 讲练结合</view>
<view class="benefit-desc">精心设计科学的学习流程 测试-讲解-练习-检验知识掌握更牢固</view>
</view>
<view class="benefit-icon">
<image src="/static/会员图片3.png" mode="aspectFit"></image>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [
'/static/会员1.png',
'/static/会员2.png',
'/static/会员3.png'
],
selectedPackage: 0, //
packageList: [
{
title: '30天会员',
price: '36.00',
originalPrice: '128',
gift: null
},
{
title: '90天会员',
price: '88.00',
originalPrice: '384',
gift: '180'
},
{
title: '180天会员',
price: '128.00',
originalPrice: '384',
gift: null
}
]
}
},
methods: {
//
getInt(price){
if (price.indexOf('.') === -1) {
return price
}
if (price === null) {
return '0'
}
return String(price).split('.')[0]
},
getDecimal(price){
if (price === null) return '00'
const parts = String(price).split('.')
return parts[1] ? parts[1].padEnd(2, '0') : '00'
},
selectPackage(index) {
this.selectedPackage = index
},
selectCoupon() {
uni.showToast({
title: '功能开发中',
icon: 'none'
})
},
goBack() {
uni.navigateBack({
delta: 1
})
},
}
}
</script>
<style lang="scss" scoped>
.container {
min-height: 100%;
}
.header{
width: 100%;
.header-bg{
position: relative;
width: 100%;
height: 500rpx;
// background: red;
.header-img{
width: 100%;
height: 500rpx;
}
.header-title{
font-size: 32rpx;
color: black;
position: absolute;
top: 100rpx;
font-weight: 500;
left: 50%;
transform: translateX(-50%);
}
.header-icon{
position: absolute;
top: 100rpx;
left: 30rpx;
}
.swiper-container{
margin-top: -300rpx;
.swiper-arrow{
width: 100%;
height: 22rpx;
}
.swiper-btn{
margin: 35rpx auto 15rpx;
width: 150rpx;
height: 52rpx;
border-radius: 999px;
background: #06DADC;
color: white;
font-size: 28rpx;
font-weight: 500;
text-align: center;
line-height: 52rpx;
}
}
}
}
//
.membership-container {
background: linear-gradient(180deg, #DEFFFF 0%, #FBFEFF 22.65%, #FFFFFF 100%);
padding: 40rpx 30rpx;
margin-top: 20rpx;
.package-list {
display: flex;
justify-content: space-between;
gap: 16rpx;
margin-bottom: 20rpx;
.package-item {
position: relative;
flex: 1;
background: #fff;
border-radius: 20rpx;
text-align: center;
border: 2rpx solid #EEEEEE;
transition: all 0.3s;
// width: 119;
height: 210rpx;
// width: 238rpx;
.info{
padding: 16rpx 16rpx 0 16rpx ;
}
&.active {
border-color: $primary-color;
// box-shadow: 0 4rpx 20rpx rgba(34, 242, 235, 0.2);
}
.gift-tag {
position: absolute;
top: -30rpx;
left: 0;
// transform: translateX(-50%);
background: #FF4800;
color: #fff;
font-size: 24rpx;
padding: 8rpx 16rpx;
border-radius: 999rpx 999rpx 999rpx 0;
white-space: nowrap;
}
.package-title {
font-size: 28rpx;
color: #000;
margin-bottom: 16rpx;
font-weight: 500;
}
.package-price {
font-size: 36rpx;
color: #FF4800;
font-weight: 500;
margin-bottom: 8rpx;
.package-decimal{
font-size: 24rpx;
}
}
.package-original {
font-size: 24rpx;
color: #8B8B8B;
line-height: 1.4;
text-decoration: line-through;
margin-bottom: 8rpx;
}
.package-btn {
background: #E4E7EB;
color: #191919;
font-size: 28rpx;
// padding: 12rpx 20rpx;
width: 100%;
// border-radius: 30rpx;
transition: all 0.3s;
height: 52rpx;
line-height: 52rpx;
border-radius: 0 0 24rpx 24rpx;
&.active {
background: $primary-color;
color: #fff;
}
}
}
}
.coupon-section {
.coupon-title {
font-size: 26rpx;
color: #181818;
margin-bottom: 10rpx;
// font-weight: 500;
}
.coupon-selector {
background: #fff;
border-radius: 16rpx;
padding: 10rpx 0;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2rpx solid #f0f0f0;
.coupon-text {
font-size: 32rpx;
color: #C6C6C6;
}
}
}
}
/* 会员权益样式 */
.benefits-section {
margin-top: 40rpx;
padding: 0 30rpx;
}
.benefits-title {
font-size: 36rpx;
font-weight: bold;
color: #191919;
margin-bottom: 32rpx;
}
.benefits-list {
display: flex;
flex-direction: column;
gap: 32rpx;
}
.benefit-item {
background: #F8F8F8;
border: 1px solid #FFFFFF;
border-radius: 48rpx;
padding: 27rpx 40rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.benefit-content {
flex: 1;
margin-right: 40rpx;
}
.benefit-title {
font-size: 32rpx;
font-weight: 600;
color: #333;
margin-bottom: 16rpx;
}
.benefit-desc {
font-size: 24rpx;
color: #09B1B3;
line-height: 36rpx;
}
.benefit-icon {
width: 152rpx;
height: 152rpx;
// flex-shrink: 0;
}
.benefit-icon image {
width: 100%;
height: 100%;
}
</style>

Loading…
Cancel
Save