Commit 6754431d authored by jyx's avatar jyx

优化样式

parent 5d3145c1
...@@ -7,58 +7,69 @@ ...@@ -7,58 +7,69 @@
src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg_scan/img/ic_vip_banner.png" mode="widthFix" /> src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg_scan/img/ic_vip_banner.png" mode="widthFix" />
<view class="section"> <view class="section">
<view class="pack-box"> <view class="pack-box">
<view class="pack-item" <scroll-view scroll-x style="white-space: nowrap">
:style="item.largeType =='vip' ?'background: #f5f5f5;':'background: #f4c98b;'" <view class="pack-item" v-for='(item, index) in vipList' :key='index'
:class="[{active: index==selectedIndex}]" v-for='(item, index) in vipList' :key='index'
@click="choosePack(item, index)"> @click="choosePack(item, index)">
<view style="display: flex;flex-direction: column;align-items: center;"> <view class="pack-content" :class="[{active: index==selectedIndex}]">
<view class="label" v-if="item.topTitle">
<view class="price row"> {{ item.topTitle }}
{{item.firstPayPrice}}
</view> </view>
<view class="name row" :class="[{active2: index==selectedIndex}]">
<view class="name row" v-if="item.title!=null&&item.title!=''">
{{item.title}} {{item.title}}
</view> </view>
<view class="price row"
<view class="origin row" v-if="item.remarks!=null&&item.remarks!=''"> :class="[{active1: index==selectedIndex},{price2:item.firstPayPrice<=0}]">
{{item.remarks}} <view style="font-size: 50rpx;">{{item.firstPayPrice<=0 ? '' : '¥'}}</view>
{{item.firstPayPrice<=0 ? '免费试用' : item.firstPayPrice}}
</view>
<view class="origin row" v-if='item.oldPrice'>
{{item.oldPrice}}
</view> </view>
<view class="origin2 row" v-if='item.remarks'>
{{ getRemark1(item.remarks) + '\r\n' + getRemark2(item.remarks) }}
</view> </view>
<view class="cut-down" v-if='item.topTitle!=null&&item.topTitle.length>0'>
{{item.topTitle}} <view class="label2" v-if="index==selectedIndex&&item.firstPayPrice>0">
{{ '仅需'+amount(item.firstPayPrice / item.days)+'元/天' }}
</view> </view>
<view v-if="index==selectedIndex" style="position: absolute;bottom: 0;right: 0;">
<image mode="scaleToFill"
style="width: 100rpx;height: 100rpx;display: flex;align-items: right;"
src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_loading.gif">
</image>
</view> </view>
</view> </view>
</scroll-view>
</view> </view>
</view> </view>
<!-- <view v-if="false" class="item-agree">
<image style="width:28rpx;height: 28rpx;" v-if="needClick" @click="clickAgreeBtn"
src="@/static/ic_vip_enable.png">
</image>
<image style="width:28rpx;height: 28rpx;" v-else @click="clickAgreeBtn" src="@/static/ic_vip_none.png">
</image>
<view style="font-size: 22rpx;margin-left: 10rpx;" @click="clickAgree">点击购买即表示您同意《会员付费协议》</view>
</view> -->
<view class="trialStyle"> <view class="trialStyle">
<text v-if="hintText"> <text v-if="hintText">
{{hintText}} {{hintText}}
</text> </text>
</view> </view>
<view @click="handleUnsign" v-if="agreementDto"
style="margin-top: 12rpx;margin-left: 30rpx;color: black;font-size: 36rpx;font-weight: 700;">自动续费管理
>
</view>
<view class="item-agree"> <view class="item-agree">
<view style="font-size: 28rpx;" @click="clickAgree">用户付费须知> </view> <view style="font-size: 28rpx;" @click="clickAgree">用户付费须知> </view>
</view> </view>
<view class="agreementWrp">
<checkbox-group @change="checkboxChange" style="width: 50rpx;">
<checkbox :checked="checked" style="transform:scale(0.9)">
</checkbox>
</checkbox-group>
<text>您已阅读并同意
<text class="agreementText" @click="goAgreement(1)">《连续订阅服务协议》</text>
<text class="agreementText" @click="goAgreement(2)">《支付协议》</text>
<text class="agreementText" @click="goAgreement(3)">《隐私政策》</text>
</text>
</view>
<view class="section"> <view class="section">
<button class="apply-button" @click="handlePay">立即试用</button> <button class="apply-button" @click="handlePay">立即试用</button>
</view> </view>
...@@ -100,6 +111,8 @@ ...@@ -100,6 +111,8 @@
needClick: false, needClick: false,
selectedIndex: 0, selectedIndex: 0,
os: 'android', os: 'android',
checked: false,
agreementDto: null,
hintText: '' hintText: ''
} }
}, },
...@@ -110,7 +123,7 @@ ...@@ -110,7 +123,7 @@
} }
this.post({ this.post({
url: '/vip/getVipProducts/cyc', url: '/vip/getVipProducts',
showLoading: false, showLoading: false,
success: ({ success: ({
data data
...@@ -129,6 +142,21 @@ ...@@ -129,6 +142,21 @@
} }
} }
}); });
this.post({
url: '/vip/getOrderList',
showLoading: false,
success: ({
data
}) => {
if (data.agreement == undefined) {
this.agreementDto = null;
} else {
this.agreementDto = data.agreement;
}
}
});
}, },
clickAgreeBtn() { clickAgreeBtn() {
this.needClick = !this.needClick this.needClick = !this.needClick
...@@ -138,7 +166,6 @@ ...@@ -138,7 +166,6 @@
}, },
choosePack(item, index) { choosePack(item, index) {
this.selectedIndex = index; this.selectedIndex = index;
this.hintText = this.vipList[this.selectedIndex].trailRemark; this.hintText = this.vipList[this.selectedIndex].trailRemark;
}, },
clickAgree() { clickAgree() {
...@@ -152,6 +179,12 @@ ...@@ -152,6 +179,12 @@
return return
} }
if (!this.checked) {
message.notify("请阅读《支付协议》后勾选同意")
return
}
let that = this; let that = this;
let vipBean = this.vipList[this.selectedIndex]; let vipBean = this.vipList[this.selectedIndex];
...@@ -276,6 +309,45 @@ ...@@ -276,6 +309,45 @@
that.paySuccess(largeType); that.paySuccess(largeType);
} }
}); });
},
checkboxChange(e) {
if (e.detail.value.length > 0) {
this.checked = true
} else {
this.checked = false
}
},
handleUnsign() {
if (this.agreementDto) {
let params = JSON.stringify(this.agreementDto)
navigateTo(`/pagesA/unsign/unsign?params=` + params)
}
},
amount(value) {
return value.toFixed(2)
},
getRemark1(value) {
let data = value.split(',')
if (data.length > 0) {
return data[0]
}
return ''
},
getRemark2(value) {
let data = value.split(',')
if (data.length > 1) {
return data[1]
}
return ''
},
goAgreement(type) {
if (type == 1) {
navigateTo(`/pages/brower/brower?url=https://api.mints-tech.cn/camera-api/agreements/lingxi/gmxy.html`)
} else if (type == 2) {
navigateTo(`/pages/brower/brower?url=https://api.mints-tech.cn/camera-api/agreements/lingxi/syzc.html`)
} else if (type == 3) {
navigateTo(`/pages/brower/brower?url=https://api.mints-tech.cn/camera-api/agreements/lingxi/yhxy.html`)
}
} }
} }
} }
...@@ -288,38 +360,51 @@ ...@@ -288,38 +360,51 @@
flex-direction: column; flex-direction: column;
.section { .section {
margin-top: 30rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background: white;
.title {
font-size: 32rpx;
font-weight: 700;
color: white;
margin-bottom: 30rpx;
} }
.pack-box { .pack-box {
margin-top: 25rpx; margin-top: 25rpx;
margin-left: 18rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
overflow-x: scroll;
.pack-item {
margin-left: 30rpx;
width: calc(32% - 30rpx);
display: inline-block;
.active { .active {
border: 6rpx solid #fd5350 !important; background-color: #FEEDD0;
border: 4rpx solid #FDEADC !important;
} }
.pack-item { .pack-content {
margin-bottom: 25rpx; width: 100%;
margin-right: 22rpx; height: 320rpx;
width: calc(28%);
height: 230rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; align-items: center;
// background: #f5f5f5; background: white;
border: 6rpx solid #f5f5f5; border: 2rpx solid #EAECEC;
border-radius: 10rpx; border-radius: 20rpx;
position: relative; position: relative;
padding-top: 60rpx;
.row { .row {
margin: 8rpx 15rpx; display: flex;
align-items: center;
margin: 6rpx 15rpx;
marign-bottom: 0; marign-bottom: 0;
} }
...@@ -328,56 +413,98 @@ ...@@ -328,56 +413,98 @@
} }
.name { .name {
font-size: 29rpx; font-size: 30rpx;
color: #333; font-weight: 700;
color: #000000;
} }
.price { .price {
font-size: 60rpx;
color: #000000;
font-weight: 700;
}
.price2 {
font-size: 40rpx; font-size: 40rpx;
}
.active1 {
color: #fd5350; color: #fd5350;
font-weight: 700;
} }
.origin { .active2 {
color: #5A3C0F; color: #6D301D;
// background: #5a1505;
background-image: linear-gradient(90deg, #F3DEBE, #EAC180);
font-size: 22rpx;
border-radius: 20rpx;
height: 30rpx;
line-height: 30rpx;
padding-top: 4rpx;
padding-bottom: 3rpx;
padding-left: 16rpx;
padding-right: 16rpx;
} }
.cut-down {
.origin {
font-size: 26rpx;
margin: 0;
text-align: center;
color: #676666;
text-decoration: line-through;
}
.origin2 {
font-size: 26rpx;
text-align: center;
color: #676666;
word-wrap: break-word;
word-break: break-all;
white-space: pre-line;
}
.label {
margin-top: -4rpx;
margin-left: -4rpx;
border-radius: 20rpx 0 20rpx 0;
width: 80%;
background: linear-gradient(90deg, #FC4F3B, #FBCB7A);
color: white;
font-size: 24rpx;
height: 50rpx;
line-height: 50rpx;
margin-right: 20rpx;
text-align: center;
position: absolute; position: absolute;
top: 0; top: 0;
color: #fff; left: 0;
background: #ff502f; }
font-size: 22rpx;
border-radius: 15rpx; .label2 {
height: 30rpx; margin-bottom: -4rpx;
line-height: 30rpx; margin-left: -4rpx;
padding-top: 6rpx; margin-right: -4rpx;
padding-bottom: 3rpx; width: 100%;
padding-left: 16rpx; border-radius: 0 0 20rpx 20rpx;
padding-right: 16rpx; background-color: #FC4F3B;
transform: translate(0, -50%); color: white;
font-size: 24rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
position: absolute;
bottom: 0;
}
} }
} }
.pack-item:last-child {
margin-right: 30rpx;
}
} }
.apply-button { .apply-button {
width: 90%; border-radius: 50rpx;
border-radius: 10rpx; background: #e8c8ae;
background: #FFCB68; color: #8d5a29;
color: #6A3D1E; width: 550rpx;
margin: 30rpx auto; margin: 40rpx auto;
}
} }
.item-agree { .item-agree {
width: 100%; width: 100%;
display: flex; display: flex;
...@@ -387,6 +514,19 @@ ...@@ -387,6 +514,19 @@
margin-top: 16rpx; margin-top: 16rpx;
} }
.agreementWrp {
display: flex;
align-items: center;
color: darkgray;
font-size: 26rpx;
margin-top: 30rpx;
padding-left: 30rpx;
.agreementText {
color: #387EF4;
}
}
.trialStyle { .trialStyle {
height: 50rpx; height: 50rpx;
padding: 30rpx; padding: 30rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment