icve-sso-vue3 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/icve-sso-vue3.common.118.js +636 -0
- package/dist/icve-sso-vue3.common.118.js.map +1 -0
- package/dist/icve-sso-vue3.common.js +372 -719
- package/dist/icve-sso-vue3.common.js.map +1 -1
- package/dist/icve-sso-vue3.css +1 -1
- package/dist/icve-sso-vue3.umd.118.js +636 -0
- package/dist/icve-sso-vue3.umd.118.js.map +1 -0
- package/dist/icve-sso-vue3.umd.js +372 -719
- package/dist/icve-sso-vue3.umd.js.map +1 -1
- package/dist/icve-sso-vue3.umd.min.118.js +2 -0
- package/dist/icve-sso-vue3.umd.min.118.js.map +1 -0
- package/dist/icve-sso-vue3.umd.min.js +4 -4
- package/dist/icve-sso-vue3.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -9179,638 +9179,6 @@ $({ target: 'JSON', stat: true, forced: NO_SOURCE_SUPPORT }, {
|
|
|
9179
9179
|
});
|
|
9180
9180
|
|
|
9181
9181
|
|
|
9182
|
-
/***/ },
|
|
9183
|
-
|
|
9184
|
-
/***/ 9118
|
|
9185
|
-
(module) {
|
|
9186
|
-
|
|
9187
|
-
/**
|
|
9188
|
-
* @fileoverview
|
|
9189
|
-
* - Using the 'QRCode for Javascript library'
|
|
9190
|
-
* - Fixed dataset of 'QRCode for Javascript library' for support full-spec.
|
|
9191
|
-
* - this library has no dependencies.
|
|
9192
|
-
*
|
|
9193
|
-
* @author davidshimjs
|
|
9194
|
-
* @see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a>
|
|
9195
|
-
* @see <a href="http://jeromeetienne.github.com/jquery-qrcode/" target="_blank">http://jeromeetienne.github.com/jquery-qrcode/</a>
|
|
9196
|
-
*/
|
|
9197
|
-
var QRCode;
|
|
9198
|
-
|
|
9199
|
-
(function (root, factory) {
|
|
9200
|
-
|
|
9201
|
-
/* CommonJS */
|
|
9202
|
-
if (true) module.exports = factory()
|
|
9203
|
-
|
|
9204
|
-
/* AMD module */
|
|
9205
|
-
else // removed by dead control flow
|
|
9206
|
-
{}
|
|
9207
|
-
|
|
9208
|
-
}(this, function () { //---------------------------------------------------------------------
|
|
9209
|
-
// QRCode for JavaScript
|
|
9210
|
-
//
|
|
9211
|
-
// Copyright (c) 2009 Kazuhiko Arase
|
|
9212
|
-
//
|
|
9213
|
-
// URL: http://www.d-project.com/
|
|
9214
|
-
//
|
|
9215
|
-
// Licensed under the MIT license:
|
|
9216
|
-
// http://www.opensource.org/licenses/mit-license.php
|
|
9217
|
-
//
|
|
9218
|
-
// The word "QR Code" is registered trademark of
|
|
9219
|
-
// DENSO WAVE INCORPORATED
|
|
9220
|
-
// http://www.denso-wave.com/qrcode/faqpatent-e.html
|
|
9221
|
-
//
|
|
9222
|
-
//---------------------------------------------------------------------
|
|
9223
|
-
function QR8bitByte(data) {
|
|
9224
|
-
this.mode = QRMode.MODE_8BIT_BYTE;
|
|
9225
|
-
this.data = data;
|
|
9226
|
-
this.parsedData = [];
|
|
9227
|
-
|
|
9228
|
-
// Added to support UTF-8 Characters
|
|
9229
|
-
for (var i = 0, l = this.data.length; i < l; i++) {
|
|
9230
|
-
var byteArray = [];
|
|
9231
|
-
var code = this.data.charCodeAt(i);
|
|
9232
|
-
|
|
9233
|
-
if (code > 0x10000) {
|
|
9234
|
-
byteArray[0] = 0xF0 | ((code & 0x1C0000) >>> 18);
|
|
9235
|
-
byteArray[1] = 0x80 | ((code & 0x3F000) >>> 12);
|
|
9236
|
-
byteArray[2] = 0x80 | ((code & 0xFC0) >>> 6);
|
|
9237
|
-
byteArray[3] = 0x80 | (code & 0x3F);
|
|
9238
|
-
} else if (code > 0x800) {
|
|
9239
|
-
byteArray[0] = 0xE0 | ((code & 0xF000) >>> 12);
|
|
9240
|
-
byteArray[1] = 0x80 | ((code & 0xFC0) >>> 6);
|
|
9241
|
-
byteArray[2] = 0x80 | (code & 0x3F);
|
|
9242
|
-
} else if (code > 0x80) {
|
|
9243
|
-
byteArray[0] = 0xC0 | ((code & 0x7C0) >>> 6);
|
|
9244
|
-
byteArray[1] = 0x80 | (code & 0x3F);
|
|
9245
|
-
} else {
|
|
9246
|
-
byteArray[0] = code;
|
|
9247
|
-
}
|
|
9248
|
-
|
|
9249
|
-
this.parsedData.push(byteArray);
|
|
9250
|
-
}
|
|
9251
|
-
|
|
9252
|
-
this.parsedData = Array.prototype.concat.apply([], this.parsedData);
|
|
9253
|
-
|
|
9254
|
-
if (this.parsedData.length != this.data.length) {
|
|
9255
|
-
this.parsedData.unshift(191);
|
|
9256
|
-
this.parsedData.unshift(187);
|
|
9257
|
-
this.parsedData.unshift(239);
|
|
9258
|
-
}
|
|
9259
|
-
}
|
|
9260
|
-
|
|
9261
|
-
QR8bitByte.prototype = {
|
|
9262
|
-
getLength: function (buffer) {
|
|
9263
|
-
return this.parsedData.length;
|
|
9264
|
-
},
|
|
9265
|
-
write: function (buffer) {
|
|
9266
|
-
for (var i = 0, l = this.parsedData.length; i < l; i++) {
|
|
9267
|
-
buffer.put(this.parsedData[i], 8);
|
|
9268
|
-
}
|
|
9269
|
-
}
|
|
9270
|
-
};
|
|
9271
|
-
|
|
9272
|
-
function QRCodeModel(typeNumber, errorCorrectLevel) {
|
|
9273
|
-
this.typeNumber = typeNumber;
|
|
9274
|
-
this.errorCorrectLevel = errorCorrectLevel;
|
|
9275
|
-
this.modules = null;
|
|
9276
|
-
this.moduleCount = 0;
|
|
9277
|
-
this.dataCache = null;
|
|
9278
|
-
this.dataList = [];
|
|
9279
|
-
}
|
|
9280
|
-
|
|
9281
|
-
QRCodeModel.prototype={addData:function(data){var newData=new QR8bitByte(data);this.dataList.push(newData);this.dataCache=null;},isDark:function(row,col){if(row<0||this.moduleCount<=row||col<0||this.moduleCount<=col){throw new Error(row+","+col);}
|
|
9282
|
-
return this.modules[row][col];},getModuleCount:function(){return this.moduleCount;},make:function(){this.makeImpl(false,this.getBestMaskPattern());},makeImpl:function(test,maskPattern){this.moduleCount=this.typeNumber*4+17;this.modules=new Array(this.moduleCount);for(var row=0;row<this.moduleCount;row++){this.modules[row]=new Array(this.moduleCount);for(var col=0;col<this.moduleCount;col++){this.modules[row][col]=null;}}
|
|
9283
|
-
this.setupPositionProbePattern(0,0);this.setupPositionProbePattern(this.moduleCount-7,0);this.setupPositionProbePattern(0,this.moduleCount-7);this.setupPositionAdjustPattern();this.setupTimingPattern();this.setupTypeInfo(test,maskPattern);if(this.typeNumber>=7){this.setupTypeNumber(test);}
|
|
9284
|
-
if(this.dataCache==null){this.dataCache=QRCodeModel.createData(this.typeNumber,this.errorCorrectLevel,this.dataList);}
|
|
9285
|
-
this.mapData(this.dataCache,maskPattern);},setupPositionProbePattern:function(row,col){for(var r=-1;r<=7;r++){if(row+r<=-1||this.moduleCount<=row+r)continue;for(var c=-1;c<=7;c++){if(col+c<=-1||this.moduleCount<=col+c)continue;if((0<=r&&r<=6&&(c==0||c==6))||(0<=c&&c<=6&&(r==0||r==6))||(2<=r&&r<=4&&2<=c&&c<=4)){this.modules[row+r][col+c]=true;}else{this.modules[row+r][col+c]=false;}}}},getBestMaskPattern:function(){var minLostPoint=0;var pattern=0;for(var i=0;i<8;i++){this.makeImpl(true,i);var lostPoint=QRUtil.getLostPoint(this);if(i==0||minLostPoint>lostPoint){minLostPoint=lostPoint;pattern=i;}}
|
|
9286
|
-
return pattern;},createMovieClip:function(target_mc,instance_name,depth){var qr_mc=target_mc.createEmptyMovieClip(instance_name,depth);var cs=1;this.make();for(var row=0;row<this.modules.length;row++){var y=row*cs;for(var col=0;col<this.modules[row].length;col++){var x=col*cs;var dark=this.modules[row][col];if(dark){qr_mc.beginFill(0,100);qr_mc.moveTo(x,y);qr_mc.lineTo(x+cs,y);qr_mc.lineTo(x+cs,y+cs);qr_mc.lineTo(x,y+cs);qr_mc.endFill();}}}
|
|
9287
|
-
return qr_mc;},setupTimingPattern:function(){for(var r=8;r<this.moduleCount-8;r++){if(this.modules[r][6]!=null){continue;}
|
|
9288
|
-
this.modules[r][6]=(r%2==0);}
|
|
9289
|
-
for(var c=8;c<this.moduleCount-8;c++){if(this.modules[6][c]!=null){continue;}
|
|
9290
|
-
this.modules[6][c]=(c%2==0);}},setupPositionAdjustPattern:function(){var pos=QRUtil.getPatternPosition(this.typeNumber);for(var i=0;i<pos.length;i++){for(var j=0;j<pos.length;j++){var row=pos[i];var col=pos[j];if(this.modules[row][col]!=null){continue;}
|
|
9291
|
-
for(var r=-2;r<=2;r++){for(var c=-2;c<=2;c++){if(r==-2||r==2||c==-2||c==2||(r==0&&c==0)){this.modules[row+r][col+c]=true;}else{this.modules[row+r][col+c]=false;}}}}}},setupTypeNumber:function(test){var bits=QRUtil.getBCHTypeNumber(this.typeNumber);for(var i=0;i<18;i++){var mod=(!test&&((bits>>i)&1)==1);this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=mod;}
|
|
9292
|
-
for(var i=0;i<18;i++){var mod=(!test&&((bits>>i)&1)==1);this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=mod;}},setupTypeInfo:function(test,maskPattern){var data=(this.errorCorrectLevel<<3)|maskPattern;var bits=QRUtil.getBCHTypeInfo(data);for(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<6){this.modules[i][8]=mod;}else if(i<8){this.modules[i+1][8]=mod;}else{this.modules[this.moduleCount-15+i][8]=mod;}}
|
|
9293
|
-
for(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<8){this.modules[8][this.moduleCount-i-1]=mod;}else if(i<9){this.modules[8][15-i-1+1]=mod;}else{this.modules[8][15-i-1]=mod;}}
|
|
9294
|
-
this.modules[this.moduleCount-8][8]=(!test);},mapData:function(data,maskPattern){var inc=-1;var row=this.moduleCount-1;var bitIndex=7;var byteIndex=0;for(var col=this.moduleCount-1;col>0;col-=2){if(col==6)col--;while(true){for(var c=0;c<2;c++){if(this.modules[row][col-c]==null){var dark=false;if(byteIndex<data.length){dark=(((data[byteIndex]>>>bitIndex)&1)==1);}
|
|
9295
|
-
var mask=QRUtil.getMask(maskPattern,row,col-c);if(mask){dark=!dark;}
|
|
9296
|
-
this.modules[row][col-c]=dark;bitIndex--;if(bitIndex==-1){byteIndex++;bitIndex=7;}}}
|
|
9297
|
-
row+=inc;if(row<0||this.moduleCount<=row){row-=inc;inc=-inc;break;}}}}};QRCodeModel.PAD0=0xEC;QRCodeModel.PAD1=0x11;QRCodeModel.createData=function(typeNumber,errorCorrectLevel,dataList){var rsBlocks=QRRSBlock.getRSBlocks(typeNumber,errorCorrectLevel);var buffer=new QRBitBuffer();for(var i=0;i<dataList.length;i++){var data=dataList[i];buffer.put(data.mode,4);buffer.put(data.getLength(),QRUtil.getLengthInBits(data.mode,typeNumber));data.write(buffer);}
|
|
9298
|
-
var totalDataCount=0;for(var i=0;i<rsBlocks.length;i++){totalDataCount+=rsBlocks[i].dataCount;}
|
|
9299
|
-
if(buffer.getLengthInBits()>totalDataCount*8){throw new Error("code length overflow. ("
|
|
9300
|
-
+buffer.getLengthInBits()
|
|
9301
|
-
+">"
|
|
9302
|
-
+totalDataCount*8
|
|
9303
|
-
+")");}
|
|
9304
|
-
if(buffer.getLengthInBits()+4<=totalDataCount*8){buffer.put(0,4);}
|
|
9305
|
-
while(buffer.getLengthInBits()%8!=0){buffer.putBit(false);}
|
|
9306
|
-
while(true){if(buffer.getLengthInBits()>=totalDataCount*8){break;}
|
|
9307
|
-
buffer.put(QRCodeModel.PAD0,8);if(buffer.getLengthInBits()>=totalDataCount*8){break;}
|
|
9308
|
-
buffer.put(QRCodeModel.PAD1,8);}
|
|
9309
|
-
return QRCodeModel.createBytes(buffer,rsBlocks);};QRCodeModel.createBytes=function(buffer,rsBlocks){var offset=0;var maxDcCount=0;var maxEcCount=0;var dcdata=new Array(rsBlocks.length);var ecdata=new Array(rsBlocks.length);for(var r=0;r<rsBlocks.length;r++){var dcCount=rsBlocks[r].dataCount;var ecCount=rsBlocks[r].totalCount-dcCount;maxDcCount=Math.max(maxDcCount,dcCount);maxEcCount=Math.max(maxEcCount,ecCount);dcdata[r]=new Array(dcCount);for(var i=0;i<dcdata[r].length;i++){dcdata[r][i]=0xff&buffer.buffer[i+offset];}
|
|
9310
|
-
offset+=dcCount;var rsPoly=QRUtil.getErrorCorrectPolynomial(ecCount);var rawPoly=new QRPolynomial(dcdata[r],rsPoly.getLength()-1);var modPoly=rawPoly.mod(rsPoly);ecdata[r]=new Array(rsPoly.getLength()-1);for(var i=0;i<ecdata[r].length;i++){var modIndex=i+modPoly.getLength()-ecdata[r].length;ecdata[r][i]=(modIndex>=0)?modPoly.get(modIndex):0;}}
|
|
9311
|
-
var totalCodeCount=0;for(var i=0;i<rsBlocks.length;i++){totalCodeCount+=rsBlocks[i].totalCount;}
|
|
9312
|
-
var data=new Array(totalCodeCount);var index=0;for(var i=0;i<maxDcCount;i++){for(var r=0;r<rsBlocks.length;r++){if(i<dcdata[r].length){data[index++]=dcdata[r][i];}}}
|
|
9313
|
-
for(var i=0;i<maxEcCount;i++){for(var r=0;r<rsBlocks.length;r++){if(i<ecdata[r].length){data[index++]=ecdata[r][i];}}}
|
|
9314
|
-
return data;};var QRMode={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3};var QRErrorCorrectLevel={L:1,M:0,Q:3,H:2};var QRMaskPattern={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var QRUtil={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:(1<<10)|(1<<8)|(1<<5)|(1<<4)|(1<<2)|(1<<1)|(1<<0),G18:(1<<12)|(1<<11)|(1<<10)|(1<<9)|(1<<8)|(1<<5)|(1<<2)|(1<<0),G15_MASK:(1<<14)|(1<<12)|(1<<10)|(1<<4)|(1<<1),getBCHTypeInfo:function(data){var d=data<<10;while(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G15)>=0){d^=(QRUtil.G15<<(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G15)));}
|
|
9315
|
-
return((data<<10)|d)^QRUtil.G15_MASK;},getBCHTypeNumber:function(data){var d=data<<12;while(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G18)>=0){d^=(QRUtil.G18<<(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G18)));}
|
|
9316
|
-
return(data<<12)|d;},getBCHDigit:function(data){var digit=0;while(data!=0){digit++;data>>>=1;}
|
|
9317
|
-
return digit;},getPatternPosition:function(typeNumber){return QRUtil.PATTERN_POSITION_TABLE[typeNumber-1];},getMask:function(maskPattern,i,j){switch(maskPattern){case QRMaskPattern.PATTERN000:return(i+j)%2==0;case QRMaskPattern.PATTERN001:return i%2==0;case QRMaskPattern.PATTERN010:return j%3==0;case QRMaskPattern.PATTERN011:return(i+j)%3==0;case QRMaskPattern.PATTERN100:return(Math.floor(i/2)+Math.floor(j/3))%2==0;case QRMaskPattern.PATTERN101:return(i*j)%2+(i*j)%3==0;case QRMaskPattern.PATTERN110:return((i*j)%2+(i*j)%3)%2==0;case QRMaskPattern.PATTERN111:return((i*j)%3+(i+j)%2)%2==0;default:throw new Error("bad maskPattern:"+maskPattern);}},getErrorCorrectPolynomial:function(errorCorrectLength){var a=new QRPolynomial([1],0);for(var i=0;i<errorCorrectLength;i++){a=a.multiply(new QRPolynomial([1,QRMath.gexp(i)],0));}
|
|
9318
|
-
return a;},getLengthInBits:function(mode,type){if(1<=type&&type<10){switch(mode){case QRMode.MODE_NUMBER:return 10;case QRMode.MODE_ALPHA_NUM:return 9;case QRMode.MODE_8BIT_BYTE:return 8;case QRMode.MODE_KANJI:return 8;default:throw new Error("mode:"+mode);}}else if(type<27){switch(mode){case QRMode.MODE_NUMBER:return 12;case QRMode.MODE_ALPHA_NUM:return 11;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 10;default:throw new Error("mode:"+mode);}}else if(type<41){switch(mode){case QRMode.MODE_NUMBER:return 14;case QRMode.MODE_ALPHA_NUM:return 13;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 12;default:throw new Error("mode:"+mode);}}else{throw new Error("type:"+type);}},getLostPoint:function(qrCode){var moduleCount=qrCode.getModuleCount();var lostPoint=0;for(var row=0;row<moduleCount;row++){for(var col=0;col<moduleCount;col++){var sameCount=0;var dark=qrCode.isDark(row,col);for(var r=-1;r<=1;r++){if(row+r<0||moduleCount<=row+r){continue;}
|
|
9319
|
-
for(var c=-1;c<=1;c++){if(col+c<0||moduleCount<=col+c){continue;}
|
|
9320
|
-
if(r==0&&c==0){continue;}
|
|
9321
|
-
if(dark==qrCode.isDark(row+r,col+c)){sameCount++;}}}
|
|
9322
|
-
if(sameCount>5){lostPoint+=(3+sameCount-5);}}}
|
|
9323
|
-
for(var row=0;row<moduleCount-1;row++){for(var col=0;col<moduleCount-1;col++){var count=0;if(qrCode.isDark(row,col))count++;if(qrCode.isDark(row+1,col))count++;if(qrCode.isDark(row,col+1))count++;if(qrCode.isDark(row+1,col+1))count++;if(count==0||count==4){lostPoint+=3;}}}
|
|
9324
|
-
for(var row=0;row<moduleCount;row++){for(var col=0;col<moduleCount-6;col++){if(qrCode.isDark(row,col)&&!qrCode.isDark(row,col+1)&&qrCode.isDark(row,col+2)&&qrCode.isDark(row,col+3)&&qrCode.isDark(row,col+4)&&!qrCode.isDark(row,col+5)&&qrCode.isDark(row,col+6)){lostPoint+=40;}}}
|
|
9325
|
-
for(var col=0;col<moduleCount;col++){for(var row=0;row<moduleCount-6;row++){if(qrCode.isDark(row,col)&&!qrCode.isDark(row+1,col)&&qrCode.isDark(row+2,col)&&qrCode.isDark(row+3,col)&&qrCode.isDark(row+4,col)&&!qrCode.isDark(row+5,col)&&qrCode.isDark(row+6,col)){lostPoint+=40;}}}
|
|
9326
|
-
var darkCount=0;for(var col=0;col<moduleCount;col++){for(var row=0;row<moduleCount;row++){if(qrCode.isDark(row,col)){darkCount++;}}}
|
|
9327
|
-
var ratio=Math.abs(100*darkCount/moduleCount/moduleCount-50)/5;lostPoint+=ratio*10;return lostPoint;}};var QRMath={glog:function(n){if(n<1){throw new Error("glog("+n+")");}
|
|
9328
|
-
return QRMath.LOG_TABLE[n];},gexp:function(n){while(n<0){n+=255;}
|
|
9329
|
-
while(n>=256){n-=255;}
|
|
9330
|
-
return QRMath.EXP_TABLE[n];},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var i=0;i<8;i++){QRMath.EXP_TABLE[i]=1<<i;}
|
|
9331
|
-
for(var i=8;i<256;i++){QRMath.EXP_TABLE[i]=QRMath.EXP_TABLE[i-4]^QRMath.EXP_TABLE[i-5]^QRMath.EXP_TABLE[i-6]^QRMath.EXP_TABLE[i-8];}
|
|
9332
|
-
for(var i=0;i<255;i++){QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]]=i;}
|
|
9333
|
-
function QRPolynomial(num,shift){if(num.length==undefined){throw new Error(num.length+"/"+shift);}
|
|
9334
|
-
var offset=0;while(offset<num.length&&num[offset]==0){offset++;}
|
|
9335
|
-
this.num=new Array(num.length-offset+shift);for(var i=0;i<num.length-offset;i++){this.num[i]=num[i+offset];}}
|
|
9336
|
-
QRPolynomial.prototype={get:function(index){return this.num[index];},getLength:function(){return this.num.length;},multiply:function(e){var num=new Array(this.getLength()+e.getLength()-1);for(var i=0;i<this.getLength();i++){for(var j=0;j<e.getLength();j++){num[i+j]^=QRMath.gexp(QRMath.glog(this.get(i))+QRMath.glog(e.get(j)));}}
|
|
9337
|
-
return new QRPolynomial(num,0);},mod:function(e){if(this.getLength()-e.getLength()<0){return this;}
|
|
9338
|
-
var ratio=QRMath.glog(this.get(0))-QRMath.glog(e.get(0));var num=new Array(this.getLength());for(var i=0;i<this.getLength();i++){num[i]=this.get(i);}
|
|
9339
|
-
for(var i=0;i<e.getLength();i++){num[i]^=QRMath.gexp(QRMath.glog(e.get(i))+ratio);}
|
|
9340
|
-
return new QRPolynomial(num,0).mod(e);}};function QRRSBlock(totalCount,dataCount){this.totalCount=totalCount;this.dataCount=dataCount;}
|
|
9341
|
-
QRRSBlock.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];QRRSBlock.getRSBlocks=function(typeNumber,errorCorrectLevel){var rsBlock=QRRSBlock.getRsBlockTable(typeNumber,errorCorrectLevel);if(rsBlock==undefined){throw new Error("bad rs block @ typeNumber:"+typeNumber+"/errorCorrectLevel:"+errorCorrectLevel);}
|
|
9342
|
-
var length=rsBlock.length/3;var list=[];for(var i=0;i<length;i++){var count=rsBlock[i*3+0];var totalCount=rsBlock[i*3+1];var dataCount=rsBlock[i*3+2];for(var j=0;j<count;j++){list.push(new QRRSBlock(totalCount,dataCount));}}
|
|
9343
|
-
return list;};QRRSBlock.getRsBlockTable=function(typeNumber,errorCorrectLevel){switch(errorCorrectLevel){case QRErrorCorrectLevel.L:return QRRSBlock.RS_BLOCK_TABLE[(typeNumber-1)*4+0];case QRErrorCorrectLevel.M:return QRRSBlock.RS_BLOCK_TABLE[(typeNumber-1)*4+1];case QRErrorCorrectLevel.Q:return QRRSBlock.RS_BLOCK_TABLE[(typeNumber-1)*4+2];case QRErrorCorrectLevel.H:return QRRSBlock.RS_BLOCK_TABLE[(typeNumber-1)*4+3];default:return undefined;}};function QRBitBuffer(){this.buffer=[];this.length=0;}
|
|
9344
|
-
QRBitBuffer.prototype={get:function(index){var bufIndex=Math.floor(index/8);return((this.buffer[bufIndex]>>>(7-index%8))&1)==1;},put:function(num,length){for(var i=0;i<length;i++){this.putBit(((num>>>(length-i-1))&1)==1);}},getLengthInBits:function(){return this.length;},putBit:function(bit){var bufIndex=Math.floor(this.length/8);if(this.buffer.length<=bufIndex){this.buffer.push(0);}
|
|
9345
|
-
if(bit){this.buffer[bufIndex]|=(0x80>>>(this.length%8));}
|
|
9346
|
-
this.length++;}};var QRCodeLimitLength=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];
|
|
9347
|
-
|
|
9348
|
-
function _isSupportCanvas() {
|
|
9349
|
-
return typeof CanvasRenderingContext2D != "undefined";
|
|
9350
|
-
}
|
|
9351
|
-
|
|
9352
|
-
// android 2.x doesn't support Data-URI spec
|
|
9353
|
-
function _getAndroid() {
|
|
9354
|
-
var android = false;
|
|
9355
|
-
var sAgent = navigator.userAgent;
|
|
9356
|
-
|
|
9357
|
-
if (/android/i.test(sAgent)) { // android
|
|
9358
|
-
android = true;
|
|
9359
|
-
var aMat = sAgent.toString().match(/android ([0-9]\.[0-9])/i);
|
|
9360
|
-
|
|
9361
|
-
if (aMat && aMat[1]) {
|
|
9362
|
-
android = parseFloat(aMat[1]);
|
|
9363
|
-
}
|
|
9364
|
-
}
|
|
9365
|
-
|
|
9366
|
-
return android;
|
|
9367
|
-
}
|
|
9368
|
-
|
|
9369
|
-
var svgDrawer = (function() {
|
|
9370
|
-
|
|
9371
|
-
var Drawing = function (el, htOption) {
|
|
9372
|
-
this._el = el;
|
|
9373
|
-
this._htOption = htOption;
|
|
9374
|
-
};
|
|
9375
|
-
|
|
9376
|
-
Drawing.prototype.draw = function (oQRCode) {
|
|
9377
|
-
var _htOption = this._htOption;
|
|
9378
|
-
var _el = this._el;
|
|
9379
|
-
var nCount = oQRCode.getModuleCount();
|
|
9380
|
-
var nWidth = Math.floor(_htOption.width / nCount);
|
|
9381
|
-
var nHeight = Math.floor(_htOption.height / nCount);
|
|
9382
|
-
|
|
9383
|
-
this.clear();
|
|
9384
|
-
|
|
9385
|
-
function makeSVG(tag, attrs) {
|
|
9386
|
-
var el = document.createElementNS('http://www.w3.org/2000/svg', tag);
|
|
9387
|
-
for (var k in attrs)
|
|
9388
|
-
if (attrs.hasOwnProperty(k)) el.setAttribute(k, attrs[k]);
|
|
9389
|
-
return el;
|
|
9390
|
-
}
|
|
9391
|
-
|
|
9392
|
-
var svg = makeSVG("svg" , {'viewBox': '0 0 ' + String(nCount) + " " + String(nCount), 'width': '100%', 'height': '100%', 'fill': _htOption.colorLight});
|
|
9393
|
-
svg.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink");
|
|
9394
|
-
_el.appendChild(svg);
|
|
9395
|
-
|
|
9396
|
-
svg.appendChild(makeSVG("rect", {"fill": _htOption.colorLight, "width": "100%", "height": "100%"}));
|
|
9397
|
-
svg.appendChild(makeSVG("rect", {"fill": _htOption.colorDark, "width": "1", "height": "1", "id": "template"}));
|
|
9398
|
-
|
|
9399
|
-
for (var row = 0; row < nCount; row++) {
|
|
9400
|
-
for (var col = 0; col < nCount; col++) {
|
|
9401
|
-
if (oQRCode.isDark(row, col)) {
|
|
9402
|
-
var child = makeSVG("use", {"x": String(col), "y": String(row)});
|
|
9403
|
-
child.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template")
|
|
9404
|
-
svg.appendChild(child);
|
|
9405
|
-
}
|
|
9406
|
-
}
|
|
9407
|
-
}
|
|
9408
|
-
};
|
|
9409
|
-
Drawing.prototype.clear = function () {
|
|
9410
|
-
while (this._el.hasChildNodes())
|
|
9411
|
-
this._el.removeChild(this._el.lastChild);
|
|
9412
|
-
};
|
|
9413
|
-
return Drawing;
|
|
9414
|
-
})();
|
|
9415
|
-
|
|
9416
|
-
var useSVG = document.documentElement.tagName.toLowerCase() === "svg";
|
|
9417
|
-
|
|
9418
|
-
// Drawing in DOM by using Table tag
|
|
9419
|
-
var Drawing = useSVG ? svgDrawer : !_isSupportCanvas() ? (function () {
|
|
9420
|
-
var Drawing = function (el, htOption) {
|
|
9421
|
-
this._el = el;
|
|
9422
|
-
this._htOption = htOption;
|
|
9423
|
-
};
|
|
9424
|
-
|
|
9425
|
-
/**
|
|
9426
|
-
* Draw the QRCode
|
|
9427
|
-
*
|
|
9428
|
-
* @param {QRCode} oQRCode
|
|
9429
|
-
*/
|
|
9430
|
-
Drawing.prototype.draw = function (oQRCode) {
|
|
9431
|
-
var _htOption = this._htOption;
|
|
9432
|
-
var _el = this._el;
|
|
9433
|
-
var nCount = oQRCode.getModuleCount();
|
|
9434
|
-
var nWidth = Math.floor(_htOption.width / nCount);
|
|
9435
|
-
var nHeight = Math.floor(_htOption.height / nCount);
|
|
9436
|
-
var aHTML = ['<table style="border:0;border-collapse:collapse;">'];
|
|
9437
|
-
|
|
9438
|
-
for (var row = 0; row < nCount; row++) {
|
|
9439
|
-
aHTML.push('<tr>');
|
|
9440
|
-
|
|
9441
|
-
for (var col = 0; col < nCount; col++) {
|
|
9442
|
-
aHTML.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:' + nWidth + 'px;height:' + nHeight + 'px;background-color:' + (oQRCode.isDark(row, col) ? _htOption.colorDark : _htOption.colorLight) + ';"></td>');
|
|
9443
|
-
}
|
|
9444
|
-
|
|
9445
|
-
aHTML.push('</tr>');
|
|
9446
|
-
}
|
|
9447
|
-
|
|
9448
|
-
aHTML.push('</table>');
|
|
9449
|
-
_el.innerHTML = aHTML.join('');
|
|
9450
|
-
|
|
9451
|
-
// Fix the margin values as real size.
|
|
9452
|
-
var elTable = _el.childNodes[0];
|
|
9453
|
-
var nLeftMarginTable = (_htOption.width - elTable.offsetWidth) / 2;
|
|
9454
|
-
var nTopMarginTable = (_htOption.height - elTable.offsetHeight) / 2;
|
|
9455
|
-
|
|
9456
|
-
if (nLeftMarginTable > 0 && nTopMarginTable > 0) {
|
|
9457
|
-
elTable.style.margin = nTopMarginTable + "px " + nLeftMarginTable + "px";
|
|
9458
|
-
}
|
|
9459
|
-
};
|
|
9460
|
-
|
|
9461
|
-
/**
|
|
9462
|
-
* Clear the QRCode
|
|
9463
|
-
*/
|
|
9464
|
-
Drawing.prototype.clear = function () {
|
|
9465
|
-
this._el.innerHTML = '';
|
|
9466
|
-
};
|
|
9467
|
-
|
|
9468
|
-
return Drawing;
|
|
9469
|
-
})() : (function () { // Drawing in Canvas
|
|
9470
|
-
function _onMakeImage() {
|
|
9471
|
-
this._elImage.src = this._elCanvas.toDataURL("image/png");
|
|
9472
|
-
this._elImage.style.display = "block";
|
|
9473
|
-
this._elCanvas.style.display = "none";
|
|
9474
|
-
}
|
|
9475
|
-
|
|
9476
|
-
// Android 2.1 bug workaround
|
|
9477
|
-
// http://code.google.com/p/android/issues/detail?id=5141
|
|
9478
|
-
if (this._android && this._android <= 2.1) {
|
|
9479
|
-
var factor = 1 / window.devicePixelRatio;
|
|
9480
|
-
var drawImage = CanvasRenderingContext2D.prototype.drawImage;
|
|
9481
|
-
CanvasRenderingContext2D.prototype.drawImage = function (image, sx, sy, sw, sh, dx, dy, dw, dh) {
|
|
9482
|
-
if (("nodeName" in image) && /img/i.test(image.nodeName)) {
|
|
9483
|
-
for (var i = arguments.length - 1; i >= 1; i--) {
|
|
9484
|
-
arguments[i] = arguments[i] * factor;
|
|
9485
|
-
}
|
|
9486
|
-
} else if (typeof dw == "undefined") {
|
|
9487
|
-
arguments[1] *= factor;
|
|
9488
|
-
arguments[2] *= factor;
|
|
9489
|
-
arguments[3] *= factor;
|
|
9490
|
-
arguments[4] *= factor;
|
|
9491
|
-
}
|
|
9492
|
-
|
|
9493
|
-
drawImage.apply(this, arguments);
|
|
9494
|
-
};
|
|
9495
|
-
}
|
|
9496
|
-
|
|
9497
|
-
/**
|
|
9498
|
-
* Check whether the user's browser supports Data URI or not
|
|
9499
|
-
*
|
|
9500
|
-
* @private
|
|
9501
|
-
* @param {Function} fSuccess Occurs if it supports Data URI
|
|
9502
|
-
* @param {Function} fFail Occurs if it doesn't support Data URI
|
|
9503
|
-
*/
|
|
9504
|
-
function _safeSetDataURI(fSuccess, fFail) {
|
|
9505
|
-
var self = this;
|
|
9506
|
-
self._fFail = fFail;
|
|
9507
|
-
self._fSuccess = fSuccess;
|
|
9508
|
-
|
|
9509
|
-
// Check it just once
|
|
9510
|
-
if (self._bSupportDataURI === null) {
|
|
9511
|
-
var el = document.createElement("img");
|
|
9512
|
-
var fOnError = function() {
|
|
9513
|
-
self._bSupportDataURI = false;
|
|
9514
|
-
|
|
9515
|
-
if (self._fFail) {
|
|
9516
|
-
self._fFail.call(self);
|
|
9517
|
-
}
|
|
9518
|
-
};
|
|
9519
|
-
var fOnSuccess = function() {
|
|
9520
|
-
self._bSupportDataURI = true;
|
|
9521
|
-
|
|
9522
|
-
if (self._fSuccess) {
|
|
9523
|
-
self._fSuccess.call(self);
|
|
9524
|
-
}
|
|
9525
|
-
};
|
|
9526
|
-
|
|
9527
|
-
el.onabort = fOnError;
|
|
9528
|
-
el.onerror = fOnError;
|
|
9529
|
-
el.onload = fOnSuccess;
|
|
9530
|
-
el.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="; // the Image contains 1px data.
|
|
9531
|
-
return;
|
|
9532
|
-
} else if (self._bSupportDataURI === true && self._fSuccess) {
|
|
9533
|
-
self._fSuccess.call(self);
|
|
9534
|
-
} else if (self._bSupportDataURI === false && self._fFail) {
|
|
9535
|
-
self._fFail.call(self);
|
|
9536
|
-
}
|
|
9537
|
-
};
|
|
9538
|
-
|
|
9539
|
-
/**
|
|
9540
|
-
* Drawing QRCode by using canvas
|
|
9541
|
-
*
|
|
9542
|
-
* @constructor
|
|
9543
|
-
* @param {HTMLElement} el
|
|
9544
|
-
* @param {Object} htOption QRCode Options
|
|
9545
|
-
*/
|
|
9546
|
-
var Drawing = function (el, htOption) {
|
|
9547
|
-
this._bIsPainted = false;
|
|
9548
|
-
this._android = _getAndroid();
|
|
9549
|
-
|
|
9550
|
-
this._htOption = htOption;
|
|
9551
|
-
this._elCanvas = document.createElement("canvas");
|
|
9552
|
-
this._elCanvas.width = htOption.width;
|
|
9553
|
-
this._elCanvas.height = htOption.height;
|
|
9554
|
-
el.appendChild(this._elCanvas);
|
|
9555
|
-
this._el = el;
|
|
9556
|
-
this._oContext = this._elCanvas.getContext("2d");
|
|
9557
|
-
this._bIsPainted = false;
|
|
9558
|
-
this._elImage = document.createElement("img");
|
|
9559
|
-
this._elImage.alt = "Scan me!";
|
|
9560
|
-
this._elImage.style.display = "none";
|
|
9561
|
-
this._el.appendChild(this._elImage);
|
|
9562
|
-
this._bSupportDataURI = null;
|
|
9563
|
-
};
|
|
9564
|
-
|
|
9565
|
-
/**
|
|
9566
|
-
* Draw the QRCode
|
|
9567
|
-
*
|
|
9568
|
-
* @param {QRCode} oQRCode
|
|
9569
|
-
*/
|
|
9570
|
-
Drawing.prototype.draw = function (oQRCode) {
|
|
9571
|
-
var _elImage = this._elImage;
|
|
9572
|
-
var _oContext = this._oContext;
|
|
9573
|
-
var _htOption = this._htOption;
|
|
9574
|
-
|
|
9575
|
-
var nCount = oQRCode.getModuleCount();
|
|
9576
|
-
var nWidth = _htOption.width / nCount;
|
|
9577
|
-
var nHeight = _htOption.height / nCount;
|
|
9578
|
-
var nRoundedWidth = Math.round(nWidth);
|
|
9579
|
-
var nRoundedHeight = Math.round(nHeight);
|
|
9580
|
-
|
|
9581
|
-
_elImage.style.display = "none";
|
|
9582
|
-
this.clear();
|
|
9583
|
-
|
|
9584
|
-
for (var row = 0; row < nCount; row++) {
|
|
9585
|
-
for (var col = 0; col < nCount; col++) {
|
|
9586
|
-
var bIsDark = oQRCode.isDark(row, col);
|
|
9587
|
-
var nLeft = col * nWidth;
|
|
9588
|
-
var nTop = row * nHeight;
|
|
9589
|
-
_oContext.strokeStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;
|
|
9590
|
-
_oContext.lineWidth = 1;
|
|
9591
|
-
_oContext.fillStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;
|
|
9592
|
-
_oContext.fillRect(nLeft, nTop, nWidth, nHeight);
|
|
9593
|
-
|
|
9594
|
-
// 안티 앨리어싱 방지 처리
|
|
9595
|
-
_oContext.strokeRect(
|
|
9596
|
-
Math.floor(nLeft) + 0.5,
|
|
9597
|
-
Math.floor(nTop) + 0.5,
|
|
9598
|
-
nRoundedWidth,
|
|
9599
|
-
nRoundedHeight
|
|
9600
|
-
);
|
|
9601
|
-
|
|
9602
|
-
_oContext.strokeRect(
|
|
9603
|
-
Math.ceil(nLeft) - 0.5,
|
|
9604
|
-
Math.ceil(nTop) - 0.5,
|
|
9605
|
-
nRoundedWidth,
|
|
9606
|
-
nRoundedHeight
|
|
9607
|
-
);
|
|
9608
|
-
}
|
|
9609
|
-
}
|
|
9610
|
-
|
|
9611
|
-
this._bIsPainted = true;
|
|
9612
|
-
};
|
|
9613
|
-
|
|
9614
|
-
/**
|
|
9615
|
-
* Make the image from Canvas if the browser supports Data URI.
|
|
9616
|
-
*/
|
|
9617
|
-
Drawing.prototype.makeImage = function () {
|
|
9618
|
-
if (this._bIsPainted) {
|
|
9619
|
-
_safeSetDataURI.call(this, _onMakeImage);
|
|
9620
|
-
}
|
|
9621
|
-
};
|
|
9622
|
-
|
|
9623
|
-
/**
|
|
9624
|
-
* Return whether the QRCode is painted or not
|
|
9625
|
-
*
|
|
9626
|
-
* @return {Boolean}
|
|
9627
|
-
*/
|
|
9628
|
-
Drawing.prototype.isPainted = function () {
|
|
9629
|
-
return this._bIsPainted;
|
|
9630
|
-
};
|
|
9631
|
-
|
|
9632
|
-
/**
|
|
9633
|
-
* Clear the QRCode
|
|
9634
|
-
*/
|
|
9635
|
-
Drawing.prototype.clear = function () {
|
|
9636
|
-
this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height);
|
|
9637
|
-
this._bIsPainted = false;
|
|
9638
|
-
};
|
|
9639
|
-
|
|
9640
|
-
/**
|
|
9641
|
-
* @private
|
|
9642
|
-
* @param {Number} nNumber
|
|
9643
|
-
*/
|
|
9644
|
-
Drawing.prototype.round = function (nNumber) {
|
|
9645
|
-
if (!nNumber) {
|
|
9646
|
-
return nNumber;
|
|
9647
|
-
}
|
|
9648
|
-
|
|
9649
|
-
return Math.floor(nNumber * 1000) / 1000;
|
|
9650
|
-
};
|
|
9651
|
-
|
|
9652
|
-
return Drawing;
|
|
9653
|
-
})();
|
|
9654
|
-
|
|
9655
|
-
/**
|
|
9656
|
-
* Get the type by string length
|
|
9657
|
-
*
|
|
9658
|
-
* @private
|
|
9659
|
-
* @param {String} sText
|
|
9660
|
-
* @param {Number} nCorrectLevel
|
|
9661
|
-
* @return {Number} type
|
|
9662
|
-
*/
|
|
9663
|
-
function _getTypeNumber(sText, nCorrectLevel) {
|
|
9664
|
-
var nType = 1;
|
|
9665
|
-
var length = _getUTF8Length(sText);
|
|
9666
|
-
|
|
9667
|
-
for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {
|
|
9668
|
-
var nLimit = 0;
|
|
9669
|
-
|
|
9670
|
-
switch (nCorrectLevel) {
|
|
9671
|
-
case QRErrorCorrectLevel.L :
|
|
9672
|
-
nLimit = QRCodeLimitLength[i][0];
|
|
9673
|
-
break;
|
|
9674
|
-
case QRErrorCorrectLevel.M :
|
|
9675
|
-
nLimit = QRCodeLimitLength[i][1];
|
|
9676
|
-
break;
|
|
9677
|
-
case QRErrorCorrectLevel.Q :
|
|
9678
|
-
nLimit = QRCodeLimitLength[i][2];
|
|
9679
|
-
break;
|
|
9680
|
-
case QRErrorCorrectLevel.H :
|
|
9681
|
-
nLimit = QRCodeLimitLength[i][3];
|
|
9682
|
-
break;
|
|
9683
|
-
}
|
|
9684
|
-
|
|
9685
|
-
if (length <= nLimit) {
|
|
9686
|
-
break;
|
|
9687
|
-
} else {
|
|
9688
|
-
nType++;
|
|
9689
|
-
}
|
|
9690
|
-
}
|
|
9691
|
-
|
|
9692
|
-
if (nType > QRCodeLimitLength.length) {
|
|
9693
|
-
throw new Error("Too long data");
|
|
9694
|
-
}
|
|
9695
|
-
|
|
9696
|
-
return nType;
|
|
9697
|
-
}
|
|
9698
|
-
|
|
9699
|
-
function _getUTF8Length(sText) {
|
|
9700
|
-
var replacedText = encodeURI(sText).toString().replace(/\%[0-9a-fA-F]{2}/g, 'a');
|
|
9701
|
-
return replacedText.length + (replacedText.length != sText ? 3 : 0);
|
|
9702
|
-
}
|
|
9703
|
-
|
|
9704
|
-
/**
|
|
9705
|
-
* @class QRCode
|
|
9706
|
-
* @constructor
|
|
9707
|
-
* @example
|
|
9708
|
-
* new QRCode(document.getElementById("test"), "http://jindo.dev.naver.com/collie");
|
|
9709
|
-
*
|
|
9710
|
-
* @example
|
|
9711
|
-
* var oQRCode = new QRCode("test", {
|
|
9712
|
-
* text : "http://naver.com",
|
|
9713
|
-
* width : 128,
|
|
9714
|
-
* height : 128
|
|
9715
|
-
* });
|
|
9716
|
-
*
|
|
9717
|
-
* oQRCode.clear(); // Clear the QRCode.
|
|
9718
|
-
* oQRCode.makeCode("http://map.naver.com"); // Re-create the QRCode.
|
|
9719
|
-
*
|
|
9720
|
-
* @param {HTMLElement|String} el target element or 'id' attribute of element.
|
|
9721
|
-
* @param {Object|String} vOption
|
|
9722
|
-
* @param {String} vOption.text QRCode link data
|
|
9723
|
-
* @param {Number} [vOption.width=256]
|
|
9724
|
-
* @param {Number} [vOption.height=256]
|
|
9725
|
-
* @param {String} [vOption.colorDark="#000000"]
|
|
9726
|
-
* @param {String} [vOption.colorLight="#ffffff"]
|
|
9727
|
-
* @param {QRCode.CorrectLevel} [vOption.correctLevel=QRCode.CorrectLevel.H] [L|M|Q|H]
|
|
9728
|
-
*/
|
|
9729
|
-
QRCode = function (el, vOption) {
|
|
9730
|
-
this._htOption = {
|
|
9731
|
-
width : 256,
|
|
9732
|
-
height : 256,
|
|
9733
|
-
typeNumber : 4,
|
|
9734
|
-
colorDark : "#000000",
|
|
9735
|
-
colorLight : "#ffffff",
|
|
9736
|
-
correctLevel : QRErrorCorrectLevel.H
|
|
9737
|
-
};
|
|
9738
|
-
|
|
9739
|
-
if (typeof vOption === 'string') {
|
|
9740
|
-
vOption = {
|
|
9741
|
-
text : vOption
|
|
9742
|
-
};
|
|
9743
|
-
}
|
|
9744
|
-
|
|
9745
|
-
// Overwrites options
|
|
9746
|
-
if (vOption) {
|
|
9747
|
-
for (var i in vOption) {
|
|
9748
|
-
this._htOption[i] = vOption[i];
|
|
9749
|
-
}
|
|
9750
|
-
}
|
|
9751
|
-
|
|
9752
|
-
if (typeof el == "string") {
|
|
9753
|
-
el = document.getElementById(el);
|
|
9754
|
-
}
|
|
9755
|
-
|
|
9756
|
-
if (this._htOption.useSVG) {
|
|
9757
|
-
Drawing = svgDrawer;
|
|
9758
|
-
}
|
|
9759
|
-
|
|
9760
|
-
this._android = _getAndroid();
|
|
9761
|
-
this._el = el;
|
|
9762
|
-
this._oQRCode = null;
|
|
9763
|
-
this._oDrawing = new Drawing(this._el, this._htOption);
|
|
9764
|
-
|
|
9765
|
-
if (this._htOption.text) {
|
|
9766
|
-
this.makeCode(this._htOption.text);
|
|
9767
|
-
}
|
|
9768
|
-
};
|
|
9769
|
-
|
|
9770
|
-
/**
|
|
9771
|
-
* Make the QRCode
|
|
9772
|
-
*
|
|
9773
|
-
* @param {String} sText link data
|
|
9774
|
-
*/
|
|
9775
|
-
QRCode.prototype.makeCode = function (sText) {
|
|
9776
|
-
this._oQRCode = new QRCodeModel(_getTypeNumber(sText, this._htOption.correctLevel), this._htOption.correctLevel);
|
|
9777
|
-
this._oQRCode.addData(sText);
|
|
9778
|
-
this._oQRCode.make();
|
|
9779
|
-
this._el.title = sText;
|
|
9780
|
-
this._oDrawing.draw(this._oQRCode);
|
|
9781
|
-
this.makeImage();
|
|
9782
|
-
};
|
|
9783
|
-
|
|
9784
|
-
/**
|
|
9785
|
-
* Make the Image from Canvas element
|
|
9786
|
-
* - It occurs automatically
|
|
9787
|
-
* - Android below 3 doesn't support Data-URI spec.
|
|
9788
|
-
*
|
|
9789
|
-
* @private
|
|
9790
|
-
*/
|
|
9791
|
-
QRCode.prototype.makeImage = function () {
|
|
9792
|
-
if (typeof this._oDrawing.makeImage == "function" && (!this._android || this._android >= 3)) {
|
|
9793
|
-
this._oDrawing.makeImage();
|
|
9794
|
-
}
|
|
9795
|
-
};
|
|
9796
|
-
|
|
9797
|
-
/**
|
|
9798
|
-
* Clear the QRCode
|
|
9799
|
-
*/
|
|
9800
|
-
QRCode.prototype.clear = function () {
|
|
9801
|
-
this._oDrawing.clear();
|
|
9802
|
-
};
|
|
9803
|
-
|
|
9804
|
-
/**
|
|
9805
|
-
* @name QRCode.CorrectLevel
|
|
9806
|
-
*/
|
|
9807
|
-
QRCode.CorrectLevel = QRErrorCorrectLevel;
|
|
9808
|
-
|
|
9809
|
-
return QRCode;
|
|
9810
|
-
|
|
9811
|
-
}));
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
9182
|
/***/ },
|
|
9815
9183
|
|
|
9816
9184
|
/***/ 9137
|
|
@@ -11137,6 +10505,9 @@ $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
|
|
|
11137
10505
|
/******/ return module.exports;
|
|
11138
10506
|
/******/ }
|
|
11139
10507
|
/******/
|
|
10508
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
10509
|
+
/******/ __webpack_require__.m = __webpack_modules__;
|
|
10510
|
+
/******/
|
|
11140
10511
|
/************************************************************************/
|
|
11141
10512
|
/******/ /* webpack/runtime/compat get default export */
|
|
11142
10513
|
/******/ (() => {
|
|
@@ -11150,6 +10521,36 @@ $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
|
|
|
11150
10521
|
/******/ };
|
|
11151
10522
|
/******/ })();
|
|
11152
10523
|
/******/
|
|
10524
|
+
/******/ /* webpack/runtime/create fake namespace object */
|
|
10525
|
+
/******/ (() => {
|
|
10526
|
+
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
|
|
10527
|
+
/******/ var leafPrototypes;
|
|
10528
|
+
/******/ // create a fake namespace object
|
|
10529
|
+
/******/ // mode & 1: value is a module id, require it
|
|
10530
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
10531
|
+
/******/ // mode & 4: return value when already ns object
|
|
10532
|
+
/******/ // mode & 16: return value when it's Promise-like
|
|
10533
|
+
/******/ // mode & 8|1: behave like require
|
|
10534
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
10535
|
+
/******/ if(mode & 1) value = this(value);
|
|
10536
|
+
/******/ if(mode & 8) return value;
|
|
10537
|
+
/******/ if(typeof value === 'object' && value) {
|
|
10538
|
+
/******/ if((mode & 4) && value.__esModule) return value;
|
|
10539
|
+
/******/ if((mode & 16) && typeof value.then === 'function') return value;
|
|
10540
|
+
/******/ }
|
|
10541
|
+
/******/ var ns = Object.create(null);
|
|
10542
|
+
/******/ __webpack_require__.r(ns);
|
|
10543
|
+
/******/ var def = {};
|
|
10544
|
+
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
|
10545
|
+
/******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
10546
|
+
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
|
|
10547
|
+
/******/ }
|
|
10548
|
+
/******/ def['default'] = () => (value);
|
|
10549
|
+
/******/ __webpack_require__.d(ns, def);
|
|
10550
|
+
/******/ return ns;
|
|
10551
|
+
/******/ };
|
|
10552
|
+
/******/ })();
|
|
10553
|
+
/******/
|
|
11153
10554
|
/******/ /* webpack/runtime/define property getters */
|
|
11154
10555
|
/******/ (() => {
|
|
11155
10556
|
/******/ // define getter functions for harmony exports
|
|
@@ -11162,6 +10563,37 @@ $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
|
|
|
11162
10563
|
/******/ };
|
|
11163
10564
|
/******/ })();
|
|
11164
10565
|
/******/
|
|
10566
|
+
/******/ /* webpack/runtime/ensure chunk */
|
|
10567
|
+
/******/ (() => {
|
|
10568
|
+
/******/ __webpack_require__.f = {};
|
|
10569
|
+
/******/ // This file contains only the entry chunk.
|
|
10570
|
+
/******/ // The chunk loading function for additional chunks
|
|
10571
|
+
/******/ __webpack_require__.e = (chunkId) => {
|
|
10572
|
+
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
|
|
10573
|
+
/******/ __webpack_require__.f[key](chunkId, promises);
|
|
10574
|
+
/******/ return promises;
|
|
10575
|
+
/******/ }, []));
|
|
10576
|
+
/******/ };
|
|
10577
|
+
/******/ })();
|
|
10578
|
+
/******/
|
|
10579
|
+
/******/ /* webpack/runtime/get javascript chunk filename */
|
|
10580
|
+
/******/ (() => {
|
|
10581
|
+
/******/ // This function allow to reference async chunks
|
|
10582
|
+
/******/ __webpack_require__.u = (chunkId) => {
|
|
10583
|
+
/******/ // return url for filenames based on template
|
|
10584
|
+
/******/ return "icve-sso-vue3.common." + chunkId + ".js";
|
|
10585
|
+
/******/ };
|
|
10586
|
+
/******/ })();
|
|
10587
|
+
/******/
|
|
10588
|
+
/******/ /* webpack/runtime/get mini-css chunk filename */
|
|
10589
|
+
/******/ (() => {
|
|
10590
|
+
/******/ // This function allow to reference async chunks
|
|
10591
|
+
/******/ __webpack_require__.miniCssF = (chunkId) => {
|
|
10592
|
+
/******/ // return url for filenames based on template
|
|
10593
|
+
/******/ return undefined;
|
|
10594
|
+
/******/ };
|
|
10595
|
+
/******/ })();
|
|
10596
|
+
/******/
|
|
11165
10597
|
/******/ /* webpack/runtime/global */
|
|
11166
10598
|
/******/ (() => {
|
|
11167
10599
|
/******/ __webpack_require__.g = (function() {
|
|
@@ -11179,6 +10611,51 @@ $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
|
|
|
11179
10611
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
11180
10612
|
/******/ })();
|
|
11181
10613
|
/******/
|
|
10614
|
+
/******/ /* webpack/runtime/load script */
|
|
10615
|
+
/******/ (() => {
|
|
10616
|
+
/******/ var inProgress = {};
|
|
10617
|
+
/******/ var dataWebpackPrefix = "icve-sso-vue3:";
|
|
10618
|
+
/******/ // loadScript function to load a script via script tag
|
|
10619
|
+
/******/ __webpack_require__.l = (url, done, key, chunkId) => {
|
|
10620
|
+
/******/ if(inProgress[url]) { inProgress[url].push(done); return; }
|
|
10621
|
+
/******/ var script, needAttach;
|
|
10622
|
+
/******/ if(key !== undefined) {
|
|
10623
|
+
/******/ var scripts = document.getElementsByTagName("script");
|
|
10624
|
+
/******/ for(var i = 0; i < scripts.length; i++) {
|
|
10625
|
+
/******/ var s = scripts[i];
|
|
10626
|
+
/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
|
|
10627
|
+
/******/ }
|
|
10628
|
+
/******/ }
|
|
10629
|
+
/******/ if(!script) {
|
|
10630
|
+
/******/ needAttach = true;
|
|
10631
|
+
/******/ script = document.createElement('script');
|
|
10632
|
+
/******/
|
|
10633
|
+
/******/ script.charset = 'utf-8';
|
|
10634
|
+
/******/ if (__webpack_require__.nc) {
|
|
10635
|
+
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
|
10636
|
+
/******/ }
|
|
10637
|
+
/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
|
|
10638
|
+
/******/
|
|
10639
|
+
/******/ script.src = url;
|
|
10640
|
+
/******/ }
|
|
10641
|
+
/******/ inProgress[url] = [done];
|
|
10642
|
+
/******/ var onScriptComplete = (prev, event) => {
|
|
10643
|
+
/******/ // avoid mem leaks in IE.
|
|
10644
|
+
/******/ script.onerror = script.onload = null;
|
|
10645
|
+
/******/ clearTimeout(timeout);
|
|
10646
|
+
/******/ var doneFns = inProgress[url];
|
|
10647
|
+
/******/ delete inProgress[url];
|
|
10648
|
+
/******/ script.parentNode && script.parentNode.removeChild(script);
|
|
10649
|
+
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
|
|
10650
|
+
/******/ if(prev) return prev(event);
|
|
10651
|
+
/******/ }
|
|
10652
|
+
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
|
|
10653
|
+
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
|
|
10654
|
+
/******/ script.onload = onScriptComplete.bind(null, script.onload);
|
|
10655
|
+
/******/ needAttach && document.head.appendChild(script);
|
|
10656
|
+
/******/ };
|
|
10657
|
+
/******/ })();
|
|
10658
|
+
/******/
|
|
11182
10659
|
/******/ /* webpack/runtime/make namespace object */
|
|
11183
10660
|
/******/ (() => {
|
|
11184
10661
|
/******/ // define __esModule on exports
|
|
@@ -11195,6 +10672,96 @@ $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
|
|
|
11195
10672
|
/******/ __webpack_require__.p = "";
|
|
11196
10673
|
/******/ })();
|
|
11197
10674
|
/******/
|
|
10675
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
10676
|
+
/******/ (() => {
|
|
10677
|
+
/******/ // no baseURI
|
|
10678
|
+
/******/
|
|
10679
|
+
/******/ // object to store loaded and loading chunks
|
|
10680
|
+
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
10681
|
+
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
10682
|
+
/******/ var installedChunks = {
|
|
10683
|
+
/******/ 729: 0
|
|
10684
|
+
/******/ };
|
|
10685
|
+
/******/
|
|
10686
|
+
/******/ __webpack_require__.f.j = (chunkId, promises) => {
|
|
10687
|
+
/******/ // JSONP chunk loading for javascript
|
|
10688
|
+
/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
|
|
10689
|
+
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
|
|
10690
|
+
/******/
|
|
10691
|
+
/******/ // a Promise means "currently loading".
|
|
10692
|
+
/******/ if(installedChunkData) {
|
|
10693
|
+
/******/ promises.push(installedChunkData[2]);
|
|
10694
|
+
/******/ } else {
|
|
10695
|
+
/******/ if(true) { // all chunks have JS
|
|
10696
|
+
/******/ // setup Promise in chunk cache
|
|
10697
|
+
/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
|
|
10698
|
+
/******/ promises.push(installedChunkData[2] = promise);
|
|
10699
|
+
/******/
|
|
10700
|
+
/******/ // start chunk loading
|
|
10701
|
+
/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
|
|
10702
|
+
/******/ // create error before stack unwound to get useful stacktrace later
|
|
10703
|
+
/******/ var error = new Error();
|
|
10704
|
+
/******/ var loadingEnded = (event) => {
|
|
10705
|
+
/******/ if(__webpack_require__.o(installedChunks, chunkId)) {
|
|
10706
|
+
/******/ installedChunkData = installedChunks[chunkId];
|
|
10707
|
+
/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
|
|
10708
|
+
/******/ if(installedChunkData) {
|
|
10709
|
+
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
|
10710
|
+
/******/ var realSrc = event && event.target && event.target.src;
|
|
10711
|
+
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
|
|
10712
|
+
/******/ error.name = 'ChunkLoadError';
|
|
10713
|
+
/******/ error.type = errorType;
|
|
10714
|
+
/******/ error.request = realSrc;
|
|
10715
|
+
/******/ installedChunkData[1](error);
|
|
10716
|
+
/******/ }
|
|
10717
|
+
/******/ }
|
|
10718
|
+
/******/ };
|
|
10719
|
+
/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
|
|
10720
|
+
/******/ }
|
|
10721
|
+
/******/ }
|
|
10722
|
+
/******/ }
|
|
10723
|
+
/******/ };
|
|
10724
|
+
/******/
|
|
10725
|
+
/******/ // no prefetching
|
|
10726
|
+
/******/
|
|
10727
|
+
/******/ // no preloaded
|
|
10728
|
+
/******/
|
|
10729
|
+
/******/ // no HMR
|
|
10730
|
+
/******/
|
|
10731
|
+
/******/ // no HMR manifest
|
|
10732
|
+
/******/
|
|
10733
|
+
/******/ // no on chunks loaded
|
|
10734
|
+
/******/
|
|
10735
|
+
/******/ // install a JSONP callback for chunk loading
|
|
10736
|
+
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
|
10737
|
+
/******/ var [chunkIds, moreModules, runtime] = data;
|
|
10738
|
+
/******/ // add "moreModules" to the modules object,
|
|
10739
|
+
/******/ // then flag all "chunkIds" as loaded and fire callback
|
|
10740
|
+
/******/ var moduleId, chunkId, i = 0;
|
|
10741
|
+
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
|
10742
|
+
/******/ for(moduleId in moreModules) {
|
|
10743
|
+
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
|
10744
|
+
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
10745
|
+
/******/ }
|
|
10746
|
+
/******/ }
|
|
10747
|
+
/******/ if(runtime) var result = runtime(__webpack_require__);
|
|
10748
|
+
/******/ }
|
|
10749
|
+
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
|
10750
|
+
/******/ for(;i < chunkIds.length; i++) {
|
|
10751
|
+
/******/ chunkId = chunkIds[i];
|
|
10752
|
+
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
10753
|
+
/******/ installedChunks[chunkId][0]();
|
|
10754
|
+
/******/ }
|
|
10755
|
+
/******/ installedChunks[chunkId] = 0;
|
|
10756
|
+
/******/ }
|
|
10757
|
+
/******/
|
|
10758
|
+
/******/ }
|
|
10759
|
+
/******/
|
|
10760
|
+
/******/ var chunkLoadingGlobal = (typeof self !== 'undefined' ? self : this)["webpackChunkicve_sso_vue3"] = (typeof self !== 'undefined' ? self : this)["webpackChunkicve_sso_vue3"] || [];
|
|
10761
|
+
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
10762
|
+
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
10763
|
+
/******/ })();
|
|
10764
|
+
/******/
|
|
11198
10765
|
/************************************************************************/
|
|
11199
10766
|
var __webpack_exports__ = {};
|
|
11200
10767
|
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
|
|
@@ -11235,7 +10802,7 @@ var es_array_concat = __webpack_require__(8706);
|
|
|
11235
10802
|
var es_function_name = __webpack_require__(2010);
|
|
11236
10803
|
;// external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
11237
10804
|
const external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject = require("vue");
|
|
11238
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/userCenterCompleteInformation.vue?vue&type=template&id=
|
|
10805
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/userCenterCompleteInformation.vue?vue&type=template&id=9ec3e7ae&scoped=true
|
|
11239
10806
|
|
|
11240
10807
|
|
|
11241
10808
|
|
|
@@ -11523,7 +11090,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11523
11090
|
})
|
|
11524
11091
|
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)($data.defaultLang ? '提交' : 'Submit'), 1)])])])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true);
|
|
11525
11092
|
}
|
|
11526
|
-
;// ./src/components/userCenterCompleteInformation.vue?vue&type=template&id=
|
|
11093
|
+
;// ./src/components/userCenterCompleteInformation.vue?vue&type=template&id=9ec3e7ae&scoped=true
|
|
11527
11094
|
|
|
11528
11095
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
|
|
11529
11096
|
var es_array_includes = __webpack_require__(4423);
|
|
@@ -30414,7 +29981,7 @@ request_request.interceptors.request.use(function (config) {
|
|
|
30414
29981
|
// if (getToken()) {
|
|
30415
29982
|
// config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
|
30416
29983
|
// }
|
|
30417
|
-
if (sessionStorage.getItem('environment') === 'test') {
|
|
29984
|
+
if (typeof sessionStorage !== 'undefined' && sessionStorage.getItem('environment') === 'test') {
|
|
30418
29985
|
// config.url = 'http://192.168.130.128:9101' + config.url
|
|
30419
29986
|
config.url = 'https://testssov2.icve.com.cn/prod-api' + config.url;
|
|
30420
29987
|
} else {
|
|
@@ -30744,12 +30311,18 @@ var api = init(defaultConverter, { path: '/' });
|
|
|
30744
30311
|
//获取用户信息
|
|
30745
30312
|
this.getUserInfo();
|
|
30746
30313
|
this.getNationList();
|
|
30747
|
-
// 添加键盘事件监听
|
|
30748
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
30749
30314
|
},
|
|
30750
|
-
|
|
30751
|
-
//
|
|
30752
|
-
document
|
|
30315
|
+
mounted: function mounted() {
|
|
30316
|
+
// 添加键盘事件监听(确保在浏览器环境中)
|
|
30317
|
+
if (typeof document !== 'undefined') {
|
|
30318
|
+
document.addEventListener('keydown', this.handleKeyDown);
|
|
30319
|
+
}
|
|
30320
|
+
},
|
|
30321
|
+
beforeUnmount: function beforeUnmount() {
|
|
30322
|
+
// 移除键盘事件监听(确保在浏览器环境中)
|
|
30323
|
+
if (typeof document !== 'undefined') {
|
|
30324
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
30325
|
+
}
|
|
30753
30326
|
},
|
|
30754
30327
|
computed: {
|
|
30755
30328
|
// 用户类型选项,支持自定义传递
|
|
@@ -30765,7 +30338,10 @@ var api = init(defaultConverter, { path: '/' });
|
|
|
30765
30338
|
return this.language === 'cn';
|
|
30766
30339
|
}
|
|
30767
30340
|
|
|
30768
|
-
//
|
|
30341
|
+
// 获取浏览器语言(确保在浏览器环境中)
|
|
30342
|
+
if (typeof navigator === 'undefined') {
|
|
30343
|
+
return true; // 默认返回中文
|
|
30344
|
+
}
|
|
30769
30345
|
var browserLang = navigator.language || navigator.userLanguage || navigator.browserLanguage;
|
|
30770
30346
|
|
|
30771
30347
|
// 检查是否为中文语言
|
|
@@ -30888,10 +30464,10 @@ var api = init(defaultConverter, { path: '/' });
|
|
|
30888
30464
|
});
|
|
30889
30465
|
;// ./src/components/userCenterCompleteInformation.vue?vue&type=script&lang=js
|
|
30890
30466
|
|
|
30891
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/userCenterCompleteInformation.vue?vue&type=style&index=0&id=
|
|
30467
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/userCenterCompleteInformation.vue?vue&type=style&index=0&id=9ec3e7ae&lang=scss&scoped=true
|
|
30892
30468
|
// extracted by mini-css-extract-plugin
|
|
30893
30469
|
|
|
30894
|
-
;// ./src/components/userCenterCompleteInformation.vue?vue&type=style&index=0&id=
|
|
30470
|
+
;// ./src/components/userCenterCompleteInformation.vue?vue&type=style&index=0&id=9ec3e7ae&lang=scss&scoped=true
|
|
30895
30471
|
|
|
30896
30472
|
// EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
|
|
30897
30473
|
var exportHelper = __webpack_require__(6262);
|
|
@@ -30903,7 +30479,7 @@ var exportHelper = __webpack_require__(6262);
|
|
|
30903
30479
|
;
|
|
30904
30480
|
|
|
30905
30481
|
|
|
30906
|
-
const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.A)(userCenterCompleteInformationvue_type_script_lang_js, [['render',render],['__scopeId',"data-v-
|
|
30482
|
+
const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.A)(userCenterCompleteInformationvue_type_script_lang_js, [['render',render],['__scopeId',"data-v-9ec3e7ae"]])
|
|
30907
30483
|
|
|
30908
30484
|
/* harmony default export */ const userCenterCompleteInformation = (__exports__);
|
|
30909
30485
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.is-array.js
|
|
@@ -32028,7 +31604,7 @@ var messages = {
|
|
|
32028
31604
|
|
|
32029
31605
|
// 创建一个响应式的状态对象
|
|
32030
31606
|
var state = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.reactive)({
|
|
32031
|
-
locale: localStorage.getItem('language') || 'cn'
|
|
31607
|
+
locale: typeof localStorage !== 'undefined' && localStorage.getItem('language') || 'cn'
|
|
32032
31608
|
});
|
|
32033
31609
|
|
|
32034
31610
|
// 简单的国际化工具类
|
|
@@ -32051,7 +31627,9 @@ var SimpleI18n = /*#__PURE__*/function () {
|
|
|
32051
31627
|
set: function set(val) {
|
|
32052
31628
|
if (this.messages[val]) {
|
|
32053
31629
|
this.state.locale = val;
|
|
32054
|
-
localStorage
|
|
31630
|
+
if (typeof localStorage !== 'undefined') {
|
|
31631
|
+
localStorage.setItem('language', val);
|
|
31632
|
+
}
|
|
32055
31633
|
} else {
|
|
32056
31634
|
console.warn("Locale ".concat(val, " not found"));
|
|
32057
31635
|
}
|
|
@@ -33101,70 +32679,67 @@ const AliyunCaptchaModal_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)
|
|
|
33101
32679
|
const verifyComponents_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(verifyComponentsvue_type_script_lang_js, [['render',verifyComponentsvue_type_template_id_7d804fae_render]])
|
|
33102
32680
|
|
|
33103
32681
|
/* harmony default export */ const verifyComponents = (verifyComponents_exports_);
|
|
33104
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/QRCodeLogin.vue?vue&type=template&id=
|
|
32682
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/QRCodeLogin.vue?vue&type=template&id=1469993e&scoped=true
|
|
33105
32683
|
|
|
33106
|
-
var
|
|
32684
|
+
var QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_1 = {
|
|
33107
32685
|
"class": "qr-code-wrapper"
|
|
33108
32686
|
};
|
|
33109
|
-
var
|
|
33110
|
-
var
|
|
32687
|
+
var QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_2 = ["id"];
|
|
32688
|
+
var QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_3 = {
|
|
33111
32689
|
key: 0,
|
|
33112
32690
|
"class": "qr-login-overlay"
|
|
33113
32691
|
};
|
|
33114
|
-
var
|
|
32692
|
+
var QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_4 = {
|
|
33115
32693
|
key: 0,
|
|
33116
32694
|
"class": "overlay-content"
|
|
33117
32695
|
};
|
|
33118
|
-
var
|
|
32696
|
+
var QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_5 = {
|
|
33119
32697
|
"class": "overlay-text"
|
|
33120
32698
|
};
|
|
33121
|
-
var
|
|
32699
|
+
var QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_6 = {
|
|
33122
32700
|
"class": "overlay-tip"
|
|
33123
32701
|
};
|
|
33124
|
-
var
|
|
32702
|
+
var QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_7 = {
|
|
33125
32703
|
key: 1,
|
|
33126
32704
|
"class": "overlay-content"
|
|
33127
32705
|
};
|
|
33128
|
-
var
|
|
32706
|
+
var QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_8 = {
|
|
33129
32707
|
"class": "overlay-text",
|
|
33130
32708
|
style: {
|
|
33131
32709
|
"color": "red"
|
|
33132
32710
|
}
|
|
33133
32711
|
};
|
|
33134
|
-
var
|
|
32712
|
+
var QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_9 = {
|
|
33135
32713
|
"class": "overlay-tip"
|
|
33136
32714
|
};
|
|
33137
|
-
var
|
|
32715
|
+
var QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_10 = {
|
|
33138
32716
|
"class": "qr-tip"
|
|
33139
32717
|
};
|
|
33140
|
-
var
|
|
32718
|
+
var QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_11 = {
|
|
33141
32719
|
key: 0,
|
|
33142
32720
|
"class": "bind-tip"
|
|
33143
32721
|
};
|
|
33144
|
-
function
|
|
32722
|
+
function QRCodeLoginvue_type_template_id_1469993e_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
33145
32723
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", {
|
|
33146
32724
|
"class": (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)(["qr-login-container", {
|
|
33147
32725
|
'qr-login-container1': $props.bdwxShow
|
|
33148
32726
|
}])
|
|
33149
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div",
|
|
32727
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", {
|
|
33150
32728
|
id: "qrcode-container-".concat($data.uniqueId)
|
|
33151
|
-
}, null, 8,
|
|
32729
|
+
}, null, 8, QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_2), $data.loginStatus == 1 || $data.loginStatus == 3 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_3, [$data.loginStatus == 1 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_4, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p", QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_5, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('已扫码')), 1), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p", QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_6, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('请在手机上确认')), 1), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("button", {
|
|
33152
32730
|
"class": "rescan-btn",
|
|
33153
32731
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
33154
32732
|
return $options.handleRescanQrCode && $options.handleRescanQrCode.apply($options, arguments);
|
|
33155
32733
|
})
|
|
33156
|
-
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('重新扫码')), 1)])) : $data.loginStatus == 3 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div",
|
|
32734
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('重新扫码')), 1)])) : $data.loginStatus == 3 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_7, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p", QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_8, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('二维码已过期')), 1), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p", QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_9, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('请点击下方按钮刷新')), 1), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("button", {
|
|
33157
32735
|
"class": "rescan-btn",
|
|
33158
32736
|
onClick: _cache[1] || (_cache[1] = function () {
|
|
33159
32737
|
return $options.handleRescanQrCode && $options.handleRescanQrCode.apply($options, arguments);
|
|
33160
32738
|
})
|
|
33161
|
-
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('重新生成')), 1)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p",
|
|
32739
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('重新生成')), 1)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p", QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)($props.bdwxShow ? _ctx.i18n('微信扫码进行账号绑定') : _ctx.i18n('微信或App扫码均可登录')), 1), $data.wxRandom ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", QRCodeLoginvue_type_template_id_1469993e_scoped_true_hoisted_11, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('你当前的微信暂未绑定账号或手机号,需先完成绑定,后续登录将无需重复验证,直接进入即可~')), 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)], 2);
|
|
33162
32740
|
}
|
|
33163
|
-
;// ./src/components/QRCodeLogin.vue?vue&type=template&id=
|
|
32741
|
+
;// ./src/components/QRCodeLogin.vue?vue&type=template&id=1469993e&scoped=true
|
|
33164
32742
|
|
|
33165
|
-
// EXTERNAL MODULE: ./node_modules/qrcodejs2/qrcode.js
|
|
33166
|
-
var qrcode = __webpack_require__(9118);
|
|
33167
|
-
var qrcode_default = /*#__PURE__*/__webpack_require__.n(qrcode);
|
|
33168
32743
|
;// ./src/utils/auth.js
|
|
33169
32744
|
|
|
33170
32745
|
var TokenKey = 'token';
|
|
@@ -33188,6 +32763,11 @@ function removeToken() {
|
|
|
33188
32763
|
|
|
33189
32764
|
|
|
33190
32765
|
|
|
32766
|
+
|
|
32767
|
+
|
|
32768
|
+
|
|
32769
|
+
|
|
32770
|
+
|
|
33191
32771
|
/* harmony default export */ const QRCodeLoginvue_type_script_lang_js = ({
|
|
33192
32772
|
mixins: [i18nMixin],
|
|
33193
32773
|
props: {
|
|
@@ -33209,7 +32789,9 @@ function removeToken() {
|
|
|
33209
32789
|
loginStatus: 0,
|
|
33210
32790
|
// 0-未扫码, 1-已扫码待确认, 2-登录成功, 3-过期
|
|
33211
32791
|
wxRandom: '',
|
|
33212
|
-
uniqueId: ''
|
|
32792
|
+
uniqueId: '',
|
|
32793
|
+
// Vue 3 兼容的唯一ID
|
|
32794
|
+
QRCode: null // 动态加载的 QRCode 库
|
|
33213
32795
|
};
|
|
33214
32796
|
},
|
|
33215
32797
|
mounted: function mounted() {
|
|
@@ -33220,64 +32802,135 @@ function removeToken() {
|
|
|
33220
32802
|
this.clearTimers();
|
|
33221
32803
|
},
|
|
33222
32804
|
methods: {
|
|
32805
|
+
// 动态加载 QRCode 库
|
|
32806
|
+
loadQRCode: function loadQRCode() {
|
|
32807
|
+
var _this = this;
|
|
32808
|
+
return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
32809
|
+
var qrcodeModule;
|
|
32810
|
+
return _regenerator().w(function (_context) {
|
|
32811
|
+
while (1) switch (_context.n) {
|
|
32812
|
+
case 0:
|
|
32813
|
+
if (_this.QRCode) {
|
|
32814
|
+
_context.n = 2;
|
|
32815
|
+
break;
|
|
32816
|
+
}
|
|
32817
|
+
_context.n = 1;
|
|
32818
|
+
return __webpack_require__.e(/* import() */ 118).then(__webpack_require__.t.bind(__webpack_require__, 9118, 23));
|
|
32819
|
+
case 1:
|
|
32820
|
+
qrcodeModule = _context.v;
|
|
32821
|
+
_this.QRCode = qrcodeModule["default"] || qrcodeModule;
|
|
32822
|
+
case 2:
|
|
32823
|
+
return _context.a(2, _this.QRCode);
|
|
32824
|
+
}
|
|
32825
|
+
}, _callee);
|
|
32826
|
+
}))();
|
|
32827
|
+
},
|
|
33223
32828
|
// 生成二维码
|
|
33224
32829
|
generateQrCode: function generateQrCode() {
|
|
33225
|
-
var
|
|
33226
|
-
|
|
33227
|
-
|
|
33228
|
-
|
|
33229
|
-
|
|
33230
|
-
|
|
33231
|
-
|
|
33232
|
-
|
|
33233
|
-
|
|
33234
|
-
|
|
33235
|
-
|
|
33236
|
-
|
|
33237
|
-
|
|
33238
|
-
|
|
33239
|
-
|
|
33240
|
-
|
|
33241
|
-
|
|
33242
|
-
|
|
33243
|
-
|
|
32830
|
+
var _this2 = this;
|
|
32831
|
+
return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
32832
|
+
return _regenerator().w(function (_context3) {
|
|
32833
|
+
while (1) switch (_context3.n) {
|
|
32834
|
+
case 0:
|
|
32835
|
+
_this2.loading = true;
|
|
32836
|
+
_this2.error = '';
|
|
32837
|
+
login_generateQrCode().then(/*#__PURE__*/function () {
|
|
32838
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(_ref) {
|
|
32839
|
+
var data;
|
|
32840
|
+
return _regenerator().w(function (_context2) {
|
|
32841
|
+
while (1) switch (_context2.n) {
|
|
32842
|
+
case 0:
|
|
32843
|
+
data = _ref.data;
|
|
32844
|
+
_this2.loading = false;
|
|
32845
|
+
// this.qrCodeUrl = data.data.qrCodeUrl;
|
|
32846
|
+
_context2.n = 1;
|
|
32847
|
+
return _this2.generateQRCode(data.data.qrUrl);
|
|
32848
|
+
case 1:
|
|
32849
|
+
_this2.sceneId = data.data.sceneId;
|
|
32850
|
+
_this2.expireTime = data.data.expireTime;
|
|
32851
|
+
// 启动轮询检查登录状态
|
|
32852
|
+
_this2.startPolling();
|
|
32853
|
+
// 启动过期倒计时
|
|
32854
|
+
_this2.startCountdown();
|
|
32855
|
+
case 2:
|
|
32856
|
+
return _context2.a(2);
|
|
32857
|
+
}
|
|
32858
|
+
}, _callee2);
|
|
32859
|
+
}));
|
|
32860
|
+
return function (_x) {
|
|
32861
|
+
return _ref2.apply(this, arguments);
|
|
32862
|
+
};
|
|
32863
|
+
}())["catch"](function (err) {
|
|
32864
|
+
_this2.loading = false;
|
|
32865
|
+
_this2.error = '生成二维码失败,请重试';
|
|
32866
|
+
console.error(err);
|
|
32867
|
+
});
|
|
32868
|
+
case 1:
|
|
32869
|
+
return _context3.a(2);
|
|
32870
|
+
}
|
|
32871
|
+
}, _callee3);
|
|
32872
|
+
}))();
|
|
33244
32873
|
},
|
|
33245
32874
|
generateQRCode: function generateQRCode(url) {
|
|
33246
|
-
var
|
|
33247
|
-
|
|
33248
|
-
|
|
33249
|
-
|
|
33250
|
-
|
|
33251
|
-
|
|
33252
|
-
|
|
33253
|
-
|
|
33254
|
-
|
|
33255
|
-
|
|
33256
|
-
|
|
33257
|
-
|
|
33258
|
-
|
|
33259
|
-
|
|
33260
|
-
|
|
33261
|
-
|
|
32875
|
+
var _this3 = this;
|
|
32876
|
+
return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
|
|
32877
|
+
var containerId, container, QRCode;
|
|
32878
|
+
return _regenerator().w(function (_context4) {
|
|
32879
|
+
while (1) switch (_context4.n) {
|
|
32880
|
+
case 0:
|
|
32881
|
+
containerId = "qrcode-container-".concat(_this3.uniqueId);
|
|
32882
|
+
container = document.getElementById(containerId);
|
|
32883
|
+
if (container) {
|
|
32884
|
+
_context4.n = 1;
|
|
32885
|
+
break;
|
|
32886
|
+
}
|
|
32887
|
+
return _context4.a(2);
|
|
32888
|
+
case 1:
|
|
32889
|
+
container.innerHTML = '';
|
|
32890
|
+
|
|
32891
|
+
// 动态加载 QRCode 库
|
|
32892
|
+
_context4.n = 2;
|
|
32893
|
+
return _this3.loadQRCode();
|
|
32894
|
+
case 2:
|
|
32895
|
+
QRCode = _context4.v;
|
|
32896
|
+
// 创建新的二维码实例
|
|
32897
|
+
new QRCode(container, {
|
|
32898
|
+
text: url,
|
|
32899
|
+
// 二维码内容(链接)
|
|
32900
|
+
width: 240,
|
|
32901
|
+
// 宽度
|
|
32902
|
+
height: 240,
|
|
32903
|
+
// 高度
|
|
32904
|
+
colorDark: '#000000',
|
|
32905
|
+
// 前景色
|
|
32906
|
+
colorLight: '#ffffff',
|
|
32907
|
+
// 背景色
|
|
32908
|
+
correctLevel: QRCode.CorrectLevel.H // 容错级别
|
|
32909
|
+
});
|
|
32910
|
+
case 3:
|
|
32911
|
+
return _context4.a(2);
|
|
32912
|
+
}
|
|
32913
|
+
}, _callee4);
|
|
32914
|
+
}))();
|
|
33262
32915
|
},
|
|
33263
32916
|
// 轮询检查登录状态
|
|
33264
32917
|
startPolling: function startPolling() {
|
|
33265
|
-
var
|
|
32918
|
+
var _this4 = this;
|
|
33266
32919
|
this.pollTimer = setInterval(function () {
|
|
33267
|
-
checkCodeStatus(
|
|
32920
|
+
checkCodeStatus(_this4.sceneId).then(function (res) {
|
|
33268
32921
|
var status = res.data.data.status;
|
|
33269
32922
|
if (status === 1) {
|
|
33270
32923
|
// 登录中,更新状态为已扫码
|
|
33271
|
-
|
|
32924
|
+
_this4.loginStatus = status;
|
|
33272
32925
|
} else if (status === 2) {
|
|
33273
32926
|
// 登录成功,存储token并跳转
|
|
33274
|
-
|
|
33275
|
-
|
|
33276
|
-
|
|
32927
|
+
_this4.$emit('loginSuccess', res.data.data);
|
|
32928
|
+
_this4.wxRandom = res.data.data.wxRandom;
|
|
32929
|
+
_this4.clearTimers();
|
|
33277
32930
|
} else if (status === 3) {
|
|
33278
32931
|
// 二维码过期,停止轮询并显示提示
|
|
33279
|
-
|
|
33280
|
-
|
|
32932
|
+
_this4.loginStatus = 3;
|
|
32933
|
+
_this4.clearTimers();
|
|
33281
32934
|
}
|
|
33282
32935
|
// 其他状态(扫描未确认)不处理
|
|
33283
32936
|
})["catch"](function (err) {
|
|
@@ -33287,12 +32940,12 @@ function removeToken() {
|
|
|
33287
32940
|
},
|
|
33288
32941
|
// 倒计时
|
|
33289
32942
|
startCountdown: function startCountdown() {
|
|
33290
|
-
var
|
|
32943
|
+
var _this5 = this;
|
|
33291
32944
|
this.statusTimer = setInterval(function () {
|
|
33292
|
-
|
|
33293
|
-
if (
|
|
33294
|
-
|
|
33295
|
-
|
|
32945
|
+
_this5.expireTime--;
|
|
32946
|
+
if (_this5.expireTime <= 0) {
|
|
32947
|
+
_this5.loginStatus = 3; // 设置为过期状态
|
|
32948
|
+
_this5.clearTimers();
|
|
33296
32949
|
}
|
|
33297
32950
|
}, 1000);
|
|
33298
32951
|
},
|
|
@@ -33310,10 +32963,10 @@ function removeToken() {
|
|
|
33310
32963
|
});
|
|
33311
32964
|
;// ./src/components/QRCodeLogin.vue?vue&type=script&lang=js
|
|
33312
32965
|
|
|
33313
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/QRCodeLogin.vue?vue&type=style&index=0&id=
|
|
32966
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/QRCodeLogin.vue?vue&type=style&index=0&id=1469993e&lang=scss&scoped=true
|
|
33314
32967
|
// extracted by mini-css-extract-plugin
|
|
33315
32968
|
|
|
33316
|
-
;// ./src/components/QRCodeLogin.vue?vue&type=style&index=0&id=
|
|
32969
|
+
;// ./src/components/QRCodeLogin.vue?vue&type=style&index=0&id=1469993e&lang=scss&scoped=true
|
|
33317
32970
|
|
|
33318
32971
|
;// ./src/components/QRCodeLogin.vue
|
|
33319
32972
|
|
|
@@ -33323,7 +32976,7 @@ function removeToken() {
|
|
|
33323
32976
|
;
|
|
33324
32977
|
|
|
33325
32978
|
|
|
33326
|
-
const QRCodeLogin_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(QRCodeLoginvue_type_script_lang_js, [['render',
|
|
32979
|
+
const QRCodeLogin_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(QRCodeLoginvue_type_script_lang_js, [['render',QRCodeLoginvue_type_template_id_1469993e_scoped_true_render],['__scopeId',"data-v-1469993e"]])
|
|
33327
32980
|
|
|
33328
32981
|
/* harmony default export */ const QRCodeLogin = (QRCodeLogin_exports_);
|
|
33329
32982
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/mobileBinding.vue?vue&type=template&id=3371c604&scoped=true
|