scan-count-controller.js
1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* 校验控制器
*/
define(
"check/scan-count-controller",
[
'mk7/controller',
'mk7/url',
'mk7/utils',
'mk7/modals',
'mk7/jweixin'
],
function (ctrl, url, utils, modals, jweixin) {
var ctrl = new ctrl();
var $$ = Dom7;
var t7 = Template7;
var scancount = 0;
var uuid = "";
ctrl.run = function () {
var me = this;
scancount = parseInt(me.params.scancount);
uuid = me.params.uuid;
me.setPageTitle("验证标签");
me.render();
$$(".count-num").html(scancount);
};
ctrl.bindEvents = function () {
var me = this;
$$(".scan-button").click(function () {
if (uuid != "" && uuid != undefined) {
window.location.href = url.to('check#submit/' + uuid);
} else {
window.location.href = url.to('check#index');
}
});
};
return ctrl;
}
);