2024-06-05 19:16:02 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="content">
|
|
|
|
|
<!-- <image class="bgimg" src="../static/workbg.png" mode="widthFix"></image> -->
|
2024-06-12 15:52:21 +08:00
|
|
|
|
<!-- <image class="bgimg" src="https://admin.sjajk.com/file/uploadPath/2023/01/16/0bd832e6cd894903f6ad2ece7f07824a.png" style="height: 100vh;"></image> -->
|
2024-06-15 09:08:10 +08:00
|
|
|
|
<view class="bgbox" style="" v-if="vipShow==false">
|
2024-06-12 15:52:21 +08:00
|
|
|
|
<!-- <view class="" style="padding: 80rpx 0;text-align: center;">
|
2024-06-05 19:16:02 +08:00
|
|
|
|
<image src="../../static/ktvip.png" style="width: 513rpx;height: 79rpx;"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="vip_kapian">
|
|
|
|
|
<view style="position: absolute;z-index: 9;padding: 16rpx 40rpx;">
|
|
|
|
|
<view class="kapian_name">VIP会员</view>
|
|
|
|
|
<view class="kapian_text">会员享受超值VIP特权</view>
|
|
|
|
|
<view class="kapian_ktname" v-if="endTime">有效期至:{{endTime}}</view>
|
|
|
|
|
<view class="kapian_ktmoney" v-if="!isVip">------</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view> -->
|
2024-06-12 15:52:21 +08:00
|
|
|
|
<view class="bgbox-top">
|
|
|
|
|
<image src="../../static/vip/banner9.jpg" mode=""></image>
|
|
|
|
|
</view>
|
2024-06-05 19:16:02 +08:00
|
|
|
|
<view class="quanyi_view">
|
|
|
|
|
<view class="quanyi_titview">
|
2024-06-15 09:08:10 +08:00
|
|
|
|
<view class="quanyi_titview-list" v-if="vipData.isVip!=1">
|
2024-06-12 15:52:21 +08:00
|
|
|
|
<view v-for="(item,index) in vipList" :key='index' @click="select(item)" class="vip-list">
|
|
|
|
|
<view class="biaoqian">新用户特惠</view>
|
2024-06-05 19:16:02 +08:00
|
|
|
|
<view class="text-center flex flex-direction justify-between padding-tb radius"
|
|
|
|
|
:class="selNum == item.id?'active': 'noactive'">
|
|
|
|
|
<view class="text-bold" style="font-size: 36rpx;">{{item.vipName}}</view>
|
2024-06-12 15:52:21 +08:00
|
|
|
|
<view class="text-bold" style="font-size: 30rpx;"> <text class="text-xxl" style="font-size: 37rpx;margin-left: 10rpx;color: #D33232;"><text style="font-size: 14px;">¥</text>{{item.money}}</text></view>
|
2024-06-05 19:16:02 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-06-15 09:08:10 +08:00
|
|
|
|
<view class="save_vipbtn" v-if="vipData.isVip!=1" @tap="showpay = true">立即开通</view>
|
2024-06-12 15:52:21 +08:00
|
|
|
|
<view class="quanyi_titname">~VIP超值权益~</view>
|
|
|
|
|
<view class="quanyi_itemview" style="margin-bottom: 60rpx;">
|
2024-06-15 09:08:10 +08:00
|
|
|
|
<view class="quanyi_listitem">
|
|
|
|
|
<image src="../../static/vip/zuanshi.png"></image>
|
2024-07-02 15:25:43 +08:00
|
|
|
|
<view class="listitem_name">专享{{rateStr}}折</view>
|
2024-06-15 09:08:10 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="quanyi_listitem">
|
|
|
|
|
<image src="../../static/vip/wangguan.png"></image>
|
|
|
|
|
<view class="listitem_name">身份标识</view>
|
2024-06-12 15:52:21 +08:00
|
|
|
|
</view>
|
2024-06-05 19:16:02 +08:00
|
|
|
|
</view>
|
2024-06-12 15:52:21 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="bgbox" style="" v-else>
|
|
|
|
|
<view class="bgbox-top-show">
|
|
|
|
|
<image src="../../static/vip/membership.png" mode=""></image>
|
2024-06-30 19:11:56 +08:00
|
|
|
|
<view class="bgbox-top-show-youxiao">
|
|
|
|
|
到期时间 {{timeVipEnd}}
|
|
|
|
|
</view>
|
2024-06-12 15:52:21 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="bgbox-mian">VIP超值权益</view>
|
|
|
|
|
<view class="quanyi_view">
|
|
|
|
|
<view class="quanyi_titview">
|
|
|
|
|
<view class="quanyi_titname">~VIP超值权益~</view>
|
2024-06-05 19:16:02 +08:00
|
|
|
|
<view class="quanyi_itemview" style="margin-bottom: 60rpx;">
|
2024-06-15 09:08:10 +08:00
|
|
|
|
<view class="quanyi_listitem">
|
|
|
|
|
<image src="../../static/vip/zuanshi.png"></image>
|
2024-06-30 19:11:56 +08:00
|
|
|
|
<view class="listitem_name">专享{{rateStr}}折</view>
|
2024-06-15 09:08:10 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="quanyi_listitem">
|
|
|
|
|
<image src="../../static/vip/wangguan.png"></image>
|
|
|
|
|
<view class="listitem_name">身份标识</view>
|
2024-06-05 19:16:02 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 支付方式 -->
|
|
|
|
|
<u-popup v-model="showpay" mode="bottom">
|
|
|
|
|
<view class="popup_pay">
|
|
|
|
|
<view style="background-color: #fff;">
|
|
|
|
|
<view style="padding: 0 20upx;margin-top: 30rpx;margin-bottom: 20rpx;">
|
|
|
|
|
<view
|
|
|
|
|
style="display: flex;height: 100upx;align-items: center;padding: 20upx 0;justify-content: center;"
|
|
|
|
|
v-for="(item,index) in openLists" :key='index'>
|
|
|
|
|
<image :src="item.image" style="width: 55upx;height: 55upx;border-radius: 50upx;">
|
|
|
|
|
</image>
|
|
|
|
|
<view style="font-size: 30upx;margin-left: 20upx;width: 70%;">
|
|
|
|
|
{{item.text}}
|
|
|
|
|
</view>
|
|
|
|
|
<radio-group name="openWay" style="margin-left: 45upx;" @tap='selectWay(item.id)'>
|
|
|
|
|
<label class="tui-radio">
|
2024-07-02 10:41:38 +08:00
|
|
|
|
<radio color="#019c88" :checked="openWay === item.id ? true : false" />
|
2024-06-05 19:16:02 +08:00
|
|
|
|
</label>
|
|
|
|
|
</radio-group>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="pay_btn" @click="pay()">确认支付</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2024-06-30 19:11:56 +08:00
|
|
|
|
timeVipEnd: '',
|
2024-06-05 19:16:02 +08:00
|
|
|
|
customStyle: {
|
|
|
|
|
width: '250rpx',
|
|
|
|
|
color: '#402321',
|
|
|
|
|
background: "#DFC5A7",
|
|
|
|
|
border: 0,
|
|
|
|
|
fontWeight: '700'
|
|
|
|
|
},
|
|
|
|
|
avatar: '',
|
|
|
|
|
userName: '匿名',
|
|
|
|
|
vipList: [],
|
|
|
|
|
selNum: 0,
|
|
|
|
|
newPrice: 0,
|
|
|
|
|
money: 0,
|
|
|
|
|
price: 0,
|
|
|
|
|
MemberList: [],
|
|
|
|
|
isVip: true,
|
|
|
|
|
openLists: [],
|
|
|
|
|
openWay: 2,
|
|
|
|
|
showpay: false,
|
2024-06-15 09:08:10 +08:00
|
|
|
|
vipData:[],
|
2024-06-30 19:11:56 +08:00
|
|
|
|
vipShow:false,
|
|
|
|
|
rateStr:''
|
2024-06-05 19:16:02 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad() {
|
|
|
|
|
this.avatar = uni.getStorageSync('avatar')
|
|
|
|
|
this.userName = uni.getStorageSync('userName')
|
|
|
|
|
// #ifdef MP-WEIXIN
|
|
|
|
|
this.openWay = 1;
|
|
|
|
|
this.openLists = [{
|
|
|
|
|
image: '../static/icon_weixin.png',
|
|
|
|
|
text: '微信',
|
|
|
|
|
id: 1
|
|
|
|
|
}, {
|
|
|
|
|
image: '../../static/images/lingqian.png',
|
|
|
|
|
text: '余额',
|
|
|
|
|
id: 3
|
|
|
|
|
}]
|
|
|
|
|
// #endif
|
|
|
|
|
// #ifndef MP-WEIXIN
|
|
|
|
|
this.openWay = 1;
|
|
|
|
|
this.openLists = [{
|
|
|
|
|
image: '../static/icon_weixin.png',
|
|
|
|
|
text: '微信',
|
|
|
|
|
id: 1
|
|
|
|
|
}, {
|
|
|
|
|
image: '../static/zhifubao.png',
|
|
|
|
|
text: '支付宝',
|
|
|
|
|
id: 2
|
|
|
|
|
}, {
|
|
|
|
|
image: '../../static/images/lingqian.png',
|
|
|
|
|
text: '余额',
|
|
|
|
|
id: 3
|
|
|
|
|
}]
|
|
|
|
|
// #endif
|
2024-07-02 15:25:43 +08:00
|
|
|
|
this.getVipList()
|
2024-06-05 19:16:02 +08:00
|
|
|
|
this.getvipEndTime();
|
|
|
|
|
this.getMemberList()
|
|
|
|
|
this.getMoney()
|
2024-06-26 11:35:32 +08:00
|
|
|
|
this.getIsVip()
|
2024-07-02 20:57:04 +08:00
|
|
|
|
|
2024-06-05 19:16:02 +08:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
2024-07-02 15:25:43 +08:00
|
|
|
|
select(e) {
|
|
|
|
|
this.selNum = e.id;
|
|
|
|
|
this.price = e.money;
|
|
|
|
|
this.vipData.rateStr=e.rateStr;
|
|
|
|
|
this.rateStr=e.rateStr;
|
|
|
|
|
console.log("rateStr",e)
|
|
|
|
|
},
|
2024-06-05 19:16:02 +08:00
|
|
|
|
selectWay: function(id) {
|
|
|
|
|
this.openWay = id;
|
|
|
|
|
},
|
|
|
|
|
getvipEndTime() {
|
|
|
|
|
this.$Request.get("/app/UserVip/selectUserVip").then(res => {
|
2024-06-30 19:11:56 +08:00
|
|
|
|
if (res.code == 0) {
|
2024-07-02 20:57:04 +08:00
|
|
|
|
var data= res.data.endTime||{};
|
|
|
|
|
this.$queue.setData('isVIP',res.data.isVip)
|
|
|
|
|
this.vipData=res.data.isVip
|
|
|
|
|
console.log("isVIP------------------->",this.vipData)
|
|
|
|
|
if(this.vipData=='1'){
|
|
|
|
|
this.vipShow=true;
|
|
|
|
|
}else{
|
|
|
|
|
this.vipData=[]
|
|
|
|
|
this.vipShow=false
|
|
|
|
|
}
|
2024-06-30 19:11:56 +08:00
|
|
|
|
this.timeVipEnd = data.slice(0,16);
|
|
|
|
|
this.getVipList(res.data.vipNameType)
|
2024-06-05 19:16:02 +08:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//获取VIP列表
|
2024-06-30 19:11:56 +08:00
|
|
|
|
getVipList(vipNameType) {
|
|
|
|
|
var that=this;
|
|
|
|
|
var vipNameType=vipNameType;
|
|
|
|
|
that.$Request.get('/app/VipDetails/selectVipDetails').then(res => {
|
2024-06-05 19:16:02 +08:00
|
|
|
|
if (res.code == 0) {
|
2024-06-30 19:11:56 +08:00
|
|
|
|
that.vipList = res.data;
|
|
|
|
|
// that.rateStr=that.vipList[0].rateStr;
|
2024-07-02 15:25:43 +08:00
|
|
|
|
// for(var i=0;i<res.data.length;i++){
|
|
|
|
|
// if(vipNameType==res.data[i].vipNameType){
|
|
|
|
|
// that.rateStr=res.data[i].rateStr
|
|
|
|
|
// that.selNum = res.data[i].id
|
|
|
|
|
// that.price = res.data[i].money
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
that.rateStr=res.data[0].rateStr
|
|
|
|
|
that.selNum = res.data[0].id
|
|
|
|
|
that.price = res.data[0].money
|
|
|
|
|
// for(var i=0;i<res.data.length;i++){
|
|
|
|
|
// that.selNum = res.data[i].id
|
|
|
|
|
// that.price = res.data[i].money
|
|
|
|
|
// }
|
2024-06-05 19:16:02 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 获取特权列表
|
|
|
|
|
getMemberList() {
|
|
|
|
|
this.$Request.get('/app/member/selectMemberList').then(res => {
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
this.MemberList = res.data
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getIsVip() {
|
|
|
|
|
this.$Request.get("/app/UserVip/isUserVip").then(res => {
|
|
|
|
|
if (res.code == 0) {
|
2024-06-30 19:11:56 +08:00
|
|
|
|
this.isVip = res.data;
|
|
|
|
|
|
2024-06-05 19:16:02 +08:00
|
|
|
|
this.$queue.setData('isVIP',this.isVip)
|
|
|
|
|
if (this.isVip) {
|
|
|
|
|
this.getvipEndTime();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 我的金元
|
|
|
|
|
getMoney() {
|
|
|
|
|
this.$Request.get("/app/userMoney/selectMyMoney").then(res => {
|
|
|
|
|
if (res.code == 0 && res.data) {
|
|
|
|
|
this.money = res.data.money
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-07-02 15:25:43 +08:00
|
|
|
|
|
2024-06-05 19:16:02 +08:00
|
|
|
|
pay() {
|
|
|
|
|
this.getMoney()
|
|
|
|
|
this.showpay = false;
|
2024-07-02 15:25:43 +08:00
|
|
|
|
// this.$queue.showLoading('支付中...')
|
2024-06-05 19:16:02 +08:00
|
|
|
|
let that = this;
|
|
|
|
|
let data = {
|
|
|
|
|
id: this.selNum,
|
|
|
|
|
type: '2'
|
|
|
|
|
}
|
|
|
|
|
if (this.openWay == 1) {
|
|
|
|
|
// #ifdef MP-WEIXIN
|
|
|
|
|
that.$Request.postT("/app/wxPay/payUserVip", {
|
|
|
|
|
vipDetailsId: that.selNum,
|
|
|
|
|
type: 3
|
|
|
|
|
}).then(red => {
|
|
|
|
|
if (red.code == 0) {
|
|
|
|
|
uni.requestPayment({
|
|
|
|
|
provider: 'wxpay',
|
|
|
|
|
timeStamp: red.data.timestamp,
|
|
|
|
|
nonceStr: red.data.noncestr,
|
|
|
|
|
package: red.data.package,
|
|
|
|
|
signType: red.data.signType,
|
|
|
|
|
paySign: red.data.sign,
|
|
|
|
|
success: function(redd) {
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '开通成功!'
|
|
|
|
|
})
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
that.isVip = true
|
|
|
|
|
that.getIsVip()
|
|
|
|
|
}, 1000)
|
|
|
|
|
},
|
|
|
|
|
fail: function(err) {
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
that.$queue.showToast(
|
|
|
|
|
'支付失败');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: red.msg,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// #endif
|
|
|
|
|
|
|
|
|
|
// #ifdef H5
|
|
|
|
|
let ua = navigator.userAgent.toLowerCase();
|
|
|
|
|
console.log(ua)
|
|
|
|
|
if (ua.indexOf('micromessenger') !== -1) {
|
|
|
|
|
that.$Request.post("/app/wxPay/payUserVip", {
|
|
|
|
|
vipDetailsId: that.selNum,
|
|
|
|
|
type: 2
|
|
|
|
|
}).then(red => {
|
|
|
|
|
if (red.code == 0) {
|
|
|
|
|
that.callPay(red.data);
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: red.msg,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
that.$Request.post("/app/wxPay/payUserVip", {
|
|
|
|
|
vipDetailsId: that.selNum,
|
|
|
|
|
type: 4
|
|
|
|
|
}).then(red => {
|
|
|
|
|
if (red.code == 0) {
|
|
|
|
|
const urlArr = window.location.href;
|
|
|
|
|
const hostUrl = urlArr.split("/");
|
|
|
|
|
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
|
|
|
|
|
const url = '&redirect_url=' + callBack + 'my/vip/index';
|
|
|
|
|
window.location = red.data.mweb_url + url
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: red.msg,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// #endif
|
|
|
|
|
|
|
|
|
|
// #ifdef APP-PLUS
|
|
|
|
|
that.$Request.post("/app/wxPay/payUserVip", {
|
|
|
|
|
vipDetailsId: that.selNum,
|
|
|
|
|
type: 1
|
|
|
|
|
}).then(red => {
|
|
|
|
|
if (red.code == 0) {
|
|
|
|
|
console.log(JSON.stringify(red))
|
|
|
|
|
that.setPayment('wxpay', JSON.stringify(red
|
|
|
|
|
.data));
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: red.msg,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// #endif
|
|
|
|
|
} else if (this.openWay == 2) {
|
|
|
|
|
// #ifdef H5
|
|
|
|
|
that.$Request.post("/app/aliPay/payUserVip ", {
|
|
|
|
|
vipDetailsId: that.selNum,
|
|
|
|
|
classify: 2
|
|
|
|
|
}).then(red => {
|
|
|
|
|
if (red.code == 0) {
|
|
|
|
|
const div = document.createElement('div')
|
|
|
|
|
div.innerHTML = red.data //此处form就是后台返回接收到的数据
|
|
|
|
|
document.body.appendChild(div)
|
|
|
|
|
document.forms[0].submit()
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: red.msg,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// #endif
|
|
|
|
|
// #ifdef APP-PLUS
|
|
|
|
|
that.$Request.post("/app/aliPay/payUserVip", {
|
|
|
|
|
vipDetailsId: that.selNum,
|
|
|
|
|
classify: 1
|
|
|
|
|
}).then(red => {
|
|
|
|
|
if (red.code == 0) {
|
|
|
|
|
that.setPayment('alipay', red.data);
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: red.msg,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// #endif
|
|
|
|
|
} else if (this.openWay == 3) {
|
|
|
|
|
if (this.money >= this.price) {
|
|
|
|
|
this.$Request.postT('/app/artificer/payUserVip', {
|
|
|
|
|
vipDetailsId: this.selNum
|
|
|
|
|
}).then(res => {
|
|
|
|
|
console.log(res.data)
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
this.isVip = true
|
|
|
|
|
this.getIsVip()
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '开通成功!'
|
|
|
|
|
})
|
|
|
|
|
// setTimeout(function() {
|
|
|
|
|
// uni.navigateBack()
|
|
|
|
|
// },1000)
|
|
|
|
|
} else {
|
|
|
|
|
this.$queue.showToast(res.msg)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '当前账户余额不足,请充值',
|
|
|
|
|
success: function(res) {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
console.log('用户点击确定');
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/my/wallet/index'
|
|
|
|
|
})
|
|
|
|
|
} else if (res.cancel) {
|
|
|
|
|
console.log('用户点击取消');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
callPay: function(response) {
|
|
|
|
|
if (typeof WeixinJSBridge === "undefined") {
|
|
|
|
|
if (document.addEventListener) {
|
|
|
|
|
document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady(response), false);
|
|
|
|
|
} else if (document.attachEvent) {
|
|
|
|
|
document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady(response));
|
|
|
|
|
document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady(response));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.onBridgeReady(response);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onBridgeReady: function(response) {
|
|
|
|
|
let that = this;
|
|
|
|
|
if (!response.package) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
WeixinJSBridge.invoke(
|
|
|
|
|
'getBrandWCPayRequest', {
|
|
|
|
|
"appId": response.appid, //公众号名称,由商户传入
|
|
|
|
|
"timeStamp": response.timestamp, //时间戳,自1970年以来的秒数
|
|
|
|
|
"nonceStr": response.noncestr, //随机串
|
|
|
|
|
"package": response.package,
|
|
|
|
|
"signType": response.signType, //微信签名方式:
|
|
|
|
|
"paySign": response.sign //微信签名
|
|
|
|
|
},
|
|
|
|
|
function(res) {
|
|
|
|
|
if (res.err_msg === "get_brand_wcpay_request:ok") {
|
|
|
|
|
// 使用以上方式判断前端返回,微信团队郑重提示:
|
|
|
|
|
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
that.isVip = true
|
|
|
|
|
that.getIsVip()
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '开通成功!'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
}
|
|
|
|
|
WeixinJSBridge.log(response.err_msg);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
setPayment(name, order) {
|
|
|
|
|
let that = this;
|
|
|
|
|
uni.requestPayment({
|
|
|
|
|
provider: name,
|
|
|
|
|
orderInfo: order, //微信、支付宝订单数据
|
|
|
|
|
success: function(res) {
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
that.isVip = true
|
|
|
|
|
that.getIsVip()
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '开通成功!'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
fail: function(err) {
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
console.log(12)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2024-06-12 15:52:21 +08:00
|
|
|
|
.bgbox-mian{
|
|
|
|
|
width: 360rpx;
|
|
|
|
|
height: 66rpx;
|
|
|
|
|
line-height: 66rpx;
|
|
|
|
|
border: 1px solid #BFBFBF;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
font-size: 38rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #BBBBBB;
|
|
|
|
|
margin: 0px auto 100px auto;
|
|
|
|
|
}
|
|
|
|
|
/deep/.padding-tb{
|
|
|
|
|
padding: 22px 0px;
|
|
|
|
|
}
|
|
|
|
|
.quanyi_titview-list{
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
margin: 25px 0px;
|
|
|
|
|
}
|
|
|
|
|
.vip-list{
|
|
|
|
|
display: inline-block;
|
|
|
|
|
width: 201.39rpx;
|
|
|
|
|
height: 239.58rpx;
|
|
|
|
|
margin: 10rpx 10rpx;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
.biaoqian{
|
|
|
|
|
width: 80px;
|
|
|
|
|
height: 25px;
|
|
|
|
|
line-height: 25px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
background: linear-gradient(-90deg, #0CA891, #23BBA2);
|
|
|
|
|
border-radius: 17rpx;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
font-size: 17rpx;
|
|
|
|
|
color: #FFFFFF;
|
|
|
|
|
border-top-left-radius: 24px;
|
|
|
|
|
border-bottom-right-radius: 24px;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
margin-top: -11px;
|
|
|
|
|
margin-left: 14px;
|
|
|
|
|
}
|
|
|
|
|
.bgbox-top-show-youxiao{
|
|
|
|
|
width: 448rpx;
|
|
|
|
|
height: 42rpx;
|
|
|
|
|
background: #FFBE95;
|
|
|
|
|
border-radius: 21rpx;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 31rpx;
|
|
|
|
|
color: #FFE5D1;
|
|
|
|
|
line-height: 42rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
text-shadow: 0rpx 0rpx 3rpx rgba(218,139,85,0.48);
|
|
|
|
|
margin-bottom: 70px;
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
margin-left: 66px;
|
|
|
|
|
}
|
|
|
|
|
.bgbox-top-show image{
|
|
|
|
|
width: 560.42rpx;
|
|
|
|
|
height: 300.69rpx;
|
|
|
|
|
}
|
|
|
|
|
.bgbox-top-show{
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 536.11rpx;
|
|
|
|
|
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), #f7f7f7), url('../../static/background-img.png');
|
|
|
|
|
background-position: center center;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: cover;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
.bgbox-top{
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 536.11rpx;
|
|
|
|
|
// background-image: url("../../static/vip/banner9.jpg");
|
|
|
|
|
// background-repeat: no-repeat;
|
|
|
|
|
// background-size: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
.bgbox-top image{
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
}
|
|
|
|
|
.content {
|
|
|
|
|
width: 100%;
|
|
|
|
|
min-height: 100vh;
|
2024-06-12 15:52:21 +08:00
|
|
|
|
background-color: #f7f7f7;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.bgimg {
|
|
|
|
|
position: absolute;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
.bgbox{
|
2024-06-12 15:52:21 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
}
|
|
|
|
|
.noactive {
|
2024-06-12 15:52:21 +08:00
|
|
|
|
color: #414345;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
width: 216rpx;
|
|
|
|
|
height: 250rpx;
|
2024-06-12 15:52:21 +08:00
|
|
|
|
background: #ECECEC;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.active {
|
2024-06-12 15:52:21 +08:00
|
|
|
|
color: #414345;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
width: 216rpx;
|
|
|
|
|
height: 250rpx;
|
2024-06-12 15:52:21 +08:00
|
|
|
|
background: linear-gradient(0deg, #E5FFF7, #D5F5EB);
|
|
|
|
|
border-radius: 28rpx;
|
|
|
|
|
border: 2px solid #019C88;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.save_vipbtn {
|
2024-06-12 15:52:21 +08:00
|
|
|
|
width: 95%;
|
|
|
|
|
height: 88rpx;
|
|
|
|
|
line-height: 88rpx;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
font-weight: bold;
|
2024-06-12 15:52:21 +08:00
|
|
|
|
font-size: 38rpx;
|
|
|
|
|
border-radius: 44rpx;
|
|
|
|
|
color: #FFFFFF;
|
|
|
|
|
background: linear-gradient(-90deg, #2EC5AC, #08A28A);
|
|
|
|
|
text-shadow: 0rpx 2rpx 3rpx rgba(0,127,106,0.48);
|
|
|
|
|
margin: 33px auto 22px auto;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.quanyi_view {
|
2024-06-12 15:52:21 +08:00
|
|
|
|
|
2024-06-05 19:16:02 +08:00
|
|
|
|
.quanyi_titview {
|
2024-06-12 15:52:21 +08:00
|
|
|
|
|
2024-06-05 19:16:02 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
|
|
.quanyi_itemview {
|
|
|
|
|
margin-top: 20rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
width: 100%;
|
2024-06-12 15:52:21 +08:00
|
|
|
|
flex-direction: row;
|
|
|
|
|
justify-content: space-around;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
|
|
|
|
|
.quanyi_listitem {
|
|
|
|
|
width: 25%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-top: 40rpx;
|
|
|
|
|
|
|
|
|
|
.listitem_name {
|
|
|
|
|
margin-top: 18rpx;
|
2024-06-12 15:52:21 +08:00
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 25rpx;
|
|
|
|
|
color: #B0B0B0;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
image {
|
2024-06-29 16:47:17 +08:00
|
|
|
|
width: 65rpx;
|
|
|
|
|
height: 65rpx;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.quanyi_titname {
|
2024-06-12 15:52:21 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 25rpx;
|
|
|
|
|
color: #666666;
|
2024-06-05 19:16:02 +08:00
|
|
|
|
margin: 0rpx 12rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
image {
|
|
|
|
|
width: 114rpx;
|
|
|
|
|
height: 2rpx
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
image {
|
|
|
|
|
width: 749rpx;
|
|
|
|
|
height: 200rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.popup_pay {
|
|
|
|
|
width: 100%;
|
|
|
|
|
position: relative;
|
|
|
|
|
padding-bottom: 45rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.pay_btn {
|
|
|
|
|
width: 90%;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
text-align: center;
|
2024-07-02 10:41:38 +08:00
|
|
|
|
background: linear-gradient(to right, #019c88, #2ebe93);
|
2024-06-05 19:16:02 +08:00
|
|
|
|
height: 80upx;
|
|
|
|
|
border-radius: 60rpx;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
line-height: 80upx;
|
|
|
|
|
}
|
|
|
|
|
.vip_kapian {
|
2024-06-12 15:52:21 +08:00
|
|
|
|
// background: url(../../static/vipqy.png);
|
2024-06-05 19:16:02 +08:00
|
|
|
|
background-size: cover;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 332rpx;
|
|
|
|
|
padding: 30rpx 0 0 40rpx;
|
|
|
|
|
|
|
|
|
|
image {
|
|
|
|
|
width: 686rpx;
|
|
|
|
|
height: 320rpx;
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.kapian_name {
|
|
|
|
|
font-size: 42rpx;
|
|
|
|
|
font-family: YouSheBiaoTiHei;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: #fdd193;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.kapian_text {
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
color: #fdd193;
|
|
|
|
|
margin-top: 16rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.kapian_ktname {
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
color: #fdd193;
|
|
|
|
|
margin-top: 24rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.kapian_ktmoney {
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
font-weight: 800;
|
|
|
|
|
color: #fdd193;
|
|
|
|
|
margin-top: 10rpx;
|
|
|
|
|
|
|
|
|
|
text {
|
|
|
|
|
font-size: 44rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|