|
@@ -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,
|