当前位置: 首页 > wzjs >正文

广东做网站的公司微信推广朋友圈广告

广东做网站的公司,微信推广朋友圈广告,做评测系统网站首先要干嘛,企业网站关键词放几个效果&#xff1a; 功能&#xff1a;实现重签 退出 保存 等功能 解决的问题: 电子签名画布抖动问题解 注意&#xff1a; 保存的时候上传到自己的服务器地址&#xff0c;后端返回图片地址 代码&#xff1a; <template><view><view class"signature&qu…

效果:

功能:实现重签  退出  保存 等功能

解决的问题:  电子签名画布抖动问题解

注意: 保存的时候上传到自己的服务器地址,后端返回图片地址

代码:

<template><view><view class="signature" v-show="showCanvas"><canvas class="mycanvas" canvas-id="drawCanvas" id="drawCanvas" @touchstart="touchstart"@touchmove="touchmove" @touchend="touchend" @touchcancel="touchend" disable-scroll></canvas></view><view class="footer"><view class="invite left" @tap="finish">保存</view><view class="invite close" @click="close">退出</view><view class="invite right" @click="clear">重签</view></view></view>
</template><script>export default {data() {return {height: "",showCanvas: true,ctx: '', // 绘图图像points: [], // 路径点集合signature: '',canvasWidth: 0,canvasHeight: 0}},created() {const res = uni.getSystemInfoSync();this.height = res.windowHeight;this.canvasWidth = res.windowWidth;this.canvasHeight = res.windowHeight - 100; // 估算高度,保留底部按钮空间},methods: {close() {this.clear();uni.navigateBack({delta: 1,});},createCanvas() {this.showCanvas = true;this.ctx = uni.createCanvasContext("drawCanvas", this);this.ctx.lineWidth = 4;this.ctx.lineCap = "round";this.ctx.lineJoin = "round";},touchstart(e) {e.preventDefault();let startX = e.changedTouches[0].x;let startY = e.changedTouches[0].y;let startPoint = {X: startX,Y: startY};this.points.push(startPoint);this.ctx.beginPath();},touchmove(e) {e.preventDefault(); // 阻止默认滚动行为let moveX = e.changedTouches[0].x;let moveY = e.changedTouches[0].y;let movePoint = {X: moveX,Y: moveY};this.points.push(movePoint);if (this.points.length >= 2) {this.draw();}},touchend() {this.points = [];},draw() {let point1 = this.points[0];let point2 = this.points[1];this.points.shift();this.ctx.moveTo(point1.X, point1.Y);this.ctx.lineTo(point2.X, point2.Y);this.ctx.stroke();this.ctx.draw(true);},clear() {this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);this.ctx.draw(true);},finish() {let that = this;uni.canvasToTempFilePath({destWidth: 112.5,destHeight: 180,canvasId: 'drawCanvas',success: function(res) {console.log("res", res);let path = res.tempFilePath;that.$emit("store", path);},fail(res) {console.log("err", res);}}, this);}},mounted() {this.createCanvas();}}
</script><style scoped>.signature {z-index: 0;width: 100vw;touch-action: none;/* 禁用默认触摸行为 */}page {background: #fff;}.mycanvas {width: 750rpx;height: calc(100vh - 200upx);touch-action: none;/* 禁用默认触摸行为 */}.footer {display: flex;flex-direction: row-reverse;position: fixed;bottom: 0;width: 100%;padding: 10px 0;margin-bottom: 20px;}.invite {width: 72px;height: 32px;font-size: 12px;text-align: center;line-height: 32px;color: #fff;border-radius: 3px;background-color: #1e7061;margin: 0 10px;}.left {background: #316f60;}.right {background: #8c8c8c;}.close {background: #cd6666;}
</style>

http://www.dtcms.com/wzjs/91663.html

相关文章:

  • 推广链接网站网络营销与管理专业是干什么的
  • 网站建设规划书总结怎么写网站如何快速收录
  • 上海软件外包公司名单珠海网站seo
  • 网站建设合作协议百度seo关键词
  • 济南建站公司电话合肥seo服务商
  • ios开发游戏优化软件
  • 只做英文网站 域名有什么要求企业营销策划书如何编写
  • 网站制作那家便宜点击器
  • 动画网站制作百度 seo 工具
  • 网站建设与管理案例教程40个免费网站推广平台
  • 六安人论坛最新招聘信息科学新概念seo外链平台
  • 用html建设网站优化设计三年级上册语文答案
  • 营销型网站十大参考标准百度关键词优化首选667seo
  • 企业网站策划书网站建设与维护
  • 做西餐网站电商网站开发
  • 游戏加盟项目长沙seo优化排名推广
  • 做视频网站 视频放在哪里找广州百度推广排名优化
  • wordpress首页热门排行榜插件大连百度seo
  • 郴州建设网站公司引擎seo如何优化
  • 南京网站设计制作全网营销老婆第一人
  • 绵阳的网站建设seo关键词优化排名外包
  • 做平面设计图的网站今日新闻头条官网
  • 如何创建网站下载免费网站seo诊断
  • 太原市城市建设拆迁中心网站百度推广客服电话多少
  • 企业对电子商务网站的建设百度seo在哪里
  • 重庆网站建设流程google search
  • 北京平面设计网站人民日报今天新闻
  • 许昌建设网站哪家好seo网站优化快速排名软件
  • 品牌和网站建设百度网盘app官方下载
  • 建站程序的选择网络营销专业就业前景