页面美化+接口更新

This commit is contained in:
@fawn-nine
2023-09-19 17:58:35 +08:00
parent 8787e14e68
commit 2eda927c44
9 changed files with 486 additions and 460 deletions

View File

@@ -27,7 +27,7 @@
</view>
<view class="pingjia" v-if="linkProducts && linkProducts.length > 0 && linkProducts[0]">
<view class="">
<view style="font-weight: 600;margin-bottom: 30rpx;">其他购买套餐</view>
<view style="font-weight: 600;margin-bottom: 30rpx;">商品列表</view>
<!-- <view class="icon-del rotate"></view> -->
</view>
<!-- 商品包含 -->
@@ -442,8 +442,9 @@
buttonClick(e) {
console.log(e)
if(e.index == 0){
// 点击的是加入购物车
this.addCart()
// 点击的是加入购物车
this.upoShow = true
// this.addCart()
}else{
// 点击的是立即购买
this.upoShow = true

View File

@@ -1,7 +1,9 @@
<template>
<view>
<z-nav-bar title="读书打卡"></z-nav-bar>
<view class="tip">
<text>请选择要打卡的书籍</text>
</view>
<view class="listenList" v-if="bookList.length > 0">
<view class="wrap" >
<u-row gutter="16" justify="flex-start">
@@ -99,6 +101,10 @@
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.tip{
padding: 20rpx; background-color: #fff;
text{ font-size: 36rpx;}
}
.contentButton{margin: 20rpx 0;}
.btns{margin-top: 15rpx; background-color: #f1f1f1; border-radius: 10rpx; font-size: 28rpx; justify-content: space-between;

View File

@@ -8,6 +8,7 @@
<image :src="productInfo.images" mode="aspectFill"></image>
<view>
<span class="title">{{productInfo.name}}</span>
<view class="description" v-if="productInfo.description == ''">暂无简介内容</view>
<view class="description">{{productInfo.description}}</view>
</view>

View File

@@ -70,8 +70,9 @@
<view class="list shupingList" v-if="shupingList.length > 0">
<view class="item" @click.stop="toDetail(item)" v-for="item in shupingList" :key="item.id">
<h4>{{item.title}}</h4>
<view class="info" v-if="item.content != ''" v-html="item.content">
<view class="" v-if="item.content && item.content != '' ">
<view class="info" v-html="item.content">
</view>
</view>
<view class="more" @click.stop="toDetail(item)">立即查看</view>
</view>
@@ -331,7 +332,9 @@
.playing{color: #1daa5c;}
.flexbox{display: flex;}
.tags{
.tag{
margin-left: 0; margin-right: 10rpx;
}
}
.moreBtn{text-align: center; margin-top: 20rpx;
text{padding: 6rpx 20rpx; border: 1px solid #27b386; color: #27b386; border-radius: 10rpx;}

View File

@@ -38,7 +38,8 @@
<text>作者<text style="color: #333;">{{item.authorName}}</text></text>
</view>
<view v-if="shouTyp==1">
<text>出版商<text style="color: #333;">{{item.publisherName}}</text></text>
<text>简介<text style="color: #333;" v-if="item.description == ''">暂无简介内容</text>
<text style="color: #333;" class="jianjie">{{item.description}}</text></text>
</view>
<view>
<text style="line-height: 20rpx;">{{item.title}}</text>
@@ -169,7 +170,13 @@
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.jianjie{overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
text-align:justify;
}
.author_mess {
padding: 30rpx 30rpx;
box-shadow: 0 0px 10px 1px #d3d1d133;

View File

@@ -3,25 +3,27 @@
<!-- 公共组件-每个页面必须引入 -->
<!-- <public-module></public-module> -->
<!-- <z-nav-bar title="我的图书"></z-nav-bar> -->
<view class="home_bg " >
<view class="flexbox" style=" justify-content: space-between; ">
<view class="home_bg">
<view class="" style=" ">
<view class="icon_hua">
<image src="../../static/icon/home_icon_3.png" mode="aspectFit" class="icon_hua_1"></image>
</view>
<view class="search_box flexbox" @click="onPageJump('../peanut/searchFor')">
</view>
<view class="hehan">
<image src="../../static/icon/hehan.png" mode="aspectFit" class="icon_hua_1"></image>
</view>
<view class="search_box flexbox" @click="onPageJump('./searchFor')">
<view class="search">
<text class="icon_search"></text>
<text class="prompt">请输入想要搜索的书名</text>
</view>
</view>
<view class="searBtn flexbox">
<!-- <view class="searBtn flexbox">
<text>搜索</text>
</view>
</view>
<view class="home_lunbo">
<u-swiper :list="list3" indicator indicatorMode="line" circular style="height: 180rpx;"></u-swiper>
</view>
</view> -->
</view>
<!-- <view class="home_lunbo">
<u-swiper :list="list3" indicator indicatorMode="line" circular style="height: 180rpx;"></u-swiper>
</view> -->
</view>
<!-- <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>
@@ -109,9 +111,9 @@
<u-divider text="全部加载完成"></u-divider>
</view>
</view>
<view class="shuwuLink">
<!-- <view class="shuwuLink">
<image @click="" src="../../static/icon/shuwu.jpg" mode="aspectFit"></image>
</view>
</view> -->
<music-play :playData="playData"></music-play>
<z-navigation></z-navigation>
</view>
@@ -431,49 +433,52 @@
}
}
.home_bg {
background-image: url('@/static/icon/home_bg1.jpg');
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
padding: 100rpx 20rpx 40rpx 20rpx;
position: relative;
height: 400rpx; margin-bottom: 130rpx;
.icon_hua_1 {
// margin: 0 auto;
width: 150rpx;
height: 150rpx;
}
.icon_hua{width: 150rpx; display: block;}
.search_box { margin-top: 20rpx; align-items: center;
width: calc(100% - 300rpx);
.search{height: 80upx;
display: flex;
width: 100%;
align-items: center;
padding: 0upx 40upx;
background-color: #fff;
border-radius: 20upx;
box-shadow: 0 0px 10px 1px #54a96633;
background-image: url('@/static/icon/home_bg.jpg');
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
padding: 20rpx;
position: relative; margin-bottom:60rpx;
// height: 400rpx; margin-bottom: 130rpx;
.icon_hua_1 {
// margin: 0 auto;
width: 100%; text-align: center;
height: 150rpx;
image{width: 150rpx; height: 150rpx;}
}
.prompt {
color: #838383; font-size: 24rpx;
.icon_hua{width: 100%; text-align: center; display: block;
image{width: 150rpx; height: 150rpx; margin: 0 auto;}
}
.icon_search {
background-image: url('@/static/icon/map_ic_search.png');
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
width:36upx;
height: 36upx;
margin-right: 20upx;
.search_box { margin: 0 auto; margin-top: 20rpx; align-items: center;
width: calc(100% - 30rpx); margin-bottom: -52rpx;
.search{height: 80upx;
display: flex;
width: 100%;
align-items: center;
padding: 0upx 40upx;
background-color: #fff;
border-radius: 20upx;
box-shadow: 0 0px 10px 1px #54a96633;
}
.prompt {
color: #838383; font-size: 24rpx;
}
.icon_search {
background-image: url('@/static/icon/map_ic_search.png');
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
width:36upx;
height: 36upx;
margin-right: 20upx;
}
}
.searBtn{
width: 80rpx; align-items: center;
font-size: 30rpx; color: #fff;
}
}
.searBtn{
width: 80rpx; align-items: center;
font-size: 30rpx; color: #fff;
}
}
</style>

View File

@@ -54,6 +54,7 @@
</view>
</view>
<u-divider v-else text="暂无买书籍数据~"></u-divider>
<view>
<view v-if="status==0" style="text-align: center;">
<u-loading-icon style="display: inline-block;"></u-loading-icon>

View File

@@ -30,6 +30,11 @@
{{item.title}} >
</p>
</view>
<view class="tags">
<uni-tag class="tag" @click="toMore()" :inverted="true" text="书评" type="success"></uni-tag>
<!-- 1:打卡2不打卡 -->
<uni-tag @click="gotoclock()" v-if="bookInfo.clockIn == 1" class="tag" :inverted="true" text="签到" type="warning"></uni-tag>
</view>
<!-- <view class="price">
<text class="light">98.00</text>
</view> -->
@@ -69,7 +74,7 @@
sort:0 可以听
sort:1 不可以听
-->
<view class="playList" >
<view class="playList" v-if="libLIst.length > 0">
<view class="item" v-for="(item,index) in libLIst" :key="index" >
<view >
<view
@@ -82,6 +87,7 @@
</view>
</view>
</view>
<u-divider v-else text="暂无听书目录"></u-divider>
<music-play :playData="playData"></music-play>
<!-- <z-navigation></z-navigation> -->
@@ -185,6 +191,19 @@
},
methods: {
...mapMutations(['setUserInfo']),
// 查看本书更多书评
toMore(val){
console.log(val,'val')
uni.navigateTo({
url: '../comments/comments?bookid='+ this.bookid,
});
},
// 去打卡
gotoclock(){
uni.navigateTo({
url: '../clock/clock?bookid='+ this.bookid,
});
},
getBookInfo(){
// 获取书本基本信息
this.$http
@@ -315,17 +334,6 @@
uni.navigateTo({
url: '../bookShop/settlementBook?type=2&list=' + this.bookid
});
// uni.showModal({
// title: '提示',
// cancelText: '暂不购买',
// confirmText:'立即购买',
// content: '确定花费¥95元购买本书电子版吗',
// success: function (res) {
// if (res.confirm) {
// console.log('用户点击确定');
// }
// }
// });
},
@@ -335,42 +343,8 @@
url: '../eBook/bookMessage?Id=' + id + '&typ=' + e
});
},
// 第一次加载音乐播放器
firstListen(){
this.forceRefresh = false
this.$http
.post('book/bookchaptercontent/appBooksChapterContent', {
'userId': this.userInfo.id,
'bookid': this.bookid,
'id': this.playid
})
.then(res => {
//this.tmpChapter.text = res.bookCatalogue
if(res.code == 0){
if(res.bookCatalogue.voices[0] != null){
// console.log('走这')
this.videoList = []
this.boardRemark = res.bookCatalogue.chapter[0]
this.fengImg = res.image
this.videoList.push({'recorPath':res.bookCatalogue.voices[0]})
// console.log(res.bookCatalogue.voices[0],'path')
this.forceRefresh = true
}else{
uni.showToast({
title:'暂无可播放音频~',
icon:'none',
duration:2000
})
setTimeout(()=>{
uni.navigateBack({ // 返回上一页
delta: 1
});
},2000)
}
}
}).catch((e)=>{})
},
// 存储播放进度
saveRate(val){
this.$http
@@ -430,16 +404,17 @@
if(res.BookCatalogue.length > 0){
this.libLIst = res.BookCatalogue
// this.fengImg = res.images
}else{
uni.showToast({
title:'暂无可听章节哦~',
icon:'none'
})
setTimeout(()=>{
uni.navigateBack({ // 返回上一页
delta: 1
});
},2000)
}else{
this.libLIst = []
// uni.showToast({
// title:'暂无可听章节哦~',
// icon:'none'
// })
// setTimeout(()=>{
// uni.navigateBack({ // 返回上一页
// delta: 1
// });
// },2000)
}
}
}).catch((e)=>{
@@ -541,6 +516,11 @@
.price{ margin-top: 160rpx; overflow: hidden;
.light{font-size: 50rpx; font-weight: bold; color: #f05654;}
}
.tags{
.tag{
margin-left: 0; margin-right: 10rpx;
}
}
.charType{display: inline; width:20px !important;}
.graytitle{color: #999;}
.yigoumai{background-color: #ffc773;}

File diff suppressed because it is too large Load Diff