Commit 052bf502 authored by sujie@126.com's avatar sujie@126.com

Merge branch 'class_lvtz' of git.server:wangxuelai/wechatapp.shangjiadao.com into sj-dev-dev

parents 5267621f 13d63a3c
......@@ -8,7 +8,7 @@ import {
LocalStorage
} from '../../../utilities/index.js';
import {
classroomdetailGet,
classroomdetailGet2,
readreviewcountGet,
classroomlikesGet,
classroomcommentsGet,
......@@ -67,9 +67,11 @@ Page({
optDialog: false,//操作(置顶 修改 删除)
modalDeleteReview: false, //删除确认
modalReviewHadDel: false, //被删除弹框
like_status: false,
likeSubmitting: false,
showRefresh:false,
errTip: '点评故事已被删除'
},
/**
......@@ -163,11 +165,17 @@ Page({
}
},
ClassroomDetailGet(){
classroomdetailGet({
classroomdetailGet2({
id: this.data.rid
}).then((res)=>{
const {code, data} = res;
if(code == 200){
if(code == 40018){
this.setData({
modalReviewHadDel: true,
errTip: '点评故事已被删除'
})
return
}else if(code == 200){
try {
data.content = data.content ? JSON.parse(data.content) :'';
data.works = data.works ? JSON.parse(data.works) :'';
......@@ -178,11 +186,18 @@ Page({
data.read_remind = Number(data.read_remind);
data.unread_remind = Number(data.unread_remind);
this.setData({
reviewDetail: data
reviewDetail: data,
like_status: data.like_status
})
if(this.data.type==2){
this.subjectReviewTemplate(data.content.templates);
}
}else{
this.setData({
modalReviewHadDel: true,
errTip: msg
})
return
}
}).catch((err)=>{
console.log(err)
......@@ -241,8 +256,7 @@ Page({
const {code, data} = res;
if(code == 200) {
this.setData({
likesList: data.list[Number(this.data.rid)].list || [],
like_status: data.list[Number(this.data.rid)].list.find(ele=>ele.like_user_id==this.data.reviewDetail.school_teacher.id)? true: false
likesList: data.list[Number(this.data.rid)].list || []
})
}
}).catch((err)=>{
......@@ -781,9 +795,10 @@ Page({
})
},
toShareCard(){
const {sid,id,rid,type} = this.data
const {sid,id,rid,type} = this.data;
// role 1为b端,2为c端
wx.navigateTo({
url: `/src/pages/papersquare/classreviewshare?sid=${sid}&id=${id}&rid=${rid}&type=${type}`
url: `/src/pages/papersquare/classreviewshare?sid=${sid}&id=${id}&rid=${rid}&type=${type}&role=1`
})
},
hideCountDailogShow(e){
......@@ -819,6 +834,7 @@ Page({
title: `${warnText}成功`,
duration: 500
})
that.prevPageShow();
})
}else{
wx.showToast({
......@@ -938,7 +954,7 @@ Page({
if (code == 200) {
if (like_status == 2) { // 取消点赞
like_status = false;
likesList = likesList.filter(ele => ele.like_user_id != this.data.reviewDetail.school_teacher.id);
likesList = likesList.filter(ele => ele.id != data.id);
} else if (like_status == 1) { // 点赞
like_status = true;
likesList.push({
......@@ -946,7 +962,6 @@ Page({
avatar: data.school_teacher.avatar || avatar
},
id: data.id,
like_user_id: data.like_user_id,
like_user_type: data.like_user_type,
});
}
......@@ -974,5 +989,11 @@ Page({
showRefresh: true
})
}
},
bindIGet(){
const {sid,id} = this.data
wx.redirectTo({
url: `/business/pages/classservice/classreviewindex?sid=${sid}&id=${id}`
})
}
})
\ No newline at end of file
......@@ -376,4 +376,15 @@
<view class="modal-btn btn-red" bindtap="sureDeleteReview">确认</view>
</view>
</view>
</view>
<view class="modal-dialog" wx:if="{{modalReviewHadDel}}">
<view class="modal-mask"></view>
<view class="modal-box">
<view class="modal-title">温馨提示</view>
<view class="modal-content">{{errTip}}</view>
<view class="modal-bottom">
<view class="modal-btn" bindtap="bindIGet">我知道了</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -777,6 +777,8 @@ page{
display: flex;
align-items: center;
justify-content: center;
color: #4F4F4F;
font-size: 30rpx;
}
.modal-dialog .modal-box .modal-bottom{
width: 100%;
......
......@@ -20,49 +20,49 @@
</view>
</view>
</view>
<block wx:if="{{dakarole==1}}">
<view class="box">
<view class="box-title">
<view class="title">完善机构信息</view>
</view>
<view class="box">
<view class="box-title">
<view class="title">完善机构信息</view>
</view>
<view class="line-item">
<view class="item-label">机构LOGO <text>建议尺寸:120*120</text></view>
<view class="right" bindtap="proMainImgUpload" data-type="schoollogo">
<image class="logo-upload-img" wx:if="{{params.logo != ''}}" src="{{filter.imagify(params.logo, 'image/resize,w_640/format,jpg/quality,q_50')}}"></image>
<!-- <image class="logo-upload-img" wx:else src="{{localImageRoot}}2c/pclogin/logo.png?{{imageVersion}}"></image> -->
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
<view class="line-item">
<view class="item-label">机构LOGO <text>建议尺寸:120*120</text></view>
<view class="right" bindtap="proMainImgUpload" data-type="schoollogo">
<image class="logo-upload-img" wx:if="{{params.logo != ''}}" src="{{filter.imagify(params.logo, 'image/resize,w_640/format,jpg/quality,q_50')}}"></image>
<!-- <image class="logo-upload-img" wx:else src="{{localImageRoot}}2c/pclogin/logo.png?{{imageVersion}}"></image> -->
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
</view>
<view class="line-item">
<view class="item-label">机构名称</view>
<view class="right">
<input type="text" placeholder-class="placeholderclass" class="iteminput" maxlength="30" value="{{params.title}}" bindinput="titleInput" placeholder="输入机构名称"></input>
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
<view class="line-item">
<view class="item-label">机构名称</view>
<view class="right">
<input type="text" placeholder-class="placeholderclass" class="iteminput" maxlength="30" value="{{params.title}}" bindinput="titleInput" placeholder="输入机构名称"></input>
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
</view>
<view class="line-item line-item-subject">
<view class="item-label">机构类型</view>
<view class="right content-box">
<view class="item-box" wx:for="{{allSubject}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" data-active-item="{{item}}" bindtap="selectSubject" >
<view class="{{selectedSubjectStyle[item.id]?'item-box-inner selectd-item-box-inner':'item-box-inner'}}">{{item.name}}</view>
<view class="line-item line-item-subject">
<view class="item-label">机构类型</view>
<view class="right content-box">
<view class="item-box" wx:for="{{allSubject}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" data-active-item="{{item}}" bindtap="selectSubject" >
<view class="{{selectedSubjectStyle[item.id]?'item-box-inner selectd-item-box-inner':'item-box-inner'}}">{{item.name}}</view>
</view>
</view>
</view>
</view>
<view class="line-item">
<view class="item-label">地址</view>
<view class="right" bindtap="addressSelect">
<view class="iteminput">{{params.location_address ? params.location_address : '点击定位'}}</view>
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
<view class="line-item">
<view class="item-label">地址</view>
<view class="right" bindtap="addressSelect">
<view class="iteminput">{{params.location_address ? params.location_address : '点击定位'}}</view>
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
</view>
</view>
<view class="submitbtn" bindtap="save">完成</view>
<view class="submitbtn" bindtap="save">完成</view>
</block>
<!-- <view class="common-dialog" wx:if="{{showAuthSettingDia}}">
<view class="dialog-box">
......
export default {
// dailysignSchool 机构825生成日签,自定义的一张poster
dailysignSchool: [
{
sid: 825,
posterbg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg825.png'
},
{
sid: 449,
posterbg:'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg825.png'
},
]
}
\ No newline at end of file
export default {
imageRoot: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/',
// host: 'https://qxapi.qingxiao.online/daka',
// host2: 'https://wx.m.shangjiadao.cn',
host: 'https://qxapi.qingxiao.online/daka',
host2: 'https://wx.m.shangjiadao.cn',
storageVersion: '4.0',
imageVersion: '20191104',
host: 'https://clock.wp53.cn',
host2: 'https://test.wp53.cn',
// host: 'https://clock.wp53.cn',
// host2: 'https://test.wp53.cn',
appId: 'wxc1246ea029394785',
miniProgram: {
clock: 'wxdeee20e52a1fd7ee'
......@@ -152,25 +152,25 @@ export default {
}],
dailyPosterNew: [{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg1.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg1.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg2.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg2.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg3.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg3.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg4.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg4.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg5.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg5.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg6.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg6.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg7.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg7.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg8.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg8.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg9.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg9.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg10.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg10.png'
}],
dailytextNew: [{
linea: '慈母手中线,游子身上衣。谁言寸草心,报得三春晖。',
......
......@@ -104,6 +104,15 @@ function classroomdetailGet (data) {
errorresolve: 1,
})
}
function classroomdetailGet2 (data) {
return wxRequest({
role: '2b',
url: apis.business.classservice.classroomdetail,
data,
method: 'GET',
errorresolve: 2,
})
}
function classreviewPlacetop (data) {
return wxRequest({
role: '2b',
......@@ -196,6 +205,7 @@ export {
remindpushPOST,
studentreviewPost,
classroomdetailGet,
classroomdetailGet2,
readreviewcountGet,
classroomlikesGet,
classroomcommentsGet,
......
......@@ -49,7 +49,7 @@ function classroomdetailGet(data){
url: `${apis.customer.common.classroomdetailGet}`,
data,
method: 'GET',
errorresolve: 1,
errorresolve: 2,
})
}
export {
......
......@@ -479,6 +479,9 @@ Component({
}
},
goClockDetail () {
if(this.data.type != 0 && this.data.othertype!=1){
return
}
if (this.data.clock.subject_type == 3) {
wx.navigateTo({
url: `/src/pages/clockdetail/newindex?tid=${this.data.clock.unlock_mode_id}&cid=${this.data.clock.id}`,
......
......@@ -35,22 +35,22 @@
getStarClass: getStarClass,
}
</wxs>
<view class="sign-item {{type == 1 && !bordera? '' : 'border-b-14'}}" style="{{type == 1 ? 'padding-bottom:0': ''}}">
<view class="blankclickarea" bindtap="goClockDetail" wx:if="{{type == 0 || othertype==1}}"></view>
<view class="sign-item {{type == 1 && !bordera? '' : 'border-b-14'}}" style="{{type == 1 ? 'padding-bottom:0': ''}}" catchtap="goClockDetail">
<!-- <view class="blankclickarea" catchtap="goClockDetail" wx:if="{{type == 0 || othertype==1}}"></view> -->
<image class="best-flag" src="{{imageRoot}}2b/common/jinx.png?x-oss-process=image/resize,w_200/format,jpg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" wx:if="{{clock.place_top_at}}"></image>
<view class="sign-user-info">
<view class="left-box">
<image class="sign-user-avator" bindtap="goGrowthRecord" src="{{filter.imagify(clock.school_student.avatar, 'image/resize,w_160/format,jpg')}}" ></image>
<image class="sign-user-avator" catchtap="goGrowthRecord" src="{{filter.imagify(clock.school_student.avatar, 'image/resize,w_160/format,jpg')}}" ></image>
<view class="sign-user-name-box">
<view class="sign-user-name" bindtap="goGrowthRecord">{{clock.school_student.nickname}}</view>
<view class="sign-user-name" catchtap="goGrowthRecord">{{clock.school_student.nickname}}</view>
<view class="sign-create-box">
<text class="sign-create-time" bindtap="goGrowthRecord">{{filter.timeCompare(clock.created_at_time)}}</text>
<text class="sign-count" wx:if="{{modeType==3}}" bindtap="goGrowthRecord">已闯{{clock.clock_days}}关</text>
<text class="sign-count" wx:else bindtap="goGrowthRecord">已坚持{{clock.clock_days}}天</text>
<text class="sign-create-time" catchtap="goGrowthRecord">{{filter.timeCompare(clock.created_at_time)}}</text>
<text class="sign-count" wx:if="{{modeType==3}}" catchtap="goGrowthRecord">已闯{{clock.clock_days}}关</text>
<text class="sign-count" wx:else catchtap="goGrowthRecord">已坚持{{clock.clock_days}}天</text>
</view>
</view>
</view>
<view class="operate-dot" bindtap="operateClock" wx:if="{{customerId == clock.student_id && !isactivityclock &&type != 1}}">
<view class="operate-dot" catchtap="operateClock" wx:if="{{customerId == clock.student_id && !isactivityclock &&type != 1}}">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
......@@ -65,15 +65,15 @@
<text class="sign-item-content-text" wx:if="{{type == 0}}" selectable="true">{{!clock.contentexpand ? clock.content_100 : clock.content}}</text>
</view>
<view class="expand-content {{type == 1 ? '' : 'pdr56'}}" wx:if="{{clock.content.length > 100 && (type == 0 || othertype==1)}}">
<text class="" bindtap="goClockDetail">全文 </text>
<text class="" catchtap="goClockDetail">全文 </text>
</view>
<view class="mediacontent {{type == 1 ? '' : 'pdr56'}}" wx:if="{{clock.video_parse.length > 0 && (type == 0 &&type != 1 || othertype==1)}}">
<view class="mediabox clearfix" wx:if="{{clock.video_parse.length == 1}}">
<view class="bigimgbox optiona" wx:for="{{clock.video_parse}}" wx:for-item="video" wx:key="index">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" bindtap="prevImg">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" catchtap="prevImg">
<image class="img" src="{{filter.imagify(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
</view>
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" bindtap="playvideo">
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" catchtap="playvideo">
<image class="img" src="{{filter.videoPoster(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<view class="video-play-icon-box width80-box">
<image class="video-play-icon" src="{{imageRoot}}2c/common/playicon.png?{{imageVersion}}" mode="widthFix" lazy-load="true" binderror="" bindload=""></image>
......@@ -83,10 +83,10 @@
</view>
<view class="mediabox clearfix" wx:if="{{clock.video_parse.length == 2}}">
<view class="bigimgbox optionb" wx:for="{{clock.video_parse}}" wx:for-item="video" wx:key="index">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" bindtap="prevImg">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" catchtap="prevImg">
<image class="img" src="{{filter.imagify(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
</view>
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" bindtap="playvideo">
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" catchtap="playvideo">
<image class="img" src="{{filter.videoPoster(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<view class="video-play-icon-box width80-box">
<image class="video-play-icon" src="{{imageRoot}}2c/common/playicon.png?{{imageVersion}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
......@@ -95,29 +95,29 @@
</view>
</view>
<view class="mediabox clearfix" wx:if="{{clock.imageCount == 2 && clock.videoCount == 1}}">
<view class="imgbox optiond videobox" data-src="{{clock.video_parse[0].src}}" data-mode="{{clock.video_parse[0].mode}}" data-from="clockitem" bindtap="playvideo">
<view class="imgbox optiond videobox" data-src="{{clock.video_parse[0].src}}" data-mode="{{clock.video_parse[0].mode}}" data-from="clockitem" catchtap="playvideo">
<image class="img" src="{{filter.videoPoster(clock.video_parse[0].src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<view class="video-play-icon-box width80-box">
<image class="video-play-icon" src="{{imageRoot}}2c/common/playicon.png?{{imageVersion}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
</view>
</view>
<view class="imgbox optiond imgbox2">
<image class="img imga" src="{{filter.imagify(clock.video_parse[1].src, 'image/resize,w_320/format,jpg/quality,q_50')}}" data-src="{{clock.video_parse[1].src}}" bindtap="prevImg" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<image class="img" src="{{filter.imagify(clock.video_parse[2].src, 'image/resize,w_320/format,jpg/quality,q_50')}}" data-src="{{clock.video_parse[2].src}}" bindtap="prevImg" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<image class="img imga" src="{{filter.imagify(clock.video_parse[1].src, 'image/resize,w_320/format,jpg/quality,q_50')}}" data-src="{{clock.video_parse[1].src}}" catchtap="prevImg" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<image class="img" src="{{filter.imagify(clock.video_parse[2].src, 'image/resize,w_320/format,jpg/quality,q_50')}}" data-src="{{clock.video_parse[2].src}}" catchtap="prevImg" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
</view>
</view>
<view class="mediabox clearfix" wx:if="{{clock.imageCount > 2 && clock.videoCount == 1}}">
<view class="imgbox optiond videobox" data-src="{{clock.video_parse[0].src}}" data-mode="{{clock.video_parse[0].mode}}" data-from="clockitem" bindtap="playvideo">
<view class="imgbox optiond videobox" data-src="{{clock.video_parse[0].src}}" data-mode="{{clock.video_parse[0].mode}}" data-from="clockitem" catchtap="playvideo">
<image class="img" src="{{filter.videoPoster(clock.video_parse[0].src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<view class="video-play-icon-box width80-box">
<image class="video-play-icon" src="{{imageRoot}}2c/common/playicon.png?{{imageVersion}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
</view>
</view>
<view class="imgbox optiond imgbox2">
<view class="box boxa" data-src="{{clock.video_parse[1].src}}" bindtap="prevImg">
<view class="box boxa" data-src="{{clock.video_parse[1].src}}" catchtap="prevImg">
<image class="img" src="{{filter.imagify(clock.video_parse[1].src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
</view>
<view class="box" bindtap="goClockDetail">
<view class="box" catchtap="goClockDetail">
<image class="img" src="{{filter.imagify(clock.video_parse[2].src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<view class="staticmask">
<view class="static">
......@@ -132,10 +132,10 @@
</view>
<view class="mediabox clearfix" wx:if="{{clock.video_parse.length <= 6 && clock.videoCount != 1 && clock.video_parse.length > 2}}">
<view class="bigimgbox optionc" wx:for="{{clock.video_parse}}" wx:for-item="video" wx:key="index">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" bindtap="prevImg">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" catchtap="prevImg">
<image class="img" src="{{filter.imagify(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
</view>
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-from="clockitem" bindtap="playvideo">
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-from="clockitem" catchtap="playvideo">
<image class="img" src="{{filter.videoPoster(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<view class="video-play-icon-box width80-box">
<image class="video-play-icon" src="{{imageRoot}}2c/common/playicon.png?{{imageVersion}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
......@@ -145,16 +145,16 @@
</view>
<view class="mediabox clearfix" wx:if="{{clock.video_parse.length > 6 && clock.videoCount != 1 && clock.video_parse.length > 2}}">
<view class="bigimgbox optionc" wx:for="{{clock.video_parse}}" wx:for-item="video" wx:key="index" wx:if="{{index <= 5}}">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" bindtap="prevImg">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" catchtap="prevImg">
<image class="img" src="{{filter.imagify(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
</view>
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" bindtap="playvideo">
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" catchtap="playvideo">
<image class="img" src="{{filter.videoPoster(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<view class="video-play-icon-box width80-box">
<image class="video-play-icon" src="{{imageRoot}}2c/common/playicon.png?{{imageVersion}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
</view>
</view>
<view class="staticmask" wx:if="{{index == 5}}" bindtap="goClockDetail">
<view class="staticmask" wx:if="{{index == 5}}" catchtap="goClockDetail">
<view class="static">
{{clock.video_parse.length - 6}}+
</view>
......@@ -172,14 +172,14 @@
wx:if="{{!audioStorage[audio.src] || !audioStorage[audio.src].play}}"
data-value="{{audio.src}}"
data-duration="{{audio.duration}}"
bindtap="playvoice"
catchtap="playvoice"
>
</view>
<view
class="action-mask"
wx:if="{{audioStorage[audio.src] && audioStorage[audio.src].play}}"
data-value="{{audio.src}}"
bindtap="pausevoice"
catchtap="pausevoice"
data-duration="{{audio.duration}}"
>
</view>
......@@ -199,10 +199,10 @@
</view>
<view class="detail-mediacontent" wx:if="{{type==1}}">
<view class="bigimgbox optiona" wx:for="{{clock.video_parse}}" wx:for-item="video" wx:key="index">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" bindtap="prevImg">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" catchtap="prevImg">
<image class="img" src="{{filter.imagify(video.src, 'image/resize,w_640/format,jpg/quality,q_80')}}" mode="widthFix" lazy-load="true" binderror="" bindload=""></image>
</view>
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" bindtap="playvideo">
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" catchtap="playvideo">
<image class="img" src="{{filter.videoPoster(video.src)}}" mode="widthFix" lazy-load="true" binderror="" bindload=""></image>
<view class="video-play-icon-box width80-box">
<image class="video-play-icon" src="{{imageRoot}}2c/common/playicon.png?{{imageVersion}}" mode="widthFix" lazy-load="true" binderror="" bindload=""></image>
......@@ -211,7 +211,7 @@
</view>
</view>
<view class="inline-wrapper">
<view class="theme-name-box {{type == 1 ? '' : 'pdr56'}}" wx:if="{{clock.subject_type!=3}}" bindtap="goThemeIndex" data-subject="{{clock}}" wx:if="{{type!=1}}">
<view class="theme-name-box {{type == 1 ? '' : 'pdr56'}}" wx:if="{{clock.subject_type!=3}}" catchtap="goThemeIndex" data-subject="{{clock}}" wx:if="{{type!=1}}">
<image class="dotdot-img" src="{{imageRoot}}2c/clockitem/dotdot.png?{{imageVersion}}" ></image>
<view class="name" selectable="false" space="false" decode="false">主题:</view>
<view class="content" selectable="false" space="false" decode="false">{{clock.subject.title}}</view>
......@@ -235,12 +235,12 @@
</view>
</view>
<view class="btn-box" bindtap="goThemeIndex" data-subject="{{clock}}">
<view class="btn-box" catchtap="goThemeIndex" data-subject="{{clock}}">
去打卡
</view>
</view>
<view class="location-box" wx:if="{{clock.latitude != 0}}" data-id="{{clock.id}}" bindtap="openLocation">
<view class="location-box" wx:if="{{clock.latitude != 0}}" data-id="{{clock.id}}" catchtap="openLocation">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
......@@ -248,19 +248,19 @@
<text class="location-address" >{{clock.location_address}}</text>
</view>
<view class="operate-box {{type == 1 ? 'detail-operate-box' :''}}">
<view class="btn fingureup-btn" bindtap="fingureUp" bindtouchstart="touchStart" bindtouchend="touchEnd">
<view class="btn fingureup-btn" catchtap="fingureUp" bindtouchstart="touchStart" bindtouchend="touchEnd">
<image class="iconimg {{clock.had_like ? 'fingureuporedicon' : ''}}" src="{{imageRoot}}2c/clockitem/{{clock.had_like ? 'likered' : 'likeheart'}}.png?{{imageVersion}}" ></image>
<text class="btnname" style="{{clock.had_like ? 'color:#FF6161' : ''}}" >赞</text>
<text class="btnname" style="{{clock.had_like ? 'color:#FF6161' : ''}}" wx:if="{{clock.likes.total > 0}}">{{clock.likes.total}}</text>
</view>
<view class="btn assess-btn" data-cid="{{clock.id}}" bindtap="goEvaluate">
<view class="btn assess-btn" data-cid="{{clock.id}}" catchtap="goEvaluate">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="iconimg" src="{{imageRoot}}2c/clockitem/messge.png?{{imageVersion}}" ></image>
<text class="btnname" >评论</text>
</view>
<view class="operate-box-right btn" bindtap="generatelongimg">
<view class="operate-box-right btn" catchtap="generatelongimg">
<view class="btn share-btn">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
......@@ -273,9 +273,9 @@
<view class="detail-likes-list" wx:if="{{type==1 && clock.likes && clock.likes.list.length > 0}}">
<image class="fingureupoicon" src="{{imageRoot}}2c/clockdetail/smallh.png?{{imageVersion}}"></image>
<!-- <view class="count">{{clock.likes.list.length}}</view> -->
<image class="advatar" wx:for="{{clock.likes.list}}" wx:for-item="like" wx:key="customerId" data-like="{{like}}" wx:for-index="customerId" bindtap="goLikeGrowthRecord" src="{{filter.imagify(like.avatar)}}"></image>
<image class="advatar" wx:for="{{clock.likes.list}}" wx:for-item="like" wx:key="customerId" data-like="{{like}}" wx:for-index="customerId" catchtap="goLikeGrowthRecord" src="{{filter.imagify(like.avatar)}}"></image>
</view>
<!-- <view class="theme-title-box {{type == 1 ? '' : 'pdl64'}}" bindtap="goThemeIndex" data-subject="{{clock}}" wx:if="{{withthemetitle&&clock.subject_type!=3&&type != 1&&othertype==0}}">
<!-- <view class="theme-title-box {{type == 1 ? '' : 'pdl64'}}" catchtap="goThemeIndex" data-subject="{{clock}}" wx:if="{{withthemetitle&&clock.subject_type!=3&&type != 1&&othertype==0}}">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
......@@ -297,7 +297,7 @@
<view class="mb20" style="position:relative;z-index:2" wx:if="{{clock.review[1]}}">
<view class="teacher-opencomment-box">
<view class="teacher-opencomment-itembox teacher-commnet-detail" wx:if="{{clock.review[1]}}">
<view class="teacher-avator-box" data-eindex="{{id}}" data-eid="{{clock.review[1].id}}" data-customerid="{{clock.student_id}}" bindtap="replyTeacher" data-roottype="1">
<view class="teacher-avator-box" data-eindex="{{id}}" data-eid="{{clock.review[1].id}}" data-customerid="{{clock.student_id}}" catchtap="replyTeacher" data-roottype="1">
<view class="title-box">
<image class="iconimg" src="{{imageRoot}}2c/clockitem/teacherd.png?{{imageVersion}}" ></image>老师点评:
</view>
......@@ -324,7 +324,7 @@
<view class="scoreshow">{{clock.review[1].score / 5}}</view>
</view>
<view class="activeimagebox" wx:if="{{clock.review[1] && clock.review[1].method == 2}}">
<view class="activeimageitem" hover-class="none" hover-stop-propagation="false" data-type="{{activeimg.type}}" data-fid="{{activeimg.id}}" bindtap="seeactivecomment" wx:key="index" wx:for="{{clock.review[1].flags}}" wx:for-item="activeimg">
<view class="activeimageitem" hover-class="none" hover-stop-propagation="false" data-type="{{activeimg.type}}" data-fid="{{activeimg.id}}" catchtap="seeactivecomment" wx:key="index" wx:for="{{clock.review[1].flags}}" wx:for-item="activeimg">
<block wx:if="{{activeimg.type == 2}}">
<view class="video-play-icon-box" >
<image class="video-play-icon" src="{{imageRoot}}2c/common/playicon.png?{{imageVersion}}" mode="widthFix"></image>
......@@ -394,14 +394,14 @@
wx:if="{{!audioStorage[filter.jsonParse(clock.review[1].audio).src] || !audioStorage[filter.jsonParse(clock.review[1].audio).src].play}}"
data-value="{{filter.jsonParse(clock.review[1].audio).src}}"
data-duration="{{filter.jsonParse(clock.review[1].audio).duration}}"
bindtap="playvoice"
catchtap="playvoice"
>
</view>
<view
class="action-mask"
wx:if="{{audioStorage[filter.jsonParse(clock.review[1].audio).src] && audioStorage[filter.jsonParse(clock.review[1].audio).src].play}}"
data-value="{{filter.jsonParse(clock.review[1].audio).src}}"
bindtap="pausevoice"
catchtap="pausevoice"
data-duration="{{filter.jsonParse(clock.review[1].audio).duration}}"
>
</view>
......@@ -423,10 +423,10 @@
<view class="teacher-commnet-text-box" wx:if="{{clock.review[1].img != '' && filter.jsonParse(clock.review[1].img).length > 0}}">
<view class="teacher-commemt-video-box" wx:if="{{clock.review[1].img != '' && filter.jsonParse(clock.review[1].img).length > 0}}" >
<view class="bigimgbox"wx:for="{{filter.jsonParse(clock.review[1].img)}}" wx:for-index="videoindex" wx:for-item="video" wx:key="{{videoindex}}">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" data-comment="{{comment.video}}" bindtap="preTeacherImg">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" data-comment="{{comment.video}}" catchtap="preTeacherImg">
<image class="img" src="{{filter.imagify(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
</view>
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" bindtap="playvideo">
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" catchtap="playvideo">
<image class="img" src="{{filter.videoPoster(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<view class="video-play-icon-box">
<image class="video-play-icon" src="{{imageRoot}}2c/common/playicon.png?{{imageVersion}}" mode="widthFix" lazy-load="true" binderror="" bindload=""></image>
......@@ -434,23 +434,23 @@
</view>
</view>
</view>
<!-- <view class="teacher-commnet-text" data-eid="{{clock.review[1].id}}" wx:if="{{clock.review[1].content != ''}}" data-type="open" bindtap="delTeacherComments">{{clock.review[1].content}}</view>
<!-- <view class="teacher-commnet-text" data-eid="{{clock.review[1].id}}" wx:if="{{clock.review[1].content != ''}}" data-type="open" catchtap="delTeacherComments">{{clock.review[1].content}}</view>
<view class="teacher-commnet-image-box" wx:if="{{clock.review[1].img != '' && filter.jsonParse(clock.review[1].img).length > 0}}">
<image class="teacher-commnet-image" bindtap="preTeacherImg" src="{{filter.imagify(filter.jsonParse(clock.review[1].img)[0].src, 'image/resize,w_320/format,jpg')}}" mode="center"></image>
<image class="teacher-commnet-image" catchtap="preTeacherImg" src="{{filter.imagify(filter.jsonParse(clock.review[1].img)[0].src, 'image/resize,w_320/format,jpg')}}" mode="center"></image>
</view> -->
</view>
<view class="replyTeacher-box" wx:if="{{customerId == clock.student_id}}" data-eindex="{{id}}" data-eid="{{clock.review[1].id}}" data-customerid="{{clock.student_id}}" bindtap="goCommenteditorIndex" data-roottype="1">回复老师</view>
<view class="replyTeacher-box" wx:if="{{customerId == clock.student_id}}" data-eindex="{{id}}" data-eid="{{clock.review[1].id}}" data-customerid="{{clock.student_id}}" catchtap="goCommenteditorIndex" data-roottype="1">回复老师</view>
</view>
<view class="teacherstudent-comment-box" wx:if="{{clock.review[1].comments && clock.review[1].comments.length>0}}">
<view class="response-item" wx:for="{{clock.review[1].comments}}" wx:for-item="comment" wx:for-index="id" wx:key="{{id}}">
<view class="teacher inline-wrapper" wx:if="{{comment.comment_user_type!=5}}">老师</view>
<text class="nickname" data-type="child" data-comment="{{comment}}" bindtap="goUserGrowthRecord" wx:else>{{clock.school_student.nickname.length>9 ? filter.slice(clock.school_student.nickname, 8) : clock.school_student.nickname }}</text>
<text class="nickname" data-type="child" data-comment="{{comment}}" catchtap="goUserGrowthRecord" wx:else>{{clock.school_student.nickname.length>9 ? filter.slice(clock.school_student.nickname, 8) : clock.school_student.nickname }}</text>
<text class="maohao" wx:if="{{!comment.comment_passive_user_id}}">:</text>
<text class="response-title" wx:if="{{comment.comment_passive_user_id}}">回复</text>
<text class="nickname" data-type="parent" data-comment="{{comment}}" bindtap="goUserGrowthRecord" wx:if="{{comment.comment_passive_user_type==5 && comment.comment_passive_user_id}}">{{clock.school_student.nickname.length>9 ? filter.slice(clock.school_student.nickname, 8) : clock.school_student.nickname }}</text>
<text class="nickname" data-type="parent" data-comment="{{comment}}" catchtap="goUserGrowthRecord" wx:if="{{comment.comment_passive_user_type==5 && comment.comment_passive_user_id}}">{{clock.school_student.nickname.length>9 ? filter.slice(clock.school_student.nickname, 8) : clock.school_student.nickname }}</text>
<view class="teacher inline-wrapper" wx:if="{{comment.comment_passive_user_type!=5&&comment.comment_passive_user_id}}">老师</view>
<text class="maohao" wx:if="{{comment.comment_passive_user_id}}">:</text>
<text class="response-text" data-eindex="{{id}}" data-eid="{{comment.id}}" data-etype="{{comment.comment_user_type}}" bindtap="replyTeacher2" selectable='true' data-customerid="{{clock.student_id}}" data-roottype="1">{{comment.content}}</text>
<text class="response-text" data-eindex="{{id}}" data-eid="{{comment.id}}" data-etype="{{comment.comment_user_type}}" catchtap="replyTeacher2" selectable='true' data-customerid="{{clock.student_id}}" data-roottype="1">{{comment.content}}</text>
<view class="inline-wrapper" wx:if="{{comment.audio}}" wx:for="{{filter.jsonParse(comment.audio)}}" bindlongpress="replyTeacher2" wx:for-item="audioitem" wx:for-index="audioindex" wx:key="{{id}}" data-eindex="{{id}}" data-eid="{{comment.id}}" data-etype="{{comment.comment_user_type}}" data-customerid="{{clock.consumer_id}}" data-roottype="1">
<view class="sjd-small-radio-box teacher-radio-box">
<view
......@@ -458,14 +458,14 @@
wx:if="{{!audioStorage[audioitem.src] || !audioStorage[audioitem.src].play}}"
data-value="{{audioitem.src}}"
data-duration="{{audioitem.duration}}"
bindtap="playvoice"
catchtap="playvoice"
>
</view>
<view
class="action-mask"
wx:if="{{audioStorage[audioitem.src] && audioStorage[audioitem.src].play}}"
data-value="{{audioitem.src}}"
bindtap="pausevoice"
catchtap="pausevoice"
data-duration="{{audioitem.duration}}"
>
</view>
......@@ -485,10 +485,10 @@
</view>
<view class="teacher-commemt-video-box" wx:if="{{comment.video && filter.jsonParse(comment.video).length>0}}" bindlongpress="replyTeacher2" data-eindex="{{id}}" data-eid="{{comment.id}}" data-etype="{{comment.comment_user_type}}" data-customerid="{{clock.student_id}}" data-roottype="1">
<view class="bigimgbox"wx:for="{{filter.jsonParse(comment.video)}}" wx:for-index="videoindex" wx:for-item="video" wx:key="{{videoindex}}">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" data-comment="{{comment.video}}" bindtap="prevImg">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" data-comment="{{comment.video}}" catchtap="prevImg">
<image class="img" src="{{filter.imagify(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
</view>
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" bindtap="playvideo">
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" catchtap="playvideo">
<image class="img" src="{{filter.videoPoster(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<view class="video-play-icon-box">
<image class="video-play-icon" src="{{imageRoot}}2c/common/playicon.png?{{imageVersion}}" mode="widthFix" lazy-load="true" binderror="" bindload=""></image>
......@@ -502,7 +502,7 @@
</view>
</view>
<view class="teacher-privatecomment-box" wx:if="{{clock.review[2] && customerId == clock.student_id}}">
<view class="teacher-privatecomment-title" data-eindex="{{id}}" bindtap="replyTeacher" data-eid="{{clock.review[2].id}}" data-customerid="{{clock.student_id}}" data-roottype="2">
<view class="teacher-privatecomment-title" data-eindex="{{id}}" catchtap="replyTeacher" data-eid="{{clock.review[2].id}}" data-customerid="{{clock.student_id}}" data-roottype="2">
<image class="privatemessage" src="{{imageRoot}}2c/common/privatemessage.png?{{imageVersion}}"></image>
<view class="reviewbox">
私密点评:
......@@ -518,7 +518,7 @@
wx:if="{{!audioStorage[filter.jsonParse(clock.review[2].audio).src] || !audioStorage[filter.jsonParse(clock.review[2].audio).src].play}}"
data-value="{{filter.jsonParse(clock.review[2].audio).src}}"
data-duration="{{filter.jsonParse(clock.review[2].audio).duration}}"
bindtap="playvoice"
catchtap="playvoice"
>
</view>
<view
......@@ -535,18 +535,18 @@
<text class="sjd-small-radio-time" wx:if="{{!audioStorage[filter.jsonParse(clock.review[2].audio).src] || !audioStorage[filter.jsonParse(clock.review[2].audio).src].play}}">{{filter.voiceTimeFormat(filter.jsonParse(clock.review[2].audio).duration)}}</text>
</view>
</view>
<view class="replyTeacher-box" data-eindex="{{id}}" bindtap="goCommenteditorIndex" data-eid="{{clock.review[2].id}}" data-customerid="{{clock.student_id}}" data-roottype="2">回复老师</view>
<view class="replyTeacher-box" data-eindex="{{id}}" catchtap="goCommenteditorIndex" data-eid="{{clock.review[2].id}}" data-customerid="{{clock.student_id}}" data-roottype="2">回复老师</view>
</view>
<view class="teacherstudent-comment-box" wx:if="{{clock.review[2].comments && clock.review[2].comments.length>0}}">
<view class="response-item" wx:for="{{clock.review[2].comments}}" wx:for-item="comment" wx:for-index="id" wx:key="{{id}}">
<view class="teacher inline-wrapper" wx:if="{{comment.comment_user_type!=5}}">老师</view>
<text class="nickname" data-type="child" data-comment="{{comment}}" bindtap="goUserGrowthRecord" wx:else>{{clock.school_student.nickname.length>9 ? filter.slice(clock.school_student.nickname, 8) : clock.school_student.nickname }}</text>
<text class="nickname" data-type="child" data-comment="{{comment}}" catchtap="goUserGrowthRecord" wx:else>{{clock.school_student.nickname.length>9 ? filter.slice(clock.school_student.nickname, 8) : clock.school_student.nickname }}</text>
<text class="maohao" wx:if="{{!comment.comment_passive_user_id}}">:</text>
<text class="response-title" wx:if="{{comment.comment_passive_user_id}}">回复</text>
<text class="nickname" data-type="parent" data-comment="{{comment}}" bindtap="goUserGrowthRecord" wx:if="{{comment.comment_passive_user_type==5 && comment.comment_passive_user_id}}">{{clock.school_student.nickname.length>9 ? filter.slice(clock.school_student.nickname, 8) : clock.school_student.nickname }}</text>
<text class="nickname" data-type="parent" data-comment="{{comment}}" catchtap="goUserGrowthRecord" wx:if="{{comment.comment_passive_user_type==5 && comment.comment_passive_user_id}}">{{clock.school_student.nickname.length>9 ? filter.slice(clock.school_student.nickname, 8) : clock.school_student.nickname }}</text>
<view class="teacher inline-wrapper" wx:if="{{comment.comment_passive_user_type!=5&&comment.comment_passive_user_id}}">老师</view>
<text class="maohao" wx:if="{{comment.comment_passive_user_id}}">:</text>
<text class="response-text" data-eindex="{{id}}" data-eid="{{comment.id}}" bindtap="replyTeacher2" data-customerid="{{clock.student_id}}" selectable='true' data-roottype="2">{{comment.content}}</text>
<text class="response-text" data-eindex="{{id}}" data-eid="{{comment.id}}" catchtap="replyTeacher2" data-customerid="{{clock.student_id}}" selectable='true' data-roottype="2">{{comment.content}}</text>
<view class="inline-wrapper" wx:if="{{comment.audio}}" wx:for="{{filter.jsonParse(comment.audio)}}" wx:for-item="audioitem" wx:for-index="audioindex" wx:key="{{id}}" bindlongpress="replyTeacher2" data-eindex="{{id}}" data-eid="{{comment.id}}" data-etype="{{comment.comment_user_type}}" data-customerid="{{clock.student_id}}" data-roottype="2">
<view class="sjd-small-radio-box teacher-radio-box">
<view
......@@ -554,14 +554,14 @@
wx:if="{{!audioStorage[audioitem.src] || !audioStorage[audioitem.src].play}}"
data-value="{{audioitem.src}}"
data-duration="{{audioitem.duration}}"
bindtap="playvoice"
catchtap="playvoice"
>
</view>
<view
class="action-mask"
wx:if="{{audioStorage[audioitem.src] && audioStorage[audioitem.src].play}}"
data-value="{{audioitem.src}}"
bindtap="pausevoice"
catchtap="pausevoice"
data-duration="{{audioitem.duration}}"
>
</view>
......@@ -581,10 +581,10 @@
</view>
<view class="teacher-commemt-video-box" bindlongpress="replyTeacher2" data-eindex="{{id}}" data-eid="{{comment.id}}" data-etype="{{comment.comment_user_type}}" data-customerid="{{clock.student_id}}" data-roottype="2">
<view class="bigimgbox"wx:for="{{filter.jsonParse(comment.video)}}" wx:for-index="videoindex" wx:for-item="video" wx:key="{{videoindex}}">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" data-comment="{{comment.video}}" bindtap="prevImg">
<view class="imgbox" wx:if="{{video.type == 'image'}}" data-src="{{video.src}}" data-comment="{{comment.video}}" catchtap="prevImg">
<image class="img" src="{{filter.imagify(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
</view>
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" bindtap="playvideo">
<view class="imgbox" wx:if="{{video.type == 'video'}}" data-src="{{video.src}}" data-mode="{{video.mode}}" data-from="clockitem" catchtap="playvideo">
<image class="img" src="{{filter.videoPoster(video.src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill" lazy-load="true" binderror="" bindload=""></image>
<view class="video-play-icon-box">
<image class="video-play-icon" src="{{imageRoot}}2c/common/playicon.png?{{imageVersion}}" mode="widthFix" lazy-load="true" binderror="" bindload=""></image>
......
......@@ -62,6 +62,8 @@ import {
import {
studentidentity
} from '../../../service/customer/signup.js'
import activityconfig from '../../../constants/activityconfig.js';
var app = getApp();
Page({
data: {
......@@ -180,7 +182,7 @@ Page({
isSchoolStudent: false,
myBaseinfo:'',
needREfresh: false,
studentId: ''
studentId: '',
},
onLoad: function (options) { // Do some initialize when page load.
// this.getWeeksDay(new Date());
......@@ -2253,7 +2255,146 @@ Page({
if(myrate<80){
myrate = Math.floor(Math.random() * 10 + 80);
}
this.setData({
if(activityconfig.dailysignSchool.find(item=>item.sid==this.data.sid)){
let activitySchoolInfo = activityconfig.dailysignSchool.filter(item=>item.sid==this.data.sid)[0];
this.setData({
painting: {
width: 750,
height: 1334,
views: [
{ // 头像
type: 'image',
url: userInfo?imagify(userInfo.avatar, 'image/resize,w_160/format,jpg'):imagify(visitor.userInfo.avatarUrl, 'image/resize,w_160/format,jpg'),
top: 766,
left: 70,
width: 80,
height: 80
},
{ // 背景
type: 'image',
url: activitySchoolInfo.posterbg,
top: 0,
left: 0,
width: 750,
height: 1334
},
{ // 二维码
type: 'image',
url: qrcode,
top: 1133,
left: 528,
width: 145,
height: 145
},
{ // 日期
type: 'text',
content: date.day,
fontSize: 100,
color: '#fff',
textAlign: 'left',
top: 120,
left: 40,
lineHeight: 1,
bolder: true
},
{ // 月份英文
type: 'text',
content: date.month.shortName + ' '+ date.year,
fontSize: 30,
color: '#fff',
textAlign: 'left',
top: 240,
left: 41,
lineHeight: 1,
bolder: true
},
{ // 昵称
type: 'text',
content: userInfo?userInfo.nickname:visitor.userInfo.nickName,
fontSize: 30,
color: '#2C2C2C',
textAlign: 'left',
top: 767,
left: 175,
bolder: true
},
{ // 打卡详情
type: 'text',
content: `在〔${circleInfo.title && circleInfo.title.length > 15 ? circleInfo.title.substr(0,15) + '...' : circleInfo.title || ''}〕完成打卡`,
fontSize: 24,
color: '#4F4F4F',
textAlign: 'left',
top: 819,
left: 176,
bolder: false
},
{ // %
type: 'text',
content: '%',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 565,
bolder: false
},
{ // 天
type: 'text',
content: '天',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 240,
bolder: false
},
{ // 百分比
type: 'text',
content: `${myrate}`,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 510,
bolder: true
},
{ // 打卡次数
type: 'text',
content: my_rank.clock_days,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 200,
bolder: true
},
{ // 校区名
type: 'text',
content: `来「${schoolInfo.title && schoolInfo.title.length > 15 ? schoolInfo.title.substr(0,15) + '...' : schoolInfo.title || ''}」`,
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1139,
left: 86,
bolder: true
},
{ // 校区名
type: 'text',
content: '和TA一起学习',
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1175,
left: 86,
bolder: true
},
]
}
})
}else{
this.setData({
painting: {
width: 750,
height: 1334,
......@@ -2419,6 +2560,8 @@ Page({
]
}
})
}
})
},
eventGetImage(e) {
......
......@@ -60,6 +60,8 @@ import regexp from '../../../constants/regexp.js';
import {
studentidentity
} from '../../../service/customer/signup.js'
import activityconfig from '../../../constants/activityconfig.js';
var app = getApp();
Page({
data: {
......@@ -178,7 +180,7 @@ Page({
isSchoolStudent: false,
myBaseinfo: '',
needREfresh: false,
studentId:''
studentId:'',
},
onLoad: function (options) { // Do some initialize when page load.
this.innerAudioContext = wx.createInnerAudioContext(); // 当前页面唯一的一个音频容器
......@@ -1426,172 +1428,313 @@ Page({
if(myrate<80){
myrate = Math.floor(Math.random() * 10 + 80);
}
this.setData({
painting: {
width: 750,
height: 1334,
views: [
{ // 头像
type: 'image',
url: userInfo?imagify(userInfo.avatar, 'image/resize,w_160/format,jpg'):imagify(visitor.userInfo.avatarUrl, 'image/resize,w_160/format,jpg'),
top: 766,
left: 70,
width: 80,
height: 80
},
{ // 背景
type: 'image',
url: posterMateria.dailyPosterBg.bg,
top: 0,
left: 0,
width: 750,
height: 1334
},
{ // 二维码
type: 'image',
url: qrcode,
top: 1133,
left: 530,
width: 144,
height: 144
},
{ // 日期
type: 'text',
content: date.day,
fontSize: 100,
color: '#fff',
textAlign: 'left',
top: 78,
left: 40,
lineHeight: 1,
bolder: true
},
{ // 月份英文
type: 'text',
content: date.month.shortName + ' '+ date.year,
fontSize: 30,
color: '#fff',
textAlign: 'left',
top: 198,
left: 41,
lineHeight: 1,
bolder: true
},
{ // 文案
type: 'text',
content: posterMateria.dailyWord.linea,
fontSize: 36,
lineHeight: 55,
color: '#fff',
textAlign: 'left',
width: 649,
top: 286,
left: 41,
MaxLineNumber: 2,
breakWord: true,
},
{ // 文案下划线
type: 'rect',
background: '#fff',
width: 60,
height: 5,
top: 415,
left: 41,
},
{ // 作者
type: 'text',
content: posterMateria.dailyWord.author,
fontSize: 26,
color: '#fff',
textAlign: 'left',
top: 444,
left: 41,
},
{ // 昵称
type: 'text',
content: userInfo?userInfo.nickname:visitor.userInfo.nickName,
fontSize: 30,
color: '#2C2C2C',
textAlign: 'left',
top: 767,
left: 175,
bolder: true
},
{ // 打卡详情
type: 'text',
content: `在〔${circleInfo.title && circleInfo.title.length > 15 ? circleInfo.title.substr(0,15) + '...' : circleInfo.title || ''}〕完成打卡`,
fontSize: 24,
color: '#4F4F4F',
textAlign: 'left',
top: 819,
left: 176,
bolder: false
},
{ // %
type: 'text',
content: '%',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 565,
bolder: false
},
{ // 天
type: 'text',
content: '关',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 240,
bolder: false
},
{ // 百分比
type: 'text',
content: `${myrate}`,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 510,
bolder: true
},
{ // 打卡次数
type: 'text',
content: my_rank.unlock_count,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 200,
bolder: true
},
{ // 校区名
type: 'text',
content: `来「${schoolInfo.title && schoolInfo.title.length > 15 ? schoolInfo.title.substr(0,15) + '...' : schoolInfo.title || ''}」`,
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1139,
left: 86,
bolder: true
},
{ // 校区名
type: 'text',
content: '和TA一起学习',
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1175,
left: 86,
bolder: true
},
]
}
})
if(activityconfig.dailysignSchool.find(item=>item.sid==this.data.sid)){
let activitySchoolInfo = activityconfig.dailysignSchool.filter(item=>item.sid==this.data.sid)[0];
this.setData({
painting: {
width: 750,
height: 1334,
views: [
{ // 头像
type: 'image',
url: userInfo?imagify(userInfo.avatar, 'image/resize,w_160/format,jpg'):imagify(visitor.userInfo.avatarUrl, 'image/resize,w_160/format,jpg'),
top: 766,
left: 70,
width: 80,
height: 80
},
{ // 背景
type: 'image',
url: activitySchoolInfo.posterbg,
top: 0,
left: 0,
width: 750,
height: 1334
},
{ // 二维码
type: 'image',
url: qrcode,
top: 1133,
left: 528,
width: 145,
height: 145
},
{ // 日期
type: 'text',
content: date.day,
fontSize: 100,
color: '#fff',
textAlign: 'left',
top: 120,
left: 40,
lineHeight: 1,
bolder: true
},
{ // 月份英文
type: 'text',
content: date.month.shortName + ' '+ date.year,
fontSize: 30,
color: '#fff',
textAlign: 'left',
top: 240,
left: 41,
lineHeight: 1,
bolder: true
},
{ // 昵称
type: 'text',
content: userInfo?userInfo.nickname:visitor.userInfo.nickName,
fontSize: 30,
color: '#2C2C2C',
textAlign: 'left',
top: 767,
left: 175,
bolder: true
},
{ // 打卡详情
type: 'text',
content: `在〔${circleInfo.title && circleInfo.title.length > 15 ? circleInfo.title.substr(0,15) + '...' : circleInfo.title || ''}〕完成打卡`,
fontSize: 24,
color: '#4F4F4F',
textAlign: 'left',
top: 819,
left: 176,
bolder: false
},
{ // %
type: 'text',
content: '%',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 565,
bolder: false
},
{ // 天
type: 'text',
content: '天',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 240,
bolder: false
},
{ // 百分比
type: 'text',
content: `${myrate}`,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 510,
bolder: true
},
{ // 打卡次数
type: 'text',
content: my_rank.clock_days,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 200,
bolder: true
},
{ // 校区名
type: 'text',
content: `来「${schoolInfo.title && schoolInfo.title.length > 15 ? schoolInfo.title.substr(0,15) + '...' : schoolInfo.title || ''}」`,
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1139,
left: 86,
bolder: true
},
{ // 校区名
type: 'text',
content: '和TA一起学习',
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1175,
left: 86,
bolder: true
},
]
}
})
}else{
this.setData({
painting: {
width: 750,
height: 1334,
views: [
{ // 头像
type: 'image',
url: userInfo?imagify(userInfo.avatar, 'image/resize,w_160/format,jpg'):imagify(visitor.userInfo.avatarUrl, 'image/resize,w_160/format,jpg'),
top: 766,
left: 70,
width: 80,
height: 80
},
{ // 背景
type: 'image',
url: posterMateria.dailyPosterBg.bg,
top: 0,
left: 0,
width: 750,
height: 1334
},
{ // 二维码
type: 'image',
url: qrcode,
top: 1133,
left: 530,
width: 144,
height: 144
},
{ // 日期
type: 'text',
content: date.day,
fontSize: 100,
color: '#fff',
textAlign: 'left',
top: 78,
left: 40,
lineHeight: 1,
bolder: true
},
{ // 月份英文
type: 'text',
content: date.month.shortName + ' '+ date.year,
fontSize: 30,
color: '#fff',
textAlign: 'left',
top: 198,
left: 41,
lineHeight: 1,
bolder: true
},
{ // 文案
type: 'text',
content: posterMateria.dailyWord.linea,
fontSize: 36,
lineHeight: 55,
color: '#fff',
textAlign: 'left',
width: 649,
top: 286,
left: 41,
MaxLineNumber: 2,
breakWord: true,
},
{ // 文案下划线
type: 'rect',
background: '#fff',
width: 60,
height: 5,
top: 415,
left: 41,
},
{ // 作者
type: 'text',
content: posterMateria.dailyWord.author,
fontSize: 26,
color: '#fff',
textAlign: 'left',
top: 444,
left: 41,
},
{ // 昵称
type: 'text',
content: userInfo?userInfo.nickname:visitor.userInfo.nickName,
fontSize: 30,
color: '#2C2C2C',
textAlign: 'left',
top: 767,
left: 175,
bolder: true
},
{ // 打卡详情
type: 'text',
content: `在〔${circleInfo.title && circleInfo.title.length > 15 ? circleInfo.title.substr(0,15) + '...' : circleInfo.title || ''}〕完成打卡`,
fontSize: 24,
color: '#4F4F4F',
textAlign: 'left',
top: 819,
left: 176,
bolder: false
},
{ // %
type: 'text',
content: '%',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 565,
bolder: false
},
{ // 天
type: 'text',
content: '关',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 240,
bolder: false
},
{ // 百分比
type: 'text',
content: `${myrate}`,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 510,
bolder: true
},
{ // 打卡次数
type: 'text',
content: my_rank.unlock_count,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 200,
bolder: true
},
{ // 校区名
type: 'text',
content: `来「${schoolInfo.title && schoolInfo.title.length > 15 ? schoolInfo.title.substr(0,15) + '...' : schoolInfo.title || ''}」`,
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1139,
left: 86,
bolder: true
},
{ // 校区名
type: 'text',
content: '和TA一起学习',
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1175,
left: 86,
bolder: true
},
]
}
})
}
})
},
eventGetImage(e) {
......
......@@ -15,11 +15,14 @@ import {
} from '../../../service/customer/signup.js'
import {
classroomdetailGet
} from '../../../service/business/classservice.js';
} from '../../../service/customer/papersquare.js';
import {
wxGetImageInfo
} from '../../../utilities/wxApi.js';
import CanvasDrag from '../../../components/canvas-drag/canvas-drag';
import {
classroomdetailGet2
} from '../../../service/business/classservice.js';
var app = getApp();
Page({
data: {
......@@ -55,12 +58,13 @@ Page({
sharePage: 'src/pages/papersquare/reviewdetail', // TODO 换路径 src/pages/papersquare/classsharereview 事例src/pages/clockdetail/newindex
},
onLoad: function (options) {
const {sid,rid,type,id} = options;
const {sid,rid,type,id,role} = options;
this.setData({
rid,
sid,
type,
id: id || '',
role,
tempImgArr1: [
{
idx: 0,
......@@ -161,9 +165,20 @@ Page({
wx.showLoading({
title: '加载中'
});
classroomdetailGet({
id: this.data.rid
}).then((res)=>{
let ajax = null;
console.log(this.data.role,'role',this.data.role==1)
// role 1为b端,2为c端
if(this.data.role==1){
ajax = classroomdetailGet2({
id: this.data.rid
})
}else{
ajax = classroomdetailGet({
id: this.data.rid
})
}
ajax.then((res)=>{
const {code, data, datetime} = res;
this.data.datetime = datetime;
if(code == 200){
......@@ -531,8 +546,10 @@ Page({
changeCover(){
let that = this;
let ReviewImgLen = this.data.hasReviewImg.length;
let coverindex = this.data.coverindex
let coverindex = this.data.coverindex;
if(ReviewImgLen==1){
return
}
if(this.data.coverindex>=ReviewImgLen-1){
coverindex=0
}else{
......@@ -541,7 +558,6 @@ Page({
that.setData({
coverindex,
})
// that.setData({canvasBg:null});
CanvasDrag.clearCanvas();
that.setData({
graph: {
......
......@@ -58,7 +58,9 @@ Page({
erpStudentId: 0,
like_status: false,
likeSubmitting: false
likeSubmitting: false,
modalDeleteReview: false, //内容删除
errTip: '点评故事已被删除'
},
onLoad: function (options) {
this.innerAudioContext = wx.createInnerAudioContext(); // 当前页面唯一的一个音频容器
......@@ -77,7 +79,7 @@ Page({
sid,
id,
rid,
type
type,
})
}
app.getCurrentSchoolStudentId({
......@@ -93,7 +95,6 @@ Page({
},
onShow: function () {
},
onHide: function () {
this.innerAudioContext.pause();
......@@ -138,8 +139,14 @@ Page({
classroomdetailGet({
id: this.data.rid
}).then((res)=>{
const {code, data} = res;
if(code == 200){
const {code, data,msg} = res;
if(code == 40018){
this.setData({
modalDeleteReview: true,
errTip: '点评故事已被删除'
})
return
}else if(code == 200){
try {
let thisContent = JSON.parse(data.content);
data.content = thisContent;
......@@ -163,6 +170,12 @@ Page({
id: data.id,
school_id: data.school_id,
})
}else{
this.setData({
modalDeleteReview: true,
errTip: msg
})
return
}
}).catch((err)=>{
console.log(err)
......@@ -521,13 +534,14 @@ Page({
return
}
wx.navigateTo({
url: `/src/pages/growthrecord/index?consumerId=${dataset.like.student.id}&id=${this.data.id}&sid=${this.data.id}`
url: `/src/pages/growthrecord/index?consumerId=${dataset.like.student.id}&id=${this.data.id}&sid=${this.data.sid}`
})
},
generatelongimg(){
const {sid,id,rid,type} = this.data;
// role 1为b端,2为c端
wx.navigateTo({
url: `/src/pages/papersquare/classreviewshare?sid=${sid}&id=${id}&rid=${rid}&type=${type}`
url: `/src/pages/papersquare/classreviewshare?sid=${sid}&id=${id}&rid=${rid}&type=${type}&role=2`
})
},
backPage(){
......@@ -572,9 +586,12 @@ Page({
like_status = true;
likesList.push({
student:{
avatar: data.school_student.avatar || avatar
avatar: data.school_student.avatar || avatar,
id: data.school_student.id
},
id: data.id,
is_join_school: 1,
like_user_type: data.like_user_type
});
}
this.setData({
......@@ -601,5 +618,10 @@ Page({
needRefresh: true
})
}
},
bindIGet(){
wx.reLaunch({
url: '/ucenter/index'
})
}
})
\ No newline at end of file
......@@ -280,4 +280,15 @@
<comment-editor wx:if="{{commenteditor}}" prams="{{commentclock}}" bind:hidecommenteditor="hidecommenteditor" type="2c"></comment-editor>
</view>
<view class="modal-dialog" wx:if="{{modalDeleteReview}}">
<view class="modal-mask"></view>
<view class="modal-box">
<view class="modal-title">温馨提示</view>
<view class="modal-content">{{errTip}}</view>
<view class="modal-bottom">
<view class="modal-btn" bindtap="bindIGet">我知道了</view>
</view>
</view>
</view>
......@@ -485,4 +485,95 @@
.scoreshow {
color: #828E9C;
font-size: 26rpx;
}
.modal-dialog{
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 99;
}
.modal-dialog .modal-mask{
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(0,0,0,.5);
z-index: 99;
}
.modal-dialog .modal-box{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
width: 600rpx;
height: 357rpx;
background:rgba(255,255,255,1);
border-radius: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
line-height: 1;
z-index: 100;
}
.modal-dialog .modal-box .modal-title{
font-size: 32rpx;
color: #000;
font-weight: bold;
text-align: center;
padding-top: 56rpx;
}
.modal-dialog .modal-box .modal-content{
padding: 0 24rpx;
display: flex;
align-items: center;
justify-content: center;
color: #4F4F4F;
font-size: 30rpx;
}
.modal-dialog .modal-box .modal-bottom{
width: 100%;
height: 96rpx;
display: flex;
position: relative;
}
.modal-dialog .modal-box .modal-bottom::before{
content: '';
width: 100%;
height: 1px;
background:rgba(0,0,0,.05);
position: absolute;
left: 0;
top: 0;
transform: scaleY(.5);
}
.modal-dialog .modal-box .modal-bottom .modal-btn{
flex: 1;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
font-size: 30rpx;
font-weight: bold;
color: #434343;
}
.modal-dialog .modal-box .modal-bottom .modal-btn.btn-red{
color: #FF5A5A;
}
.modal-dialog .modal-box .modal-bottom .modal-btn::after{
content: '';
width: 1px;
height:100%;
background:rgba(0,0,0,.05);
position: absolute;
right: 0;
top: 0;
transform: scaleX(.5);
}
.modal-dialog .modal-box .modal-bottom .modal-btn:last-of-type::after{
display: none;
}
\ No newline at end of file
......@@ -66,6 +66,7 @@ import {
import {
studentidentity
} from '../../../service/customer/signup.js'
import activityconfig from '../../../constants/activityconfig.js';
var app = getApp();
Page({
data: {
......@@ -185,7 +186,7 @@ Page({
countdownShow: true,
needREfresh: false,
bigindex: undefined,
studentId:''
studentId:'',
},
onLoad: function (options, b) { // Do some initialize when page load.
const visitor = LocalStorage.getItem('visitor');
......@@ -1541,192 +1542,334 @@ Page({
if(myrate<80){
myrate = Math.floor(Math.random() * 10 + 80);
}
this.setData({
painting: {
width: 750,
height: 1334,
views: [
{ // 头像
type: 'image',
url: userInfo?imagify(userInfo.avatar, 'image/resize,w_160/format,jpg'):imagify(visitor.userInfo.avatarUrl, 'image/resize,w_160/format,jpg'),
top: 766,
left: 70,
width: 80,
height: 80
},
{ // 背景
type: 'image',
url: posterMateria.dailyPosterBg.bg,
top: 0,
left: 0,
width: 750,
height: 1334
},
{ // 二维码
type: 'image',
url: qrcode,
top: 1133,
left: 530,
width: 144,
height: 144
},
{ // 日期
type: 'text',
content: date.day,
fontSize: 100,
color: '#fff',
textAlign: 'left',
top: 78,
left: 40,
lineHeight: 1,
bolder: true
},
{ // 月份英文
type: 'text',
content: date.month.shortName + ' '+ date.year,
fontSize: 30,
color: '#fff',
textAlign: 'left',
top: 198,
left: 41,
lineHeight: 1,
bolder: true
},
// { // 月份中文
// type: 'text',
// content: date.month.chineseShortName,
// fontSize: 28,
// color: '#fff',
// textAlign: 'center',
// top: 94,
// left: 400,
// // bolder: true
// },
// { // 月份中文 单位
// type: 'text',
// content: '月',
// fontSize: 28,
// color: '#fff',
// textAlign: 'center',
// top: 130,
// left: 400,
// // bolder: true
// },
{ // 文案
type: 'text',
content: posterMateria.dailyWord.linea,
fontSize: 36,
lineHeight: 55,
color: '#fff',
textAlign: 'left',
width: 649,
top: 286,
left: 41,
MaxLineNumber: 2,
breakWord: true,
},
{ // 文案下划线
type: 'rect',
background: '#fff',
width: 60,
height: 5,
top: 415,
left: 41,
},
{ // 作者
type: 'text',
content: posterMateria.dailyWord.author,
fontSize: 26,
color: '#fff',
textAlign: 'left',
top: 444,
left: 41,
},
{ // 昵称
type: 'text',
content: userInfo?userInfo.nickname:visitor.userInfo.nickName,
fontSize: 30,
color: '#2C2C2C',
textAlign: 'left',
top: 767,
left: 175,
bolder: true
},
{ // 打卡详情
type: 'text',
content: `在〔${circleInfo.title && circleInfo.title.length > 15 ? circleInfo.title.substr(0,15) + '...' : circleInfo.title || ''}〕完成打卡`,
fontSize: 24,
color: '#4F4F4F',
textAlign: 'left',
top: 819,
left: 176,
bolder: false
},
{ // %
type: 'text',
content: '%',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 565,
bolder: false
},
{ // 天
type: 'text',
content: '天',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 240,
bolder: false
},
{ // 百分比
type: 'text',
content: `${myrate}`,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 510,
bolder: true
},
{ // 打卡次数
type: 'text',
content: my_rank.clock_days,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 200,
bolder: true
},
{ // 校区名
type: 'text',
content: `来「${schoolInfo.title && schoolInfo.title.length > 15 ? schoolInfo.title.substr(0,15) + '...' : schoolInfo.title || ''}」`,
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1139,
left: 86,
bolder: true
},
{ // 校区名
type: 'text',
content: '和TA一起学习',
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1175,
left: 86,
bolder: true
},
]
}
})
if(activityconfig.dailysignSchool.find(item=>item.sid==this.data.sid)){
let activitySchoolInfo = activityconfig.dailysignSchool.filter(item=>item.sid==this.data.sid)[0];
this.setData({
painting: {
width: 750,
height: 1334,
views: [
{ // 头像
type: 'image',
url: userInfo?imagify(userInfo.avatar, 'image/resize,w_160/format,jpg'):imagify(visitor.userInfo.avatarUrl, 'image/resize,w_160/format,jpg'),
top: 766,
left: 70,
width: 80,
height: 80
},
{ // 背景
type: 'image',
url: activitySchoolInfo.posterbg,
top: 0,
left: 0,
width: 750,
height: 1334
},
{ // 二维码
type: 'image',
url: qrcode,
top: 1133,
left: 528,
width: 145,
height: 145
},
{ // 日期
type: 'text',
content: date.day,
fontSize: 100,
color: '#fff',
textAlign: 'left',
top: 120,
left: 40,
lineHeight: 1,
bolder: true
},
{ // 月份英文
type: 'text',
content: date.month.shortName + ' '+ date.year,
fontSize: 30,
color: '#fff',
textAlign: 'left',
top: 240,
left: 41,
lineHeight: 1,
bolder: true
},
{ // 昵称
type: 'text',
content: userInfo?userInfo.nickname:visitor.userInfo.nickName,
fontSize: 30,
color: '#2C2C2C',
textAlign: 'left',
top: 767,
left: 175,
bolder: true
},
{ // 打卡详情
type: 'text',
content: `在〔${circleInfo.title && circleInfo.title.length > 15 ? circleInfo.title.substr(0,15) + '...' : circleInfo.title || ''}〕完成打卡`,
fontSize: 24,
color: '#4F4F4F',
textAlign: 'left',
top: 819,
left: 176,
bolder: false
},
{ // %
type: 'text',
content: '%',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 565,
bolder: false
},
{ // 天
type: 'text',
content: '天',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 240,
bolder: false
},
{ // 百分比
type: 'text',
content: `${myrate}`,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 510,
bolder: true
},
{ // 打卡次数
type: 'text',
content: my_rank.clock_days,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 200,
bolder: true
},
{ // 校区名
type: 'text',
content: `来「${schoolInfo.title && schoolInfo.title.length > 15 ? schoolInfo.title.substr(0,15) + '...' : schoolInfo.title || ''}」`,
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1139,
left: 86,
bolder: true
},
{ // 校区名
type: 'text',
content: '和TA一起学习',
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1175,
left: 86,
bolder: true
},
]
}
})
}else{
console.log('没有')
this.setData({
painting: {
width: 750,
height: 1334,
views: [
{ // 头像
type: 'image',
url: userInfo?imagify(userInfo.avatar, 'image/resize,w_160/format,jpg'):imagify(visitor.userInfo.avatarUrl, 'image/resize,w_160/format,jpg'),
top: 766,
left: 70,
width: 80,
height: 80
},
{ // 背景
type: 'image',
url: posterMateria.dailyPosterBg.bg,
top: 0,
left: 0,
width: 750,
height: 1334
},
{ // 二维码
type: 'image',
url: qrcode,
top: 1133,
left: 530,
width: 144,
height: 144
},
{ // 日期
type: 'text',
content: date.day,
fontSize: 100,
color: '#fff',
textAlign: 'left',
top: 78,
left: 40,
lineHeight: 1,
bolder: true
},
{ // 月份英文
type: 'text',
content: date.month.shortName + ' '+ date.year,
fontSize: 30,
color: '#fff',
textAlign: 'left',
top: 198,
left: 41,
lineHeight: 1,
bolder: true
},
// { // 月份中文
// type: 'text',
// content: date.month.chineseShortName,
// fontSize: 28,
// color: '#fff',
// textAlign: 'center',
// top: 94,
// left: 400,
// // bolder: true
// },
// { // 月份中文 单位
// type: 'text',
// content: '月',
// fontSize: 28,
// color: '#fff',
// textAlign: 'center',
// top: 130,
// left: 400,
// // bolder: true
// },
{ // 文案
type: 'text',
content: posterMateria.dailyWord.linea,
fontSize: 36,
lineHeight: 55,
color: '#fff',
textAlign: 'left',
width: 649,
top: 286,
left: 41,
MaxLineNumber: 2,
breakWord: true,
},
{ // 文案下划线
type: 'rect',
background: '#fff',
width: 60,
height: 5,
top: 415,
left: 41,
},
{ // 作者
type: 'text',
content: posterMateria.dailyWord.author,
fontSize: 26,
color: '#fff',
textAlign: 'left',
top: 444,
left: 41,
},
{ // 昵称
type: 'text',
content: userInfo?userInfo.nickname:visitor.userInfo.nickName,
fontSize: 30,
color: '#2C2C2C',
textAlign: 'left',
top: 767,
left: 175,
bolder: true
},
{ // 打卡详情
type: 'text',
content: `在〔${circleInfo.title && circleInfo.title.length > 15 ? circleInfo.title.substr(0,15) + '...' : circleInfo.title || ''}〕完成打卡`,
fontSize: 24,
color: '#4F4F4F',
textAlign: 'left',
top: 819,
left: 176,
bolder: false
},
{ // %
type: 'text',
content: '%',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 565,
bolder: false
},
{ // 天
type: 'text',
content: '天',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 240,
bolder: false
},
{ // 百分比
type: 'text',
content: `${myrate}`,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 510,
bolder: true
},
{ // 打卡次数
type: 'text',
content: my_rank.clock_days,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 200,
bolder: true
},
{ // 校区名
type: 'text',
content: `来「${schoolInfo.title && schoolInfo.title.length > 15 ? schoolInfo.title.substr(0,15) + '...' : schoolInfo.title || ''}」`,
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1139,
left: 86,
bolder: true
},
{ // 校区名
type: 'text',
content: '和TA一起学习',
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1175,
left: 86,
bolder: true
},
]
}
})
}
})
},
eventGetImage(e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment