|
|
@@ -44,71 +44,70 @@
|
|
|
<view class="benefits-section">
|
|
|
<!-- 权益对比表格 -->
|
|
|
<view class="benefits-table">
|
|
|
- <view class="section-title">购买VIP, 享受更多权益</view>
|
|
|
- <!-- 表头 -->
|
|
|
- <view class="table-header">
|
|
|
- <view class="header-cell benefit-type">权益类型</view>
|
|
|
- <view class="header-cell basic">基础权益</view>
|
|
|
- <view class="header-cell regular active">
|
|
|
- <!-- <view class="plan-tag">生效中</view> -->
|
|
|
- <view class="plan-name">{{trialVersion.vipName}}</view>
|
|
|
- <!-- <view class="plan-expire">剩余5天到期</view> -->
|
|
|
- </view>
|
|
|
- <view class="header-cell vip">{{monthlyPayment.vipName}}</view>
|
|
|
- <view class="header-cell flagship recommended">
|
|
|
- <view class="plan-tag">推荐</view>
|
|
|
- <view class="plan-name">{{annual.vipName}}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 表格内容 -->
|
|
|
- <view class="table-row">
|
|
|
- <view class="row-cell benefit-type">在线普通职位</view>
|
|
|
- <view class="row-cell basic">1个</view>
|
|
|
- <view class="row-cell regular">{{trialVersion.vipPostTimes}}个</view>
|
|
|
- <view class="row-cell vip">{{monthlyPayment.vipPostTimes}}个</view>
|
|
|
- <view class="row-cell flagship">{{annual.vipPostTimes}}</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="table-row">
|
|
|
- <view class="row-cell benefit-type">在线急聘职位</view>
|
|
|
- <view class="row-cell basic">0个</view>
|
|
|
- <view class="row-cell regular">{{trialVersion.vipDueTimes}}个</view>
|
|
|
- <view class="row-cell vip">{{monthlyPayment.vipDueTimes}}个</view>
|
|
|
- <view class="row-cell flagship">{{annual.vipDueTimes}}个</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="table-row">
|
|
|
- <view class="row-cell benefit-type">每日查看总数</view>
|
|
|
- <view class="row-cell basic">5个</view>
|
|
|
- <view class="row-cell regular">{{trialVersion.vipViewTimes}}个</view>
|
|
|
- <view class="row-cell vip">{{monthlyPayment.vipViewTimes}}</view>
|
|
|
- <view class="row-cell flagship">{{annual.vipViewTimes}}</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="table-row">
|
|
|
- <view class="row-cell benefit-type">每日沟通总数</view>
|
|
|
- <view class="row-cell basic">5个</view>
|
|
|
- <view class="row-cell regular">{{trialVersion.vipConTimes}}个</view>
|
|
|
- <view class="row-cell vip">{{monthlyPayment.vipConTimes}}个</view>
|
|
|
- <view class="row-cell flagship">{{annual.vipConTimes}}个</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- <view class="table-row">
|
|
|
- <view class="row-cell benefit-type">查看沟通范围</view>
|
|
|
- <view class="row-cell basic">仅普通职位</view>
|
|
|
- <view class="row-cell regular">仅普通职位</view>
|
|
|
- <view class="row-cell vip">不限</view>
|
|
|
- <view class="row-cell flagship">不限</view>
|
|
|
- </view> -->
|
|
|
-
|
|
|
- <view class="table-row price-row">
|
|
|
- <view class="row-cell benefit-type">价格</view>
|
|
|
- <view class="row-cell basic">免费</view>
|
|
|
- <view class="row-cell regular">{{trialVersion.money}}/{{ vipNameTypeText(trialVersion.vipNameType) }}</view>
|
|
|
- <view class="row-cell vip">{{monthlyPayment.money}}/{{ vipNameTypeText(monthlyPayment.vipNameType) }}</view>
|
|
|
- <view class="row-cell flagship">{{annual.money}}/{{ vipNameTypeText(annual.vipNameType) }}</view>
|
|
|
- </view>
|
|
|
+ <view class="section-title">购买VIP, 享受更多权益</view>
|
|
|
+
|
|
|
+ <!-- 表头 -->
|
|
|
+ <view class="table-header">
|
|
|
+ <view class="header-cell benefit-type">权益类型</view>
|
|
|
+ <view class="header-cell basic">基础权益</view>
|
|
|
+ <view v-for="(vip, index) in viplist" :key="vip.id"
|
|
|
+ :class="['header-cell', index === 0 ? 'active' : index === 1 ? 'vip' : 'recommended']">
|
|
|
+ <view v-if="vip.vipName === vipName" class="plan-tag-left">生效中</view>
|
|
|
+ <view v-if="vip.vipName === '年度版'" class="plan-tag-right">推荐</view>
|
|
|
+ <view class="plan-name">{{ vip.vipName }}</view>
|
|
|
+ <view v-if="vip.vipName === vipName" style="font-size: 20rpx;">{{ endTimeStr ? endTimeStr.split(' ')[0] : '' }}到期</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 在线普通职位 -->
|
|
|
+ <view class="table-row">
|
|
|
+ <view class="row-cell benefit-type">在线普通职位</view>
|
|
|
+ <view class="row-cell basic">{{nonVipInfo.postTimes}}个</view>
|
|
|
+ <view v-for="(vip, index) in viplist" :key="vip.id"
|
|
|
+ :class="['row-cell', index === 0 ? 'regular' : index === 1 ? 'vip' : 'flagship']">
|
|
|
+ {{ vip.vipPostTimes }}个
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 在线急聘职位 -->
|
|
|
+ <view class="table-row">
|
|
|
+ <view class="row-cell benefit-type">在线急聘职位</view>
|
|
|
+ <view class="row-cell basic">{{nonVipInfo.dueTimes}}个</view>
|
|
|
+ <view v-for="(vip, index) in viplist" :key="vip.id"
|
|
|
+ :class="['row-cell', index === 0 ? 'regular' : index === 1 ? 'vip' : 'flagship']">
|
|
|
+ {{ vip.vipDueTimes }}个
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 每日查看总数 -->
|
|
|
+ <view class="table-row">
|
|
|
+ <view class="row-cell benefit-type">每日查看总数</view>
|
|
|
+ <view class="row-cell basic">{{nonVipInfo.viewTimes}}个</view>
|
|
|
+ <view v-for="(vip, index) in viplist" :key="vip.id"
|
|
|
+ :class="['row-cell', index === 0 ? 'regular' : index === 1 ? 'vip' : 'flagship']">
|
|
|
+ {{ vip.vipViewTimes }}个
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 每日沟通总数 -->
|
|
|
+ <view class="table-row">
|
|
|
+ <view class="row-cell benefit-type">每日沟通总数</view>
|
|
|
+ <view class="row-cell basic">{{nonVipInfo.conTimes}}个</view>
|
|
|
+ <view v-for="(vip, index) in viplist" :key="vip.id"
|
|
|
+ :class="['row-cell', index === 0 ? 'regular' : index === 1 ? 'vip' : 'flagship']">
|
|
|
+ {{ vip.vipConTimes }}个
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 价格 -->
|
|
|
+ <view class="table-row price-row">
|
|
|
+ <view class="row-cell benefit-type">价格</view>
|
|
|
+ <view class="row-cell basic">免费</view>
|
|
|
+ <view v-for="(vip, index) in viplist" :key="vip.id"
|
|
|
+ :class="['row-cell', index === 0 ? 'regular' : index === 1 ? 'vip' : 'flagship']">
|
|
|
+ {{ vip.money }}/{{ vipNameTypeText(vip.vipNameType) }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 说明文字 -->
|
|
|
@@ -173,6 +172,24 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <view style="padding: 32rpx;">
|
|
|
+ <view style="font-weight: 500;font-size: 16px;padding-bottom: 32rpx">
|
|
|
+ 支付方式
|
|
|
+ </view>
|
|
|
+ <view v-for="(item, i) in openLists" :key="i" @click="selectWay(item)">
|
|
|
+ <view class="rule-item">
|
|
|
+ <image
|
|
|
+ :src="item.id == openWay
|
|
|
+ ? require('@/static/images/jobApplicant/check.svg')
|
|
|
+ : require('@/static/images/jobApplicant/border.svg')"
|
|
|
+ mode="scaleToFill"
|
|
|
+ />
|
|
|
+ <text>{{ item.text }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
|
|
|
<!-- 支付按钮 -->
|
|
|
<view class="payment-button" @click="confirmPayment">
|
|
|
@@ -191,6 +208,7 @@
|
|
|
// 当前会员信息
|
|
|
currentPlan: 'regular',
|
|
|
openWay: 1,
|
|
|
+ openLists:[],
|
|
|
isVip: false,
|
|
|
isVipC: "",
|
|
|
dataTime: "", //到期时间
|
|
|
@@ -210,18 +228,18 @@
|
|
|
viplist: [],
|
|
|
endTime:"",
|
|
|
createTime:"",
|
|
|
- remainingDays: 0, // 剩余天数
|
|
|
- vipName:"",
|
|
|
- vipStatus: "未开通VIP", // VIP状态文字(已过期/剩余x天到期/未开通VIP)
|
|
|
- totalValidDays: 0, // 总有效期天数(可选)
|
|
|
- myPostTimes:0,
|
|
|
- vipDueTimes:0,
|
|
|
- vipConTimes:0,
|
|
|
- myViewTimes:0,
|
|
|
- vipViewTimes:0,
|
|
|
- myConTimes:0,
|
|
|
- vipPostTimes:0,
|
|
|
- myDueTimes:0,
|
|
|
+ remainingDays: 0, // 剩余天数
|
|
|
+ vipName:"",
|
|
|
+ vipStatus: "未开通VIP", // VIP状态文字(已过期/剩余x天到期/未开通VIP)
|
|
|
+ totalValidDays: 0, // 总有效期天数(可选)
|
|
|
+ myPostTimes:0,
|
|
|
+ vipDueTimes:0,
|
|
|
+ vipConTimes:0,
|
|
|
+ myViewTimes:0,
|
|
|
+ vipViewTimes:0,
|
|
|
+ myConTimes:0,
|
|
|
+ vipPostTimes:0,
|
|
|
+ myDueTimes:0,
|
|
|
|
|
|
// 权益使用情况
|
|
|
benefits: {
|
|
|
@@ -251,9 +269,8 @@
|
|
|
vip: 1599,
|
|
|
flagship: 2599
|
|
|
},
|
|
|
- trialVersion:[],
|
|
|
- monthlyPayment:[],
|
|
|
- annual:[]
|
|
|
+ nonVipInfo:{},
|
|
|
+ endTimeStr:''
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
@@ -317,16 +334,13 @@
|
|
|
id: 1,
|
|
|
}, ];
|
|
|
}
|
|
|
-
|
|
|
this.openWay = 1;
|
|
|
// #endif
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
onShow() {
|
|
|
this.getUserInfoVipList();
|
|
|
this.selectVipDetails();
|
|
|
+ this.getNonVipDetails();
|
|
|
this.getVipdetile();
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -639,7 +653,8 @@
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
- selectWay: function(item) {
|
|
|
+ // 选择支付方式
|
|
|
+ selectWay(item) {
|
|
|
this.openWay = item.id;
|
|
|
},
|
|
|
//获取会员开通价格
|
|
|
@@ -671,12 +686,6 @@
|
|
|
if (this.viplist.length > 0) {
|
|
|
this.selectedPlan = this.viplist[0].id;
|
|
|
}
|
|
|
- if(res.data){
|
|
|
-
|
|
|
- }
|
|
|
- this.trialVersion = res.data[0];
|
|
|
- this.monthlyPayment = res.data[1];
|
|
|
- this.annual = res.data[2];
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: '暂无VIP套餐',
|
|
|
@@ -685,7 +694,20 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+ // 基础套餐
|
|
|
+ getNonVipDetails(){
|
|
|
+ this.$Request.get("/app/VipDetails/getNonVipDetails").then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.nonVipInfo = res.data;
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '暂无基础套餐',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
//获取个人信息
|
|
|
getUserInfo() {
|
|
|
this.$Request.get("/app/user/selectUserById").then((res) => {
|
|
|
@@ -728,17 +750,17 @@
|
|
|
this.$Request.get("/app/UserVip/selectUserVip").then((res) => {
|
|
|
if (res.code == 0) {
|
|
|
if(res.data){
|
|
|
- const endTimeStr = res.data.endTime; // 到期时间(格式:yyyy-MM-dd HH:mm:ss 或 yyyy-MM-dd)
|
|
|
+ this.endTimeStr = res.data.endTime; // 到期时间(格式:yyyy-MM-dd HH:mm:ss 或 yyyy-MM-dd)
|
|
|
const createTimeStr = res.data.createTime; // 创建时间(格式同上)
|
|
|
|
|
|
// 1. 时间字符串转时间戳(兼容不同格式)
|
|
|
- const endTime = this.formatTimeToTimestamp(endTimeStr);
|
|
|
+ const endTime = this.formatTimeToTimestamp(this.endTimeStr);
|
|
|
const createTime = this.formatTimeToTimestamp(createTimeStr);
|
|
|
const currentTime = new Date().getTime(); // 当前时间戳
|
|
|
|
|
|
// 2. 验证时间有效性
|
|
|
if (!endTime || !createTime) {
|
|
|
- console.error("时间格式错误", { endTimeStr, createTimeStr });
|
|
|
+ // console.error("时间格式错误", { endTimeStr, createTimeStr });
|
|
|
this.remainingDays = 0;
|
|
|
this.vipStatus = "已过期";
|
|
|
|
|
|
@@ -1022,12 +1044,13 @@
|
|
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
.table-header {
|
|
|
- display: grid;
|
|
|
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
|
+ display: flex;
|
|
|
+ // grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
|
background: #f8f9fa;
|
|
|
border-bottom: 4rpx solid #FFFFFF;
|
|
|
|
|
|
.header-cell {
|
|
|
+ flex:1;
|
|
|
padding: 12rpx;
|
|
|
color: rgba(23, 23, 37, 1);
|
|
|
font-family: DM Sans;
|
|
|
@@ -1082,7 +1105,7 @@
|
|
|
color: rgba(212, 131, 0, 1);
|
|
|
}
|
|
|
|
|
|
- .plan-tag {
|
|
|
+ .plan-tag-right {
|
|
|
position: absolute;
|
|
|
top: 0rpx;
|
|
|
right: 0rpx;
|
|
|
@@ -1114,6 +1137,38 @@
|
|
|
z-index: -1;
|
|
|
}
|
|
|
}
|
|
|
+ .plan-tag-left {
|
|
|
+ position: absolute;
|
|
|
+ top: 0rpx;
|
|
|
+ left: 0rpx;
|
|
|
+ background: linear-gradient(90.00deg, rgba(13, 39, 247, 1), rgba(19, 193, 234, 1) 100%);
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ font-family: DM Sans;
|
|
|
+ font-size: 12rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 14rpx;
|
|
|
+ letter-spacing: 0px;
|
|
|
+ text-align: left;
|
|
|
+ padding: 4rpx 12rpx;
|
|
|
+ border-radius: 16rpx 0rpx 16rpx 0rpx;
|
|
|
+ transform-origin: center;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ overflow: hidden;
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ background: inherit;
|
|
|
+ transform: rotate(-45deg);
|
|
|
+ z-index: -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
.plan-name {
|
|
|
font-size: 24rpx;
|
|
|
@@ -1129,8 +1184,8 @@
|
|
|
}
|
|
|
|
|
|
.table-row {
|
|
|
- display: grid;
|
|
|
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
|
+ display: flex;
|
|
|
+ // grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
|
border-bottom: 4rpx solid #FFFFFF;
|
|
|
|
|
|
&:last-child {
|
|
|
@@ -1151,6 +1206,7 @@
|
|
|
}
|
|
|
|
|
|
.row-cell {
|
|
|
+ flex: 1;
|
|
|
padding: 24rpx 12rpx;
|
|
|
font-size: 16rpx;
|
|
|
text-align: center;
|
|
|
@@ -1370,4 +1426,15 @@
|
|
|
font-weight: 600;
|
|
|
}
|
|
|
}
|
|
|
+ // 密码要求列表
|
|
|
+ .rule-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 8rpx;
|
|
|
+ image{
|
|
|
+ width: 32rpx;
|
|
|
+ height: 32rpx;
|
|
|
+ margin-right: 16rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|