Przeglądaj źródła

更新 拍照缓存

wzh 3 lat temu
rodzic
commit
4af03b5fba

+ 5 - 1
miniprogram/pages/takeBill/takeBill.js

@@ -14,7 +14,8 @@ Page({
     modalText: "位置",
     cw: '',
     ch: '',
-    disabled: false
+    disabled: false,
+    imgCache:''
   },
   takeBill() {
     if (this.data.disabled) return
@@ -83,6 +84,9 @@ Page({
         //   url: `/pages/takeBill/success/success?src=${src}&path=${path}`
         // })
         // return
+        this.setData({
+          imgCache:e.tempFilePath
+        })
         let res = await uploadFile(e.tempFilePath, {
           type: 0,
           userId: wx.getStorageSync('userId'),

+ 2 - 1
miniprogram/pages/takeBill/takeBill.wxml

@@ -9,4 +9,5 @@
   <view class="in"></view>
 </view>
 <view class="go-back fixed" bindtap="goBack">返 回</view>
-<canvas type="2d" id="myCanvas" style="position:fixed;left: -100vw;width:{{cw*0.9*0.25}}rpx;height: {{ch*0.85*0.25}}rpx;box-sizing: border-box"></canvas>
+<canvas type="2d" id="myCanvas" style="position:fixed;left: -100vw;width:{{cw*0.9*0.25}}rpx;height: {{ch*0.85*0.25}}rpx;box-sizing: border-box"></canvas>
+<image wx:if="{{imgCache}}" style="position: fixed;width: 100vw;height: 100vh;top: 0;left: 0;z-index: 100;" src="{{imgCache}}"></image>

+ 0 - 1
project.private.config.json

@@ -72,7 +72,6 @@
     "checkInvalidKey": true,
     "compileHotReLoad": false,
     "lazyloadPlaceholderEnable": false,
-    "useMultiFrameRuntime": false,
     "showES6CompileOption": false,
     "useStaticServer": true
   },