1 Commits

Author SHA1 Message Date
@fawn-nine
1065f5cbf6 穴位 2023-11-08 13:36:51 +08:00
11 changed files with 18 additions and 140 deletions

View File

@@ -12,8 +12,8 @@
"src" : "图片路径"
}
],
"versionName" : "1.2.12",
"versionCode" : 1212,
"versionName" : "1.2.10",
"versionCode" : 1210,
"app-plus" : {
"compatible" : {
"ignoreVersion" : true
@@ -113,8 +113,7 @@
"entitlements" : {
"com.apple.developer.associated-domains" : [ "applinks:verification.nuttyreading.com" ]
}
},
"idfa" : false
}
},
"icons" : {
"android" : {

View File

@@ -62,7 +62,7 @@
return {
playData: {},
searchValue: '',
oneCateList: [], // 一级分类标题
oneCateList: [], // 一级分类标题1
twoCateList: [], // 二级分类标题
titleList:[], // 穴位标题
curOneCateIndex:0, // 当前选中的一级分类

View File

@@ -1,5 +1,5 @@
<template>
<view :class="['container', currentDay == linshiDay && taskInfo.id && myword.length == 0 && bookInfo.isBuy ? 'pb100':'']">
<view :class="['container', currentDay == linshiDay && taskInfo.id && myword.length == 0 ? 'pb100':'']">
<z-nav-bar title="读书打卡"></z-nav-bar>
<!-- 仿钉钉打卡日历组件 -->
<view class=""
@@ -254,7 +254,7 @@
</view>
</u-popup>
<view class="leaveBtn" v-if="!addTextShow && currentDay == linshiDay && taskInfo.id && myword.length == 0 && bookInfo.isBuy">
<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>
</view>
@@ -450,11 +450,7 @@
// 获取书籍信息
getBookInfo() {
this.$http
// .post('book/book/appinfo/' + this.bookid + '/' + this.userInfo.id)
.post('book/book/getBookInfo', {
'bookId': this.bookid,
'userId': this.userInfo.id
})
.post('book/book/appinfo/' + this.bookid + '/' + this.userInfo.id)
.then(res => {
if (res.code == 0) {
console.log(res, 'res')
@@ -678,30 +674,17 @@
uni.hideLoading()
})
},
gotoBuy(){
let that = this
uni.showModal({
title: '提示',
content: '购买本书后方可参与打卡',
confirmText:'立即购买',
cancelText:'知道了',
success: function (res) {
if (res.confirm) {
console.log(that.bookInfo,'that.bookInfo');
uni.navigateTo({
url: '../bookShop/commodityDetail?id=' + that.bookInfo.productId
});
}
}
});
},
// 补卡
buSign(day) {
console.log('正在补卡', this.taskInfo, day)
if(!this.bookInfo.isBuy){
this.gotoBuy()
return
}
// return false
// if (!this.taskInfo.id) {
// uni.showToast({
// title: '当天未发布打卡任务,不可补卡哦',
// icon: 'none'
// })
// return
// }
let param = {
'bookId': this.bookid,
'userId': this.userInfo.id,
@@ -730,10 +713,6 @@
},
// 快捷签到
kuickSign() {
if(!this.bookInfo.isBuy){
this.gotoBuy()
return
}
if (!this.taskInfo.id) {
uni.showToast({
@@ -821,7 +800,7 @@
});
},
// 说点什么
goToSign() {
goToSign() {
// images数据处理
if (this.formData.images.length > 0) {
var imgs = []

View File

@@ -4,24 +4,9 @@
<view class="mainContent">
<view class="title">{{talkBookDetail.title}}</view>
<view class="voices" v-if="talkBookDetail.voices != '' && audioShow">
<!-- <audio style="text-align: left; overflow: hidden;" :src="talkBookDetail.voices" @play="audioPlay"
<audio style="text-align: left; overflow: hidden;" :src="talkBookDetail.voices" @play="audioPlay"
poster="../../static/icon/home_icon_0.png" :name="talkBookDetail.title"
:author="bookInfo.author.authorName" :action="audioAction" controls @timeupdate="updateTime"></audio> -->
<!-- 下面自己写了个播放器 -->
<view class="audiobox">
<view class="audioinfo">
<image class="audioimg" :src="bookInfo.images" mode="aspectFit"></image>
<image class="audioimgstart" v-if="!this.paused" mode="aspectFit" src="../../static/audiostart.png" @click="start"></image>
<image class="audioimgstart" v-else mode="aspectFit" src="../../static/audiostop.png" @click="start"></image>
<view>
<view class="audiotitle">{{talkBookDetail.title}}</view>
<view class="audioauthor">{{bookInfo.author.authorName}}</view>
<view class="audioauthor">{{currentTime+'/'+duration}}</view>
<slider class="audioslider" block-size="12" v-model="currentTime" :max="duration" @change="changeTime"></slider>
<!-- <view @click="start">点击播放/暂停</view> -->
</view>
</view>
</view>
: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>
@@ -83,10 +68,6 @@
}, // 书籍信息
talkBookDetail: {},
windowWidth: 0,
audio: null,
duration: 10,
currentTime: 0,
paused: false
}
},
onLoad(e) {
@@ -94,55 +75,16 @@
console.log(e, 'onLoad')
this.bookId = e.bookId
this.teachId = e.teachId
// 初始化播放器实例
this.audio = uni.createInnerAudioContext();
},
onShow() {
this.getBookInfo()
this.getTalkBookDetail()
},
onHide() {
// console.log('onHide----',this.paused)
this.audio.pause() // 暂停播放
this.paused = false
},
onUnload() {
// console.log('onUnload----',this.paused)
this.audio.destroy() // 销毁播放器
},
computed: {
...mapState(['userInfo'])
},
methods: {
...mapMutations(['setUserInfo']),
start(){
this.initAudio() // 开始播放
},
initAudio(){
this.audio.onTimeUpdate(()=>{
this.duration = this.audio.duration.toFixed()
this.currentTime = this.audio.currentTime.toFixed()
})
this.audio.onPause(()=>{ // 用于被听书组件打断时设置播放icon状态
this.paused = false
// console.log('onPause----------',this.paused)
})
this.paused = this.audio.paused
// console.log('paused',this.paused)
if(this.paused){
this.audio.play()
}else{
this.audio.pause()
}
},
updateTime(e){
this.currentTime = e.detail.currentTime.toFixed()
this.duration = e.detail.duration.toFixed()
},
changeTime(e){
this.audio.seek(e.detail.value) // 设置播放位置
},
audioPlay(){
console.log('播放讲书',this.$music)
this.$music.setCloseBgm() // 关闭听书音频
@@ -198,11 +140,6 @@
console.log(res, 'res')
this.talkBookDetail = res.bookTeach
this.audio.src = this.talkBookDetail.voices // 设置播放资源路径
this.audio.onCanplay((e)=>{
this.duration = this.audio.duration.toFixed() // 初始化进度条和音频秒数
})
// this.isBuy = res.book.isBuy
// this.freeChapterCount = res.book.freeChapterCount
} else {
@@ -302,43 +239,6 @@
border-radius: 5px;
}
}
// 自定义播放器样式
.audiobox{
border: 2rpx solid #d6d5d5;
border-radius: 8px;
.audioinfo{
display: flex;
.audioimg{
padding: 10rpx;
width: 180rpx;
height: 220rpx;
border-radius: 5px;
}
.audioimgstart{
position: absolute;
padding: 20rpx;
width: 180rpx;
height: 220rpx;
border-radius: 5px;
}
.audiotitle{
padding: 10rpx;
font-size: 28rpx;
text-align: left;
}
.audioauthor{
padding: 4rpx;
font-size: 24rpx;
text-align: left;
color: #999;
}
.audioslider{
width: 400rpx;
}
}
}
// .opbtn{font-size: 14rpx;}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.