This commit is contained in:
yanwenlong
2023-10-09 22:23:37 +08:00
42 changed files with 3763 additions and 185 deletions

View File

@@ -5,17 +5,20 @@
<!-- <z-nav-bar title="我的订单"></z-nav-bar> -->
<z-nav-bar backState="2000" title="我的订单"></z-nav-bar>
<view class="orderTabs">
<view class="orderTabs flexbox">
<view v-for="(item,index) in orderTabs" @click="orderTabCLi(item.value)"
:class="orderListTab==item.value?'ordStyle':''">{{item.name}}</view>
</view>
<view class="orderList">
<view class="orderItem" v-for="(ifex,inten) in orderList">
<view class="orderState" v-if="ifex.orderStatus==0">待支付</view>
<view class="orderState" v-if="ifex.orderStatus==1">待发货</view>
<view class="orderState" v-if="ifex.orderStatus==2">待收货</view>
<view class="orderState" v-if="ifex.orderStatus==3">已完成</view>
<text class="orderState orderState0" v-if="ifex.orderStatus==0">待支付</text>
<text class="orderState orderState1" v-if="ifex.orderStatus==1">待发货</text>
<text class="orderState orderState2" v-if="ifex.orderStatus==2">待收货</text>
<text class="orderState orderState3" v-if="ifex.orderStatus==3">已完成</text>
<view class="flexbox orderSn">
<text class="">订单编号: {{ifex.orderSn}}</text>
</view>
<view class="orderContent" :key="index" v-if="ifex.orderType=='order'"
v-for="(item,index) in ifex.products" @click="goOrdiCont(ifex)">
<image :src="item.image" mode=""></image>
@@ -24,7 +27,7 @@
<text>{{item.productName}}</text>
</view>
<view class="orderPrice">
<text style="font-weight: bold;">{{item.productPrice}}</text><br>
<text style="color: #f56c6c;"></text><text style="font-weight: bold; color: #f56c6c;">{{item.productPrice}}</text><br>
<text style="color: #bbbbbb;font-size: 20rpx;margin-right: 10rpx;">X</text>
<text style="color: #bbbbbb;">{{item.quantity}}</text>
</view>
@@ -36,10 +39,10 @@
<image src="../../static/icon/oder_chong.png" mode="" style="height: 150rpx;"></image>
<view class="itemJian">
<view class="orderTitle">
<text>花生币充值</text>
<text>天医币充值</text>
</view>
<view class="orderPrice">
<text style="font-weight: bold;">{{ifex.realMoney}}</text>
<text style="color: #f56c6c;"></text><text style="font-weight: bold; color: #f56c6c;">{{ifex.realMoney}}</text>
</view>
<br clear="both">
</view>
@@ -52,16 +55,16 @@
<text>会员充值</text>
</view>
<view class="orderPrice">
<text style="font-weight: bold;">{{ifex.realMoney}}</text>
<text style="color: #f56c6c;"></text><text style="font-weight: bold; color: #f56c6c;">{{ifex.realMoney}}</text>
</view>
<br clear="both">
</view>
<br clear="both">
</view>
<view class="orderReal">
<span style="color: #666; float: left; font-size: 12px;">下单时间{{ifex.createTime}}</span>
<span style="color: #666;margin-right: 10rpx;">实付款 : </span>
<span></span>{{ifex.realMoney}}
<span style="color: #999; float: left; font-size: 12px;">下单时间{{ifex.createTime}}</span>
<span style="color: #999;margin-right: 10rpx;">实付款 : </span>
<span style=" color: #f56c6c;"></span><text style="font-weight: bold; color: #f56c6c;">{{ifex.realMoney}}</text>
</view>
<view class="orderOper" v-if="ifex.orderStatus==0">
<view class="opFix" @click="canceOrder(ifex)">取消订单</view>
@@ -174,7 +177,7 @@ import {
},
// 订单详情
goOrdiCont(e) {
goOrdiCont(e) {
uni.navigateTo({
url: './orderLCont?orderId=' + e.orderId + '&orderType=' + e.orderStatus + '&orderSn=' + e.orderSn
});
@@ -507,27 +510,34 @@ import {
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.flexbox{display: flex;}
.orderTabs {
margin: 70rpx 0 0 0;
margin: 100rpx 0 0 0;
width: 100%;
padding: 0 3% 3% 3%;
position: fixed;
top: 80rpx;
background-color: #f7faf9;
background-color: #fff;
z-index: 100;
view {
border-radius: 20rpx;
border:1px solid #d0d0d0 ;
display: inline-block;
padding: 0 0 20rpx 0;
margin: 40rpx 0 15rpx 0;
padding: 20rpx 0;
margin: 0 6rpx;
// margin: 40rpx 0 15rpx 0;
width: 20%;
text-align: center;
font-size: 30rpx;
}
.ordStyle {
border-bottom: 5rpx solid #54a966;
background: #f0f9eb;
border: 2rpx solid #54a966;
color: #54a966;
font-weight: bold;
}
@@ -538,26 +548,30 @@ import {
margin-top: 130rpx;
.orderItem {
position: relative;
padding: 30rpx 10rpx 30rpx 30rpx;
background-color: #fff;
border-radius: 30rpx;
margin-bottom: 30rpx;
.orderState {
text-align: right;
font-size: 30rpx;
margin: 0 20rpx 30rpx 0;
font-weight: bold;
color: #d70808;
.orderSn{font-size: 26rpx; color: #999; padding-bottom: 20rpx; border-bottom: 1px solid #eee; margin-top: 60rpx; margin-bottom: 30rpx;}
.orderState { color: #fff;
position: absolute; left: 0; top: 20rpx;
padding:10rpx; border-radius: 0 24rpx 24rpx 0;
font-size: 26rpx;
// font-weight: bold;
color: #fff;
}
.orderState0{background-color: #e6a23c;}
.orderState1{background-color: #409eff;}
.orderState2{background-color: #f56c6c;}
.orderState3{background-color: #67c23a;}
.orderContent {
margin-bottom: 20rpx;
image {
width: 150rpx;
height: 180rpx;
width: 130rpx;
height: 140rpx;
margin-right: 20rpx;
float: left;
}
@@ -567,8 +581,8 @@ import {
width: 470rpx;
.orderTitle {
font-weight: bold;
font-size: 30rpx;
// font-weight: bold;
font-size: 28rpx;
margin: 0 0 20rpx 0;
float: left;
width: 410rpx;

View File

@@ -76,7 +76,7 @@
<view v-for="(item, index) in paylist" class="zhif_xuanx">
<image :src="item.img"></image>
{{item.title}}
<span v-if="item.id == 4" style="color: #bbb; margin-left: 10px;">{{userMes.peanutCoin}}币可用</span>
<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>
@@ -93,7 +93,7 @@
<view v-for="(item, index) in paylistIos" class="zhif_xuanx">
<image :src="item.img"></image>
{{item.title}}
<span v-if="item.id == 4" style="color: #bbb; margin-left: 10px;">{{userMes.peanutCoin}}币可用</span>
<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>
@@ -110,7 +110,7 @@
</view>
<view class="commodityPrice" v-if="payType == 4">
<span style="color: #666;margin-right: 10rpx; font-size: 15px;">实付款: </span>
{{realPrice}}<span></span>
{{realPrice}}<span>天医</span>
</view>
<view class="operate" @click="goBuyJie" v-if="payType != 4">
<view class="goBuy">
@@ -245,7 +245,7 @@
img: '../../static/icon/pay_2.png'
},
{
title: '币购买',
title: '天医币购买',
id: 4,
img: '../../static/icon/oder_chong.png'
},
@@ -266,7 +266,7 @@
// img: '../../static/icon/pay_2.png'
// },
{
title: '币购买',
title: '天医币购买',
id: 4,
img: '../../static/icon/oder_chong.png'
},
@@ -317,7 +317,7 @@
this.isAndorid = false
}
},
// 充值
// 充值天医
buPoint() {
uni.navigateTo({
url: '../peanut/reCharge'
@@ -363,7 +363,7 @@
goPoinBuy(){
if(this.realPrice > this.userMes.peanutCoin){
uni.showToast({
title:'币不足,请充值',
title:'天医币不足,请充值',
icon: 'none',
duration: 2000
})
@@ -458,12 +458,13 @@
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
}).then(res => {
if (res.code == 0) {
this.farePrice = res.price
}else{
this.farePrice = 0
}
console.log('需要的运费',res.price)
this.allPrice()
})
},
@@ -589,7 +590,7 @@
city: this.adressMoRen.areaidpathtext.split(' ')[1], //市
district: this.adressMoRen.areaidpathtext.split(' ')[2], //区
address: this.adressMoRen.useraddress, //地址
paymentMethod: this.payType, //支付方式 2支付宝1微信3ios内购 4币购买
paymentMethod: this.payType, //支付方式 2支付宝1微信3ios内购 4天医币购买
orderMoney: this.totalPrice, //订单金额
realMoney: this.realPrice, //实收金额
shippingMoney: this.farePrice, //运费
@@ -604,7 +605,7 @@
}
$http.request({
// url: "book/buyorder/save",
url: "book/buyorder/buysave",
url: "book/buyorder/buySave",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data,
header: { //默认 无 说明:请求头
@@ -694,7 +695,7 @@
}
})
}else if(this.payType == 4){
// 币支付
// 天医币支付
uni.showToast({
title: "购买成功",
icon: "success"

View File

@@ -76,7 +76,7 @@
<view v-for="(item, index) in paylist" class="zhif_xuanx">
<image :src="item.img"></image>
{{item.title}}
<span v-if="item.id == 4" style="color: #bbb; margin-left: 10px;">{{userMes.peanutCoin}}币可用</span>
<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>
@@ -93,7 +93,7 @@
<view v-for="(item, index) in paylistIos" class="zhif_xuanx">
<image :src="item.img"></image>
{{item.title}}
<span v-if="item.id == 4" style="color: #bbb; margin-left: 10px;">{{userMes.peanutCoin}}币可用</span>
<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>
@@ -110,7 +110,7 @@
</view>
<view class="commodityPrice" v-if="payType == 4">
<span style="color: #666;margin-right: 10rpx; font-size: 15px;">实付款: </span>
{{realPrice}}<span></span>
{{realPrice}}<span>天医</span>
</view>
<view class="operate" @click="goBuyJie" v-if="payType != 4">
<view class="goBuy">
@@ -246,7 +246,7 @@
img: '../../static/icon/pay_2.png'
},
{
title: '币购买',
title: '天医币购买',
id: 4,
img: '../../static/icon/oder_chong.png'
},
@@ -267,7 +267,7 @@
// img: '../../static/icon/pay_2.png'
// },
{
title: '币购买',
title: '天医币购买',
id: 4,
img: '../../static/icon/oder_chong.png'
},
@@ -341,7 +341,7 @@
this.isAndorid = false
}
},
// 充值
// 充值天医
buPoint() {
uni.navigateTo({
url: '../peanut/reCharge'
@@ -387,7 +387,7 @@
goPoinBuy(){
if(this.realPrice > this.userMes.peanutCoin){
uni.showToast({
title:'币不足,请充值',
title:'天医币不足,请充值',
icon: 'none',
duration: 2000
})
@@ -612,7 +612,7 @@
city: this.adressMoRen.areaidpathtext.split(' ')[1], //市
district: this.adressMoRen.areaidpathtext.split(' ')[2], //区
address: this.adressMoRen.useraddress, //地址
paymentMethod: this.payType, //支付方式 2支付宝1微信3ios内购 4币购买
paymentMethod: this.payType, //支付方式 2支付宝1微信3ios内购 4天医币购买
orderMoney: this.totalPrice, //订单金额
realMoney: this.realPrice, //实收金额
shippingMoney: this.farePrice, //运费
@@ -717,7 +717,7 @@
}
})
}else if(this.payType == 4){
// 币支付
// 天医币支付
uni.showToast({
title: "购买成功",
icon: "success"

File diff suppressed because it is too large Load Diff

View File

@@ -134,6 +134,11 @@
<u-popup mode="bottom" :show="addTextShow" :round="10" @close="addTextShow=false">
<view class="tanchu">
<view class="dp_title">今日签到随想</view>
<!-- <view class="flexbox">
<i @click="showEmj()" :class="emojiIcon"></i>
<editor id="editor" class="ql-container" :placeholder="placeholder" @ready="onEditorReady"></editor>
</view> -->
<view style="max-height: 1000rpx;overflow-y: scroll;">
<!-- 提交 -->
<view class="padding-bottom-sm flex padding-lr-sm" style="border-bottom: 1px solid #EEEEEE;">
@@ -166,7 +171,7 @@
</u-popup>
<view class="leaveBtn" v-if="!addTextShow && currentDay == linshiDay && taskInfo.id && myword.length == 0">
<button style="height: 70rpx; font-size: 28rpx; line-height: 70rpx;" type="primary" plain="true"
@click="addTextShow = true">说点什么</button>
@click="addTextShow = true">说点什么</button>
</view>
<music-play :playData="playData"></music-play>
<!-- <z-navigation></z-navigation> -->
@@ -186,6 +191,7 @@
export default {
data() {
return {
placeholder: '开始输入...',
dayCurrent: 0, // 载入页面时的显示页数
showBack: false,
currentIndex: 0,
@@ -264,6 +270,17 @@
...mapState(['userInfo'])
},
methods: {
onEditorReady() {
// #ifdef MP-BAIDU
this.editorCtx = requireDynamicLib('editorLib').createEditorContext('editor');
// #endif
// #ifdef APP-PLUS || H5 ||MP-WEIXIN
uni.createSelectorQuery().select('#editor').context((res) => {
this.editorCtx = res.context
}).exec()
// #endif
},
// 获取书籍信息
getBookInfo() {
this.$http
@@ -513,7 +530,7 @@
},
// 快捷签到
kuickSign() {
if (!this.taskInfo.id) {
uni.showToast({
title: '当天未发布打卡任务,不可签到哦',
@@ -521,36 +538,35 @@
})
return false
}
let data = {
"bookId": this.bookid,
"userId": this.userInfo.id,
"tid": this.taskInfo.id,
"days": this.currentDay
let data = {
"bookId": this.bookid,
"userId": this.userInfo.id,
"tid": this.taskInfo.id,
"days": this.currentDay
}
$http.request({
url: 'book/clockinPunch/save',
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data,
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
if (res.code == 0) {
//console.log(res, '快捷签到')
uni.showToast({
title: '签到成功',
icon: 'success'
})
this.addTextShow = false
this.formData.content = ''
this.formData.images = []
this.getmySign()
this.getAllSign(this.taskInfo)
}
$http.request({
url: 'book/clockinPunch/save',
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data,
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
if (res.code == 0) {
//console.log(res, '快捷签到')
uni.showToast({
title: '签到成功',
icon: 'success'
})
return false
this.addTextShow = false
this.formData.content = ''
this.formData.images = []
this.getmySign()
this.getAllSign(this.taskInfo)
}
});
});
},
// 说点什么
goToSign() {
@@ -715,6 +731,18 @@
</script>
<style lang="scss" scoped>
.ql-editor{min-height: 50rpx;}
.ql-container {
width: calc(100% - 30rpx);
min-height: 50rpx !important;
height: auto !important;
font-style: normal;
font-size: 30rpx;
margin: 0 auto;
border: 1px solid #ddd;
border-radius: 20rpx;
}
.pjimgs {
margin: 10px 0;
flex-wrap: wrap;

View File

@@ -0,0 +1,802 @@
<template>
<view style="background-color: #fff;padding: 30rpx;">
<z-nav-bar title="电子书详情"></z-nav-bar>
<view class="book_neir">
<img :src="bookMessage.images" class="bn_img">
<b class="leiXing" v-if="bookMessage.isVip==1" style="background: #c79119;">VIP</b>
<b class="leiXing" v-if="bookMessage.isVip==2" style="background: #c74119;">付费</b>
<view class="bn_nes">
<view style="font-weight: bold;margin-bottom: 30rpx;">
{{bookMessage.name}}
</view>
<view style="color: #9b9b9b;font-size: 28rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 38rpx;">
<p @click="onAuCHJump(bookMessage.authorId,1)" style="margin-bottom: 20rpx;">
{{bookMessage.authorName}} [] >
</p>
<p @click="onAuCHJump(item.id,2)" v-for="item in this.bookMessage.publisherNIList">
{{item.title}} >
</p>
</view>
<view v-if="this.bookMessage.chapterNum!=null"
style="color: #cdcdcd;font-size: 20rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 36rpx;">
上次阅读到{{this.bookCatalogue[this.bookMessage.chapterNum-1].chapterName}}
</view>
</view>
<br clear="both">
</view>
<view class="book_dredge" @click="onPageJump('../peanut/opeVip')" v-if="bookMessage.isVip!=0&&this.userMes.vip==0">
<image src="../../static/icon/mine_p.png" alt=""></image>
开通会员免费读本书
<b>></b>
</view>
<view class="book_dredge book_vip" v-if="this.userMes.vip==1">
<image src="../../static/icon/mine_v.png" alt=""></image>
尊享会员权益中
</view>
<view class="book_tab">
<view>
<u-tabs :list="tab_list" @click="tab_click" lineColor="#54a966 100% 100%"
:activeStyle="{color: '#303133',fontWeight: 'bold',transform: 'scale(1.1)'}"></u-tabs>
</view>
<view class="bt_cont">
<view v-if="tab_muJian==0" class="bt_jian">
<text>
{{bookMessage.description}}
</text>
</view>
<view v-if="tab_muJian==1">
<p style="text-align: right;color: #a5a5a5;margin-bottom: 10rpx;">
{{bookCatalogue.length}}</p>
<view class="bt_nulu" v-for='(item,index) in bookCatalogue'>
<!-- 最近阅读的 -->
<view @click="onBokReadJump(index)" v-if="bookMessage.isBuy==1" style="display: flex;justify-content: space-between;">
{{item.chapterName}}
<font v-if="bookMessage.chapterId==index">最近阅读</font>
</view>
<view v-if="bookMessage.isBuy==0">
<view @click="onBokReadJump(index)" v-if="index<bookMessage.freeChapterCount">
{{item.chapterName}}
<font v-if="bookMessage.chapterId==index">最近阅读</font>
</view>
<view v-if="index>=bookMessage.freeChapterCount" @click="collectFee()">
<!-- 不是会员显示锁 -->
<font style=" color:#bfa853;margin-left: 20rpx;">
<u-icon name="lock" color="#ccc" size="20" v-if="bookMessage.isBuy!==1"></u-icon>
</font>
{{item.chapterName}}
</view>
<view
</view>
</view>
<view style="height: 60rpx;"></view>
</view>
</view>
</view>
<view class="book_caozuo">
<view v-if="this.bookMessage.flag" style="color: #aaa;">已加入书架</view>
<view v-if="!this.bookMessage.flag" @click="joInshelf">加入书架</view>
<view @click="onBokReadJump(0)" v-if="this.bookMessage.isBuy==1&&this.bookMessage.chapterId==null">开始阅读</view>
<view @click="onBokReadJump(bookMessage.chapterNum-1)" v-if="this.bookMessage.isBuy==1&&this.bookMessage.chapterId!=null">
继续阅读
</view>
<view @click="onBokReadJump(0)" v-if="this.bookMessage.isBuy==0&&this.bookMessage.chapterNum==null&&this.bookMessage.freeChapterCount!=0">开始试读</view>
<view @click="onBokReadJump(bookMessage.chapterNum-1)" v-if="this.bookMessage.isBuy==0&&this.bookMessage.chapterNum!=null&&this.bookMessage.freeChapterCount!=0">继续试读</view>
<view v-if="this.bookMessage.isBuy==0&&this.bookMessage.freeChapterCount==0">购买阅读</view>
<view @click="buyShowFun" v-if="bookMessage.isBuy==0" style="background-color: #d85f54;">立即购买</view>
<view v-if="bookMessage.isBuy==1&&bookMessage.isVip!=0" style="background-color: #bfa853;">已购买</view>
<view v-if="bookMessage.isVip==0">本书免费</view>
</view>
<!-- 购买 -->
<u-popup :show="buyShow" :round="10" @close="buyShow=false" :closeable='true'>
<view class="tanchu">
<view class="by_title">购买</view>
<view class="by_package">
<view v-if="userMes.vip==0" :class="typeFen== 1?'Tab_by by_fen':'by_fen'" @click="chBuyType(1)">
<view class="biao">开通会员</view>
<view class="wenz">
连续包月
<text>节省{{bookMessage.salePrice}}天医币</text>
</view>
</view>
<br>
<view :class="typeFen== 2?'Tab_by by_fen':'by_fen'" @click="chBuyType(2)">
<view class="biao" v-if="userMes.vip==0">直接购买</view>
<view class="biao" v-if="userMes.vip==1">会员权益购买</view>
<view class="benl">
<b v-if="useCouponAmount != ''">{{useCouponAmount}}</b>
<span v-else>
<b v-if="bookMessage.isSale==1">{{bookMessage.salePrice}}</b>
<b v-if="bookMessage.isSale==0||bookMessage.isSale==null">{{bookMessage.price}}</b></span>
天医币
<text>{{bookMessage.price}}天医币</text>
</view>
</view>
<!-- 优惠券 ------------------------>
<view class="yq_youhui" @click="CyouhuiShow" style="margin-top:20px;">
<u-icon name="red-packet-fill" color="#e74141" size="18" class="yqLeft"></u-icon>
优惠券
<u-icon name="arrow-right" color="#aaa" size="18" class="yqRight"></u-icon>
<text class="dagnqian"
v-if="youhuiList.length>0&&youhuiContent.id==undefined">当前可选{{this.youhuiList.length}}</text>
<text class="dagnqian" v-if="youhuiList.length==0&&youhuiContent.id==undefined"
style="background-color: #999;">暂无优惠券</text>
<text class="dagnqian" v-if="youhuiContent.id!=undefined">
- {{youhuiContent.coupons.couponAmount}}</text>
</view>
</view>
<view style="height: 1px;width: 100%;background-color: #eee;margin-top: 50rpx;"></view>
<view style="margin: 40rpx 10rpx 20rpx 10rpx;font-size: 30rpx;">
<view style="float: left;">余额</view>
<view style="float: right;color: #999;">
{{userMes.peanutCoin}} 天医币
<view class="chongBtn" @click="buPoint()">充值天医币</view>
</view>
<br clear="both">
</view>
<view style="color: #c3c3c3;font-size: 20rpx;margin: 30rpx 0;">支付成功后立即解锁已购内容</view>
<view @click="buyVip()" v-if="typeFen== 1" class="by_btn">查看套餐开通VIP</view>
<view @click="buyMoneTip()" v-if="typeFen== 2" class="by_btn">购买本书</view>
</view>
</u-popup>
<u-modal :show="buysignShow" :content="buysignContent" :showCancelButton="true" @cancel="cancelMoney"
@confirm="buyMoney">
</u-modal>
<view>
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle' :iconStyle="iconStyle"></u-back-top>
</view>
<!-- 优惠券弹1出 -->
<u-popup :show="youhuiShow" :round="10" @close="hideyouhui">
<view class="tanchu">
<view class="dp_title">请选择优惠券</view>
<view style="max-height: 1000rpx;overflow-y: scroll;">
<span @click="clearYouhui" style="font-size: 14px; display:inline-block;border: 1px solid #c74119; border-radius: 5px; float: right; color:#c74119; padding: 5px; margin-bottom: 10px;">不使用优惠券</span>
<view :class="youhuiIndex === index ? 'youhuiItem youItem_style' : 'youhuiItem'"
v-for="(item,index) in youhuiList" :key="index" @click="choseYouhui(index)">
<view style="width: 25%;color:#fd6004;text-align: center;">
<text></text>
<b style="font-size: 45rpx;">{{item.coupons.couponAmount}}</b>
<text
style="display: block;color: #666;font-size: 25rpx;margin-top: 10rpx;">{{item.coupons.useLevel}}元可用</text>
</view>
<view style="width: 68%;padding-left: 5%;">
<text>{{item.coupons.couponName}}</text>
<text
style="display: block;font-size: 20rpx;color: #999;margin-top: 10rpx;">到期时间{{item.coupons.expirationDate}}</text>
</view>
<view style="width: 7%;">
<text
style="border: 1px solid #d9d9d9;width: 35rpx;height:35rpx;display:inline-block;border-radius: 30rpx;"
v-if="youhuiIndex !== index"></text>
<u-icon name="checkmark-circle-fill" color="#fd6004" size="20" v-if="youhuiIndex === index">
</u-icon>
</view>
<br clear="both">
</view>
</view>
<view style="font-size: 20rpx;color: #aaa;margin-top: 30rpx;">* 每笔订单只能使用一张优惠价</view>
</view>
</u-popup>
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
import {
mapState
} from 'vuex';
export default {
data() {
return {
youhuiShow:false,
youhuiIndex:'',
youhuiList:[], // 优惠券列表
couponMz: 0, // 优惠券钱数
useCouponAmount: '' , // 使用的优惠券金额
bookJiageA: 0,
youhuiContent: {
coupons:{
id:'0'
}
},
scrollTop: 0,
tab_list: [{
name: '简介',
}, {
name: '目录',
}],
userMes: {},
bokMesDet: {},
tab_muJian: 0,
bookId: '',
bookMessage: {
flag: false
},
bookCatalogue: [],
bgiStyle: {
background: '#2ab58833'
},
iconStyle: {
fontSize: '40rpx',
fontWeight: 'bold',
color: '#54a966',
},
typeFen: 1,
buyShow: false,
buysignShow: false,
buysignContent: ''
};
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
//第一次加载
onLoad(e) {
this.bookId = e.Id
},
computed: {
...mapState(['userInfo'])
},
//页面显示
onShow() {
this.getData();
},
//方法
methods: {
getData() {
// 获取电子书详情
this.$http
.post('book/book/appinfo/' + this.bookId + '/' + this.userInfo.id)
.then(res => {
this.bookMessage = res.book
this.bokMesDet.bookId = res.book.id
this.bokMesDet.bookName = res.book.name,
this.bokMesDet.images = res.book.images
if (this.bookMessage.isSale == 1) {
this.buysignContent = '您确定要花费' + this.bookMessage.salePrice + '天医币购买' + this.bokMesDet
.bookName + '吗?'
} else {
this.buysignContent = '您确定要花费' + this.bookMessage.price + '天医币购买' + this.bokMesDet
.bookName + '吗?'
}
this.bokMesDet.userId = this.userInfo.id
if (this.bookMessage.publisherName.indexOf(',') > 0) {
this.bookMessage.publisherName = this.bookMessage.publisherName.split(',')
this.bookMessage.publisherId = this.bookMessage.publisherId.split(',')
this.bookMessage.publisherNIList = []
for (let i in this.bookMessage.publisherName) {
this.bookMessage.publisherNIList.push({
title: this.bookMessage.publisherName[i]
})
}
for (let j in this.bookMessage.publisherId) {
this.bookMessage.publisherNIList[j].id = this.bookMessage.publisherId[j]
}
} else {
this.bookMessage.publisherNIList = []
this.bookMessage.publisherNIList.push({
'title': this.bookMessage.publisherName,
'id': this.bookMessage.publisherId
})
}
});
// 获取电子目录
this.$http
.post('book/book/getBookCatalogue', {
'bookid': this.bookId
})
.then(res => {
this.bookCatalogue = res.bookCatalogue
});
// 用户详情
if (this.userInfo.id != undefined) {
this.$http
.post('book/user/info/' + this.userInfo.id)
.then(res => {
this.userMes = res.user
if (this.userMes.vip != 0) {
this.typeFen = 2
}
});
}
},
// 加入书架
joInshelf() {
const that = this;
$http.request({
url: "book/bookshelf/save",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: that.bokMesDet,
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(function(res) {
if (res.code == 0) {
uni.showToast({
title: '加入书架成功'
})
that.bookMessage.flag = true
}
}).catch(function(error) {
//这里只会在接口是失败状态返回,不需要去处理错误提示
console.log(error);
});
},
// 点击tab
tab_click(e) {
this.tab_muJian = e.index
},
CyouhuiShow(){
this.youhuiShow = true
this.getCourpe()
this.buyShow = false // 隐藏购买弹窗
},
buyShowFun(){
this.buyShow = true
this.getCourpe()
},
hideyouhui(){
this.youhuiShow = false,
this.buyShow = true // 隐藏购买弹窗
},
clearYouhui(){
this.youhuiContent = {}
this.youhuiIndex = ''
this.useCouponAmount = ''
this.getData()
this.youhuiShow = false
this.buyShow = true // 隐藏购买弹窗
//this.couponMz = 0
},
// 选择优惠券
choseYouhui(e) {
this.youhuiIndex = e
this.youhuiContent = this.youhuiList[this.youhuiIndex]
console.log(this.youhuiContent, 'youhuiContent')
//this.couponMz = this.youhuiContent.coupons.couponAmount
if (this.bookMessage.isSale == 0) {
this.useCouponAmount = this.bookMessage.price - this.youhuiContent.coupons.couponAmount
} else {
this.useCouponAmount = this.bookMessage.salePrice - this.youhuiContent.coupons.couponAmount
}
this.buysignContent = '您确定要花费' + this.useCouponAmount + '天医币购买' + this.bokMesDet.bookName + '吗?'
// this.getData()
this.youhuiShow = false
this.buyShow = true // 隐藏购买弹窗
},
// 获取优惠券列表
getCourpe() {
let bookJiage = 0
if (this.bookMessage.isSale == 0) {
bookJiage = this.bookMessage.price
} else {
bookJiage = this.bookMessage.salePrice
}
this.bookJiageA = bookJiage
this.$http
.post('book/couponhistory/appGetUserCoupon?userId=' + this.userInfo.id + '&amount=' + this.bookJiageA + '&type=1' )
.then(res => {
this.youhuiList = res.userCoupons
});
},
// 跳转
onPageJump(url) {
uni.navigateTo({
url: url
});
},
// 电子书阅读跳转
onBokReadJump(e) {
const that = this;
// 加入阅读记录
$http.request({
// 存数据
url: "book/bookbrowserecords/save",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: that.bokMesDet,
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(function(res) {
if (res.code == 0) {
console.log(res,'========');
if (res.browseRecordsId) {
$http.request({
// 更新
url: "book/bookbrowserecords/update",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
'bookShelfId': res.browseRecordsId
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(function(res) {
if (res.code == 0) {
uni.navigateTo({
url: '../yRead/angbook?Id=' + that.bookId + '&cha=' + e
});
}
}).catch(function(error) {
//这里只会在接口是失败状态返回,不需要去处理错误提示
console.log(error);
});
} else {
uni.navigateTo({
url: '../yRead/angbook?Id=' + that.bookId + '&cha=' + e
});
}
}
}).catch(function(error) {
//这里只会在接口是失败状态返回,不需要去处理错误提示
console.log(error);
});
},
// 信息介绍跳转
onAuCHJump(id, e) {
uni.navigateTo({
url: './bookMessage?Id=' + id + '&typ=' + e
});
},
// 提示购买
collectFee() {
uni.showToast({
icon: 'none',
title: '请购买本书'
})
},
// 充值天医币
buPoint() {
uni.navigateTo({
url: '../peanut/reCharge'
});
},
// 选择vip还是直接购买
chBuyType(e) {
let that = this
that.typeFen = e
},
// 开通VIP
buyVip() {
uni.navigateTo({
url: '../peanut/opeVip'
});
},
// 购买本书
buyMoneTip() {
let bookJiage = 0
if (this.bookMessage.isSale == 0) {
bookJiage = this.bookMessage.price
} else {
bookJiage = this.bookMessage.salePrice
}
// this.bookJiageA = bookJiage
if (bookJiage > this.userMes.peanutCoin) {
uni.showToast({
icon: 'none',
title: '余额不足,请充值'
})
} else {
this.buysignShow = true
this.buyShow = false
}
},
buyMoney() {
let couponId = ''
if(this.youhuiContent.coupons.id != 0){ // 使用了优惠券
couponId = this.youhuiContent.coupons.id
}else{ // 未使用
couponId = '0'
}
console.log(this.youhuiIndex, this.youhuiContent.coupons.id, couponId)
this.$http
.post('book/user/buyEbook?bookId=' + this.bokMesDet.bookId + '&userId=' + this.userInfo.id + '&couponId=' + couponId)
.then(res => {
if (res.code == 0) {
if (res.status == 'error') {
this.buysignShow = false
uni.showToast({
icon: 'none',
title: res.msg
})
} else {
uni.showToast({
title: '购买成功'
})
this.buyShow = false
this.buysignShow = false
this.getData();
}
}
});
},
cancelMoney() {
this.buysignShow = false
this.buyShow = true
},
},
};
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.yq_youhui {
.yqLeft {
display: inline-block;
margin-right: 10rpx;
}
.yqRight {
float: right;
}
.dagnqian {
float: right;
font-size: 22rpx;
background-color: #dd1919;
color: #fff;
border-radius: 20rpx;
padding: 5rpx 10rpx;
}
}
.yq_yunfei {
.yqLeft {
display: inline-block;
margin-right: 10rpx;
}
text {
float: right;
}
}
.book_neir {
margin: 20rpx 0 0 0;
position: relative;
.bn_img {
float: left;
width: 250upx;
height: 320upx;
}
.bn_nes {
float: left;
font-size: 36rpx;
margin-left: 40rpx;
view {
margin: 20rpx 0 0 0;
}
}
.leiXing {
display: block;
padding: 5rpx 10rpx;
border-radius: 10rpx;
text-align: center;
color: #fff;
font-weight: normal;
background: #27b386;
position: absolute;
left: -15upx;
top: 10upx;
font-size: 16rpx;
}
}
.book_dredge {
font-size: 26rpx;
color: #e4b58a;
margin: 40rpx 0 0 0;
padding: 20rpx 30rpx 25rpx 30rpx;
background-image: url('../../static/icon/mine_back.png');
background-size: 100% auto;
image {
width: 46rpx;
height: 40rpx;
display: inline-block;
vertical-align: text-bottom;
margin: 0 10rpx 0 0;
}
b {
float: right;
font-size: 35rpx;
font-weight: bold;
line-height: 40rpx;
}
}
.book_vip{
background: url('../../static/icon/mine_card.png') top center no-repeat;
color: #87510d;
font-weight: bold;
}
.book_tab {
margin: 20rpx 0 0 0;
.bt_cont {
font-size: 26rpx;
line-height: 42rpx;
color: #666;
padding: 0 10rpx;
.bt_jian {
padding-top: 30rpx;
margin-bottom: 15rpx;
}
.bt_nulu {
border-bottom: 1px solid #eee;
padding: 20rpx 0;
font {
color: #54a966;
float: right;
font-size: 20rpx;
}
}
}
}
.book_caozuo {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: #fff;
view {
display: inline-block;
width: 33.3%;
text-align: center;
padding: 28rpx 0;
font-size: 35rpx;
border-top: 1px solid #eee;
}
view:nth-child(3) {
background-color: #54a966;
color: #fff;
}
}
.tanchu {
padding: 30rpx 50rpx 60rpx 50rpx;
.by_title {
font-size: 32rpx;
margin: 0 0 80rpx 0;
text-align: center;
}
.by_package {
font-size: 28rpx;
.by_fen {
box-shadow: 0 0 20rpx 0 #0000001a;
padding: 20rpx 30rpx;
background-color: #fff;
border-radius: 20rpx;
margin-bottom: 10rpx;
.biao {
font-weight: bold;
font-size: 32rpx;
}
.wenz {
color: #b1b1b1;
margin-top: 20rpx;
text {
color: #fe6e09;
margin-left: 20rpx;
}
}
.benl {
margin-top: 20rpx;
color: #d75f54;
font-size: 31rpx;
text {
font-size: 30rpx;
text-decoration: line-through;
color: #c1c1c1;
margin-left: 20rpx;
}
}
}
.Tab_by {
box-shadow: 0 0 20rpx 0 #fe700bcc;
color: #7b4c0a;
}
}
.by_btn {
background-image: linear-gradient(90deg, #ed7161 0%, #efa574 100%);
color: #fff;
width: 100%;
margin: 50rpx auto 0 auto;
text-align: center;
font-size: 18px;
font-weight: bold;
padding: 20rpx 0;
border-radius: 50rpx;
}
.chongBtn {
background-color: #54a966;
color: #fff;
margin-left: 20rpx;
border-radius: 10rpx;
padding: 2rpx 10rpx;
font-size: 20rpx;
display: inline-block;
}
}
.youhuiItem {
border: 1px solid #d9d9d9;
border-radius: 10rpx;
width: 100%;
display: flex;
padding: 20rpx 10rpx;
margin: 25rpx 0 0 0;
align-items: center;
background-color: #fff;
font-size: 30rpx;
}
.youhuiItem>view {
float: left;
}
.youhuiItem.youItem_style {
border-color: #fd6004;
}
</style>

View File

@@ -14,7 +14,7 @@
<view class="search_box flexbox" @click="onPageJump('../peanut/searchFor')">
<view class="search">
<text class="icon_search"></text>
<text class="prompt">请输入想要搜索的书名</text>
<text class="prompt">请输入书名</text>
</view>
</view>
<!-- <view class="searBtn flexbox">

View File

@@ -10,14 +10,24 @@
<text class="prompt">搜索...</text>
</view>
</view>
<view class="contentButton">
<!-- <view class="contentButton">
<u-tabs :scrollable="false" bg-color="#d4d4d4" active-color="#2979ff" inactive-color="#606266"
bar-height="10" :list="contentButtonList" @click="contentButtonClick" lineWidth="42"
:inactiveStyle="{fontSize:'32rpx'}"
:activeStyle="{color: '#303133',fontWeight: 'bold', transform: 'scale(1.01)'}"></u-tabs>
</view> -->
<view class="" style="padding:40rpx 20rpx;">
<view class="mytabs flexbox">
<view :class="['item','item1', contentShow == 1 ? 'active' :'']" @click="setData(1)">
已购图书
</view>
<view :class="['item','item2', contentShow == 2 ? 'active' :'']" @click="setData(2)">
推荐图书
</view>
</view>
</view>
<view class="listenList" v-if="bookList.length > 0 || tjBookLIst.length > 0">
<view class="wrap" v-if="contentShow == 0" >
<view class="wrap" v-if="contentShow == 1" >
<view class="" v-if="bookList.length > 0">
<u-row gutter="16" justify="flex-start" >
<u-col span="4" v-for="(item,index) in bookList" :key="index">
@@ -44,7 +54,7 @@
<u-divider v-else text="暂无已购买书籍~"></u-divider>
</view>
<view class="wrap" v-if="contentShow == 1">
<view class="wrap" v-if="contentShow == 2">
<u-row gutter="16" justify="flex-start" v-if="tjBookLIst.length > 0">
<u-col span="4" v-for="(item,index) in tjBookLIst" :key="index">
<view class="videoBox demo-layout bg-purple" @click="goDetail(item)">
@@ -89,7 +99,7 @@
bookList: [],
freeTotalPage:0,
freeStatus:3, // 已购买图书状态
contentShow: 0,
contentShow: 1,
page: 1, // 页码
status: 3,
ygtotalPage: 1,
@@ -97,13 +107,13 @@
tjTotalPage: 1,
tjPageSize:9,
tjBookLIst: [],
contentButtonList: [{
name: '已购图书'
},
{
name: '推荐图书'
}
],
// contentButtonList: [{
// name: '已购图书'
// },
// {
// name: '推荐图书'
// }
// ],
}
},
onLoad() {
@@ -130,7 +140,7 @@
this.loadingNow = true
console.log('到底了')
if(this.contentShow == 0){
if(this.contentShow == 1){
//console.log(this.page , this.ygtotalPage)
if(this.page+1 <= this.freeTotalPage){
this.page++
@@ -146,7 +156,7 @@
}
if (this.contentShow == 1) {
if (this.contentShow == 2) {
if (this.tjPage+1 <= this.tjTotalPage) {
this.tjPage++
console.log('加载', this.tjPage)
@@ -167,6 +177,9 @@
...mapState(['userInfo'])
},
methods: {
setData(e) {
this.contentShow = e
},
// 未购买图书,评书跳转
wgGoPingshu(item) {
console.log('未购买评书', item)
@@ -316,7 +329,31 @@
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.mytabs {
// background: url('@/static/icon/bgtushu.png') no-repeat left top;
height: 80rpx;
// margin-bottom: 30rpx;
.item {
border-radius: 10rpx;
background-color: #c6ead0;
width: 48%;
// margin: 0 10rpx;
text-align: center;
color: #3c7f56;
font-size: 36rpx;
line-height: 80rpx;
}
.item.active {
background-color: #3c7f56;
color: #fff;
}
.item1 {
margin-right: 20rpx;
}
}
.contentButton {
margin: 20rpx 0;
}

View File

@@ -12,7 +12,7 @@
<view class="search_box flexbox" @click="onPageJump('../peanut/searchFor')">
<view class="search">
<text class="icon_search"></text>
<text class="prompt">请输入想要搜索的书名</text>
<text class="prompt">请输入书名</text>
</view>
</view>
<!-- <view class="searBtn flexbox">
@@ -150,8 +150,8 @@
<image :src="item.image"></image>
<view class="lt_title">{{item.bookName}}</view>
<view class="lt_author">{{item.authorName}} []</view>
<view class="lt_yuan">{{item.price}}</view>
<view class="lt_xian">{{item.salePrice}}</view>
<view class="lt_yuan">{{item.price}}天医</view>
<view class="lt_xian">{{item.salePrice}}天医</view>
<b v-if="item.isVip==1" style="background: #c79119;">VIP</b>
<b v-if="item.isVip==2" style="background: #c74119;">付费</b>
</view>

View File

@@ -43,7 +43,7 @@
<view class="chong_list">
<view>
<b>{{userMes.peanutCoin}}</b>
天医
</view>
<view>
<b>{{userMes.conponsCount}}</b>
@@ -89,7 +89,7 @@
<!-- <view class="nav_list" @click="onGoing()">
<text>帮助与反馈11111</text>
</view> -->
<view class="nav_list" @click="onShare">
<view class="nav_list" @click="newOnShare">
<text>分享App</text>
</view>
<view class="nav_list" @click="onPageJump('../peanut/aboutUs')">
@@ -107,6 +107,11 @@
<u-modal :show="signShow" :content="signContent" :showCancelButton="true" @cancel="signShow=false"
@confirm="signOut">
</u-modal>
<!-- 分享弹窗 -->
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
<uni-popup-share @select="haveSelected"></uni-popup-share>
</uni-popup>
<music-play :playData="playData"></music-play>
<z-navigation></z-navigation>
</view>
@@ -115,7 +120,7 @@
<script>
import musicPlay from '@/components/music.vue'
import $http from '@/config/requestConfig.js';
import appShare, { closeShare } from '@/uni_modules/zhouWei-APPshare/js_sdk/appShare';
// import appShare, { closeShare } from '@/uni_modules/zhouWei-APPshare/js_sdk/appShare';
import {
mapState
} from 'vuex';
@@ -148,6 +153,44 @@
},
//方法
methods: {
haveSelected(data){
console.log(data,' 选择的是')
if(data.index == 0){
// 分享到好友
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 0,
href: "https://www.nuttyreading.com/nuttyreading.apk",
title: "疯子读书",
summary: "我正在使用疯子读书提升自己,赶紧跟我一起来体验吧!",
imageUrl: "static/fengziIcon.jpg",
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
}
});
}else if(data.index == 1){
// 分享到朋友圈
uni.share({
provider: "weixin",
scene: "WXSceneTimeline",
type: 0,
href: "https://www.nuttyreading.com/nuttyreading.apk",
title: "疯子读书",
summary: "我正在使用疯子读书提升自己,赶紧跟我一起来体验吧!",
imageUrl: "static/fengziIcon.jpg",
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
}
});
}
},
switchTab(url){
uni.switchTab({
url: url
@@ -170,31 +213,35 @@
},
//分享app
onShare(){
let shareData = {
shareUrl:"https://www.nuttyreading.com/nuttyreading.apk",
shareTitle:"疯子读书",
type:'0',
shareContent:"疯子读书,请使用浏览器打开本链接,自动下载安装包",
shareImg:"static/fengziIcon.jpg",
appId : "wx47134a8f15083734", // 默认不传type的时候必须传appId和appPath才会显示小程序图标
appPath : "https://www.nuttyreading.com/nuttyreading.apk",
appWebUrl : "https://www.nuttyreading.com/nuttyreading.apk",
};
// 调用
let shareObj = appShare(shareData,res => {
console.log("疯子读书",res);
// 分享成功后关闭弹窗
// 第一种关闭弹窗的方式
closeShare();
});
setTimeout(() => {
// 第二种关闭弹窗的方式
shareObj.close();
},5000);
// 新写分享
newOnShare(){
this.$refs.share.open()
},
//分享app
// onShare(){
// let shareData = {
// shareUrl:"https://www.nuttyreading.com/nuttyreading.apk",
// shareTitle:"疯子读书",
// type:'0',
// summary:'疯子读书,请使用浏览器打开本链接,自动下载安装包', // 分享内容的摘要
// shareContent:"疯子读书,请使用浏览器打开本链接,自动下载安装包",
// shareImg:"static/fengziIcon.jpg",
// appId : "wx47134a8f15083734", // 默认不传type的时候必须传appId和appPath才会显示小程序图标
// appPath : "https://www.nuttyreading.com/nuttyreading.apk",
// appWebUrl : "https://www.nuttyreading.com/nuttyreading.apk",
// };
// // 调用
// let shareObj = appShare(shareData,res => {
// console.log("疯子读书",res);
// // 分享成功后关闭弹窗
// // 第一种关闭弹窗的方式
// closeShare();
// });
// setTimeout(() => {
// // 第二种关闭弹窗的方式
// shareObj.close();
// },5000);
// },
// 注销账户
logout(){

View File

@@ -66,7 +66,7 @@
<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 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>
@@ -135,7 +135,7 @@
// img: '../../static/icon/pay_1.png'
// },
{
title: '币充值',
title: '天医币充值',
id: 4,
img: '../../static/icon/oder_chong.png'
}
@@ -192,13 +192,13 @@
if(this.stepsVc.money > this.userMes.peanutCoin){
// uni.showToast({
// title:'币不足,请充值',
// title:'天医币不足,请充值',
// icon: 'none',
// duration: 2000
// })
uni.showModal({
title: '提示',
content: '币不足',
content: '天医币不足',
confirmText:'去充值',
showCancel:'知道了',
success: function (res) {
@@ -225,7 +225,7 @@
return false
}
},
// 充值
// 充值天医
buPoint() {
uni.navigateTo({
url: '../peanut/reCharge'

View File

@@ -9,7 +9,7 @@
<view v-for="(item, index) in cjList" @click="chosPric(item)"
:class="stepsCj.priceTypeId == item.priceTypeId?'Tab_cj cj_price':'cj_price'">
<view class="pr_jg">{{item.realMoney}}</view>
<view class="pr_yl">{{item.money}} </view>
<view class="pr_yl">{{item.money}} 天医</view>
<view class="pr_lj">限时特惠</view>
</view>
<br clear="both">

View File

@@ -9,7 +9,7 @@
<view v-for="(item, index) in cjList" @click="chosPric(item)"
:class="stepsCj.priceTypeId == item.priceTypeId?'Tab_cj cj_price':'cj_price'">
<view class="pr_jg">{{item.realMoney}}</view>
<view class="pr_yl">{{item.money}} </view>
<view class="pr_yl">{{item.money}} 天医</view>
<view class="pr_lj">限时特惠</view>
</view>
<br clear="both">

View File

@@ -31,7 +31,8 @@
<view class="selectAll">
<checkbox :checked="all" @click="isSelectAll()" class="round checkedItem" />
<text class="cartCho">全选</text>
<text class="cartDel" v-if="isCartDelShow" @click="delCart()">删除</text>
<!-- <text class="cartDel" >删除</text> -->
<button class="mini-btn" style="border-radius: 40rpx; font-size: 30rpx; height: 56rpx; line-height: 56rpx; margin-left: 6rpx;" v-if="isCartDelShow" @click="delCart()" type="warn" size="mini">删除</button>
</view>
<view class="exhibition">
<text class="total">合计: <b>{{totalPrice}}</b></text>
@@ -208,7 +209,9 @@
'Content-Type': 'application/json'
},
}).then(res => {
this.getCartList()
this.isCartDelShow = false
this.totalPrice = 0
this.getCartList()
uni.hideLoading()
})
} else {

View File

@@ -4,9 +4,10 @@
<view class="mainContent">
<view class="title">{{talkBookDetail.title}}</view>
<view class="voices" v-if="talkBookDetail.voices != '' && audioShow">
<audio style="text-align: left" :src="talkBookDetail.voices" poster="../../static/icon/fengziIcon.jpg"
:name="talkBookDetail.title" :author="bookInfo.author.authorName" :action="audioAction" controls></audio>
</view>
<audio style="text-align: left; overflow: hidden;" :src="talkBookDetail.voices"
poster="../../static/icon/home_icon_0.png" :name="talkBookDetail.title"
:author="bookInfo.author.authorName" :action="audioAction" controls></audio>
</view>
<view class="content" v-if="talkBookDetail.content != ''" v-html="talkBookDetail.content"></view>
<view class="content" v-else></view>
<view class="time">
@@ -14,14 +15,15 @@
</view>
<view class="tuijin" v-if="!isBuy && bookInfo.productId != null">
<p>觉得这本书还不错</p>
<view class="flexbox" style="justify-content: space-between; border: 1px solid #55aa7f; padding: 10rpx; border-radius: 10rpx;">
<view class="flexbox"
style="justify-content: space-between; border: 1px solid #55aa7f; padding: 10rpx; border-radius: 10rpx;">
<view class="flexbox">
<view class="img">
<image v-if="bookInfo.images != ''" :src="bookInfo.images" mode="aspectFit"></image>
<image v-else src="../../static/icon/wufeng.jpg" mode="aspectFit"></image>
</view>
<view>
<text style=" display: inline-block; margin-top: 40rpx;">{{bookInfo.name}}</text><br/>
<text style=" display: inline-block; margin-top: 40rpx;">{{bookInfo.name}}</text><br />
<text>作者{{bookInfo.author.authorName}}</text>
</view>
</view>
@@ -52,20 +54,22 @@
method: 'pause'
},
audioShow: false,
voicesImg:'',
voicesImg: '',
isBuy: false,
playData: {},
teachId: null, // 讲书id
bookId: null, // 书籍id
bookInfo: {
author:{
authorName:''
author: {
authorName: ''
}
}, // 书籍信息
talkBookDetail: {},
windowWidth: 0,
}
},
onLoad(e) {
this.windowWidth = uni.getSystemInfoSync().windowWidth;
console.log(e, 'onLoad')
this.bookId = e.bookId
this.teachId = e.teachId
@@ -80,14 +84,14 @@
methods: {
...mapMutations(['setUserInfo']),
// 购买
gotoBuy(){
gotoBuy() {
uni.navigateTo({
url: '../bookShop/commodityDetail?id=' + this.bookInfo.productId
url: '../bookShop/commodityDetail?id=' + this.bookInfo.productId
});
},
getBookInfo() {
// 获取书本基本信息
this.$http
this.$http
.post('book/book/getBookInfo', {
'bookId': this.bookId,
'userId': this.userInfo.id
@@ -96,10 +100,18 @@
if (res.code == 0) {
console.log(res, 'res')
this.bookInfo = res.book
if (!this.bookInfo.author || this.bookInfo.author == null) {
this.bookInfo.author = {
'authorName': '未知'
}
console.log(this.bookInfo.author.authorName, 'this.bookInfo.author.authorName')
}
//console.log(this.bookInfo.author.authorName,'this.bookInfo.author.authorName')
this.voicesImg = res.book.images
// this.bookInfo.name = res.book.name
this.isBuy = res.book.isBuy
console.log(this.voicesImg,'this.voicesImg')
console.log(this.voicesImg, 'this.voicesImg')
// this.freeChapterCount = res.book.freeChapterCount
} else {
console.log(res.msg)
@@ -120,7 +132,7 @@
if (res.code == 0) {
console.log(res, 'res')
this.talkBookDetail = res.bookTeach
// this.isBuy = res.book.isBuy
// this.freeChapterCount = res.book.freeChapterCount
} else {
@@ -155,27 +167,38 @@
.voices {
margin: 10rpx auto;
text-align: center;
}
/deep/ .uni-audio-name {
// white-space: wrap !important;
width: 340rpx;
}
.title {
font-size: 30rpx;
color: #55aa7f;
font-weight: bold;
margin-bottom: 10px;
margin: 40rpx 0;
}
.time{
text-align: right; font-size: 24rpx; margin-top: 20rpx; color: #999;
.time {
text-align: right;
font-size: 24rpx;
margin-top: 20rpx;
color: #999;
}
.content {
font-size: 28rpx; text-align:justify;
font-size: 28rpx;
text-align: justify;
color: #666;
line-height: 48rpx;
}
.tuijin {
font-size: 26rpx;
margin-top: 20rpx;
.img {
@@ -190,15 +213,25 @@
}
p {
font-size: 28rpx; margin-bottom: 20rpx;
font-size: 28rpx;
margin-bottom: 20rpx;
color: #55aa7f;
}
}
.btn{ margin-right: 20rpx;
text{ display: inline-block; margin-top:52rpx; font-size: 30rpx;
padding: 5px 8px;
background: #55aa7f; color: #fff;
border-radius: 5px;
}}
.btn {
margin-right: 20rpx;
text {
display: inline-block;
margin-top: 52rpx;
font-size: 30rpx;
padding: 5px 8px;
background: #55aa7f;
color: #fff;
border-radius: 5px;
}
}
// .opbtn{font-size: 14rpx;}
</style>

View File

@@ -22,7 +22,7 @@
<view style="font-weight: bold;margin-bottom: 30rpx;">
{{bookInfo.name}}
</view>
<view
<view v-if="bookInfo.author != null"
style="color: #9b9b9b;font-size: 28rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 38rpx;">
<p @click="onAuCHJump(bookInfo.author.id,1)" style="margin-bottom: 20rpx;">
{{bookInfo.author.authorName}} [] >

View File

@@ -10,7 +10,7 @@
<view v-if="tab_muJian==0">
<view class="AC_mes">
<view style="font-size: 50rpx;font-weight: bold;">{{userMes.peanutCoin}}</view>
<view style="color: #888;font-size: 30rpx;margin-top: 10rpx;"></view>
<view style="color: #888;font-size: 30rpx;margin-top: 10rpx;">天医</view>
<text class="AC_chong" @click="buPoint()">充值</text>
</view>
@@ -22,7 +22,7 @@
<view>
<text v-if="item.changeAmount>0">+</text>
<text>{{item.changeAmount}}</text>
天医
</view>
</view>
<view class="AC_mark">{{item.remark}}</view>
@@ -113,7 +113,7 @@
return {
playData:{},
tab_list: [{
name: '币',
name: '天医币',
}, {
name: '优惠券',
}],
@@ -247,7 +247,7 @@
// 充值
// 充值天医
buPoint() {
uni.navigateTo({
url: '../peanut/reCharge'