0309 听书
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 限时秒杀 -->
|
||||
<view class="limited" v-if="seckillList!=null">
|
||||
<view class="limited" v-if="seckillList!=null">
|
||||
<view class="limitedSymbol">
|
||||
<image src="../../static/icon/shopping_xsh.png"></image>
|
||||
</view>
|
||||
@@ -266,7 +266,8 @@
|
||||
this.$http
|
||||
.get(`book/shopseckill/getSeckillProd`)
|
||||
.then(res => {
|
||||
this.seckillList = res.list
|
||||
//this.seckillList = res.list
|
||||
this.seckillList = null
|
||||
})
|
||||
|
||||
// 获取精选商品
|
||||
@@ -309,7 +310,6 @@
|
||||
url: '../eBook/bookContent?Id=' + e.bookid
|
||||
});
|
||||
},
|
||||
|
||||
// 商品详情页
|
||||
goDetail(id) {
|
||||
uni.navigateTo({
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</view>
|
||||
<view class="vip_chong">
|
||||
<view class="vc_title">服务类型</view>
|
||||
<view class="vc_xiang">
|
||||
<view class="vc_xiang">
|
||||
<view v-for="(item, index) in vcList" @click="chosPric(item)"
|
||||
:class="stepsVc.priceTypeId == item.priceTypeId?'Tab_vc vc_price':'vc_price'">
|
||||
<view class="pr_tm">{{item.description}}</view>
|
||||
@@ -66,6 +66,8 @@
|
||||
<view v-for="(item, index) in paylist" @click="choseType(item.id)" class="vf_xuanx">
|
||||
<image :src="item.img"></image>
|
||||
{{item.title}}
|
||||
<span v-if="item.id == 4" style="color: #bbb; margin-left: 10px;">{{userMes.peanutCoin}}疯币可用</span>
|
||||
<span @click.stop="buPoint" style="color: #bf0c0c; margin-left: 10px;" v-if="item.id == 4" class="chongBtn">去充值</span>
|
||||
<u-radio :key="index" activeColor="#fe6e09" :name='item.id'
|
||||
style="float: right;margin-top: 5rpx;"></u-radio>
|
||||
</view>
|
||||
@@ -76,7 +78,7 @@
|
||||
<view class="agree_wo">* 我已阅读并同意《会员服务协议》</view>
|
||||
|
||||
<view class="vip_btn">
|
||||
<view @click="kaiVip">立即开通会员</view>
|
||||
<view @click="goPoinBuy">立即开通会员</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -95,12 +97,19 @@
|
||||
return {
|
||||
stepsVc: {},
|
||||
vcList: [],
|
||||
payType: 2,
|
||||
paylist: [{
|
||||
title: '支付宝',
|
||||
id: 1,
|
||||
img: '../../static/icon/pay_1.png'
|
||||
}
|
||||
userMes:{},
|
||||
payType: 4,
|
||||
paylist: [
|
||||
// {
|
||||
// title: '支付宝',
|
||||
// id: 1,
|
||||
// img: '../../static/icon/pay_1.png'
|
||||
// },
|
||||
{
|
||||
title: '疯币充值',
|
||||
id: 4,
|
||||
img: '../../static/icon/oder_chong.png'
|
||||
}
|
||||
// {
|
||||
// title: '微信',
|
||||
// id: 2,
|
||||
@@ -117,6 +126,7 @@
|
||||
},
|
||||
//页面显示
|
||||
onShow() {
|
||||
this.getDataPoint()
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
},
|
||||
@@ -125,6 +135,40 @@
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
goPoinBuy(){
|
||||
if(this.stepsVc.money > this.userMes.peanutCoin){
|
||||
uni.showToast({
|
||||
title:'疯币不足,请充值',
|
||||
icon: 'error',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}else{
|
||||
this.kaiVip()
|
||||
}
|
||||
},
|
||||
// 充值疯币
|
||||
buPoint() {
|
||||
uni.navigateTo({
|
||||
url: '../peanut/reCharge'
|
||||
});
|
||||
},
|
||||
getDataPoint() {
|
||||
let that = this
|
||||
// 获取个人信息
|
||||
// 用户详情
|
||||
if (this.userInfo.id != undefined) {
|
||||
this.$http
|
||||
.post('book/user/info/' + this.userInfo.id)
|
||||
.then(res => {
|
||||
this.userMes = res.user
|
||||
// consol.log(this.userMes.peanutCoin,'呼呼')
|
||||
if (this.userMes.vip != 0) {
|
||||
this.typeFen = 2
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 获取会员类型
|
||||
getData() {
|
||||
let that = this
|
||||
@@ -151,7 +195,7 @@
|
||||
that.payType = e
|
||||
},
|
||||
|
||||
// 开通vip
|
||||
// 开通vip 常规支付
|
||||
kaiVip() {
|
||||
let that = this
|
||||
|
||||
@@ -165,7 +209,6 @@
|
||||
orderStatus: 0, //订单状态
|
||||
orderType: "vip", //订单类型
|
||||
}
|
||||
|
||||
$http.request({
|
||||
url: "book/buyorder/rechargeSave",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
@@ -175,6 +218,8 @@
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
console.log(res)
|
||||
if(that.payType != 4){
|
||||
setPay({
|
||||
typePay: 'alipay',
|
||||
subject: 'vip',
|
||||
@@ -195,6 +240,37 @@
|
||||
});
|
||||
}
|
||||
})
|
||||
}else{
|
||||
console.log(that.userMes)
|
||||
this.$http
|
||||
.post('book/user/openVipByVirtualCoin', {
|
||||
'configId': that.stepsVc.priceTypeId,
|
||||
'userId': that.userMes.id,
|
||||
'orderSn':res.orderSn
|
||||
})
|
||||
.then(res => {
|
||||
if(res.code == 0){
|
||||
console.log(res, 'res')
|
||||
uni.showToast({
|
||||
title: "充值成功",
|
||||
icon:'success',
|
||||
duration:2000
|
||||
});
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url: '../bookShop/orderList'
|
||||
});
|
||||
},1000)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: "下单失败",
|
||||
icon:'Error',
|
||||
duration:2000
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
@@ -214,7 +290,15 @@
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
|
||||
.chongBtn {
|
||||
background-color: #54a966;
|
||||
color: #fff !important;
|
||||
margin-left: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 2rpx 10rpx;
|
||||
font-size: 20rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
.vip_top {
|
||||
// background-color: #2c271d;
|
||||
background-image: url('../../static/icon/mine_back.png');
|
||||
|
||||
Reference in New Issue
Block a user