Forráskód Böngészése

优惠券券码显示

DELL 3 éve
szülő
commit
2609d69705
2 módosított fájl, 4 hozzáadás és 6 törlés
  1. 3 5
      src/common/weapp-qrcode.js
  2. 1 1
      src/packagePrize/coupon/detail.vue

+ 3 - 5
src/common/weapp-qrcode.js

@@ -13,7 +13,6 @@ var QRCode;
   function _getTypeNumber(sText, nCorrectLevel) {
     var nType = 1;
     var length = _getUTF8Length(sText);
-
     for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {
       var nLimit = 0;
 
@@ -38,7 +37,6 @@ var QRCode;
         nType++;
       }
     }
-
     if (nType > QRCodeLimitLength.length) {
       throw new Error("Too long data");
     }
@@ -319,10 +317,10 @@ var QRCode;
   QRCode.prototype.makeImage = function () {
     var _oContext
     if (this._htOption.usingIn) {
-      _oContext = wx.createCanvasContext(this.canvasId, this._htOption.usingIn)
+      _oContext = uni.createCanvasContext(this.canvasId, this._htOption.usingIn)
     }
     else {
-      _oContext = wx.createCanvasContext(this.canvasId)
+      _oContext = uni.createCanvasContext(this.canvasId)
     }
     var _htOption = this._htOption;
     var oQRCode = this._oQRCode
@@ -405,7 +403,7 @@ var QRCode;
   // 淇濆瓨涓哄浘鐗囷紝灏嗕复鏃惰矾寰勪紶缁欏洖璋�
   QRCode.prototype.exportImage = function (callback) {
     if (this._htOption.callback && typeof this._htOption.callback === 'function') {
-      wx.canvasToTempFilePath({
+      uni.canvasToTempFilePath({
         x: 0,
         y: 0,
         width: this._htOption.width,

+ 1 - 1
src/packagePrize/coupon/detail.vue

@@ -46,7 +46,7 @@
 				
 			<!-- 二维码 -->
 			<view class="flex detail-code" v-if = "info && info.useArea && JSON.parse(info.useArea).value  != 4">
-				<canvas style="width: 220px;height: 220px;" canvas-id="couponQrcode"></canvas>
+				<canvas style="width: 220px;height: 220px;" canvas-id="couponQrcode" id="couponQrcode"></canvas>
 			</view>
 			
 			<!-- 说明 -->