Commit f82f4050 authored by lvtz's avatar lvtz

delete img

parent 127d5de1
......@@ -229,7 +229,7 @@
<view class="tip-box">
<view class="btn" bindtap="showSelectStudent">
<view class="icon">
<image class="" src="{{localImageRoot}}2b/common/classComment.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
<image class="" src="{{imageRoot}}2b/common/classComment.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
</view>
<view class="text">
课堂点评
......@@ -237,7 +237,7 @@
</view>
<view class="btn" bindtap="remindStudent">
<view class="icon">
<image class="" src="{{localImageRoot}}2b/common/remindme.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
<image class="" src="{{imageRoot}}2b/common/remindme.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
</view>
<view class="text">
提醒未读同学
......@@ -250,7 +250,7 @@
<block wx:for="{{listItem.arr}}" wx:key="index">
<view class="class-comment" wx:if="{{item.review_type == 1}}">
<view class="title">
<image class="count-icon" src="{{localImageRoot}}2b/common/countIcon.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
<image class="count-icon" src="{{imageRoot}}2b/common/countIcon.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
课堂小评已读统计
</view>
<view class="count-item" style="padding-bottom: 32rpx;">
......@@ -291,7 +291,7 @@
<scroll-view class="student-list" scroll-y="true" bindscrolltolower="studentScrolltolower">
<view class="student-item" bindtap="goReviewClass">
<view class="avatar-box">
<image class="" src="{{localImageRoot}}2b/common/class-student.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
<image class="" src="{{imageRoot}}2b/common/class-student.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
</view>
<view class="name">全班{{selectStudentList.length}}人</view>
<view class="count">月评50次</view>
......
{
"navigationBarTitleText": "分享卡片",
"usingComponents": {
"canvasdrawer": "/components/canvasdrawer/canvasdrawer"
"canvasdrawer": "/components/canvasdrawer/canvasdrawer",
"canvas-drag": "/components/canvas-drag/index"
}
}
\ No newline at end of file
<wxs src="./../../../filter/index.wxs" module="filter" />
<view class="container">
<view class="swiperwrap">
<view class="swiperbox">
<swiper
style="height: 826rpx"
current="{{swiperCurrent}}"
bindchange="swiperChange"
>
<swiper-item data-posterindex="1" bindtap="generatePoster">
<view class="card carda">
<image class="cardbg" src="{{localImageRoot}}2b/classreviewshare/carda_l.png?{{imageVersion}}"></image>
<view class="cardcontent">
<image class="avatar" src="{{localImageRoot}}2b/classreviewshare/carda.png?{{imageVersion}}"></image>
<!-- <image class="avatar" src="{{filter.imagify(userInfo.avatar, 'image/resize,w_320/format,jpg/quality,q_50')}}"></image> -->
<view class="nickname">{{userInfo.nickname}}</view>
<view class="imgbox">
<image class="icon-angle icon-angle-lt" src="{{localImageRoot}}2b/classreviewshare/icon_angle_lr.png?{{imageVersion}}"></image>
<image class="icon-angle icon-angle-rt" src="{{localImageRoot}}2b/classreviewshare/icon_angle_rl.png?{{imageVersion}}"></image>
<image class="icon-angle icon-angle-rb" src="{{localImageRoot}}2b/classreviewshare/icon_angle_lr.png?{{imageVersion}}"></image>
<image class="icon-angle icon-angle-lb" src="{{localImageRoot}}2b/classreviewshare/icon_angle_rl.png?{{imageVersion}}"></image>
</view>
<view class="reviewtext">{{themeDetail.title}}{{themeDetail.title}}{{themeDetail.title}}{{themeDetail.title}}
{{themeDetail.title}}{{themeDetail.title}}{{themeDetail.title}}{{themeDetail.title}}{{themeDetail.title}}</view>
<image class="icon-audio" src="{{localImageRoot}}2b/classreviewshare/icon_audio.png?{{imageVersion}}"></image>
</view>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
</view>
</swiper-item>
<swiper-item data-posterindex="2" bindtap="generatePoster">
<view class="card cardb">
<image class="cardbg" src="{{localImageRoot}}2b/classreviewshare/carda_l.png?{{imageVersion}}"></image>
<view class="cardcontent">
<image class="avatar" src="{{filter.imagify(userInfo.avatar, 'image/resize,w_320/format,jpg/quality,q_50')}}"></image>
<view class="nickname">{{userInfo.nickname}}</view>
<view class="themetitle">
<view class="themetitlebox">{{themeDetail.title}}</view>
</view>
</view>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
</view>
</swiper-item>
</swiper>
<view class="card carda" data-posterindex="1" bindtap="generatePoster" >
<image class="cardbg" src="{{currentImgUrl}}" wx:if="{{hasReviewImg.length>0}}"></image>
<image class="cardbg" src="{{imageRoot}}2b/classreviewshare/carda_s.png?{{imageVersion}}" wx:else></image>
<view class="cardcontent">
<image class="avatar" src="{{filter.imagify(userInfo.avatar, 'image/resize,w_320/format,jpg/quality,q_50')}}"></image>
<view class="nickname">{{userInfo.nickname}}</view>
<view class="imgbox" wx:if="{{hasReviewImg.length>0}}">
<canvas-drag id="canvas-drag" graph="{{graph}}" width="520" height="440" enableUndo="{{true}}"></canvas-drag>
<image class="icon-angle icon-angle-lt" src="{{imageRoot}}2b/classreviewshare/icon_angle_lr.png?{{imageVersion}}"></image>
<image class="icon-angle icon-angle-rt" src="{{imageRoot}}2b/classreviewshare/icon_angle_rl.png?{{imageVersion}}"></image>
<image class="icon-angle icon-angle-rb" src="{{imageRoot}}2b/classreviewshare/icon_angle_lr.png?{{imageVersion}}"></image>
<image class="icon-angle icon-angle-lb" src="{{imageRoot}}2b/classreviewshare/icon_angle_rl.png?{{imageVersion}}"></image>
<!-- <image class="review-img" src="{{filter.imagify(hasReviewImg[0].src, 'image/resize,w_320/format,jpg/quality,q_50')}}" mode="aspectFill"></image> -->
</view>
<view class="reviewtext">{{reviewDetailContent.content}}</view>
<image class="icon-audio" src="{{imageRoot}}2b/classreviewshare/icon_audio.png?{{imageVersion}}" wx:if="{{hasReviewAudio.length>0}}"></image>
</view>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
</view>
</view>
<view class="scroll-box">
<view class="tab-box">
<view class="tab-item active">主题</view>
<view class="tab-item">长图</view>
<view class="tab-item {{item.type == bigType? 'active': ''}}" bindtap="changeBigTab" data-bigtype="{{item.type}}" wx:for="{{bigTab}}" wx:key="">{{item.title}}</view>
</view>
<scroll-view
scroll-y="{{false}}"
scroll-x="{{true}}"
style="width: auto;overflow:hidden;"
style="width: auto;overflow:hidden; padding: 31rpx 0 26rpx;"
scroll-left = "{{scrollLeft}}"
style="padding: 31rpx 0 26rpx;"
wx:if="{{bigType==1}}"
>
<view class="cardbox {{currentIndex == 1 ? 'selected' : ''}}" data-cardindex="1" bindtap="selectCard">
<view class="card carda">
<image class="cardbg" src="{{localImageRoot}}2b/classreviewshare/carda.png?{{imageVersion}}"></image>
<view class="cardbox {{bigType==1 && currentIndex == index ? 'selected' : ''}}" data-item="{{item}}" bindtap="selectCard" wx:for="{{tempImgArr1}}" wx:key="">
<view class="card">
<image class="cardbg" src="{{item.icon_src}}"></image>
</view>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
</view>
<view class="cardbox {{currentIndex == 2 ? 'selected' : ''}}" data-cardindex="2" bindtap="selectCard">
<view class="card cardb">
<image class="cardbg" src="{{localImageRoot}}2b/classreviewshare/carda.png?{{imageVersion}}"></image>
</scroll-view>
<scroll-view
scroll-y="{{false}}"
scroll-x="{{true}}"
style="width: auto;overflow:hidden; padding: 31rpx 0 26rpx;"
scroll-left = "{{scrollLeft}}"
wx:if="{{bigType==2}}"
>
<view class="cardbox {{bigType==2 && currentIndex == index ? 'selected' : ''}}" data-item="{{item}}" bindtap="selectCard" wx:for="{{tempImgArr2}}" wx:key="">
<view class="card">
<image class="cardbg" src="{{item.icon_src}}"></image>
</view>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
</view>
</scroll-view>
<view class="button-boxfix">生成卡片</view>
</view>
<canvasdrawer painting="{{painting}}" bind:getImage="eventGetImage"/>
......
page{
height: 100%;
}
#canvas-drag{
position: absolute;
left: 5px;
top: 5px;
width: 260px;
height: 220px
}
.container{
height: 100%;
display: flex;
......@@ -12,6 +19,7 @@ page{
flex-direction: column;
justify-content: center;
overflow-y: auto;
align-items: center;
}
.card {
position: relative;
......@@ -63,6 +71,7 @@ page{
position: relative;
margin: 11rpx auto 0;
padding: 10rpx;
overflow: hidden;
}
.carda .cardcontent .imgbox .icon-angle{
width: 44rpx;
......@@ -87,6 +96,10 @@ page{
bottom: 12rpx;
left: 12rpx;
}
.carda .cardcontent .imgbox .review-img{
width: 100%;
max-height: 440rpx;
}
.carda .reviewtext {
font-size: 20rpx;
line-height: 28rpx;
......@@ -156,13 +169,13 @@ page{
margin-right: 32rpx;
}
.scroll-box .card{
width: 110rpx;
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
}
.scroll-box .cardbox.selected .card{
width: 130rpx;
height: 130rpx;
padding: 4rpx;
box-sizing: content-box;
}
.swiperbox .card{
margin: 0 auto;
......
......@@ -17,7 +17,7 @@
<view class="img-status fail" wx:if="{{item.status == 'fail'}}">上传失败</view>
</view>
<view class="pic-item pic-add" bindtap="addWorks">
<image class="icon-add" src="{{localImageRoot}}common/icon_addpic.png?{{imageVersion}}"></image>
<image class="icon-add" src="{{imageRoot}}common/icon_addpic.png?{{imageVersion}}"></image>
<view class="text-add">添加作品</view>
</view>
</view>
......@@ -30,27 +30,27 @@
<view class="starbox starbox2">
<view class="choosescore choosescoreleft" data-index="5" data-score="0.5" bindtap="chooseAverageScore"></view>
<view class="choosescore choosescoreright" data-index="5" data-score="1" bindtap="chooseAverageScore"></view>
<image class="staritem" src="{{localImageRoot}}common/{{filter.flowerCalculate(averageScore, 1)}}?{{imageVersion}}"></image>
<image class="staritem" src="{{imageRoot}}common/{{filter.flowerCalculate(averageScore, 1)}}?{{imageVersion}}"></image>
</view>
<view class="starbox starbox2">
<view class="choosescore choosescoreleft" data-index="5" data-score="1.5" bindtap="chooseAverageScore"></view>
<view class="choosescore choosescoreright" data-index="5" data-score="2" bindtap="chooseAverageScore"></view>
<image class="staritem" data-score="1" src="{{localImageRoot}}common/{{filter.flowerCalculate(averageScore, 2)}}"></image>
<image class="staritem" data-score="1" src="{{imageRoot}}common/{{filter.flowerCalculate(averageScore, 2)}}"></image>
</view>
<view class="starbox starbox2">
<view class="choosescore choosescoreleft" data-index="5" data-score="2.5" bindtap="chooseAverageScore"></view>
<view class="choosescore choosescoreright" data-index="5" data-score="3" bindtap="chooseAverageScore"></view>
<image class="staritem" data-score="1" src="{{localImageRoot}}common/{{filter.flowerCalculate(averageScore, 3)}}"></image>
<image class="staritem" data-score="1" src="{{imageRoot}}common/{{filter.flowerCalculate(averageScore, 3)}}"></image>
</view>
<view class="starbox starbox2">
<view class="choosescore choosescoreleft" data-index="5" data-score="3.5" bindtap="chooseAverageScore"></view>
<view class="choosescore choosescoreright" data-index="5" data-score="4" bindtap="chooseAverageScore"></view>
<image class="staritem" data-score="1" src="{{localImageRoot}}common/{{filter.flowerCalculate(averageScore, 4)}}"></image>
<image class="staritem" data-score="1" src="{{imageRoot}}common/{{filter.flowerCalculate(averageScore, 4)}}"></image>
</view>
<view class="starbox starbox2">
<view class="choosescore choosescoreleft" data-index="5" data-score="4.5" bindtap="chooseAverageScore"></view>
<view class="choosescore choosescoreright" data-index="5" data-score="5" bindtap="chooseAverageScore"></view>
<image class="staritem" data-score="1" src="{{localImageRoot}}common/{{filter.flowerCalculate(averageScore, 5)}}"></image>
<image class="staritem" data-score="1" src="{{imageRoot}}common/{{filter.flowerCalculate(averageScore, 5)}}"></image>
</view>
</view>
<view class="scoreshow">{{averageScore * 2}}分</view>
......@@ -148,7 +148,7 @@
<button form-type="submit" class="createidbutton"></button>
</form>
<view class="media-type-icon">
<image class="media-type-icon-img" src="{{localImageRoot}}2b/common/audio_add.png?{{imageVersion}}" ></image>
<image class="media-type-icon-img" src="{{imageRoot}}2b/common/audio_add.png?{{imageVersion}}" ></image>
</view>
<view class="media-type-name">录音</view>
</view>
......@@ -157,7 +157,7 @@
<button form-type="submit" class="createidbutton"></button>
</form>
<view class="media-type-icon">
<image class="media-type-icon-img" src="{{localImageRoot}}2b/common/pic_add.png?{{imageVersion}}" ></image>
<image class="media-type-icon-img" src="{{imageRoot}}2b/common/pic_add.png?{{imageVersion}}" ></image>
</view>
<view class="media-type-name">图片</view>
</view>
......@@ -167,7 +167,7 @@
<button form-type="submit" class="createidbutton"></button>
</form>
<view class="media-type-icon">
<image class="media-type-icon-img" src="{{localImageRoot}}2b/common/video_add.png?{{imageVersion}}" ></image>
<image class="media-type-icon-img" src="{{imageRoot}}2b/common/video_add.png?{{imageVersion}}" ></image>
</view>
<view class="media-type-name">视频</view>
</view>
......@@ -176,7 +176,7 @@
<button form-type="submit" class="createidbutton"></button>
</form>
<view class="media-type-icon">
<image class="media-type-icon-img" src="{{localImageRoot}}2b/common/wxfile_add.png?{{imageVersion}}" ></image>
<image class="media-type-icon-img" src="{{imageRoot}}2b/common/wxfile_add.png?{{imageVersion}}" ></image>
</view>
<view class="media-type-name">微信文件</view>
</view>
......
......@@ -36,7 +36,7 @@
<view class="img-status fail" wx:if="{{item.status == 'fail'}}">上传失败</view>
</view>
<view class="link-student">
<view class="student-list" bindtap="goSelectstudentlist" data-item="{{item}}" data-index="{{index}}">@{{item.students.length>0 ? (item.students.length>2 ? item.students[0].name+ '等' +item.students.length+'名学员': item.students[0].name ) : '关联学员'}} <image class="" src="{{localImageRoot}}2b/common/close_icon.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" data-flag="{{1}}" data-item="{{item}}" data-index="{{index}}" bindtap="closeLinkStudent" /></view>
<view class="student-list" bindtap="goSelectstudentlist" data-item="{{item}}" data-index="{{index}}">@{{item.students.length>0 ? (item.students.length>2 ? item.students[0].name+ '等' +item.students.length+'名学员': item.students[0].name ) : '关联学员'}} <image class="" src="{{imageRoot}}2b/common/close_icon.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" data-flag="{{1}}" data-item="{{item}}" data-index="{{index}}" bindtap="closeLinkStudent" /></view>
<textarea name="" id="" class="link-text" cols="30" rows="4" value="{{item.text}}" placeholder="说点什么吧..." bindinput="getLinkText"></textarea>
</view>
......@@ -60,25 +60,25 @@
<view class="operate-box">
<view class="operate-btn" bindtap="addVoice" wx:if="{{!audioInfo.src}}">
<view class="icon">
<image class="" src="{{localImageRoot}}2b/common/audio_add.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
<image class="" src="{{imageRoot}}2b/common/audio_add.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
</view>
<view class="text">录音</view>
</view>
<view class="operate-btn" bindtap="addImg" wx:if="{{imageBox.length < maxImgCount}}">
<view class="icon">
<image class="" src="{{localImageRoot}}2b/common/pic_add.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
<image class="" src="{{imageRoot}}2b/common/pic_add.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
</view>
<view class="text">图片</view>
</view>
<view class="operate-btn" bindtap="addVideo" wx:if="{{imageBox.length < maxImgCount}}">
<view class="icon">
<image class="" src="{{localImageRoot}}2b/common/video_add.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
<image class="" src="{{imageRoot}}2b/common/video_add.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
</view>
<view class="text">视频</view>
</view>
<view class="operate-btn">
<view class="icon">
<image class="" src="{{localImageRoot}}2b/common/wxfile_add.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
<image class="" src="{{imageRoot}}2b/common/wxfile_add.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
</view>
<view class="text">微信文件</view>
</view>
......
......@@ -11,7 +11,7 @@
<view class="count-box">
<view class="title-box">
<view class="title">
<image class="icon" src="{{localImageRoot}}2b/common/countIcon.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />课堂小评已读统计
<image class="icon" src="{{imageRoot}}2b/common/countIcon.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />课堂小评已读统计
</view>
<view class="detail-btn">
查看详情
......
......@@ -3,7 +3,7 @@
<view class="header-box">
<image class="box-bg" src="{{imageRoot}}2b/optimize/student_top_bg.png?{{imageVersion}}"></image>
<view class="avatar-box">
<image class="avatar" src="{{localImageRoot}}2b/common/class-student.png?{{imageVersion}}" wx:if="{{cid}}"></image>
<image class="avatar" src="{{imageRoot}}2b/common/class-student.png?{{imageVersion}}" wx:if="{{cid}}"></image>
<image class="avatar" src="{{filter.imagify(singleStudentInfo.avatar, 'image/resize,w_160/format,jpg')}}" wx:elif="{{singleStudentInfo.avatar}}"></image>
<image class="avatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
</view>
......
......@@ -24,16 +24,16 @@
</view>
<view class="operate-box">
<view class="operate-item operate-class">
<image class="operate-icon" src="{{localImageRoot}}2b/common/class-student.png?{{imageVersion}}"></image>
<image class="operate-icon" src="{{imageRoot}}2b/common/class-student.png?{{imageVersion}}"></image>
<view class="operate-title">全班{{schedulesDetail.class_student_count_calls}}人</view>
</view>
<view class="operate-right">
<view class="operate-item operate-comment" bindtap="commentStudent" data-type="all">
<image class="operate-icon" src="{{localImageRoot}}2b/common/classComment.png?{{imageVersion}}"></image>
<image class="operate-icon" src="{{imageRoot}}2b/common/classComment.png?{{imageVersion}}"></image>
<view class="operate-title">课堂小评</view>
</view>
<view class="operate-item operate-reward" bindtap="rewardStudent" data-type="all">
<image class="operate-icon" src="{{localImageRoot}}2b/common/rewardpoints.png?{{imageVersion}}"></image>
<image class="operate-icon" src="{{imageRoot}}2b/common/rewardpoints.png?{{imageVersion}}"></image>
<view class="operate-title">奖励全班</view>
</view>
</view>
......
......@@ -10,7 +10,7 @@
<view class="tempRemark-box" wx:if="{{bigTabType==1}}">
<view class="temp-singlebox {{tempListExpend==bigindex? 'active': ''}}" wx:for="{{tempRemarkList}}" wx:key="bigindex" wx:for-index="bigindex">
<view class="temp-titlebox" bindtap="expandTempItem" data-bigindex="{{bigindex}}">
<image class="icon-face" src="{{localImageRoot}}2b/common/icon_face{{bigindex+1}}.png?{{imageVersion}}"></image>
<image class="icon-face" src="{{imageRoot}}2b/common/icon_face{{bigindex+1}}.png?{{imageVersion}}"></image>
<view class="title">{{item.label}}</view>
<image class="icon-arr {{tempListExpend==bigindex? 'active': ''}}" src="{{imageRoot}}2b/common/right.png?{{imageVersion}}"></image>
</view>
......@@ -22,13 +22,13 @@
<view class="memoryRemark-box" wx:if="{{bigTabType==2}}">
<view class="memoryRemark-tip">
<image class="icon-tip" src="{{localImageRoot}}2b/common/icon_warn.png?{{imageVersion}}"></image>
<image class="icon-tip" src="{{imageRoot}}2b/common/icon_warn.png?{{imageVersion}}"></image>
<view class="title">最近常用自动收藏您最近10次的点评文本,锁住即代表该语录不会被您新的点评文本替换</view>
</view>
<view class="memoryRemark-list" wx:if="{{memoryRemarkList.length>0}}">
<view class="memoryRemark-item" wx:for="{{memoryRemarkList}}" wx:key="">
<image class="icon-lock" src="{{localImageRoot}}2b/common/review_locked.png?{{imageVersion}}" wx:if="{{item.is_lock==2}}" data-id="{{item.id}}" data-togglelock='1' bindtap="memoryRemarkLock"></image>
<image class="icon-lock" src="{{localImageRoot}}2b/common/review_lock.png?{{imageVersion}}" wx:else data-id="{{item.id}}" data-togglelock='2' bindtap="memoryRemarkLock"></image>
<image class="icon-lock" src="{{imageRoot}}2b/common/review_locked.png?{{imageVersion}}" wx:if="{{item.is_lock==2}}" data-id="{{item.id}}" data-togglelock='1' bindtap="memoryRemarkLock"></image>
<image class="icon-lock" src="{{imageRoot}}2b/common/review_lock.png?{{imageVersion}}" wx:else data-id="{{item.id}}" data-togglelock='2' bindtap="memoryRemarkLock"></image>
<view class="memory-item" bindtap="pushContent" data-pushcontent="{{item.word}}">{{item.word}}</view>
</view>
</view>
......
const defaultOptions = {
selector: '#canvas-drag'
};
function CanvasDrag(options = {}) {
options = {
...defaultOptions,
...options,
};
const pages = getCurrentPages();
const ctx = pages[pages.length - 1];
const canvasDrag = ctx.selectComponent(options.selector);
delete options.selector;
return canvasDrag;
}
CanvasDrag.export = () => {
const canvasDrag = CanvasDrag();
if (!canvasDrag) {
console.error('请设置组件的id="canvas-drag"!!!');
} else {
return CanvasDrag().export();
}
};
CanvasDrag.initByArr = (arr) => {
const canvasDrag = CanvasDrag();
if (!canvasDrag) {
console.error('请设置组件的id="canvas-drag"!!!');
} else {
return CanvasDrag().initByArr(arr);
}
};
CanvasDrag.exportJson = () => {
const canvasDrag = CanvasDrag();
if (!canvasDrag) {
console.error('请设置组件的id="canvas-drag"!!!');
} else {
return CanvasDrag().exportJson();
}
};
CanvasDrag.changFontColor = (color) => {
const canvasDrag = CanvasDrag();
if (!canvasDrag) {
console.error('请设置组件的id="canvas-drag"!!!');
} else {
return CanvasDrag().changColor(color);
}
};
CanvasDrag.changeBgColor = (color) => {
const canvasDrag = CanvasDrag();
if (!canvasDrag) {
console.error('请设置组件的id="canvas-drag"!!!');
} else {
return CanvasDrag().changeBgColor(color);
}
};
CanvasDrag.changeBgImage = (bgImage) => {
const canvasDrag = CanvasDrag();
if (!canvasDrag) {
console.error('请设置组件的id="canvas-drag"!!!');
} else {
return CanvasDrag().changeBgImage(bgImage);
}
};
CanvasDrag.clearCanvas = () => {
const canvasDrag = CanvasDrag();
if (!canvasDrag) {
console.error('请设置组件的id="canvas-drag"!!!');
} else {
return CanvasDrag().clearCanvas();
}
};
CanvasDrag.undo = () => {
const canvasDrag = CanvasDrag();
if (!canvasDrag) {
console.error('请设置组件的id="canvas-drag"!!!');
} else {
return CanvasDrag().undo();
}
};
export default CanvasDrag;
\ No newline at end of file
This diff is collapsed.
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--components/canvas-drag/index.wxml-->
<canvas canvas-id='canvas-label'
disable-scroll="true"
bindtouchstart="start"
bindtouchmove="move"
bindtouchend="end"
style='width: {{width}}rpx; height: {{height}}rpx;'></canvas>
\ No newline at end of file
/* components/canvas-drag/index.wxss */
.movable-label {
margin-top: 300rpx;
width: 750rpx;
height: 400rpx;
background: #eee;
}
.movable-block {
width: 120rpx;
height: 120rpx;
background: #ccc;
}
.movable-block .image-con {
width: 100%;
height: 100%;
}
\ No newline at end of file
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