|
@@ -5,49 +5,17 @@
|
|
|
<view class="content">
|
|
|
<!-- 套餐选择 -->
|
|
|
<view class="plan-list">
|
|
|
- <view class="p"
|
|
|
- ><view
|
|
|
- class="plan-card"
|
|
|
- :class="activeCurrent === 1 && 'active'"
|
|
|
- @click="activeCurrent = 1"
|
|
|
- >
|
|
|
- <view class="plan-title">
|
|
|
- {{ data[1]?.package_name }}
|
|
|
- <text class="plan-tag" v-if="data[1]?.is_automatic_renewal">首月</text>
|
|
|
- </view>
|
|
|
- <view class="plan-price">
|
|
|
- <text class="price">{{
|
|
|
- data[1]?.automatic_renewal_first_price
|
|
|
- }}</text>
|
|
|
- <view class="plan-origin"
|
|
|
- >¥{{ data[1]?.package_original_price }}</view
|
|
|
- >
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view
|
|
|
- class="plan-tip"
|
|
|
- v-if="data[1]?.is_automatic_renewal"
|
|
|
- :style="{
|
|
|
- opacity: activeCurrent === 1 ? 1 : 0,
|
|
|
- }"
|
|
|
- >每期自动续费{{
|
|
|
- data[1]?.automatic_renewal_price
|
|
|
- }}元,可取消</view
|
|
|
- ></view
|
|
|
- >
|
|
|
-
|
|
|
<view
|
|
|
class="plan-card"
|
|
|
- :class="activeCurrent === 0 && 'active'"
|
|
|
- @click="activeCurrent = 0"
|
|
|
+ v-for="(item, index) in data"
|
|
|
+ :class="activeCurrent === index && 'active'"
|
|
|
+ @click="activeCurrent = index"
|
|
|
>
|
|
|
- <view class="plan-title">{{ data[0]?.package_name }}</view>
|
|
|
+ <view class="plan-title">{{ item?.package_name }}</view>
|
|
|
<view class="plan-price">
|
|
|
- <text class="price">{{
|
|
|
- data[0]?.package_preferential_price
|
|
|
- }}</text>
|
|
|
+ <text class="price">{{ item?.package_preferential_price }}</text>
|
|
|
<view class="plan-origin"
|
|
|
- >¥{{ data[0]?.package_original_price }}</view
|
|
|
+ >¥{{ item?.package_original_price }}</view
|
|
|
>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -55,15 +23,12 @@
|
|
|
|
|
|
<!-- 权益展示 -->
|
|
|
<div class="title">权益展示</div>
|
|
|
- <view class="benefit" v-show="activeCurrent === 1">
|
|
|
- <view v-for="item in data[1]?.binding_rights_info" :key="item.id">{{
|
|
|
- item.authority_title
|
|
|
- }}</view>
|
|
|
- </view>
|
|
|
- <view class="benefit" v-show="activeCurrent === 0">
|
|
|
- <view v-for="item in data[0]?.binding_rights_info" :key="item.id">{{
|
|
|
- item.authority_title
|
|
|
- }}</view>
|
|
|
+ <view class="benefit">
|
|
|
+ <view
|
|
|
+ v-for="item in data[activeCurrent]?.binding_rights_info"
|
|
|
+ :key="item.id"
|
|
|
+ >{{ item.authority_title }}</view
|
|
|
+ >
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 底部按钮 -->
|
|
@@ -112,16 +77,16 @@ import ext from "../../ext.json";
|
|
|
|
|
|
const instance = getCurrentInstance();
|
|
|
|
|
|
-const activeCurrent = ref(1);
|
|
|
+const activeCurrent = ref(0);
|
|
|
const isSelected = ref([0]);
|
|
|
const data = ref([]);
|
|
|
|
|
|
const onSubmit = () => {
|
|
|
- // if (!isSelected.value[0])
|
|
|
- // return uni.showToast({
|
|
|
- // icon: "none",
|
|
|
- // title: "请阅读并确认",
|
|
|
- // });
|
|
|
+ if (!isSelected.value[0])
|
|
|
+ return uni.showToast({
|
|
|
+ icon: "none",
|
|
|
+ title: "请阅读并确认",
|
|
|
+ });
|
|
|
uni.login({
|
|
|
provider: instance.proxy.$mpPlatform.substring(3),
|
|
|
success: async ({ code }) => {
|
|
@@ -219,8 +184,7 @@ onMounted(async () => {
|
|
|
gap: 52rpx;
|
|
|
color: #666666;
|
|
|
&.active {
|
|
|
- color: $uni-primary;
|
|
|
- border-color: $uni-primary;
|
|
|
+ border-color: #e7c8ac;
|
|
|
}
|
|
|
.plan-title {
|
|
|
font-size: 28rpx;
|
|
@@ -246,6 +210,7 @@ onMounted(async () => {
|
|
|
.price {
|
|
|
font-size: 60rpx;
|
|
|
font-weight: bold;
|
|
|
+ color: $error;
|
|
|
::before {
|
|
|
content: "¥";
|
|
|
font-size: 32rpx;
|
|
@@ -317,7 +282,7 @@ onMounted(async () => {
|
|
|
|
|
|
.open-btn {
|
|
|
width: 100%;
|
|
|
- background: $uni-primary;
|
|
|
+ background: linear-gradient( 90deg, #F0DFCD 0%, #E7C8AC 100%);
|
|
|
color: #fff;
|
|
|
font-size: 32rpx;
|
|
|
border-radius: 12rpx;
|
|
@@ -328,7 +293,7 @@ onMounted(async () => {
|
|
|
border: none;
|
|
|
margin-top: 0;
|
|
|
&:active {
|
|
|
- background: $uni-primary-disable;
|
|
|
+ background: linear-gradient( 90deg, #F0DFCD 0%, #E7C8AC 100%);
|
|
|
}
|
|
|
}
|
|
|
</style>
|