收藏
回答

手写签名功能,在微信pc端上正常,在企业微信pc端上打开没反应?

 手写签名功能,在微信pc端上正常,在企业微信pc端上打开没反应?

<canvas canvas-id="firstCanvas" id='firstCanvas' bindtouchstart="bindtouchstart" bindtouchmove="bindtouchmove"></canvas>

    /**记录开始点 */

    bindtouchstart: function (e) {

        let {

            writeTipsTrue

        } = this.data

        if (writeTipsTrue) {

            this.data.context.clearRect(0, 0, this.data.width, this.data.height);

            this.setData({

                writeTipsTrue: false,

                sureBtn: true

            })

        }

        this.data.context.moveTo(e.changedTouches[0].x, e.changedTouches[0].y)

    },

    /**记录移动点,刷新绘制 */

    bindtouchmove: function (e) {

        this.data.context.setLineWidth(2) // 设置线条宽度

        this.data.context.lineTo(e.changedTouches[0].x, e.changedTouches[0].y);

        this.data.context.stroke();

        this.data.context.draw(true);

        this.data.context.moveTo(e.changedTouches[0].x, e.changedTouches[0].y);

    },


回答关注问题邀请回答
收藏
登录 后发表内容