|
|
@ -4,12 +4,15 @@ |
|
|
|
<image style="width: 100%;height: 600rpx;" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/vip%E9%A2%98%E5%BA%93_20230911211532.png"></image> |
|
|
|
<image style="width: 100%;height: 600rpx;" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/vip%E9%A2%98%E5%BA%93_20230911211532.png"></image> |
|
|
|
<view style="margin-bottom: 100px;"> |
|
|
|
<view style="margin-bottom: 100px;"> |
|
|
|
<view class="flex jc-fa ai-c wp100 p14"> |
|
|
|
<view class="flex jc-fa ai-c wp100 p14"> |
|
|
|
<view style="width: 33.3%;" v-for="(item,index) of priceList" :key="index"> |
|
|
|
<view style="width: 33.3%;" v-for="(item, index) of priceList" :key="index"> |
|
|
|
<view class="option_tem relative" :class="checkedId===item.memberId?'checked_item':''" @click="checkPrice(item.memberId,item.price)"> |
|
|
|
<view class="option_tem relative" :class="checkedId === item.memberId ? 'checked_item' : ''" @click="checkPrice(item.memberId, item.price)"> |
|
|
|
<text class="fw600 fs12 cor-333">{{item.memberName}}</text> |
|
|
|
<text class="fw600 fs12 cor-333">{{ item.memberName }}</text> |
|
|
|
<view class="mt5"> |
|
|
|
<view class="mt5" v-if="!isIOS"> |
|
|
|
<text class="fs14" style="color: #FF6E02;">¥</text> |
|
|
|
<text class="fs14" style="color: #FF6E02;">¥</text> |
|
|
|
<text class="fs30 fw600" style="color: #FF6E02;">{{item.price}}</text> |
|
|
|
<text class="fs30 fw600" style="color: #FF6E02;">{{ item.price }}</text> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-else class="mt5"> |
|
|
|
|
|
|
|
<text class="fs14" style="color: #FF6E02;">iOS暂不支持</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<text class="fs12 cor-999">一年有效</text> |
|
|
|
<text class="fs12 cor-999">一年有效</text> |
|
|
|
<!-- <view class="bottom_box fs12 cor-333" :class="checkedId===item.memberId?'checked_bottom':''">赠送vip题库</view> --> |
|
|
|
<!-- <view class="bottom_box fs12 cor-333" :class="checkedId===item.memberId?'checked_bottom':''">赠送vip题库</view> --> |
|
|
@ -21,12 +24,12 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="intr_box p14"> |
|
|
|
<view class="intr_box p14"> |
|
|
|
<view class="fw600 fs16 cor-000">尊享以下权益</view> |
|
|
|
<view class="fw600 fs16 cor-000">尊享以下权益</view> |
|
|
|
<view class="flex ai-c jc-sb mt15" v-if="subject=='1'||subject=='4'"> |
|
|
|
<view class="flex ai-c jc-sb mt15" v-if="subject == '1' || subject == '4'"> |
|
|
|
<view class="text-center" style="width: 33%"> |
|
|
|
<view class="text-center" style="width: 33%"> |
|
|
|
<view class="wp100 flex ai-c jc-c mb5"> |
|
|
|
<view class="wp100 flex ai-c jc-c mb5"> |
|
|
|
<image style="width: 63rpx;height: 63rpx;margin-right: 5px;" src="../../static/image/index/vip500.png"></image> |
|
|
|
<image style="width: 63rpx;height: 63rpx;margin-right: 5px;" src="../../static/image/index/vip500.png"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<text>精简{{titleNum}}题</text> |
|
|
|
<text>精简{{ titleNum }}题</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="text-center" style="width: 33%;"> |
|
|
|
<view class="text-center" style="width: 33%;"> |
|
|
|
<view class="wp100 flex ai-c jc-c mb5"> |
|
|
|
<view class="wp100 flex ai-c jc-c mb5"> |
|
|
@ -59,14 +62,14 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="wp100 mt15" v-if="subject=='1'||subject=='4'"> |
|
|
|
<view class="wp100 mt15" v-if="subject == '1' || subject == '4'"> |
|
|
|
<image class="wp100" mode="widthFix" :src="picUrl"></image> |
|
|
|
<image class="wp100" mode="widthFix" :src="picUrl"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="wp100 p14" style="position: absolute;left: 0;bottom:20px" @tap="handlePay()"> |
|
|
|
<view v-if="!isIOS" class="wp100 p14" style="position: absolute;left: 0;bottom:20px" @tap="handlePay()"> |
|
|
|
<view class="sub_btn flex ai-c jc-sb"> |
|
|
|
<view class="sub_btn flex ai-c jc-sb"> |
|
|
|
<text class="cor-fff fs14">¥<text class="fs24 cor-fff">{{nowPrice}}</text></text> |
|
|
|
<text class="cor-fff fs14">¥<text class="fs24 cor-fff">{{ nowPrice }}</text></text> |
|
|
|
<image style="width: 276rpx;height: 88rpx;margin-top: -5px;" src="../../static/image/index/buy.png"></image> |
|
|
|
<image style="width: 276rpx;height: 88rpx;margin-top: -5px;" src="../../static/image/index/buy.png"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -74,36 +77,38 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { |
|
|
|
import { |
|
|
|
mapState, |
|
|
|
mapState, |
|
|
|
mapActions |
|
|
|
mapActions |
|
|
|
} from 'pinia' //引入映射函数 |
|
|
|
} from 'pinia' //引入映射函数 |
|
|
|
import { getVipList } from '@/jtools/api/vip' |
|
|
|
import { getVipList } from '@/jtools/api/vip' |
|
|
|
import { querySysConfig } from '@/jtools/api/question'; |
|
|
|
import { querySysConfig } from '@/jtools/api/question'; |
|
|
|
import storage from '@/jtools/storage'; |
|
|
|
import storage from '@/jtools/storage'; |
|
|
|
import Pay from '@/jtools/pay/index.js'; |
|
|
|
import Pay from '@/jtools/pay/index.js'; |
|
|
|
import useUserStore from '@/jtools/store/user' |
|
|
|
import useUserStore from '@/jtools/store/user' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data(){ |
|
|
|
data() { |
|
|
|
return{ |
|
|
|
return { |
|
|
|
picUrl:'', |
|
|
|
picUrl: '', |
|
|
|
titleNum:500, |
|
|
|
titleNum: 500, |
|
|
|
subject:'1', |
|
|
|
subject: '1', |
|
|
|
loading:true, |
|
|
|
loading: true, |
|
|
|
nowPrice:168, |
|
|
|
nowPrice: 168, |
|
|
|
checkedId:0, |
|
|
|
checkedId: 0, |
|
|
|
priceList:[], |
|
|
|
priceList: [], |
|
|
|
order:{ |
|
|
|
order: { |
|
|
|
money:0, |
|
|
|
money: 0, |
|
|
|
description:'会员充值' |
|
|
|
description: '会员充值' |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
isIOS: true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad(op){ |
|
|
|
onLoad(op) { |
|
|
|
if(op.subject){ |
|
|
|
this.isIOS = this.$platform.device().includes('ios') |
|
|
|
this.subject=op.subject |
|
|
|
if (op.subject) { |
|
|
|
|
|
|
|
this.subject = op.subject |
|
|
|
} |
|
|
|
} |
|
|
|
this.loading=true |
|
|
|
this.loading = true |
|
|
|
this.getVipList() |
|
|
|
this.getVipList() |
|
|
|
this.getWXOpenId() |
|
|
|
this.getWXOpenId() |
|
|
|
this.getTitle() |
|
|
|
this.getTitle() |
|
|
@ -113,28 +118,28 @@ |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
...mapState(useUserStore, ["userInfo"]) |
|
|
|
...mapState(useUserStore, ["userInfo"]) |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
methods: { |
|
|
|
getPic(){ |
|
|
|
getPic() { |
|
|
|
const currentCartype = storage.get('carType') || '1001' |
|
|
|
const currentCartype = storage.get('carType') || '1001' |
|
|
|
querySysConfig(currentCartype, 'VipDescImageUrl').then(res => { |
|
|
|
querySysConfig(currentCartype, 'VipDescImageUrl').then(res => { |
|
|
|
this.picUrl = JSON.parse(res.data.configJson).url |
|
|
|
this.picUrl = JSON.parse(res.data.configJson).url |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
getTitle(){ |
|
|
|
getTitle() { |
|
|
|
const carId=storage.get('carType') || '1001' |
|
|
|
const carId = storage.get('carType') || '1001' |
|
|
|
querySysConfig(carId,'SimplifyQuestionNum').then(resp=>{ |
|
|
|
querySysConfig(carId, 'SimplifyQuestionNum').then(resp => { |
|
|
|
if(resp.code==='0000'){ |
|
|
|
if (resp.code === '0000') { |
|
|
|
const list = JSON.parse(resp.data.configJson) |
|
|
|
const list = JSON.parse(resp.data.configJson) |
|
|
|
this.titleNum=list.find(item=>item.subject==this.subject).num |
|
|
|
this.titleNum = list.find(item => item.subject == this.subject).num |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
async handlePay(){ |
|
|
|
async handlePay() { |
|
|
|
if(this.loading){ |
|
|
|
if (this.loading) { |
|
|
|
this.loading=false |
|
|
|
this.loading = false |
|
|
|
await this.getWXOpenId() |
|
|
|
await this.getWXOpenId() |
|
|
|
new Pay('wechat', this.order); |
|
|
|
new Pay('wechat', this.order); |
|
|
|
this.loading=true |
|
|
|
this.loading = true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
getWXOpenId() { |
|
|
|
getWXOpenId() { |
|
|
@ -145,37 +150,37 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
getVipList(){ |
|
|
|
getVipList() { |
|
|
|
getVipList({ |
|
|
|
getVipList({ |
|
|
|
carTypeId: storage.get('carType') || '1001', |
|
|
|
carTypeId: storage.get('carType') || '1001', |
|
|
|
subject:this.subject |
|
|
|
subject: this.subject |
|
|
|
}).then(resp=>{ |
|
|
|
}).then(resp => { |
|
|
|
if(resp.code==='0000'){ |
|
|
|
if (resp.code === '0000') { |
|
|
|
this.priceList=resp.data |
|
|
|
this.priceList = resp.data |
|
|
|
this.checkedId=this.priceList[0].memberId |
|
|
|
this.checkedId = this.priceList[0].memberId |
|
|
|
this.order.outTradeNo=this.priceList[0].memberId |
|
|
|
this.order.outTradeNo = this.priceList[0].memberId |
|
|
|
this.order.money=this.priceList[0].price |
|
|
|
this.order.money = this.priceList[0].price |
|
|
|
this.nowPrice=this.priceList[0].price |
|
|
|
this.nowPrice = this.priceList[0].price |
|
|
|
this.priceList.forEach(item=>{ |
|
|
|
this.priceList.forEach(item => { |
|
|
|
if(item.subjects.length>1){ |
|
|
|
if (item.subjects.length > 1) { |
|
|
|
item.all=true |
|
|
|
item.all = true |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
checkPrice(val,price){ |
|
|
|
checkPrice(val, price) { |
|
|
|
this.checkedId=val |
|
|
|
this.checkedId = val |
|
|
|
this.order.outTradeNo=val |
|
|
|
this.order.outTradeNo = val |
|
|
|
this.nowPrice=price |
|
|
|
this.nowPrice = price |
|
|
|
this.order.money=price |
|
|
|
this.order.money = price |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
<style scoped> |
|
|
|
.option_tem{ |
|
|
|
.option_tem { |
|
|
|
width: 220rpx; |
|
|
|
width: 220rpx; |
|
|
|
height: 241rpx; |
|
|
|
height: 241rpx; |
|
|
|
text-align: center; |
|
|
|
text-align: center; |
|
|
@ -183,30 +188,34 @@ |
|
|
|
border: 2px solid #D8D8D8; |
|
|
|
border: 2px solid #D8D8D8; |
|
|
|
border-radius: 16rpx 46rpx 16rpx 16rpx; |
|
|
|
border-radius: 16rpx 46rpx 16rpx 16rpx; |
|
|
|
padding: 14px; |
|
|
|
padding: 14px; |
|
|
|
} |
|
|
|
} |
|
|
|
.checked_item{ |
|
|
|
|
|
|
|
|
|
|
|
.checked_item { |
|
|
|
background: #FFF0E5; |
|
|
|
background: #FFF0E5; |
|
|
|
border: 4px solid #FF6E02; |
|
|
|
border: 4px solid #FF6E02; |
|
|
|
} |
|
|
|
} |
|
|
|
.bottom_box{ |
|
|
|
|
|
|
|
|
|
|
|
.bottom_box { |
|
|
|
width: 214rpx; |
|
|
|
width: 214rpx; |
|
|
|
height: 40rpx; |
|
|
|
height: 40rpx; |
|
|
|
line-height: 40rpx; |
|
|
|
line-height: 40rpx; |
|
|
|
text-align: center; |
|
|
|
text-align: center; |
|
|
|
background: rgb(239,239,239); |
|
|
|
background: rgb(239, 239, 239); |
|
|
|
border-radius: 0 0 16rpx 16rpx; |
|
|
|
border-radius: 0 0 16rpx 16rpx; |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
bottom: 0; |
|
|
|
bottom: 0; |
|
|
|
left: 0; |
|
|
|
left: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
.checked_bottom{ |
|
|
|
|
|
|
|
|
|
|
|
.checked_bottom { |
|
|
|
width: 218rpx; |
|
|
|
width: 218rpx; |
|
|
|
border-radius: 0 0 16rpx 5rpx; |
|
|
|
border-radius: 0 0 16rpx 5rpx; |
|
|
|
background-color: #FF6E02; |
|
|
|
background-color: #FF6E02; |
|
|
|
color:#fff |
|
|
|
color: #fff |
|
|
|
} |
|
|
|
} |
|
|
|
.tag{ |
|
|
|
|
|
|
|
padding:0 5px; |
|
|
|
.tag { |
|
|
|
|
|
|
|
padding: 0 5px; |
|
|
|
height: 36rpx; |
|
|
|
height: 36rpx; |
|
|
|
background: linear-gradient(90deg, #E66501 0%, #F8A42C 100%); |
|
|
|
background: linear-gradient(90deg, #E66501 0%, #F8A42C 100%); |
|
|
|
border-radius: 8rpx 20rpx 8rpx 8rpx; |
|
|
|
border-radius: 8rpx 20rpx 8rpx 8rpx; |
|
|
@ -216,16 +225,18 @@ |
|
|
|
color: #FFFC27; |
|
|
|
color: #FFFC27; |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
left: 10rpx; |
|
|
|
left: 10rpx; |
|
|
|
top:-18rpx |
|
|
|
top: -18rpx |
|
|
|
} |
|
|
|
} |
|
|
|
.intr_box{ |
|
|
|
|
|
|
|
|
|
|
|
.intr_box { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
text-align: center; |
|
|
|
text-align: center; |
|
|
|
padding: 40rpx; |
|
|
|
padding: 40rpx; |
|
|
|
background: #FFF0E5; |
|
|
|
background: #FFF0E5; |
|
|
|
border-radius: 16rpx; |
|
|
|
border-radius: 16rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.vip_item{ |
|
|
|
|
|
|
|
|
|
|
|
.vip_item { |
|
|
|
width: 208rpx; |
|
|
|
width: 208rpx; |
|
|
|
height: 54rpx; |
|
|
|
height: 54rpx; |
|
|
|
line-height: 54rpx; |
|
|
|
line-height: 54rpx; |
|
|
@ -233,28 +244,30 @@ |
|
|
|
font-size: 14px; |
|
|
|
font-size: 14px; |
|
|
|
background: #F3D7C2; |
|
|
|
background: #F3D7C2; |
|
|
|
border-radius: 0rpx 10rpx 10rpx 10rpx; |
|
|
|
border-radius: 0rpx 10rpx 10rpx 10rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.sub_btn{ |
|
|
|
|
|
|
|
width:100%; |
|
|
|
.sub_btn { |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
height: 110rpx; |
|
|
|
height: 110rpx; |
|
|
|
border: 4px solid #F59B26; |
|
|
|
border: 4px solid #F59B26; |
|
|
|
background: linear-gradient(0deg, #E66501 0%, #F8A42C 100%); |
|
|
|
background: linear-gradient(0deg, #E66501 0%, #F8A42C 100%); |
|
|
|
box-shadow: 0rpx 16rpx 20rpx 1rpx rgba(245,155,38,0.78); |
|
|
|
box-shadow: 0rpx 16rpx 20rpx 1rpx rgba(245, 155, 38, 0.78); |
|
|
|
border-radius: 55rpx; |
|
|
|
border-radius: 55rpx; |
|
|
|
padding: 14rpx; |
|
|
|
padding: 14rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.contain-box { |
|
|
|
|
|
|
|
|
|
|
|
.contain-box { |
|
|
|
width: 344rpx; |
|
|
|
width: 344rpx; |
|
|
|
height: 196rpx; |
|
|
|
height: 196rpx; |
|
|
|
background: #00B74F; |
|
|
|
background: #00B74F; |
|
|
|
border-radius: 16rpx; |
|
|
|
border-radius: 16rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.play_btn_2 { |
|
|
|
.play_btn_2 { |
|
|
|
width: 65rpx; |
|
|
|
width: 65rpx; |
|
|
|
height: 65rpx; |
|
|
|
height: 65rpx; |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
left: 165.5rpx; |
|
|
|
left: 165.5rpx; |
|
|
|
top: 78rpx |
|
|
|
top: 78rpx |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |