lhl 1 year ago
parent
commit
f5ab14a782

+ 4 - 0
.hbuilderx/launch.json

@@ -2,6 +2,10 @@
   // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
     "version": "0.0",
     "configurations": [{
+     	"app-plus" : 
+     	{
+     		"launchtype" : "remote"
+     	},
      	"default" : 
      	{
      		"launchtype" : "remote"

+ 9 - 0
api/index.js

@@ -41,3 +41,12 @@ export function enroll(data) {
 		data
 	});
 }
+
+//普通商品核销
+export function orderVerific(data) {
+	return request({
+		url: '/api/order/order_verific',
+		method: 'post',
+		data
+	});
+}

+ 7 - 1
api/order.js

@@ -144,4 +144,10 @@ export function computedOrderkey(data) {
 	});
 }
 
-
+export function storeList(data) {
+	return request({
+		url: '/api/store_list',
+		method: 'get',
+		data
+	});
+}

BIN
baseInfo/7131.keystore


BIN
baseInfo/logo.png


+ 4 - 0
baseInfo/证书信息.txt

@@ -0,0 +1,4 @@
+安卓
+包名:com.jlxnykj.inc
+别名:7131.inc
+秘钥:112233

+ 279 - 0
components/hs-scancode.nvue

@@ -0,0 +1,279 @@
+<template>
+	<view class="page" :style="{height: height+'px'}" v-if="onlyFromCamera">
+		<barcode :style="{height: height+'px'}" id="hs-scan" class="barcode" ref="barcode" autostart
+			frameColor="#0cff00" scanbarColor="#0cff00" background="#000000" :filters="fil" @marked="success"
+			@error="error">
+		</barcode>
+		<view @click="back" class="back" hover-class="css-hover">
+			<image :src="scan_img.back" style="width: 28px;height: 28px;"></image>
+		</view>
+		<text class="msg">{{msg}}</text>
+		<view class="flash" :style="{bottom: (height/2 - 120)+'px'}" @click="toFlash()" hover-class="css-hover">
+			<image class="flash-img" :src="flash_img" style="width: 30px;height: 30px;"></image>
+			<text class="flash-text" :class="flash?'flash-on':''">{{flash?"轻触关闭":"轻触点亮"}}</text>
+		</view>
+	</view>
+
+	<view class="page" :style="{height: height+'px'}" v-else>
+		<barcode :style="{height: height+'px'}" id="hs-scan" class="barcode" ref="barcode" autostart
+			frameColor="#0cff00" scanbarColor="#0cff00" background="#000000" :filters="fil" @marked="success"
+			@error="error">
+		</barcode>
+		<view @click="back" class="back" hover-class="css-hover">
+			<image :src="scan_img.back" style="width: 28px;height: 28px;"></image>
+		</view>
+		<text class="msg">{{msg}}</text>
+		<view class="flash" :style="{bottom: (height/2 - 120)+'px'}" @click="toFlash()" hover-class="css-hover">
+			<image class="flash-img" :src="flash_img" style="width: 30px;height: 30px;"></image>
+			<text class="flash-text" :class="flash?'flash-on':''">{{flash?"轻触关闭":"轻触点亮"}}</text>
+		</view>
+
+		<view @click="toScan" class="album" hover-class="css-hover">
+			<image :src="scan_img.album" style="height: 26px;width: 26px;"></image>
+		</view>
+
+	</view>
+	</view>
+</template>
+
+<script>
+	const _image = {
+		flash_off: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABSElEQVRoge2UMS9DYRRAP20MdOhuEIOIFbXZGAw2xMpiM0vslf6Cpt1MJBabxSLEJuEPiMEiFsSKY3mSG9K+vtfvvit1T3K39+49p2kbguM4/wugBqwrzCJQ0pZfRZe6dsCacsC+akASMQMsKcwC2l8hxxpgA7hWnEPtgJ3Yv9of3BQZcAWcRZpni4CpiHsvPaDHQwMVsBJpZwW4KypgGfhMjr0CtT73DQOn4kM5juXa7eimiHgBZnPuKQMnQv4CGInt2+n4rjj8BEzn2NEUO26BqoZrN4GGEHgAJjK8uyfevQfGFFU7SgwBLfrjEZgsXF5ElICjnPJvwLyZvIiYE1LnQDtlvv8A2tbuIYRfAVs9PP+ePNsswi8VD7DGA6zxAGs8wBoPsMYDrPEAawYt4ADYTpmPvxyQBQ+IAjCaRGSdcWt3xwkhfAHeC7+Yzq/O8QAAAABJRU5ErkJggg==',
+		flash_on: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABi0lEQVRoge2WPyhFYRiHT0n5k4GyuINRWe5gYrqJQiyKzYRJsir/VgMx3JgMjOyGmyxSVqOSwU0pumVg4zHc9+bonO9c5/rOfTu376lv+r2d9/fU+erzPIej/gBTQB5oqTK3BbwBuYiZduAcWLJeNGLpLWX2qsxdydxaxMyhzNzYb2peOi1Lv4DxiLmKwLohn/V9ZzS5xuHLj2X5E9BlmDEKAD3Ai+QHyTcOFugEHqXApmHmTPL5kGxVsgegI/nGIQA54BoYMuTdwCTQFJL1AkfAQPJNGxFgGHgGShbOqYbAMvYoOoEaBBYtCtxrCLRSvgcjFk5f3QVEYhCYsXDatATGLPw+BZXyPonCP8p/AlltgawUqYUT1fIV+HnYxeEdyGh39zzP84CMFIrDtnbvXwA7McqXMDzB1QAmYghcavcN4AS0MQhcAPsEL3gqBF6BZsk20ihw58sWnEDSNKJA0ZetpFEAYBeYA4ppFTDhBKzjBLRxAto4AW2cgDZOQBugH/j4o0Beu6/DIXwDQ+8GvfIPRuwAAAAASUVORK5CYII=',
+		back: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAADjElEQVRoge2aW08TQRiGh4QYwg0iSv0fEKAChaRNKychIVj1Qv+UGqOXGhJCDEoiaEwTwqWmGg+pRq64IB5impa0C9vT40W30G6325nulgXDm+xNd3fmfWa+mZ2Zr0Kc6z8V0AH0GleH135sBVwF7gHPgK9AmnqljXtPgbuAz2vTHcAs8BooAjmgYGHcrILxbBHYBGZOvIcM4z8MMzKm7WAKwHdg+iSM9wPrRqUlB8bNKlHukRfA5XaZDwB/Ad1F42bpwB9g1G3z88jHuFMVDJA5N827HTLNVDLqnHVqfpxyy3ulHHCtVfM+yjFf9BCgSHlMXGkFYIP2DlhZHQLrquav423Lm1UEQrLmO4BvnD6AL8h8sYEbKEyXOzs7bG1tUSrJT1L5fJ5YLMbu7q4qxIwMwFskWz+RSNDV1YUQgmg0Sj6fb/qOpmmEw2GEEPT09LC3tycLUAA2mpn3yZoHWF5eRghxdC0tLdlCaJpGKBSqeScWi8lWV4FovNQA7qAw82SzWQYGBqQgrMwHg0GpXquSDty0A3gCKJWYTqfx+/01xqampjg8PDx6Zn9/n9HR0Zpn5ubm0HXlWToHPLID+KxaIkAmkyEQCFhCuGi+oo92AJlWS00mkwwODtYYXVxcJBgM1oVNNptttRqA/UbmLzgpFco9MTExUWPYxZavVqcVwCU3Sm4E4aJ5gN62AVgNaiEEkUiEg4MDN6qABgCOQ6iR+TZA1IeQ00FsFTqRSIShoaGa3+bn552GkvUgNgA+tVKiVcsvLCyQy+XIZDJMTk7W3AuHw0564oMdwGMUd2DJZLLua1wxX1EjCE3TVM3ngId2AFEUlhK6rjf8gJmVSqUYHh6uAy0WlVbtOWDRDqAPhaX0yspKjaHp6WlL83YQ29vbKgB54GJDAAPiDZIr0ng8Tmdnp5T5aoiRkRGEEHR3d6vsCQrAK1vzBoDShiYej7O2tqa0qtQ0jdXVVRKJhPQ7KGxozvaW0oAY52QPspqpBIxJma+CeM7pOFbRgRUl8wZAH/Abb0OpAPzEau0jCTFGee71IpxKlFvf35L5Koize7hrgqikhdqtIm4er1dBBCgftCovYBSkAb9wO8FRBdEPvMR5bsysSu+u0a4UkwnE7SRfgpNI8pkgKmnWTY7TrDLriTzH6aoNvEizWsD4gNvAA+A9kLIwngLeAfeBW3id6G4mztJfDc7lQP8ALX0r5IbFIHwAAAAASUVORK5CYII=',
+		album: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACgklEQVRoge3YO2gUURiG4WgUMeINQ7xgFZDYiIWilSBesbQTxSKFNipi4Q0URIkgWEhsLAUbsUiTwl6xSCFGIWorIghRRLyLyWMxZ/G4zk5ms7szK+wHpznzH/733ZnZOTNdXZ100kknbRv0YR8GcbTgMRh6980GvB+jmFZ+piUs/XnhN2GyXObUTGLTTPDL8DZadBc7MSA5K0WOgdD7bsTzFsuyBC5Exefruu5aGJyNuC5kFT4NRc8wt0DGzGBuxDaeVfg5FA1XzS/GTXwKx59ge6vBqxhuhN5fsooquRrNdeORfzONvYXQJxyXo97pV0cNgf0p8JU8/h8ErmQITKG73QVOZghMFgHfqMBKvKshcKntBcL8Hryvgr+H+YXQdzUoEI6txjHJQ6Wwf5+of2MCZadtBDAPt/AKJ+pY1zYC56rupW0515UvgDX+bEcqGcOcHGvbQuC29BzKsbZcAWxV+w3vNXoKFcAqOZ8DmIOHNeArOV2YAK5Hv9zaHAIHZoCHD+htuQC2VTUenQF+ib9fU7Nyq6UCkkthLKXxvozGQznh4Rc2tFLgYI3GL6TcD1iHH3UIwP2WCKBHcs3XyqmUNSN1wlfyz16rGQLVT9DqfMSqqH7PLOHhOeY1TQC9kn+JmTKCBZKd68sGBGCwmQLDdTT+LrkZG80bLKpX4FsouBHNDeBnE4Bmk4sRx80w9zUVPhRNhKKxaO5MKehJ7kQcj8PcRJbAtWjx4TC3EDuwq+CxE0sDw5GIayhLoM+fd98pyZahH8tLGusDw1RgmsSKmgJBYje+pp/RUvNd3s+Zkq3veMnAcR5gcy74KpEtOC75ElHGGMTGusE76aSTTgrLbyY65XbJ3W1oAAAAAElFTkSuQmCC',
+	};
+	const SCAN_MAPS = {
+		[0]: "QR_CODE",
+		[1]: "EAN_13",
+		[2]: "EAN_8",
+		[3]: "AZTEC",
+		[4]: "DATA_MATRIX",
+		[5]: "UPC_A",
+		[6]: "UPC_E",
+		[7]: "CODABAR",
+		[8]: "CODE_39",
+		[9]: "CODE_93",
+		[10]: "CODE_128",
+		[11]: "CODE_25",
+		[13]: "PDF_417",
+		[14]: "RSS_14",
+		[15]: "RSSEXPANDED"
+	};
+	export default {
+		data: {
+			evalName: "hs-scancode", //扫码回调监听事件
+			flash: false, //手电筒
+			vibrate: true, //震动
+			sound: "none", //声音 none default
+			fil: [0, 1, 2], //条码类型
+			msg: "扫码", //提示文本
+			height: 600, //高度
+			isDark: null, //状态栏前景色 黑色
+			fullScreen: false, //是否全屏
+			onlyFromCamera: false, //从相册获取
+		},
+		computed: {
+			scan_img() {
+				return _image
+			},
+			flash_img() {
+				return this.flash ? _image.flash_on : _image.flash_off;
+			},
+		},
+		onLoad(p) {
+			//参数
+			if (p.evalName) this.evalName = p.evalName;
+			if (p.flash) this.flash = p.flash == 'true';
+			if (p.vibrate) this.vibrate = p.vibrate == 'true';
+			if (p.sound) this.sound = p.sound;
+			if (p.msg) this.msg = p.msg;
+			if (p.fil) this.fil = p.fil.split(',').map(x => parseInt(x));
+			if (p.fullScreen) this.fullScreen = p.fullScreen == 'true';
+			if (p.onlyFromCamera) this.onlyFromCamera = p.onlyFromCamera == 'true';
+			this.setFullOrStatus(true);
+			uni.getSystemInfo({
+				success: res => this.height = res.windowHeight
+			});
+			setTimeout(() => {
+				this.toStart();
+				this.webviewInit();
+
+			}, 100);
+		},
+		onUnload() {
+			this.setFullOrStatus(false);
+			this.toFlash(false);
+			uni.$off(this.evalName);
+		},
+		onBackPress(e) {
+			if (e.from === 'backbutton') this.back(0);
+			else this.setFullOrStatus(false);
+		},
+		methods: {
+			webviewInit() {
+				var pages = getCurrentPages();
+				var currentWebview = pages[pages.length - 1].$getAppWebview();
+				//ios 左滑关闭
+				currentWebview.addEventListener('popGesture', e => {
+					const type = e.type,
+						result = e.result;
+					if (type === 'start') {
+						this.setFullOrStatus(false);
+						this.toFlash(false);
+						this.toCancel();
+					} else if (type === 'end' && result) {
+						this.back(0)
+					} else if (type === 'end' && !result) {
+						this.setFullOrStatus(true);
+						this.toStart();
+					}
+				});
+			},
+			success(e) {
+				uni.$emit(this.evalName, [null, {
+					"hsScanCode": true,
+					"result": e.detail.message,
+					"scanType": SCAN_MAPS[e.detail.code],
+					"charSet": "utf8",
+					"path": e.detail.file || "",
+					"errMsg": "scanCode:ok"
+				}]);
+			},
+			error(e, cancel) {
+				uni.$emit(this.evalName, [{
+					"hsScanCode": true,
+					"errMsg": cancel === true ? "scanCode:fail cancel" : "scanCode:fail"
+				}, null]);
+				if (!cancel) this.toStart();
+			},
+			toStart: function() {
+				this.$refs.barcode && this.$refs.barcode.start({
+					conserve: false,
+					vibrate: this.vibrate,
+					sound: this.sound,
+				});
+			},
+			toCancel: function() {
+				this.$refs.barcode.cancel();
+			},
+			toFlash: function(t) {
+				this.flash = t == null ? !this.flash : t;
+				this.$refs.barcode.setFlash(this.flash);
+			},
+			toScan: async function() {
+				this.toCancel();
+				const [e, res] = await uni.chooseImage({
+					count: 1,
+					sizeType: ['original'],
+					sourceType: ['album']
+				});
+				if (res && res.tempFilePaths.length > 0) {
+					const barcodeModule = uni.requireNativePlugin('barcodeScan');
+					barcodeModule.scan(res.tempFilePaths[0], e => {
+						if (e.detail.type === "success") {
+							this.success(e);
+						} else {
+							this.error(e);
+						}
+						this.toStart();
+					});
+				} else {
+					this.toStart();
+				}
+			},
+			back(t) {
+				const p = {
+					delta: 1
+				}
+				this.setFullOrStatus(false);
+				this.toCancel();
+				this.toFlash(false);
+				if (t !== 0) uni.navigateBack(p);
+			},
+			setFullOrStatus(t) {
+				if (this.isDark == null) this.isDark = this.getStatusBarStyle() !== 'light';
+				this.isDark && plus.navigator.setStatusBarStyle(t ? "light" : "dark");
+				this.fullScreen && plus.navigator.setFullscreen(t)
+			},
+			getStatusBarStyle() {
+				let style = plus.navigator.getStatusBarStyle()
+				if (style === 'UIStatusBarStyleBlackTranslucent' || style === 'UIStatusBarStyleBlackOpaque' || style ===
+					'null') {
+					style = 'light'
+				} else if (style === 'UIStatusBarStyleDefault') {
+					style = 'dark'
+				}
+				return style
+			}
+		}
+	}
+</script>
+<style scoped>
+	.page {
+		top: 0;
+		position: fixed;
+		width: 750rpx;
+		justify-content: center;
+		align-items: center;
+		background-color: #000000;
+	}
+
+	.back {
+		position: fixed;
+		left: 5px;
+		top: 20px;
+		border-radius: 50;
+		padding: 15px;
+	}
+
+	.msg {
+		position: fixed;
+		top: 90px;
+		width: 750rpx;
+		text-align: center;
+		color: #FFFFFF;
+		font-size: 16px;
+	}
+
+	.css-hover {
+		opacity: .4;
+	}
+
+	.barcode {
+		width: 750rpx;
+		height: 100%;
+		background-color: #000000;
+	}
+
+	.flash {
+		position: absolute;
+		bottom: 500rpx;
+		justify-content: center;
+		align-items: center;
+		padding: 8px;
+	}
+
+	.flash-text {
+		margin-top: 3px;
+		color: #bfbfbf;
+		font-size: 12px;
+	}
+
+	.flash-on {
+		color: #FFFFFF;
+	}
+
+	.album {
+		position: fixed;
+		bottom: 60px;
+		right: 30px;
+		height: 42px;
+		width: 42px;
+		padding: 16px;
+		background-color: rgba(157, 157, 157, .3);
+		border-radius: 50;
+		justify-content: center;
+		align-items: center;
+	}
+</style>

+ 2606 - 0
components/reqrcode.js

@@ -0,0 +1,2606 @@
+var _aa = {};
+_aa._ab = function(f, e) {
+	var d = qrcode.width;
+	var b = qrcode.height;
+	var c = true;
+	for (var g = 0; g < e.length && c; g += 2) {
+		var a = Math.floor(e[g]);
+		var h = Math.floor(e[g + 1]);
+		if (a < -1 || a > d || h < -1 || h > b) {
+			throw "Error._ab "
+		}
+		c = false;
+		if (a == -1) {
+			e[g] = 0;
+			c = true
+		} else {
+			if (a == d) {
+				e[g] = d - 1;
+				c = true
+			}
+		}
+		if (h == -1) {
+			e[g + 1] = 0;
+			c = true
+		} else {
+			if (h == b) {
+				e[g + 1] = b - 1;
+				c = true
+			}
+		}
+	}
+	c = true;
+	for (var g = e.length - 2; g >= 0 && c; g -= 2) {
+		var a = Math.floor(e[g]);
+		var h = Math.floor(e[g + 1]);
+		if (a < -1 || a > d || h < -1 || h > b) {
+			throw "Error._ab "
+		}
+		c = false;
+		if (a == -1) {
+			e[g] = 0;
+			c = true
+		} else {
+			if (a == d) {
+				e[g] = d - 1;
+				c = true
+			}
+		}
+		if (h == -1) {
+			e[g + 1] = 0;
+			c = true
+		} else {
+			if (h == b) {
+				e[g + 1] = b - 1;
+				c = true
+			}
+		}
+	}
+};
+_aa._af = function(b, d, a) {
+	var k = new _ac(d);
+	var j = new Array(d << 1);
+	for (var f = 0; f < d; f++) {
+		var g = j.length;
+		var i = f + 0.5;
+		for (var h = 0; h < g; h += 2) {
+			j[h] = (h >> 1) + 0.5;
+			j[h + 1] = i
+		}
+		a._ad(j);
+		_aa._ab(b, j);
+		try {
+			for (var h = 0; h < g; h += 2) {
+				var e = b[Math.floor(j[h]) + qrcode.width * Math.floor(j[h + 1])];
+				if (e) {
+					k._dq(h >> 1, f)
+				}
+			}
+		} catch (c) {
+			throw "Error._ab"
+		}
+	}
+	return k
+};
+_aa._ah = function(h, o, l, k, q, p, b, a, f, e, n, m, s, r, d, c, j, i) {
+	var g = _ae._ag(l, k, q, p, b, a, f, e, n, m, s, r, d, c, j, i);
+	return _aa._af(h, o, g)
+};
+
+function _a1(b, a) {
+	this.count = b;
+	this._fc = a;
+	this.__defineGetter__("Count", function() {
+		return this.count
+	});
+	this.__defineGetter__("_dm", function() {
+		return this._fc
+	})
+}
+
+function _a2(a, c, b) {
+	this._bm = a;
+	if (b) {
+		this._do = new Array(c, b)
+	} else {
+		this._do = new Array(c)
+	}
+	this.__defineGetter__("_bo", function() {
+		return this._bm
+	});
+	this.__defineGetter__("_dn", function() {
+		return this._bm * this._fo
+	});
+	this.__defineGetter__("_fo", function() {
+		var e = 0;
+		for (var d = 0; d < this._do.length; d++) {
+			e += this._do[d].length
+		}
+		return e
+	});
+	this._fb = function() {
+		return this._do
+	}
+}
+
+function _a3(k, l, h, g, f, e) {
+	this._bs = k;
+	this._ar = l;
+	this._do = new Array(h, g, f, e);
+	var j = 0;
+	var b = h._bo;
+	var a = h._fb();
+	for (var d = 0; d < a.length; d++) {
+		var c = a[d];
+		j += c.Count * (c._dm + b)
+	}
+	this._br = j;
+	this.__defineGetter__("_fd", function() {
+		return this._bs
+	});
+	this.__defineGetter__("_as", function() {
+		return this._ar
+	});
+	this.__defineGetter__("_dp", function() {
+		return this._br
+	});
+	this.__defineGetter__("_cr", function() {
+		return 17 + 4 * this._bs
+	});
+	this._aq = function() {
+		var q = this._cr;
+		var o = new _ac(q);
+		o._bq(0, 0, 9, 9);
+		o._bq(q - 8, 0, 8, 9);
+		o._bq(0, q - 8, 9, 8);
+		var n = this._ar.length;
+		for (var m = 0; m < n; m++) {
+			var p = this._ar[m] - 2;
+			for (var r = 0; r < n; r++) {
+				if ((m == 0 && (r == 0 || r == n - 1)) || (m == n - 1 && r == 0)) {
+					continue
+				}
+				o._bq(this._ar[r] - 2, p, 5, 5)
+			}
+		}
+		o._bq(6, 9, 1, q - 17);
+		o._bq(9, 6, q - 17, 1);
+		if (this._bs > 6) {
+			o._bq(q - 11, 0, 3, 6);
+			o._bq(0, q - 11, 6, 3)
+		}
+		return o
+	};
+	this._bu = function(i) {
+		return this._do[i.ordinal()]
+	}
+}
+_a3._bv = new Array(31892, 34236, 39577, 42195, 48118, 51042, 55367, 58893, 63784, 68472, 70749, 76311, 79154, 84390,
+	87683, 92361, 96236, 102084, 102881, 110507, 110734, 117786, 119615, 126325, 127568, 133589, 136944, 141498,
+	145311, 150283, 152622, 158308, 161089, 167017);
+_a3.VERSIONS = _ay();
+_a3._av = function(a) {
+	if (a < 1 || a > 40) {
+		throw "bad arguments"
+	}
+	return _a3.VERSIONS[a - 1]
+};
+_a3._at = function(b) {
+	if (b % 4 != 1) {
+		throw "Error _at"
+	}
+	try {
+		return _a3._av((b - 17) >> 2)
+	} catch (a) {
+		throw "Error _av"
+	}
+};
+_a3._aw = function(d) {
+	var b = 4294967295;
+	var f = 0;
+	for (var c = 0; c < _a3._bv.length; c++) {
+		var a = _a3._bv[c];
+		if (a == d) {
+			return this._av(c + 7)
+		}
+		var e = _ax._gj(d, a);
+		if (e < b) {
+			f = c + 7;
+			b = e
+		}
+	}
+	if (b <= 3) {
+		return this._av(f)
+	}
+	return null
+};
+
+function _ay() {
+	return new Array(new _a3(1, new Array(), new _a2(7, new _a1(1, 19)), new _a2(10, new _a1(1, 16)), new _a2(13,
+			new _a1(1, 13)), new _a2(17, new _a1(1, 9))), new _a3(2, new Array(6, 18), new _a2(10, new _a1(1, 34)),
+			new _a2(16, new _a1(1, 28)), new _a2(22, new _a1(1, 22)), new _a2(28, new _a1(1, 16))), new _a3(3,
+			new Array(6, 22), new _a2(15, new _a1(1, 55)), new _a2(26, new _a1(1, 44)), new _a2(18, new _a1(2, 17)),
+			new _a2(22, new _a1(2, 13))), new _a3(4, new Array(6, 26), new _a2(20, new _a1(1, 80)), new _a2(18,
+			new _a1(2, 32)), new _a2(26, new _a1(2, 24)), new _a2(16, new _a1(4, 9))), new _a3(5, new Array(6, 30),
+			new _a2(26, new _a1(1, 108)), new _a2(24, new _a1(2, 43)), new _a2(18, new _a1(2, 15), new _a1(2, 16)),
+			new _a2(22, new _a1(2, 11), new _a1(2, 12))), new _a3(6, new Array(6, 34), new _a2(18, new _a1(2, 68)),
+			new _a2(16, new _a1(4, 27)), new _a2(24, new _a1(4, 19)), new _a2(28, new _a1(4, 15))), new _a3(7,
+			new Array(6, 22, 38), new _a2(20, new _a1(2, 78)), new _a2(18, new _a1(4, 31)), new _a2(18, new _a1(2,
+				14), new _a1(4, 15)), new _a2(26, new _a1(4, 13), new _a1(1, 14))), new _a3(8, new Array(6, 24, 42),
+			new _a2(24, new _a1(2, 97)), new _a2(22, new _a1(2, 38), new _a1(2, 39)), new _a2(22, new _a1(4, 18),
+				new _a1(2, 19)), new _a2(26, new _a1(4, 14), new _a1(2, 15))), new _a3(9, new Array(6, 26, 46),
+			new _a2(30, new _a1(2, 116)), new _a2(22, new _a1(3, 36), new _a1(2, 37)), new _a2(20, new _a1(4, 16),
+				new _a1(4, 17)), new _a2(24, new _a1(4, 12), new _a1(4, 13))), new _a3(10, new Array(6, 28, 50),
+			new _a2(18, new _a1(2, 68), new _a1(2, 69)), new _a2(26, new _a1(4, 43), new _a1(1, 44)), new _a2(24,
+				new _a1(6, 19), new _a1(2, 20)), new _a2(28, new _a1(6, 15), new _a1(2, 16))), new _a3(11,
+			new Array(6, 30, 54), new _a2(20, new _a1(4, 81)), new _a2(30, new _a1(1, 50), new _a1(4, 51)), new _a2(
+				28, new _a1(4, 22), new _a1(4, 23)), new _a2(24, new _a1(3, 12), new _a1(8, 13))), new _a3(12,
+			new Array(6, 32, 58), new _a2(24, new _a1(2, 92), new _a1(2, 93)), new _a2(22, new _a1(6, 36), new _a1(
+				2, 37)), new _a2(26, new _a1(4, 20), new _a1(6, 21)), new _a2(28, new _a1(7, 14), new _a1(4, 15))),
+		new _a3(13, new Array(6, 34, 62), new _a2(26, new _a1(4, 107)), new _a2(22, new _a1(8, 37), new _a1(1, 38)),
+			new _a2(24, new _a1(8, 20), new _a1(4, 21)), new _a2(22, new _a1(12, 11), new _a1(4, 12))), new _a3(14,
+			new Array(6, 26, 46, 66), new _a2(30, new _a1(3, 115), new _a1(1, 116)), new _a2(24, new _a1(4, 40),
+				new _a1(5, 41)), new _a2(20, new _a1(11, 16), new _a1(5, 17)), new _a2(24, new _a1(11, 12), new _a1(
+				5, 13))), new _a3(15, new Array(6, 26, 48, 70), new _a2(22, new _a1(5, 87), new _a1(1, 88)),
+			new _a2(24, new _a1(5, 41), new _a1(5, 42)), new _a2(30, new _a1(5, 24), new _a1(7, 25)), new _a2(24,
+				new _a1(11, 12), new _a1(7, 13))), new _a3(16, new Array(6, 26, 50, 74), new _a2(24, new _a1(5, 98),
+			new _a1(1, 99)), new _a2(28, new _a1(7, 45), new _a1(3, 46)), new _a2(24, new _a1(15, 19), new _a1(
+			2, 20)), new _a2(30, new _a1(3, 15), new _a1(13, 16))), new _a3(17, new Array(6, 30, 54, 78), new _a2(
+			28, new _a1(1, 107), new _a1(5, 108)), new _a2(28, new _a1(10, 46), new _a1(1, 47)), new _a2(28,
+			new _a1(1, 22), new _a1(15, 23)), new _a2(28, new _a1(2, 14), new _a1(17, 15))), new _a3(18, new Array(
+			6, 30, 56, 82), new _a2(30, new _a1(5, 120), new _a1(1, 121)), new _a2(26, new _a1(9, 43), new _a1(
+			4, 44)), new _a2(28, new _a1(17, 22), new _a1(1, 23)), new _a2(28, new _a1(2, 14), new _a1(19, 15))),
+		new _a3(19, new Array(6, 30, 58, 86), new _a2(28, new _a1(3, 113), new _a1(4, 114)), new _a2(26, new _a1(3,
+			44), new _a1(11, 45)), new _a2(26, new _a1(17, 21), new _a1(4, 22)), new _a2(26, new _a1(9, 13),
+			new _a1(16, 14))), new _a3(20, new Array(6, 34, 62, 90), new _a2(28, new _a1(3, 107), new _a1(5, 108)),
+			new _a2(26, new _a1(3, 41), new _a1(13, 42)), new _a2(30, new _a1(15, 24), new _a1(5, 25)), new _a2(28,
+				new _a1(15, 15), new _a1(10, 16))), new _a3(21, new Array(6, 28, 50, 72, 94), new _a2(28, new _a1(4,
+				116), new _a1(4, 117)), new _a2(26, new _a1(17, 42)), new _a2(28, new _a1(17, 22), new _a1(6, 23)),
+			new _a2(30, new _a1(19, 16), new _a1(6, 17))), new _a3(22, new Array(6, 26, 50, 74, 98), new _a2(28,
+			new _a1(2, 111), new _a1(7, 112)), new _a2(28, new _a1(17, 46)), new _a2(30, new _a1(7, 24),
+			new _a1(16, 25)), new _a2(24, new _a1(34, 13))), new _a3(23, new Array(6, 30, 54, 74, 102), new _a2(30,
+			new _a1(4, 121), new _a1(5, 122)), new _a2(28, new _a1(4, 47), new _a1(14, 48)), new _a2(30,
+			new _a1(11, 24), new _a1(14, 25)), new _a2(30, new _a1(16, 15), new _a1(14, 16))), new _a3(24,
+			new Array(6, 28, 54, 80, 106), new _a2(30, new _a1(6, 117), new _a1(4, 118)), new _a2(28, new _a1(6,
+				45), new _a1(14, 46)), new _a2(30, new _a1(11, 24), new _a1(16, 25)), new _a2(30, new _a1(30, 16),
+				new _a1(2, 17))), new _a3(25, new Array(6, 32, 58, 84, 110), new _a2(26, new _a1(8, 106), new _a1(4,
+				107)), new _a2(28, new _a1(8, 47), new _a1(13, 48)), new _a2(30, new _a1(7, 24), new _a1(22, 25)),
+			new _a2(30, new _a1(22, 15), new _a1(13, 16))), new _a3(26, new Array(6, 30, 58, 86, 114), new _a2(28,
+			new _a1(10, 114), new _a1(2, 115)), new _a2(28, new _a1(19, 46), new _a1(4, 47)), new _a2(28,
+			new _a1(28, 22), new _a1(6, 23)), new _a2(30, new _a1(33, 16), new _a1(4, 17))), new _a3(27, new Array(
+			6, 34, 62, 90, 118), new _a2(30, new _a1(8, 122), new _a1(4, 123)), new _a2(28, new _a1(22, 45),
+			new _a1(3, 46)), new _a2(30, new _a1(8, 23), new _a1(26, 24)), new _a2(30, new _a1(12, 15), new _a1(
+			28, 16))), new _a3(28, new Array(6, 26, 50, 74, 98, 122), new _a2(30, new _a1(3, 117), new _a1(10,
+			118)), new _a2(28, new _a1(3, 45), new _a1(23, 46)), new _a2(30, new _a1(4, 24), new _a1(31, 25)),
+			new _a2(30, new _a1(11, 15), new _a1(31, 16))), new _a3(29, new Array(6, 30, 54, 78, 102, 126), new _a2(
+			30, new _a1(7, 116), new _a1(7, 117)), new _a2(28, new _a1(21, 45), new _a1(7, 46)), new _a2(30,
+			new _a1(1, 23), new _a1(37, 24)), new _a2(30, new _a1(19, 15), new _a1(26, 16))), new _a3(30, new Array(
+			6, 26, 52, 78, 104, 130), new _a2(30, new _a1(5, 115), new _a1(10, 116)), new _a2(28, new _a1(19,
+			47), new _a1(10, 48)), new _a2(30, new _a1(15, 24), new _a1(25, 25)), new _a2(30, new _a1(23, 15),
+			new _a1(25, 16))), new _a3(31, new Array(6, 30, 56, 82, 108, 134), new _a2(30, new _a1(13, 115),
+			new _a1(3, 116)), new _a2(28, new _a1(2, 46), new _a1(29, 47)), new _a2(30, new _a1(42, 24),
+			new _a1(1, 25)), new _a2(30, new _a1(23, 15), new _a1(28, 16))), new _a3(32, new Array(6, 34, 60, 86,
+			112, 138), new _a2(30, new _a1(17, 115)), new _a2(28, new _a1(10, 46), new _a1(23, 47)), new _a2(30,
+			new _a1(10, 24), new _a1(35, 25)), new _a2(30, new _a1(19, 15), new _a1(35, 16))), new _a3(33,
+			new Array(6, 30, 58, 86, 114, 142), new _a2(30, new _a1(17, 115), new _a1(1, 116)), new _a2(28, new _a1(
+				14, 46), new _a1(21, 47)), new _a2(30, new _a1(29, 24), new _a1(19, 25)), new _a2(30, new _a1(11,
+				15), new _a1(46, 16))), new _a3(34, new Array(6, 34, 62, 90, 118, 146), new _a2(30, new _a1(13,
+			115), new _a1(6, 116)), new _a2(28, new _a1(14, 46), new _a1(23, 47)), new _a2(30, new _a1(44, 24),
+			new _a1(7, 25)), new _a2(30, new _a1(59, 16), new _a1(1, 17))), new _a3(35, new Array(6, 30, 54, 78,
+			102, 126, 150), new _a2(30, new _a1(12, 121), new _a1(7, 122)), new _a2(28, new _a1(12, 47),
+			new _a1(26, 48)), new _a2(30, new _a1(39, 24), new _a1(14, 25)), new _a2(30, new _a1(22, 15),
+			new _a1(41, 16))), new _a3(36, new Array(6, 24, 50, 76, 102, 128, 154), new _a2(30, new _a1(6, 121),
+			new _a1(14, 122)), new _a2(28, new _a1(6, 47), new _a1(34, 48)), new _a2(30, new _a1(46, 24),
+			new _a1(10, 25)), new _a2(30, new _a1(2, 15), new _a1(64, 16))), new _a3(37, new Array(6, 28, 54, 80,
+			106, 132, 158), new _a2(30, new _a1(17, 122), new _a1(4, 123)), new _a2(28, new _a1(29, 46),
+			new _a1(14, 47)), new _a2(30, new _a1(49, 24), new _a1(10, 25)), new _a2(30, new _a1(24, 15),
+			new _a1(46, 16))), new _a3(38, new Array(6, 32, 58, 84, 110, 136, 162), new _a2(30, new _a1(4, 122),
+			new _a1(18, 123)), new _a2(28, new _a1(13, 46), new _a1(32, 47)), new _a2(30, new _a1(48, 24),
+			new _a1(14, 25)), new _a2(30, new _a1(42, 15), new _a1(32, 16))), new _a3(39, new Array(6, 26, 54, 82,
+			110, 138, 166), new _a2(30, new _a1(20, 117), new _a1(4, 118)), new _a2(28, new _a1(40, 47),
+			new _a1(7, 48)), new _a2(30, new _a1(43, 24), new _a1(22, 25)), new _a2(30, new _a1(10, 15),
+			new _a1(67, 16))), new _a3(40, new Array(6, 30, 58, 86, 114, 142, 170), new _a2(30, new _a1(19, 118),
+			new _a1(6, 119)), new _a2(28, new _a1(18, 47), new _a1(31, 48)), new _a2(30, new _a1(34, 24),
+			new _a1(34, 25)), new _a2(30, new _a1(20, 15), new _a1(61, 16))))
+}
+
+function _ae(i, f, c, h, e, b, g, d, a) {
+	this.a11 = i;
+	this.a12 = h;
+	this.a13 = g;
+	this.a21 = f;
+	this.a22 = e;
+	this.a23 = d;
+	this.a31 = c;
+	this.a32 = b;
+	this.a33 = a;
+	this._ad = function(v) {
+		var s = v.length;
+		var z = this.a11;
+		var w = this.a12;
+		var u = this.a13;
+		var q = this.a21;
+		var p = this.a22;
+		var o = this.a23;
+		var m = this.a31;
+		var k = this.a32;
+		var j = this.a33;
+		for (var n = 0; n < s; n += 2) {
+			var t = v[n];
+			var r = v[n + 1];
+			var l = u * t + o * r + j;
+			v[n] = (z * t + q * r + m) / l;
+			v[n + 1] = (w * t + p * r + k) / l
+		}
+	};
+	this._fp = function(m, k) {
+		var q = m.length;
+		for (var l = 0; l < q; l++) {
+			var j = m[l];
+			var p = k[l];
+			var o = this.a13 * j + this.a23 * p + this.a33;
+			m[l] = (this.a11 * j + this.a21 * p + this.a31) / o;
+			k[l] = (this.a12 * j + this.a22 * p + this.a32) / o
+		}
+	};
+	this._fr = function() {
+		return new _ae(this.a22 * this.a33 - this.a23 * this.a32, this.a23 * this.a31 - this.a21 * this.a33, this
+			.a21 * this.a32 - this.a22 * this.a31, this.a13 * this.a32 - this.a12 * this.a33, this.a11 * this
+			.a33 - this.a13 * this.a31, this.a12 * this.a31 - this.a11 * this.a32, this.a12 * this.a23 - this
+			.a13 * this.a22, this.a13 * this.a21 - this.a11 * this.a23, this.a11 * this.a22 - this.a12 * this
+			.a21)
+	};
+	this.times = function(j) {
+		return new _ae(this.a11 * j.a11 + this.a21 * j.a12 + this.a31 * j.a13, this.a11 * j.a21 + this.a21 * j.a22 +
+			this.a31 * j.a23, this.a11 * j.a31 + this.a21 * j.a32 + this.a31 * j.a33, this.a12 * j.a11 + this
+			.a22 * j.a12 + this.a32 * j.a13, this.a12 * j.a21 + this.a22 * j.a22 + this.a32 * j.a23, this.a12 *
+			j.a31 + this.a22 * j.a32 + this.a32 * j.a33, this.a13 * j.a11 + this.a23 * j.a12 + this.a33 * j.a13,
+			this.a13 * j.a21 + this.a23 * j.a22 + this.a33 * j.a23, this.a13 * j.a31 + this.a23 * j.a32 + this
+			.a33 * j.a33)
+	}
+}
+_ae._ag = function(p, e, o, d, n, c, m, b, h, q, l, f, a, j, i, r) {
+	var g = this._be(p, e, o, d, n, c, m, b);
+	var k = this._bf(h, q, l, f, a, j, i, r);
+	return k.times(g)
+};
+_ae._bf = function(d, p, c, m, b, k, a, j) {
+	var h = j - k;
+	var f = p - m + k - j;
+	if (h == 0 && f == 0) {
+		return new _ae(c - d, b - c, d, m - p, k - m, p, 0, 0, 1)
+	} else {
+		var q = c - b;
+		var o = a - b;
+		var l = d - c + b - a;
+		var i = m - k;
+		var e = q * h - o * i;
+		var n = (l * h - o * f) / e;
+		var g = (q * f - l * i) / e;
+		return new _ae(c - d + n * c, a - d + g * a, d, m - p + n * m, j - p + g * j, p, n, g, 1)
+	}
+};
+_ae._be = function(f, h, d, g, b, e, a, c) {
+	return this._bf(f, h, d, g, b, e, a, c)._fr()
+};
+
+function _bg(b, a) {
+	this.bits = b;
+	this.points = a
+}
+
+function Detector(a) {
+	this.image = a;
+	this._am = null;
+	this._bi = function(m, l, c, b) {
+		var d = Math.abs(b - l) > Math.abs(c - m);
+		if (d) {
+			var r = m;
+			m = l;
+			l = r;
+			r = c;
+			c = b;
+			b = r
+		}
+		var j = Math.abs(c - m);
+		var i = Math.abs(b - l);
+		var p = -j >> 1;
+		var u = l < b ? 1 : -1;
+		var f = m < c ? 1 : -1;
+		var e = 0;
+		for (var h = m, g = l; h != c; h += f) {
+			var t = d ? g : h;
+			var s = d ? h : g;
+			if (e == 1) {
+				if (this.image[t + s * qrcode.width]) {
+					e++
+				}
+			} else {
+				if (!this.image[t + s * qrcode.width]) {
+					e++
+				}
+			}
+			if (e == 3) {
+				var o = h - m;
+				var n = g - l;
+				return Math.sqrt((o * o + n * n))
+			}
+			p += i;
+			if (p > 0) {
+				if (g == b) {
+					break
+				}
+				g += u;
+				p -= j
+			}
+		}
+		var k = c - m;
+		var q = b - l;
+		return Math.sqrt((k * k + q * q))
+	};
+	this._bh = function(i, g, h, f) {
+		var b = this._bi(i, g, h, f);
+		var e = 1;
+		var d = i - (h - i);
+		if (d < 0) {
+			e = i / (i - d);
+			d = 0
+		} else {
+			if (d >= qrcode.width) {
+				e = (qrcode.width - 1 - i) / (d - i);
+				d = qrcode.width - 1
+			}
+		}
+		var c = Math.floor(g - (f - g) * e);
+		e = 1;
+		if (c < 0) {
+			e = g / (g - c);
+			c = 0
+		} else {
+			if (c >= qrcode.height) {
+				e = (qrcode.height - 1 - g) / (c - g);
+				c = qrcode.height - 1
+			}
+		}
+		d = Math.floor(i + (d - i) * e);
+		b += this._bi(i, g, d, c);
+		return b - 1
+	};
+	this._bj = function(c, d) {
+		var b = this._bh(Math.floor(c.X), Math.floor(c.Y), Math.floor(d.X), Math.floor(d.Y));
+		var e = this._bh(Math.floor(d.X), Math.floor(d.Y), Math.floor(c.X), Math.floor(c.Y));
+		if (isNaN(b)) {
+			return e / 7
+		}
+		if (isNaN(e)) {
+			return b / 7
+		}
+		return (b + e) / 14
+	};
+	this._bk = function(d, c, b) {
+		return (this._bj(d, c) + this._bj(d, b)) / 2
+	};
+	this.distance = function(d, b) {
+		var e = d.X - b.X;
+		var c = d.Y - b.Y;
+		return Math.sqrt((e * e + c * c))
+	};
+	this._bx = function(g, f, d, e) {
+		var b = Math.round(this.distance(g, f) / e);
+		var c = Math.round(this.distance(g, d) / e);
+		var h = ((b + c) >> 1) + 7;
+		switch (h & 3) {
+			case 0:
+				h++;
+				break;
+			case 2:
+				h--;
+				break;
+			case 3:
+				throw "Error"
+		}
+		return h
+	};
+	this._bl = function(g, f, d, j) {
+		var k = Math.floor(j * g);
+		var h = Math.max(0, f - k);
+		var i = Math.min(qrcode.width - 1, f + k);
+		if (i - h < g * 3) {
+			throw "Error"
+		}
+		var b = Math.max(0, d - k);
+		var c = Math.min(qrcode.height - 1, d + k);
+		var e = new _ak(this.image, h, b, i - h, c - b, g, this._am);
+		return e.find()
+	};
+	this.createTransform = function(l, h, k, b, g) {
+		var j = g - 3.5;
+		var i;
+		var f;
+		var e;
+		var c;
+		if (b != null) {
+			i = b.X;
+			f = b.Y;
+			e = c = j - 3
+		} else {
+			i = (h.X - l.X) + k.X;
+			f = (h.Y - l.Y) + k.Y;
+			e = c = j
+		}
+		var d = _ae._ag(3.5, 3.5, j, 3.5, e, c, 3.5, j, l.X, l.Y, h.X, h.Y, i, f, k.X, k.Y);
+		return d
+	};
+	this._bz = function(e, b, d) {
+		var c = _aa;
+		return c._af(e, d, b)
+	};
+	this._cd = function(q) {
+		var j = q._gq;
+		var h = q._gs;
+		var n = q._gp;
+		var d = this._bk(j, h, n);
+		if (d < 1) {
+			throw "Error"
+		}
+		var r = this._bx(j, h, n, d);
+		var b = _a3._at(r);
+		var k = b._cr - 7;
+		var l = null;
+		if (b._as.length > 0) {
+			var f = h.X - j.X + n.X;
+			var e = h.Y - j.Y + n.Y;
+			var c = 1 - 3 / k;
+			var t = Math.floor(j.X + c * (f - j.X));
+			var s = Math.floor(j.Y + c * (e - j.Y));
+			for (var p = 4; p <= 16; p <<= 1) {
+				l = this._bl(d, t, s, p);
+				break
+			}
+		}
+		var g = this.createTransform(j, h, n, l, r);
+		var m = this._bz(this.image, g, r);
+		var o;
+		if (l == null) {
+			o = new Array(n, j, h)
+		} else {
+			o = new Array(n, j, h, l)
+		}
+		return new _bg(m, o)
+	};
+	this.detect = function() {
+		var b = new _cc()._ce(this.image);
+		return this._cd(b)
+	}
+}
+var _ca = 21522;
+var _cb = new Array(new Array(21522, 0), new Array(20773, 1), new Array(24188, 2), new Array(23371, 3), new Array(17913,
+		4), new Array(16590, 5), new Array(20375, 6), new Array(19104, 7), new Array(30660, 8), new Array(29427, 9),
+	new Array(32170, 10), new Array(30877, 11), new Array(26159, 12), new Array(25368, 13), new Array(27713, 14),
+	new Array(26998, 15), new Array(5769, 16), new Array(5054, 17), new Array(7399, 18), new Array(6608, 19),
+	new Array(1890, 20), new Array(597, 21), new Array(3340, 22), new Array(2107, 23), new Array(13663, 24),
+	new Array(12392, 25), new Array(16177, 26), new Array(14854, 27), new Array(9396, 28), new Array(8579, 29),
+	new Array(11994, 30), new Array(11245, 31));
+var _ch = new Array(0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4);
+
+function _ax(a) {
+	this._cf = _cg.forBits((a >> 3) & 3);
+	this._fe = (a & 7);
+	this.__defineGetter__("_cg", function() {
+		return this._cf
+	});
+	this.__defineGetter__("_dx", function() {
+		return this._fe
+	});
+	this.GetHashCode = function() {
+		return (this._cf.ordinal() << 3) | _fe
+	};
+	this.Equals = function(c) {
+		var b = c;
+		return this._cf == b._cf && this._fe == b._fe
+	}
+}
+_ax._gj = function(d, c) {
+	d ^= c;
+	return _ch[d & 15] + _ch[(_ew(d, 4) & 15)] + _ch[(_ew(d, 8) & 15)] + _ch[(_ew(d, 12) & 15)] + _ch[(_ew(d, 16) &
+		15)] + _ch[(_ew(d, 20) & 15)] + _ch[(_ew(d, 24) & 15)] + _ch[(_ew(d, 28) & 15)]
+};
+_ax._ci = function(a) {
+	var b = _ax._cj(a);
+	if (b != null) {
+		return b
+	}
+	return _ax._cj(a ^ _ca)
+};
+_ax._cj = function(d) {
+	var b = 4294967295;
+	var a = 0;
+	for (var c = 0; c < _cb.length; c++) {
+		var g = _cb[c];
+		var f = g[0];
+		if (f == d) {
+			return new _ax(g[1])
+		}
+		var e = this._gj(d, f);
+		if (e < b) {
+			a = g[1];
+			b = e
+		}
+	}
+	if (b <= 3) {
+		return new _ax(a)
+	}
+	return null
+};
+
+function _cg(a, c, b) {
+	this._ff = a;
+	this.bits = c;
+	this.name = b;
+	this.__defineGetter__("Bits", function() {
+		return this.bits
+	});
+	this.__defineGetter__("Name", function() {
+		return this.name
+	});
+	this.ordinal = function() {
+		return this._ff
+	}
+}
+_cg.forBits = function(a) {
+	if (a < 0 || a >= FOR_BITS.length) {
+		throw "bad arguments"
+	}
+	return FOR_BITS[a]
+};
+var L = new _cg(0, 1, "L");
+var M = new _cg(1, 0, "M");
+var Q = new _cg(2, 3, "Q");
+var H = new _cg(3, 2, "H");
+var FOR_BITS = new Array(M, L, H, Q);
+
+function _ac(d, a) {
+	if (!a) {
+		a = d
+	}
+	if (d < 1 || a < 1) {
+		throw "Both dimensions must be greater than 0"
+	}
+	this.width = d;
+	this.height = a;
+	var c = d >> 5;
+	if ((d & 31) != 0) {
+		c++
+	}
+	this.rowSize = c;
+	this.bits = new Array(c * a);
+	for (var b = 0; b < this.bits.length; b++) {
+		this.bits[b] = 0
+	}
+	this.__defineGetter__("Width", function() {
+		return this.width
+	});
+	this.__defineGetter__("Height", function() {
+		return this.height
+	});
+	this.__defineGetter__("Dimension", function() {
+		if (this.width != this.height) {
+			throw "Can't call getDimension() on a non-square matrix"
+		}
+		return this.width
+	});
+	this._ds = function(e, g) {
+		var f = g * this.rowSize + (e >> 5);
+		return ((_ew(this.bits[f], (e & 31))) & 1) != 0
+	};
+	this._dq = function(e, g) {
+		var f = g * this.rowSize + (e >> 5);
+		this.bits[f] |= 1 << (e & 31)
+	};
+	this.flip = function(e, g) {
+		var f = g * this.rowSize + (e >> 5);
+		this.bits[f] ^= 1 << (e & 31)
+	};
+	this.clear = function() {
+		var e = this.bits.length;
+		for (var f = 0; f < e; f++) {
+			this.bits[f] = 0
+		}
+	};
+	this._bq = function(g, j, f, m) {
+		if (j < 0 || g < 0) {
+			throw "Left and top must be nonnegative"
+		}
+		if (m < 1 || f < 1) {
+			throw "Height and width must be at least 1"
+		}
+		var l = g + f;
+		var e = j + m;
+		if (e > this.height || l > this.width) {
+			throw "The region must fit inside the matrix"
+		}
+		for (var i = j; i < e; i++) {
+			var h = i * this.rowSize;
+			for (var k = g; k < l; k++) {
+				this.bits[h + (k >> 5)] |= 1 << (k & 31)
+			}
+		}
+	}
+}
+
+function _dl(a, b) {
+	this._dv = a;
+	this._dw = b;
+	this.__defineGetter__("_du", function() {
+		return this._dv
+	});
+	this.__defineGetter__("Codewords", function() {
+		return this._dw
+	})
+}
+_dl._gn = function(c, h, r) {
+	if (c.length != h._dp) {
+		throw "bad arguments"
+	}
+	var k = h._bu(r);
+	var e = 0;
+	var d = k._fb();
+	for (var q = 0; q < d.length; q++) {
+		e += d[q].Count
+	}
+	var l = new Array(e);
+	var n = 0;
+	for (var o = 0; o < d.length; o++) {
+		var f = d[o];
+		for (var q = 0; q < f.Count; q++) {
+			var m = f._dm;
+			var s = k._bo + m;
+			l[n++] = new _dl(m, new Array(s))
+		}
+	}
+	var t = l[0]._dw.length;
+	var b = l.length - 1;
+	while (b >= 0) {
+		var v = l[b]._dw.length;
+		if (v == t) {
+			break
+		}
+		b--
+	}
+	b++;
+	var g = t - k._bo;
+	var a = 0;
+	for (var q = 0; q < g; q++) {
+		for (var o = 0; o < n; o++) {
+			l[o]._dw[q] = c[a++]
+		}
+	}
+	for (var o = b; o < n; o++) {
+		l[o]._dw[g] = c[a++]
+	}
+	var p = l[0]._dw.length;
+	for (var q = g; q < p; q++) {
+		for (var o = 0; o < n; o++) {
+			var u = o < b ? q : q + 1;
+			l[o]._dw[u] = c[a++]
+		}
+	}
+	return l
+};
+
+function _cl(a) {
+	var b = a.Dimension;
+	if (b < 21 || (b & 3) != 1) {
+		throw "Error _cl"
+	}
+	this._au = a;
+	this._cp = null;
+	this._co = null;
+	this._dk = function(d, c, e) {
+		return this._au._ds(d, c) ? (e << 1) | 1 : e << 1
+	};
+	this._cm = function() {
+		if (this._co != null) {
+			return this._co
+		}
+		var g = 0;
+		for (var e = 0; e < 6; e++) {
+			g = this._dk(e, 8, g)
+		}
+		g = this._dk(7, 8, g);
+		g = this._dk(8, 8, g);
+		g = this._dk(8, 7, g);
+		for (var c = 5; c >= 0; c--) {
+			g = this._dk(8, c, g)
+		}
+		this._co = _ax._ci(g);
+		if (this._co != null) {
+			return this._co
+		}
+		var f = this._au.Dimension;
+		g = 0;
+		var d = f - 8;
+		for (var e = f - 1; e >= d; e--) {
+			g = this._dk(e, 8, g)
+		}
+		for (var c = f - 7; c < f; c++) {
+			g = this._dk(8, c, g)
+		}
+		this._co = _ax._ci(g);
+		if (this._co != null) {
+			return this._co
+		}
+		throw "Error _cm"
+	};
+	this._cq = function() {
+		if (this._cp != null) {
+			return this._cp
+		}
+		var h = this._au.Dimension;
+		var f = (h - 17) >> 2;
+		if (f <= 6) {
+			return _a3._av(f)
+		}
+		var g = 0;
+		var e = h - 11;
+		for (var c = 5; c >= 0; c--) {
+			for (var d = h - 9; d >= e; d--) {
+				g = this._dk(d, c, g)
+			}
+		}
+		this._cp = _a3._aw(g);
+		if (this._cp != null && this._cp._cr == h) {
+			return this._cp
+		}
+		g = 0;
+		for (var d = 5; d >= 0; d--) {
+			for (var c = h - 9; c >= e; c--) {
+				g = this._dk(d, c, g)
+			}
+		}
+		this._cp = _a3._aw(g);
+		if (this._cp != null && this._cp._cr == h) {
+			return this._cp
+		}
+		throw "Error _cq"
+	};
+	this._gk = function() {
+		var q = this._cm();
+		var o = this._cq();
+		var c = _dx._gl(q._dx);
+		var f = this._au.Dimension;
+		c._dj(this._au, f);
+		var k = o._aq();
+		var n = true;
+		var r = new Array(o._dp);
+		var m = 0;
+		var p = 0;
+		var h = 0;
+		for (var e = f - 1; e > 0; e -= 2) {
+			if (e == 6) {
+				e--
+			}
+			for (var l = 0; l < f; l++) {
+				var g = n ? f - 1 - l : l;
+				for (var d = 0; d < 2; d++) {
+					if (!k._ds(e - d, g)) {
+						h++;
+						p <<= 1;
+						if (this._au._ds(e - d, g)) {
+							p |= 1
+						}
+						if (h == 8) {
+							r[m++] = p;
+							h = 0;
+							p = 0
+						}
+					}
+				}
+			}
+			n ^= true
+		}
+		if (m != o._dp) {
+			throw "Error _gk"
+		}
+		return r
+	}
+}
+var _dx = {};
+_dx._gl = function(a) {
+	if (a < 0 || a > 7) {
+		throw "bad arguments"
+	}
+	return _dx._dy[a]
+};
+
+function _fg() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(b, a) {
+		return ((b + a) & 1) == 0
+	}
+}
+
+function _fh() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(b, a) {
+		return (b & 1) == 0
+	}
+}
+
+function _fi() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(b, a) {
+		return a % 3 == 0
+	}
+}
+
+function _fj() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(b, a) {
+		return (b + a) % 3 == 0
+	}
+}
+
+function _fk() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(b, a) {
+		return (((_ew(b, 1)) + (a / 3)) & 1) == 0
+	}
+}
+
+function _fl() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(c, b) {
+		var a = c * b;
+		return (a & 1) + (a % 3) == 0
+	}
+}
+
+function _fm() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(c, b) {
+		var a = c * b;
+		return (((a & 1) + (a % 3)) & 1) == 0
+	}
+}
+
+function _fn() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(b, a) {
+		return ((((b + a) & 1) + ((b * a) % 3)) & 1) == 0
+	}
+}
+_dx._dy = new Array(new _fg(), new _fh(), new _fi(), new _fj(), new _fk(), new _fl(), new _fm(), new _fn());
+
+function _db(a) {
+	this._fa = a;
+	this.decode = function(j, f) {
+		var c = new _bp(this._fa, j);
+		var p = new Array(f);
+		for (var g = 0; g < p.length; g++) {
+			p[g] = 0
+		}
+		var m = false;
+		var d = true;
+		for (var g = 0; g < f; g++) {
+			var q = c.evaluateAt(this._fa.exp(m ? g + 1 : g));
+			p[p.length - 1 - g] = q;
+			if (q != 0) {
+				d = false
+			}
+		}
+		if (d) {
+			return
+		}
+		var b = new _bp(this._fa, p);
+		var l = this._eb(this._fa._ba(f, 1), b, f);
+		var o = l[0];
+		var n = l[1];
+		var k = this._ey(o);
+		var e = this._di(n, k, m);
+		for (var g = 0; g < k.length; g++) {
+			var h = j.length - 1 - this._fa.log(k[g]);
+			if (h < 0) {
+				throw "ReedSolomonException Bad error location"
+			}
+			j[h] = _az._bd(j[h], e[g])
+		}
+	};
+	this._eb = function(z, y, f) {
+		if (z._ec < y._ec) {
+			var w = z;
+			z = y;
+			y = w
+		}
+		var B = z;
+		var k = y;
+		var o = this._fa.One;
+		var j = this._fa.Zero;
+		var e = this._fa.Zero;
+		var i = this._fa.One;
+		while (k._ec >= Math.floor(f / 2)) {
+			var x = B;
+			var g = o;
+			var v = e;
+			B = k;
+			o = j;
+			e = i;
+			if (B.Zero) {
+				throw "r_{i-1} was zero"
+			}
+			k = x;
+			var m = this._fa.Zero;
+			var p = B._ex(B._ec);
+			var h = this._fa.inverse(p);
+			while (k._ec >= B._ec && !k.Zero) {
+				var c = k._ec - B._ec;
+				var A = this._fa.multiply(k._ex(k._ec), h);
+				m = m._bd(this._fa._ba(c, A));
+				k = k._bd(B._dc(c, A))
+			}
+			j = m.multiply1(o)._bd(g);
+			i = m.multiply1(e)._bd(v)
+		}
+		var u = i._ex(0);
+		if (u == 0) {
+			throw "ReedSolomonException sigmaTilde(0) was zero"
+		}
+		var d = this._fa.inverse(u);
+		var n = i.multiply2(d);
+		var l = k.multiply2(d);
+		return new Array(n, l)
+	};
+	this._ey = function(f) {
+		var g = f._ec;
+		if (g == 1) {
+			return new Array(f._ex(1))
+		}
+		var b = new Array(g);
+		var d = 0;
+		for (var c = 1; c < 256 && d < g; c++) {
+			if (f.evaluateAt(c) == 0) {
+				b[d] = this._fa.inverse(c);
+				d++
+			}
+		}
+		if (d != g) {
+			throw "Error locator degree does not match number of roots"
+		}
+		return b
+	};
+	this._di = function(f, h, g) {
+		var k = h.length;
+		var l = new Array(k);
+		for (var e = 0; e < k; e++) {
+			var b = this._fa.inverse(h[e]);
+			var c = 1;
+			for (var d = 0; d < k; d++) {
+				if (e != d) {
+					c = this._fa.multiply(c, _az._bd(1, this._fa.multiply(h[d], b)))
+				}
+			}
+			l[e] = this._fa.multiply(f.evaluateAt(b), this._fa.inverse(c));
+			if (g) {
+				l[e] = this._fa.multiply(l[e], b)
+			}
+		}
+		return l
+	}
+}
+
+function _bp(f, e) {
+	if (e == null || e.length == 0) {
+		throw "bad arguments"
+	}
+	this._fa = f;
+	var c = e.length;
+	if (c > 1 && e[0] == 0) {
+		var d = 1;
+		while (d < c && e[d] == 0) {
+			d++
+		}
+		if (d == c) {
+			this._dd = f.Zero._dd
+		} else {
+			this._dd = new Array(c - d);
+			for (var b = 0; b < this._dd.length; b++) {
+				this._dd[b] = 0
+			}
+			for (var a = 0; a < this._dd.length; a++) {
+				this._dd[a] = e[d + a]
+			}
+		}
+	} else {
+		this._dd = e
+	}
+	this.__defineGetter__("Zero", function() {
+		return this._dd[0] == 0
+	});
+	this.__defineGetter__("_ec", function() {
+		return this._dd.length - 1
+	});
+	this.__defineGetter__("Coefficients", function() {
+		return this._dd
+	});
+	this._ex = function(g) {
+		return this._dd[this._dd.length - 1 - g]
+	};
+	this.evaluateAt = function(h) {
+		if (h == 0) {
+			return this._ex(0)
+		}
+		var l = this._dd.length;
+		if (h == 1) {
+			var g = 0;
+			for (var k = 0; k < l; k++) {
+				g = _az._bd(g, this._dd[k])
+			}
+			return g
+		}
+		var j = this._dd[0];
+		for (var k = 1; k < l; k++) {
+			j = _az._bd(this._fa.multiply(h, j), this._dd[k])
+		}
+		return j
+	};
+	this._bd = function(g) {
+		if (this._fa != g._fa) {
+			throw "GF256Polys do not have same _az _fa"
+		}
+		if (this.Zero) {
+			return g
+		}
+		if (g.Zero) {
+			return this
+		}
+		var o = this._dd;
+		var n = g._dd;
+		if (o.length > n.length) {
+			var j = o;
+			o = n;
+			n = j
+		}
+		var h = new Array(n.length);
+		var k = n.length - o.length;
+		for (var m = 0; m < k; m++) {
+			h[m] = n[m]
+		}
+		for (var l = k; l < n.length; l++) {
+			h[l] = _az._bd(o[l - k], n[l])
+		}
+		return new _bp(f, h)
+	};
+	this.multiply1 = function(o) {
+		if (this._fa != o._fa) {
+			throw "GF256Polys do not have same _az _fa"
+		}
+		if (this.Zero || o.Zero) {
+			return this._fa.Zero
+		}
+		var q = this._dd;
+		var g = q.length;
+		var l = o._dd;
+		var n = l.length;
+		var p = new Array(g + n - 1);
+		for (var m = 0; m < g; m++) {
+			var h = q[m];
+			for (var k = 0; k < n; k++) {
+				p[m + k] = _az._bd(p[m + k], this._fa.multiply(h, l[k]))
+			}
+		}
+		return new _bp(this._fa, p)
+	};
+	this.multiply2 = function(g) {
+		if (g == 0) {
+			return this._fa.Zero
+		}
+		if (g == 1) {
+			return this
+		}
+		var j = this._dd.length;
+		var k = new Array(j);
+		for (var h = 0; h < j; h++) {
+			k[h] = this._fa.multiply(this._dd[h], g)
+		}
+		return new _bp(this._fa, k)
+	};
+	this._dc = function(l, g) {
+		if (l < 0) {
+			throw "bad arguments"
+		}
+		if (g == 0) {
+			return this._fa.Zero
+		}
+		var j = this._dd.length;
+		var k = new Array(j + l);
+		for (var h = 0; h < k.length; h++) {
+			k[h] = 0
+		}
+		for (var h = 0; h < j; h++) {
+			k[h] = this._fa.multiply(this._dd[h], g)
+		}
+		return new _bp(this._fa, k)
+	};
+	this.divide = function(l) {
+		if (this._fa != l._fa) {
+			throw "GF256Polys do not have same _az _fa"
+		}
+		if (l.Zero) {
+			throw "Divide by 0"
+		}
+		var j = this._fa.Zero;
+		var o = this;
+		var g = l._ex(l._ec);
+		var n = this._fa.inverse(g);
+		while (o._ec >= l._ec && !o.Zero) {
+			var m = o._ec - l._ec;
+			var h = this._fa.multiply(o._ex(o._ec), n);
+			var i = l._dc(m, h);
+			var k = this._fa._ba(m, h);
+			j = j._bd(k);
+			o = o._bd(i)
+		}
+		return new Array(j, o)
+	}
+}
+
+function _az(b) {
+	this._gh = new Array(256);
+	this._gi = new Array(256);
+	var a = 1;
+	for (var e = 0; e < 256; e++) {
+		this._gh[e] = a;
+		a <<= 1;
+		if (a >= 256) {
+			a ^= b
+		}
+	}
+	for (var e = 0; e < 255; e++) {
+		this._gi[this._gh[e]] = e
+	}
+	var d = new Array(1);
+	d[0] = 0;
+	this.zero = new _bp(this, new Array(d));
+	var c = new Array(1);
+	c[0] = 1;
+	this.one = new _bp(this, new Array(c));
+	this.__defineGetter__("Zero", function() {
+		return this.zero
+	});
+	this.__defineGetter__("One", function() {
+		return this.one
+	});
+	this._ba = function(j, f) {
+		if (j < 0) {
+			throw "bad arguments"
+		}
+		if (f == 0) {
+			return zero
+		}
+		var h = new Array(j + 1);
+		for (var g = 0; g < h.length; g++) {
+			h[g] = 0
+		}
+		h[0] = f;
+		return new _bp(this, h)
+	};
+	this.exp = function(f) {
+		return this._gh[f]
+	};
+	this.log = function(f) {
+		if (f == 0) {
+			throw "bad arguments"
+		}
+		return this._gi[f]
+	};
+	this.inverse = function(f) {
+		if (f == 0) {
+			throw "System.ArithmeticException"
+		}
+		return this._gh[255 - this._gi[f]]
+	};
+	this.multiply = function(g, f) {
+		if (g == 0 || f == 0) {
+			return 0
+		}
+		if (g == 1) {
+			return f
+		}
+		if (f == 1) {
+			return g
+		}
+		return this._gh[(this._gi[g] + this._gi[f]) % 255]
+	}
+}
+_az._bb = new _az(285);
+_az._bc = new _az(301);
+_az._bd = function(d, c) {
+	return d ^ c
+};
+var Decoder = {};
+Decoder.rsDecoder = new _db(_az._bb);
+Decoder.correctErrors = function(g, b) {
+	var d = g.length;
+	var f = new Array(d);
+	for (var e = 0; e < d; e++) {
+		f[e] = g[e] & 255
+	}
+	var a = g.length - b;
+	try {
+		Decoder.rsDecoder.decode(f, a)
+	} catch (c) {
+		throw c
+	}
+	for (var e = 0; e < b; e++) {
+		g[e] = f[e]
+	}
+};
+Decoder.decode = function(q) {
+	var b = new _cl(q);
+	var o = b._cq();
+	var c = b._cm()._cg;
+	var p = b._gk();
+	var a = _dl._gn(p, o, c);
+	var f = 0;
+	for (var k = 0; k < a.length; k++) {
+		f += a[k]._du
+	}
+	var e = new Array(f);
+	var n = 0;
+	for (var h = 0; h < a.length; h++) {
+		var m = a[h];
+		var d = m.Codewords;
+		var g = m._du;
+		Decoder.correctErrors(d, g);
+		for (var k = 0; k < g; k++) {
+			e[n++] = d[k]
+		}
+	}
+	var l = new QRCodeDataBlockReader(e, o._fd, c.Bits);
+	return l
+};
+var qrcode = {};
+qrcode.imagedata = null;
+qrcode.width = 0;
+qrcode.height = 0;
+qrcode.qrCodeSymbol = null;
+qrcode.debug = false;
+qrcode.maxImgSize = 1024 * 1024;
+qrcode._eo = [
+	[10, 9, 8, 8],
+	[12, 11, 16, 10],
+	[14, 13, 16, 12]
+];
+qrcode.callback = null;
+qrcode.vidSuccess = function(a) {
+	qrcode.localstream = a;
+	if (qrcode.webkit) {
+		qrcode.video.src = window.webkitURL.createObjectURL(a)
+	} else {
+		if (qrcode.moz) {
+			qrcode.video.mozSrcObject = a;
+			qrcode.video.play()
+		} else {
+			qrcode.video.src = a
+		}
+	}
+	qrcode.gUM = true;
+	qrcode.canvas_qr2 = document.createElement("canvas");
+	qrcode.canvas_qr2.id = "qr-canvas";
+	qrcode.qrcontext2 = qrcode.canvas_qr2.getContext("2d");
+	qrcode.canvas_qr2.width = qrcode.video.videoWidth;
+	qrcode.canvas_qr2.height = qrcode.video.videoHeight;
+	setTimeout(qrcode.captureToCanvas, 500)
+};
+qrcode.vidError = function(a) {
+	qrcode.gUM = false;
+	return
+};
+qrcode.captureToCanvas = function() {
+	if (qrcode.gUM) {
+		try {
+			if (qrcode.video.videoWidth == 0) {
+				setTimeout(qrcode.captureToCanvas, 500);
+				return
+			} else {
+				qrcode.canvas_qr2.width = qrcode.video.videoWidth;
+				qrcode.canvas_qr2.height = qrcode.video.videoHeight
+			}
+			qrcode.qrcontext2.drawImage(qrcode.video, 0, 0);
+			try {
+				qrcode.decode()
+			} catch (a) {
+				console.log(a);
+				setTimeout(qrcode.captureToCanvas, 500)
+			}
+		} catch (a) {
+			console.log(a);
+			setTimeout(qrcode.captureToCanvas, 500)
+		}
+	}
+};
+qrcode.setWebcam = function(c) {
+	var d = navigator;
+	qrcode.video = document.getElementById(c);
+	var a = true;
+	if (navigator.mediaDevices && navigator.mediaDevices.enumerateDevices) {
+		try {
+			navigator.mediaDevices.enumerateDevices().then(function(e) {
+				e.forEach(function(f) {
+					console.log("deb1");
+					if (f.kind === "videoinput") {
+						if (f.label.toLowerCase().search("back") > -1) {
+							a = [{
+								sourceId: f.deviceId
+							}]
+						}
+					}
+					console.log(f.kind + ": " + f.label + " id = " + f.deviceId)
+				})
+			})
+		} catch (b) {
+			console.log(b)
+		}
+	} else {
+		console.log("no navigator.mediaDevices.enumerateDevices")
+	}
+	if (d.getUserMedia) {
+		d.getUserMedia({
+			video: a,
+			audio: false
+		}, qrcode.vidSuccess, qrcode.vidError)
+	} else {
+		if (d.webkitGetUserMedia) {
+			qrcode.webkit = true;
+			d.webkitGetUserMedia({
+				video: a,
+				audio: false
+			}, qrcode.vidSuccess, qrcode.vidError)
+		} else {
+			if (d.mozGetUserMedia) {
+				qrcode.moz = true;
+				d.mozGetUserMedia({
+					video: a,
+					audio: false
+				}, qrcode.vidSuccess, qrcode.vidError)
+			}
+		}
+	}
+};
+qrcode.decode = function(d) {
+	if (arguments.length == 0) {
+		if (qrcode.canvas_qr2) {
+			var b = qrcode.canvas_qr2;
+			var a = qrcode.qrcontext2
+		} else {
+			var b = document.getElementById("qr-canvas");
+			var a = b.getContext("2d")
+		}
+		qrcode.width = b.width;
+		qrcode.height = b.height;
+		qrcode.imagedata = a.getImageData(0, 0, qrcode.width, qrcode.height);
+		qrcode.result = qrcode.process(a);
+		if (qrcode.callback != null) {
+			qrcode.callback(qrcode.result)
+		}
+		return qrcode.result
+	} else {
+		var c = new Image();
+		c.crossOrigin = "Anonymous";
+		c.onload = function() {
+			var g = document.getElementById("out-canvas");
+			if (g != null) {
+				var j = g.getContext("2d");
+				j.clearRect(0, 0, 320, 240);
+				j.drawImage(c, 0, 0, 320, 240)
+			}
+			var i = document.createElement("canvas");
+			var h = i.getContext("2d");
+			var f = c.height;
+			var l = c.width;
+			if (c.width * c.height > qrcode.maxImgSize) {
+				var k = c.width / c.height;
+				f = Math.sqrt(qrcode.maxImgSize / k);
+				l = k * f
+			}
+			i.width = l;
+			i.height = f;
+			h.drawImage(c, 0, 0, i.width, i.height);
+			qrcode.width = i.width;
+			qrcode.height = i.height;
+			try {
+				qrcode.imagedata = h.getImageData(0, 0, i.width, i.height)
+			} catch (m) {
+				qrcode.result =
+					"Cross domain image reading not supported in your browser! Save it to your computer then drag and drop the file!";
+				if (qrcode.callback != null) {
+					qrcode.callback(qrcode.result)
+				}
+				return
+			}
+			try {
+				qrcode.result = qrcode.process(h)
+			} catch (m) {
+				console.log(m);
+				qrcode.result = "error decoding QR Code"
+			}
+			if (qrcode.callback != null) {
+				qrcode.callback(qrcode.result)
+			}
+		};
+		c.onerror = function() {
+			if (qrcode.callback != null) {
+				qrcode.callback("Failed to load the image")
+			}
+		};
+		c.src = d
+	}
+};
+qrcode.isUrl = function(a) {
+	var b = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
+	return b.test(a)
+};
+qrcode.decode_url = function(b) {
+	var d = "";
+	try {
+		d = escape(b)
+	} catch (c) {
+		console.log(c);
+		d = b
+	}
+	var a = "";
+	try {
+		a = decodeURIComponent(d)
+	} catch (c) {
+		console.log(c);
+		a = d
+	}
+	return a
+};
+qrcode.decode_utf8 = function(a) {
+	if (qrcode.isUrl(a)) {
+		return qrcode.decode_url(a)
+	} else {
+		return a
+	}
+};
+qrcode.process = function(q) {
+	var a = new Date().getTime();
+	var c = qrcode.grayScaleToBitmap(qrcode.grayscale());
+	if (qrcode.debug) {
+		for (var m = 0; m < qrcode.height; m++) {
+			for (var n = 0; n < qrcode.width; n++) {
+				var o = (n * 4) + (m * qrcode.width * 4);
+				qrcode.imagedata.data[o] = c[n + m * qrcode.width] ? 0 : 0;
+				qrcode.imagedata.data[o + 1] = c[n + m * qrcode.width] ? 0 : 0;
+				qrcode.imagedata.data[o + 2] = c[n + m * qrcode.width] ? 255 : 0
+			}
+		}
+		q.putImageData(qrcode.imagedata, 0, 0)
+	}
+	var h = new Detector(c);
+	var p = h.detect();
+	if (qrcode.debug) {
+		for (var m = 0; m < p.bits.Height; m++) {
+			for (var n = 0; n < p.bits.Width; n++) {
+				var o = (n * 4 * 2) + (m * 2 * qrcode.width * 4);
+				qrcode.imagedata.data[o] = p.bits._ds(n, m) ? 0 : 0;
+				qrcode.imagedata.data[o + 1] = p.bits._ds(n, m) ? 0 : 0;
+				qrcode.imagedata.data[o + 2] = p.bits._ds(n, m) ? 255 : 0
+			}
+		}
+		q.putImageData(qrcode.imagedata, 0, 0)
+	}
+	var k = Decoder.decode(p.bits);
+	var g = k.DataByte;
+	var l = "";
+	for (var f = 0; f < g.length; f++) {
+		for (var e = 0; e < g[f].length; e++) {
+			l += String.fromCharCode(g[f][e])
+		}
+	}
+	var d = new Date().getTime();
+	var b = d - a;
+	return qrcode.decode_utf8(l)
+};
+qrcode.getPixel = function(b, d) {
+	if (qrcode.width < b) {
+		throw "point error"
+	}
+	if (qrcode.height < d) {
+		throw "point error"
+	}
+	var a = (b * 4) + (d * qrcode.width * 4);
+	var c = (qrcode.imagedata.data[a] * 33 + qrcode.imagedata.data[a + 1] * 34 + qrcode.imagedata.data[a + 2] *
+		33) / 100;
+	return c
+};
+qrcode.binarize = function(d) {
+	var c = new Array(qrcode.width * qrcode.height);
+	for (var e = 0; e < qrcode.height; e++) {
+		for (var b = 0; b < qrcode.width; b++) {
+			var a = qrcode.getPixel(b, e);
+			c[b + e * qrcode.width] = a <= d ? true : false
+		}
+	}
+	return c
+};
+qrcode._em = function(d) {
+	var c = 4;
+	var k = Math.floor(qrcode.width / c);
+	var j = Math.floor(qrcode.height / c);
+	var f = new Array(c);
+	for (var g = 0; g < c; g++) {
+		f[g] = new Array(c);
+		for (var e = 0; e < c; e++) {
+			f[g][e] = new Array(0, 0)
+		}
+	}
+	for (var o = 0; o < c; o++) {
+		for (var a = 0; a < c; a++) {
+			f[a][o][0] = 255;
+			for (var l = 0; l < j; l++) {
+				for (var n = 0; n < k; n++) {
+					var h = d[k * a + n + (j * o + l) * qrcode.width];
+					if (h < f[a][o][0]) {
+						f[a][o][0] = h
+					}
+					if (h > f[a][o][1]) {
+						f[a][o][1] = h
+					}
+				}
+			}
+		}
+	}
+	var m = new Array(c);
+	for (var b = 0; b < c; b++) {
+		m[b] = new Array(c)
+	}
+	for (var o = 0; o < c; o++) {
+		for (var a = 0; a < c; a++) {
+			m[a][o] = Math.floor((f[a][o][0] + f[a][o][1]) / 2)
+		}
+	}
+	return m
+};
+qrcode.grayScaleToBitmap = function(f) {
+	var k = qrcode._em(f);
+	var b = k.length;
+	var e = Math.floor(qrcode.width / b);
+	var d = Math.floor(qrcode.height / b);
+	var h = new ArrayBuffer(qrcode.width * qrcode.height);
+	var c = new Uint8Array(h);
+	for (var j = 0; j < b; j++) {
+		for (var a = 0; a < b; a++) {
+			for (var g = 0; g < d; g++) {
+				for (var i = 0; i < e; i++) {
+					c[e * a + i + (d * j + g) * qrcode.width] = (f[e * a + i + (d * j + g) * qrcode.width] < k[a][
+						j]) ? true : false
+				}
+			}
+		}
+	}
+	return c
+};
+qrcode.grayscale = function() {
+	var e = new ArrayBuffer(qrcode.width * qrcode.height);
+	var c = new Uint8Array(e);
+	for (var d = 0; d < qrcode.height; d++) {
+		for (var b = 0; b < qrcode.width; b++) {
+			var a = qrcode.getPixel(b, d);
+			c[b + d * qrcode.width] = a
+		}
+	}
+	return c
+};
+
+function _ew(a, b) {
+	if (a >= 0) {
+		return a >> b
+	} else {
+		return (a >> b) + (2 << ~b)
+	}
+}
+var _gf = 3;
+var _eh = 57;
+var _el = 8;
+var _eg = 2;
+qrcode._er = function(c) {
+	function b(m, k) {
+		var n = m.X - k.X;
+		var l = m.Y - k.Y;
+		return Math.sqrt((n * n + l * l))
+	}
+
+	function d(k, o, n) {
+		var m = o.x;
+		var l = o.y;
+		return ((n.x - m) * (k.y - l)) - ((n.y - l) * (k.x - m))
+	}
+	var i = b(c[0], c[1]);
+	var f = b(c[1], c[2]);
+	var e = b(c[0], c[2]);
+	var a, j, h;
+	if (f >= i && f >= e) {
+		j = c[0];
+		a = c[1];
+		h = c[2]
+	} else {
+		if (e >= f && e >= i) {
+			j = c[1];
+			a = c[0];
+			h = c[2]
+		} else {
+			j = c[2];
+			a = c[0];
+			h = c[1]
+		}
+	}
+	if (d(a, j, h) < 0) {
+		var g = a;
+		a = h;
+		h = g
+	}
+	c[0] = a;
+	c[1] = j;
+	c[2] = h
+};
+
+function _cz(c, a, b) {
+	this.x = c;
+	this.y = a;
+	this.count = 1;
+	this._aj = b;
+	this.__defineGetter__("_ei", function() {
+		return this._aj
+	});
+	this.__defineGetter__("Count", function() {
+		return this.count
+	});
+	this.__defineGetter__("X", function() {
+		return this.x
+	});
+	this.__defineGetter__("Y", function() {
+		return this.y
+	});
+	this._ek = function() {
+		this.count++
+	};
+	this._ev = function(f, e, d) {
+		if (Math.abs(e - this.y) <= f && Math.abs(d - this.x) <= f) {
+			var g = Math.abs(f - this._aj);
+			return g <= 1 || g / this._aj <= 1
+		}
+		return false
+	}
+}
+
+function _es(a) {
+	this._go = a[0];
+	this._gu = a[1];
+	this._gr = a[2];
+	this.__defineGetter__("_gp", function() {
+		return this._go
+	});
+	this.__defineGetter__("_gq", function() {
+		return this._gu
+	});
+	this.__defineGetter__("_gs", function() {
+		return this._gr
+	})
+}
+
+function _cc() {
+	this.image = null;
+	this._cv = [];
+	this._ge = false;
+	this._al = new Array(0, 0, 0, 0, 0);
+	this._am = null;
+	this.__defineGetter__("_da", function() {
+		this._al[0] = 0;
+		this._al[1] = 0;
+		this._al[2] = 0;
+		this._al[3] = 0;
+		this._al[4] = 0;
+		return this._al
+	});
+	this._ao = function(f) {
+		var b = 0;
+		for (var d = 0; d < 5; d++) {
+			var e = f[d];
+			if (e == 0) {
+				return false
+			}
+			b += e
+		}
+		if (b < 7) {
+			return false
+		}
+		var c = Math.floor((b << _el) / 7);
+		var a = Math.floor(c / 2);
+		return Math.abs(c - (f[0] << _el)) < a && Math.abs(c - (f[1] << _el)) < a && Math.abs(3 * c - (f[2] <<
+			_el)) < 3 * a && Math.abs(c - (f[3] << _el)) < a && Math.abs(c - (f[4] << _el)) < a
+	};
+	this._an = function(b, a) {
+		return (a - b[4] - b[3]) - b[2] / 2
+	};
+	this._ap = function(a, j, d, g) {
+		var c = this.image;
+		var h = qrcode.height;
+		var b = this._da;
+		var f = a;
+		while (f >= 0 && c[j + f * qrcode.width]) {
+			b[2]++;
+			f--
+		}
+		if (f < 0) {
+			return NaN
+		}
+		while (f >= 0 && !c[j + f * qrcode.width] && b[1] <= d) {
+			b[1]++;
+			f--
+		}
+		if (f < 0 || b[1] > d) {
+			return NaN
+		}
+		while (f >= 0 && c[j + f * qrcode.width] && b[0] <= d) {
+			b[0]++;
+			f--
+		}
+		if (b[0] > d) {
+			return NaN
+		}
+		f = a + 1;
+		while (f < h && c[j + f * qrcode.width]) {
+			b[2]++;
+			f++
+		}
+		if (f == h) {
+			return NaN
+		}
+		while (f < h && !c[j + f * qrcode.width] && b[3] < d) {
+			b[3]++;
+			f++
+		}
+		if (f == h || b[3] >= d) {
+			return NaN
+		}
+		while (f < h && c[j + f * qrcode.width] && b[4] < d) {
+			b[4]++;
+			f++
+		}
+		if (b[4] >= d) {
+			return NaN
+		}
+		var e = b[0] + b[1] + b[2] + b[3] + b[4];
+		if (5 * Math.abs(e - g) >= 2 * g) {
+			return NaN
+		}
+		return this._ao(b) ? this._an(b, f) : NaN
+	};
+	this._ej = function(b, a, e, h) {
+		var d = this.image;
+		var i = qrcode.width;
+		var c = this._da;
+		var g = b;
+		while (g >= 0 && d[g + a * qrcode.width]) {
+			c[2]++;
+			g--
+		}
+		if (g < 0) {
+			return NaN
+		}
+		while (g >= 0 && !d[g + a * qrcode.width] && c[1] <= e) {
+			c[1]++;
+			g--
+		}
+		if (g < 0 || c[1] > e) {
+			return NaN
+		}
+		while (g >= 0 && d[g + a * qrcode.width] && c[0] <= e) {
+			c[0]++;
+			g--
+		}
+		if (c[0] > e) {
+			return NaN
+		}
+		g = b + 1;
+		while (g < i && d[g + a * qrcode.width]) {
+			c[2]++;
+			g++
+		}
+		if (g == i) {
+			return NaN
+		}
+		while (g < i && !d[g + a * qrcode.width] && c[3] < e) {
+			c[3]++;
+			g++
+		}
+		if (g == i || c[3] >= e) {
+			return NaN
+		}
+		while (g < i && d[g + a * qrcode.width] && c[4] < e) {
+			c[4]++;
+			g++
+		}
+		if (c[4] >= e) {
+			return NaN
+		}
+		var f = c[0] + c[1] + c[2] + c[3] + c[4];
+		if (5 * Math.abs(f - h) >= h) {
+			return NaN
+		}
+		return this._ao(c) ? this._an(c, g) : NaN
+	};
+	this._cu = function(c, f, e) {
+		var d = c[0] + c[1] + c[2] + c[3] + c[4];
+		var n = this._an(c, e);
+		var b = this._ap(f, Math.floor(n), c[2], d);
+		if (!isNaN(b)) {
+			n = this._ej(Math.floor(n), Math.floor(b), c[2], d);
+			if (!isNaN(n)) {
+				var l = d / 7;
+				var m = false;
+				var h = this._cv.length;
+				for (var g = 0; g < h; g++) {
+					var a = this._cv[g];
+					if (a._ev(l, b, n)) {
+						a._ek();
+						m = true;
+						break
+					}
+				}
+				if (!m) {
+					var k = new _cz(n, b, l);
+					this._cv.push(k);
+					if (this._am != null) {
+						this._am._ep(k)
+					}
+				}
+				return true
+			}
+		}
+		return false
+	};
+	this._ee = function() {
+		var h = this._cv.length;
+		if (h < 3) {
+			throw "Couldn't find enough finder patterns (found " + h + ")"
+		}
+		if (h > 3) {
+			var b = 0;
+			var j = 0;
+			for (var d = 0; d < h; d++) {
+				var g = this._cv[d]._ei;
+				b += g;
+				j += (g * g)
+			}
+			var a = b / h;
+			this._cv.sort(function(m, l) {
+				var k = Math.abs(l._ei - a);
+				var i = Math.abs(m._ei - a);
+				if (k < i) {
+					return (-1)
+				} else {
+					if (k == i) {
+						return 0
+					} else {
+						return 1
+					}
+				}
+			});
+			var e = Math.sqrt(j / h - a * a);
+			var c = Math.max(0.2 * a, e);
+			for (var d = this._cv.length - 1; d >= 0; d--) {
+				var f = this._cv[d];
+				if (Math.abs(f._ei - a) > c) {
+					this._cv.splice(d, 1)
+				}
+			}
+		}
+		if (this._cv.length > 3) {
+			this._cv.sort(function(k, i) {
+				if (k.count > i.count) {
+					return -1
+				}
+				if (k.count < i.count) {
+					return 1
+				}
+				return 0
+			})
+		}
+		return new Array(this._cv[0], this._cv[1], this._cv[2])
+	};
+	this._eq = function() {
+		var b = this._cv.length;
+		if (b <= 1) {
+			return 0
+		}
+		var c = null;
+		for (var d = 0; d < b; d++) {
+			var a = this._cv[d];
+			if (a.Count >= _eg) {
+				if (c == null) {
+					c = a
+				} else {
+					this._ge = true;
+					return Math.floor((Math.abs(c.X - a.X) - Math.abs(c.Y - a.Y)) / 2)
+				}
+			}
+		}
+		return 0
+	};
+	this._cx = function() {
+		var g = 0;
+		var c = 0;
+		var a = this._cv.length;
+		for (var d = 0; d < a; d++) {
+			var f = this._cv[d];
+			if (f.Count >= _eg) {
+				g++;
+				c += f._ei
+			}
+		}
+		if (g < 3) {
+			return false
+		}
+		var e = c / a;
+		var b = 0;
+		for (var d = 0; d < a; d++) {
+			f = this._cv[d];
+			b += Math.abs(f._ei - e)
+		}
+		return b <= 0.05 * c
+	};
+	this._ce = function(e) {
+		var o = false;
+		this.image = e;
+		var n = qrcode.height;
+		var k = qrcode.width;
+		var a = Math.floor((3 * n) / (4 * _eh));
+		if (a < _gf || o) {
+			a = _gf
+		}
+		var g = false;
+		var d = new Array(5);
+		for (var h = a - 1; h < n && !g; h += a) {
+			d[0] = 0;
+			d[1] = 0;
+			d[2] = 0;
+			d[3] = 0;
+			d[4] = 0;
+			var b = 0;
+			for (var f = 0; f < k; f++) {
+				if (e[f + h * qrcode.width]) {
+					if ((b & 1) == 1) {
+						b++
+					}
+					d[b]++
+				} else {
+					if ((b & 1) == 0) {
+						if (b == 4) {
+							if (this._ao(d)) {
+								var c = this._cu(d, h, f);
+								if (c) {
+									a = 2;
+									if (this._ge) {
+										g = this._cx()
+									} else {
+										var m = this._eq();
+										if (m > d[2]) {
+											h += m - d[2] - a;
+											f = k - 1
+										}
+									}
+								} else {
+									do {
+										f++
+									} while (f < k && !e[f + h * qrcode.width]);
+									f--
+								}
+								b = 0;
+								d[0] = 0;
+								d[1] = 0;
+								d[2] = 0;
+								d[3] = 0;
+								d[4] = 0
+							} else {
+								d[0] = d[2];
+								d[1] = d[3];
+								d[2] = d[4];
+								d[3] = 1;
+								d[4] = 0;
+								b = 3
+							}
+						} else {
+							d[++b]++
+						}
+					} else {
+						d[b]++
+					}
+				}
+			}
+			if (this._ao(d)) {
+				var c = this._cu(d, h, k);
+				if (c) {
+					a = d[0];
+					if (this._ge) {
+						g = _cx()
+					}
+				}
+			}
+		}
+		var l = this._ee();
+		qrcode._er(l);
+		return new _es(l)
+	}
+}
+
+function _ai(c, a, b) {
+	this.x = c;
+	this.y = a;
+	this.count = 1;
+	this._aj = b;
+	this.__defineGetter__("_ei", function() {
+		return this._aj
+	});
+	this.__defineGetter__("Count", function() {
+		return this.count
+	});
+	this.__defineGetter__("X", function() {
+		return Math.floor(this.x)
+	});
+	this.__defineGetter__("Y", function() {
+		return Math.floor(this.y)
+	});
+	this._ek = function() {
+		this.count++
+	};
+	this._ev = function(f, e, d) {
+		if (Math.abs(e - this.y) <= f && Math.abs(d - this.x) <= f) {
+			var g = Math.abs(f - this._aj);
+			return g <= 1 || g / this._aj <= 1
+		}
+		return false
+	}
+}
+
+function _ak(g, c, b, f, a, e, d) {
+	this.image = g;
+	this._cv = new Array();
+	this.startX = c;
+	this.startY = b;
+	this.width = f;
+	this.height = a;
+	this._ef = e;
+	this._al = new Array(0, 0, 0);
+	this._am = d;
+	this._an = function(i, h) {
+		return (h - i[2]) - i[1] / 2
+	};
+	this._ao = function(l) {
+		var k = this._ef;
+		var h = k / 2;
+		for (var j = 0; j < 3; j++) {
+			if (Math.abs(k - l[j]) >= h) {
+				return false
+			}
+		}
+		return true
+	};
+	this._ap = function(h, q, l, o) {
+		var k = this.image;
+		var p = qrcode.height;
+		var j = this._al;
+		j[0] = 0;
+		j[1] = 0;
+		j[2] = 0;
+		var n = h;
+		while (n >= 0 && k[q + n * qrcode.width] && j[1] <= l) {
+			j[1]++;
+			n--
+		}
+		if (n < 0 || j[1] > l) {
+			return NaN
+		}
+		while (n >= 0 && !k[q + n * qrcode.width] && j[0] <= l) {
+			j[0]++;
+			n--
+		}
+		if (j[0] > l) {
+			return NaN
+		}
+		n = h + 1;
+		while (n < p && k[q + n * qrcode.width] && j[1] <= l) {
+			j[1]++;
+			n++
+		}
+		if (n == p || j[1] > l) {
+			return NaN
+		}
+		while (n < p && !k[q + n * qrcode.width] && j[2] <= l) {
+			j[2]++;
+			n++
+		}
+		if (j[2] > l) {
+			return NaN
+		}
+		var m = j[0] + j[1] + j[2];
+		if (5 * Math.abs(m - o) >= 2 * o) {
+			return NaN
+		}
+		return this._ao(j) ? this._an(j, n) : NaN
+	};
+	this._cu = function(l, o, n) {
+		var m = l[0] + l[1] + l[2];
+		var t = this._an(l, n);
+		var k = this._ap(o, Math.floor(t), 2 * l[1], m);
+		if (!isNaN(k)) {
+			var s = (l[0] + l[1] + l[2]) / 3;
+			var q = this._cv.length;
+			for (var p = 0; p < q; p++) {
+				var h = this._cv[p];
+				if (h._ev(s, k, t)) {
+					return new _ai(t, k, s)
+				}
+			}
+			var r = new _ai(t, k, s);
+			this._cv.push(r);
+			if (this._am != null) {
+				this._am._ep(r)
+			}
+		}
+		return null
+	};
+	this.find = function() {
+		var p = this.startX;
+		var s = this.height;
+		var q = p + f;
+		var r = b + (s >> 1);
+		var m = new Array(0, 0, 0);
+		for (var k = 0; k < s; k++) {
+			var o = r + ((k & 1) == 0 ? ((k + 1) >> 1) : -((k + 1) >> 1));
+			m[0] = 0;
+			m[1] = 0;
+			m[2] = 0;
+			var n = p;
+			while (n < q && !g[n + qrcode.width * o]) {
+				n++
+			}
+			var h = 0;
+			while (n < q) {
+				if (g[n + o * qrcode.width]) {
+					if (h == 1) {
+						m[h]++
+					} else {
+						if (h == 2) {
+							if (this._ao(m)) {
+								var l = this._cu(m, o, n);
+								if (l != null) {
+									return l
+								}
+							}
+							m[0] = m[2];
+							m[1] = 1;
+							m[2] = 0;
+							h = 1
+						} else {
+							m[++h]++
+						}
+					}
+				} else {
+					if (h == 1) {
+						h++
+					}
+					m[h]++
+				}
+				n++
+			}
+			if (this._ao(m)) {
+				var l = this._cu(m, o, q);
+				if (l != null) {
+					return l
+				}
+			}
+		}
+		if (!(this._cv.length == 0)) {
+			return this._cv[0]
+		}
+		throw "Couldn't find enough alignment patterns"
+	}
+}
+
+function QRCodeDataBlockReader(c, a, b) {
+	this._ed = 0;
+	this._cw = 7;
+	this.dataLength = 0;
+	this.blocks = c;
+	this._en = b;
+	if (a <= 9) {
+		this.dataLengthMode = 0
+	} else {
+		if (a >= 10 && a <= 26) {
+			this.dataLengthMode = 1
+		} else {
+			if (a >= 27 && a <= 40) {
+				this.dataLengthMode = 2
+			}
+		}
+	}
+	this._gd = function(f) {
+		var k = 0;
+		if (f < this._cw + 1) {
+			var m = 0;
+			for (var e = 0; e < f; e++) {
+				m += (1 << e)
+			}
+			m <<= (this._cw - f + 1);
+			k = (this.blocks[this._ed] & m) >> (this._cw - f + 1);
+			this._cw -= f;
+			return k
+		} else {
+			if (f < this._cw + 1 + 8) {
+				var j = 0;
+				for (var e = 0; e < this._cw + 1; e++) {
+					j += (1 << e)
+				}
+				k = (this.blocks[this._ed] & j) << (f - (this._cw + 1));
+				this._ed++;
+				k += ((this.blocks[this._ed]) >> (8 - (f - (this._cw + 1))));
+				this._cw = this._cw - f % 8;
+				if (this._cw < 0) {
+					this._cw = 8 + this._cw
+				}
+				return k
+			} else {
+				if (f < this._cw + 1 + 16) {
+					var j = 0;
+					var h = 0;
+					for (var e = 0; e < this._cw + 1; e++) {
+						j += (1 << e)
+					}
+					var g = (this.blocks[this._ed] & j) << (f - (this._cw + 1));
+					this._ed++;
+					var d = this.blocks[this._ed] << (f - (this._cw + 1 + 8));
+					this._ed++;
+					for (var e = 0; e < f - (this._cw + 1 + 8); e++) {
+						h += (1 << e)
+					}
+					h <<= 8 - (f - (this._cw + 1 + 8));
+					var l = (this.blocks[this._ed] & h) >> (8 - (f - (this._cw + 1 + 8)));
+					k = g + d + l;
+					this._cw = this._cw - (f - 8) % 8;
+					if (this._cw < 0) {
+						this._cw = 8 + this._cw
+					}
+					return k
+				} else {
+					return 0
+				}
+			}
+		}
+	};
+	this.NextMode = function() {
+		if ((this._ed > this.blocks.length - this._en - 2)) {
+			return 0
+		} else {
+			return this._gd(4)
+		}
+	};
+	this.getDataLength = function(d) {
+		var e = 0;
+		while (true) {
+			if ((d >> e) == 1) {
+				break
+			}
+			e++
+		}
+		return this._gd(qrcode._eo[this.dataLengthMode][e])
+	};
+	this.getRomanAndFigureString = function(h) {
+		var f = h;
+		var g = 0;
+		var j = "";
+		var d = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H",
+			"I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", " ", "$",
+			"%", "*", "+", "-", ".", "/", ":");
+		do {
+			if (f > 1) {
+				g = this._gd(11);
+				var i = Math.floor(g / 45);
+				var e = g % 45;
+				j += d[i];
+				j += d[e];
+				f -= 2
+			} else {
+				if (f == 1) {
+					g = this._gd(6);
+					j += d[g];
+					f -= 1
+				}
+			}
+		} while (f > 0);
+		return j
+	};
+	this.getFigureString = function(f) {
+		var d = f;
+		var e = 0;
+		var g = "";
+		do {
+			if (d >= 3) {
+				e = this._gd(10);
+				if (e < 100) {
+					g += "0"
+				}
+				if (e < 10) {
+					g += "0"
+				}
+				d -= 3
+			} else {
+				if (d == 2) {
+					e = this._gd(7);
+					if (e < 10) {
+						g += "0"
+					}
+					d -= 2
+				} else {
+					if (d == 1) {
+						e = this._gd(4);
+						d -= 1
+					}
+				}
+			}
+			g += e
+		} while (d > 0);
+		return g
+	};
+	this.get8bitByteArray = function(g) {
+		var e = g;
+		var f = 0;
+		var d = new Array();
+		do {
+			f = this._gd(8);
+			d.push(f);
+			e--
+		} while (e > 0);
+		return d
+	};
+	this.getKanjiString = function(j) {
+		var g = j;
+		var i = 0;
+		var h = "";
+		do {
+			i = _gd(13);
+			var e = i % 192;
+			var f = i / 192;
+			var k = (f << 8) + e;
+			var d = 0;
+			if (k + 33088 <= 40956) {
+				d = k + 33088
+			} else {
+				d = k + 49472
+			}
+			h += String.fromCharCode(d);
+			g--
+		} while (g > 0);
+		return h
+	};
+	this.__defineGetter__("DataByte", function() {
+		var h = new Array();
+		var e = 1;
+		var f = 2;
+		var d = 4;
+		var o = 8;
+		do {
+			var l = this.NextMode();
+			if (l == 0) {
+				if (h.length > 0) {
+					break
+				} else {
+					throw "Empty data block"
+				}
+			}
+			if (l != e && l != f && l != d && l != o) {
+				throw "Invalid mode: " + l + " in (block:" + this._ed + " bit:" + this._cw + ")"
+			}
+			var g = this.getDataLength(l);
+			if (g < 1) {
+				throw "Invalid data length: " + g
+			}
+			switch (l) {
+				case e:
+					var m = this.getFigureString(g);
+					var k = new Array(m.length);
+					for (var i = 0; i < m.length; i++) {
+						k[i] = m.charCodeAt(i)
+					}
+					h.push(k);
+					break;
+				case f:
+					var m = this.getRomanAndFigureString(g);
+					var k = new Array(m.length);
+					for (var i = 0; i < m.length; i++) {
+						k[i] = m.charCodeAt(i)
+					}
+					h.push(k);
+					break;
+				case d:
+					var n = this.get8bitByteArray(g);
+					h.push(n);
+					break;
+				case o:
+					var m = this.getKanjiString(g);
+					h.push(m);
+					break
+			}
+		} while (true);
+		return h
+	})
+};
+module.exports = {
+	qrcode: qrcode
+}

+ 229 - 0
components/scan.js

@@ -0,0 +1,229 @@
+let Qrcode = require('@/components/reqrcode.js')
+
+export function toScanCode(options) {
+	let resultData = ''
+	// #ifdef APP-PLUS
+	let platform = uni.getSystemInfoSync().platform
+	if (platform == 'ios') {
+		resultData = scanCodeIos(options)
+	} else {
+		return new Promise((resolve, reject) => {
+			uni.scanCode({
+				onlyFromCamera: options.onlyFromCamera, // 只允许通过相机扫码
+				scanType: ['barCode','qrCode'], //扫码类型 barCode一维码  qrCode二维码
+				autoZoom:true,//是否启用自动放大,默认启用
+				success: function(res) {
+					resolve(res.result);
+				}
+			});
+		})
+	}
+	// #endif 
+
+	// #ifdef H5
+	var ua = navigator.userAgent;
+	var isWeixin = !!/MicroMessenger/i.test(ua);
+	if (isWeixin) {
+		getJsApiConfig();
+		resultData = scanCodeWxH5(options)
+	} else {
+		resultData = scanCodeH5(options)
+	}
+	// #endif
+
+	return Promise.resolve(resultData);
+}
+
+
+//处理扫码内容
+export function scanContent(result) {
+
+	var obj = null;
+	try {
+		obj = JSON.parse(result)
+	} catch (err) {
+		this.$tip.error("无法识别二维码");
+		return
+	}
+	return obj;
+
+}
+
+//微信扫码   参考地址:https://mp.weixin.qq.com/s/ulq_cs-gGwkpmdt5zsU4aA
+export function scanCodeWxH5(options) {
+	let fromCamera = options.onlyFromCamera
+	return new Promise((resolve, reject) => {
+		wx.scanQRCode({
+			needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
+			scanType: ['barCode','qrCode'], // 可以指定扫二维码还是一维码,默认二者都有  barCode一维码  qrCode二维码
+			success: function(res) {
+				resolve(res.resultStr)
+			}
+		});
+	})
+}
+
+//ios 扫码  uniapp nvue自带的Barcode
+export function scanCodeIos(options) {
+	let fromCamera = options.onlyFromCamera
+	return new Promise((resolve, reject) => {
+		//开始扫码
+		toHsScanCode({
+			evalName: "hs-scancode", //扫码回调监听事件
+			msg: '扫码', //提示文本
+			fil: '0,1,2', //条码类型  0-qr二维码  1-EAN条形码标准版  2-EAN条形码简版
+			onlyFromCamera: fromCamera // 只允许通过相机扫码
+		}, res => {
+			//扫码成功后 这里自己判断,如果要自己处理结果就返回 true
+			resolve(res.result)
+			return true
+		})
+	})
+}
+//这里可以写成一个通用方法
+export function toHsScanCode(options, results) {
+	const q = Object.entries(options).map(([key, value]) => `${key}=${value}`).join('&')
+	uni.$on(options.evalName || "hs-scancode", ([error, res]) => {
+		if (res) {
+			//扫码结果
+			uni.navigateBack({
+				delta: 1,
+				animationType: "fade-out", //用 fade-out 关闭页面,减少扫码成功后跳转页面的闪动
+				animationDuration: 300,
+			})
+			if (results && results(res) === true) return;
+		}
+	})
+	uni.navigateTo({
+		url: `/pages/component/hs-scancode?${q}`
+	})
+
+}
+
+// 调用接口获取config信息
+export function getJsApiConfig() {
+	//获取到的url是当前页面的域名,而不是完整url
+	const apiUrl = location.href.split('#')[0];
+	let param = {
+		url: apiUrl
+	}
+	this.$http.get('/sys/wx/getJsApiConfig', {
+		params: param
+	}).then(res => {
+		if (res.data.success) {
+			getConfig(res.data.result);
+		} else {
+			this.$tip.error(res.data.message);
+		}
+	}).catch((err) => {
+		console.log("请求返回err", err)
+	})
+}
+
+export function getConfig(res) {
+	// 配置config信息
+	wx.config({
+		debug: false,
+		appId: res.appId, // 必填,公众号的唯一标识
+		timestamp: res.timestamp, // 必填,生成签名的时间戳
+		nonceStr: res.nonceStr, // 必填,生成签名的随机串
+		signature: res.signature, // 必填,签名
+		jsApiList: ['scanQRCode'] // 必填,需要使用的JS接口列表
+	});
+	// 通过ready接口处理成功验证
+	wx.ready(function() {
+		wx.checkJsApi({
+			jsApiList: ['scanQRCode'],
+			success: function(res) {
+				console.log('检验成功');
+			}
+		});
+	});
+	// 通过error接口处理失败验证
+	wx.error(function(res) {
+		console.log('校验失败');
+	});
+}
+
+// H5通过拉起相机拍照来识别二维码
+export function scanCodeH5(options) {
+	let fromCamera = options.onlyFromCamera
+	let sourceType = ['camera','album']
+	if(fromCamera){
+		sourceType = ['camera']
+	}
+	return new Promise((resolve, reject) => {
+		uni.chooseImage({
+			count: 1,
+			sourceType: sourceType, //来源类型
+			success: imgRes => {
+				Qrcode.qrcode.decode(getObjectURL(imgRes.tempFiles[0]))
+				Qrcode.qrcode.callback = (codeRes) => {
+					if (codeRes.indexOf('error') >= 0) {
+						// 识别失败
+						reject("二维码识别失败");
+					} else {
+						// 识别成功
+						let content = decodeStr(codeRes)
+						let formatContent = scanContent(content)
+						resolve(formatContent);
+					}
+				}
+			}
+		})
+	})
+
+}
+
+// 获取文件地址函数
+export function getObjectURL(file) {
+	var url = null
+	if (window.createObjectURL !== undefined) { // basic
+		url = window.createObjectURL(file)
+	} else if (window.URL !== undefined) { // mozilla(firefox)
+		url = window.URL.createObjectURL(file)
+	} else if (window.webkitURL !== undefined) { // webkit or chrome
+		url = window.webkitURL.createObjectURL(file)
+	}
+	return url
+}
+
+// 解码,输出:中文
+export function decodeStr(str) {
+	var out, i, len, c;
+	var char2, char3;
+	out = "";
+	len = str.length;
+	i = 0;
+	while (i < len) {
+		c = str.charCodeAt(i++);
+		switch (c >> 4) {
+			case 0:
+			case 1:
+			case 2:
+			case 3:
+			case 4:
+			case 5:
+			case 6:
+			case 7:
+				// 0xxxxxxx
+				out += str.charAt(i - 1);
+				break;
+			case 12:
+			case 13:
+				// 110x xxxx 10xx xxxx
+				char2 = str.charCodeAt(i++);
+				out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
+				break;
+			case 14:
+				// 1110 xxxx 10xx xxxx 10xx xxxx
+				char2 = str.charCodeAt(i++);
+				char3 = str.charCodeAt(i++);
+				out += String.fromCharCode(((c & 0x0F) << 12) |
+					((char2 & 0x3F) << 6) |
+					((char3 & 0x3F) << 0));
+				break;
+		}
+	}
+	return out;
+}

