补卡,图书列表接口替换
This commit is contained in:
@@ -17,8 +17,7 @@
|
|||||||
<text>返回今天</text>
|
<text>返回今天</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- <u-icon name="checkbox-mark" color="#55aa7f" size="14" style="display: inline;"></u-icon> -->
|
<!-- <u-icon name="checkbox-mark" color="#55aa7f" size="14" style="display: inline;"></u-icon> -->
|
||||||
<view class="dakaBtn" @tap="buSign(linshiDay)"
|
<view class="dakaBtn" @tap="buSign(linshiDay)" v-if="currentDay > linshiDay">
|
||||||
v-if="currentDay > linshiDay">
|
|
||||||
<text style="font-size: 24rpx;">补卡</text>
|
<text style="font-size: 24rpx;">补卡</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="dakaBtn" @tap="kuickSign()"
|
<view class="dakaBtn" @tap="kuickSign()"
|
||||||
@@ -114,10 +113,11 @@
|
|||||||
<view class="content" style="width: 100%;" @click="showPingLun(item)">
|
<view class="content" style="width: 100%;" @click="showPingLun(item)">
|
||||||
<view class="" v-html="item.phtml"></view>
|
<view class="" v-html="item.phtml"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flexbox" style="text-align: right; align-items: center; justify-content: space-between;">
|
<view class="flexbox"
|
||||||
|
style="text-align: right; align-items: center; justify-content: space-between;">
|
||||||
<view class="flexbox" @click="showPingLun(item)" style="align-items: center; ">
|
<view class="flexbox" @click="showPingLun(item)" style="align-items: center; ">
|
||||||
<u-icon style="display: inline ;margin-left: 10rpx; " name="chat" color="#999"
|
<u-icon style="display: inline ;margin-left: 10rpx; " name="chat" color="#999"
|
||||||
size="18" ></u-icon>
|
size="18"></u-icon>
|
||||||
<text class="time" style="display: inline ;margin-right: 20rpx; ">回复</text>
|
<text class="time" style="display: inline ;margin-right: 20rpx; ">回复</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="time">{{item.createTime}}</text>
|
<text class="time">{{item.createTime}}</text>
|
||||||
@@ -126,18 +126,21 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 显示追平 -->
|
<!-- 显示追平 -->
|
||||||
<view class="zhuiping item" v-if="item.subCommentList.length > 0" style="padding-left: 50px;">
|
<view class="zhuiping item" v-if="item.subCommentList.length > 0" style="padding-left: 50px;">
|
||||||
<view class="subPItem" v-for="item2 in item.subCommentList" :key="item2.key">
|
<view class="subPItem" v-for="item2 in item.subCommentList" :key="item2.key">
|
||||||
<view class="touxiang zhuipingTX flexbox">
|
<view class="touxiang zhuipingTX flexbox">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image v-if="!item2.avatar || item2.avatar == ''" src="../../static/icon/morenAvavter.png"
|
<image v-if="!item2.avatar || item2.avatar == ''"
|
||||||
mode="aspectFit"></image>
|
src="../../static/icon/morenAvavter.png" mode="aspectFit"></image>
|
||||||
<image v-else :src="item2.avatar" mode="aspectFit"></image>
|
<image v-else :src="item2.avatar" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="neirong" style="text-align: left;">
|
<view class="neirong" style="text-align: left;">
|
||||||
<text class="username nowrap subPName">{{item2.nickName?item2.nickName:'匿名用户'}}</text>
|
<text
|
||||||
<text class="username nowrap" style="padding: 0 10rpx; color: #c7c7c7;">回复了</text>
|
class="username nowrap subPName">{{item2.nickName?item2.nickName:'匿名用户'}}</text>
|
||||||
<text class="username nowrap">{{item2.puserNickName?item2.puserNickName:'匿名用户'}}</text>
|
<text class="username nowrap"
|
||||||
|
style="padding: 0 10rpx; color: #c7c7c7;">回复了</text>
|
||||||
|
<text
|
||||||
|
class="username nowrap">{{item2.puserNickName?item2.puserNickName:'匿名用户'}}</text>
|
||||||
<view class="contentBox" style="width: 100% !important; padding-left: 3px;">
|
<view class="contentBox" style="width: 100% !important; padding-left: 3px;">
|
||||||
<!-- <div class="pjimgs flexbox">
|
<!-- <div class="pjimgs flexbox">
|
||||||
<view class="item" v-for="(item1,index) in item2.imageList">
|
<view class="item" v-for="(item1,index) in item2.imageList">
|
||||||
@@ -149,18 +152,21 @@
|
|||||||
<view class="" v-html="item2.phtml"></view>
|
<view class="" v-html="item2.phtml"></view>
|
||||||
<!-- <view class="" v-html="item2.content"></view> -->
|
<!-- <view class="" v-html="item2.content"></view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="flexbox" style="text-align: right; align-items: center; justify-content: space-between;">
|
<view class="flexbox"
|
||||||
<view class="flexbox" @click="showPingLun(item2)" style="align-items: center;justify-content: space-between; ">
|
style="text-align: right; align-items: center; justify-content: space-between;">
|
||||||
<u-icon style="display: inline ;margin-left: 10rpx; " name="chat" color="#999"
|
<view class="flexbox" @click="showPingLun(item2)"
|
||||||
size="18" ></u-icon>
|
style="align-items: center;justify-content: space-between; ">
|
||||||
<text class="time" style="display: inline ;margin-right: 20rpx; ">回复</text>
|
<u-icon style="display: inline ;margin-left: 10rpx; " name="chat"
|
||||||
|
color="#999" size="18"></u-icon>
|
||||||
|
<text class="time"
|
||||||
|
style="display: inline ;margin-right: 20rpx; ">回复</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="time">{{item2.createTime}}</text>
|
<text class="time">{{item2.createTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -190,15 +196,15 @@
|
|||||||
placeholder-style="font-size:24rpx;color:#aaaaaa;" placeholder="请输入回复内容"></textarea>
|
placeholder-style="font-size:24rpx;color:#aaaaaa;" placeholder="请输入回复内容"></textarea>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<u-button type="success" @click="goToHuiFu">提交</u-button>
|
<u-button type="success" @click="goToHuiFu">提交</u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="position: relative;">
|
<view style="position: relative;">
|
||||||
<emotion @emotion="handleEmj" :height="220" v-if="isShowEmj" :windowWidth="windowWidth">
|
<emotion @emotion="handleEmj" :height="220" v-if="isShowEmj" :windowWidth="windowWidth">
|
||||||
</emotion>
|
</emotion>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<!-- 发布评论弹窗 -->
|
<!-- 发布评论弹窗 -->
|
||||||
@@ -267,8 +273,8 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
opPinglun:{}, // 针对的评论对象
|
opPinglun: {}, // 针对的评论对象
|
||||||
pinglunShow:false,
|
pinglunShow: false,
|
||||||
placeholder: '开始输入...',
|
placeholder: '开始输入...',
|
||||||
dayCurrent: 0, // 载入页面时的显示页数
|
dayCurrent: 0, // 载入页面时的显示页数
|
||||||
showBack: false,
|
showBack: false,
|
||||||
@@ -328,10 +334,10 @@
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
recordPageSize:20,
|
recordPageSize: 20,
|
||||||
recordPage:1,
|
recordPage: 1,
|
||||||
secondPage:1,
|
secondPage: 1,
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
@@ -342,7 +348,7 @@
|
|||||||
console.log('下拉刷新了')
|
console.log('下拉刷新了')
|
||||||
this.getBookInfo()
|
this.getBookInfo()
|
||||||
this.initDay()
|
this.initDay()
|
||||||
this.getmySign()
|
this.getmySign()
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -363,7 +369,7 @@
|
|||||||
// 回复评论
|
// 回复评论
|
||||||
this.opPinglun = item
|
this.opPinglun = item
|
||||||
this.pinglunShow = true
|
this.pinglunShow = true
|
||||||
console.log('item45456', this.opPinglun)
|
console.log('item45456', this.opPinglun)
|
||||||
},
|
},
|
||||||
onEditorReady() {
|
onEditorReady() {
|
||||||
// #ifdef MP-BAIDU
|
// #ifdef MP-BAIDU
|
||||||
@@ -436,9 +442,9 @@
|
|||||||
console.log(url)
|
console.log(url)
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: [url],
|
urls: [url],
|
||||||
longPressActions:{
|
longPressActions: {
|
||||||
itemList:['很抱歉,暂不支持保存图片到本地'],
|
itemList: ['很抱歉,暂不支持保存图片到本地'],
|
||||||
success:function(res){
|
success: function(res) {
|
||||||
// console.log(res,'+++++')
|
// console.log(res,'+++++')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -491,7 +497,7 @@
|
|||||||
this.$http
|
this.$http
|
||||||
// .post('book/clockin/myinfolist?userid=' + this.userInfo.id + '&taskid=' + this.taskInfo.id +
|
// .post('book/clockin/myinfolist?userid=' + this.userInfo.id + '&taskid=' + this.taskInfo.id +
|
||||||
// '&bookid=' + this.bookid)
|
// '&bookid=' + this.bookid)
|
||||||
|
|
||||||
.get('book/clockInForum/getChatList', data)
|
.get('book/clockInForum/getChatList', data)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res, '当天我的打卡内容')
|
console.log(res, '当天我的打卡内容')
|
||||||
@@ -530,15 +536,16 @@
|
|||||||
// 获取某天的签到列表信息
|
// 获取某天的签到列表信息
|
||||||
getAllSign(val) {
|
getAllSign(val) {
|
||||||
console.log(val, '-----------')
|
console.log(val, '-----------')
|
||||||
let param = {
|
let data = {
|
||||||
'entryId': val.id,
|
'entryId': val.id
|
||||||
// 'userId': null,
|
// 'bookid': this.bookid,
|
||||||
'currentPage': this.recordPage,
|
// 'limit': 5,
|
||||||
'pageSize': this.recordPageSize,
|
// 'page': this.page,
|
||||||
// 'taskid': val.id
|
// 'taskid': val.id
|
||||||
}
|
}
|
||||||
this.$http
|
this.$http
|
||||||
.get('book/clockInForum/getChatList', param)
|
// .post('book/clockin/applist', data)
|
||||||
|
.get('book/clockInForum/getChatList', data)
|
||||||
// .get('book/clockInForum/getChatList', data)
|
// .get('book/clockInForum/getChatList', data)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
@@ -553,14 +560,14 @@
|
|||||||
// console.log(pjstr,'pjstr')
|
// console.log(pjstr,'pjstr')
|
||||||
//arr1 = arr[i].images.split(',')
|
//arr1 = arr[i].images.split(',')
|
||||||
// arr[i].images = arr1
|
// arr[i].images = arr1
|
||||||
arr[i].phtml = pjstr
|
arr[i].phtml = pjstr
|
||||||
for (var j = 0; j < arr[i].subCommentList.length; j++) {
|
for (var j = 0; j < arr[i].subCommentList.length; j++) {
|
||||||
var subpjstr = ''
|
var subpjstr = ''
|
||||||
subpjstr = this.getHtmlComment(arr[i].subCommentList[j].content)
|
subpjstr = this.getHtmlComment(arr[i].subCommentList[j].content)
|
||||||
arr[i].subCommentList[j].phtml = subpjstr
|
arr[i].subCommentList[j].phtml = subpjstr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(arr,'评论处理后的数据结构')
|
console.log(arr, '评论处理后的数据结构')
|
||||||
this.commentsList = arr
|
this.commentsList = arr
|
||||||
} else {
|
} else {
|
||||||
this.commentsList = []
|
this.commentsList = []
|
||||||
@@ -604,7 +611,7 @@
|
|||||||
},
|
},
|
||||||
// 补卡
|
// 补卡
|
||||||
buSign(day) {
|
buSign(day) {
|
||||||
console.log('正在补卡', this.taskInfo,day)
|
console.log('正在补卡', this.taskInfo, day)
|
||||||
// return false
|
// return false
|
||||||
// if (!this.taskInfo.id) {
|
// if (!this.taskInfo.id) {
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
@@ -615,29 +622,29 @@
|
|||||||
// }
|
// }
|
||||||
let param = {
|
let param = {
|
||||||
'bookId': this.bookid,
|
'bookId': this.bookid,
|
||||||
'userId':this.userInfo.id,
|
'userId': this.userInfo.id,
|
||||||
'day':day
|
'day': day
|
||||||
}
|
}
|
||||||
console.log(param, 'param')
|
console.log(param, 'param')
|
||||||
this.$http
|
this.$http
|
||||||
.get('/book/userClockIn/correctClockIn', param)
|
.get('/book/userClockIn/correctClockIn', param)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
//console.log(res, '快捷签到')
|
//console.log(res, '快捷签到')
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '补卡成功'
|
title: '补卡成功'
|
||||||
})
|
})
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
this.addTextShow = false
|
this.addTextShow = false
|
||||||
this.formData.content = ''
|
this.formData.content = ''
|
||||||
this.formData.images = []
|
this.formData.images = []
|
||||||
this.getmySign()
|
this.getmySign()
|
||||||
// this.getAllSign(this.taskInfo)
|
// this.getAllSign(this.taskInfo)
|
||||||
},2000)
|
}, 2000)
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
}
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 快捷签到
|
// 快捷签到
|
||||||
kuickSign() {
|
kuickSign() {
|
||||||
@@ -678,11 +685,11 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
// 提交回复评论
|
// 提交回复评论
|
||||||
goToHuiFu(){
|
goToHuiFu() {
|
||||||
let myFid = null
|
let myFid = null
|
||||||
if(this.opPinglun.fid == 0){
|
if (this.opPinglun.fid == 0) {
|
||||||
myFid = this.opPinglun.id
|
myFid = this.opPinglun.id
|
||||||
}else if (this.opPinglun.fid != 0){
|
} else if (this.opPinglun.fid != 0) {
|
||||||
myFid = this.opPinglun.fid
|
myFid = this.opPinglun.fid
|
||||||
}
|
}
|
||||||
let data = {
|
let data = {
|
||||||
@@ -708,7 +715,7 @@
|
|||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.pinglunShow = false
|
this.pinglunShow = false
|
||||||
this.opPinglun = {}
|
this.opPinglun = {}
|
||||||
@@ -719,25 +726,25 @@
|
|||||||
title: '回复成功',
|
title: '回复成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getmySign()
|
this.getmySign()
|
||||||
this.getTask(this.currentDay)
|
this.getTask(this.currentDay)
|
||||||
},2000)
|
}, 2000)
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 说点什么
|
// 说点什么
|
||||||
goToSign() {
|
goToSign() {
|
||||||
// images数据处理
|
// images数据处理
|
||||||
if(this.formData.images.length > 0){
|
if (this.formData.images.length > 0) {
|
||||||
var imgs = []
|
var imgs = []
|
||||||
imgs = this.formData.images.map(item => {
|
imgs = this.formData.images.map(item => {
|
||||||
return item.url
|
return item.url
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(this.formData.content == ''){
|
if (this.formData.content == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入内容',
|
title: '请输入内容',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -780,7 +787,7 @@
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getmySign()
|
this.getmySign()
|
||||||
this.getTask(this.currentDay)
|
this.getTask(this.currentDay)
|
||||||
},2000)
|
}, 2000)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -911,7 +918,10 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.pingjiaBox{margin-bottom: 20rpx;}
|
.pingjiaBox {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.ql-editor {
|
.ql-editor {
|
||||||
min-height: 50rpx;
|
min-height: 50rpx;
|
||||||
}
|
}
|
||||||
@@ -959,7 +969,7 @@
|
|||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.touxiang {
|
.touxiang {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -981,10 +991,18 @@
|
|||||||
margin-top: 6rpx;
|
margin-top: 6rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.subPItem{margin-bottom: 40rpx;}
|
|
||||||
.subPName{padding-left: 10rpx;}
|
.subPItem {
|
||||||
.zhuipingTX{
|
margin-bottom: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subPName {
|
||||||
|
padding-left: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.zhuipingTX {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 30px !important;
|
width: 30px !important;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
@@ -995,6 +1013,7 @@
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.allComments {
|
.allComments {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
getfreeBook(){
|
getfreeBook(){
|
||||||
if(this.contentShow == 1){
|
if(this.contentShow == 1){
|
||||||
// this.$http.post('book/clockinPunch/myClockBooks', {
|
// this.$http.post('book/clockinPunch/myClockBooks', {
|
||||||
this.$http.post('book/clock/getUserClockBooks', {
|
this.$http.post('book/clock/getUserClockBooks', {
|
||||||
'userId': this.userInfo.id,
|
'userId': this.userInfo.id,
|
||||||
limit: 100,
|
limit: 100,
|
||||||
page:1,
|
page:1,
|
||||||
|
|||||||
Reference in New Issue
Block a user