收藏
回答

Canvas 画布IOS 无法正常签名,卡顿?

用户升级了ios最新版系统后,导致了现有小程序签名无法使用了,基础库是3.3.4

回答关注问题邀请回答
收藏

2 个回答

  • 社区技术运营专员-Jahozheng
    社区技术运营专员-Jahozheng
    03-20

    你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

    03-20
    有用
    回复
  • Victor
    Victor
    03-20

    微信版本 8.0.48 ios17.4

    <canvas

              class="handWriting"

              disable-scroll="true"

              @touchstart="uploadScaleStart"

              @touchmove="uploadScaleMove"

              @touchend="uploadScaleEnd"

              canvas-id="handWriting"

            >

                      </canvas

            >

     uploadScaleMove: function (e) {

          if (e.type != "touchmove") return false;

          if (e.cancelable) {

            if (!e.defaultPrevented) {

              e.preventDefault();

            }

          }

          let point = {

            x: e.touches[0].x,

            y: e.touches[0].y,

          }

          if (point.y < this.cutArea.top) {

            this.cutArea.top = point.y;

          }

          if (point.y < 0) this.cutArea.top = 0;


          if (point.x > this.cutArea.right) {

            this.cutArea.right = point.x;

          }

          if (this.canvasWidth - point.x <= 0) {

            this.cutArea.right = this.canvasWidth;

          }

          if (point.y > this.cutArea.bottom) {

            this.cutArea.bottom = point.y;

          }

          if (this.canvasHeight - point.y <= 0) {

            this.cutArea.bottom = this.canvasHeight;

          }

          if (point.x < this.cutArea.left) {

            this.cutArea.left = point.x;

          }

          if (point.x < 0) this.cutArea.left = 0;

          this.lastPoint = this.currentPoint;

          this.currentPoint = point;

          let currentLine = this.currentLine;

          currentLine.unshift({

            time: new Date().getTime(),

            dis: this.distance(this.currentPoint, this.lastPoint),

            x: point.x,

            y: point.y,

          });

          this.pointToLine(currentLine);

        },

    03-20
    有用
    回复 1
    • alin
      alin
      03-26
      为什么官方回复的都不一致
      03-26
      回复
登录 后发表内容