+ 57 - 22
manifest.json

@@ -1,9 +1,9 @@
 {
-    "name" : "7131",
+    "name" : "精联惠选",
     "appid" : "__UNI__53EB06E",
-    "description" : "",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
+    "description" : "精联惠选",
+    "versionName" : "1.0.2",
+    "versionCode" : 102,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -14,39 +14,74 @@
             "autoclose" : true,
             "delay" : 0
         },
-        "modules" : {},
+        "modules" : {
+            "Barcode" : {},
+            "Camera" : {}
+        },
         /* 模块配置 */
         "distribute" : {
             /* 应用发布信息 */
             "android" : {
                 /* android打包配置 */
                 "permissions" : [
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
                     "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
-                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>"
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
                 ],
                 "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
             },
             "ios" : {
-                "idfa" : false
+                "idfa" : false,
+                "privacyDescription" : {
+                    "NSPhotoLibraryUsageDescription" : "该应用需要读取你的相册,以便为你编辑用户信息",
+                    "NSPhotoLibraryAddUsageDescription" : "该应用需要读取你的相册,以便为你编辑用户信息",
+                    "NSCameraUsageDescription" : "该应用需要读取你的相册,以便为你编辑用户信息"
+                },
+                "dSYMs" : false
             },
             /* ios打包配置 */
             "sdkConfigs" : {
                 "maps" : {},
-                "oauth" : {
-                    "weixin" : {
-                        "appid" : "",
-                        "appsecret" : "",
-                        "UniversalLinks" : ""
+                "oauth" : {},
+                "geolocation" : {},
+                "payment" : {},
+                "push" : {},
+                "share" : {},
+                "speech" : {},
+                "statics" : {},
+                "ad" : {}
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "unpackage/res/icons/72x72.png",
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                },
+                "ios" : {
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "ipad" : {
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "iphone" : {
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
                     }
                 }
             }
@@ -65,7 +100,7 @@
         }
     },
     "h5" : {
-        "title" : "7131",
+        "title" : "精联惠选",
         "domain" : "",
         "router" : {
             "base" : "/index/",
@@ -74,7 +109,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "https://7131.liuniu946.com/api",
+                    "target" : "https://www.jlxnykj.cn/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path

+ 20 - 1
pages.json

@@ -22,9 +22,16 @@
 		{
 			"path": "pages/index/usert",
 			"style": {
+				"enablePullDownRefresh": true,
 				"navigationBarTitleText": "我的薪酬"
 			}
 		},
+		{
+			"path": "pages/index/upApp",
+			"style": {
+				"navigationBarTitleText": "更新"
+			}
+		},
 		{
 			"path": "pages/public/register",
 			"style": {
@@ -68,6 +75,12 @@
 				}
 			}
 		},
+		{
+			"path": "pages/public/privacyAgreement",
+			"style": {
+				"navigationBarTitleText": "隐私协议"
+			}
+		},
 		{
 			"path": "pages/product/reply",
 			"style": {
@@ -272,6 +285,12 @@
 				"navigationBarTitleText": "评论"
 			}
 		},
+		{
+			"path": "pages/order/hxqm",
+			"style": {
+				"navigationBarTitleText": "核销码"
+			}
+		},
 		{
 			"path": "pages/order/orderRefund",
 			"style": {
@@ -392,7 +411,7 @@
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "7131",
+		"navigationBarTitleText": "精联惠选",
 		"navigationBarBackgroundColor": "#FFFFFF",
 		"backgroundColor": "#f8f8f8"
 	},

+ 133 - 0
pages/index/upApp.vue

@@ -0,0 +1,133 @@
+<template>
+    <view class="content">
+        <view class="up-wrap">
+            <image src="../../static/img/upapp.png" mode="" class="upapp-bg"></image>
+            <view class="tit">
+                新版本升级
+            </view>
+            <view class="val">
+                客户端体验优化
+            </view>
+            <view class="btn444" @click="upApp">
+                {{is_up?(schedule + '%'): '马上更新'}}
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+    export default {
+        data() {
+            return {
+				downurl: '',
+                schedule: 0,
+                is_up: false,
+            }
+        },
+        onLoad(opt) {
+			this.downurl = opt.downurl
+        },
+        onShow() {
+
+        },
+        onBackPress() {
+            return true
+        },
+        methods: {
+            upApp() {
+                let that = this
+                    that.is_up = true
+                    let downloadTask = uni.downloadFile({
+                        url: that.downurl,
+                        success: (res1) => {
+                            // wgtWaiting.close();
+                            if (res1.statusCode === 200) {
+                                plus.runtime.install(res1.tempFilePath, {}, () => {
+                                    plus.runtime.restart();
+                                }, (e) => {
+                                    uni.showModal({
+                                        content: "update error [" +
+                                            e
+                                            .code + "]:" + e
+                                            .message,
+                                        showCancel: false,
+                                    });
+                                });
+                            } else {
+                                uni.showModal({
+                                    content: "api error update fail!",
+                                    showCancel: false,
+                                });
+                            }
+                        }
+                    });
+                    downloadTask.onProgressUpdate((res) => {
+                        console.log(res.progress);
+                        that.schedule = res.progress
+                    });
+                
+            }
+
+        }
+    }
+</script>
+
+<style lang="scss" scoped>
+    .content {
+        position: absolute;
+        height: 100%;
+        width: 100%;
+        background-color: #7f7f7f;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+    }
+
+    .up-wrap {
+        width: 522rpx;
+        height: 499rpx;
+        background: #FFFFFF;
+
+        border-radius: 28rpx;
+        position: relative;
+
+        .upapp-bg {
+            width: 345rpx;
+            height: 307rpx;
+            position: absolute;
+            left: 0;
+            right: 0;
+            top: -150rpx;
+            margin: auto;
+        }
+
+        .tit {
+            margin-top: 190rpx;
+            font-size: 39rpx;
+            font-weight: 500;
+            color: #FF443F;
+            text-align: center;
+        }
+
+        .val {
+            font-size: 31rpx;
+            font-weight: 500;
+            color: #A5A5A5;
+            text-align: center;
+            margin-top: 10rpx;
+        }
+
+        .btn444 {
+            width: 357rpx;
+            height: 83rpx !important;
+            background: #FF443F;
+            border-radius: 41rpx;
+            text-align: center;
+            line-height: 83rpx;
+            font-size: 34rpx;
+            font-weight: 500;
+            color: #FFFFFF;
+            margin: 10rpx auto 0;
+        }
+    }
+</style>

+ 12 - 1
pages/index/usert.vue

@@ -127,6 +127,9 @@
 		computed: {
 			...mapState('user',['userInfo','hasLogin'])
 		},
+		onPullDownRefresh() {
+			this.loadBaseData('down')
+		},
 		methods: {
 			...mapMutations('user',['setUserInfo']),
 			toTx() {
@@ -166,16 +169,22 @@
 					}
 				}
 			},
-			loadBaseData() {
+			loadBaseData(tit) {
 				const obj = this
 				getUserInfo({})
 					.then(({
 						data
 					}) => {
 						obj.setUserInfo(data);
+						if(tit == 'down') {
+							uni.stopPullDownRefresh();
+						}
 					})
 					.catch(e => {
 						console.log(e);
+						if(tit == 'down') {
+							uni.stopPullDownRefresh();
+						}
 					});
 			
 			},
@@ -199,12 +208,14 @@
 				
 			},
 			goft() {
+				let that = this
 				if(this.ftLoading) {
 					return
 				}
 				this.ftLoading = true
 				goft().then(res => {
 					console.log(res);
+					that.loadBaseData()
 				})
 			}
 		}

+ 5 - 1
pages/money/pay.vue

@@ -252,8 +252,12 @@ export default {
 				// #ifdef APP-PLUS
 				from: 'app', //来源
 				// #endif
-				shipping_type: 1 //提货方式 1 快递 2自提
+				shipping_type:  prepage.tabCurrentIndex + 1 ,//提货方式 1 快递 2自提
+				affiliation_uid: prepage.affiliation_uid
 			};
+			if(data.shipping_type == 2) {
+				data.store_id = prepage.checkedPoint.id
+			}
 			// 判断是否拼团商品
 			if (obj.pinkid) {
 				data.pinkId = obj.pinkid;

File diff suppressed because it is too large
+ 76 - 35
pages/order/createOrder.vue


+ 201 - 0
pages/order/hxqm.vue

@@ -0,0 +1,201 @@
+<template>
+	<view class="content" style="height: 100vh;">
+		<view class="" style="height: 87rpx;">
+
+		</view>
+		<view class="djq-wrap">
+			<view class="djq-top flex f-d-c f-j-c">
+				<view class="djq-name">
+					核销二维码
+				</view>
+				<view class="djq-time">
+					请扫码核销
+				</view>
+			</view>
+			<view class="djq-body">
+				<view class="ewm">
+					<tki-qrcode :cid="cid" ref="qrcode" :val="val" :size="size" :unit="unit" :background="background"
+						:foreground="foreground" :pdground="pdground" :iconSize="iconSize" :lv="lv" :onval="onval"
+						:loadMake="loadMake" :usingComponents="usingComponents" @result="qrR" />
+				</view>
+				<view class="ewm-code" >
+					{{showVal}}
+				</view>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
+	
+	import {
+		orderDetail
+	} from '@/api/order.js';
+	export default {
+		components: {
+			tkiQrcode
+		},
+		data() {
+			return {
+				showVal: '',
+				type: 1,//1->普通商品核销 2-> 电池核销
+				orderInfo: {},
+				order_id: '', //订单编号
+				cid: 'tki-qrcode-canvas', //canvasId,页面存在多个二维码组件时需设置不同的ID
+				size: 440, //生成的二维码大小
+				unit: 'upx', //大小单位尺寸
+				show: true, //默认使用组件中的image标签显示二维码
+				val: '', //要生成的内容
+				background: '#ffffff', //二维码背景色
+				foreground: '#333333', //二维码前景色
+				pdground: '#333333', //二维码角标色
+				icon: '', //二维码图标URL(必须是本地图片,网络图需要先下载至本地)
+				iconSize: 40, //二维码图标大小
+				lv: 3, //容错级别
+				onval: true, //监听val值变化自动重新生成二维码
+				loadMake: true, //组件初始化完成后自动生成二维码,val需要有值
+				usingComponents: false, //是否使用了自定义组件模式(主要是为了修复非自定义组件模式时 v-if 无法生成二维码的问题)
+				showLoading: false, //是否显示loading
+				loadingText: '二维码生成中', //loading文字
+				src: '', // 二维码生成后的图片地址或base64
+				ratio: 1, //页面比例用于计算
+				ctxSrc: '', //要显示的图片
+				loading: true, //是否载入图片中
+			}
+		},
+		onLoad(opt) {
+			this.type = opt.type
+			// 普通商品核销
+			if (this.type == 1) {
+				this.order_id = opt.id
+				this.getOrderDetail()
+			}
+			if(this.type == 2) {
+				this.val = opt.id + '&' + opt.dcode
+				this.showVal = opt.id
+			}
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+
+		},
+		methods: {
+			getOrderDetail() {
+				let that = this;
+				orderDetail({}, that.order_id).then(e => {
+					// that.item = e.data;
+					that.orderInfo = e.data
+					that.val = that.orderInfo.verify_code
+					that.showVal = that.val
+				});
+			},
+			qrR() {
+				
+			},
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page .content{
+		min-height: 100%;
+		height: auto;
+		background:$base-color !important;
+	}
+
+	.djq-wrap {
+		width: 696rpx;
+
+		background-color: #fff;
+		position: relative;
+		margin: auto;
+
+		.djq-top {
+			height: 185rpx;
+			background: #F5F5F5;
+			overflow: hidden;
+			flex-direction: column;
+			justify-content: center;
+
+			.djq-name {
+				font-size: 44rpx;
+				font-weight: bold;
+				color: #222222;
+			}
+
+			.djq-time {
+				font-size: 24rpx;
+				font-weight: 500;
+				color: #686868;
+			}
+
+			&::after,
+			&::before {
+				content: '';
+				height: 120rpx;
+				width: 120rpx;
+				border-radius: 50%;
+				position: absolute;
+				top: -60rpx;
+				background-color: $base-color;
+			}
+
+			&::before {
+				left: -60rpx;
+			}
+
+			&::after {
+				right: -60rpx;
+			}
+		}
+
+		.djq-body {
+			height: 770rpx;
+			position: relative;
+			padding-top: 115rpx;
+
+			&::after,
+			&::before {
+				content: '';
+				height: 120rpx;
+				width: 120rpx;
+				border-radius: 50%;
+				position: absolute;
+				bottom: -60rpx;
+				background-color: $base-color;
+			}
+
+			&::before {
+				left: -60rpx;
+			}
+
+			&::after {
+				right: -60rpx;
+			}
+
+			.ewm {
+				width: 440rpx;
+				height: 440rpx;
+				margin: auto;
+			}
+
+			.ewm-code {
+				padding-top: 55rpx;
+				font-size: 44rpx;
+				font-weight: bold;
+				color: #333333;
+				text-align: center;
+			}
+		}
+
+
+	}
+</style>

+ 1 - 1
pages/order/order.vue

@@ -36,7 +36,7 @@
 							<view class="right">
 								<view class="flex-start">
 									<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-									<text class="price">{{ goodsItem.productInfo.price|moneyNum }}</text>
+									<text class="price">{{ moneyNum(goodsItem.productInfo.price) }}</text>
 								</view>
 								<view class="row flex">
 									<text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>

+ 12 - 0
pages/order/orderDetail.vue

@@ -112,6 +112,13 @@
 					<view class="text">{{ item._status._payType||""  }}</view>
 				</view>
 			</view>
+			<view class="item flex" v-if="item.verify_code">
+				<view class="title-left flex">
+					<text class="title">核销码:</text>
+					<view class="text">{{ item.verify_code }}</view>
+				</view>
+				<view class="buttom-right" @click="showQm(item.order_id)">出示券码</view>
+			</view>
 		</view>
 
 		<view class="orderDetialBox" v-if="item.delivery_id">
@@ -197,6 +204,11 @@ export default {
 		}
 	},
 	methods: {
+		showQm(id) {
+			uni.navigateTo({
+				url:'/pages/order/hxqm?id=' + id + '&type=1'
+			})
+		},
 		// 跳转到查询快递页面
 		expressCheck(item) {
 			uni.navigateTo({

+ 1 - 1
pages/product/product.vue

@@ -468,7 +468,7 @@ export default {
 					if (obj.type == 1) {
 						// 跳转到支付页
 						uni.navigateTo({
-							url: '/pages/order/createOrder?id=' + data.cartId + '&goodsType=' + obj.goodsType + '&is_pack=' + obj.goodsObjact.is_pack
+							url: '/pages/order/createOrder?id=' + data.cartId + '&goodsType=' + obj.goodsType + '&is_pack=' + obj.goodsObjact.is_pack + '&affiliation_uid=' + obj.goodsObjact.affiliation_uid
 						});
 					}
 					if (obj.type == 2) {

+ 160 - 0
pages/public/privacyAgreement.vue

@@ -0,0 +1,160 @@
+<template>
+	<view class="content">
+		<view class="title">
+			精联惠选隐私协议
+		</view>
+		<view class="lineSt margin-t-40">
+			为精联惠选提供相应服务之必须,您以自愿填写的方式提供注册所需的姓名、性别、电话以及其他类似的个人信息,则表示您已经了解并接受您个人信息的用途,同意精联惠选为实现该特定目的使用您的个人信息。除此个人信息之外,其他任何您发送或提供给精联惠选的材料、信息或文本(以下统称信息)均将被视为非保密和非专有的。<strong>精联惠选</strong>对这些信息不承担任何义务。同时如果您提交时没有特别声明的,可视为同意精联惠选及其授权人可以因商业或非商业的目的复制、透露、分发、合并和以其他方式利用这些信息和所有数据、图像、声音、文本及其他内容。您可阅读下面的隐私规则以了解更加详细的内容。
+		</view>
+		<view class="lineSt strongItem">
+			隐私规则
+		</view>
+		<view class="lineSt">
+			精联惠选非常重视对您的个人隐私保护,我们将按照本规则收集、使用、共享和保护您的个人信息。在您使用精联惠选的产品及服务前,请您仔细阅读并全面了解本规则。如果您是未成年人,您的监护人需要仔细阅读本规则并同意您依照本规则使用我们的产品或服务。对于本规则中与您的权益存在重大关系的条款,我们已将字体加粗以提示您注意。当您浏览、访问精联惠选平台及/或使用精联惠选的产品或服务时,即表示您已经同意我们按照本规则来收集、使用、共享和保护您的个人信息。
+		</view>
+		<view class="lineSt strongItem">
+			信息的收集范围
+		</view>
+		<view class="lineSt">
+			我们收集您的以下个人信息:
+		</view>
+		<view class="lineSt">
+			身份识别信息,包括但不限于您的姓名、身份证明、联系地址、电话号码、生物特征信息;
+		</view>
+		<view class="lineSt">
+			您所处的地理位置及目的地信息;
+		</view>
+		<view class="lineSt">
+			平台操作信息,包括但不限于您的IP地址、设备型号、设备标识符、操作系统版本信息;
+		</view>
+		<view class="lineSt">
+			行程信息,包括但不限于您的出发地、到达地、路线、途经地点及里程数信息;
+		</view>
+		<view class="lineSt">
+			支付信息,包括但不限于您的支付时间、支付金额、支付工具、银行账户及支付账户信息;
+		</view>
+		<view class="lineSt">
+			个人信用信息,包括但不限于关于您的任何信用状况、信用分、信用报告信息;
+		</view>
+		<view class="lineSt">
+			其他根据我们具体产品及服务的需要而收集的您的个人信息,包括但不限于您对我们及我们的产品或服务的意见、建议、您曾经使用或经常使用的移动应用软件以及使用场景和使用习惯等信息。
+		</view>
+		<view class="lineSt strongItem">
+			信息的收集方法
+		</view>
+		<view class="lineSt">
+			您授权我们通过以下方法收集您的个人信息:
+		</view>
+		<view class="lineSt">
+			我们将收集和储存在您浏览、访问精联惠选平台及/或使用精联惠选的产品或服务时主动向我们提供的信信息;
+		</view>
+		<view class="lineSt">
+			我们将收集和储存我们在向您提供精联惠选的产品或服务的过程中记录的与您有关的信息;
+		</view>
+		<view class="lineSt">
+			我们将收集和储存您通过我们的客服人员及/或其他渠道主动提交或反馈的信息;
+		</view>
+		<view class="lineSt">
+			我们将向关联公司、商业合作伙伴及第三方独立资料来源,收集和储存其合法获得的与您有关的信息;
+		</view>
+		<view class="lineSt">
+			我们将向依法设立的征信机构査询您的相关信用信息,包括但不限于任何信用分、信用报告等。
+		</view>
+		<view class="lineSt strongItem">
+			信息的用途
+		</view>
+		<view class="lineSt">
+			您授权我们出于以下用途使用您的个人信息:
+		</view>
+		<view class="lineSt">
+			向您提供精联惠选的产品及服务,并进行精联惠选相关网站及APP的管理和优化;
+		</view>
+		<view class="lineSt">
+			提升和改善精联惠选现有产品及服务的功能和质量,包括但不限于产品及服务内容的个性化定制及更新;
+		</view>
+		<view class="lineSt">
+			开展精联惠选产品及服务相关的市场活动,向您推送最新的市场活动信息及优惠方案;
+		</view>
+		<view class="lineSt">
+			设计、开发、推广全新的产品及服务;
+		</view>
+		<view class="lineSt">
+			提高精联惠选产品及服务安全性,包括但不限于身份验证、客户服务、安全防范、诈骗监测、存档和备份;
+		</view>
+		<view class="lineSt">
+			协助行政机关、司法机构等有权机关开展调査,并遵守适用法律法规及其他向有权机关承诺之义务;
+		</view>
+		<view class="lineSt">
+			在收集信息之时所通知您的用途以及与上述任何用途有关的其他用途;
+		</view>
+		<view class="lineSt">
+			此外,我们可能向您发送与上述用途有关的信息和通知,包括但不限于为保证服务完成所必须的验证码、使用产品或服务时所必要的推送通知、当前费用优惠及减免信息、关于精联惠选产品或服务的新闻以及市场活动及优惠促销信息。
+		</view>
+		<view class="lineSt strongItem">
+			信息的共享
+		</view>
+		<view class="lineSt">
+			我们对您的个人信息承担保密义务,但您授权我们在下列情况下将您的信息与第三方共享:
+		</view>
+		<view class="lineSt">
+			为了提升我们的产品及服务质量或向您提供全新的产品及服务,我们会在关联公司内部共享您的相关信息,也可能将我们收集的信息提供给第三方用于分析和统计;
+		</view>
+		<view class="lineSt">
+			为了与第三方开展联合推广活动,我们可能与其共享开展活动所必需的以及在活动过程中产生的相关信息;
+		</view>
+		<view class="lineSt">
+			为了维护您的合法权益,在协助处理与您有关的纠纷或争议时,我们会向存在利害关系的第三方提供解决纠纷或争议所必需的信息;
+		</view>
+		<view class="lineSt">
+			根据法律法规的规定及商业惯例,我们需要接受第三方的审计或尽职调査时,可能向其提供您的相关信息;
+		</view>
+		<view class="lineSt">
+			根据法律法规的规定或行政机关、司法机构等有权机关要求,我们会向其提供您的相关信息;
+		</view>
+		<view class="lineSt">
+			其他经您同意或授权可以向第三方提供您的个人信息的情况。
+		</view>
+		<view class="lineSt">
+			信息的安全及保护措施
+		</view>
+		<view class="lineSt">
+			我们及我们的关联公司将采用严格的安全制度以及行业通行的安全技术和程序来确保您的个人信息不被丢失、泄露、毀损或滥用。但是,请您注意,任何安全系统都存在可能的及未知的风险。
+		</view>
+		<view class="lineSt">
+			您访问的第三方网站经营者、您使用的第三方服务提供者和通过我们获取您的个人信息的第三方可能有自己的隐私权保护规则以及获取您个人信息的方法和措施,这些第三方的隐私权保护规则、获取个人信息的方法和措施将不会受到我们的控制。虽然我们将与可能接触到您的个人信息的我们的合作方等第三方签署保密协议并尽合理的努力督促其履行保密义务,但我们无法保证第三方一定会按照我们的要求采取保密措施,我们亦不对第三方的行为及后果承担任何责任。
+		</view>
+		<view class="lineSt">
+			作为用户,您可根据您的意愿决定是否使用精联惠选平台的服务,是否主动提供个人信息。同时,您可以查看您提供给我们的个人信息及行程信息。如果您希望删除或更正您的个人信息,请联系我们的客服人员。
+		</view>
+		<view class="lineSt">
+			如果我们监测到您将精联惠选的产品及服务以及相关信息用于欺诈或非法目的,我们将会采取相应措施,包括但不限于中止或终止向您提供任何产品或服务。
+		</view>
+	</view>
+</template>
+
+<script>
+</script>
+
+<style lang="scss">
+	.content {
+		padding: $page-row-spacing;
+		line-height: 2;
+		font-size: $font-base;
+	}
+
+	.title {
+		font-size: $font-lg + 6rpx;
+		font-weight: bold;
+		text-align: center;
+	}
+
+	.lineSt {
+		text-indent: 2em;
+	}
+
+	.strongItem {
+		margin: 20rpx 0 ;
+		font-weight: bold;
+		font-size: $font-lg;
+	}
+</style>

+ 279 - 0
pages/user/component/hs-scancode.nvue

@@ -0,0 +1,279 @@
+<template>
+	<view class="page" :style="{height: height+'px'}" v-if="onlyFromCamera">
+		<barcode :style="{height: height+'px'}" id="hs-scan" class="barcode" ref="barcode" autostart
+			frameColor="#0cff00" scanbarColor="#0cff00" background="#000000" :filters="fil" @marked="success"
+			@error="error">
+		</barcode>
+		<view @click="back" class="back" hover-class="css-hover">
+			<image :src="scan_img.back" style="width: 28px;height: 28px;"></image>
+		</view>
+		<text class="msg">{{msg}}</text>
+		<view class="flash" :style="{bottom: (height/2 - 120)+'px'}" @click="toFlash()" hover-class="css-hover">
+			<image class="flash-img" :src="flash_img" style="width: 30px;height: 30px;"></image>
+			<text class="flash-text" :class="flash?'flash-on':''">{{flash?"轻触关闭":"轻触点亮"}}</text>
+		</view>
+	</view>
+
+	<view class="page" :style="{height: height+'px'}" v-else>
+		<barcode :style="{height: height+'px'}" id="hs-scan" class="barcode" ref="barcode" autostart
+			frameColor="#0cff00" scanbarColor="#0cff00" background="#000000" :filters="fil" @marked="success"
+			@error="error">
+		</barcode>
+		<view @click="back" class="back" hover-class="css-hover">
+			<image :src="scan_img.back" style="width: 28px;height: 28px;"></image>
+		</view>
+		<text class="msg">{{msg}}</text>
+		<view class="flash" :style="{bottom: (height/2 - 120)+'px'}" @click="toFlash()" hover-class="css-hover">
+			<image class="flash-img" :src="flash_img" style="width: 30px;height: 30px;"></image>
+			<text class="flash-text" :class="flash?'flash-on':''">{{flash?"轻触关闭":"轻触点亮"}}</text>
+		</view>
+
+		<view @click="toScan" class="album" hover-class="css-hover">
+			<image :src="scan_img.album" style="height: 26px;width: 26px;"></image>
+		</view>
+
+	</view>
+	</view>
+</template>
+
+<script>
+	const _image = {
+		flash_off: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABSElEQVRoge2UMS9DYRRAP20MdOhuEIOIFbXZGAw2xMpiM0vslf6Cpt1MJBabxSLEJuEPiMEiFsSKY3mSG9K+vtfvvit1T3K39+49p2kbguM4/wugBqwrzCJQ0pZfRZe6dsCacsC+akASMQMsKcwC2l8hxxpgA7hWnEPtgJ3Yv9of3BQZcAWcRZpni4CpiHsvPaDHQwMVsBJpZwW4KypgGfhMjr0CtT73DQOn4kM5juXa7eimiHgBZnPuKQMnQv4CGInt2+n4rjj8BEzn2NEUO26BqoZrN4GGEHgAJjK8uyfevQfGFFU7SgwBLfrjEZgsXF5ElICjnPJvwLyZvIiYE1LnQDtlvv8A2tbuIYRfAVs9PP+ePNsswi8VD7DGA6zxAGs8wBoPsMYDrPEAawYt4ADYTpmPvxyQBQ+IAjCaRGSdcWt3xwkhfAHeC7+Yzq/O8QAAAABJRU5ErkJggg==',
+		flash_on: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABi0lEQVRoge2WPyhFYRiHT0n5k4GyuINRWe5gYrqJQiyKzYRJsir/VgMx3JgMjOyGmyxSVqOSwU0pumVg4zHc9+bonO9c5/rOfTu376lv+r2d9/fU+erzPIej/gBTQB5oqTK3BbwBuYiZduAcWLJeNGLpLWX2qsxdydxaxMyhzNzYb2peOi1Lv4DxiLmKwLohn/V9ZzS5xuHLj2X5E9BlmDEKAD3Ai+QHyTcOFugEHqXApmHmTPL5kGxVsgegI/nGIQA54BoYMuTdwCTQFJL1AkfAQPJNGxFgGHgGShbOqYbAMvYoOoEaBBYtCtxrCLRSvgcjFk5f3QVEYhCYsXDatATGLPw+BZXyPonCP8p/AlltgawUqYUT1fIV+HnYxeEdyGh39zzP84CMFIrDtnbvXwA7McqXMDzB1QAmYghcavcN4AS0MQhcAPsEL3gqBF6BZsk20ihw58sWnEDSNKJA0ZetpFEAYBeYA4ppFTDhBKzjBLRxAto4AW2cgDZOQBugH/j4o0Beu6/DIXwDQ+8GvfIPRuwAAAAASUVORK5CYII=',
+		back: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAADjElEQVRoge2aW08TQRiGh4QYwg0iSv0fEKAChaRNKychIVj1Qv+UGqOXGhJCDEoiaEwTwqWmGg+pRq64IB5impa0C9vT40W30G6325nulgXDm+xNd3fmfWa+mZ2Zr0Kc6z8V0AH0GleH135sBVwF7gHPgK9AmnqljXtPgbuAz2vTHcAs8BooAjmgYGHcrILxbBHYBGZOvIcM4z8MMzKm7WAKwHdg+iSM9wPrRqUlB8bNKlHukRfA5XaZDwB/Ad1F42bpwB9g1G3z88jHuFMVDJA5N827HTLNVDLqnHVqfpxyy3ulHHCtVfM+yjFf9BCgSHlMXGkFYIP2DlhZHQLrquav423Lm1UEQrLmO4BvnD6AL8h8sYEbKEyXOzs7bG1tUSrJT1L5fJ5YLMbu7q4qxIwMwFskWz+RSNDV1YUQgmg0Sj6fb/qOpmmEw2GEEPT09LC3tycLUAA2mpn3yZoHWF5eRghxdC0tLdlCaJpGKBSqeScWi8lWV4FovNQA7qAw82SzWQYGBqQgrMwHg0GpXquSDty0A3gCKJWYTqfx+/01xqampjg8PDx6Zn9/n9HR0Zpn5ubm0HXlWToHPLID+KxaIkAmkyEQCFhCuGi+oo92AJlWS00mkwwODtYYXVxcJBgM1oVNNptttRqA/UbmLzgpFco9MTExUWPYxZavVqcVwCU3Sm4E4aJ5gN62AVgNaiEEkUiEg4MDN6qABgCOQ6iR+TZA1IeQ00FsFTqRSIShoaGa3+bn552GkvUgNgA+tVKiVcsvLCyQy+XIZDJMTk7W3AuHw0564oMdwGMUd2DJZLLua1wxX1EjCE3TVM3ngId2AFEUlhK6rjf8gJmVSqUYHh6uAy0WlVbtOWDRDqAPhaX0yspKjaHp6WlL83YQ29vbKgB54GJDAAPiDZIr0ng8Tmdnp5T5aoiRkRGEEHR3d6vsCQrAK1vzBoDShiYej7O2tqa0qtQ0jdXVVRKJhPQ7KGxozvaW0oAY52QPspqpBIxJma+CeM7pOFbRgRUl8wZAH/Abb0OpAPzEau0jCTFGee71IpxKlFvf35L5Koize7hrgqikhdqtIm4er1dBBCgftCovYBSkAb9wO8FRBdEPvMR5bsysSu+u0a4UkwnE7SRfgpNI8pkgKmnWTY7TrDLriTzH6aoNvEizWsD4gNvAA+A9kLIwngLeAfeBW3id6G4mztJfDc7lQP8ALX0r5IbFIHwAAAAASUVORK5CYII=',
+		album: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACgklEQVRoge3YO2gUURiG4WgUMeINQ7xgFZDYiIWilSBesbQTxSKFNipi4Q0URIkgWEhsLAUbsUiTwl6xSCFGIWorIghRRLyLyWMxZ/G4zk5ms7szK+wHpznzH/733ZnZOTNdXZ100kknbRv0YR8GcbTgMRh6980GvB+jmFZ+piUs/XnhN2GyXObUTGLTTPDL8DZadBc7MSA5K0WOgdD7bsTzFsuyBC5Exefruu5aGJyNuC5kFT4NRc8wt0DGzGBuxDaeVfg5FA1XzS/GTXwKx59ge6vBqxhuhN5fsooquRrNdeORfzONvYXQJxyXo97pV0cNgf0p8JU8/h8ErmQITKG73QVOZghMFgHfqMBKvKshcKntBcL8Hryvgr+H+YXQdzUoEI6txjHJQ6Wwf5+of2MCZadtBDAPt/AKJ+pY1zYC56rupW0515UvgDX+bEcqGcOcHGvbQuC29BzKsbZcAWxV+w3vNXoKFcAqOZ8DmIOHNeArOV2YAK5Hv9zaHAIHZoCHD+htuQC2VTUenQF+ib9fU7Nyq6UCkkthLKXxvozGQznh4Rc2tFLgYI3GL6TcD1iHH3UIwP2WCKBHcs3XyqmUNSN1wlfyz16rGQLVT9DqfMSqqH7PLOHhOeY1TQC9kn+JmTKCBZKd68sGBGCwmQLDdTT+LrkZG80bLKpX4FsouBHNDeBnE4Bmk4sRx80w9zUVPhRNhKKxaO5MKehJ7kQcj8PcRJbAtWjx4TC3EDuwq+CxE0sDw5GIayhLoM+fd98pyZahH8tLGusDw1RgmsSKmgJBYje+pp/RUvNd3s+Zkq3veMnAcR5gcy74KpEtOC75ElHGGMTGusE76aSTTgrLbyY65XbJ3W1oAAAAAElFTkSuQmCC',
+	};
+	const SCAN_MAPS = {
+		[0]: "QR_CODE",
+		[1]: "EAN_13",
+		[2]: "EAN_8",
+		[3]: "AZTEC",
+		[4]: "DATA_MATRIX",
+		[5]: "UPC_A",
+		[6]: "UPC_E",
+		[7]: "CODABAR",
+		[8]: "CODE_39",
+		[9]: "CODE_93",
+		[10]: "CODE_128",
+		[11]: "CODE_25",
+		[13]: "PDF_417",
+		[14]: "RSS_14",
+		[15]: "RSSEXPANDED"
+	};
+	export default {
+		data: {
+			evalName: "hs-scancode", //扫码回调监听事件
+			flash: false, //手电筒
+			vibrate: true, //震动
+			sound: "none", //声音 none default
+			fil: [0, 1, 2], //条码类型
+			msg: "扫码", //提示文本
+			height: 600, //高度
+			isDark: null, //状态栏前景色 黑色
+			fullScreen: false, //是否全屏
+			onlyFromCamera: false, //从相册获取
+		},
+		computed: {
+			scan_img() {
+				return _image
+			},
+			flash_img() {
+				return this.flash ? _image.flash_on : _image.flash_off;
+			},
+		},
+		onLoad(p) {
+			//参数
+			if (p.evalName) this.evalName = p.evalName;
+			if (p.flash) this.flash = p.flash == 'true';
+			if (p.vibrate) this.vibrate = p.vibrate == 'true';
+			if (p.sound) this.sound = p.sound;
+			if (p.msg) this.msg = p.msg;
+			if (p.fil) this.fil = p.fil.split(',').map(x => parseInt(x));
+			if (p.fullScreen) this.fullScreen = p.fullScreen == 'true';
+			if (p.onlyFromCamera) this.onlyFromCamera = p.onlyFromCamera == 'true';
+			this.setFullOrStatus(true);
+			uni.getSystemInfo({
+				success: res => this.height = res.windowHeight
+			});
+			setTimeout(() => {
+				this.toStart();
+				this.webviewInit();
+
+			}, 100);
+		},
+		onUnload() {
+			this.setFullOrStatus(false);
+			this.toFlash(false);
+			uni.$off(this.evalName);
+		},
+		onBackPress(e) {
+			if (e.from === 'backbutton') this.back(0);
+			else this.setFullOrStatus(false);
+		},
+		methods: {
+			webviewInit() {
+				var pages = getCurrentPages();
+				var currentWebview = pages[pages.length - 1].$getAppWebview();
+				//ios 左滑关闭
+				currentWebview.addEventListener('popGesture', e => {
+					const type = e.type,
+						result = e.result;
+					if (type === 'start') {
+						this.setFullOrStatus(false);
+						this.toFlash(false);
+						this.toCancel();
+					} else if (type === 'end' && result) {
+						this.back(0)
+					} else if (type === 'end' && !result) {
+						this.setFullOrStatus(true);
+						this.toStart();
+					}
+				});
+			},
+			success(e) {
+				uni.$emit(this.evalName, [null, {
+					"hsScanCode": true,
+					"result": e.detail.message,
+					"scanType": SCAN_MAPS[e.detail.code],
+					"charSet": "utf8",
+					"path": e.detail.file || "",
+					"errMsg": "scanCode:ok"
+				}]);
+			},
+			error(e, cancel) {
+				uni.$emit(this.evalName, [{
+					"hsScanCode": true,
+					"errMsg": cancel === true ? "scanCode:fail cancel" : "scanCode:fail"
+				}, null]);
+				if (!cancel) this.toStart();
+			},
+			toStart: function() {
+				this.$refs.barcode && this.$refs.barcode.start({
+					conserve: false,
+					vibrate: this.vibrate,
+					sound: this.sound,
+				});
+			},
+			toCancel: function() {
+				this.$refs.barcode.cancel();
+			},
+			toFlash: function(t) {
+				this.flash = t == null ? !this.flash : t;
+				this.$refs.barcode.setFlash(this.flash);
+			},
+			toScan: async function() {
+				this.toCancel();
+				const [e, res] = await uni.chooseImage({
+					count: 1,
+					sizeType: ['original'],
+					sourceType: ['album']
+				});
+				if (res && res.tempFilePaths.length > 0) {
+					const barcodeModule = uni.requireNativePlugin('barcodeScan');
+					barcodeModule.scan(res.tempFilePaths[0], e => {
+						if (e.detail.type === "success") {
+							this.success(e);
+						} else {
+							this.error(e);
+						}
+						this.toStart();
+					});
+				} else {
+					this.toStart();
+				}
+			},
+			back(t) {
+				const p = {
+					delta: 1
+				}
+				this.setFullOrStatus(false);
+				this.toCancel();
+				this.toFlash(false);
+				if (t !== 0) uni.navigateBack(p);
+			},
+			setFullOrStatus(t) {
+				if (this.isDark == null) this.isDark = this.getStatusBarStyle() !== 'light';
+				this.isDark && plus.navigator.setStatusBarStyle(t ? "light" : "dark");
+				this.fullScreen && plus.navigator.setFullscreen(t)
+			},
+			getStatusBarStyle() {
+				let style = plus.navigator.getStatusBarStyle()
+				if (style === 'UIStatusBarStyleBlackTranslucent' || style === 'UIStatusBarStyleBlackOpaque' || style ===
+					'null') {
+					style = 'light'
+				} else if (style === 'UIStatusBarStyleDefault') {
+					style = 'dark'
+				}
+				return style
+			}
+		}
+	}
+</script>
+<style scoped>
+	.page {
+		top: 0;
+		position: fixed;
+		width: 750rpx;
+		justify-content: center;
+		align-items: center;
+		background-color: #000000;
+	}
+
+	.back {
+		position: fixed;
+		left: 5px;
+		top: 20px;
+		border-radius: 50;
+		padding: 15px;
+	}
+
+	.msg {
+		position: fixed;
+		top: 90px;
+		width: 750rpx;
+		text-align: center;
+		color: #FFFFFF;
+		font-size: 16px;
+	}
+
+	.css-hover {
+		opacity: .4;
+	}
+
+	.barcode {
+		width: 750rpx;
+		height: 100%;
+		background-color: #000000;
+	}
+
+	.flash {
+		position: absolute;
+		bottom: 500rpx;
+		justify-content: center;
+		align-items: center;
+		padding: 8px;
+	}
+
+	.flash-text {
+		margin-top: 3px;
+		color: #bfbfbf;
+		font-size: 12px;
+	}
+
+	.flash-on {
+		color: #FFFFFF;
+	}
+
+	.album {
+		position: fixed;
+		bottom: 60px;
+		right: 30px;
+		height: 42px;
+		width: 42px;
+		padding: 16px;
+		background-color: rgba(157, 157, 157, .3);
+		border-radius: 50;
+		justify-content: center;
+		align-items: center;
+	}
+</style>

+ 2606 - 0
pages/user/component/reqrcode.js

@@ -0,0 +1,2606 @@
+var _aa = {};
+_aa._ab = function(f, e) {
+	var d = qrcode.width;
+	var b = qrcode.height;
+	var c = true;
+	for (var g = 0; g < e.length && c; g += 2) {
+		var a = Math.floor(e[g]);
+		var h = Math.floor(e[g + 1]);
+		if (a < -1 || a > d || h < -1 || h > b) {
+			throw "Error._ab "
+		}
+		c = false;
+		if (a == -1) {
+			e[g] = 0;
+			c = true
+		} else {
+			if (a == d) {
+				e[g] = d - 1;
+				c = true
+			}
+		}
+		if (h == -1) {
+			e[g + 1] = 0;
+			c = true
+		} else {
+			if (h == b) {
+				e[g + 1] = b - 1;
+				c = true
+			}
+		}
+	}
+	c = true;
+	for (var g = e.length - 2; g >= 0 && c; g -= 2) {
+		var a = Math.floor(e[g]);
+		var h = Math.floor(e[g + 1]);
+		if (a < -1 || a > d || h < -1 || h > b) {
+			throw "Error._ab "
+		}
+		c = false;
+		if (a == -1) {
+			e[g] = 0;
+			c = true
+		} else {
+			if (a == d) {
+				e[g] = d - 1;
+				c = true
+			}
+		}
+		if (h == -1) {
+			e[g + 1] = 0;
+			c = true
+		} else {
+			if (h == b) {
+				e[g + 1] = b - 1;
+				c = true
+			}
+		}
+	}
+};
+_aa._af = function(b, d, a) {
+	var k = new _ac(d);
+	var j = new Array(d << 1);
+	for (var f = 0; f < d; f++) {
+		var g = j.length;
+		var i = f + 0.5;
+		for (var h = 0; h < g; h += 2) {
+			j[h] = (h >> 1) + 0.5;
+			j[h + 1] = i
+		}
+		a._ad(j);
+		_aa._ab(b, j);
+		try {
+			for (var h = 0; h < g; h += 2) {
+				var e = b[Math.floor(j[h]) + qrcode.width * Math.floor(j[h + 1])];
+				if (e) {
+					k._dq(h >> 1, f)
+				}
+			}
+		} catch (c) {
+			throw "Error._ab"
+		}
+	}
+	return k
+};
+_aa._ah = function(h, o, l, k, q, p, b, a, f, e, n, m, s, r, d, c, j, i) {
+	var g = _ae._ag(l, k, q, p, b, a, f, e, n, m, s, r, d, c, j, i);
+	return _aa._af(h, o, g)
+};
+
+function _a1(b, a) {
+	this.count = b;
+	this._fc = a;
+	this.__defineGetter__("Count", function() {
+		return this.count
+	});
+	this.__defineGetter__("_dm", function() {
+		return this._fc
+	})
+}
+
+function _a2(a, c, b) {
+	this._bm = a;
+	if (b) {
+		this._do = new Array(c, b)
+	} else {
+		this._do = new Array(c)
+	}
+	this.__defineGetter__("_bo", function() {
+		return this._bm
+	});
+	this.__defineGetter__("_dn", function() {
+		return this._bm * this._fo
+	});
+	this.__defineGetter__("_fo", function() {
+		var e = 0;
+		for (var d = 0; d < this._do.length; d++) {
+			e += this._do[d].length
+		}
+		return e
+	});
+	this._fb = function() {
+		return this._do
+	}
+}
+
+function _a3(k, l, h, g, f, e) {
+	this._bs = k;
+	this._ar = l;
+	this._do = new Array(h, g, f, e);
+	var j = 0;
+	var b = h._bo;
+	var a = h._fb();
+	for (var d = 0; d < a.length; d++) {
+		var c = a[d];
+		j += c.Count * (c._dm + b)
+	}
+	this._br = j;
+	this.__defineGetter__("_fd", function() {
+		return this._bs
+	});
+	this.__defineGetter__("_as", function() {
+		return this._ar
+	});
+	this.__defineGetter__("_dp", function() {
+		return this._br
+	});
+	this.__defineGetter__("_cr", function() {
+		return 17 + 4 * this._bs
+	});
+	this._aq = function() {
+		var q = this._cr;
+		var o = new _ac(q);
+		o._bq(0, 0, 9, 9);
+		o._bq(q - 8, 0, 8, 9);
+		o._bq(0, q - 8, 9, 8);
+		var n = this._ar.length;
+		for (var m = 0; m < n; m++) {
+			var p = this._ar[m] - 2;
+			for (var r = 0; r < n; r++) {
+				if ((m == 0 && (r == 0 || r == n - 1)) || (m == n - 1 && r == 0)) {
+					continue
+				}
+				o._bq(this._ar[r] - 2, p, 5, 5)
+			}
+		}
+		o._bq(6, 9, 1, q - 17);
+		o._bq(9, 6, q - 17, 1);
+		if (this._bs > 6) {
+			o._bq(q - 11, 0, 3, 6);
+			o._bq(0, q - 11, 6, 3)
+		}
+		return o
+	};
+	this._bu = function(i) {
+		return this._do[i.ordinal()]
+	}
+}
+_a3._bv = new Array(31892, 34236, 39577, 42195, 48118, 51042, 55367, 58893, 63784, 68472, 70749, 76311, 79154, 84390,
+	87683, 92361, 96236, 102084, 102881, 110507, 110734, 117786, 119615, 126325, 127568, 133589, 136944, 141498,
+	145311, 150283, 152622, 158308, 161089, 167017);
+_a3.VERSIONS = _ay();
+_a3._av = function(a) {
+	if (a < 1 || a > 40) {
+		throw "bad arguments"
+	}
+	return _a3.VERSIONS[a - 1]
+};
+_a3._at = function(b) {
+	if (b % 4 != 1) {
+		throw "Error _at"
+	}
+	try {
+		return _a3._av((b - 17) >> 2)
+	} catch (a) {
+		throw "Error _av"
+	}
+};
+_a3._aw = function(d) {
+	var b = 4294967295;
+	var f = 0;
+	for (var c = 0; c < _a3._bv.length; c++) {
+		var a = _a3._bv[c];
+		if (a == d) {
+			return this._av(c + 7)
+		}
+		var e = _ax._gj(d, a);
+		if (e < b) {
+			f = c + 7;
+			b = e
+		}
+	}
+	if (b <= 3) {
+		return this._av(f)
+	}
+	return null
+};
+
+function _ay() {
+	return new Array(new _a3(1, new Array(), new _a2(7, new _a1(1, 19)), new _a2(10, new _a1(1, 16)), new _a2(13,
+			new _a1(1, 13)), new _a2(17, new _a1(1, 9))), new _a3(2, new Array(6, 18), new _a2(10, new _a1(1, 34)),
+			new _a2(16, new _a1(1, 28)), new _a2(22, new _a1(1, 22)), new _a2(28, new _a1(1, 16))), new _a3(3,
+			new Array(6, 22), new _a2(15, new _a1(1, 55)), new _a2(26, new _a1(1, 44)), new _a2(18, new _a1(2, 17)),
+			new _a2(22, new _a1(2, 13))), new _a3(4, new Array(6, 26), new _a2(20, new _a1(1, 80)), new _a2(18,
+			new _a1(2, 32)), new _a2(26, new _a1(2, 24)), new _a2(16, new _a1(4, 9))), new _a3(5, new Array(6, 30),
+			new _a2(26, new _a1(1, 108)), new _a2(24, new _a1(2, 43)), new _a2(18, new _a1(2, 15), new _a1(2, 16)),
+			new _a2(22, new _a1(2, 11), new _a1(2, 12))), new _a3(6, new Array(6, 34), new _a2(18, new _a1(2, 68)),
+			new _a2(16, new _a1(4, 27)), new _a2(24, new _a1(4, 19)), new _a2(28, new _a1(4, 15))), new _a3(7,
+			new Array(6, 22, 38), new _a2(20, new _a1(2, 78)), new _a2(18, new _a1(4, 31)), new _a2(18, new _a1(2,
+				14), new _a1(4, 15)), new _a2(26, new _a1(4, 13), new _a1(1, 14))), new _a3(8, new Array(6, 24, 42),
+			new _a2(24, new _a1(2, 97)), new _a2(22, new _a1(2, 38), new _a1(2, 39)), new _a2(22, new _a1(4, 18),
+				new _a1(2, 19)), new _a2(26, new _a1(4, 14), new _a1(2, 15))), new _a3(9, new Array(6, 26, 46),
+			new _a2(30, new _a1(2, 116)), new _a2(22, new _a1(3, 36), new _a1(2, 37)), new _a2(20, new _a1(4, 16),
+				new _a1(4, 17)), new _a2(24, new _a1(4, 12), new _a1(4, 13))), new _a3(10, new Array(6, 28, 50),
+			new _a2(18, new _a1(2, 68), new _a1(2, 69)), new _a2(26, new _a1(4, 43), new _a1(1, 44)), new _a2(24,
+				new _a1(6, 19), new _a1(2, 20)), new _a2(28, new _a1(6, 15), new _a1(2, 16))), new _a3(11,
+			new Array(6, 30, 54), new _a2(20, new _a1(4, 81)), new _a2(30, new _a1(1, 50), new _a1(4, 51)), new _a2(
+				28, new _a1(4, 22), new _a1(4, 23)), new _a2(24, new _a1(3, 12), new _a1(8, 13))), new _a3(12,
+			new Array(6, 32, 58), new _a2(24, new _a1(2, 92), new _a1(2, 93)), new _a2(22, new _a1(6, 36), new _a1(
+				2, 37)), new _a2(26, new _a1(4, 20), new _a1(6, 21)), new _a2(28, new _a1(7, 14), new _a1(4, 15))),
+		new _a3(13, new Array(6, 34, 62), new _a2(26, new _a1(4, 107)), new _a2(22, new _a1(8, 37), new _a1(1, 38)),
+			new _a2(24, new _a1(8, 20), new _a1(4, 21)), new _a2(22, new _a1(12, 11), new _a1(4, 12))), new _a3(14,
+			new Array(6, 26, 46, 66), new _a2(30, new _a1(3, 115), new _a1(1, 116)), new _a2(24, new _a1(4, 40),
+				new _a1(5, 41)), new _a2(20, new _a1(11, 16), new _a1(5, 17)), new _a2(24, new _a1(11, 12), new _a1(
+				5, 13))), new _a3(15, new Array(6, 26, 48, 70), new _a2(22, new _a1(5, 87), new _a1(1, 88)),
+			new _a2(24, new _a1(5, 41), new _a1(5, 42)), new _a2(30, new _a1(5, 24), new _a1(7, 25)), new _a2(24,
+				new _a1(11, 12), new _a1(7, 13))), new _a3(16, new Array(6, 26, 50, 74), new _a2(24, new _a1(5, 98),
+			new _a1(1, 99)), new _a2(28, new _a1(7, 45), new _a1(3, 46)), new _a2(24, new _a1(15, 19), new _a1(
+			2, 20)), new _a2(30, new _a1(3, 15), new _a1(13, 16))), new _a3(17, new Array(6, 30, 54, 78), new _a2(
+			28, new _a1(1, 107), new _a1(5, 108)), new _a2(28, new _a1(10, 46), new _a1(1, 47)), new _a2(28,
+			new _a1(1, 22), new _a1(15, 23)), new _a2(28, new _a1(2, 14), new _a1(17, 15))), new _a3(18, new Array(
+			6, 30, 56, 82), new _a2(30, new _a1(5, 120), new _a1(1, 121)), new _a2(26, new _a1(9, 43), new _a1(
+			4, 44)), new _a2(28, new _a1(17, 22), new _a1(1, 23)), new _a2(28, new _a1(2, 14), new _a1(19, 15))),
+		new _a3(19, new Array(6, 30, 58, 86), new _a2(28, new _a1(3, 113), new _a1(4, 114)), new _a2(26, new _a1(3,
+			44), new _a1(11, 45)), new _a2(26, new _a1(17, 21), new _a1(4, 22)), new _a2(26, new _a1(9, 13),
+			new _a1(16, 14))), new _a3(20, new Array(6, 34, 62, 90), new _a2(28, new _a1(3, 107), new _a1(5, 108)),
+			new _a2(26, new _a1(3, 41), new _a1(13, 42)), new _a2(30, new _a1(15, 24), new _a1(5, 25)), new _a2(28,
+				new _a1(15, 15), new _a1(10, 16))), new _a3(21, new Array(6, 28, 50, 72, 94), new _a2(28, new _a1(4,
+				116), new _a1(4, 117)), new _a2(26, new _a1(17, 42)), new _a2(28, new _a1(17, 22), new _a1(6, 23)),
+			new _a2(30, new _a1(19, 16), new _a1(6, 17))), new _a3(22, new Array(6, 26, 50, 74, 98), new _a2(28,
+			new _a1(2, 111), new _a1(7, 112)), new _a2(28, new _a1(17, 46)), new _a2(30, new _a1(7, 24),
+			new _a1(16, 25)), new _a2(24, new _a1(34, 13))), new _a3(23, new Array(6, 30, 54, 74, 102), new _a2(30,
+			new _a1(4, 121), new _a1(5, 122)), new _a2(28, new _a1(4, 47), new _a1(14, 48)), new _a2(30,
+			new _a1(11, 24), new _a1(14, 25)), new _a2(30, new _a1(16, 15), new _a1(14, 16))), new _a3(24,
+			new Array(6, 28, 54, 80, 106), new _a2(30, new _a1(6, 117), new _a1(4, 118)), new _a2(28, new _a1(6,
+				45), new _a1(14, 46)), new _a2(30, new _a1(11, 24), new _a1(16, 25)), new _a2(30, new _a1(30, 16),
+				new _a1(2, 17))), new _a3(25, new Array(6, 32, 58, 84, 110), new _a2(26, new _a1(8, 106), new _a1(4,
+				107)), new _a2(28, new _a1(8, 47), new _a1(13, 48)), new _a2(30, new _a1(7, 24), new _a1(22, 25)),
+			new _a2(30, new _a1(22, 15), new _a1(13, 16))), new _a3(26, new Array(6, 30, 58, 86, 114), new _a2(28,
+			new _a1(10, 114), new _a1(2, 115)), new _a2(28, new _a1(19, 46), new _a1(4, 47)), new _a2(28,
+			new _a1(28, 22), new _a1(6, 23)), new _a2(30, new _a1(33, 16), new _a1(4, 17))), new _a3(27, new Array(
+			6, 34, 62, 90, 118), new _a2(30, new _a1(8, 122), new _a1(4, 123)), new _a2(28, new _a1(22, 45),
+			new _a1(3, 46)), new _a2(30, new _a1(8, 23), new _a1(26, 24)), new _a2(30, new _a1(12, 15), new _a1(
+			28, 16))), new _a3(28, new Array(6, 26, 50, 74, 98, 122), new _a2(30, new _a1(3, 117), new _a1(10,
+			118)), new _a2(28, new _a1(3, 45), new _a1(23, 46)), new _a2(30, new _a1(4, 24), new _a1(31, 25)),
+			new _a2(30, new _a1(11, 15), new _a1(31, 16))), new _a3(29, new Array(6, 30, 54, 78, 102, 126), new _a2(
+			30, new _a1(7, 116), new _a1(7, 117)), new _a2(28, new _a1(21, 45), new _a1(7, 46)), new _a2(30,
+			new _a1(1, 23), new _a1(37, 24)), new _a2(30, new _a1(19, 15), new _a1(26, 16))), new _a3(30, new Array(
+			6, 26, 52, 78, 104, 130), new _a2(30, new _a1(5, 115), new _a1(10, 116)), new _a2(28, new _a1(19,
+			47), new _a1(10, 48)), new _a2(30, new _a1(15, 24), new _a1(25, 25)), new _a2(30, new _a1(23, 15),
+			new _a1(25, 16))), new _a3(31, new Array(6, 30, 56, 82, 108, 134), new _a2(30, new _a1(13, 115),
+			new _a1(3, 116)), new _a2(28, new _a1(2, 46), new _a1(29, 47)), new _a2(30, new _a1(42, 24),
+			new _a1(1, 25)), new _a2(30, new _a1(23, 15), new _a1(28, 16))), new _a3(32, new Array(6, 34, 60, 86,
+			112, 138), new _a2(30, new _a1(17, 115)), new _a2(28, new _a1(10, 46), new _a1(23, 47)), new _a2(30,
+			new _a1(10, 24), new _a1(35, 25)), new _a2(30, new _a1(19, 15), new _a1(35, 16))), new _a3(33,
+			new Array(6, 30, 58, 86, 114, 142), new _a2(30, new _a1(17, 115), new _a1(1, 116)), new _a2(28, new _a1(
+				14, 46), new _a1(21, 47)), new _a2(30, new _a1(29, 24), new _a1(19, 25)), new _a2(30, new _a1(11,
+				15), new _a1(46, 16))), new _a3(34, new Array(6, 34, 62, 90, 118, 146), new _a2(30, new _a1(13,
+			115), new _a1(6, 116)), new _a2(28, new _a1(14, 46), new _a1(23, 47)), new _a2(30, new _a1(44, 24),
+			new _a1(7, 25)), new _a2(30, new _a1(59, 16), new _a1(1, 17))), new _a3(35, new Array(6, 30, 54, 78,
+			102, 126, 150), new _a2(30, new _a1(12, 121), new _a1(7, 122)), new _a2(28, new _a1(12, 47),
+			new _a1(26, 48)), new _a2(30, new _a1(39, 24), new _a1(14, 25)), new _a2(30, new _a1(22, 15),
+			new _a1(41, 16))), new _a3(36, new Array(6, 24, 50, 76, 102, 128, 154), new _a2(30, new _a1(6, 121),
+			new _a1(14, 122)), new _a2(28, new _a1(6, 47), new _a1(34, 48)), new _a2(30, new _a1(46, 24),
+			new _a1(10, 25)), new _a2(30, new _a1(2, 15), new _a1(64, 16))), new _a3(37, new Array(6, 28, 54, 80,
+			106, 132, 158), new _a2(30, new _a1(17, 122), new _a1(4, 123)), new _a2(28, new _a1(29, 46),
+			new _a1(14, 47)), new _a2(30, new _a1(49, 24), new _a1(10, 25)), new _a2(30, new _a1(24, 15),
+			new _a1(46, 16))), new _a3(38, new Array(6, 32, 58, 84, 110, 136, 162), new _a2(30, new _a1(4, 122),
+			new _a1(18, 123)), new _a2(28, new _a1(13, 46), new _a1(32, 47)), new _a2(30, new _a1(48, 24),
+			new _a1(14, 25)), new _a2(30, new _a1(42, 15), new _a1(32, 16))), new _a3(39, new Array(6, 26, 54, 82,
+			110, 138, 166), new _a2(30, new _a1(20, 117), new _a1(4, 118)), new _a2(28, new _a1(40, 47),
+			new _a1(7, 48)), new _a2(30, new _a1(43, 24), new _a1(22, 25)), new _a2(30, new _a1(10, 15),
+			new _a1(67, 16))), new _a3(40, new Array(6, 30, 58, 86, 114, 142, 170), new _a2(30, new _a1(19, 118),
+			new _a1(6, 119)), new _a2(28, new _a1(18, 47), new _a1(31, 48)), new _a2(30, new _a1(34, 24),
+			new _a1(34, 25)), new _a2(30, new _a1(20, 15), new _a1(61, 16))))
+}
+
+function _ae(i, f, c, h, e, b, g, d, a) {
+	this.a11 = i;
+	this.a12 = h;
+	this.a13 = g;
+	this.a21 = f;
+	this.a22 = e;
+	this.a23 = d;
+	this.a31 = c;
+	this.a32 = b;
+	this.a33 = a;
+	this._ad = function(v) {
+		var s = v.length;
+		var z = this.a11;
+		var w = this.a12;
+		var u = this.a13;
+		var q = this.a21;
+		var p = this.a22;
+		var o = this.a23;
+		var m = this.a31;
+		var k = this.a32;
+		var j = this.a33;
+		for (var n = 0; n < s; n += 2) {
+			var t = v[n];
+			var r = v[n + 1];
+			var l = u * t + o * r + j;
+			v[n] = (z * t + q * r + m) / l;
+			v[n + 1] = (w * t + p * r + k) / l
+		}
+	};
+	this._fp = function(m, k) {
+		var q = m.length;
+		for (var l = 0; l < q; l++) {
+			var j = m[l];
+			var p = k[l];
+			var o = this.a13 * j + this.a23 * p + this.a33;
+			m[l] = (this.a11 * j + this.a21 * p + this.a31) / o;
+			k[l] = (this.a12 * j + this.a22 * p + this.a32) / o
+		}
+	};
+	this._fr = function() {
+		return new _ae(this.a22 * this.a33 - this.a23 * this.a32, this.a23 * this.a31 - this.a21 * this.a33, this
+			.a21 * this.a32 - this.a22 * this.a31, this.a13 * this.a32 - this.a12 * this.a33, this.a11 * this
+			.a33 - this.a13 * this.a31, this.a12 * this.a31 - this.a11 * this.a32, this.a12 * this.a23 - this
+			.a13 * this.a22, this.a13 * this.a21 - this.a11 * this.a23, this.a11 * this.a22 - this.a12 * this
+			.a21)
+	};
+	this.times = function(j) {
+		return new _ae(this.a11 * j.a11 + this.a21 * j.a12 + this.a31 * j.a13, this.a11 * j.a21 + this.a21 * j.a22 +
+			this.a31 * j.a23, this.a11 * j.a31 + this.a21 * j.a32 + this.a31 * j.a33, this.a12 * j.a11 + this
+			.a22 * j.a12 + this.a32 * j.a13, this.a12 * j.a21 + this.a22 * j.a22 + this.a32 * j.a23, this.a12 *
+			j.a31 + this.a22 * j.a32 + this.a32 * j.a33, this.a13 * j.a11 + this.a23 * j.a12 + this.a33 * j.a13,
+			this.a13 * j.a21 + this.a23 * j.a22 + this.a33 * j.a23, this.a13 * j.a31 + this.a23 * j.a32 + this
+			.a33 * j.a33)
+	}
+}
+_ae._ag = function(p, e, o, d, n, c, m, b, h, q, l, f, a, j, i, r) {
+	var g = this._be(p, e, o, d, n, c, m, b);
+	var k = this._bf(h, q, l, f, a, j, i, r);
+	return k.times(g)
+};
+_ae._bf = function(d, p, c, m, b, k, a, j) {
+	var h = j - k;
+	var f = p - m + k - j;
+	if (h == 0 && f == 0) {
+		return new _ae(c - d, b - c, d, m - p, k - m, p, 0, 0, 1)
+	} else {
+		var q = c - b;
+		var o = a - b;
+		var l = d - c + b - a;
+		var i = m - k;
+		var e = q * h - o * i;
+		var n = (l * h - o * f) / e;
+		var g = (q * f - l * i) / e;
+		return new _ae(c - d + n * c, a - d + g * a, d, m - p + n * m, j - p + g * j, p, n, g, 1)
+	}
+};
+_ae._be = function(f, h, d, g, b, e, a, c) {
+	return this._bf(f, h, d, g, b, e, a, c)._fr()
+};
+
+function _bg(b, a) {
+	this.bits = b;
+	this.points = a
+}
+
+function Detector(a) {
+	this.image = a;
+	this._am = null;
+	this._bi = function(m, l, c, b) {
+		var d = Math.abs(b - l) > Math.abs(c - m);
+		if (d) {
+			var r = m;
+			m = l;
+			l = r;
+			r = c;
+			c = b;
+			b = r
+		}
+		var j = Math.abs(c - m);
+		var i = Math.abs(b - l);
+		var p = -j >> 1;
+		var u = l < b ? 1 : -1;
+		var f = m < c ? 1 : -1;
+		var e = 0;
+		for (var h = m, g = l; h != c; h += f) {
+			var t = d ? g : h;
+			var s = d ? h : g;
+			if (e == 1) {
+				if (this.image[t + s * qrcode.width]) {
+					e++
+				}
+			} else {
+				if (!this.image[t + s * qrcode.width]) {
+					e++
+				}
+			}
+			if (e == 3) {
+				var o = h - m;
+				var n = g - l;
+				return Math.sqrt((o * o + n * n))
+			}
+			p += i;
+			if (p > 0) {
+				if (g == b) {
+					break
+				}
+				g += u;
+				p -= j
+			}
+		}
+		var k = c - m;
+		var q = b - l;
+		return Math.sqrt((k * k + q * q))
+	};
+	this._bh = function(i, g, h, f) {
+		var b = this._bi(i, g, h, f);
+		var e = 1;
+		var d = i - (h - i);
+		if (d < 0) {
+			e = i / (i - d);
+			d = 0
+		} else {
+			if (d >= qrcode.width) {
+				e = (qrcode.width - 1 - i) / (d - i);
+				d = qrcode.width - 1
+			}
+		}
+		var c = Math.floor(g - (f - g) * e);
+		e = 1;
+		if (c < 0) {
+			e = g / (g - c);
+			c = 0
+		} else {
+			if (c >= qrcode.height) {
+				e = (qrcode.height - 1 - g) / (c - g);
+				c = qrcode.height - 1
+			}
+		}
+		d = Math.floor(i + (d - i) * e);
+		b += this._bi(i, g, d, c);
+		return b - 1
+	};
+	this._bj = function(c, d) {
+		var b = this._bh(Math.floor(c.X), Math.floor(c.Y), Math.floor(d.X), Math.floor(d.Y));
+		var e = this._bh(Math.floor(d.X), Math.floor(d.Y), Math.floor(c.X), Math.floor(c.Y));
+		if (isNaN(b)) {
+			return e / 7
+		}
+		if (isNaN(e)) {
+			return b / 7
+		}
+		return (b + e) / 14
+	};
+	this._bk = function(d, c, b) {
+		return (this._bj(d, c) + this._bj(d, b)) / 2
+	};
+	this.distance = function(d, b) {
+		var e = d.X - b.X;
+		var c = d.Y - b.Y;
+		return Math.sqrt((e * e + c * c))
+	};
+	this._bx = function(g, f, d, e) {
+		var b = Math.round(this.distance(g, f) / e);
+		var c = Math.round(this.distance(g, d) / e);
+		var h = ((b + c) >> 1) + 7;
+		switch (h & 3) {
+			case 0:
+				h++;
+				break;
+			case 2:
+				h--;
+				break;
+			case 3:
+				throw "Error"
+		}
+		return h
+	};
+	this._bl = function(g, f, d, j) {
+		var k = Math.floor(j * g);
+		var h = Math.max(0, f - k);
+		var i = Math.min(qrcode.width - 1, f + k);
+		if (i - h < g * 3) {
+			throw "Error"
+		}
+		var b = Math.max(0, d - k);
+		var c = Math.min(qrcode.height - 1, d + k);
+		var e = new _ak(this.image, h, b, i - h, c - b, g, this._am);
+		return e.find()
+	};
+	this.createTransform = function(l, h, k, b, g) {
+		var j = g - 3.5;
+		var i;
+		var f;
+		var e;
+		var c;
+		if (b != null) {
+			i = b.X;
+			f = b.Y;
+			e = c = j - 3
+		} else {
+			i = (h.X - l.X) + k.X;
+			f = (h.Y - l.Y) + k.Y;
+			e = c = j
+		}
+		var d = _ae._ag(3.5, 3.5, j, 3.5, e, c, 3.5, j, l.X, l.Y, h.X, h.Y, i, f, k.X, k.Y);
+		return d
+	};
+	this._bz = function(e, b, d) {
+		var c = _aa;
+		return c._af(e, d, b)
+	};
+	this._cd = function(q) {
+		var j = q._gq;
+		var h = q._gs;
+		var n = q._gp;
+		var d = this._bk(j, h, n);
+		if (d < 1) {
+			throw "Error"
+		}
+		var r = this._bx(j, h, n, d);
+		var b = _a3._at(r);
+		var k = b._cr - 7;
+		var l = null;
+		if (b._as.length > 0) {
+			var f = h.X - j.X + n.X;
+			var e = h.Y - j.Y + n.Y;
+			var c = 1 - 3 / k;
+			var t = Math.floor(j.X + c * (f - j.X));
+			var s = Math.floor(j.Y + c * (e - j.Y));
+			for (var p = 4; p <= 16; p <<= 1) {
+				l = this._bl(d, t, s, p);
+				break
+			}
+		}
+		var g = this.createTransform(j, h, n, l, r);
+		var m = this._bz(this.image, g, r);
+		var o;
+		if (l == null) {
+			o = new Array(n, j, h)
+		} else {
+			o = new Array(n, j, h, l)
+		}
+		return new _bg(m, o)
+	};
+	this.detect = function() {
+		var b = new _cc()._ce(this.image);
+		return this._cd(b)
+	}
+}
+var _ca = 21522;
+var _cb = new Array(new Array(21522, 0), new Array(20773, 1), new Array(24188, 2), new Array(23371, 3), new Array(17913,
+		4), new Array(16590, 5), new Array(20375, 6), new Array(19104, 7), new Array(30660, 8), new Array(29427, 9),
+	new Array(32170, 10), new Array(30877, 11), new Array(26159, 12), new Array(25368, 13), new Array(27713, 14),
+	new Array(26998, 15), new Array(5769, 16), new Array(5054, 17), new Array(7399, 18), new Array(6608, 19),
+	new Array(1890, 20), new Array(597, 21), new Array(3340, 22), new Array(2107, 23), new Array(13663, 24),
+	new Array(12392, 25), new Array(16177, 26), new Array(14854, 27), new Array(9396, 28), new Array(8579, 29),
+	new Array(11994, 30), new Array(11245, 31));
+var _ch = new Array(0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4);
+
+function _ax(a) {
+	this._cf = _cg.forBits((a >> 3) & 3);
+	this._fe = (a & 7);
+	this.__defineGetter__("_cg", function() {
+		return this._cf
+	});
+	this.__defineGetter__("_dx", function() {
+		return this._fe
+	});
+	this.GetHashCode = function() {
+		return (this._cf.ordinal() << 3) | _fe
+	};
+	this.Equals = function(c) {
+		var b = c;
+		return this._cf == b._cf && this._fe == b._fe
+	}
+}
+_ax._gj = function(d, c) {
+	d ^= c;
+	return _ch[d & 15] + _ch[(_ew(d, 4) & 15)] + _ch[(_ew(d, 8) & 15)] + _ch[(_ew(d, 12) & 15)] + _ch[(_ew(d, 16) &
+		15)] + _ch[(_ew(d, 20) & 15)] + _ch[(_ew(d, 24) & 15)] + _ch[(_ew(d, 28) & 15)]
+};
+_ax._ci = function(a) {
+	var b = _ax._cj(a);
+	if (b != null) {
+		return b
+	}
+	return _ax._cj(a ^ _ca)
+};
+_ax._cj = function(d) {
+	var b = 4294967295;
+	var a = 0;
+	for (var c = 0; c < _cb.length; c++) {
+		var g = _cb[c];
+		var f = g[0];
+		if (f == d) {
+			return new _ax(g[1])
+		}
+		var e = this._gj(d, f);
+		if (e < b) {
+			a = g[1];
+			b = e
+		}
+	}
+	if (b <= 3) {
+		return new _ax(a)
+	}
+	return null
+};
+
+function _cg(a, c, b) {
+	this._ff = a;
+	this.bits = c;
+	this.name = b;
+	this.__defineGetter__("Bits", function() {
+		return this.bits
+	});
+	this.__defineGetter__("Name", function() {
+		return this.name
+	});
+	this.ordinal = function() {
+		return this._ff
+	}
+}
+_cg.forBits = function(a) {
+	if (a < 0 || a >= FOR_BITS.length) {
+		throw "bad arguments"
+	}
+	return FOR_BITS[a]
+};
+var L = new _cg(0, 1, "L");
+var M = new _cg(1, 0, "M");
+var Q = new _cg(2, 3, "Q");
+var H = new _cg(3, 2, "H");
+var FOR_BITS = new Array(M, L, H, Q);
+
+function _ac(d, a) {
+	if (!a) {
+		a = d
+	}
+	if (d < 1 || a < 1) {
+		throw "Both dimensions must be greater than 0"
+	}
+	this.width = d;
+	this.height = a;
+	var c = d >> 5;
+	if ((d & 31) != 0) {
+		c++
+	}
+	this.rowSize = c;
+	this.bits = new Array(c * a);
+	for (var b = 0; b < this.bits.length; b++) {
+		this.bits[b] = 0
+	}
+	this.__defineGetter__("Width", function() {
+		return this.width
+	});
+	this.__defineGetter__("Height", function() {
+		return this.height
+	});
+	this.__defineGetter__("Dimension", function() {
+		if (this.width != this.height) {
+			throw "Can't call getDimension() on a non-square matrix"
+		}
+		return this.width
+	});
+	this._ds = function(e, g) {
+		var f = g * this.rowSize + (e >> 5);
+		return ((_ew(this.bits[f], (e & 31))) & 1) != 0
+	};
+	this._dq = function(e, g) {
+		var f = g * this.rowSize + (e >> 5);
+		this.bits[f] |= 1 << (e & 31)
+	};
+	this.flip = function(e, g) {
+		var f = g * this.rowSize + (e >> 5);
+		this.bits[f] ^= 1 << (e & 31)
+	};
+	this.clear = function() {
+		var e = this.bits.length;
+		for (var f = 0; f < e; f++) {
+			this.bits[f] = 0
+		}
+	};
+	this._bq = function(g, j, f, m) {
+		if (j < 0 || g < 0) {
+			throw "Left and top must be nonnegative"
+		}
+		if (m < 1 || f < 1) {
+			throw "Height and width must be at least 1"
+		}
+		var l = g + f;
+		var e = j + m;
+		if (e > this.height || l > this.width) {
+			throw "The region must fit inside the matrix"
+		}
+		for (var i = j; i < e; i++) {
+			var h = i * this.rowSize;
+			for (var k = g; k < l; k++) {
+				this.bits[h + (k >> 5)] |= 1 << (k & 31)
+			}
+		}
+	}
+}
+
+function _dl(a, b) {
+	this._dv = a;
+	this._dw = b;
+	this.__defineGetter__("_du", function() {
+		return this._dv
+	});
+	this.__defineGetter__("Codewords", function() {
+		return this._dw
+	})
+}
+_dl._gn = function(c, h, r) {
+	if (c.length != h._dp) {
+		throw "bad arguments"
+	}
+	var k = h._bu(r);
+	var e = 0;
+	var d = k._fb();
+	for (var q = 0; q < d.length; q++) {
+		e += d[q].Count
+	}
+	var l = new Array(e);
+	var n = 0;
+	for (var o = 0; o < d.length; o++) {
+		var f = d[o];
+		for (var q = 0; q < f.Count; q++) {
+			var m = f._dm;
+			var s = k._bo + m;
+			l[n++] = new _dl(m, new Array(s))
+		}
+	}
+	var t = l[0]._dw.length;
+	var b = l.length - 1;
+	while (b >= 0) {
+		var v = l[b]._dw.length;
+		if (v == t) {
+			break
+		}
+		b--
+	}
+	b++;
+	var g = t - k._bo;
+	var a = 0;
+	for (var q = 0; q < g; q++) {
+		for (var o = 0; o < n; o++) {
+			l[o]._dw[q] = c[a++]
+		}
+	}
+	for (var o = b; o < n; o++) {
+		l[o]._dw[g] = c[a++]
+	}
+	var p = l[0]._dw.length;
+	for (var q = g; q < p; q++) {
+		for (var o = 0; o < n; o++) {
+			var u = o < b ? q : q + 1;
+			l[o]._dw[u] = c[a++]
+		}
+	}
+	return l
+};
+
+function _cl(a) {
+	var b = a.Dimension;
+	if (b < 21 || (b & 3) != 1) {
+		throw "Error _cl"
+	}
+	this._au = a;
+	this._cp = null;
+	this._co = null;
+	this._dk = function(d, c, e) {
+		return this._au._ds(d, c) ? (e << 1) | 1 : e << 1
+	};
+	this._cm = function() {
+		if (this._co != null) {
+			return this._co
+		}
+		var g = 0;
+		for (var e = 0; e < 6; e++) {
+			g = this._dk(e, 8, g)
+		}
+		g = this._dk(7, 8, g);
+		g = this._dk(8, 8, g);
+		g = this._dk(8, 7, g);
+		for (var c = 5; c >= 0; c--) {
+			g = this._dk(8, c, g)
+		}
+		this._co = _ax._ci(g);
+		if (this._co != null) {
+			return this._co
+		}
+		var f = this._au.Dimension;
+		g = 0;
+		var d = f - 8;
+		for (var e = f - 1; e >= d; e--) {
+			g = this._dk(e, 8, g)
+		}
+		for (var c = f - 7; c < f; c++) {
+			g = this._dk(8, c, g)
+		}
+		this._co = _ax._ci(g);
+		if (this._co != null) {
+			return this._co
+		}
+		throw "Error _cm"
+	};
+	this._cq = function() {
+		if (this._cp != null) {
+			return this._cp
+		}
+		var h = this._au.Dimension;
+		var f = (h - 17) >> 2;
+		if (f <= 6) {
+			return _a3._av(f)
+		}
+		var g = 0;
+		var e = h - 11;
+		for (var c = 5; c >= 0; c--) {
+			for (var d = h - 9; d >= e; d--) {
+				g = this._dk(d, c, g)
+			}
+		}
+		this._cp = _a3._aw(g);
+		if (this._cp != null && this._cp._cr == h) {
+			return this._cp
+		}
+		g = 0;
+		for (var d = 5; d >= 0; d--) {
+			for (var c = h - 9; c >= e; c--) {
+				g = this._dk(d, c, g)
+			}
+		}
+		this._cp = _a3._aw(g);
+		if (this._cp != null && this._cp._cr == h) {
+			return this._cp
+		}
+		throw "Error _cq"
+	};
+	this._gk = function() {
+		var q = this._cm();
+		var o = this._cq();
+		var c = _dx._gl(q._dx);
+		var f = this._au.Dimension;
+		c._dj(this._au, f);
+		var k = o._aq();
+		var n = true;
+		var r = new Array(o._dp);
+		var m = 0;
+		var p = 0;
+		var h = 0;
+		for (var e = f - 1; e > 0; e -= 2) {
+			if (e == 6) {
+				e--
+			}
+			for (var l = 0; l < f; l++) {
+				var g = n ? f - 1 - l : l;
+				for (var d = 0; d < 2; d++) {
+					if (!k._ds(e - d, g)) {
+						h++;
+						p <<= 1;
+						if (this._au._ds(e - d, g)) {
+							p |= 1
+						}
+						if (h == 8) {
+							r[m++] = p;
+							h = 0;
+							p = 0
+						}
+					}
+				}
+			}
+			n ^= true
+		}
+		if (m != o._dp) {
+			throw "Error _gk"
+		}
+		return r
+	}
+}
+var _dx = {};
+_dx._gl = function(a) {
+	if (a < 0 || a > 7) {
+		throw "bad arguments"
+	}
+	return _dx._dy[a]
+};
+
+function _fg() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(b, a) {
+		return ((b + a) & 1) == 0
+	}
+}
+
+function _fh() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(b, a) {
+		return (b & 1) == 0
+	}
+}
+
+function _fi() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(b, a) {
+		return a % 3 == 0
+	}
+}
+
+function _fj() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(b, a) {
+		return (b + a) % 3 == 0
+	}
+}
+
+function _fk() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(b, a) {
+		return (((_ew(b, 1)) + (a / 3)) & 1) == 0
+	}
+}
+
+function _fl() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(c, b) {
+		var a = c * b;
+		return (a & 1) + (a % 3) == 0
+	}
+}
+
+function _fm() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(c, b) {
+		var a = c * b;
+		return (((a & 1) + (a % 3)) & 1) == 0
+	}
+}
+
+function _fn() {
+	this._dj = function(c, d) {
+		for (var b = 0; b < d; b++) {
+			for (var a = 0; a < d; a++) {
+				if (this._fw(b, a)) {
+					c.flip(a, b)
+				}
+			}
+		}
+	};
+	this._fw = function(b, a) {
+		return ((((b + a) & 1) + ((b * a) % 3)) & 1) == 0
+	}
+}
+_dx._dy = new Array(new _fg(), new _fh(), new _fi(), new _fj(), new _fk(), new _fl(), new _fm(), new _fn());
+
+function _db(a) {
+	this._fa = a;
+	this.decode = function(j, f) {
+		var c = new _bp(this._fa, j);
+		var p = new Array(f);
+		for (var g = 0; g < p.length; g++) {
+			p[g] = 0
+		}
+		var m = false;
+		var d = true;
+		for (var g = 0; g < f; g++) {
+			var q = c.evaluateAt(this._fa.exp(m ? g + 1 : g));
+			p[p.length - 1 - g] = q;
+			if (q != 0) {
+				d = false
+			}
+		}
+		if (d) {
+			return
+		}
+		var b = new _bp(this._fa, p);
+		var l = this._eb(this._fa._ba(f, 1), b, f);
+		var o = l[0];
+		var n = l[1];
+		var k = this._ey(o);
+		var e = this._di(n, k, m);
+		for (var g = 0; g < k.length; g++) {
+			var h = j.length - 1 - this._fa.log(k[g]);
+			if (h < 0) {
+				throw "ReedSolomonException Bad error location"
+			}
+			j[h] = _az._bd(j[h], e[g])
+		}
+	};
+	this._eb = function(z, y, f) {
+		if (z._ec < y._ec) {
+			var w = z;
+			z = y;
+			y = w
+		}
+		var B = z;
+		var k = y;
+		var o = this._fa.One;
+		var j = this._fa.Zero;
+		var e = this._fa.Zero;
+		var i = this._fa.One;
+		while (k._ec >= Math.floor(f / 2)) {
+			var x = B;
+			var g = o;
+			var v = e;
+			B = k;
+			o = j;
+			e = i;
+			if (B.Zero) {
+				throw "r_{i-1} was zero"
+			}
+			k = x;
+			var m = this._fa.Zero;
+			var p = B._ex(B._ec);
+			var h = this._fa.inverse(p);
+			while (k._ec >= B._ec && !k.Zero) {
+				var c = k._ec - B._ec;
+				var A = this._fa.multiply(k._ex(k._ec), h);
+				m = m._bd(this._fa._ba(c, A));
+				k = k._bd(B._dc(c, A))
+			}
+			j = m.multiply1(o)._bd(g);
+			i = m.multiply1(e)._bd(v)
+		}
+		var u = i._ex(0);
+		if (u == 0) {
+			throw "ReedSolomonException sigmaTilde(0) was zero"
+		}
+		var d = this._fa.inverse(u);
+		var n = i.multiply2(d);
+		var l = k.multiply2(d);
+		return new Array(n, l)
+	};
+	this._ey = function(f) {
+		var g = f._ec;
+		if (g == 1) {
+			return new Array(f._ex(1))
+		}
+		var b = new Array(g);
+		var d = 0;
+		for (var c = 1; c < 256 && d < g; c++) {
+			if (f.evaluateAt(c) == 0) {
+				b[d] = this._fa.inverse(c);
+				d++
+			}
+		}
+		if (d != g) {
+			throw "Error locator degree does not match number of roots"
+		}
+		return b
+	};
+	this._di = function(f, h, g) {
+		var k = h.length;
+		var l = new Array(k);
+		for (var e = 0; e < k; e++) {
+			var b = this._fa.inverse(h[e]);
+			var c = 1;
+			for (var d = 0; d < k; d++) {
+				if (e != d) {
+					c = this._fa.multiply(c, _az._bd(1, this._fa.multiply(h[d], b)))
+				}
+			}
+			l[e] = this._fa.multiply(f.evaluateAt(b), this._fa.inverse(c));
+			if (g) {
+				l[e] = this._fa.multiply(l[e], b)
+			}
+		}
+		return l
+	}
+}
+
+function _bp(f, e) {
+	if (e == null || e.length == 0) {
+		throw "bad arguments"
+	}
+	this._fa = f;
+	var c = e.length;
+	if (c > 1 && e[0] == 0) {
+		var d = 1;
+		while (d < c && e[d] == 0) {
+			d++
+		}
+		if (d == c) {
+			this._dd = f.Zero._dd
+		} else {
+			this._dd = new Array(c - d);
+			for (var b = 0; b < this._dd.length; b++) {
+				this._dd[b] = 0
+			}
+			for (var a = 0; a < this._dd.length; a++) {
+				this._dd[a] = e[d + a]
+			}
+		}
+	} else {
+		this._dd = e
+	}
+	this.__defineGetter__("Zero", function() {
+		return this._dd[0] == 0
+	});
+	this.__defineGetter__("_ec", function() {
+		return this._dd.length - 1
+	});
+	this.__defineGetter__("Coefficients", function() {
+		return this._dd
+	});
+	this._ex = function(g) {
+		return this._dd[this._dd.length - 1 - g]
+	};
+	this.evaluateAt = function(h) {
+		if (h == 0) {
+			return this._ex(0)
+		}
+		var l = this._dd.length;
+		if (h == 1) {
+			var g = 0;
+			for (var k = 0; k < l; k++) {
+				g = _az._bd(g, this._dd[k])
+			}
+			return g
+		}
+		var j = this._dd[0];
+		for (var k = 1; k < l; k++) {
+			j = _az._bd(this._fa.multiply(h, j), this._dd[k])
+		}
+		return j
+	};
+	this._bd = function(g) {
+		if (this._fa != g._fa) {
+			throw "GF256Polys do not have same _az _fa"
+		}
+		if (this.Zero) {
+			return g
+		}
+		if (g.Zero) {
+			return this
+		}
+		var o = this._dd;
+		var n = g._dd;
+		if (o.length > n.length) {
+			var j = o;
+			o = n;
+			n = j
+		}
+		var h = new Array(n.length);
+		var k = n.length - o.length;
+		for (var m = 0; m < k; m++) {
+			h[m] = n[m]
+		}
+		for (var l = k; l < n.length; l++) {
+			h[l] = _az._bd(o[l - k], n[l])
+		}
+		return new _bp(f, h)
+	};
+	this.multiply1 = function(o) {
+		if (this._fa != o._fa) {
+			throw "GF256Polys do not have same _az _fa"
+		}
+		if (this.Zero || o.Zero) {
+			return this._fa.Zero
+		}
+		var q = this._dd;
+		var g = q.length;
+		var l = o._dd;
+		var n = l.length;
+		var p = new Array(g + n - 1);
+		for (var m = 0; m < g; m++) {
+			var h = q[m];
+			for (var k = 0; k < n; k++) {
+				p[m + k] = _az._bd(p[m + k], this._fa.multiply(h, l[k]))
+			}
+		}
+		return new _bp(this._fa, p)
+	};
+	this.multiply2 = function(g) {
+		if (g == 0) {
+			return this._fa.Zero
+		}
+		if (g == 1) {
+			return this
+		}
+		var j = this._dd.length;
+		var k = new Array(j);
+		for (var h = 0; h < j; h++) {
+			k[h] = this._fa.multiply(this._dd[h], g)
+		}
+		return new _bp(this._fa, k)
+	};
+	this._dc = function(l, g) {
+		if (l < 0) {
+			throw "bad arguments"
+		}
+		if (g == 0) {
+			return this._fa.Zero
+		}
+		var j = this._dd.length;
+		var k = new Array(j + l);
+		for (var h = 0; h < k.length; h++) {
+			k[h] = 0
+		}
+		for (var h = 0; h < j; h++) {
+			k[h] = this._fa.multiply(this._dd[h], g)
+		}
+		return new _bp(this._fa, k)
+	};
+	this.divide = function(l) {
+		if (this._fa != l._fa) {
+			throw "GF256Polys do not have same _az _fa"
+		}
+		if (l.Zero) {
+			throw "Divide by 0"
+		}
+		var j = this._fa.Zero;
+		var o = this;
+		var g = l._ex(l._ec);
+		var n = this._fa.inverse(g);
+		while (o._ec >= l._ec && !o.Zero) {
+			var m = o._ec - l._ec;
+			var h = this._fa.multiply(o._ex(o._ec), n);
+			var i = l._dc(m, h);
+			var k = this._fa._ba(m, h);
+			j = j._bd(k);
+			o = o._bd(i)
+		}
+		return new Array(j, o)
+	}
+}
+
+function _az(b) {
+	this._gh = new Array(256);
+	this._gi = new Array(256);
+	var a = 1;
+	for (var e = 0; e < 256; e++) {
+		this._gh[e] = a;
+		a <<= 1;
+		if (a >= 256) {
+			a ^= b
+		}
+	}
+	for (var e = 0; e < 255; e++) {
+		this._gi[this._gh[e]] = e
+	}
+	var d = new Array(1);
+	d[0] = 0;
+	this.zero = new _bp(this, new Array(d));
+	var c = new Array(1);
+	c[0] = 1;
+	this.one = new _bp(this, new Array(c));
+	this.__defineGetter__("Zero", function() {
+		return this.zero
+	});
+	this.__defineGetter__("One", function() {
+		return this.one
+	});
+	this._ba = function(j, f) {
+		if (j < 0) {
+			throw "bad arguments"
+		}
+		if (f == 0) {
+			return zero
+		}
+		var h = new Array(j + 1);
+		for (var g = 0; g < h.length; g++) {
+			h[g] = 0
+		}
+		h[0] = f;
+		return new _bp(this, h)
+	};
+	this.exp = function(f) {
+		return this._gh[f]
+	};
+	this.log = function(f) {
+		if (f == 0) {
+			throw "bad arguments"
+		}
+		return this._gi[f]
+	};
+	this.inverse = function(f) {
+		if (f == 0) {
+			throw "System.ArithmeticException"
+		}
+		return this._gh[255 - this._gi[f]]
+	};
+	this.multiply = function(g, f) {
+		if (g == 0 || f == 0) {
+			return 0
+		}
+		if (g == 1) {
+			return f
+		}
+		if (f == 1) {
+			return g
+		}
+		return this._gh[(this._gi[g] + this._gi[f]) % 255]
+	}
+}
+_az._bb = new _az(285);
+_az._bc = new _az(301);
+_az._bd = function(d, c) {
+	return d ^ c
+};
+var Decoder = {};
+Decoder.rsDecoder = new _db(_az._bb);
+Decoder.correctErrors = function(g, b) {
+	var d = g.length;
+	var f = new Array(d);
+	for (var e = 0; e < d; e++) {
+		f[e] = g[e] & 255
+	}
+	var a = g.length - b;
+	try {
+		Decoder.rsDecoder.decode(f, a)
+	} catch (c) {
+		throw c
+	}
+	for (var e = 0; e < b; e++) {
+		g[e] = f[e]
+	}
+};
+Decoder.decode = function(q) {
+	var b = new _cl(q);
+	var o = b._cq();
+	var c = b._cm()._cg;
+	var p = b._gk();
+	var a = _dl._gn(p, o, c);
+	var f = 0;
+	for (var k = 0; k < a.length; k++) {
+		f += a[k]._du
+	}
+	var e = new Array(f);
+	var n = 0;
+	for (var h = 0; h < a.length; h++) {
+		var m = a[h];
+		var d = m.Codewords;
+		var g = m._du;
+		Decoder.correctErrors(d, g);
+		for (var k = 0; k < g; k++) {
+			e[n++] = d[k]
+		}
+	}
+	var l = new QRCodeDataBlockReader(e, o._fd, c.Bits);
+	return l
+};
+var qrcode = {};
+qrcode.imagedata = null;
+qrcode.width = 0;
+qrcode.height = 0;
+qrcode.qrCodeSymbol = null;
+qrcode.debug = false;
+qrcode.maxImgSize = 1024 * 1024;
+qrcode._eo = [
+	[10, 9, 8, 8],
+	[12, 11, 16, 10],
+	[14, 13, 16, 12]
+];
+qrcode.callback = null;
+qrcode.vidSuccess = function(a) {
+	qrcode.localstream = a;
+	if (qrcode.webkit) {
+		qrcode.video.src = window.webkitURL.createObjectURL(a)
+	} else {
+		if (qrcode.moz) {
+			qrcode.video.mozSrcObject = a;
+			qrcode.video.play()
+		} else {
+			qrcode.video.src = a
+		}
+	}
+	qrcode.gUM = true;
+	qrcode.canvas_qr2 = document.createElement("canvas");
+	qrcode.canvas_qr2.id = "qr-canvas";
+	qrcode.qrcontext2 = qrcode.canvas_qr2.getContext("2d");
+	qrcode.canvas_qr2.width = qrcode.video.videoWidth;
+	qrcode.canvas_qr2.height = qrcode.video.videoHeight;
+	setTimeout(qrcode.captureToCanvas, 500)
+};
+qrcode.vidError = function(a) {
+	qrcode.gUM = false;
+	return
+};
+qrcode.captureToCanvas = function() {
+	if (qrcode.gUM) {
+		try {
+			if (qrcode.video.videoWidth == 0) {
+				setTimeout(qrcode.captureToCanvas, 500);
+				return
+			} else {
+				qrcode.canvas_qr2.width = qrcode.video.videoWidth;
+				qrcode.canvas_qr2.height = qrcode.video.videoHeight
+			}
+			qrcode.qrcontext2.drawImage(qrcode.video, 0, 0);
+			try {
+				qrcode.decode()
+			} catch (a) {
+				console.log(a);
+				setTimeout(qrcode.captureToCanvas, 500)
+			}
+		} catch (a) {
+			console.log(a);
+			setTimeout(qrcode.captureToCanvas, 500)
+		}
+	}
+};
+qrcode.setWebcam = function(c) {
+	var d = navigator;
+	qrcode.video = document.getElementById(c);
+	var a = true;
+	if (navigator.mediaDevices && navigator.mediaDevices.enumerateDevices) {
+		try {
+			navigator.mediaDevices.enumerateDevices().then(function(e) {
+				e.forEach(function(f) {
+					console.log("deb1");
+					if (f.kind === "videoinput") {
+						if (f.label.toLowerCase().search("back") > -1) {
+							a = [{
+								sourceId: f.deviceId
+							}]
+						}
+					}
+					console.log(f.kind + ": " + f.label + " id = " + f.deviceId)
+				})
+			})
+		} catch (b) {
+			console.log(b)
+		}
+	} else {
+		console.log("no navigator.mediaDevices.enumerateDevices")
+	}
+	if (d.getUserMedia) {
+		d.getUserMedia({
+			video: a,
+			audio: false
+		}, qrcode.vidSuccess, qrcode.vidError)
+	} else {
+		if (d.webkitGetUserMedia) {
+			qrcode.webkit = true;
+			d.webkitGetUserMedia({
+				video: a,
+				audio: false
+			}, qrcode.vidSuccess, qrcode.vidError)
+		} else {
+			if (d.mozGetUserMedia) {
+				qrcode.moz = true;
+				d.mozGetUserMedia({
+					video: a,
+					audio: false
+				}, qrcode.vidSuccess, qrcode.vidError)
+			}
+		}
+	}
+};
+qrcode.decode = function(d) {
+	if (arguments.length == 0) {
+		if (qrcode.canvas_qr2) {
+			var b = qrcode.canvas_qr2;
+			var a = qrcode.qrcontext2
+		} else {
+			var b = document.getElementById("qr-canvas");
+			var a = b.getContext("2d")
+		}
+		qrcode.width = b.width;
+		qrcode.height = b.height;
+		qrcode.imagedata = a.getImageData(0, 0, qrcode.width, qrcode.height);
+		qrcode.result = qrcode.process(a);
+		if (qrcode.callback != null) {
+			qrcode.callback(qrcode.result)
+		}
+		return qrcode.result
+	} else {
+		var c = new Image();
+		c.crossOrigin = "Anonymous";
+		c.onload = function() {
+			var g = document.getElementById("out-canvas");
+			if (g != null) {
+				var j = g.getContext("2d");
+				j.clearRect(0, 0, 320, 240);
+				j.drawImage(c, 0, 0, 320, 240)
+			}
+			var i = document.createElement("canvas");
+			var h = i.getContext("2d");
+			var f = c.height;
+			var l = c.width;
+			if (c.width * c.height > qrcode.maxImgSize) {
+				var k = c.width / c.height;
+				f = Math.sqrt(qrcode.maxImgSize / k);
+				l = k * f
+			}
+			i.width = l;
+			i.height = f;
+			h.drawImage(c, 0, 0, i.width, i.height);
+			qrcode.width = i.width;
+			qrcode.height = i.height;
+			try {
+				qrcode.imagedata = h.getImageData(0, 0, i.width, i.height)
+			} catch (m) {
+				qrcode.result =
+					"Cross domain image reading not supported in your browser! Save it to your computer then drag and drop the file!";
+				if (qrcode.callback != null) {
+					qrcode.callback(qrcode.result)
+				}
+				return
+			}
+			try {
+				qrcode.result = qrcode.process(h)
+			} catch (m) {
+				console.log(m);
+				qrcode.result = "error decoding QR Code"
+			}
+			if (qrcode.callback != null) {
+				qrcode.callback(qrcode.result)
+			}
+		};
+		c.onerror = function() {
+			if (qrcode.callback != null) {
+				qrcode.callback("Failed to load the image")
+			}
+		};
+		c.src = d
+	}
+};
+qrcode.isUrl = function(a) {
+	var b = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
+	return b.test(a)
+};
+qrcode.decode_url = function(b) {
+	var d = "";
+	try {
+		d = escape(b)
+	} catch (c) {
+		console.log(c);
+		d = b
+	}
+	var a = "";
+	try {
+		a = decodeURIComponent(d)
+	} catch (c) {
+		console.log(c);
+		a = d
+	}
+	return a
+};
+qrcode.decode_utf8 = function(a) {
+	if (qrcode.isUrl(a)) {
+		return qrcode.decode_url(a)
+	} else {
+		return a
+	}
+};
+qrcode.process = function(q) {
+	var a = new Date().getTime();
+	var c = qrcode.grayScaleToBitmap(qrcode.grayscale());
+	if (qrcode.debug) {
+		for (var m = 0; m < qrcode.height; m++) {
+			for (var n = 0; n < qrcode.width; n++) {
+				var o = (n * 4) + (m * qrcode.width * 4);
+				qrcode.imagedata.data[o] = c[n + m * qrcode.width] ? 0 : 0;
+				qrcode.imagedata.data[o + 1] = c[n + m * qrcode.width] ? 0 : 0;
+				qrcode.imagedata.data[o + 2] = c[n + m * qrcode.width] ? 255 : 0
+			}
+		}
+		q.putImageData(qrcode.imagedata, 0, 0)
+	}
+	var h = new Detector(c);
+	var p = h.detect();
+	if (qrcode.debug) {
+		for (var m = 0; m < p.bits.Height; m++) {
+			for (var n = 0; n < p.bits.Width; n++) {
+				var o = (n * 4 * 2) + (m * 2 * qrcode.width * 4);
+				qrcode.imagedata.data[o] = p.bits._ds(n, m) ? 0 : 0;
+				qrcode.imagedata.data[o + 1] = p.bits._ds(n, m) ? 0 : 0;
+				qrcode.imagedata.data[o + 2] = p.bits._ds(n, m) ? 255 : 0
+			}
+		}
+		q.putImageData(qrcode.imagedata, 0, 0)
+	}
+	var k = Decoder.decode(p.bits);
+	var g = k.DataByte;
+	var l = "";
+	for (var f = 0; f < g.length; f++) {
+		for (var e = 0; e < g[f].length; e++) {
+			l += String.fromCharCode(g[f][e])
+		}
+	}
+	var d = new Date().getTime();
+	var b = d - a;
+	return qrcode.decode_utf8(l)
+};
+qrcode.getPixel = function(b, d) {
+	if (qrcode.width < b) {
+		throw "point error"
+	}
+	if (qrcode.height < d) {
+		throw "point error"
+	}
+	var a = (b * 4) + (d * qrcode.width * 4);
+	var c = (qrcode.imagedata.data[a] * 33 + qrcode.imagedata.data[a + 1] * 34 + qrcode.imagedata.data[a + 2] *
+		33) / 100;
+	return c
+};
+qrcode.binarize = function(d) {
+	var c = new Array(qrcode.width * qrcode.height);
+	for (var e = 0; e < qrcode.height; e++) {
+		for (var b = 0; b < qrcode.width; b++) {
+			var a = qrcode.getPixel(b, e);
+			c[b + e * qrcode.width] = a <= d ? true : false
+		}
+	}
+	return c
+};
+qrcode._em = function(d) {
+	var c = 4;
+	var k = Math.floor(qrcode.width / c);
+	var j = Math.floor(qrcode.height / c);
+	var f = new Array(c);
+	for (var g = 0; g < c; g++) {
+		f[g] = new Array(c);
+		for (var e = 0; e < c; e++) {
+			f[g][e] = new Array(0, 0)
+		}
+	}
+	for (var o = 0; o < c; o++) {
+		for (var a = 0; a < c; a++) {
+			f[a][o][0] = 255;
+			for (var l = 0; l < j; l++) {
+				for (var n = 0; n < k; n++) {
+					var h = d[k * a + n + (j * o + l) * qrcode.width];
+					if (h < f[a][o][0]) {
+						f[a][o][0] = h
+					}
+					if (h > f[a][o][1]) {
+						f[a][o][1] = h
+					}
+				}
+			}
+		}
+	}
+	var m = new Array(c);
+	for (var b = 0; b < c; b++) {
+		m[b] = new Array(c)
+	}
+	for (var o = 0; o < c; o++) {
+		for (var a = 0; a < c; a++) {
+			m[a][o] = Math.floor((f[a][o][0] + f[a][o][1]) / 2)
+		}
+	}
+	return m
+};
+qrcode.grayScaleToBitmap = function(f) {
+	var k = qrcode._em(f);
+	var b = k.length;
+	var e = Math.floor(qrcode.width / b);
+	var d = Math.floor(qrcode.height / b);
+	var h = new ArrayBuffer(qrcode.width * qrcode.height);
+	var c = new Uint8Array(h);
+	for (var j = 0; j < b; j++) {
+		for (var a = 0; a < b; a++) {
+			for (var g = 0; g < d; g++) {
+				for (var i = 0; i < e; i++) {
+					c[e * a + i + (d * j + g) * qrcode.width] = (f[e * a + i + (d * j + g) * qrcode.width] < k[a][
+						j]) ? true : false
+				}
+			}
+		}
+	}
+	return c
+};
+qrcode.grayscale = function() {
+	var e = new ArrayBuffer(qrcode.width * qrcode.height);
+	var c = new Uint8Array(e);
+	for (var d = 0; d < qrcode.height; d++) {
+		for (var b = 0; b < qrcode.width; b++) {
+			var a = qrcode.getPixel(b, d);
+			c[b + d * qrcode.width] = a
+		}
+	}
+	return c
+};
+
+function _ew(a, b) {
+	if (a >= 0) {
+		return a >> b
+	} else {
+		return (a >> b) + (2 << ~b)
+	}
+}
+var _gf = 3;
+var _eh = 57;
+var _el = 8;
+var _eg = 2;
+qrcode._er = function(c) {
+	function b(m, k) {
+		var n = m.X - k.X;
+		var l = m.Y - k.Y;
+		return Math.sqrt((n * n + l * l))
+	}
+
+	function d(k, o, n) {
+		var m = o.x;
+		var l = o.y;
+		return ((n.x - m) * (k.y - l)) - ((n.y - l) * (k.x - m))
+	}
+	var i = b(c[0], c[1]);
+	var f = b(c[1], c[2]);
+	var e = b(c[0], c[2]);
+	var a, j, h;
+	if (f >= i && f >= e) {
+		j = c[0];
+		a = c[1];
+		h = c[2]
+	} else {
+		if (e >= f && e >= i) {
+			j = c[1];
+			a = c[0];
+			h = c[2]
+		} else {
+			j = c[2];
+			a = c[0];
+			h = c[1]
+		}
+	}
+	if (d(a, j, h) < 0) {
+		var g = a;
+		a = h;
+		h = g
+	}
+	c[0] = a;
+	c[1] = j;
+	c[2] = h
+};
+
+function _cz(c, a, b) {
+	this.x = c;
+	this.y = a;
+	this.count = 1;
+	this._aj = b;
+	this.__defineGetter__("_ei", function() {
+		return this._aj
+	});
+	this.__defineGetter__("Count", function() {
+		return this.count
+	});
+	this.__defineGetter__("X", function() {
+		return this.x
+	});
+	this.__defineGetter__("Y", function() {
+		return this.y
+	});
+	this._ek = function() {
+		this.count++
+	};
+	this._ev = function(f, e, d) {
+		if (Math.abs(e - this.y) <= f && Math.abs(d - this.x) <= f) {
+			var g = Math.abs(f - this._aj);
+			return g <= 1 || g / this._aj <= 1
+		}
+		return false
+	}
+}
+
+function _es(a) {
+	this._go = a[0];
+	this._gu = a[1];
+	this._gr = a[2];
+	this.__defineGetter__("_gp", function() {
+		return this._go
+	});
+	this.__defineGetter__("_gq", function() {
+		return this._gu
+	});
+	this.__defineGetter__("_gs", function() {
+		return this._gr
+	})
+}
+
+function _cc() {
+	this.image = null;
+	this._cv = [];
+	this._ge = false;
+	this._al = new Array(0, 0, 0, 0, 0);
+	this._am = null;
+	this.__defineGetter__("_da", function() {
+		this._al[0] = 0;
+		this._al[1] = 0;
+		this._al[2] = 0;
+		this._al[3] = 0;
+		this._al[4] = 0;
+		return this._al
+	});
+	this._ao = function(f) {
+		var b = 0;
+		for (var d = 0; d < 5; d++) {
+			var e = f[d];
+			if (e == 0) {
+				return false
+			}
+			b += e
+		}
+		if (b < 7) {
+			return false
+		}
+		var c = Math.floor((b << _el) / 7);
+		var a = Math.floor(c / 2);
+		return Math.abs(c - (f[0] << _el)) < a && Math.abs(c - (f[1] << _el)) < a && Math.abs(3 * c - (f[2] <<
+			_el)) < 3 * a && Math.abs(c - (f[3] << _el)) < a && Math.abs(c - (f[4] << _el)) < a
+	};
+	this._an = function(b, a) {
+		return (a - b[4] - b[3]) - b[2] / 2
+	};
+	this._ap = function(a, j, d, g) {
+		var c = this.image;
+		var h = qrcode.height;
+		var b = this._da;
+		var f = a;
+		while (f >= 0 && c[j + f * qrcode.width]) {
+			b[2]++;
+			f--
+		}
+		if (f < 0) {
+			return NaN
+		}
+		while (f >= 0 && !c[j + f * qrcode.width] && b[1] <= d) {
+			b[1]++;
+			f--
+		}
+		if (f < 0 || b[1] > d) {
+			return NaN
+		}
+		while (f >= 0 && c[j + f * qrcode.width] && b[0] <= d) {
+			b[0]++;
+			f--
+		}
+		if (b[0] > d) {
+			return NaN
+		}
+		f = a + 1;
+		while (f < h && c[j + f * qrcode.width]) {
+			b[2]++;
+			f++
+		}
+		if (f == h) {
+			return NaN
+		}
+		while (f < h && !c[j + f * qrcode.width] && b[3] < d) {
+			b[3]++;
+			f++
+		}
+		if (f == h || b[3] >= d) {
+			return NaN
+		}
+		while (f < h && c[j + f * qrcode.width] && b[4] < d) {
+			b[4]++;
+			f++
+		}
+		if (b[4] >= d) {
+			return NaN
+		}
+		var e = b[0] + b[1] + b[2] + b[3] + b[4];
+		if (5 * Math.abs(e - g) >= 2 * g) {
+			return NaN
+		}
+		return this._ao(b) ? this._an(b, f) : NaN
+	};
+	this._ej = function(b, a, e, h) {
+		var d = this.image;
+		var i = qrcode.width;
+		var c = this._da;
+		var g = b;
+		while (g >= 0 && d[g + a * qrcode.width]) {
+			c[2]++;
+			g--
+		}
+		if (g < 0) {
+			return NaN
+		}
+		while (g >= 0 && !d[g + a * qrcode.width] && c[1] <= e) {
+			c[1]++;
+			g--
+		}
+		if (g < 0 || c[1] > e) {
+			return NaN
+		}
+		while (g >= 0 && d[g + a * qrcode.width] && c[0] <= e) {
+			c[0]++;
+			g--
+		}
+		if (c[0] > e) {
+			return NaN
+		}
+		g = b + 1;
+		while (g < i && d[g + a * qrcode.width]) {
+			c[2]++;
+			g++
+		}
+		if (g == i) {
+			return NaN
+		}
+		while (g < i && !d[g + a * qrcode.width] && c[3] < e) {
+			c[3]++;
+			g++
+		}
+		if (g == i || c[3] >= e) {
+			return NaN
+		}
+		while (g < i && d[g + a * qrcode.width] && c[4] < e) {
+			c[4]++;
+			g++
+		}
+		if (c[4] >= e) {
+			return NaN
+		}
+		var f = c[0] + c[1] + c[2] + c[3] + c[4];
+		if (5 * Math.abs(f - h) >= h) {
+			return NaN
+		}
+		return this._ao(c) ? this._an(c, g) : NaN
+	};
+	this._cu = function(c, f, e) {
+		var d = c[0] + c[1] + c[2] + c[3] + c[4];
+		var n = this._an(c, e);
+		var b = this._ap(f, Math.floor(n), c[2], d);
+		if (!isNaN(b)) {
+			n = this._ej(Math.floor(n), Math.floor(b), c[2], d);
+			if (!isNaN(n)) {
+				var l = d / 7;
+				var m = false;
+				var h = this._cv.length;
+				for (var g = 0; g < h; g++) {
+					var a = this._cv[g];
+					if (a._ev(l, b, n)) {
+						a._ek();
+						m = true;
+						break
+					}
+				}
+				if (!m) {
+					var k = new _cz(n, b, l);
+					this._cv.push(k);
+					if (this._am != null) {
+						this._am._ep(k)
+					}
+				}
+				return true
+			}
+		}
+		return false
+	};
+	this._ee = function() {
+		var h = this._cv.length;
+		if (h < 3) {
+			throw "Couldn't find enough finder patterns (found " + h + ")"
+		}
+		if (h > 3) {
+			var b = 0;
+			var j = 0;
+			for (var d = 0; d < h; d++) {
+				var g = this._cv[d]._ei;
+				b += g;
+				j += (g * g)
+			}
+			var a = b / h;
+			this._cv.sort(function(m, l) {
+				var k = Math.abs(l._ei - a);
+				var i = Math.abs(m._ei - a);
+				if (k < i) {
+					return (-1)
+				} else {
+					if (k == i) {
+						return 0
+					} else {
+						return 1
+					}
+				}
+			});
+			var e = Math.sqrt(j / h - a * a);
+			var c = Math.max(0.2 * a, e);
+			for (var d = this._cv.length - 1; d >= 0; d--) {
+				var f = this._cv[d];
+				if (Math.abs(f._ei - a) > c) {
+					this._cv.splice(d, 1)
+				}
+			}
+		}
+		if (this._cv.length > 3) {
+			this._cv.sort(function(k, i) {
+				if (k.count > i.count) {
+					return -1
+				}
+				if (k.count < i.count) {
+					return 1
+				}
+				return 0
+			})
+		}
+		return new Array(this._cv[0], this._cv[1], this._cv[2])
+	};
+	this._eq = function() {
+		var b = this._cv.length;
+		if (b <= 1) {
+			return 0
+		}
+		var c = null;
+		for (var d = 0; d < b; d++) {
+			var a = this._cv[d];
+			if (a.Count >= _eg) {
+				if (c == null) {
+					c = a
+				} else {
+					this._ge = true;
+					return Math.floor((Math.abs(c.X - a.X) - Math.abs(c.Y - a.Y)) / 2)
+				}
+			}
+		}
+		return 0
+	};
+	this._cx = function() {
+		var g = 0;
+		var c = 0;
+		var a = this._cv.length;
+		for (var d = 0; d < a; d++) {
+			var f = this._cv[d];
+			if (f.Count >= _eg) {
+				g++;
+				c += f._ei
+			}
+		}
+		if (g < 3) {
+			return false
+		}
+		var e = c / a;
+		var b = 0;
+		for (var d = 0; d < a; d++) {
+			f = this._cv[d];
+			b += Math.abs(f._ei - e)
+		}
+		return b <= 0.05 * c
+	};
+	this._ce = function(e) {
+		var o = false;
+		this.image = e;
+		var n = qrcode.height;
+		var k = qrcode.width;
+		var a = Math.floor((3 * n) / (4 * _eh));
+		if (a < _gf || o) {
+			a = _gf
+		}
+		var g = false;
+		var d = new Array(5);
+		for (var h = a - 1; h < n && !g; h += a) {
+			d[0] = 0;
+			d[1] = 0;
+			d[2] = 0;
+			d[3] = 0;
+			d[4] = 0;
+			var b = 0;
+			for (var f = 0; f < k; f++) {
+				if (e[f + h * qrcode.width]) {
+					if ((b & 1) == 1) {
+						b++
+					}
+					d[b]++
+				} else {
+					if ((b & 1) == 0) {
+						if (b == 4) {
+							if (this._ao(d)) {
+								var c = this._cu(d, h, f);
+								if (c) {
+									a = 2;
+									if (this._ge) {
+										g = this._cx()
+									} else {
+										var m = this._eq();
+										if (m > d[2]) {
+											h += m - d[2] - a;
+											f = k - 1
+										}
+									}
+								} else {
+									do {
+										f++
+									} while (f < k && !e[f + h * qrcode.width]);
+									f--
+								}
+								b = 0;
+								d[0] = 0;
+								d[1] = 0;
+								d[2] = 0;
+								d[3] = 0;
+								d[4] = 0
+							} else {
+								d[0] = d[2];
+								d[1] = d[3];
+								d[2] = d[4];
+								d[3] = 1;
+								d[4] = 0;
+								b = 3
+							}
+						} else {
+							d[++b]++
+						}
+					} else {
+						d[b]++
+					}
+				}
+			}
+			if (this._ao(d)) {
+				var c = this._cu(d, h, k);
+				if (c) {
+					a = d[0];
+					if (this._ge) {
+						g = _cx()
+					}
+				}
+			}
+		}
+		var l = this._ee();
+		qrcode._er(l);
+		return new _es(l)
+	}
+}
+
+function _ai(c, a, b) {
+	this.x = c;
+	this.y = a;
+	this.count = 1;
+	this._aj = b;
+	this.__defineGetter__("_ei", function() {
+		return this._aj
+	});
+	this.__defineGetter__("Count", function() {
+		return this.count
+	});
+	this.__defineGetter__("X", function() {
+		return Math.floor(this.x)
+	});
+	this.__defineGetter__("Y", function() {
+		return Math.floor(this.y)
+	});
+	this._ek = function() {
+		this.count++
+	};
+	this._ev = function(f, e, d) {
+		if (Math.abs(e - this.y) <= f && Math.abs(d - this.x) <= f) {
+			var g = Math.abs(f - this._aj);
+			return g <= 1 || g / this._aj <= 1
+		}
+		return false
+	}
+}
+
+function _ak(g, c, b, f, a, e, d) {
+	this.image = g;
+	this._cv = new Array();
+	this.startX = c;
+	this.startY = b;
+	this.width = f;
+	this.height = a;
+	this._ef = e;
+	this._al = new Array(0, 0, 0);
+	this._am = d;
+	this._an = function(i, h) {
+		return (h - i[2]) - i[1] / 2
+	};
+	this._ao = function(l) {
+		var k = this._ef;
+		var h = k / 2;
+		for (var j = 0; j < 3; j++) {
+			if (Math.abs(k - l[j]) >= h) {
+				return false
+			}
+		}
+		return true
+	};
+	this._ap = function(h, q, l, o) {
+		var k = this.image;
+		var p = qrcode.height;
+		var j = this._al;
+		j[0] = 0;
+		j[1] = 0;
+		j[2] = 0;
+		var n = h;
+		while (n >= 0 && k[q + n * qrcode.width] && j[1] <= l) {
+			j[1]++;
+			n--
+		}
+		if (n < 0 || j[1] > l) {
+			return NaN
+		}
+		while (n >= 0 && !k[q + n * qrcode.width] && j[0] <= l) {
+			j[0]++;
+			n--
+		}
+		if (j[0] > l) {
+			return NaN
+		}
+		n = h + 1;
+		while (n < p && k[q + n * qrcode.width] && j[1] <= l) {
+			j[1]++;
+			n++
+		}
+		if (n == p || j[1] > l) {
+			return NaN
+		}
+		while (n < p && !k[q + n * qrcode.width] && j[2] <= l) {
+			j[2]++;
+			n++
+		}
+		if (j[2] > l) {
+			return NaN
+		}
+		var m = j[0] + j[1] + j[2];
+		if (5 * Math.abs(m - o) >= 2 * o) {
+			return NaN
+		}
+		return this._ao(j) ? this._an(j, n) : NaN
+	};
+	this._cu = function(l, o, n) {
+		var m = l[0] + l[1] + l[2];
+		var t = this._an(l, n);
+		var k = this._ap(o, Math.floor(t), 2 * l[1], m);
+		if (!isNaN(k)) {
+			var s = (l[0] + l[1] + l[2]) / 3;
+			var q = this._cv.length;
+			for (var p = 0; p < q; p++) {
+				var h = this._cv[p];
+				if (h._ev(s, k, t)) {
+					return new _ai(t, k, s)
+				}
+			}
+			var r = new _ai(t, k, s);
+			this._cv.push(r);
+			if (this._am != null) {
+				this._am._ep(r)
+			}
+		}
+		return null
+	};
+	this.find = function() {
+		var p = this.startX;
+		var s = this.height;
+		var q = p + f;
+		var r = b + (s >> 1);
+		var m = new Array(0, 0, 0);
+		for (var k = 0; k < s; k++) {
+			var o = r + ((k & 1) == 0 ? ((k + 1) >> 1) : -((k + 1) >> 1));
+			m[0] = 0;
+			m[1] = 0;
+			m[2] = 0;
+			var n = p;
+			while (n < q && !g[n + qrcode.width * o]) {
+				n++
+			}
+			var h = 0;
+			while (n < q) {
+				if (g[n + o * qrcode.width]) {
+					if (h == 1) {
+						m[h]++
+					} else {
+						if (h == 2) {
+							if (this._ao(m)) {
+								var l = this._cu(m, o, n);
+								if (l != null) {
+									return l
+								}
+							}
+							m[0] = m[2];
+							m[1] = 1;
+							m[2] = 0;
+							h = 1
+						} else {
+							m[++h]++
+						}
+					}
+				} else {
+					if (h == 1) {
+						h++
+					}
+					m[h]++
+				}
+				n++
+			}
+			if (this._ao(m)) {
+				var l = this._cu(m, o, q);
+				if (l != null) {
+					return l
+				}
+			}
+		}
+		if (!(this._cv.length == 0)) {
+			return this._cv[0]
+		}
+		throw "Couldn't find enough alignment patterns"
+	}
+}
+
+function QRCodeDataBlockReader(c, a, b) {
+	this._ed = 0;
+	this._cw = 7;
+	this.dataLength = 0;
+	this.blocks = c;
+	this._en = b;
+	if (a <= 9) {
+		this.dataLengthMode = 0
+	} else {
+		if (a >= 10 && a <= 26) {
+			this.dataLengthMode = 1
+		} else {
+			if (a >= 27 && a <= 40) {
+				this.dataLengthMode = 2
+			}
+		}
+	}
+	this._gd = function(f) {
+		var k = 0;
+		if (f < this._cw + 1) {
+			var m = 0;
+			for (var e = 0; e < f; e++) {
+				m += (1 << e)
+			}
+			m <<= (this._cw - f + 1);
+			k = (this.blocks[this._ed] & m) >> (this._cw - f + 1);
+			this._cw -= f;
+			return k
+		} else {
+			if (f < this._cw + 1 + 8) {
+				var j = 0;
+				for (var e = 0; e < this._cw + 1; e++) {
+					j += (1 << e)
+				}
+				k = (this.blocks[this._ed] & j) << (f - (this._cw + 1));
+				this._ed++;
+				k += ((this.blocks[this._ed]) >> (8 - (f - (this._cw + 1))));
+				this._cw = this._cw - f % 8;
+				if (this._cw < 0) {
+					this._cw = 8 + this._cw
+				}
+				return k
+			} else {
+				if (f < this._cw + 1 + 16) {
+					var j = 0;
+					var h = 0;
+					for (var e = 0; e < this._cw + 1; e++) {
+						j += (1 << e)
+					}
+					var g = (this.blocks[this._ed] & j) << (f - (this._cw + 1));
+					this._ed++;
+					var d = this.blocks[this._ed] << (f - (this._cw + 1 + 8));
+					this._ed++;
+					for (var e = 0; e < f - (this._cw + 1 + 8); e++) {
+						h += (1 << e)
+					}
+					h <<= 8 - (f - (this._cw + 1 + 8));
+					var l = (this.blocks[this._ed] & h) >> (8 - (f - (this._cw + 1 + 8)));
+					k = g + d + l;
+					this._cw = this._cw - (f - 8) % 8;
+					if (this._cw < 0) {
+						this._cw = 8 + this._cw
+					}
+					return k
+				} else {
+					return 0
+				}
+			}
+		}
+	};
+	this.NextMode = function() {
+		if ((this._ed > this.blocks.length - this._en - 2)) {
+			return 0
+		} else {
+			return this._gd(4)
+		}
+	};
+	this.getDataLength = function(d) {
+		var e = 0;
+		while (true) {
+			if ((d >> e) == 1) {
+				break
+			}
+			e++
+		}
+		return this._gd(qrcode._eo[this.dataLengthMode][e])
+	};
+	this.getRomanAndFigureString = function(h) {
+		var f = h;
+		var g = 0;
+		var j = "";
+		var d = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H",
+			"I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", " ", "$",
+			"%", "*", "+", "-", ".", "/", ":");
+		do {
+			if (f > 1) {
+				g = this._gd(11);
+				var i = Math.floor(g / 45);
+				var e = g % 45;
+				j += d[i];
+				j += d[e];
+				f -= 2
+			} else {
+				if (f == 1) {
+					g = this._gd(6);
+					j += d[g];
+					f -= 1
+				}
+			}
+		} while (f > 0);
+		return j
+	};
+	this.getFigureString = function(f) {
+		var d = f;
+		var e = 0;
+		var g = "";
+		do {
+			if (d >= 3) {
+				e = this._gd(10);
+				if (e < 100) {
+					g += "0"
+				}
+				if (e < 10) {
+					g += "0"
+				}
+				d -= 3
+			} else {
+				if (d == 2) {
+					e = this._gd(7);
+					if (e < 10) {
+						g += "0"
+					}
+					d -= 2
+				} else {
+					if (d == 1) {
+						e = this._gd(4);
+						d -= 1
+					}
+				}
+			}
+			g += e
+		} while (d > 0);
+		return g
+	};
+	this.get8bitByteArray = function(g) {
+		var e = g;
+		var f = 0;
+		var d = new Array();
+		do {
+			f = this._gd(8);
+			d.push(f);
+			e--
+		} while (e > 0);
+		return d
+	};
+	this.getKanjiString = function(j) {
+		var g = j;
+		var i = 0;
+		var h = "";
+		do {
+			i = _gd(13);
+			var e = i % 192;
+			var f = i / 192;
+			var k = (f << 8) + e;
+			var d = 0;
+			if (k + 33088 <= 40956) {
+				d = k + 33088
+			} else {
+				d = k + 49472
+			}
+			h += String.fromCharCode(d);
+			g--
+		} while (g > 0);
+		return h
+	};
+	this.__defineGetter__("DataByte", function() {
+		var h = new Array();
+		var e = 1;
+		var f = 2;
+		var d = 4;
+		var o = 8;
+		do {
+			var l = this.NextMode();
+			if (l == 0) {
+				if (h.length > 0) {
+					break
+				} else {
+					throw "Empty data block"
+				}
+			}
+			if (l != e && l != f && l != d && l != o) {
+				throw "Invalid mode: " + l + " in (block:" + this._ed + " bit:" + this._cw + ")"
+			}
+			var g = this.getDataLength(l);
+			if (g < 1) {
+				throw "Invalid data length: " + g
+			}
+			switch (l) {
+				case e:
+					var m = this.getFigureString(g);
+					var k = new Array(m.length);
+					for (var i = 0; i < m.length; i++) {
+						k[i] = m.charCodeAt(i)
+					}
+					h.push(k);
+					break;
+				case f:
+					var m = this.getRomanAndFigureString(g);
+					var k = new Array(m.length);
+					for (var i = 0; i < m.length; i++) {
+						k[i] = m.charCodeAt(i)
+					}
+					h.push(k);
+					break;
+				case d:
+					var n = this.get8bitByteArray(g);
+					h.push(n);
+					break;
+				case o:
+					var m = this.getKanjiString(g);
+					h.push(m);
+					break
+			}
+		} while (true);
+		return h
+	})
+};
+module.exports = {
+	qrcode: qrcode
+}

+ 229 - 0
pages/user/component/scan.js

@@ -0,0 +1,229 @@
+let Qrcode = require('@/pages/component/reqrcode.js')
+
+export function toScanCode(options) {
+	let resultData = ''
+	// #ifdef APP-PLUS
+	let platform = uni.getSystemInfoSync().platform
+	if (platform == 'ios') {
+		resultData = scanCodeIos(options)
+	} else {
+		return new Promise((resolve, reject) => {
+			uni.scanCode({
+				onlyFromCamera: options.onlyFromCamera, // 只允许通过相机扫码
+				scanType: ['barCode','qrCode'], //扫码类型 barCode一维码  qrCode二维码
+				autoZoom:true,//是否启用自动放大,默认启用
+				success: function(res) {
+					resolve(res.result);
+				}
+			});
+		})
+	}
+	// #endif 
+
+	// #ifdef H5
+	var ua = navigator.userAgent;
+	var isWeixin = !!/MicroMessenger/i.test(ua);
+	if (isWeixin) {
+		getJsApiConfig();
+		resultData = scanCodeWxH5(options)
+	} else {
+		resultData = scanCodeH5(options)
+	}
+	// #endif
+
+	return Promise.resolve(resultData);
+}
+
+
+//处理扫码内容
+export function scanContent(result) {
+
+	var obj = null;
+	try {
+		obj = JSON.parse(result)
+	} catch (err) {
+		this.$tip.error("无法识别二维码");
+		return
+	}
+	return obj;
+
+}
+
+//微信扫码   参考地址:https://mp.weixin.qq.com/s/ulq_cs-gGwkpmdt5zsU4aA
+export function scanCodeWxH5(options) {
+	let fromCamera = options.onlyFromCamera
+	return new Promise((resolve, reject) => {
+		wx.scanQRCode({
+			needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
+			scanType: ['barCode','qrCode'], // 可以指定扫二维码还是一维码,默认二者都有  barCode一维码  qrCode二维码
+			success: function(res) {
+				resolve(res.resultStr)
+			}
+		});
+	})
+}
+
+//ios 扫码  uniapp nvue自带的Barcode
+export function scanCodeIos(options) {
+	let fromCamera = options.onlyFromCamera
+	return new Promise((resolve, reject) => {
+		//开始扫码
+		toHsScanCode({
+			evalName: "hs-scancode", //扫码回调监听事件
+			msg: '扫码', //提示文本
+			fil: '0,1,2', //条码类型  0-qr二维码  1-EAN条形码标准版  2-EAN条形码简版
+			onlyFromCamera: fromCamera // 只允许通过相机扫码
+		}, res => {
+			//扫码成功后 这里自己判断,如果要自己处理结果就返回 true
+			resolve(res.result)
+			return true
+		})
+	})
+}
+//这里可以写成一个通用方法
+export function toHsScanCode(options, results) {
+	const q = Object.entries(options).map(([key, value]) => `${key}=${value}`).join('&')
+	uni.$on(options.evalName || "hs-scancode", ([error, res]) => {
+		if (res) {
+			//扫码结果
+			uni.navigateBack({
+				delta: 1,
+				animationType: "fade-out", //用 fade-out 关闭页面,减少扫码成功后跳转页面的闪动
+				animationDuration: 300,
+			})
+			if (results && results(res) === true) return;
+		}
+	})
+	uni.navigateTo({
+		url: `/pages/component/hs-scancode?${q}`
+	})
+
+}
+
+// 调用接口获取config信息
+export function getJsApiConfig() {
+	//获取到的url是当前页面的域名,而不是完整url
+	const apiUrl = location.href.split('#')[0];
+	let param = {
+		url: apiUrl
+	}
+	this.$http.get('/sys/wx/getJsApiConfig', {
+		params: param
+	}).then(res => {
+		if (res.data.success) {
+			getConfig(res.data.result);
+		} else {
+			this.$tip.error(res.data.message);
+		}
+	}).catch((err) => {
+		console.log("请求返回err", err)
+	})
+}
+
+export function getConfig(res) {
+	// 配置config信息
+	wx.config({
+		debug: false,
+		appId: res.appId, // 必填,公众号的唯一标识
+		timestamp: res.timestamp, // 必填,生成签名的时间戳
+		nonceStr: res.nonceStr, // 必填,生成签名的随机串
+		signature: res.signature, // 必填,签名
+		jsApiList: ['scanQRCode'] // 必填,需要使用的JS接口列表
+	});
+	// 通过ready接口处理成功验证
+	wx.ready(function() {
+		wx.checkJsApi({
+			jsApiList: ['scanQRCode'],
+			success: function(res) {
+				console.log('检验成功');
+			}
+		});
+	});
+	// 通过error接口处理失败验证
+	wx.error(function(res) {
+		console.log('校验失败');
+	});
+}
+
+// H5通过拉起相机拍照来识别二维码
+export function scanCodeH5(options) {
+	let fromCamera = options.onlyFromCamera
+	let sourceType = ['camera','album']
+	if(fromCamera){
+		sourceType = ['camera']
+	}
+	return new Promise((resolve, reject) => {
+		uni.chooseImage({
+			count: 1,
+			sourceType: sourceType, //来源类型
+			success: imgRes => {
+				Qrcode.qrcode.decode(getObjectURL(imgRes.tempFiles[0]))
+				Qrcode.qrcode.callback = (codeRes) => {
+					if (codeRes.indexOf('error') >= 0) {
+						// 识别失败
+						reject("二维码识别失败");
+					} else {
+						// 识别成功
+						let content = decodeStr(codeRes)
+						let formatContent = scanContent(content)
+						resolve(formatContent);
+					}
+				}
+			}
+		})
+	})
+
+}
+
+// 获取文件地址函数
+export function getObjectURL(file) {
+	var url = null
+	if (window.createObjectURL !== undefined) { // basic
+		url = window.createObjectURL(file)
+	} else if (window.URL !== undefined) { // mozilla(firefox)
+		url = window.URL.createObjectURL(file)
+	} else if (window.webkitURL !== undefined) { // webkit or chrome
+		url = window.webkitURL.createObjectURL(file)
+	}
+	return url
+}
+
+// 解码,输出:中文
+export function decodeStr(str) {
+	var out, i, len, c;
+	var char2, char3;
+	out = "";
+	len = str.length;
+	i = 0;
+	while (i < len) {
+		c = str.charCodeAt(i++);
+		switch (c >> 4) {
+			case 0:
+			case 1:
+			case 2:
+			case 3:
+			case 4:
+			case 5:
+			case 6:
+			case 7:
+				// 0xxxxxxx
+				out += str.charAt(i - 1);
+				break;
+			case 12:
+			case 13:
+				// 110x xxxx 10xx xxxx
+				char2 = str.charCodeAt(i++);
+				out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
+				break;
+			case 14:
+				// 1110 xxxx 10xx xxxx 10xx xxxx
+				char2 = str.charCodeAt(i++);
+				char3 = str.charCodeAt(i++);
+				out += String.fromCharCode(((c & 0x0F) << 12) |
+					((char2 & 0x3F) << 6) |
+					((char3 & 0x3F) << 0));
+				break;
+		}
+	}
+	return out;
+}

+ 1 - 1
pages/user/shareQrCode.vue

@@ -82,7 +82,7 @@
 					});
 				});
 			} else {
-				this.val = 'https://7131.liuniu946.com/index/#/pages/index/index?spread=' + this.userInfo.uid
+				this.val = this.baseURL + '/index/#/pages/index/index?spread=' + this.userInfo.uid
 			}
 		},
 		methods: {

+ 7 - 2
pages/user/sz.vue

@@ -142,9 +142,14 @@
 				
 				spreadCommission(qdata,status).then(({data})=> {
 					if(data.length > 0) {
-						item.orderList = item.orderList.concat(data[0].list);
+						let arr = []
+						data.forEach(item => {
+							arr = arr.concat(item.list)
+							console.log(arr);
+						})
+						item.orderList = item.orderList.concat(arr);
 						item.page++;
-						if (item.limit == data[0].list.length) {
+						if (item.limit == data.length) {
 							item.loadingType = 'more';
 							return;
 						} else {

+ 9 - 6
pages/user/team.vue

@@ -29,7 +29,7 @@
 			</view>
 			<view class="buttom"  @click="tabClick(1)">
 				<view class="money">{{totalLevel || 0}}</view>
-				<text class="text" :class="{ current: tabCurrentIndex === 1 }">二级推广</text>
+				<text class="text" :class="{ current: tabCurrentIndex === 1 }">团队推广</text>
 			</view>
 		</view>
 		<swiper :current="tabCurrentIndex" :style="{ height: maxheight }" class="swiper-box" duration="300"
@@ -49,7 +49,7 @@
 									<view class="title-name clamp">{{ item.nickname }}</view>
 								</view>
 								<view class="time">
-									<text>{{ showLevel(item.level)}}</text>
+									<text>{{ item.phone }}  ({{ showLevel(item)}})</text>
 								</view>
 								<view class="time">
 									<text>{{ item.time }}</text>
@@ -137,12 +137,15 @@
 		},
 		methods: {
 			showLevel(val) {
-				let data = this.listList.find(item => item.grade == val)
-				console.log(data);
+				let data = this.listList.find(item => item.grade == val.level)
 				if(data) {
 					return data.name
 				}else {
-					return ''
+					if(val.orderCount > 0) {
+						return '会员'
+					}else {
+						return '粉丝'
+					}
 				}
 			},
 			// 页面跳转
@@ -180,7 +183,7 @@
 					.then(({
 						data
 					}) => {
-						console.log(data);
+						console.log(data,'的');
 						this.order = data.order
 						this.zt_order = data.zt_order
 						this.jt_order = data.jt_order

+ 130 - 22
pages/user/user.vue

@@ -9,7 +9,8 @@
 			<view class="user-info flex">
 				<image class="avatar" :src="userInfo.avatar" mode="" v-if="userInfo.avatar"
 					@click="navTo('/pages/set/userinfo')"></image>
-				<image class="avatar" src="../../static/error/missing-face.png" mode="" v-else @click="navTo('/pages/set/userinfo')"></image>
+				<image class="avatar" src="../../static/error/missing-face.png" mode="" v-else
+					@click="navTo('/pages/set/userinfo')"></image>
 				<view class="user-name-id">
 					<view class="user-name clamp2">{{ userInfo.nickname || '游客'}}</view>
 					<view class="user-id" v-if="userInfo && userInfo.uid">
@@ -17,11 +18,11 @@
 					</view>
 					<view class="user-shop flex" v-if="userInfo.uid">
 						<view class="user-shop-item" v-if="userInfo.level> 0 " style="width: 180rpx;">
-							<image class="user-shop-icon" src="../../static/img/level.png" mode=""
+							<image class="user-shop-icon" :src="showLevel(userInfo.level)" mode=""
 								style="width: 180rpx;"></image>
-							<view class="user-shopname" style="padding-left: 70rpx;">
+							<!-- <view class="user-shopname" style="padding-left: 70rpx;">
 								{{userInfo.level_name}}
-							</view>
+							</view> -->
 						</view>
 					</view>
 				</view>
@@ -55,6 +56,13 @@
 				</view>
 			</view>
 		</view>
+		<!-- <view class="user-list flex" @click="smsh" v-if="userInfo && userInfo.uid && userInfo.adminid">
+			<image src="../../static/icon/scend.png" mode="" class="left-img"></image>
+			<view class="">
+				扫码核销
+			</view>
+			<image src="../../static/icon/back.png" mode="" class="right-img"></image>
+		</view> -->
 		<view class="user-list flex" @click="gorz" v-if="userInfo && userInfo.uid && userInfo.is_real != 2">
 			<image src="../../static/icon/u1.png" mode="" class="left-img"></image>
 			<view class="">
@@ -125,9 +133,36 @@
 				</view>
 			</view>
 		</uni-popup>
+		<!-- 核销弹窗 -->
+		<uni-popup ref="popuphx" class="agree-wrapper">
+			<view class="hx-wrapper">
+				<view class="hx-img">
+					<image src="../../static/img/hxbg.png" mode=""></image>
+				</view>
+				<view class="hx-body">
+					<view class="hx-title">
+						扫码核销
+					</view>
+					<input type="text" v-model="hxcode" placeholder="请输入核销码" placeholder-class="hx-placeholder" />
+					<view class="hx-btn" @click="qhx">
+						立即核销
+					</view>
+				</view>
+				<view class="hx-close" @click="close">
+					<image src="../../static/icon/close.png" mode=""></image>
+				</view>
+			</view>
+		</uni-popup>
 	</view>
 </template>
 <script>
+	import {orderVerific} from '@/api/index.js'
+	import {
+		toScanCode
+	} from '@/components/scan.js'
+	// #ifdef H5
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	// #endif
 	import {
 		mapState,
 		mapMutations
@@ -154,13 +189,16 @@
 		},
 		data() {
 			return {
+				listList: [],//等级列表
 				current: 2,
 				id: '', //是否已签到
 				store_name: '',
 				achievement: '',
 				code: '',
 				levelList: [],
-				text: '' //客服微信
+				text: '', //客服微信
+				hxcode: '', //核销码
+				hxLoading: false
 			};
 		},
 		onShow() {
@@ -200,6 +238,89 @@
 		},
 		methods: {
 			...mapMutations('user', ['setUserInfo']),
+			getLevelList() {
+				getLevelList().then(res => {
+					console.log(res);
+					this.listList = res.data.list
+				})
+			},
+			showLevel(val) {
+				let data = this.listList.find(item => item.grade == val)
+				console.log(data);
+				if(data) {
+					return data.icon
+				}else {
+					return ''
+				}
+			},
+			close() {
+				this.hxcode = ''
+				this.$refs.popuphx.close()
+			},
+			qhx() {
+				let that = this
+				if (that.hxLoading) {
+					return
+				}
+				if (that.hxcode == '') {
+					return that.$api.msg('请输入核销码')
+				}
+				that.hxLoading = true
+				orderVerific({
+					verify_code: that.hxcode,
+					is_confirm: 1
+				}).then(res => {
+					uni.showToast({
+						title: '核销成功',
+						mask: true,
+						duration: 1500
+					});
+					that.close()
+					that.hxLoading = false
+				}).catch(err => [
+					that.hxLoading = false
+				])
+
+			},
+			// 扫码
+			smsh() {
+				let that = this
+				// #ifdef H5
+				toScanCode({
+					onlyFromCamera: true // 只允许通过相机扫码
+				}).then(res => {
+					that.hxcode = res
+					that.$refs.popuphx.open()
+				})
+				// try {
+				// 	alert('zhe')
+				// 	weixinObj.scanQRCode({
+				// 		needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
+				// 		scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
+				// 		success: function(res) {
+				// 			alert(res)
+				// 			that.hxcode = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
+
+				// 			that.$refs.popuphx.open()
+				// 			// 判断是否为电池核销
+				// 		}
+				// 	});
+				// } catch (err) {
+				// 	// console.log(err)
+				// 	alert('err')
+				// 	that.$refs.popuphx.open()
+				// }
+
+				// #endif
+				// #ifndef H5
+				uni.scanCode({
+					success: (res) => {
+						this.hxcode = res.result
+						this.$refs.popuphx.open()
+					}
+				})
+				// #endif
+			},
 			gorz() {
 				if (!this.hasLogin) {
 					saveUrl();
@@ -208,9 +329,9 @@
 					// uni.navigateTo({
 					// 	url
 					// });
-					if( this.userInfo.is_real == 0) {
+					if (this.userInfo.is_real == 0) {
 						this.navTo('/pages/user/smrz')
-					}else if(this.userInfo.is_real == 1){
+					} else if (this.userInfo.is_real == 1) {
 						uni.showModal({
 							title: "提示",
 							content: '您提交的资料正在审核中,请耐心等待审核'
@@ -233,19 +354,6 @@
 					this.navTo('/pages/user/sqdl')
 				}
 			},
-			qhx() {
-				check({
-						verify_code: this.code,
-						is_confirm: 1 //1是核销,0是查看
-					})
-					.then(e => {
-						this.$api.msg('核销成功');
-						this.close();
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
 			sao() {
 				let obj = this;
 
@@ -316,7 +424,7 @@
 						data
 					}) => {
 						obj.setUserInfo(data);
-
+						obj.getLevelList()
 					})
 					.catch(e => {
 						console.log(e);
@@ -834,7 +942,7 @@
 				margin: 44rpx auto 0;
 				width: 353rpx;
 				height: 71rpx;
-				background: #ff4c4c;
+				background: #6adbac;
 				border-radius: 34rpx;
 				font-size: 36rpx;
 				font-weight: 500;

+ 6 - 6
pages/user/xccg.vue

@@ -78,8 +78,8 @@
 						</view>
 					</view>
 					<view class="val" v-if="pool.two_pool_my && pool.two_pool_my.length > 0">
-						当前排队共<text class="num">{{pool.two_pool_all.totel_count}}</text>,前方等待出局<text
-							class="num">{{pool.two_pool_all.totel_count-1}}</text>单
+						当前排队共<text class="num">{{pool.two_pool_all.totel_count}}</text>,前方等待出局<text
+							class="num">{{pool.two_pool_my_out}}</text>组
 					</view>
 					<view class="val" v-else>
 						当前暂未进入第二关
@@ -101,8 +101,8 @@
 						</view>
 					</view>
 					<view class="val" v-if="pool.three_pool> 0">
-						当前排队共<text class="num">{{pool.three_pool_all.totel_count}}</text>,前方等待出局<text
-							class="num">{{pool.three_pool_all.totel_count-1}}</text>单
+						当前排队共<text class="num">{{pool.three_pool_all.totel_count}}</text>,前方等待出局<text
+							class="num">{{pool.three_pool_my_out}}</text>组
 					</view>
 					<view class="val" v-else>
 						当前暂未进入第二关
@@ -124,8 +124,8 @@
 						</view>
 					</view>
 					<view class="val" v-if="pool.for_pool_my && pool.for_pool_my.length > 0">
-						当前排队共<text class="num">{{pool.for_pool_all.totel_count}}</text>,前方等待出局<text
-							class="num">{{pool.for_pool_all.totel_count-1}}</text>单
+						当前排队共<text class="num">{{pool.for_pool_all.totel_count}}</text>,前方等待出局<text
+							class="num">{{pool.for_pool_my_out}}</text>组
 					</view>
 					<view class="val" v-else>
 						当前暂未进入第四关

BIN
static/icon/close.png


BIN
static/icon/scend.png


BIN
static/img/hxbg.png


BIN
static/img/upapp.png


+ 1 - 1
store/index.js

@@ -6,7 +6,7 @@ Vue.use(Vuex)
 const store = new Vuex.Store({
 	state: {
 		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
-		baseURL:'https://7131.liuniu946.com',//请求地址配置 
+		baseURL:'https://www.jlxnykj.cn',//请求地址配置 
 		urlFile:'/index',//项目部署所在文件夹
 		userInfo: {}, //登录信息
 		loginInterceptor:false,//是否打开强制登录

+ 36 - 45
utils/upApp.js

@@ -1,8 +1,27 @@
 import store from '../store/index.js'
-const getUpAppUrl = 'https://itunes.apple.com/cn/lookup?id=1524593346'
+// const getUpAppUrl = 'https://itunes.apple.com/cn/lookup?id=1524593346'
+const getUpAppUrl = store.state.baseURL + '/api/version'
 const iosAppStroeUrl =
 	'https://apps.apple.com/cn/app/%E6%BB%A1%E5%9B%AD%E6%98%A5%E7%BA%BF%E4%B8%8A%E5%95%86%E5%9F%8E/id1524593346';
 
+function compareVersions(version1, version2) {
+    const v1 = version1.split('.');
+    const v2 = version2.split('.');
+    
+    for (let i = 0; i < Math.max(v1.length, v2.length); i++) {
+        const num1 = parseInt(v1[i] || 0);
+        const num2 = parseInt(v2[i] || 0);
+        
+        if (num1 < num2) {
+            return -1;
+        } else if (num1 > num2) {
+            return 1;
+        }
+    }
+    
+    return 0;
+}
+
 // 获取app是否需要升级
 export function getUpApp () {
 	// 获取当前运行系统
@@ -13,60 +32,32 @@ export function getUpApp () {
 	if (hj === 'android') {
 		// 设置默认显示数据
 		app = true;
-		store.commit('changeState', {
-			name: 'app',
-			value: app
-		});
+		// store.commit('changeState', {
+		// 	name: 'app',
+		// 	value: app
+		// });
 	}
 	uni.request({
 		url: getUpAppUrl,
-		method: 'POST',
+		method: 'GET',
 		data: {},
 		success: res => {
-			let r = res.data;
+			let r = res.data.data;
 			plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
 				// 保存线上版本号
-				let version = r.results[0].version;
+				//{"app_down":"www.baidu.com","app_version":"1.0.1"} ,  app
+				let version = r.app_down;
 				// 获取线上版本
-				const arr = r.results[0].version.split('.');
+				const arr = r.app_version.split('.');
+				console.log(arr,'app_version');
 				// 获取当前系统
 				const arr1 = wgtinfo.version.split('.');
-				for (let i = 0; i < arr.length; i++) {
-					// 线上版本号
-					const x = +arr[i];
-					// 线下版本号
-					const y = +arr1[i];
-					// 判断当前版本是否为小于等于线上版本
-					if (x <= y) {
-						// 只有ios才需要显示
-						if (hj === 'ios') {
-							// 设置显示数据
-							app = true;
-							store.commit('changeState', {
-								name: 'app',
-								value: app
-							});
-						}
-						// 当版本较低时更新数据
-						if (x < y) {
-							uni.showModal({
-								title: '提示',
-								content: '请更新应用',
-								showCancel: false,
-								success(e) {
-									if (hj === 'ios') {
-										plus.runtime.openURL(
-											iosAppStroeUrl
-										);
-									}
-									if (hj === 'android') {
-										// plus.runtime.openURL('http://lxscimg.liuniu946.com/lxscV' + version + '.apk');
-										_self.downApp(version);
-									}
-								}
-							});
-						}
-						return;
+				
+				if(compareVersions(wgtinfo.version,r.app_version) < 0) {
+					if (hj === 'android') {
+						uni.navigateTo({
+							url:'/pages/index/upApp?downurl=' + version
+						})
 					}
 				}
 			});

Some files were not shown because too many files changed in this diff