Commit f7129a2d authored by lvtz's avatar lvtz

fix

parent 32998eb0
......@@ -78,7 +78,7 @@ Page({
],
})
this.reviewDetailGet();
this.initPost(`s=${sid}&c=${id}&r=${rid}&t=${type}`, 'src/pages/papersquare/classreviewshare')
this.initPost(`s=${sid}&c=${id}&r=${rid}&t=${type}`, 'src/pages/clockdetail/newindex')
},
onShow: function () {
},
......@@ -167,7 +167,6 @@ Page({
hasReviewImg : JSON.parse(data.content).img.filter(item=>item.type=='image'),
})
let that = this;
console.log('音频',this.data.hasReviewAudio)
if(this.data.hasReviewImg.length>0){
this.setData({
graph: {
......@@ -210,7 +209,7 @@ Page({
const {data, code} = res;
if(code == 200 && data){
this.setData({
userInfo: data.student,
userInfo: data.student.formal_school_student,
})
this.generateCustomerQrcode()
}
......@@ -219,19 +218,23 @@ Page({
})
},
saveAndGenerate(){
let ReviewImgLen = this.data.hasReviewImg.length;
if(ReviewImgLen>0){
CanvasDrag.export().then((filePath) => {
console.log(filePath);
this.data.graphAfter = filePath;
this.generatePoster()
}).catch((e) => {
if(this.data.selectCardLong){
wx.previewImage({
urls:[imagify(this.data.imgSrc)]
})
}else{
this.generatePoster()
let ReviewImgLen = this.data.hasReviewImg.length;
if(ReviewImgLen>0){
CanvasDrag.export().then((filePath) => {
this.data.graphAfter = filePath;
this.generatePoster()
}).catch((e) => {
})
}else{
this.generatePoster()
}
}
},
generateCustomerQrcode () {
let scene = `s=${this.data.sid}&c=${this.data.id}&r=${this.data.rid}&t=${this.data.type}`;
......@@ -271,7 +274,7 @@ Page({
views: [
{
type: 'image',
url: this.data.type==1?`${this.data.imageRoot}2b/common/class-student.png?${this.data.imageVersion}`: (this.data.userInfo.avatar? imagify(this.data.userInfo.avatar, 'image/resize,w_320/format,jpg/quality,q_50'):`${this.data.imageRoot}}common/empty/avatar_user.png?${this.data.imageVersion}`) ,
url: this.data.type==1?`${this.data.imageRoot}2b/common/class-student.png?${this.data.imageVersion}`: (this.data.userInfo.avatar? imagify(this.data.userInfo.avatar, 'image/resize,w_320/format,jpg/quality,q_50'):`${this.data.imageRoot}common/empty/avatar_user.png?${this.data.imageVersion}`) ,
top: 20,
left: 329,
width: 93,
......@@ -295,7 +298,7 @@ Page({
},
{
type: 'text',
content: this.data.type==1? this.data.className: this.data.userInfo.nickname,
content: this.data.type==1? this.data.className: this.data.userInfo.name,
fontSize: 28,
color: '#000000',
textAlign: 'center',
......@@ -384,7 +387,7 @@ Page({
views: [
{
type: 'image',
url: this.data.type==1?`${this.data.imageRoot}2b/common/class-student.png?${this.data.imageVersion}`: (this.data.userInfo.avatar? imagify(this.data.userInfo.avatar, 'image/resize,w_320/format,jpg/quality,q_50'):`${this.data.imageRoot}}common/empty/avatar_user.png?${this.data.imageVersion}`) ,
url: this.data.type==1?`${this.data.imageRoot}2b/common/class-student.png?${this.data.imageVersion}`: (this.data.userInfo.avatar? imagify(this.data.userInfo.avatar, 'image/resize,w_320/format,jpg/quality,q_50'):`${this.data.imageRoot}common/empty/avatar_user.png?${this.data.imageVersion}`) ,
top: 20,
left: 329,
width: 93,
......@@ -400,7 +403,7 @@ Page({
},
{
type: 'text',
content: this.data.type==1? this.data.className: this.data.userInfo.nickname,
content: this.data.type==1? this.data.className: this.data.userInfo.name,
fontSize: 28,
color: '#000000',
textAlign: 'center',
......
......@@ -7,7 +7,7 @@
<image class="avatar" src="{{imageRoot}}2b/common/class-student.png?{{imageVersion}}" wx:if="{{type==1}}"></image>
<image class="avatar" src="{{filter.imagify(userInfo.avatar, 'image/resize,w_320/format,jpg/quality,q_50')}}" wx:elif="{{userInfo.avatar}}"></image>
<image class="avatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
<view class="nickname">{{type==1? className: userInfo.nickname}}</view>
<view class="nickname">{{type==1? className: userInfo.name}}</view>
<view class="imgbox" wx:if="{{hasReviewImg.length>0}}">
<canvas-drag id="canvas-drag" graph="{{graph2}}" width="520" height="440" enableUndo="{{true}}"></canvas-drag>
<cover-image class="icon-angle icon-angle-lt" src="{{imageRoot}}2b/classreviewshare/icon_angle_lr.png?{{imageVersion}}"></cover-image>
......@@ -22,7 +22,7 @@
<button form-type="submit" class="createidbutton">生成form</button>
</form>
</view>
<view class="{{!selectCardLong?'card-hide':''}}">长图
<view class="{{!selectCardLong?'card-hide':''}}">
<image class="post-img" src="{{filter.imagify(imgSrc, 'image/resize,w_375/format,jpg')}}" mode="widthFix" lazy-load="false" binderror="" bindload="" />
</view>
</view>
......
......@@ -21,6 +21,9 @@ page{
overflow-y: auto;
align-items: center;
}
.swiperwrap>view{
display: flex;
}
.card {
position: relative;
width: 647rpx;
......@@ -31,7 +34,7 @@ page{
width: 647rpx;
height: 522rpx;
}
.card-hide{
.swiperwrap>view.card-hide{
display: none;
}
.cardbg {
......
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