fenggu/pages/canvasposter/canvasposter.wxml

75 lines
3.4 KiB
Plaintext

<!--index.wxml-->
<view class='contentWarp'>
<block wx:for="{{itemList}}" wx:key="id">
<view class='touchWrap'
style='transform: scale({{item.scale}});top:{{item.top}}px;left:{{item.left}}px; z-index:{{item.active?100:1}}'>
<view class='imgWrap {{item.active? "touchActive":""}}'
style="transform: rotate({{item.angle}}deg); border: {{item.active?4*item.oScale:0}}rpx #fff dashed;">
<image src='{{item.image}}' data-id='{{item.id}}'
style='width:{{item.width}}px;height:{{item.height}}px;' bindtouchstart='WraptouchStart'
bindtouchmove='WraptouchMove' bindtouchend='WraptouchEnd' mode="widthFix"></image>
<image class='x' src='../../img/close-icon.png'
style='transform: scale({{item.oScale}});transform-origin:center;' data-id='{{item.id}}'
bindtap='deleteItem'></image>
<image class='o' src='../../img/zoom-icon.png'
style='transform: scale({{item.oScale}});transform-origin:center;' data-id='{{item.id}}'
bindtouchstart='oTouchStart' bindtouchmove='oTouchMove' bindtouchend='WraptouchEnd'></image>
</view>
</view>
</block>
</view>
<!-- 保存显示效果图 -->
<view class='canvasWrap' hidden="{{!showCanvas}}">
<image class="resImg" bindlongtap="saveImg" src="{{canvasTemImg}}" mode="widthFix"></image>
<view class='btn_view'>
<button bindtap='saveImg'>保存到手机</button>
<button bindtap='shareImg'>分享</button>
<button bindtap='disappearCanvas'>关闭</button>
</view>
</view>
<!-- 画布 -->
<canvas class='maskCanvas' canvas-id="maskCanvas" style='width:{{canvasWidth}}px; height:{{canvasHeight}}px;'></canvas>
<!-- 右下角操作按钮 -->
<view class="operation-buttons {{showBtn?'closeSave':''}}">
<!-- <image src="../../img/share-icon.png" bindtap="shareEv"></image> -->
<image src="../../img/download-icon.png" bindtap="openMask"></image>
</view>
<!-- 我的作品 -->
<view wx:if="{{funBox}}" class="choose-box {{showBox?'showBox':''}}">
<view>
<scroll-view scroll-x="true">
<view class="scrollView title-box">
<view wx:for="{{titlelist}}" class="{{titleIndex==index?'titleActive':''}}" data-index="{{index}}" bindtap="chooseTitle" wx:key="index">{{item}}</view>
</view>
</scroll-view>
</view>
<view>
<scroll-view scroll-x="true">
<view class="scrollView img-box">
<view wx:for="{{allList}}" data-index="{{index}}" bindtap="chooseImg" wx:key="index"><image class="{{allIndex==index?'allActive':''}}" mode="widthFix" src="{{item}}" lazy-load></image></view>
</view>
</scroll-view>
</view>
</view>
<!-- 登录授权弹框 -->
<view wx:if="{{isLogin}}" class="{{isAnimation==2?'card-box-userinfo':''}} auth-box">
<view class="{{isAnimation==1?'card-box-userinfo':''}}">
<view class="auth-top">
<image src="../../img/robot.png" mode=""></image>
<view class="auth-top-content">
<view>提示:</view>
<view>您当前是游客身份</view>
<view>请授权登录后再进行保存、分享操作</view>
</view>
</view>
<view class="auth-center">申请 获取你的昵称、头像、地区及性别</view>
<view class="auth-bottom">
<view bindtap="chooseBtn" data-index="0" class="{{isNo?'isNyin':'noyin'}} btn btn-no">暂不授权</view>
<view bindtap="chooseBtn" data-index="1" class="{{isOk?'isOyin':'noyin'}} btn btn-yes">
<text>立即授权</text>
<button open-type="getUserInfo" bindtap="shouq" class="auth-btn">立即授权</button>
</view>
</view>
</view>
</view>