This commit is contained in:
@fawn-nine
2023-10-09 15:39:16 +08:00
parent 4184ec9c36
commit 4cd369bc1c
20 changed files with 3462 additions and 30 deletions

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;