zhangqiOMG 2 years ago
parent
commit
4f7a78f8df
3 changed files with 7 additions and 3 deletions
  1. 4 0
      Eservice/signName/index.js
  2. 2 2
      Eservice/signName/index.wxml
  3. 1 1
      project.private.config.json

+ 4 - 0
Eservice/signName/index.js

@@ -56,6 +56,10 @@ Page({
       .boundingClientRect(rect => {
         this.data.canvasWidth = rect.width * this.data.dpr
         this.data.canvasHeight = rect.height * this.data.dpr
+        this.setData({
+          canvasWidth:this.data.canvasWidth,
+          canvasHeight:this.data.canvasHeight
+        })
       })
       .exec()
     const query1 = wx.createSelectorQuery()

+ 2 - 2
Eservice/signName/index.wxml

@@ -12,6 +12,6 @@
     <view class="handTitle">手写板</view>
   </view>
 </view>
-<view style="position:absolute;left:750rpx;top:0;">
-  <canvas type="2d" id="offCanvas" style="width: 100%; height: 100vh;"></canvas>
+<view style="position:absolute;left:750px;top:0;">
+  <canvas type="2d" id="offCanvas" style="width: {{canvasWidth}}; height: {{canvasHeight}};"></canvas>
 </view>

+ 1 - 1
project.private.config.json

@@ -3,7 +3,7 @@
   "projectname": "E_WeChat",
   "setting": {
     "compileHotReLoad": true,
-    "urlCheck": true
+    "urlCheck": false
   },
   "libVersion": "2.18.1",
   "condition": {