mirror of
https://github.com/ZSCNetSupportDept/WechatTicketSystemFrontend.git
synced 2025-10-27 23:25:05 +08:00
Upload Source Code
This commit is contained in:
43
build_config.js
Normal file
43
build_config.js
Normal file
@@ -0,0 +1,43 @@
|
||||
//代码构建配置文件
|
||||
var build_config = {
|
||||
//调试版
|
||||
debug : {
|
||||
comment : '非主线调试',
|
||||
dest : 'dist/debug',
|
||||
version : 'debug',
|
||||
compress : [true,false,false],
|
||||
},
|
||||
//v2调试版
|
||||
v2d : {
|
||||
comment : 'v2调试版',
|
||||
dest : 'dist/v2',
|
||||
version : 'v2 debug',
|
||||
compress : [false,false,false],//js,css,html
|
||||
},
|
||||
|
||||
//v2发布版
|
||||
v2 : {
|
||||
comment : 'v2发布版',
|
||||
dest : 'dist/v2',
|
||||
version : 'v2 prod',
|
||||
compress : [true,true,true],//js,css,html
|
||||
},
|
||||
|
||||
|
||||
//源文件目录
|
||||
_src : 'src',
|
||||
//清理选项
|
||||
_clean_cfg : {},
|
||||
//HTML压缩选项
|
||||
_html_compress_cfg : {
|
||||
removeComments : true,//去除注释
|
||||
collapseWhitespace : true,//去掉空格
|
||||
conservativeCollapse : true,//去掉空格但保留一个空格
|
||||
collapseBooleanAttributes : true,//去掉布尔值HTML属性的值
|
||||
removeAttributeQuotes : false,//不去掉可以去掉的HTML属性值的引号
|
||||
minifyJS : true,
|
||||
minifyCSS : true,
|
||||
},
|
||||
|
||||
};
|
||||
module.exports = build_config;
|
||||
7
field_config.js
Normal file
7
field_config.js
Normal file
@@ -0,0 +1,7 @@
|
||||
//页面字段
|
||||
module.exports = {
|
||||
'release_fields':{
|
||||
'BAD_SOLA' : 'Sola端出问题了,无法回应你的查询请求',
|
||||
'BAD_TOKEN' : '页面已失效\\n请关闭页面后重新发送指令',
|
||||
}
|
||||
};
|
||||
16
fix-dependencies.sh
Normal file
16
fix-dependencies.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# Fix old dependencies caused bug "ReferenceError: primordials is not defined"
|
||||
#
|
||||
# > You're using node 12 and gulp 3. That combination does not work:
|
||||
# > https://github.com/gulpjs/gulp/issues/2324
|
||||
#
|
||||
|
||||
cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 1;
|
||||
|
||||
set -x;
|
||||
rm -rf node_modules/vinyl-fs/node_modules/graceful-fs || exit 1;
|
||||
cp -r node_modules/graceful-fs node_modules/vinyl-fs/node_modules/graceful-fs || exit 1;
|
||||
|
||||
echo "Boom!";
|
||||
240
gulpfile.js
Normal file
240
gulpfile.js
Normal file
@@ -0,0 +1,240 @@
|
||||
/*
|
||||
* A gulpfile created by LiuYue(hangxingliu)
|
||||
* 2016/03/26 Version 3.0
|
||||
* A Gulp Scipt To Quickly Build NetMaintain Platform)
|
||||
*/
|
||||
//允许了Js文件中使用preprocess
|
||||
/*
|
||||
* 构建源码说明:
|
||||
* *.part.html 会当作HTML部件,在最终的发布版中会被删除(但是可以被include到其他html文件中)
|
||||
* *.min.js/*.min.css 会被当作已压缩过了的文件,不予与压缩处理
|
||||
*/
|
||||
|
||||
//加载构建选项版本
|
||||
var builder = require('./build_config.js');
|
||||
|
||||
//源代码目录
|
||||
var SRC = builder._src;
|
||||
//生成目录
|
||||
var DEST = 'dist/tmp';
|
||||
//版本名称
|
||||
var VERSION = 'temp version';
|
||||
//注释信息
|
||||
var COMMENT = '临时测试版本';
|
||||
//是否压缩CSS和JS
|
||||
var MINI_JS = false;
|
||||
var MINI_CSS = false;
|
||||
var MINI_HTML = false;
|
||||
//默认的清理参数
|
||||
var OPT_CLEAN = builder._clean_cfg;
|
||||
//默认的HTML压缩参数
|
||||
var OPT_HTML_COMPRESS = builder._html_compress_cfg;
|
||||
|
||||
//装载指定的构建配置
|
||||
var buildCfgName = process.argv[process.argv.length - 1];
|
||||
if (buildCfgName && buildCfgName[0] == '-') {
|
||||
buildCfgName = buildCfgName.slice(1);
|
||||
if(builder[buildCfgName]){
|
||||
var buildCfg = builder[buildCfgName];
|
||||
DEST = buildCfg.dest;
|
||||
COMMENT = buildCfg.comment;
|
||||
VERSION = buildCfg.version;
|
||||
MINI_JS = buildCfg.compress[0];
|
||||
MINI_CSS = buildCfg.compress[1];
|
||||
MINI_HTML = buildCfg.compress[2];
|
||||
|
||||
console.log('--------------------------');
|
||||
console.log('构建配置 "' + COMMENT + '" 加载成功!');
|
||||
console.log('--------------------------');
|
||||
}else{
|
||||
console.log('"' + buildCfgName + '" (指定构建配置不存在!)');
|
||||
process.exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//默认的Preprocess参数
|
||||
var PREPROCESS_PARAMS = {
|
||||
context: {
|
||||
//时间参数更新引入文件
|
||||
TIME: (new Date()).getTime(),
|
||||
//版本
|
||||
VERSION: VERSION
|
||||
}
|
||||
};
|
||||
|
||||
//加载URL参数
|
||||
var urls_obj = require('./url_config.js');
|
||||
var urls = urls_obj.release_urls;
|
||||
for (var url_key in urls) {
|
||||
eval("PREPROCESS_PARAMS.context.URL_" + url_key.toUpperCase() + " = urls." + url_key + ";");
|
||||
}
|
||||
|
||||
//加载字段
|
||||
var fields_obj = require('./field_config.js');
|
||||
var fields = fields_obj.release_fields;
|
||||
for (var field_key in fields) {
|
||||
eval("PREPROCESS_PARAMS.context.MSG_" + field_key.toUpperCase() + " = fields." + field_key + ";");
|
||||
}
|
||||
|
||||
//console.log(JSON.stringify(PREPROCESS_PARAMS.context,null,4));
|
||||
|
||||
var HELP = [
|
||||
'', '',
|
||||
'----------------------',
|
||||
'gulp [help]: 查看脚本帮助',
|
||||
'gulp (go|build): 编译优化源代码',
|
||||
'gulp (watch|live|edit) : 实时编译优化源代码(首先会编译优化一次)',
|
||||
'----------',
|
||||
'在 (go/watch/live/edit)参数后面可带参数:',
|
||||
'\t-XX :表示以XX构建配置构建编译',
|
||||
'----------------------',
|
||||
'刘越,16/03/26', ''
|
||||
];
|
||||
|
||||
|
||||
var DEST_PATH = DEST + '/';
|
||||
var SRC_PATH = SRC + '/';
|
||||
|
||||
//-------------____引入一些必要的Gulp外挂____-------------------
|
||||
var g = require("gulp");
|
||||
var cleaner = require("gulp-clean");
|
||||
var minijs = require('gulp-uglify');
|
||||
var minicss = require('gulp-clean-css');
|
||||
var minihtml = require('gulp-htmlmin');
|
||||
var pp = require('gulp-preprocess');
|
||||
var runSeq = require('gulp-sequence');
|
||||
|
||||
|
||||
g.task('default', ['help']);
|
||||
g.task('help', function () {
|
||||
for (var i = 0; i < HELP.length; i++)
|
||||
console.log(HELP[i]);
|
||||
});
|
||||
|
||||
//编译构建
|
||||
g.task('build',['go']);
|
||||
|
||||
g.task('go', runSeq('copy_all_files', ['handler_all_css', 'handler_all_js', 'handler_html']));
|
||||
|
||||
g.task('live', ['watch']);
|
||||
g.task('edit', ['watch']);
|
||||
|
||||
//监视文件变动
|
||||
g.task('watch', ['go'], function () {
|
||||
g.watch(SRC_PATH + '**/*', function (event) {
|
||||
console.log(event.type + ': ' + event.path);
|
||||
if (event.type == 'deleted' || event.type == 'added') return;
|
||||
var path = event.path;
|
||||
var index = path.lastIndexOf('.');
|
||||
var suffix = index == -1 ? '' : path.slice(index + 1);
|
||||
var isMin = index == -1 ? false : (path.slice(index - 4, index) == '.min');
|
||||
switch (suffix) {
|
||||
case 'js':
|
||||
g.start(isMin ? 'handler_min_js' : 'handler_js');
|
||||
break;
|
||||
case 'css':
|
||||
g.start(isMin ? 'handler_min_css' : 'handler_css');
|
||||
break;
|
||||
case 'html':
|
||||
g.start('handler_html');
|
||||
break;
|
||||
default:
|
||||
g.start('default');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/*--------------------------CSS------------------------------*/
|
||||
g.task('handler_all_css', ['handler_css', 'handler_min_css']);
|
||||
g.task('handler_css', ['clean_css'], function () {
|
||||
var s = g.src([SRC_PATH + '**/*.css', '!' + SRC_PATH + '**/*.min.css']);
|
||||
if (MINI_CSS) s = s.pipe(minicss());
|
||||
s = s.pipe(g.dest(DEST_PATH));
|
||||
return s;
|
||||
});
|
||||
g.task('clean_css', function () {
|
||||
var s = g.src([DEST_PATH + '**/*.css', '!' + DEST_PATH + '**/*.min.css'], {
|
||||
'read': false
|
||||
}).pipe(cleaner(OPT_CLEAN));
|
||||
return s;
|
||||
});
|
||||
g.task('handler_min_css', ['clean_min_css'], function () {
|
||||
var s = g.src(SRC_PATH + '**/*.min.css').pipe(g.dest(DEST_PATH));
|
||||
return s;
|
||||
});
|
||||
g.task('clean_min_css', function () {
|
||||
var s = g.src(DEST_PATH + '**/*.min.css', {
|
||||
'read': false
|
||||
}).pipe(cleaner(OPT_CLEAN));
|
||||
return s;
|
||||
});
|
||||
|
||||
/*-------------------Javascript-----------------------------*/
|
||||
g.task('handler_all_js', ['handler_js', 'handler_min_js']);
|
||||
g.task('handler_js', ['clean_js'], function () {
|
||||
var s = g.src([SRC_PATH + '**/*.js', '!' + SRC_PATH + '**/*.min.js']);
|
||||
s = s.pipe(pp(PREPROCESS_PARAMS))
|
||||
.on('error', function (err) {
|
||||
console.error(err);
|
||||
this.emit('end');
|
||||
});
|
||||
if (MINI_JS) s = s.pipe(minijs());
|
||||
s = s.pipe(g.dest(DEST_PATH));
|
||||
return s;
|
||||
});
|
||||
g.task('clean_js', function () {
|
||||
var s = g.src([DEST_PATH + '**/*.js', '!' + DEST_PATH + '**/*.min.js'], {
|
||||
'read': false
|
||||
}).pipe(cleaner(OPT_CLEAN));
|
||||
return s;
|
||||
});
|
||||
g.task('handler_min_js', ['clean_min_js'], function () {
|
||||
var s = g.src(SRC_PATH + '**/*.min.js').pipe(g.dest(DEST_PATH));
|
||||
return s;
|
||||
});
|
||||
g.task('clean_min_js', function () {
|
||||
var s = g.src(DEST_PATH + '**/*.min.js', {
|
||||
'read': false
|
||||
}).pipe(cleaner(OPT_CLEAN));
|
||||
return s;
|
||||
});
|
||||
|
||||
|
||||
/*-------------------HTML-----------------------------*/
|
||||
g.task('handler_html', ['clean_html'], function () {
|
||||
var s = g.src(['./' + SRC_PATH + '**/*.html', '!./' + SRC_PATH + '**/*.part.html'])
|
||||
.pipe(pp(PREPROCESS_PARAMS))
|
||||
.on('error', function (err) {
|
||||
console.error(err);
|
||||
this.emit('end');
|
||||
});
|
||||
if (MINI_HTML) s = s.pipe(minihtml(OPT_HTML_COMPRESS));
|
||||
s = s.pipe(g.dest(DEST_PATH));
|
||||
return s;
|
||||
});
|
||||
g.task('clean_html', function () {
|
||||
var s = g.src([
|
||||
'./' + DEST_PATH + '**/*.html', './' + DEST_PATH + '**/*.html'
|
||||
], {
|
||||
'read': false
|
||||
}).pipe(cleaner(OPT_CLEAN));
|
||||
return s;
|
||||
});
|
||||
|
||||
|
||||
/*-------------------ALL-----------------------------*/
|
||||
g.task('copy_all_files', ['clean_all'], function () {
|
||||
var s = g.src('./' + SRC_PATH + '**', {
|
||||
'base': ''
|
||||
})
|
||||
.pipe(g.dest(DEST_PATH));
|
||||
return s;
|
||||
});
|
||||
//清空dist目录
|
||||
g.task('clean_all', function () {
|
||||
var s = g.src([DEST_PATH + '*'], {
|
||||
'read': false
|
||||
}).pipe(cleaner(OPT_CLEAN));
|
||||
return s;
|
||||
});
|
||||
23
package.json
Normal file
23
package.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "netsupport",
|
||||
"version": "0.0.1",
|
||||
"description": "网络维护科在线报修平台-前端",
|
||||
"main": "index.js",
|
||||
"devDependencies": {
|
||||
"graceful-fs": "^4.2.4",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-clean": "^0.4.0",
|
||||
"gulp-clean-css": "^4.0.0",
|
||||
"gulp-htmlmin": "^5.0.1",
|
||||
"gulp-preprocess": "^3.0.1",
|
||||
"gulp-sequence": "^1.0.0",
|
||||
"gulp-uglify": "^3.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "gulp build -v2",
|
||||
"build:dev": "gulp build -v2d",
|
||||
"start": "gulp live",
|
||||
"test": "gulp"
|
||||
},
|
||||
"author": "Liu Yue"
|
||||
}
|
||||
37
src/404.html
Normal file
37
src/404.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!-- @extend part/wrap/head.part.html -->404<!-- @endextend -->
|
||||
<base href="<!-- @echo VERSION -->/cdn" />
|
||||
<!-- @include part/common_head_style.part.html -->
|
||||
|
||||
<!-- @extend part/wrap/headbody.part.html --><!-- @endextend -->
|
||||
|
||||
<!-- @extend part/wrap/body_head.part.html -->404<!-- @endextend -->
|
||||
<!-- @extend part/wrap/body_desc.part.html -->
|
||||
找不到页面(Page)就像找不到对象(Object)
|
||||
<!-- @endextend -->
|
||||
|
||||
<div class="body404">
|
||||
<article class="weui_article">
|
||||
<h1>找不到页面</h1>
|
||||
<br />
|
||||
<p>你看到了这个界面?</p>
|
||||
<p>那就是我的问题或者是Sola的问题了</p>
|
||||
<p>不要惊讶,因为....</p>
|
||||
<p><b>念念不忘,必有回响。</b></p>
|
||||
<p><b>有一口气,点一盏灯。</b></p>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
.body404{
|
||||
text-align: center;
|
||||
}
|
||||
.body404 p{
|
||||
color: #888;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<!-- @extend part/wrap/tail_fixed.part.html -->
|
||||
<!-- 此处不需要脚本 -->
|
||||
<!-- @endextend -->
|
||||
48
src/cdn/common.css
Normal file
48
src/cdn/common.css
Normal file
@@ -0,0 +1,48 @@
|
||||
html,body{
|
||||
background-color: #FBF9FE;
|
||||
font-family: "microsoft yahei";
|
||||
}
|
||||
.hide{display: none;}
|
||||
.fix_float{clear: both;}
|
||||
|
||||
.page{
|
||||
width: 92%;
|
||||
max-width: 800px;
|
||||
margin: 10px auto 50px auto;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch
|
||||
}
|
||||
.head{padding: 2em 0}
|
||||
.title{
|
||||
text-align: center;
|
||||
font-size: 34px;
|
||||
color: #3CC51F;
|
||||
font-weight: 400;
|
||||
margin: 0 15%
|
||||
}
|
||||
.desc {
|
||||
text-align: center;
|
||||
color: #888;
|
||||
font-size: 14px
|
||||
}
|
||||
|
||||
.bottom{
|
||||
padding: 1em 0 1.5em 0;
|
||||
background-color: #ECECEC;
|
||||
text-align: center;
|
||||
}
|
||||
.bottom a{
|
||||
color: #727F80;
|
||||
text-decoration: none;
|
||||
}
|
||||
.bottom p{
|
||||
width: 100%;
|
||||
color: #727F80;
|
||||
padding: 0.6em 0 0 0;
|
||||
}
|
||||
.bottom .mark{
|
||||
color: #61749B;
|
||||
}
|
||||
.bottom .small{
|
||||
font-size: 10px;
|
||||
}
|
||||
107
src/cdn/cryptico.min.js
vendored
Normal file
107
src/cdn/cryptico.min.js
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
var dbits,canary=244837814094590,j_lm=(canary&16777215)==15715070;function BigInteger(a,b,c){a!=null&&("number"==typeof a?this.fromNumber(a,b,c):b==null&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function nbi(){return new BigInteger(null)}function am1(a,b,c,d,e,g){for(;--g>=0;){var h=b*this[a++]+c[d]+e,e=Math.floor(h/67108864);c[d++]=h&67108863}return e}
|
||||
function am2(a,b,c,d,e,g){var h=b&32767;for(b>>=15;--g>=0;){var f=this[a]&32767,o=this[a++]>>15,p=b*f+o*h,f=h*f+((p&32767)<<15)+c[d]+(e&1073741823),e=(f>>>30)+(p>>>15)+b*o+(e>>>30);c[d++]=f&1073741823}return e}function am3(a,b,c,d,e,g){var h=b&16383;for(b>>=14;--g>=0;){var f=this[a]&16383,o=this[a++]>>14,p=b*f+o*h,f=h*f+((p&16383)<<14)+c[d]+e,e=(f>>28)+(p>>14)+b*o;c[d++]=f&268435455}return e}
|
||||
j_lm&&navigator.appName=="Microsoft Internet Explorer"?(BigInteger.prototype.am=am2,dbits=30):j_lm&&navigator.appName!="Netscape"?(BigInteger.prototype.am=am1,dbits=26):(BigInteger.prototype.am=am3,dbits=28);BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<<dbits)-1;BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz",BI_RC=[],rr,vv;
|
||||
rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv)BI_RC[rr++]=vv;rr="a".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;rr="A".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;function int2char(a){return BI_RM.charAt(a)}function intAt(a,b){var c=BI_RC[a.charCodeAt(b)];return c==null?-1:c}function bnpCopyTo(a){for(var b=this.t-1;b>=0;--b)a[b]=this[b];a.t=this.t;a.s=this.s}function bnpFromInt(a){this.t=1;this.s=a<0?-1:0;a>0?this[0]=a:a<-1?this[0]=a+DV:this.t=0}
|
||||
function nbv(a){var b=nbi();b.fromInt(a);return b}
|
||||
function bnpFromString(a,b){var c;if(b==16)c=4;else if(b==8)c=3;else if(b==256)c=8;else if(b==2)c=1;else if(b==32)c=5;else if(b==4)c=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var d=a.length,e=!1,g=0;--d>=0;){var h=c==8?a[d]&255:intAt(a,d);h<0?a.charAt(d)=="-"&&(e=!0):(e=!1,g==0?this[this.t++]=h:g+c>this.DB?(this[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this[this.t++]=h>>this.DB-g):this[this.t-1]|=h<<g,g+=c,g>=this.DB&&(g-=this.DB))}if(c==8&&(a[0]&128)!=0)this.s=-1,g>0&&(this[this.t-1]|=(1<<
|
||||
this.DB-g)-1<<g);this.clamp();e&&BigInteger.ZERO.subTo(this,this)}function bnpClamp(){for(var a=this.s&this.DM;this.t>0&&this[this.t-1]==a;)--this.t}
|
||||
function bnToString(a){if(this.s<0)return"-"+this.negate().toString(a);if(a==16)a=4;else if(a==8)a=3;else if(a==2)a=1;else if(a==32)a=5;else if(a==64)a=6;else if(a==4)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,e="",g=this.t,h=this.DB-g*this.DB%a;if(g-- >0){if(h<this.DB&&(c=this[g]>>h)>0)d=!0,e=int2char(c);for(;g>=0;)h<a?(c=(this[g]&(1<<h)-1)<<a-h,c|=this[--g]>>(h+=this.DB-a)):(c=this[g]>>(h-=a)&b,h<=0&&(h+=this.DB,--g)),c>0&&(d=!0),d&&(e+=int2char(c))}return d?e:"0"}
|
||||
function bnNegate(){var a=nbi();BigInteger.ZERO.subTo(this,a);return a}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(a){var b=this.s-a.s;if(b!=0)return b;var c=this.t,b=c-a.t;if(b!=0)return b;for(;--c>=0;)if((b=this[c]-a[c])!=0)return b;return 0}function nbits(a){var b=1,c;if((c=a>>>16)!=0)a=c,b+=16;if((c=a>>8)!=0)a=c,b+=8;if((c=a>>4)!=0)a=c,b+=4;if((c=a>>2)!=0)a=c,b+=2;a>>1!=0&&(b+=1);return b}
|
||||
function bnBitLength(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(a,b){var c;for(c=this.t-1;c>=0;--c)b[c+a]=this[c];for(c=a-1;c>=0;--c)b[c]=0;b.t=this.t+a;b.s=this.s}function bnpDRShiftTo(a,b){for(var c=a;c<this.t;++c)b[c-a]=this[c];b.t=Math.max(this.t-a,0);b.s=this.s}
|
||||
function bnpLShiftTo(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),h=this.s<<c&this.DM,f;for(f=this.t-1;f>=0;--f)b[f+g+1]=this[f]>>d|h,h=(this[f]&e)<<c;for(f=g-1;f>=0;--f)b[f]=0;b[g]=h;b.t=this.t+g+1;b.s=this.s;b.clamp()}
|
||||
function bnpRShiftTo(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b[0]=this[c]>>d;for(var h=c+1;h<this.t;++h)b[h-c-1]|=(this[h]&g)<<e,b[h-c]=this[h]>>d;d>0&&(b[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}}
|
||||
function bnpSubTo(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this[c]-a[c],b[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this[c],b[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a[c],b[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=d<0?-1:0;d<-1?b[c++]=this.DV+d:d>0&&(b[c++]=d);b.t=c;b.clamp()}
|
||||
function bnpMultiplyTo(a,b){var c=this.abs(),d=a.abs(),e=c.t;for(b.t=e+d.t;--e>=0;)b[e]=0;for(e=0;e<d.t;++e)b[e+c.t]=c.am(0,d[e],b,e,0,c.t);b.s=0;b.clamp();this.s!=a.s&&BigInteger.ZERO.subTo(b,b)}function bnpSquareTo(a){for(var b=this.abs(),c=a.t=2*b.t;--c>=0;)a[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b[c],a,2*c,0,1);if((a[c+b.t]+=b.am(c+1,2*b[c],a,2*c+1,d,b.t-c-1))>=b.DV)a[c+b.t]-=b.DV,a[c+b.t+1]=1}a.t>0&&(a[a.t-1]+=b.am(c,b[c],a,2*c,0,1));a.s=0;a.clamp()}
|
||||
function bnpDivRemTo(a,b,c){var d=a.abs();if(!(d.t<=0)){var e=this.abs();if(e.t<d.t)b!=null&&b.fromInt(0),c!=null&&this.copyTo(c);else{c==null&&(c=nbi());var g=nbi(),h=this.s,a=a.s,f=this.DB-nbits(d[d.t-1]);f>0?(d.lShiftTo(f,g),e.lShiftTo(f,c)):(d.copyTo(g),e.copyTo(c));d=g.t;e=g[d-1];if(e!=0){var o=e*(1<<this.F1)+(d>1?g[d-2]>>this.F2:0),p=this.FV/o,o=(1<<this.F1)/o,q=1<<this.F2,n=c.t,k=n-d,j=b==null?nbi():b;g.dlShiftTo(k,j);c.compareTo(j)>=0&&(c[c.t++]=1,c.subTo(j,c));BigInteger.ONE.dlShiftTo(d,
|
||||
j);for(j.subTo(g,g);g.t<d;)g[g.t++]=0;for(;--k>=0;){var l=c[--n]==e?this.DM:Math.floor(c[n]*p+(c[n-1]+q)*o);if((c[n]+=g.am(0,l,c,k,0,d))<l){g.dlShiftTo(k,j);for(c.subTo(j,c);c[n]<--l;)c.subTo(j,c)}}b!=null&&(c.drShiftTo(d,b),h!=a&&BigInteger.ZERO.subTo(b,b));c.t=d;c.clamp();f>0&&c.rShiftTo(f,c);h<0&&BigInteger.ZERO.subTo(c,c)}}}}function bnMod(a){var b=nbi();this.abs().divRemTo(a,null,b);this.s<0&&b.compareTo(BigInteger.ZERO)>0&&a.subTo(b,b);return b}function Classic(a){this.m=a}
|
||||
function cConvert(a){return a.s<0||a.compareTo(this.m)>=0?a.mod(this.m):a}function cRevert(a){return a}function cReduce(a){a.divRemTo(this.m,null,a)}function cMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c)}function cSqrTo(a,b){a.squareTo(b);this.reduce(b)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;
|
||||
function bnpInvDigit(){if(this.t<1)return 0;var a=this[0];if((a&1)==0)return 0;var b=a&3,b=b*(2-(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return b>0?this.DV-b:-b}function Montgomery(a){this.m=a;this.mp=a.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}
|
||||
function montConvert(a){var b=nbi();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);a.s<0&&b.compareTo(BigInteger.ZERO)>0&&this.m.subTo(b,b);return b}function montRevert(a){var b=nbi();a.copyTo(b);this.reduce(b);return b}
|
||||
function montReduce(a){for(;a.t<=this.mt2;)a[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=a[b]&32767,d=c*this.mpl+((c*this.mph+(a[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a[c]+=this.m.am(0,d,a,b,0,this.m.t);a[c]>=a.DV;)a[c]-=a.DV,a[++c]++}a.clamp();a.drShiftTo(this.m.t,a);a.compareTo(this.m)>=0&&a.subTo(this.m,a)}function montSqrTo(a,b){a.squareTo(b);this.reduce(b)}function montMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c)}Montgomery.prototype.convert=montConvert;
|
||||
Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(a,b){if(a>4294967295||a<1)return BigInteger.ONE;var c=nbi(),d=nbi(),e=b.convert(this),g=nbits(a)-1;for(e.copyTo(c);--g>=0;)if(b.sqrTo(c,d),(a&1<<g)>0)b.mulTo(d,e,c);else var h=c,c=d,d=h;return b.revert(c)}
|
||||
function bnModPowInt(a,b){var c;c=a<256||b.isEven()?new Classic(b):new Montgomery(b);return this.exp(a,c)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;
|
||||
BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;
|
||||
BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnClone(){var a=nbi();this.copyTo(a);return a}function bnIntValue(){if(this.s<0)if(this.t==1)return this[0]-this.DV;else{if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function bnByteValue(){return this.t==0?this.s:this[0]<<24>>24}function bnShortValue(){return this.t==0?this.s:this[0]<<16>>16}
|
||||
function bnpChunkSize(a){return Math.floor(Math.LN2*this.DB/Math.log(a))}function bnSigNum(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function bnpToRadix(a){a==null&&(a=10);if(this.signum()==0||a<2||a>36)return"0";var b=this.chunkSize(a),b=Math.pow(a,b),c=nbv(b),d=nbi(),e=nbi(),g="";for(this.divRemTo(c,d,e);d.signum()>0;)g=(b+e.intValue()).toString(a).substr(1)+g,d.divRemTo(c,d,e);return e.intValue().toString(a)+g}
|
||||
function bnpFromRadix(a,b){this.fromInt(0);b==null&&(b=10);for(var c=this.chunkSize(b),d=Math.pow(b,c),e=!1,g=0,h=0,f=0;f<a.length;++f){var o=intAt(a,f);o<0?a.charAt(f)=="-"&&this.signum()==0&&(e=!0):(h=b*h+o,++g>=c&&(this.dMultiply(d),this.dAddOffset(h,0),h=g=0))}g>0&&(this.dMultiply(Math.pow(b,g)),this.dAddOffset(h,0));e&&BigInteger.ZERO.subTo(this,this)}
|
||||
function bnpFromNumber(a,b,c){if("number"==typeof b)if(a<2)this.fromInt(1);else{this.fromNumber(a,c);this.testBit(a-1)||this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);for(this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(BigInteger.ONE.shiftLeft(a-1),this)}else{var c=[],d=a&7;c.length=(a>>3)+1;b.nextBytes(c);d>0?c[0]&=(1<<d)-1:c[0]=0;this.fromString(c,256)}}
|
||||
function bnToByteArray(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(a-- >0){if(c<this.DB&&(d=this[a]>>c)!=(this.s&this.DM)>>c)b[e++]=d|this.s<<this.DB-c;for(;a>=0;)if(c<8?(d=(this[a]&(1<<c)-1)<<8-c,d|=this[--a]>>(c+=this.DB-8)):(d=this[a]>>(c-=8)&255,c<=0&&(c+=this.DB,--a)),(d&128)!=0&&(d|=-256),e==0&&(this.s&128)!=(d&128)&&++e,e>0||d!=this.s)b[e++]=d}return b}function bnEquals(a){return this.compareTo(a)==0}function bnMin(a){return this.compareTo(a)<0?this:a}
|
||||
function bnMax(a){return this.compareTo(a)>0?this:a}function bnpBitwiseTo(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=0;d<g;++d)c[d]=b(this[d],a[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c[d]=b(this[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c[d]=b(e,a[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()}function op_and(a,b){return a&b}function bnAnd(a){var b=nbi();this.bitwiseTo(a,op_and,b);return b}function op_or(a,b){return a|b}
|
||||
function bnOr(a){var b=nbi();this.bitwiseTo(a,op_or,b);return b}function op_xor(a,b){return a^b}function bnXor(a){var b=nbi();this.bitwiseTo(a,op_xor,b);return b}function op_andnot(a,b){return a&~b}function bnAndNot(a){var b=nbi();this.bitwiseTo(a,op_andnot,b);return b}function bnNot(){for(var a=nbi(),b=0;b<this.t;++b)a[b]=this.DM&~this[b];a.t=this.t;a.s=~this.s;return a}function bnShiftLeft(a){var b=nbi();a<0?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b}
|
||||
function bnShiftRight(a){var b=nbi();a<0?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b}function lbit(a){if(a==0)return-1;var b=0;(a&65535)==0&&(a>>=16,b+=16);(a&255)==0&&(a>>=8,b+=8);(a&15)==0&&(a>>=4,b+=4);(a&3)==0&&(a>>=2,b+=2);(a&1)==0&&++b;return b}function bnGetLowestSetBit(){for(var a=0;a<this.t;++a)if(this[a]!=0)return a*this.DB+lbit(this[a]);return this.s<0?this.t*this.DB:-1}function cbit(a){for(var b=0;a!=0;)a&=a-1,++b;return b}
|
||||
function bnBitCount(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c)a+=cbit(this[c]^b);return a}function bnTestBit(a){var b=Math.floor(a/this.DB);return b>=this.t?this.s!=0:(this[b]&1<<a%this.DB)!=0}function bnpChangeBit(a,b){var c=BigInteger.ONE.shiftLeft(a);this.bitwiseTo(c,b,c);return c}function bnSetBit(a){return this.changeBit(a,op_or)}function bnClearBit(a){return this.changeBit(a,op_andnot)}function bnFlipBit(a){return this.changeBit(a,op_xor)}
|
||||
function bnpAddTo(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this[c]+a[c],b[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=this[c],b[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a[c],b[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=d<0?-1:0;d>0?b[c++]=d:d<-1&&(b[c++]=this.DV+d);b.t=c;b.clamp()}function bnAdd(a){var b=nbi();this.addTo(a,b);return b}function bnSubtract(a){var b=nbi();this.subTo(a,b);return b}
|
||||
function bnMultiply(a){var b=nbi();this.multiplyTo(a,b);return b}function bnSquare(){var a=nbi();this.squareTo(a);return a}function bnDivide(a){var b=nbi();this.divRemTo(a,b,null);return b}function bnRemainder(a){var b=nbi();this.divRemTo(a,null,b);return b}function bnDivideAndRemainder(a){var b=nbi(),c=nbi();this.divRemTo(a,b,c);return[b,c]}function bnpDMultiply(a){this[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()}
|
||||
function bnpDAddOffset(a,b){if(a!=0){for(;this.t<=b;)this[this.t++]=0;for(this[b]+=a;this[b]>=this.DV;)this[b]-=this.DV,++b>=this.t&&(this[this.t++]=0),++this[b]}}function NullExp(){}function nNop(a){return a}function nMulTo(a,b,c){a.multiplyTo(b,c)}function nSqrTo(a,b){a.squareTo(b)}NullExp.prototype.convert=nNop;NullExp.prototype.revert=nNop;NullExp.prototype.mulTo=nMulTo;NullExp.prototype.sqrTo=nSqrTo;function bnPow(a){return this.exp(a,new NullExp)}
|
||||
function bnpMultiplyLowerTo(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;d>0;)c[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c[d+this.t]=this.am(0,a[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a[d],c,d,0,b-d);c.clamp()}function bnpMultiplyUpperTo(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;--d>=0;)c[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c[this.t+d-b]=this.am(b-d,a[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,c)}
|
||||
function Barrett(a){this.r2=nbi();this.q3=nbi();BigInteger.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function barrettConvert(a){if(a.s<0||a.t>2*this.m.t)return a.mod(this.m);else if(a.compareTo(this.m)<0)return a;else{var b=nbi();a.copyTo(b);this.reduce(b);return b}}function barrettRevert(a){return a}
|
||||
function barrettReduce(a){a.drShiftTo(this.m.t-1,this.r2);if(a.t>this.m.t+1)a.t=this.m.t+1,a.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);a.compareTo(this.r2)<0;)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);a.compareTo(this.m)>=0;)a.subTo(this.m,a)}function barrettSqrTo(a,b){a.squareTo(b);this.reduce(b)}function barrettMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c)}Barrett.prototype.convert=barrettConvert;
|
||||
Barrett.prototype.revert=barrettRevert;Barrett.prototype.reduce=barrettReduce;Barrett.prototype.mulTo=barrettMulTo;Barrett.prototype.sqrTo=barrettSqrTo;
|
||||
function bnModPow(a,b){var c=a.bitLength(),d,e=nbv(1),g;if(c<=0)return e;else d=c<18?1:c<48?3:c<144?4:c<768?5:6;g=c<8?new Classic(b):b.isEven()?new Barrett(b):new Montgomery(b);var h=[],f=3,o=d-1,p=(1<<d)-1;h[1]=g.convert(this);if(d>1){c=nbi();for(g.sqrTo(h[1],c);f<=p;)h[f]=nbi(),g.mulTo(c,h[f-2],h[f]),f+=2}for(var q=a.t-1,n,k=!0,j=nbi(),c=nbits(a[q])-1;q>=0;){c>=o?n=a[q]>>c-o&p:(n=(a[q]&(1<<c+1)-1)<<o-c,q>0&&(n|=a[q-1]>>this.DB+c-o));for(f=d;(n&1)==0;)n>>=1,--f;if((c-=f)<0)c+=this.DB,--q;if(k)h[n].copyTo(e),
|
||||
k=!1;else{for(;f>1;)g.sqrTo(e,j),g.sqrTo(j,e),f-=2;f>0?g.sqrTo(e,j):(f=e,e=j,j=f);g.mulTo(j,h[n],e)}for(;q>=0&&(a[q]&1<<c)==0;)g.sqrTo(e,j),f=e,e=j,j=f,--c<0&&(c=this.DB-1,--q)}return g.revert(e)}
|
||||
function bnGCD(a){var b=this.s<0?this.negate():this.clone(),a=a.s<0?a.negate():a.clone();if(b.compareTo(a)<0)var c=b,b=a,a=c;var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(d<0)return b;c<d&&(d=c);d>0&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;b.signum()>0;)(c=b.getLowestSetBit())>0&&b.rShiftTo(c,b),(c=a.getLowestSetBit())>0&&a.rShiftTo(c,a),b.compareTo(a)>=0?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));d>0&&a.lShiftTo(d,a);return a}
|
||||
function bnpModInt(a){if(a<=0)return 0;var b=this.DV%a,c=this.s<0?a-1:0;if(this.t>0)if(b==0)c=this[0]%a;else for(var d=this.t-1;d>=0;--d)c=(b*c+this[d])%a;return c}
|
||||
function bnModInverse(a){var b=a.isEven();if(this.isEven()&&b||a.signum()==0)return BigInteger.ZERO;for(var c=a.clone(),d=this.clone(),e=nbv(1),g=nbv(0),h=nbv(0),f=nbv(1);c.signum()!=0;){for(;c.isEven();){c.rShiftTo(1,c);if(b){if(!e.isEven()||!g.isEven())e.addTo(this,e),g.subTo(a,g);e.rShiftTo(1,e)}else g.isEven()||g.subTo(a,g);g.rShiftTo(1,g)}for(;d.isEven();){d.rShiftTo(1,d);if(b){if(!h.isEven()||!f.isEven())h.addTo(this,h),f.subTo(a,f);h.rShiftTo(1,h)}else f.isEven()||f.subTo(a,f);f.rShiftTo(1,
|
||||
f)}c.compareTo(d)>=0?(c.subTo(d,c),b&&e.subTo(h,e),g.subTo(f,g)):(d.subTo(c,d),b&&h.subTo(e,h),f.subTo(g,f))}if(d.compareTo(BigInteger.ONE)!=0)return BigInteger.ZERO;if(f.compareTo(a)>=0)return f.subtract(a);if(f.signum()<0)f.addTo(a,f);else return f;return f.signum()<0?f.add(a):f}
|
||||
var lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,
|
||||
733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=67108864/lowprimes[lowprimes.length-1];
|
||||
function bnIsProbablePrime(a){var b,c=this.abs();if(c.t==1&&c[0]<=lowprimes[lowprimes.length-1]){for(b=0;b<lowprimes.length;++b)if(c[0]==lowprimes[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<lowprimes.length;){for(var d=lowprimes[b],e=b+1;e<lowprimes.length&&d<lplim;)d*=lowprimes[e++];for(d=c.modInt(d);b<e;)if(d%lowprimes[b++]==0)return!1}return c.millerRabin(a)}
|
||||
function bnpMillerRabin(a){var b=this.subtract(BigInteger.ONE),c=b.getLowestSetBit();if(c<=0)return!1;var d=b.shiftRight(c),a=a+1>>1;if(a>lowprimes.length)a=lowprimes.length;for(var e=nbi(),g=0;g<a;++g){e.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);var h=e.modPow(d,this);if(h.compareTo(BigInteger.ONE)!=0&&h.compareTo(b)!=0){for(var f=1;f++<c&&h.compareTo(b)!=0;)if(h=h.modPowInt(2,this),h.compareTo(BigInteger.ONE)==0)return!1;if(h.compareTo(b)!=0)return!1}}return!0}
|
||||
BigInteger.prototype.chunkSize=bnpChunkSize;BigInteger.prototype.toRadix=bnpToRadix;BigInteger.prototype.fromRadix=bnpFromRadix;BigInteger.prototype.fromNumber=bnpFromNumber;BigInteger.prototype.bitwiseTo=bnpBitwiseTo;BigInteger.prototype.changeBit=bnpChangeBit;BigInteger.prototype.addTo=bnpAddTo;BigInteger.prototype.dMultiply=bnpDMultiply;BigInteger.prototype.dAddOffset=bnpDAddOffset;BigInteger.prototype.multiplyLowerTo=bnpMultiplyLowerTo;BigInteger.prototype.multiplyUpperTo=bnpMultiplyUpperTo;
|
||||
BigInteger.prototype.modInt=bnpModInt;BigInteger.prototype.millerRabin=bnpMillerRabin;BigInteger.prototype.clone=bnClone;BigInteger.prototype.intValue=bnIntValue;BigInteger.prototype.byteValue=bnByteValue;BigInteger.prototype.shortValue=bnShortValue;BigInteger.prototype.signum=bnSigNum;BigInteger.prototype.toByteArray=bnToByteArray;BigInteger.prototype.equals=bnEquals;BigInteger.prototype.min=bnMin;BigInteger.prototype.max=bnMax;BigInteger.prototype.and=bnAnd;BigInteger.prototype.or=bnOr;
|
||||
BigInteger.prototype.xor=bnXor;BigInteger.prototype.andNot=bnAndNot;BigInteger.prototype.not=bnNot;BigInteger.prototype.shiftLeft=bnShiftLeft;BigInteger.prototype.shiftRight=bnShiftRight;BigInteger.prototype.getLowestSetBit=bnGetLowestSetBit;BigInteger.prototype.bitCount=bnBitCount;BigInteger.prototype.testBit=bnTestBit;BigInteger.prototype.setBit=bnSetBit;BigInteger.prototype.clearBit=bnClearBit;BigInteger.prototype.flipBit=bnFlipBit;BigInteger.prototype.add=bnAdd;BigInteger.prototype.subtract=bnSubtract;
|
||||
BigInteger.prototype.multiply=bnMultiply;BigInteger.prototype.divide=bnDivide;BigInteger.prototype.remainder=bnRemainder;BigInteger.prototype.divideAndRemainder=bnDivideAndRemainder;BigInteger.prototype.modPow=bnModPow;BigInteger.prototype.modInverse=bnModInverse;BigInteger.prototype.pow=bnPow;BigInteger.prototype.gcd=bnGCD;BigInteger.prototype.isProbablePrime=bnIsProbablePrime;BigInteger.prototype.square=bnSquare;
|
||||
(function(a,b,c,d,e,g,h){function f(a){var b,d,e=this,g=a.length,f=0,h=e.i=e.j=e.m=0;e.S=[];e.c=[];for(g||(a=[g++]);f<c;)e.S[f]=f++;for(f=0;f<c;f++)b=e.S[f],h=h+b+a[f%g]&c-1,d=e.S[h],e.S[f]=d,e.S[h]=b;e.g=function(a){var b=e.S,d=e.i+1&c-1,g=b[d],f=e.j+g&c-1,h=b[f];b[d]=h;b[f]=g;for(var k=b[g+h&c-1];--a;)d=d+1&c-1,g=b[d],f=f+g&c-1,h=b[f],b[d]=h,b[f]=g,k=k*c+b[g+h&c-1];e.i=d;e.j=f;return k};e.g(c)}function o(a,b,c,d,e){c=[];e=typeof a;if(b&&e=="object")for(d in a)if(d.indexOf("S")<5)try{c.push(o(a[d],
|
||||
b-1))}catch(g){}return c.length?c:a+(e!="string"?"\x00":"")}function p(a,b,d,e){a+="";for(e=d=0;e<a.length;e++){var g=b,f=e&c-1,h=(d^=b[e&c-1]*19)+a.charCodeAt(e);g[f]=h&c-1}a="";for(e in b)a+=String.fromCharCode(b[e]);return a}b.seedrandom=function(q,n){var k=[],j,q=p(o(n?[q,a]:arguments.length?q:[(new Date).getTime(),a,window],3),k);j=new f(k);p(j.S,a);b.random=function(){for(var a=j.g(d),b=h,f=0;a<e;)a=(a+f)*c,b*=c,f=j.g(1);for(;a>=g;)a/=2,b/=2,f>>>=1;return(a+f)/b};return q};h=b.pow(c,d);e=b.pow(2,
|
||||
e);g=e*2;p(b.random(),a)})([],Math,256,6,52);function SeededRandom(){}function SRnextBytes(a){var b;for(b=0;b<a.length;b++)a[b]=Math.floor(Math.random()*256)}SeededRandom.prototype.nextBytes=SRnextBytes;function Arcfour(){this.j=this.i=0;this.S=[]}function ARC4init(a){var b,c,d;for(b=0;b<256;++b)this.S[b]=b;for(b=c=0;b<256;++b)c=c+this.S[b]+a[b%a.length]&255,d=this.S[b],this.S[b]=this.S[c],this.S[c]=d;this.j=this.i=0}
|
||||
function ARC4next(){var a;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;a=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=a;return this.S[a+this.S[this.i]&255]}Arcfour.prototype.init=ARC4init;Arcfour.prototype.next=ARC4next;function prng_newstate(){return new Arcfour}var rng_psize=256,rng_state,rng_pool,rng_pptr;
|
||||
function rng_seed_int(a){rng_pool[rng_pptr++]^=a&255;rng_pool[rng_pptr++]^=a>>8&255;rng_pool[rng_pptr++]^=a>>16&255;rng_pool[rng_pptr++]^=a>>24&255;rng_pptr>=rng_psize&&(rng_pptr-=rng_psize)}function rng_seed_time(){rng_seed_int((new Date).getTime())}
|
||||
if(rng_pool==null){rng_pool=[];rng_pptr=0;var t;if(navigator.appName=="Netscape"&&navigator.appVersion<"5"&&window.crypto){var z=window.crypto.random(32);for(t=0;t<z.length;++t)rng_pool[rng_pptr++]=z.charCodeAt(t)&255}for(;rng_pptr<rng_psize;)t=Math.floor(65536*Math.random()),rng_pool[rng_pptr++]=t>>>8,rng_pool[rng_pptr++]=t&255;rng_pptr=0;rng_seed_time()}
|
||||
function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}function rng_get_bytes(a){var b;for(b=0;b<a.length;++b)a[b]=rng_get_byte()}function SecureRandom(){}SecureRandom.prototype.nextBytes=rng_get_bytes;
|
||||
function SHA256(a){function b(a,b){var c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535}function c(a,b){return a>>>b|a<<32-b}a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var h=a.charCodeAt(c);h<128?b+=String.fromCharCode(h):(h>127&&h<2048?b+=String.fromCharCode(h>>6|192):(b+=String.fromCharCode(h>>12|224),b+=String.fromCharCode(h>>6&63|128)),b+=String.fromCharCode(h&63|128))}return b}(a);return function(a){for(var b="",c=0;c<a.length*4;c++)b+="0123456789abcdef".charAt(a[c>>
|
||||
2]>>(3-c%4)*8+4&15)+"0123456789abcdef".charAt(a[c>>2]>>(3-c%4)*8&15);return b}(function(a,e){var g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,
|
||||
2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],f=Array(64),o,p,q,n,k,j,l,m,s,r,u,w;a[e>>5]|=128<<24-e%32;a[(e+64>>9<<4)+15]=e;for(s=0;s<a.length;s+=16){o=h[0];p=h[1];q=h[2];n=h[3];
|
||||
k=h[4];j=h[5];l=h[6];m=h[7];for(r=0;r<64;r++)f[r]=r<16?a[r+s]:b(b(b(c(f[r-2],17)^c(f[r-2],19)^f[r-2]>>>10,f[r-7]),c(f[r-15],7)^c(f[r-15],18)^f[r-15]>>>3),f[r-16]),u=b(b(b(b(m,c(k,6)^c(k,11)^c(k,25)),k&j^~k&l),g[r]),f[r]),w=b(c(o,2)^c(o,13)^c(o,22),o&p^o&q^p&q),m=l,l=j,j=k,k=b(n,u),n=q,q=p,p=o,o=b(u,w);h[0]=b(o,h[0]);h[1]=b(p,h[1]);h[2]=b(q,h[2]);h[3]=b(n,h[3]);h[4]=b(k,h[4]);h[5]=b(j,h[5]);h[6]=b(l,h[6]);h[7]=b(m,h[7])}return h}(function(a){for(var b=[],c=0;c<a.length*8;c+=8)b[c>>5]|=(a.charCodeAt(c/
|
||||
8)&255)<<24-c%32;return b}(a),a.length*8))}var sha256={hex:function(a){return SHA256(a)}};
|
||||
function SHA1(a){function b(a,b){return a<<b|a>>>32-b}function c(a){var b="",c,d;for(c=7;c>=0;c--)d=a>>>c*4&15,b+=d.toString(16);return b}var d,e,g=Array(80),h=1732584193,f=4023233417,o=2562383102,p=271733878,q=3285377520,n,k,j,l,m,a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):(d>127&&d<2048?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&
|
||||
63|128))}return b}(a);n=a.length;var s=[];for(d=0;d<n-3;d+=4)e=a.charCodeAt(d)<<24|a.charCodeAt(d+1)<<16|a.charCodeAt(d+2)<<8|a.charCodeAt(d+3),s.push(e);switch(n%4){case 0:d=2147483648;break;case 1:d=a.charCodeAt(n-1)<<24|8388608;break;case 2:d=a.charCodeAt(n-2)<<24|a.charCodeAt(n-1)<<16|32768;break;case 3:d=a.charCodeAt(n-3)<<24|a.charCodeAt(n-2)<<16|a.charCodeAt(n-1)<<8|128}for(s.push(d);s.length%16!=14;)s.push(0);s.push(n>>>29);s.push(n<<3&4294967295);for(a=0;a<s.length;a+=16){for(d=0;d<16;d++)g[d]=
|
||||
s[a+d];for(d=16;d<=79;d++)g[d]=b(g[d-3]^g[d-8]^g[d-14]^g[d-16],1);e=h;n=f;k=o;j=p;l=q;for(d=0;d<=19;d++)m=b(e,5)+(n&k|~n&j)+l+g[d]+1518500249&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=20;d<=39;d++)m=b(e,5)+(n^k^j)+l+g[d]+1859775393&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=40;d<=59;d++)m=b(e,5)+(n&k|n&j|k&j)+l+g[d]+2400959708&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=60;d<=79;d++)m=b(e,5)+(n^k^j)+l+g[d]+3395469782&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;h=h+e&4294967295;f=f+n&4294967295;o=o+k&4294967295;
|
||||
p=p+j&4294967295;q=q+l&4294967295}m=c(h)+c(f)+c(o)+c(p)+c(q);return m.toLowerCase()}
|
||||
var sha1={hex:function(a){return SHA1(a)}},MD5=function(a){function b(a,b){var c,d,e,f,g;e=a&2147483648;f=b&2147483648;c=a&1073741824;d=b&1073741824;g=(a&1073741823)+(b&1073741823);return c&d?g^2147483648^e^f:c|d?g&1073741824?g^3221225472^e^f:g^1073741824^e^f:g^e^f}function c(a,c,d,e,f,g,h){a=b(a,b(b(c&d|~c&e,f),h));return b(a<<g|a>>>32-g,c)}function d(a,c,d,e,f,g,h){a=b(a,b(b(c&e|d&~e,f),h));return b(a<<g|a>>>32-g,c)}function e(a,c,d,e,f,g,h){a=b(a,b(b(c^d^e,f),h));return b(a<<g|a>>>32-g,c)}function g(a,
|
||||
c,d,e,f,g,h){a=b(a,b(b(d^(c|~e),f),h));return b(a<<g|a>>>32-g,c)}function h(a){var b="",c="",d;for(d=0;d<=3;d++)c=a>>>d*8&255,c="0"+c.toString(16),b+=c.substr(c.length-2,2);return b}var f=[],o,p,q,n,k,j,l,m,a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):(d>127&&d<2048?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b}(a),
|
||||
f=function(a){var b,c=a.length;b=c+8;for(var d=((b-b%64)/64+1)*16,e=Array(d-1),f=0,g=0;g<c;)b=(g-g%4)/4,f=g%4*8,e[b]|=a.charCodeAt(g)<<f,g++;e[(g-g%4)/4]|=128<<g%4*8;e[d-2]=c<<3;e[d-1]=c>>>29;return e}(a);k=1732584193;j=4023233417;l=2562383102;m=271733878;for(a=0;a<f.length;a+=16)o=k,p=j,q=l,n=m,k=c(k,j,l,m,f[a+0],7,3614090360),m=c(m,k,j,l,f[a+1],12,3905402710),l=c(l,m,k,j,f[a+2],17,606105819),j=c(j,l,m,k,f[a+3],22,3250441966),k=c(k,j,l,m,f[a+4],7,4118548399),m=c(m,k,j,l,f[a+5],12,1200080426),l=c(l,
|
||||
m,k,j,f[a+6],17,2821735955),j=c(j,l,m,k,f[a+7],22,4249261313),k=c(k,j,l,m,f[a+8],7,1770035416),m=c(m,k,j,l,f[a+9],12,2336552879),l=c(l,m,k,j,f[a+10],17,4294925233),j=c(j,l,m,k,f[a+11],22,2304563134),k=c(k,j,l,m,f[a+12],7,1804603682),m=c(m,k,j,l,f[a+13],12,4254626195),l=c(l,m,k,j,f[a+14],17,2792965006),j=c(j,l,m,k,f[a+15],22,1236535329),k=d(k,j,l,m,f[a+1],5,4129170786),m=d(m,k,j,l,f[a+6],9,3225465664),l=d(l,m,k,j,f[a+11],14,643717713),j=d(j,l,m,k,f[a+0],20,3921069994),k=d(k,j,l,m,f[a+5],5,3593408605),
|
||||
m=d(m,k,j,l,f[a+10],9,38016083),l=d(l,m,k,j,f[a+15],14,3634488961),j=d(j,l,m,k,f[a+4],20,3889429448),k=d(k,j,l,m,f[a+9],5,568446438),m=d(m,k,j,l,f[a+14],9,3275163606),l=d(l,m,k,j,f[a+3],14,4107603335),j=d(j,l,m,k,f[a+8],20,1163531501),k=d(k,j,l,m,f[a+13],5,2850285829),m=d(m,k,j,l,f[a+2],9,4243563512),l=d(l,m,k,j,f[a+7],14,1735328473),j=d(j,l,m,k,f[a+12],20,2368359562),k=e(k,j,l,m,f[a+5],4,4294588738),m=e(m,k,j,l,f[a+8],11,2272392833),l=e(l,m,k,j,f[a+11],16,1839030562),j=e(j,l,m,k,f[a+14],23,4259657740),
|
||||
k=e(k,j,l,m,f[a+1],4,2763975236),m=e(m,k,j,l,f[a+4],11,1272893353),l=e(l,m,k,j,f[a+7],16,4139469664),j=e(j,l,m,k,f[a+10],23,3200236656),k=e(k,j,l,m,f[a+13],4,681279174),m=e(m,k,j,l,f[a+0],11,3936430074),l=e(l,m,k,j,f[a+3],16,3572445317),j=e(j,l,m,k,f[a+6],23,76029189),k=e(k,j,l,m,f[a+9],4,3654602809),m=e(m,k,j,l,f[a+12],11,3873151461),l=e(l,m,k,j,f[a+15],16,530742520),j=e(j,l,m,k,f[a+2],23,3299628645),k=g(k,j,l,m,f[a+0],6,4096336452),m=g(m,k,j,l,f[a+7],10,1126891415),l=g(l,m,k,j,f[a+14],15,2878612391),
|
||||
j=g(j,l,m,k,f[a+5],21,4237533241),k=g(k,j,l,m,f[a+12],6,1700485571),m=g(m,k,j,l,f[a+3],10,2399980690),l=g(l,m,k,j,f[a+10],15,4293915773),j=g(j,l,m,k,f[a+1],21,2240044497),k=g(k,j,l,m,f[a+8],6,1873313359),m=g(m,k,j,l,f[a+15],10,4264355552),l=g(l,m,k,j,f[a+6],15,2734768916),j=g(j,l,m,k,f[a+13],21,1309151649),k=g(k,j,l,m,f[a+4],6,4149444226),m=g(m,k,j,l,f[a+11],10,3174756917),l=g(l,m,k,j,f[a+2],15,718787259),j=g(j,l,m,k,f[a+9],21,3951481745),k=b(k,o),j=b(j,p),l=b(l,q),m=b(m,n);return(h(k)+h(j)+h(l)+
|
||||
h(m)).toLowerCase()};function parseBigInt(a,b){return new BigInteger(a,b)}function linebrk(a,b){for(var c="",d=0;d+b<a.length;)c+=a.substring(d,d+b)+"\n",d+=b;return c+a.substring(d,a.length)}function byte2Hex(a){return a<16?"0"+a.toString(16):a.toString(16)}
|
||||
function pkcs1pad2(a,b){if(b<a.length+11)throw"Message too long for RSA (n="+b+", l="+a.length+")";for(var c=[],d=a.length-1;d>=0&&b>0;){var e=a.charCodeAt(d--);e<128?c[--b]=e:e>127&&e<2048?(c[--b]=e&63|128,c[--b]=e>>6|192):(c[--b]=e&63|128,c[--b]=e>>6&63|128,c[--b]=e>>12|224)}c[--b]=0;d=new SecureRandom;for(e=[];b>2;){for(e[0]=0;e[0]==0;)d.nextBytes(e);c[--b]=e[0]}c[--b]=2;c[--b]=0;return new BigInteger(c)}
|
||||
function RSAKey(){this.n=null;this.e=0;this.coeff=this.dmq1=this.dmp1=this.q=this.p=this.d=null}function RSASetPublic(a,b){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16)):alert("Invalid RSA public key")}function RSADoPublic(a){return a.modPowInt(this.e,this.n)}function RSAEncrypt(a){a=pkcs1pad2(a,this.n.bitLength()+7>>3);if(a==null)return null;a=this.doPublic(a);if(a==null)return null;a=a.toString(16);return(a.length&1)==0?a:"0"+a}
|
||||
RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt;function pkcs1unpad2(a,b){for(var c=a.toByteArray(),d=0;d<c.length&&c[d]==0;)++d;if(c.length-d!=b-1||c[d]!=2)return null;for(++d;c[d]!=0;)if(++d>=c.length)return null;for(var e="";++d<c.length;){var g=c[d]&255;g<128?e+=String.fromCharCode(g):g>191&&g<224?(e+=String.fromCharCode((g&31)<<6|c[d+1]&63),++d):(e+=String.fromCharCode((g&15)<<12|(c[d+1]&63)<<6|c[d+2]&63),d+=2)}return e}
|
||||
function RSASetPrivate(a,b,c){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16),this.d=parseBigInt(c,16)):alert("Invalid RSA private key")}
|
||||
function RSASetPrivateEx(a,b,c,d,e,g,h,f){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16),this.d=parseBigInt(c,16),this.p=parseBigInt(d,16),this.q=parseBigInt(e,16),this.dmp1=parseBigInt(g,16),this.dmq1=parseBigInt(h,16),this.coeff=parseBigInt(f,16)):alert("Invalid RSA private key")}
|
||||
function RSAGenerate(a,b){var c=new SeededRandom,d=a>>1;this.e=parseInt(b,16);for(var e=new BigInteger(b,16);;){for(;;)if(this.p=new BigInteger(a-d,1,c),this.p.subtract(BigInteger.ONE).gcd(e).compareTo(BigInteger.ONE)==0&&this.p.isProbablePrime(10))break;for(;;)if(this.q=new BigInteger(d,1,c),this.q.subtract(BigInteger.ONE).gcd(e).compareTo(BigInteger.ONE)==0&&this.q.isProbablePrime(10))break;if(this.p.compareTo(this.q)<=0){var g=this.p;this.p=this.q;this.q=g}var g=this.p.subtract(BigInteger.ONE),
|
||||
h=this.q.subtract(BigInteger.ONE),f=g.multiply(h);if(f.gcd(e).compareTo(BigInteger.ONE)==0){this.n=this.p.multiply(this.q);this.d=e.modInverse(f);this.dmp1=this.d.mod(g);this.dmq1=this.d.mod(h);this.coeff=this.q.modInverse(this.p);break}}}
|
||||
function RSADoPrivate(a){if(this.p==null||this.q==null)return a.modPow(this.d,this.n);for(var b=a.mod(this.p).modPow(this.dmp1,this.p),a=a.mod(this.q).modPow(this.dmq1,this.q);b.compareTo(a)<0;)b=b.add(this.p);return b.subtract(a).multiply(this.coeff).mod(this.p).multiply(this.q).add(a)}function RSADecrypt(a){a=this.doPrivate(parseBigInt(a,16));return a==null?null:pkcs1unpad2(a,this.n.bitLength()+7>>3)}RSAKey.prototype.doPrivate=RSADoPrivate;RSAKey.prototype.setPrivate=RSASetPrivate;
|
||||
RSAKey.prototype.setPrivateEx=RSASetPrivateEx;RSAKey.prototype.generate=RSAGenerate;RSAKey.prototype.decrypt=RSADecrypt;var _RSASIGN_DIHEAD=[];_RSASIGN_DIHEAD.sha1="3021300906052b0e03021a05000414";_RSASIGN_DIHEAD.sha256="3031300d060960864801650304020105000420";var _RSASIGN_HASHHEXFUNC=[];_RSASIGN_HASHHEXFUNC.sha1=sha1.hex;_RSASIGN_HASHHEXFUNC.sha256=sha256.hex;
|
||||
function _rsasign_getHexPaddedDigestInfoForString(a,b,c){b/=4;for(var a=(0,_RSASIGN_HASHHEXFUNC[c])(a),c="00"+_RSASIGN_DIHEAD[c]+a,a="",b=b-4-c.length,d=0;d<b;d+=2)a+="ff";return sPaddedMessageHex="0001"+a+c}function _rsasign_signString(a,b){var c=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),b);return this.doPrivate(parseBigInt(c,16)).toString(16)}
|
||||
function _rsasign_signStringWithSHA1(a){a=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),"sha1");return this.doPrivate(parseBigInt(a,16)).toString(16)}function _rsasign_signStringWithSHA256(a){a=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),"sha256");return this.doPrivate(parseBigInt(a,16)).toString(16)}function _rsasign_getDecryptSignatureBI(a,b,c){var d=new RSAKey;d.setPublic(b,c);return d.doPublic(a)}
|
||||
function _rsasign_getHexDigestInfoFromSig(a,b,c){return _rsasign_getDecryptSignatureBI(a,b,c).toString(16).replace(/^1f+00/,"")}function _rsasign_getAlgNameAndHashFromHexDisgestInfo(a){for(var b in _RSASIGN_DIHEAD){var c=_RSASIGN_DIHEAD[b],d=c.length;if(a.substring(0,d)==c)return[b,a.substring(d)]}return[]}
|
||||
function _rsasign_verifySignatureWithArgs(a,b,c,d){b=_rsasign_getHexDigestInfoFromSig(b,c,d);c=_rsasign_getAlgNameAndHashFromHexDisgestInfo(b);if(c.length==0)return!1;b=c[1];a=(0,_RSASIGN_HASHHEXFUNC[c[0]])(a);return b==a}function _rsasign_verifyHexSignatureForMessage(a,b){var c=parseBigInt(a,16);return _rsasign_verifySignatureWithArgs(b,c,this.n.toString(16),this.e.toString(16))}
|
||||
function _rsasign_verifyString(a,b){var b=b.replace(/[ \n]+/g,""),c=this.doPublic(parseBigInt(b,16)).toString(16).replace(/^1f+00/,""),d=_rsasign_getAlgNameAndHashFromHexDisgestInfo(c);if(d.length==0)return!1;c=d[1];d=(0,_RSASIGN_HASHHEXFUNC[d[0]])(a);return c==d}RSAKey.prototype.signString=_rsasign_signString;RSAKey.prototype.signStringWithSHA1=_rsasign_signStringWithSHA1;RSAKey.prototype.signStringWithSHA256=_rsasign_signStringWithSHA256;RSAKey.prototype.verifyString=_rsasign_verifyString;
|
||||
RSAKey.prototype.verifyHexSignatureForMessage=_rsasign_verifyHexSignatureForMessage;
|
||||
var aes=function(){var a={Sbox:[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,
|
||||
95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],ShiftRowTab:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11]};a.Init=
|
||||
function(){a.Sbox_Inv=Array(256);for(var b=0;b<256;b++)a.Sbox_Inv[a.Sbox[b]]=b;a.ShiftRowTab_Inv=Array(16);for(b=0;b<16;b++)a.ShiftRowTab_Inv[a.ShiftRowTab[b]]=b;a.xtime=Array(256);for(b=0;b<128;b++)a.xtime[b]=b<<1,a.xtime[128+b]=b<<1^27};a.Done=function(){delete a.Sbox_Inv;delete a.ShiftRowTab_Inv;delete a.xtime};a.ExpandKey=function(b){var c=b.length,d,e=1;switch(c){case 16:d=176;break;case 24:d=208;break;case 32:d=240;break;default:alert("my.ExpandKey: Only key lengths of 16, 24 or 32 bytes allowed!")}for(var g=
|
||||
c;g<d;g+=4){var h=b.slice(g-4,g);if(g%c==0){if(h=[a.Sbox[h[1]]^e,a.Sbox[h[2]],a.Sbox[h[3]],a.Sbox[h[0]]],(e<<=1)>=256)e^=283}else c>24&&g%c==16&&(h=[a.Sbox[h[0]],a.Sbox[h[1]],a.Sbox[h[2]],a.Sbox[h[3]]]);for(var f=0;f<4;f++)b[g+f]=b[g+f-c]^h[f]}};a.Encrypt=function(b,c){var d=c.length;a.AddRoundKey(b,c.slice(0,16));for(var e=16;e<d-16;e+=16)a.SubBytes(b,a.Sbox),a.ShiftRows(b,a.ShiftRowTab),a.MixColumns(b),a.AddRoundKey(b,c.slice(e,e+16));a.SubBytes(b,a.Sbox);a.ShiftRows(b,a.ShiftRowTab);a.AddRoundKey(b,
|
||||
c.slice(e,d))};a.Decrypt=function(b,c){var d=c.length;a.AddRoundKey(b,c.slice(d-16,d));a.ShiftRows(b,a.ShiftRowTab_Inv);a.SubBytes(b,a.Sbox_Inv);for(d-=32;d>=16;d-=16)a.AddRoundKey(b,c.slice(d,d+16)),a.MixColumns_Inv(b),a.ShiftRows(b,a.ShiftRowTab_Inv),a.SubBytes(b,a.Sbox_Inv);a.AddRoundKey(b,c.slice(0,16))};a.SubBytes=function(a,c){for(var d=0;d<16;d++)a[d]=c[a[d]]};a.AddRoundKey=function(a,c){for(var d=0;d<16;d++)a[d]^=c[d]};a.ShiftRows=function(a,c){for(var d=[].concat(a),e=0;e<16;e++)a[e]=d[c[e]]};
|
||||
a.MixColumns=function(b){for(var c=0;c<16;c+=4){var d=b[c+0],e=b[c+1],g=b[c+2],h=b[c+3],f=d^e^g^h;b[c+0]^=f^a.xtime[d^e];b[c+1]^=f^a.xtime[e^g];b[c+2]^=f^a.xtime[g^h];b[c+3]^=f^a.xtime[h^d]}};a.MixColumns_Inv=function(b){for(var c=0;c<16;c+=4){var d=b[c+0],e=b[c+1],g=b[c+2],h=b[c+3],f=d^e^g^h,o=a.xtime[f],p=a.xtime[a.xtime[o^d^g]]^f;f^=a.xtime[a.xtime[o^e^h]];b[c+0]^=p^a.xtime[d^e];b[c+1]^=f^a.xtime[e^g];b[c+2]^=p^a.xtime[g^h];b[c+3]^=f^a.xtime[h^d]}};return a}(),cryptico=function(){var a={};aes.Init();
|
||||
a.b256to64=function(a){var c,d,e,g="",h=0,f=0,o=a.length;for(e=0;e<o;e++)d=a.charCodeAt(e),f==0?(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2&63),c=(d&3)<<4):f==1?(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c|d>>4&15),c=(d&15)<<2):f==2&&(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c|d>>6&3),h+=1,g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d&63)),h+=1,f+=1,f==3&&
|
||||
(f=0);f>0&&(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c),g+="=");f==1&&(g+="=");return g};a.b64to256=function(a){var c,d,e="",g=0,h=0,f=a.length;for(d=0;d<f;d++)c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(d)),c>=0&&(g&&(e+=String.fromCharCode(h|c>>6-g&255)),g=g+2&7,h=c<<g&255);return e};a.b16to64=function(a){var c,d,e="";a.length%2==1&&(a="0"+a);for(c=0;c+3<=a.length;c+=3)d=parseInt(a.substring(c,c+3),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>
|
||||
6)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d&63);c+1==a.length?(d=parseInt(a.substring(c,c+1),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d<<2)):c+2==a.length&&(d=parseInt(a.substring(c,c+2),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4));for(;(e.length&3)>0;)e+="=";return e};a.b64to16=function(a){var c="",
|
||||
d,e=0,g;for(d=0;d<a.length;++d){if(a.charAt(d)=="=")break;v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(d));v<0||(e==0?(c+=int2char(v>>2),g=v&3,e=1):e==1?(c+=int2char(g<<2|v>>4),g=v&15,e=2):e==2?(c+=int2char(g),c+=int2char(v>>2),g=v&3,e=3):(c+=int2char(g<<2|v>>4),c+=int2char(v&15),e=0))}e==1&&(c+=int2char(g<<2));return c};a.string2bytes=function(a){for(var c=[],d=0;d<a.length;d++)c.push(a.charCodeAt(d));return c};a.bytes2string=function(a){for(var c="",d=0;d<
|
||||
a.length;d++)c+=String.fromCharCode(a[d]);return c};a.blockXOR=function(a,c){for(var d=Array(16),e=0;e<16;e++)d[e]=a[e]^c[e];return d};a.blockIV=function(){var a=new SecureRandom,c=Array(16);a.nextBytes(c);return c};a.pad16=function(a){var c=a.slice(0),d=(16-a.length%16)%16;for(i=a.length;i<a.length+d;i++)c.push(0);return c};a.depad=function(a){for(a=a.slice(0);a[a.length-1]==0;)a=a.slice(0,a.length-1);return a};a.encryptAESCBC=function(b,c){var d=c.slice(0);aes.ExpandKey(d);for(var e=a.string2bytes(b),
|
||||
e=a.pad16(e),g=a.blockIV(),h=0;h<e.length/16;h++){var f=e.slice(h*16,h*16+16),o=g.slice(h*16,h*16+16),f=a.blockXOR(o,f);aes.Encrypt(f,d);g=g.concat(f)}d=a.bytes2string(g);return a.b256to64(d)};a.decryptAESCBC=function(b,c){var d=c.slice(0);aes.ExpandKey(d);for(var b=a.b64to256(b),e=a.string2bytes(b),g=[],h=1;h<e.length/16;h++){var f=e.slice(h*16,h*16+16),o=e.slice((h-1)*16,(h-1)*16+16);aes.Decrypt(f,d);f=a.blockXOR(o,f);g=g.concat(f)}g=a.depad(g);return a.bytes2string(g)};a.wrap60=function(a){for(var c=
|
||||
"",d=0;d<a.length;d++)d%60==0&&d!=0&&(c+="\n"),c+=a[d];return c};a.generateAESKey=function(){var a=Array(32);(new SecureRandom).nextBytes(a);return a};a.generateRSAKey=function(a,c){Math.seedrandom(sha256.hex(a));var d=new RSAKey;d.generate(c,"03");return d};a.publicKeyString=function(b){return pubkey=a.b16to64(b.n.toString(16))};a.publicKeyID=function(a){return MD5(a)};a.publicKeyFromString=function(b){var b=a.b64to16(b.split("|")[0]),c=new RSAKey;c.setPublic(b,"03");return c};a.encrypt=function(b,
|
||||
c,d){var e="",g=a.generateAESKey();try{var h=a.publicKeyFromString(c);e+=a.b16to64(h.encrypt(a.bytes2string(g)))+"?"}catch(f){return{status:"Invalid public key"}}d&&(signString=cryptico.b16to64(d.signString(b,"sha256")),b+="::52cee64bb3a38f6403386519a39ac91c::",b+=cryptico.publicKeyString(d),b+="::52cee64bb3a38f6403386519a39ac91c::",b+=signString);e+=a.encryptAESCBC(b,g);return{status:"success",cipher:e}};a.decrypt=function(b,c){var d=b.split("?"),e=c.decrypt(a.b64to16(d[0]));if(e==null)return{status:"failure"};
|
||||
e=a.string2bytes(e);d=a.decryptAESCBC(d[1],e).split("::52cee64bb3a38f6403386519a39ac91c::");if(d.length==3){var e=a.publicKeyFromString(d[1]),g=a.b64to16(d[2]);return e.verifyString(d[0],g)?{status:"success",plaintext:d[0],signature:"verified",publicKeyString:a.publicKeyString(e)}:{status:"success",plaintext:d[0],signature:"forged",publicKeyString:a.publicKeyString(e)}}else return{status:"success",plaintext:d[0],signature:"unsigned"}};return a}();
|
||||
130
src/cdn/functions.js
Normal file
130
src/cdn/functions.js
Normal file
@@ -0,0 +1,130 @@
|
||||
//SolaToken相关类
|
||||
window.SToken = {
|
||||
//可以设置的当check完成的回调函数
|
||||
//'checkCallback':function(data,param)
|
||||
//如果下面这个回调函数存在,验证失败的时候将会调用这个回调函数而不是跳转到result页面
|
||||
//'checkBadCallback':function()
|
||||
'opera' : 0,
|
||||
//初始化SolaToken类,并且验证SolaToken
|
||||
'init' : function(token,inputId){
|
||||
var queryURL = '/*@echo URL_SOLA_CHECK_TOKEN */?more=1&token='+token+'&';
|
||||
NMFunc.reqServer(queryURL, SToken.checkDone , 0, SToken.solaDisappear);
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
if(!token)
|
||||
return NMFunc.result('','');
|
||||
var v = NMFunc.e(inputId);
|
||||
v && (v.value = token);
|
||||
},
|
||||
//当SolaToken验证请求完成的时候的回调函数
|
||||
'checkDone':function(data,param){
|
||||
if(data && !data.errCode){
|
||||
console.log('SToken验证通过!(权限:' + data.authorized + ')');
|
||||
//加载延迟加载的脚本
|
||||
!window.NMloadLazyJs || window.NMloadLazyJs();
|
||||
//执行回调函数
|
||||
!SToken.checkCallback || SToken.checkCallback(data,param);
|
||||
}else{
|
||||
SToken.checkBadCallback ? SToken.checkBadCallback :
|
||||
NMFunc.result(SToken.opera,0,'/*@echo MSG_BAD_TOKEN*/');
|
||||
}
|
||||
},
|
||||
//Sola服务器通信不上的时候调用的函数
|
||||
'solaDisappear':function() {
|
||||
NMFunc.result(SToken.opera,0,'/*@echo MSG_BAD_SOLA*/');
|
||||
}
|
||||
};
|
||||
//网维在线页面函数集
|
||||
window.NMFunc = {
|
||||
/**
|
||||
* GetElementById
|
||||
*/
|
||||
e :function(vid){return document.getElementById(vid);},
|
||||
|
||||
/**
|
||||
* 跳转到Result页面
|
||||
* @param {Number} op 操作
|
||||
* @param {Number} type 类型
|
||||
* @param {String} msg (可选)消息
|
||||
*
|
||||
*/
|
||||
result : function(op,type,msg){
|
||||
window.location.href = '/*@echo URL_RESULT*/?op='+op+'&type='+type+
|
||||
(msg?('&msg='+encodeURIComponent(msg)):'');
|
||||
},
|
||||
|
||||
/**
|
||||
* 携带Token跳转页面路由(管理页面)
|
||||
*/
|
||||
route : function(url){
|
||||
window.location.href
|
||||
= (url.indexOf('?')>0?url:(url+'?'))+'&token='+NMFunc.e('token').value;
|
||||
},
|
||||
/**
|
||||
* 关闭页面
|
||||
*/
|
||||
closePage : function(){
|
||||
window.WeixinJSBridge ? WeixinJSBridge.call('closeWindow') : window.close();
|
||||
},
|
||||
/**
|
||||
* 获得URL中的参数
|
||||
*/
|
||||
getURLParam : function(name,def){
|
||||
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if(r!=null)return decodeURIComponent(r[2]);return def;
|
||||
},
|
||||
/**
|
||||
* 向服务器发送一个HTTP GET请求返回JSON
|
||||
* XXX 原来的 jsonp2S 函数
|
||||
*/
|
||||
reqServer : function(url, callback, moreData, errCallback){
|
||||
var http = new XMLHttpRequest();
|
||||
http.open("get", url + '&t=' + new Date().getMilliseconds() , true);
|
||||
errCallback && (http.onerror = errCallback);
|
||||
http.onreadystatechange = function(){
|
||||
if(http.readyState != 4)
|
||||
return ;
|
||||
if(http.status == 200){
|
||||
var retDat = {};
|
||||
try{
|
||||
retDat = JSON.parse(http.responseText);
|
||||
}catch(e){
|
||||
console.warn('reqServer:服务器端传回的信息不能被转换成JSON对象', retDat);
|
||||
}
|
||||
callback && callback(retDat, moreData);
|
||||
}else{
|
||||
errCallback && errCallback();
|
||||
}
|
||||
};
|
||||
http.send();
|
||||
},
|
||||
/**
|
||||
* 当微信浏览器加载完成
|
||||
*/
|
||||
onWechat : function(){
|
||||
WeixinJSBridge.invoke('hideOptionMenu',{},function(res){/*res.err_msg*/});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* 微信安全要求
|
||||
*/
|
||||
//1.判断UA,如果允许电脑访问设置window.allowDesktop为一个对象
|
||||
var ua = navigator.userAgent;
|
||||
//ret表示是否允许电脑
|
||||
!function(ret){
|
||||
//无法获得UA
|
||||
if(!ua)
|
||||
return ret || NMFunc.result('',88);
|
||||
ua = ua.toLocaleLowerCase();
|
||||
if(ua.indexOf('micromessenger')==-1 && ua.indexOf('windows phone')==-1)
|
||||
return ret || NMFunc.result('',88);
|
||||
SToken.isWechat = true;
|
||||
}(window.allowDesktop);
|
||||
|
||||
|
||||
//2.关闭微信的菜单
|
||||
window.WeixinJSBridge ? NMFunc.onWechat() : document.addEventListener("WeixinJSBridgeReady", NMFunc.onWechat, false);
|
||||
|
||||
SToken.ini
|
||||
1
src/cdn/lyTableAll.min.js
vendored
Normal file
1
src/cdn/lyTableAll.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
$.fn.lyTable=function(){headName=[];headLength=0;this.find("thead th").each(function(a){headName[headLength++]=$(this).text()});this.find("tbody tr").each(function(a){$(this).children("td").each(function(b){$(this).attr("data-lytb",headName[b])})})};$.fn.tableFill=function(b,c,a){html="<thead>";for(i=0;i<b.length;i++){html+="<th></th>"}html+="</thead><tbody>";for(i=0;i<c;i++){html+="<tr>";for(j=0;j<b.length;j++){html+="<td></td>"}html+="</tr>"}html+="</tbody>";this.html(html).find("thead th").html(function(d){return b[d]});this.find("tbody td").html(function(d){c=parseInt(d/b.length);col=d%b.length;return a(c,col,b[col])})};
|
||||
38
src/cdn/lytable.min.css
vendored
Normal file
38
src/cdn/lytable.min.css
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
.table{
|
||||
margin:5px;
|
||||
border:1px solid #d3d3d3;
|
||||
background:#fefefe;
|
||||
font-weight: normal;
|
||||
text-align:center;
|
||||
border-collapse:collapse;
|
||||
border-spacing:0;
|
||||
}
|
||||
.table th,.table td{padding:7px 15px 7px 15px;}
|
||||
.table th{background-color: #BDC3C7;}
|
||||
.table td{border-left:thin solid #d3d3d3;}
|
||||
.table td:first-child,.table th:first-child{text-align:left;border-left: none;padding-left: 20px;}
|
||||
.table tr:nth-child(2n){background:#f6f6f6;}
|
||||
.table tr:hover{background-color: #FBFDFB;}
|
||||
.table td:before{content: attr(data-what);}
|
||||
|
||||
@media screen and (max-width: 500px) {/*767px*/
|
||||
.table thead{display: none;}
|
||||
.table td:before{
|
||||
content: attr(data-lytb);
|
||||
position: absolute;
|
||||
top: 6px; left: 6px; width: 35%;
|
||||
font-weight: bold;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.table td,
|
||||
.table td:first-child{
|
||||
text-align: left;
|
||||
display: block;
|
||||
position: relative;
|
||||
padding-left: 40%;
|
||||
border-left: none;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.table tbody tr td:last-child{border-bottom: thin solid black;}
|
||||
.table tbody tr:last-child td:last-child{border-bottom: none;}
|
||||
}
|
||||
1
src/cdn/mycomponent.min.js
vendored
Normal file
1
src/cdn/mycomponent.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
eval("MCC=à(){à cr(e,t){if(â){är=sf.ch+e;á void 0===t?â.getItem(r):t.length<sf._cLimit&&â.setItem(r,t)}}à _tag(e){ät=document.createElement(e);á t}à gE(e){á e.container=sf.na,e.com||(e.com=nC[0]),e}à sH(e,t){\"string\"==typeof e&&(e={url:e}),H.open(e.method||\"GET\",(sf.pF||\"\")+e.url,t);for(är in e.head)H.setRequestHeader(r,e.head[r]);H.send(e.data)}à hC(ct){if(\"object\"==typeof nC[3]){äparam=nC[3];ct=ct.replace(rP,à(m,key){try{á eval(key)}catch(e){á\"\"}})}á ct}à iC(ct,F){äT=nC[2];if(!(4&T)&&!F&&cr(nC[0],ct),!(1&T)){ct=hC(ct);äerr;if(T>7)if(32&T)try{eval(ct)}catch(err){console.error(err)}else{ädom=_tag(8&T?\"style\":\"script\");dom.text=ct,sf._doc.appendChild(dom)}else sf._doc.innerHTML+=ct;ll&&ll(gE(err?{error:err}:{cache:F}))}}à l(e){for(ät;nC=(e?C:c).shift();){är=nC[2];if(sf.li||4&r||!(t=cr(nC[0]))){if(4&r&&(16&r||8&r)){än=_tag(8&r?\"link\":\"script\");á n.rel=8&r?\"stylesheet\":void 0,n.src=n.href=nC[1],n.õn.onload=_onLoad,n.cT=r,n.cN=nC[0],sf._doc.appendChild(n)}if(sH(nC[1],!1),e)á}else iC(t,1)}}à _onLoad(){if(ã.ý){if(ã.ieload||\"loaded\"!=ã.ý&&\"complete\"!=ã.ý)á;ã.ieload=1}ll&&ll(gE({com:ã.cN})),l(2&ã.cT)}ã.ch=\"MC_\";äsf=ã,rP=/\\{\\{(param\\.[\\w\\.]+)\\}\\}/gi,c=[],C=[],ll,nC,H=new XMLHttpRequest;H.onerror=à(e){ll&&ll(gE({error:e}))},H.õà(){if(4==H.ý){äe=H.status;if(200!=e&&304!=e)á H.onerror(e);iC(H.responseText,0),2&nC[2]&&l(1)}},ã.dumpQueue=à(e){á e?C:c},ã.add=à(e){for(ät in e)(2&e[t][2]?C:c).push(e[t]);á ã},ã.listen=à(e){á ll=e,ã},ã.lazy=à(e){á e?MC.a(ã,e):l(1),ã},ã.load=à(e){á l(0),e&&l(1),ã}},MC={create:à(e,t){är=document.querySelector(e);if(!r)á!1;t||(t={}),(void 0===t.clean||t.clean)&&(r.innerHTML=\"\");än=new MCC;á n._doc=r,n._cLimit=t.cacheLimit||1e5,n.pF=t.urlPrefix||\"\",n.li=t.live||!1,n.na=t.name||e,n},clearCache:à(){äe=new MCC,t=e.ch,r=[];for(än in â)0===n.indexOf(t)&&r.push(n);for(äo in r)â.removeItem(r[o])},_q:[],a:à(e,t){setTimeout(\"MC.b(\"+(ã._q.push(e)-1)+\")\",t)},b:à(e){ã._q[e].lazy(),delete ã._q[e]},NOW:0,LAZY:2,PRE:3,ONCE:4,HTML:0,CSS:8,JS:16,EVAL:24};".replace(/à/g,"function").replace(/á/g,"return").replace(/â/g,"localStorage").replace(/ã/g,"this").replace(/ä/g,"var ").replace(/ý/g,"readyState").replace(/õ/g,"onreadystatechange="));
|
||||
125
src/cdn/userfield.js
Normal file
125
src/cdn/userfield.js
Normal file
@@ -0,0 +1,125 @@
|
||||
//UserField
|
||||
window.userf = {
|
||||
'blockID' :[],
|
||||
'ispID' :[],
|
||||
'statID' :[],
|
||||
'statHTMLID':[],
|
||||
'insertStyle':
|
||||
'/*给状态码上色的样式*/'+
|
||||
'.stat_done{color: #5CB85C;}'+
|
||||
'.stat_wait{color: #D9534F;}'+
|
||||
'.stat_warn{color: #F0AD4E;}'+
|
||||
'.stat_wait_again{color: #5BC0DE;}',
|
||||
'defStatHTML':'<span class="stat_warn">未知状况</span>',
|
||||
'defStat' :'未知状态:',
|
||||
'defIsp' :'其他',
|
||||
'defBlock' :'',
|
||||
'getAllInfo':function(block,room,isp){
|
||||
return this.getBlock(block)+'-'+
|
||||
(room || '' )+'('+this.getIsp(isp)+')';
|
||||
},
|
||||
'getBlock':function(block){
|
||||
block = this.blockID[block];
|
||||
return block || this.defBlock;
|
||||
},
|
||||
'getIsp':function(isp){
|
||||
isp = this.ispID[isp];
|
||||
return isp || this.defIsp;
|
||||
},
|
||||
'getDate':function(milliseconds){
|
||||
var d = new Date(milliseconds);
|
||||
return this._22(d.getFullYear() % 100)+'年'
|
||||
+this._22(d.getMonth()+1)+'月'
|
||||
+this._22(d.getDate())+'日 '
|
||||
+this._22(d.getHours())+':'
|
||||
+this._22(d.getMinutes());
|
||||
},
|
||||
'_22':function(str){
|
||||
str='000'+str;
|
||||
return str.slice(-2,str.length)
|
||||
},
|
||||
'getStat':function(stat){
|
||||
return this.statID[stat] || this.defStat;
|
||||
},
|
||||
'getStatHTML':function(stat){
|
||||
return this.statHTMLID[stat] || this.defStatHTML;
|
||||
},
|
||||
'getDesc':function(desc,nl){
|
||||
desc = desc.replace(/</g,'<').replace(/>/g,'>');
|
||||
if(nl)desc = desc.replace(/\n/g,'<br />')
|
||||
return desc;
|
||||
},
|
||||
'init' :function(){
|
||||
var ss = document.createElement("style");
|
||||
ss.appendChild(document.createTextNode(this.insertStyle));
|
||||
document.getElementsByTagName('body')[0].appendChild(ss);
|
||||
|
||||
var t = this.statID;//tmp use
|
||||
|
||||
t[0] = '待解决';
|
||||
t[4] = '已上报';
|
||||
t[2] = '改日修';
|
||||
t[9] = '已解决';
|
||||
|
||||
t = this.statHTMLID;
|
||||
|
||||
t[0] = '<span class="stat_wait">待解决</span>';
|
||||
t[4] = '<span class="stat_done">已上报</span>';
|
||||
t[2] = '<span class="stat_wait_again">改日修</span>';
|
||||
t[9] = '<span class="stat_done">已解决</span>';
|
||||
|
||||
t = this.ispID;
|
||||
|
||||
t[1] = '电信';
|
||||
t[2] = '联通';
|
||||
t[3] = '移动';
|
||||
|
||||
t = this.blockID;
|
||||
|
||||
t[10] = '18栋';
|
||||
t[11] = '19栋';
|
||||
t[12] = '16栋';
|
||||
t[13] = '17栋';
|
||||
|
||||
t[20] = '7栋';
|
||||
t[21] = '8栋';
|
||||
t[22] = '9栋';
|
||||
t[23] = '10栋';
|
||||
t[24] = '11栋';
|
||||
|
||||
t[30] = '12栋';
|
||||
t[31] = '13栋';
|
||||
t[32] = '14栋';
|
||||
t[33] = '15栋';
|
||||
t[34] = '20栋';
|
||||
t[35] = '21栋';
|
||||
t[36] = '22栋A';
|
||||
t[37] = '22栋B';
|
||||
|
||||
t[40] = '香晖苑A';
|
||||
t[41] = '香晖苑B';
|
||||
t[42] = '香晖苑C';
|
||||
t[43] = '香晖苑D';
|
||||
|
||||
t[50] = '1栋';
|
||||
t[51] = '2栋';
|
||||
t[52] = '3栋';
|
||||
t[53] = '4栋';
|
||||
t[54] = '5栋';
|
||||
t[55] = '6栋';
|
||||
|
||||
t[60] = '别墅1栋';
|
||||
t[61] = '别墅2栋';
|
||||
t[62] = '别墅3栋';
|
||||
t[63] = '别墅4栋';
|
||||
t[64] = '别墅5栋';
|
||||
t[65] = '别墅6栋';
|
||||
t[66] = '别墅7栋';
|
||||
t[67] = '别墅8栋';
|
||||
t[68] = '别墅9栋';
|
||||
|
||||
t[80] = '朝晖苑';
|
||||
|
||||
},
|
||||
};
|
||||
userf.init();
|
||||
1
src/cdn/weui.min.css
vendored
Normal file
1
src/cdn/weui.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2
src/cdn/zepto.min.js
vendored
Normal file
2
src/cdn/zepto.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
src/egg/doge.css
Normal file
7
src/egg/doge.css
Normal file
@@ -0,0 +1,7 @@
|
||||
.doge{width: 80px;position: absolute;z-index: 1000;top: -100px;
|
||||
border-radius: 80px;
|
||||
animation: dogee 2000ms cubic-bezier(1, 1, 0, 0);
|
||||
-webkit-animation: dogee 2000ms cubic-bezier(1, 1, 0, 0);
|
||||
}
|
||||
@keyframes dogee{0%{top: 10px;}100%{top: 800px;}}
|
||||
@-webkit-keyframes dogee{0%{top: 10px;}100%{top: 800px;}}
|
||||
BIN
src/egg/doge.jpg
Normal file
BIN
src/egg/doge.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 176 KiB |
15
src/egg/doge.js
Normal file
15
src/egg/doge.js
Normal file
@@ -0,0 +1,15 @@
|
||||
doge();
|
||||
function doge(){
|
||||
window.egg_dogei=0;
|
||||
for(var i=1;i<=7;i++)
|
||||
setTimeout(dogee,i*200);
|
||||
}
|
||||
function dogee(){
|
||||
var sI = document.createElement("img");
|
||||
var bd = document.getElementsByTagName('body')[0];
|
||||
sI.src = '../egg/doge.jpg';
|
||||
sI.setAttribute('style','left:'+(10+egg_dogei*60)+'px;');
|
||||
sI.className='doge';
|
||||
egg_dogei++;
|
||||
bd.appendChild(sI);
|
||||
}
|
||||
BIN
src/egg/tail.gif
Normal file
BIN
src/egg/tail.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 145 KiB |
51
src/fbi.html
Normal file
51
src/fbi.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>無修正オリジナル徹底凌辱動画</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="title">FBI Warning</div>
|
||||
<div class="text">
|
||||
Federal law provides severe civil and criminal penalties for the unauthorized reproduction,
|
||||
distribution,or exhibition of copyrighted motion prictures
|
||||
(Title 17, United States Code, Sections 501 and 508).
|
||||
The federal bureau of Investigation investigate allegations of criminal copyright infringement.
|
||||
<br />(Title 17, United States Code, Section 506)
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
html,body{
|
||||
background-color: black;
|
||||
font-family: Arial,"Microsoft Yahei","微软雅黑",Tahoma,Helvetica,STHeiti,"Hiragino Sans GB";
|
||||
}
|
||||
.container{
|
||||
width: 80%;
|
||||
max-width: 800px;
|
||||
margin: 100px auto 0 auto;
|
||||
text-align: center;
|
||||
color: white;
|
||||
}
|
||||
.title{
|
||||
background-color: darkred;
|
||||
font-size: 2.5em;
|
||||
text-transform: uppercase;
|
||||
padding: 10px;
|
||||
width: 7em;
|
||||
margin: 0 auto 30px auto;
|
||||
}
|
||||
.text{
|
||||
font-size: 1.6em;
|
||||
}
|
||||
@media screen and (max-width: 767px) {
|
||||
.container{
|
||||
width: 95%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
53
src/index.html
Normal file
53
src/index.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<!-- @extend part/wrap/head.part.html -->中山学院网络维护科<!-- @endextend -->
|
||||
|
||||
<!-- head内容(title之后的内容) -->
|
||||
|
||||
<base href="<!-- @echo VERSION -->/cdn" />
|
||||
<!-- @include part/common_head_style.part.html -->
|
||||
|
||||
|
||||
<!-- @extend part/wrap/headbody.part.html -->
|
||||
<!-- Body最开头的内容 -->
|
||||
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @extend part/wrap/body_head.part.html -->
|
||||
报修平台管理
|
||||
<!-- @endextend -->
|
||||
<!-- @extend part/wrap/body_desc.part.html -->
|
||||
中山学院网络维护科在线保修平台
|
||||
<!-- @endextend -->
|
||||
|
||||
<div style="text-align: center;">
|
||||
<h1>制作者</h1>
|
||||
<a href="http://weibo.com/chinavl">
|
||||
<img class="ava" title="帅到显示不出来了" src="https://raw.githubusercontent.com/hangxingliu/zsxynmly/master/res/ava/ly.jpg"></img>
|
||||
<br />
|
||||
<p class="ava_name">刘越</p>
|
||||
<p class="work_type">前端开发</p>
|
||||
</a>
|
||||
<br />
|
||||
<a href="http://weibo.com/soladev">
|
||||
<img class="ava" title="帅到显示不出来了" src="https://raw.githubusercontent.com/hangxingliu/zsxynmly/master/res/ava/sola.jpg"></img>
|
||||
<br />
|
||||
<p class="ava_name" >Sola</p>
|
||||
<p class="work_type"><b>奇怪的</b>后端开发</p>
|
||||
</a>
|
||||
<br />
|
||||
<a>
|
||||
<img class="ava" title="帅到显示不出来了" src="https://raw.githubusercontent.com/hangxingliu/zsxynmly/master/res/ava/lunzi.jpg"></img>
|
||||
<br />
|
||||
<p class="ava_name" >轮子</p>
|
||||
<p class="work_type">文案指南</p>
|
||||
</a>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
h1{color: #31708f;font-weight: 100;font-family: "microsoft yahei";margin-bottom: 1em;}
|
||||
.ava{width: 150px;height: 150px;border-radius: 150px;}
|
||||
.ava_name{color: #555;font-size: 1.6em;font-family: "microsoft yahei";}
|
||||
.work_type{color: #888;font-size: 1em;}
|
||||
</style>
|
||||
|
||||
<!-- @extend part/wrap/tail.part.html -->
|
||||
<!-- body尾部的脚本-->
|
||||
<!-- @endextend -->
|
||||
39
src/man/add.html
Normal file
39
src/man/add.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!-- @extend ../part/wrap/head.part.html -->添加报修<!-- @endextend -->
|
||||
|
||||
<!-- @include ../part/common_js_loader.part.html -->
|
||||
<script>
|
||||
//加载基本函数库,并且验证微信
|
||||
window.allowDesktop = {};
|
||||
NMJsLoader('../cdn/functions.js', 'functions');
|
||||
</script>
|
||||
|
||||
<!-- @include ../part/common_head_style.part.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/headbody_man.part.html -->
|
||||
<!--Body最开头的内容-->
|
||||
<div id="err_tip" class="weui_toptips weui_warn">你就不能好一点输入吗?</div>
|
||||
|
||||
<!-- @include part/add/toast_loading.part.html -->
|
||||
<!-- @include part/add/dlg_fail.part.html -->
|
||||
<!-- @include part/add/actionsheet_isp.part.html -->
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @extend ../part/wrap/body_head.part.html --><span id="text_title">添加报修</span><!-- @endextend -->
|
||||
<!-- @extend ../part/wrap/body_desc.part.html --><span id="text_brief">手动添加工单/报修到保修系统</span><!-- @endextend -->
|
||||
|
||||
<!-- 表单开始 -->
|
||||
<input type="hidden" id="token" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
|
||||
|
||||
<!-- @include part/add/body.part.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/tail.part.html -->
|
||||
<script>
|
||||
window.NMLazyJs = [
|
||||
['zepto', '../cdn/zepto.min.js'],
|
||||
['userfield', '../cdn/userfield.js'],
|
||||
['lytable','../cdn/lyTableAll.min.js'],
|
||||
['man_add','js/add.js'],
|
||||
];
|
||||
</script>
|
||||
<!-- @include ../part/man_tail_script.part.html -->
|
||||
<!-- @endextend -->
|
||||
94
src/man/css/log.sub.css
Normal file
94
src/man/css/log.sub.css
Normal file
@@ -0,0 +1,94 @@
|
||||
.point {
|
||||
width: .7em;
|
||||
height: .7em;
|
||||
border-radius: .7em;
|
||||
margin: .2em .5em;
|
||||
}
|
||||
|
||||
.p_fg {
|
||||
z-index: 200;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p_bg {
|
||||
z-index: 99;
|
||||
position: absolute;
|
||||
left: 1.75em;
|
||||
width: 1px;
|
||||
height: 0;
|
||||
background-color: #aaa;
|
||||
}
|
||||
|
||||
.p_del {
|
||||
background-color: #ebccd1;
|
||||
}
|
||||
|
||||
|
||||
/*红*/
|
||||
|
||||
.p_done {
|
||||
background-color: #d6e9c6;
|
||||
}
|
||||
|
||||
|
||||
/*绿*/
|
||||
|
||||
.p_continue {
|
||||
background-color: #faebcc;
|
||||
}
|
||||
|
||||
|
||||
/*黄*/
|
||||
|
||||
.p_start {
|
||||
background-color: #bce8f1;
|
||||
}
|
||||
|
||||
|
||||
/*蓝*/
|
||||
|
||||
.yahei {
|
||||
font-family: "microsoft yahei";
|
||||
}
|
||||
|
||||
.ti_id {
|
||||
color: #16A085;
|
||||
font-size: 1.3em;
|
||||
margin-right: .3em;
|
||||
}
|
||||
|
||||
.ti_name {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.ti_status {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.ti_remark {
|
||||
font-size: .9em;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.ti_time {
|
||||
text-align: right;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.ti_user {
|
||||
font-size: .9em;
|
||||
color: #6D8DBF;
|
||||
}
|
||||
|
||||
.ti_desc {
|
||||
border-bottom: thin solid #D0D4D5;
|
||||
font-size: .9em;
|
||||
color: #6DBF72;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
.ti_time {
|
||||
text-align: right;
|
||||
font-size: .8em;
|
||||
}
|
||||
}
|
||||
66
src/man/css/track.sub.css
Normal file
66
src/man/css/track.sub.css
Normal file
@@ -0,0 +1,66 @@
|
||||
.point {
|
||||
width: .7em;
|
||||
height: .7em;
|
||||
border-radius: .7em;
|
||||
margin: .2em .5em;
|
||||
}
|
||||
|
||||
.p_fg {
|
||||
z-index: 200;
|
||||
position: relative;
|
||||
border-bottom: thin solid #ddd;
|
||||
}
|
||||
|
||||
.p_bg {
|
||||
z-index: 99;
|
||||
position: absolute;
|
||||
left: 1.75em;
|
||||
width: 1px;
|
||||
height: 0;
|
||||
background-color: #aaa;
|
||||
}
|
||||
|
||||
.p_del {
|
||||
background-color: #ebccd1;
|
||||
}
|
||||
|
||||
|
||||
/*红*/
|
||||
|
||||
.p_done {
|
||||
background-color: #d6e9c6;
|
||||
}
|
||||
|
||||
|
||||
/*绿*/
|
||||
|
||||
.p_continue {
|
||||
background-color: #faebcc;
|
||||
}
|
||||
|
||||
|
||||
/*黄*/
|
||||
|
||||
.p_start {
|
||||
background-color: #bce8f1;
|
||||
}
|
||||
|
||||
|
||||
/*蓝*/
|
||||
|
||||
.ti_name {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.ti_status {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.ti_remark {
|
||||
font-size: .8em;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.ti_time {
|
||||
text-align: right;
|
||||
}
|
||||
36
src/man/home.html
Normal file
36
src/man/home.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<!-- @extend ../part/wrap/head.part.html -->网维后台
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @include ../part/common_js_loader.part.html -->
|
||||
<script>
|
||||
//加载基本函数库,并且验证微信
|
||||
window.allowDesktop = {};
|
||||
NMJsLoader('../cdn/functions.js', 'functions');
|
||||
//放在前面加载是因为需要在SolaToken验证之前去绑定验证完成的回调函数去显示具有指定权限的用户显示的内容
|
||||
NMJsLoader('js/home.js', 'man_main');
|
||||
</script>
|
||||
|
||||
<!-- @include ../part/common_head_style.part.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/headbody.part.html -->
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @extend ../part/wrap/body_head.part.html -->后台管理
|
||||
<!-- @endextend -->
|
||||
<!-- @extend ../part/wrap/body_desc.part.html -->
|
||||
<span id="homeDescTxt" style="color: #D33131;">报修千万条,安全第一条<br>修网不规范,用户泪两行</br></span>
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- 表单开始 -->
|
||||
<input type="hidden" id="token" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
|
||||
|
||||
<!-- @include part/home/body.part.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/tail.part.html -->
|
||||
<script>
|
||||
window.NMLazyJs = [
|
||||
['zepto', '../cdn/zepto.min.js'],
|
||||
];
|
||||
</script>
|
||||
<!-- @include ../part/man_tail_script.part.html -->
|
||||
<!-- @endextend -->
|
||||
126
src/man/js/add.js
Normal file
126
src/man/js/add.js
Normal file
@@ -0,0 +1,126 @@
|
||||
text_sid = $('#sid');
|
||||
text_name= $('#name');
|
||||
cell_sid = $('#cell_sid');
|
||||
|
||||
/*
|
||||
* 目前有没有有效的SID
|
||||
*/
|
||||
sid_ok = false;
|
||||
|
||||
$('#btn_subtmit').click(function(){
|
||||
var oriDesc = $('#text_ori_desc').val().trim();
|
||||
if(!sid_ok)
|
||||
return onFormError('请指定一个有效的学号','xxx','xxx'),false;
|
||||
if(!oriDesc.length)
|
||||
return onFormError('请填写一下故障简述吧','cell_dec','textarea'),false;
|
||||
if(oriDesc.length >=255)
|
||||
return onFormError('请你简述一下就好了,不需要太长的哦','cell_dec','textarea'),false;
|
||||
var desc = '',tmp;
|
||||
if((tmp = $('#text_date').val()).length)
|
||||
desc += '发生时间: '+tmp+'\n';
|
||||
if((tmp = $('#text_code').val()).length)
|
||||
desc += '故障代码: '+tmp+'\n';
|
||||
desc += '故障简述: '+$('#text_ori_desc').val().trim();
|
||||
$('#desc').val(desc);
|
||||
$('#loadingToast').show();
|
||||
var u = '/*@echo URL_SOLA_TICKET_PUSH*/?uid='+text_sid.val()+'&desc='+encodeURIComponent(desc)+'&token='+$('#token').val()+'&';
|
||||
NMFunc.reqServer(u, add_onSubmit, 0, solaDisappear);
|
||||
return true;
|
||||
});
|
||||
/*
|
||||
* --------------------------已经提交----------------------
|
||||
*/
|
||||
//XXX window.crcw 当结果弹窗关闭时关闭窗口
|
||||
add_onSubmit = function(data,param){
|
||||
window.crcw = false;
|
||||
$('#failDlg').hide();
|
||||
$('#toast_loading').hide();
|
||||
if(!data.errCode)
|
||||
return NMFunc.result(2,1);
|
||||
data.errCode == -20 && (window.crcw = true);
|
||||
$('#failDlg p').text(data.errMsg || 'Sola居然不说是什么错误...');
|
||||
$('#failDlg').show();
|
||||
}
|
||||
|
||||
//Sola消失了
|
||||
function solaDisappear(){
|
||||
$('#toast_loading').hide();
|
||||
$('#failDlg p').text('Sola端出问题了,无法回应你的报修请求');
|
||||
$('#failDlg').show();
|
||||
}
|
||||
|
||||
/*
|
||||
* 校检用户存在性,并显示用户名
|
||||
*/
|
||||
add_checkUser = function(){
|
||||
var sid = $('#sid').val();
|
||||
var url='/*@echo URL_SOLA_GET_USER*/?id=' + sid + '&token=' + $('#token').val() + '&';
|
||||
$('#toast_loading').show();
|
||||
sid_ok = false;
|
||||
NMFunc.reqServer(url, add_checkUserDone, 0, checkBadNet);
|
||||
}
|
||||
/*
|
||||
* 检测用户存在性完成
|
||||
*/
|
||||
add_checkUserDone = function(data,p){
|
||||
$('#toast_loading').hide();
|
||||
if(data.errCode == -20)
|
||||
return NMFunc.result(10,0,data.errMsg);
|
||||
if(data.errCode) {
|
||||
cell_sid.addClass('weui_cell_warn');
|
||||
onFormError('学号不存在','sid','input');
|
||||
} else {
|
||||
sid_ok = true;
|
||||
text_sid.removeClass('weui_cell_warn');
|
||||
cell_sid.removeClass('weui_cell_warn');
|
||||
}
|
||||
$('#name').val(data.name || '学号不存在');
|
||||
}
|
||||
|
||||
//Sola消失了
|
||||
function checkBadNet(){
|
||||
$('#toast_loading').hide();
|
||||
$('#name').val('查询出错');
|
||||
}
|
||||
|
||||
/*
|
||||
* 选择运营商工单号码的ActionSheet的动作
|
||||
*/
|
||||
as_bd = $('#as_body');
|
||||
as_mask = $('#as_mask');
|
||||
as_all = $('#as_all');
|
||||
/**
|
||||
* 当点击了弹出AS的按钮的事件:弹出AS
|
||||
*/
|
||||
add_openAS = function(){
|
||||
as_all.removeClass('hide');as_mask.show().addClass('weui_fade_toggle');
|
||||
as_bd.show().addClass('weui_actionsheet_toggle');
|
||||
}
|
||||
add_onASClick = function(sid,t){
|
||||
text_sid.val(sid);
|
||||
text_name.val(t.innerHTML.replace('工单','').replace('片区',''));
|
||||
|
||||
text_sid.removeClass('weui_cell_warn');
|
||||
cell_sid.removeClass('weui_cell_warn');
|
||||
|
||||
sid_ok = true;
|
||||
add_hideAS();
|
||||
}
|
||||
add_hideAS = function() {
|
||||
as_bd.removeClass('weui_actionsheet_toggle');as_mask.removeClass('weui_fade_toggle');
|
||||
setTimeout('as_bd.hide();as_mask.hide();as_all.addClass("hide");',300);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* XXX 可重用表单错误处理机制
|
||||
*/
|
||||
function onFormError(errMsg,cellId,inputTag){
|
||||
inputTag = inputTag || 'input';
|
||||
$('#err_tip').text(errMsg).show();
|
||||
setTimeout(error_hide,2500);
|
||||
$('#'+cellId).addClass('weui_cell_warn')
|
||||
.find(inputTag).unbind('focus').focusout(onError_focus).focus();
|
||||
}
|
||||
function onError_focus(){$(this).parents('.weui_cell').removeClass('weui_cell_warn');}
|
||||
function error_hide(){$('#err_tip').hide();}
|
||||
21
src/man/js/home.js
Normal file
21
src/man/js/home.js
Normal file
@@ -0,0 +1,21 @@
|
||||
if (Math.random() > 0.93) {
|
||||
var easterEgg = document.getElementById('homeDescTxt');
|
||||
if (easterEgg) { easterEgg.innerHTML = '😜 报修单多吗? 加油!'; }
|
||||
}
|
||||
|
||||
SToken.opera = 10;
|
||||
//显示权限足够显示的项目
|
||||
SToken.checkCallback = function(data,param){
|
||||
//data && data.operator 如果没有,直接结束
|
||||
var opta = data.operator.access,p = '[data-permit=',e = 'es[i].className';
|
||||
//对指定的CSS筛选语句出来的DOM元素数组进行批量显示操作
|
||||
var show = function(q){
|
||||
var es = document.querySelectorAll(q);
|
||||
eval('for(var i=0;i<es.length;i++)'+e+'='+e+'.replace("hide","");');
|
||||
}
|
||||
//显示各个权限能看的操作
|
||||
opta > 3 || show(p+'KTM]');
|
||||
opta > 6 || show(p+'PKA]');
|
||||
show(p+'LBN]');
|
||||
data.operator.id == 1514 && confirm('老司机,准备开车了.B~B~B~');
|
||||
}
|
||||
182
src/man/js/list.js
Normal file
182
src/man/js/list.js
Normal file
@@ -0,0 +1,182 @@
|
||||
(function(){
|
||||
//暴露this给私有方法
|
||||
var self = this;
|
||||
|
||||
//获取查询范围
|
||||
listStat = NMFunc.getURLParam('stat');
|
||||
//查询当日,修正显示
|
||||
var isToday = listStat == 'today';
|
||||
updateHead(isToday && '今日待修',
|
||||
isToday ? '开动吧,少年.今日的主线任务等着你 <( ̄︶ ̄)/' : '查看报修记录');
|
||||
|
||||
// 表格需要显示的列
|
||||
list_tbHead = ['状态', '联系方式', '信息', '报修时间', '简述'];
|
||||
|
||||
/*对话框,消息,Toast配置管理*/
|
||||
dlg_q = $('#dlg_q');
|
||||
dlg_op = $('#dlg_op');
|
||||
msg_q_err = $('#msg_q_error');
|
||||
toast_loading = $('#toast_loading');
|
||||
|
||||
/*查询对话框功能*/
|
||||
$('#btn_open_qdlg').click(function () {
|
||||
dlg_q.show();
|
||||
});
|
||||
$('#btn_query').click(function () {
|
||||
if(new Date().getTime() - (window.fuckios || 0) < 500)
|
||||
return ;
|
||||
dlg_q.hide();
|
||||
queryAction(parseInt($('#sel_block').val()));
|
||||
});
|
||||
$('#btn_q_cancel').click(function () {
|
||||
if(new Date().getTime() - (window.fuckios || 0) < 500)
|
||||
return ;
|
||||
dlg_q.hide();
|
||||
msg_q_err.hide();
|
||||
});
|
||||
$('#btn_op_cancel').click(function () {
|
||||
dlg_op.hide();
|
||||
});
|
||||
|
||||
//默认查询当天情况
|
||||
queryAction();
|
||||
|
||||
/**
|
||||
* 内置浏览器方法
|
||||
* 显示指定报修记录的报修历史
|
||||
* @param {Number} id 报修记录ID
|
||||
*/
|
||||
window.showTicketTrack = function(id) {
|
||||
$('#if_browser').attr('src', 'track.sub.html?token=' + $('#token').val() + '&id=' + id);
|
||||
$('#dlg_browser').show();
|
||||
}
|
||||
|
||||
function updateHead(title, desc){
|
||||
$('#text_title').text(title || '报修记录');
|
||||
$('#text_brief').text(desc);
|
||||
}
|
||||
|
||||
/*
|
||||
* -------------------------------------------
|
||||
* _______________查询方法_____________________
|
||||
* -------------------------------------------
|
||||
*/
|
||||
//XXX window.lastQuery 上一次查询的blockId, 便于对某单记录进行操作后重新查询一次
|
||||
//查询动作,block可以为空,查询用户指定的,block为空也表示自动查询,非人工再次查询
|
||||
function queryAction(block) {
|
||||
window.lastQuery = block;
|
||||
toast_loading.show();
|
||||
var queryURL = '/*@echo URL_SOLA_TICKET_LOOKUP*/?token=' + $('#token').val() + (block ? ('&block=' + block + '&') : '&');
|
||||
NMFunc.reqServer(queryURL, list_queryDone, block?1:0, solaDisappear);
|
||||
if (block) {
|
||||
var blockName = '火星';
|
||||
$('#sel_block option').each(function () {
|
||||
if ($(this).val() == block) blockName = $(this).text();
|
||||
});
|
||||
updateHead(0, blockName + '- 未修记录');
|
||||
}
|
||||
}
|
||||
|
||||
//Sola消失了
|
||||
function solaDisappear() {
|
||||
toast_loading.hide();
|
||||
alert('Sola端出问题了,无法回应你的请求\n \tˋ( ° ▽、° )');
|
||||
}
|
||||
|
||||
//查询结束,result:[Boolean:byUser,String:timestamp]
|
||||
function list_queryDone(data, byUser) {
|
||||
toast_loading.hide();
|
||||
if (data.errCode == -20)
|
||||
return NMFunc.result(1,0,'你还没有登录或页面超时');
|
||||
if (data.errCode) {
|
||||
alert('查询出错:\n(' + data.errCode + ')' + data.errMsg);
|
||||
return byUser && (msg_q_err.show(), dlg_q.show());
|
||||
}
|
||||
|
||||
listResult = [];
|
||||
//只有状态码为0或2才能显示(除开已上报)
|
||||
for(var i in data)
|
||||
showMe(data[i]) && listResult.push(data[i]);
|
||||
var tb = $('#tb_ret');
|
||||
tb.tableFill(list_tbHead, listResult.length, onFillTable);
|
||||
tb.lyTable();
|
||||
$('#tb_ret tbody tr').each(function (i) {
|
||||
$(this).attr('data-row', i);
|
||||
}).unbind('click').click(onClickTable);
|
||||
|
||||
}
|
||||
//判断一条记录是否已改被显示
|
||||
function showMe(item){
|
||||
return !item.status || (item.status==2 && item.updateTime && (new Date()).getTime() - item.updateTime > 10 * 60 * 60 * 1000);
|
||||
}
|
||||
|
||||
/*
|
||||
* ------------------------------------------
|
||||
* ________________处理结果___________________
|
||||
* ------------------------------------------
|
||||
*/
|
||||
//填充表格
|
||||
function onFillTable(row, col, head) {//1459241852000/1459370058000/1459370179627
|
||||
var d = listResult[row];
|
||||
switch (col) {
|
||||
case 0:
|
||||
return userf.getStatHTML(d.status);
|
||||
case 1:
|
||||
return d.user.phone + '(' + d.user.name + ')';
|
||||
case 2:
|
||||
return '<b style="font-size: 120%">' + userf.getAllInfo(
|
||||
d.user.block,
|
||||
d.user.room,
|
||||
d.user.isp) + '</b>';
|
||||
case 3:
|
||||
var tt = userf.getDate(d.submitTime);
|
||||
return tt.slice(tt.indexOf('年') + 1, tt.length); //Mini Time
|
||||
case 4:
|
||||
return userf.getDesc(d.description, true);
|
||||
}
|
||||
}
|
||||
|
||||
//点击查询得到的列表时的响应事件
|
||||
function onClickTable() {
|
||||
window.nowOpObj = listResult[parseInt($(this).attr('data-row'))];
|
||||
$('#text_op_brief').val('');
|
||||
dlg_op.show();
|
||||
$('#dlg_op_title').text(userf.getAllInfo(nowOpObj.user.block, nowOpObj.user.room, nowOpObj.user.isp));
|
||||
}
|
||||
/*
|
||||
* 当用户点击操作按钮时懂得响应事件: 处理记录提交
|
||||
*/
|
||||
window.onOpActionBtnClick = function(stat) {
|
||||
desc = $('#text_op_brief').val();
|
||||
if (desc.trim().length == 0) {
|
||||
alert('请填写维修简述!');
|
||||
return;
|
||||
}
|
||||
toast_loading.show();
|
||||
dlg_op.hide();
|
||||
var queryURL = '/*@echo URL_SOLA_TICKET_UPDATE*/?token=' + $('#token').val() + '&ticket=' + nowOpObj.id + '&status=' + stat + '&remark=' + encodeURIComponent(desc) + '&';
|
||||
NMFunc.reqServer(queryURL, list_opDone);
|
||||
window.solat = setTimeout(solaDisappear, 8000);
|
||||
}
|
||||
/*
|
||||
* 操作结束
|
||||
*/
|
||||
window.list_opDone = function(data, param) {
|
||||
clearTimeout(window.solat);
|
||||
toast_loading.hide();
|
||||
console.log(data);
|
||||
if (!data.errCode) {
|
||||
var extraInfo = '';
|
||||
if (data.user) {
|
||||
var user = data.user;
|
||||
extraInfo = '\n' + userf.getAllInfo(user.block,user.room,user.isp) + '{' + user.netAccount + '}';
|
||||
}
|
||||
alert('操作成功!' + extraInfo);
|
||||
queryAction(window.lastQuery);
|
||||
} else {
|
||||
alert('操作出错!(・□・、*)\n' + data.errMsg + '(' + data.errCode + ')');
|
||||
dlg_op.show();
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
||||
204
src/man/js/lists.js
Normal file
204
src/man/js/lists.js
Normal file
@@ -0,0 +1,204 @@
|
||||
/*对话框,消息,Toast配置管理*/
|
||||
dlg_q = $('#dlg_q');
|
||||
dlg_op = $('#dlg_op');
|
||||
msg_q_err = $('#msg_q_error');
|
||||
toast_loading = $('#toast_loading');
|
||||
|
||||
|
||||
|
||||
/*查询对话框功能*/
|
||||
$('#btn_open_qdlg').click(function () {
|
||||
dlg_q.show();
|
||||
});
|
||||
$('#btn_query').click(function () {
|
||||
dlg_q.hide();
|
||||
queryAction(parseInt($('#sel_block').val()));
|
||||
});
|
||||
$('#btn_q_cancel').click(function () {
|
||||
dlg_q.hide();
|
||||
msg_q_err.hide();
|
||||
});
|
||||
$('#btn_op_cancel').click(function () {
|
||||
dlg_op.hide();
|
||||
});
|
||||
|
||||
//默认查询当天情况
|
||||
queryAction(0);
|
||||
|
||||
|
||||
/**
|
||||
* 内置浏览器方法
|
||||
* 显示指定报修记录的报修历史
|
||||
* @param {Number} id 报修记录ID
|
||||
*/
|
||||
showTicketTrack = function(id) {
|
||||
$('#if_browser').attr('src', 'track.sub.html?token=' + $('#token').val() + '&id=' + id);
|
||||
$('#dlg_browser').show();
|
||||
}
|
||||
|
||||
/*
|
||||
* -------------------------------------------
|
||||
* _______________查询方法_____________________
|
||||
* -------------------------------------------
|
||||
*/
|
||||
//XXX window.lastQuery 上一次查询的blockId
|
||||
//查询动作,block可以为空,查询用户指定的,block为空也表示自动查询,非人工再次查询
|
||||
function queryAction(block) {
|
||||
window.lastQuery = block;
|
||||
toast_loading.show();
|
||||
var queryURL = '/*@echo URL_SOLA_TICKET_LOOKUP*/?token=' + $('#token').val() + (block == undefined ? '&' : ('&block=' + block + '&'));
|
||||
NMFunc.reqServer(queryURL, lists_queryDone, block?1:0, solaDisappear);
|
||||
}
|
||||
//Sola消失了
|
||||
function solaDisappear() {
|
||||
toast_loading.hide();
|
||||
alert('Sola端出问题了,无法回应你的请求\n \tˋ( ° ▽、° )');
|
||||
}
|
||||
//查询结束,result:[Boolean:byUser,String:timestamp]
|
||||
function lists_queryDone(data, byUser) {
|
||||
toast_loading.hide();
|
||||
if (!data.errCode) {
|
||||
window.listResult = data;
|
||||
handlerResult();
|
||||
return;
|
||||
}
|
||||
if (data.errCode == -20)
|
||||
return NMFunc.result(1,0,'你还没有登录或页面超时');
|
||||
alert('查询出错:\n(' + data.errCode + ')' + data.errMsg);
|
||||
if (byUser) {
|
||||
msg_q_err.show();
|
||||
dlg_q.show();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ------------------------------------------
|
||||
* ________________处理结果___________________
|
||||
* ------------------------------------------
|
||||
*/
|
||||
//@XXX window.listResult
|
||||
//@XXX window.tfOffset 表示表格填充时的位移,例如填充香晖苑(4)的时候前面已经过来10条记录,那么offset=10
|
||||
function onFillTable(row, col, head) {
|
||||
switch (col) {
|
||||
case 0:
|
||||
return listResult[tfOffset + row].id;
|
||||
case 1:
|
||||
return userf.getStatHTML(listResult[tfOffset + row].status);
|
||||
case 2:
|
||||
return listResult[tfOffset + row].user.phone + '(' + listResult[tfOffset + row].user.name + ')';
|
||||
case 3:
|
||||
return userf.getAllInfo(
|
||||
listResult[tfOffset + row].user.block,
|
||||
listResult[tfOffset + row].user.room,
|
||||
listResult[tfOffset + row].user.isp) +
|
||||
'<br />{' + listResult[tfOffset + row].user.netAccount + '}';
|
||||
case 4:
|
||||
var tt = userf.getDate(listResult[tfOffset + row].submitTime);
|
||||
return tt.slice(tt.indexOf('年') + 1, tt.length); //Mini Time
|
||||
case 5:
|
||||
return userf.getDesc(listResult[tfOffset + row].description, true);
|
||||
}
|
||||
}
|
||||
|
||||
window.tbColor = ['#FDFEFC', '#EDF7EA', '#F9F8EC', '#F9F0EC'];
|
||||
|
||||
function handlerResult() {
|
||||
var head = ['编号', '状态', '联系方式', '信息', '报修时间', '简述'];
|
||||
//表格填充位移从0开始
|
||||
window.tfOffset = 0;
|
||||
//为了解决手动添加的报修没有宿舍区块的显示问题
|
||||
while (!listResult[tfOffset].user.block) { tfOffset++; }
|
||||
//遍历区块ID,(十位):b
|
||||
for (var blockId = 1; blockId <= 8; blockId++) {
|
||||
//目前这块区域的报修量(即当前要填充的表格的数据长度)
|
||||
var currentCount = 0;
|
||||
var nextOffset = tfOffset;
|
||||
while (nextOffset < listResult.length && parseInt(listResult[nextOffset].user.block / 10) == blockId) {
|
||||
nextOffset++;
|
||||
currentCount++;
|
||||
}
|
||||
|
||||
//跳过 6: 别墅 和 7: 保留片区
|
||||
if (blockId != 6 && blockId != 7) {
|
||||
$('#btn_more' + blockId + ' .weui_cell_ft').text(currentCount || '');
|
||||
|
||||
var colorIndex = parseInt((currentCount + 2) / 3);
|
||||
var color = tbColor[colorIndex > 3 ? 3 : colorIndex];
|
||||
$('#btn_more' + blockId).css('background-color', color);
|
||||
|
||||
var tb = $('#tb_ret' + blockId);
|
||||
tb.tableFill(head, currentCount, onFillTable);
|
||||
tb.lyTable();
|
||||
}
|
||||
|
||||
//下一个填充表格的数据位移量增加
|
||||
tfOffset = nextOffset;
|
||||
}
|
||||
|
||||
$('.table tbody tr').each(function (i) {
|
||||
$(this).attr('data-row', i);
|
||||
}).unbind('click').click(onClickTable);
|
||||
}
|
||||
|
||||
//目前点击的对象
|
||||
function onClickTable() {
|
||||
window.nowOpObj = listResult[parseInt($(this).attr('data-row'))];
|
||||
$('#text_op_brief').val('');
|
||||
dlg_op.show();
|
||||
$('#dlg_op_title').text(userf.getAllInfo(nowOpObj.user.block, nowOpObj.user.room, nowOpObj.user.isp));
|
||||
}
|
||||
|
||||
/*
|
||||
* 当用户点击操作按钮时懂得响应事件: 处理记录提交
|
||||
*/
|
||||
window.onOpActionBtnClick = function(stat) {
|
||||
desc = $('#text_op_brief').val();
|
||||
if (desc.trim().length == 0) {
|
||||
alert('请填写维修简述!');
|
||||
return;
|
||||
}
|
||||
toast_loading.show();
|
||||
dlg_op.hide();
|
||||
var queryURL = '/*@echo URL_SOLA_TICKET_UPDATE*/?token=' + $('#token').val() + '&ticket=' + nowOpObj.id + '&status=' + stat + '&remark=' + encodeURIComponent(desc) + '&';
|
||||
NMFunc.reqServer(queryURL,lists_opDone, 0, solaDisappear);
|
||||
}
|
||||
|
||||
/*
|
||||
* 操作结束
|
||||
*/
|
||||
lists_opDone = function(data, param) {
|
||||
toast_loading.hide();
|
||||
console.log(data);
|
||||
if (!data.errCode) {
|
||||
var extraInfo = '';
|
||||
if (data.user) {
|
||||
var user = data.user;
|
||||
extraInfo = '\n' + userf.getAllInfo(user.block,user.room,user.isp) + '{' + user.netAccount + '}';
|
||||
}
|
||||
alert('操作成功!' + extraInfo);
|
||||
queryAction(window.lastQuery);
|
||||
} else {
|
||||
alert('操作出错!(・□・、*)\n' + data.errMsg + '(' + data.errCode + ')');
|
||||
dlg_op.show();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击某个宿舍分类然后显示/隐藏结果
|
||||
* @author 刘越
|
||||
* @param {Number} item 分类ID
|
||||
*/
|
||||
window.lists_toggleResult = function (item) {
|
||||
//window.ltii 表示上一次显示的分类区块
|
||||
if (!window.ltii) window.ltii = 0;
|
||||
//如果就是上次显示的分类,就切换
|
||||
if (ltii == item) {
|
||||
$('#tb_ret' + ltii).toggle();
|
||||
} else {
|
||||
$('#tb_ret' + ltii).hide();
|
||||
$('#tb_ret' + item).show();
|
||||
}
|
||||
location.href = '#btn_more' + item;
|
||||
//记录上一次显示的分类区块
|
||||
window.ltii = item;
|
||||
}
|
||||
68
src/man/js/log.js
Normal file
68
src/man/js/log.js
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* -----------------内置浏览器方法-----------------
|
||||
*/
|
||||
/**
|
||||
* 当日志子页面请求显示指定报修记录的操作历史
|
||||
* @author 刘越
|
||||
* @param {number} id 指定报修的ID
|
||||
*/
|
||||
window.onSonCallMe = function(id){
|
||||
log_browserOpenTrack(id);
|
||||
}
|
||||
/**
|
||||
* 在对话框中显示某个报修的操作历史
|
||||
* @author 刘越
|
||||
* @param {number} id 指定报修的ID
|
||||
*/
|
||||
window.log_browserOpenTrack = function(id){
|
||||
$('#if_browser2').attr('src','track.sub.html?token='+$('#token').val()+'&id='+id);
|
||||
$('#track_id').text(id);
|
||||
$('#dlg_browser').show();
|
||||
}
|
||||
/**
|
||||
* 在页面的iframe内显示日志记录
|
||||
* @author 刘越
|
||||
* @param {number} d1 起始时间戳
|
||||
* @param {number} d2 截止时间戳(可选)
|
||||
*/
|
||||
window.log_browserOpenLog = function(d1,d2){
|
||||
$('#if_browser').attr('src','log.sub.html?token='+$('#token').val() + '&d1=' + d1 + '&d2=' + (d2 || d1) );
|
||||
}
|
||||
|
||||
/**
|
||||
* 调整显示日志子页面的iframe的高度
|
||||
* 说明: 子页面会调用这个函数
|
||||
* @author 刘越
|
||||
* @param {Number|undefined} h 子页面的高度(可选)
|
||||
*/
|
||||
window.log_resizeLogBrowser = function(h){
|
||||
try{
|
||||
//如果是子页面调用的(传入了具体的高度值)
|
||||
if(h)
|
||||
return $('#if_browser').height(h + 20);
|
||||
var oe = window.frames['if_browser'].contentWindow.document.getElementById('page_result');
|
||||
$('#if_browser').height($(oe).height() + 20);
|
||||
}catch(e){
|
||||
}
|
||||
}
|
||||
|
||||
//打开页面显示一次日志
|
||||
log_browserOpenLog(dateFormat(new Date().getTime()));
|
||||
|
||||
log_onQueryBtnClick = function(){
|
||||
var dd1 = $('#date_start').val();
|
||||
var dd2 = $('#date_stop').val();
|
||||
if(!dd1)dd1 = dateFormat(new Date().getTime());
|
||||
else dd1 = dd1.replace(/-/g,'');
|
||||
if(!dd2)dd2 = dateFormat(new Date().getTime());
|
||||
else dd2 = dd2.replace(/-/g,'');
|
||||
log_browserOpenLog(dd1,dd2);
|
||||
}
|
||||
|
||||
function dateFormat(ms){
|
||||
var d = new Date(ms);
|
||||
return d.getFullYear()+_22(d.getMonth()+1)+_22(d.getDate());
|
||||
}
|
||||
function _22(str){
|
||||
return ('000'+str).slice(-2)
|
||||
}
|
||||
136
src/man/js/log.sub.js
Normal file
136
src/man/js/log.sub.js
Normal file
@@ -0,0 +1,136 @@
|
||||
|
||||
//添加验证SToken失败的时候的回调函数
|
||||
SToken.checkBadCallback = function(data,param){
|
||||
onError('页面/登录已失效,请重新登录以操作');
|
||||
};
|
||||
//重写Sola消失的方法
|
||||
SToken.solaDisappear = function(){
|
||||
onError('Sola端出问题了,无法回应你的查询请求\n请尝试关闭窗口后重新进入');
|
||||
};
|
||||
//验证SolaToken
|
||||
SToken.init(NMFunc.getURLParam('token'),'token');
|
||||
|
||||
var d1 = NMFunc.getURLParam('d1');
|
||||
var d2 = NMFunc.getURLParam('d2');
|
||||
var st = NMFunc.getURLParam('st',0);
|
||||
window.itemLim = SToken.isWechat ? 20 : 30;
|
||||
if(st != 0)
|
||||
$('#btn_last').show().click(function(){turnPage(st-itemLim)});
|
||||
$('#btn_next').show().click(function(){turnPage(parseInt(st)+itemLim);});
|
||||
|
||||
function turnPage(st){
|
||||
var d1 = NMFunc.getURLParam('d1'),d2 = NMFunc.getURLParam('d2');
|
||||
var gourl = 'log.sub.html?token='+$('#token').val()
|
||||
+(d1?('&d1='+d1):'')+(d2?('&d2='+d2):'')
|
||||
+'&st='+st;
|
||||
window.location.href = gourl;
|
||||
}
|
||||
|
||||
//获取日志
|
||||
var queryURL = '/*@echo URL_SOLA_TICKET_LOG*/?token='+$('#token').val()
|
||||
+'&limit='+itemLim+'&first='+st
|
||||
+(d1?('&start='+d1):'')
|
||||
+(d2?('&end='+d2):'')
|
||||
+'&';
|
||||
NMFunc.reqServer(queryURL,log_sub_queryDone);
|
||||
|
||||
function log_sub_queryDone(data,param){
|
||||
try{
|
||||
if(data.errCode)
|
||||
return onError(data.errMsg);
|
||||
var retList = data;
|
||||
var showList = [];
|
||||
for(var i=0;i<retList.length;i++){
|
||||
showList[i]={};
|
||||
if(retList[i][0].operator){
|
||||
showList[i].names = retList[i][0].operator.name;
|
||||
if(showList[i].names=='用户操作')showList[i].names='<b>'+showList[i].names+'</b>';
|
||||
}else showList[i].names='<b>用户操作</b>';
|
||||
showList[i].tid = retList[i][0].id;
|
||||
var user = retList[i][0].user;
|
||||
showList[i].user= '['+user.name+']'+userf.getAllInfo(user.block,user.room,user.isp);
|
||||
showList[i].desc= retList[i][0].description;
|
||||
showList[i].remark = retList[i][0].remark;
|
||||
showList[i].status = retList[i][0].status;
|
||||
showList[i].mod = retList[i][2];
|
||||
showList[i].time = retList[i][1].timestamp;
|
||||
}
|
||||
showResult(showList);
|
||||
}catch(e){
|
||||
var showText = '('+(e.lineno?e.lineno:'?')+','+(e.colno?e.colno:'?')+')<br/>'+e;
|
||||
console.log(showText);
|
||||
onError('查询异常:<br />'+showText);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* resArr:[Object,....]Object{'names','remark','status','mod','time'}
|
||||
*/
|
||||
function showResult(resArr){
|
||||
//结果长度
|
||||
var len = resArr.length;
|
||||
//长度为0,表示没有结果
|
||||
len || $('#page_result').append("<div class='p_fg' style='text-align:center;'>操作记录为空!</div>");
|
||||
//长度不足就不显示下一页按钮
|
||||
resArr.length>=itemLim || $('#btn_next').hide();
|
||||
//循环遍历
|
||||
for(var i=0;i<resArr.length;i++){
|
||||
var bv = $($('#base_item').prop('outerHTML')).removeClass('hide');
|
||||
var iv = bv.find('.ti_icon');
|
||||
bv.attr('data-id',resArr[i].tid);
|
||||
bv.find('.ti_id').text(resArr[i].tid);
|
||||
bv.find('.ti_user').html(resArr[i].user);
|
||||
bv.find('.ti_desc').html(userf.getDesc(resArr[i].desc));//.replace('故障','<br />故障'));
|
||||
bv.find('.ti_name').html(resArr[i].names);
|
||||
bv.find('.ti_status').html(userf.getStatHTML(resArr[i].status).replace('待解决','新增报修'));//ti_remark
|
||||
bv.find('.ti_remark').text(resArr[i].remark);
|
||||
var dateStr = userf.getDate(resArr[i].time);
|
||||
bv.find('.ti_time').html(dateStr.slice(3,dateStr.length).replace(' ','<br />')+' ');
|
||||
switch(resArr[i].mod){
|
||||
case 'ADD': iv.addClass('p_start');break;
|
||||
case 'DEL': iv.addClass('p_del');break;
|
||||
default: iv.addClass(resArr[i].status==9?'p_done':'p_continue');
|
||||
}
|
||||
//绑定列表点击后显示此报修记录的操作历史
|
||||
bv.bind('click',showTicketHistory);
|
||||
$('#page_result').append(bv);
|
||||
}
|
||||
setTimeout(fixBgLine,400);
|
||||
}
|
||||
function fixBgLine(){
|
||||
var bgBase = $('.ti_icon').eq(1);
|
||||
bgBase.length && $('.p_bg').height($('#page_result').height()+150)
|
||||
.offset({
|
||||
left:bgBase.offset().left + bgBase.width() / 2,
|
||||
top :$('.p_fg').eq(1).offset().top
|
||||
});
|
||||
try{
|
||||
callParentFunc('log_resizeLogBrowser',$('#page_result').height()+200);
|
||||
}catch(e){
|
||||
console.error(e);
|
||||
//调用父框架方法出错
|
||||
}
|
||||
}
|
||||
|
||||
function onError(about){
|
||||
$('#page_error').show().find('p').html(about);
|
||||
$('#page_result').hide()
|
||||
}
|
||||
|
||||
/*
|
||||
* 呼叫父框架显示指定的历史操作
|
||||
*/
|
||||
function showTicketHistory(){
|
||||
callParentFunc('onSonCallMe',$(this).attr('data-id'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用父框架方法
|
||||
* @author 刘越
|
||||
* @param {string} func 父框架函数名
|
||||
* @param {object} param 参数
|
||||
*/
|
||||
function callParentFunc(func,param){
|
||||
return eval('window.parent.' + func + '(param);');
|
||||
}
|
||||
|
||||
80
src/man/js/track.sub.js
Normal file
80
src/man/js/track.sub.js
Normal file
@@ -0,0 +1,80 @@
|
||||
//添加验证SToken失败的时候的回调函数
|
||||
SToken.checkBadCallback = function(data,param) {
|
||||
onError('页面/登录已失效,请重新登录以操作');
|
||||
};
|
||||
//重写Sola消失的方法
|
||||
SToken.solaDisappear = function() {
|
||||
onError('Sola端出问题了,无法回应你的查询请求\n请尝试关闭窗口后重新进入');
|
||||
};
|
||||
//当SToken验证成功时,获取历史
|
||||
SToken.checkCallback = function(data,param) {
|
||||
var tid = NMFunc.getURLParam('id','-1');
|
||||
var queryURL = '/*@echo URL_SOLA_TICKET_TRACK*/?token='+$('#token').val()
|
||||
+'&id='+tid+'&';
|
||||
NMFunc.reqServer(queryURL,track_sub_queryDone);
|
||||
}
|
||||
//验证SolaToken
|
||||
SToken.init(NMFunc.getURLParam('token'),'token');
|
||||
|
||||
/**
|
||||
* 收到服务器端传来的数据回调函数
|
||||
*/
|
||||
track_sub_queryDone = function(data,param){
|
||||
try{
|
||||
if(data.errCode)
|
||||
return onError(data.errMsg);
|
||||
var retList = data;
|
||||
var showList = [];
|
||||
for(var i=0;i<retList.length;i++){
|
||||
showList[i]={};
|
||||
if(retList[i][0].operator){
|
||||
showList[i].names = retList[i][0].operator.name;
|
||||
if(showList[i].names=='用户操作')showList[i].names='<b>'+showList[i].names+'</b>';
|
||||
}else showList[i].names='<b>用户操作</b>';
|
||||
showList[i].remark = retList[i][0].remark;
|
||||
showList[i].status = retList[i][0].status;
|
||||
showList[i].mod = retList[i][2];
|
||||
showList[i].time = retList[i][1].timestamp;
|
||||
if(showList[i].status == 0)
|
||||
showList[i].remark = retList[i][0].description;
|
||||
}
|
||||
showResult(showList);
|
||||
}catch(e){
|
||||
console.log(JSON.stringify(data));
|
||||
onError('查询异常:\n'+e);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* resArr:[Object,....]Object{'names','remark','status','mod','time'}
|
||||
*/
|
||||
function showResult(resArr){
|
||||
if(resArr.length==0){
|
||||
return $('#page_result').append("<div class='p_fg' style='text-align:center;'>操作记录为空!</div>");
|
||||
}
|
||||
for(var i=0;i<resArr.length;i++){
|
||||
var bv = $('#base_item').clone().removeClass('hide');
|
||||
var iv = bv.find('.ti_icon');
|
||||
bv.find('.ti_name').html(resArr[i].names);
|
||||
bv.find('.ti_status').html(userf.getStatHTML(resArr[i].status).replace('待解决','新增报修'));//ti_remark
|
||||
bv.find('.ti_remark').text(userf.getDesc(resArr[i].remark));
|
||||
var dateStr = userf.getDate(resArr[i].time);
|
||||
bv.find('.ti_time').html(dateStr.slice(3,dateStr.length).replace(' ','<br />')+' ');
|
||||
if(resArr[i].mod=='ADD')iv.addClass('p_start');
|
||||
else if(resArr[i].mod=='DEL')iv.addClass('p_del');
|
||||
else iv.addClass(resArr[i].status==9?'p_done':'p_continue');
|
||||
$('#page_result').append(bv);
|
||||
}
|
||||
setTimeout(fixBgLine,500);
|
||||
}
|
||||
function fixBgLine(){
|
||||
var bgBase = $('.ti_icon').eq(1);
|
||||
$('.p_bg').height($('#page_result').height()+40)
|
||||
.offset({'left':bgBase.offset().left+bgBase.width()/2,'top':0});
|
||||
// console.log($('.p_bg').offset().left+','+$('.p_bg').offset().top);
|
||||
}
|
||||
|
||||
function onError(about){
|
||||
$('#page_error').show().find('p').text(about);
|
||||
$('#page_result').hide()
|
||||
}
|
||||
45
src/man/list.html
Normal file
45
src/man/list.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<!-- @extend ../part/wrap/head.part.html -->查询<!-- @endextend -->
|
||||
|
||||
<!-- @include ../part/common_js_loader.part.html -->
|
||||
<script>
|
||||
//加载基本函数库,并且验证微信
|
||||
window.allowDesktop = {};
|
||||
NMJsLoader('../cdn/functions.js', 'functions');
|
||||
</script>
|
||||
|
||||
<!-- @include ../part/common_head_style.part.html -->
|
||||
<!--加载lytable样式表-->
|
||||
<link rel="stylesheet" id="style_lytable" href="../cdn/lytable.min.css?<!-- @echo TIME-->"></link>
|
||||
<!--<script>NMLoadCSS(document.getElementById(style_lytable),'../cdn/lytable.min.css','lytable');</script>-->
|
||||
|
||||
<!-- @extend ../part/wrap/headbody_man.part.html -->
|
||||
<!--Body最开头的内容-->
|
||||
<!-- @include part/list/toast_loading.part.html -->
|
||||
<!-- @include part/list/dlg_browser_history.part.html -->
|
||||
<!-- @include part/list/dlg_operation.part.html -->
|
||||
<!-- @include part/list/dlg_query.part.html -->
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @extend ../part/wrap/body_head.part.html -->
|
||||
<span id="text_title"><!-- 由脚本控制的输出 --></span>
|
||||
<!-- @endextend -->
|
||||
<!-- @extend ../part/wrap/body_desc.part.html -->
|
||||
<span id="text_brief"><!-- 由脚本控制的输出 --></span>
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- 表单开始 -->
|
||||
<input type="hidden" id="token" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
|
||||
|
||||
<!-- @include part/list/body.part.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/tail.part.html -->
|
||||
<script>
|
||||
window.NMLazyJs = [
|
||||
['zepto', '../cdn/zepto.min.js'],
|
||||
['userfield', '../cdn/userfield.js'],
|
||||
['lytable','../cdn/lyTableAll.min.js'],
|
||||
['man_list','js/list.js'],
|
||||
];
|
||||
</script>
|
||||
<!-- @include ../part/man_tail_script.part.html -->
|
||||
<!-- @endextend -->
|
||||
41
src/man/lists.html
Normal file
41
src/man/lists.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!-- @extend ../part/wrap/head.part.html -->查询(全部)<!-- @endextend -->
|
||||
|
||||
<!-- @include ../part/common_js_loader.part.html -->
|
||||
<script>
|
||||
//加载基本函数库,并且验证微信
|
||||
window.allowDesktop = {};
|
||||
NMJsLoader('../cdn/functions.js', 'functions');
|
||||
</script>
|
||||
|
||||
<!-- @include ../part/common_head_style.part.html -->
|
||||
<!--加载lytable样式表-->
|
||||
<link rel="stylesheet" id="style_lytable" href="../cdn/lytable.min.css?<!-- @echo TIME-->"></link>
|
||||
<!--<script>NMLoadCSS(document.getElementById(style_lytable),'../cdn/lytable.min.css','lytable');</script>-->
|
||||
|
||||
<!-- @extend ../part/wrap/headbody_man.part.html -->
|
||||
<!--Body最开头的内容-->
|
||||
<!-- @include part/lists/toast_loading.part.html -->
|
||||
<!-- @include part/lists/dlg_browser_history.part.html -->
|
||||
<!-- @include part/lists/dlg_operation.part.html -->
|
||||
<!-- @include part/lists/dlg_query.part.html -->
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @extend ../part/wrap/body_head.part.html --><span id="text_title">报修记录</span><!-- @endextend -->
|
||||
<!-- @extend ../part/wrap/body_desc.part.html --><span id="text_brief">全部未修记录</span><!-- @endextend -->
|
||||
|
||||
<!-- 表单开始 -->
|
||||
<input type="hidden" id="token" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
|
||||
|
||||
<!-- @include part/lists/body.part.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/tail.part.html -->
|
||||
<script>
|
||||
window.NMLazyJs = [
|
||||
['zepto', '../cdn/zepto.min.js'],
|
||||
['userfield', '../cdn/userfield.js'],
|
||||
['lytable','../cdn/lyTableAll.min.js'],
|
||||
['man_lists','js/lists.js'],
|
||||
];
|
||||
</script>
|
||||
<!-- @include ../part/man_tail_script.part.html -->
|
||||
<!-- @endextend -->
|
||||
35
src/man/log.html
Normal file
35
src/man/log.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<!-- @extend ../part/wrap/head.part.html -->处理记录<!-- @endextend -->
|
||||
|
||||
<!-- @include ../part/common_js_loader.part.html -->
|
||||
<script>
|
||||
//加载基本函数库,并且验证微信
|
||||
window.allowDesktop = {};
|
||||
NMJsLoader('../cdn/functions.js', 'functions');
|
||||
</script>
|
||||
|
||||
<!-- @include ../part/common_head_style.part.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/headbody_man.part.html -->
|
||||
<!--Body最开头的内容-->
|
||||
<!-- @include part/log/dlg_browser_history.part.html -->
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @extend ../part/wrap/body_head.part.html --><span id="text_title">处理记录</span><!-- @endextend -->
|
||||
<!-- @extend ../part/wrap/body_desc.part.html --><span id="text_brief">查询指定时间段的网维成员处理报修的记录</span><!-- @endextend -->
|
||||
|
||||
<!-- 表单开始 -->
|
||||
<input type="hidden" id="token" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
|
||||
|
||||
<!-- @include part/log/body.part.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/tail.part.html -->
|
||||
<script>
|
||||
window.NMLazyJs = [
|
||||
['zepto', '../cdn/zepto.min.js'],
|
||||
['userfield', '../cdn/userfield.js'],
|
||||
['lytable','../cdn/lyTableAll.min.js'],
|
||||
['man_log','js/log.js'],
|
||||
];
|
||||
</script>
|
||||
<!-- @include ../part/man_tail_script.part.html -->
|
||||
<!-- @endextend -->
|
||||
31
src/man/log.sub.html
Normal file
31
src/man/log.sub.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<!-- @extend ../part/wrap/head.part.html -->记录操作历史(子页面)<!-- @endextend -->
|
||||
|
||||
<!-- @include ../part/common_js_loader.part.html -->
|
||||
<script>
|
||||
//加载基本函数库,并且验证微信
|
||||
window.allowDesktop = {};
|
||||
NMJsLoader('../cdn/functions.js', 'functions');
|
||||
</script>
|
||||
|
||||
<!-- @include ../part/common_head_style.part.html -->
|
||||
<!--加载lytable样式表-->
|
||||
<link id="style_log_sub" rel="stylesheet" href="css/log.sub.css?<!-- @echo TIME-->"></link>
|
||||
<!--<script>NMLoadCSS(style_log_sub,'css/log.sub.css','log_sub');</script>-->
|
||||
|
||||
|
||||
<!-- @include ../part/wrap/headbody_sub.part.html -->
|
||||
|
||||
<input type="hidden" id="token" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
|
||||
|
||||
<!-- @include part/log.sub/body.part.html -->
|
||||
|
||||
<script>
|
||||
window.NMLazyJs = [
|
||||
['zepto', '../cdn/zepto.min.js'],
|
||||
['userfield', '../cdn/userfield.js'],
|
||||
['man_log_sub','js/log.sub.js'],
|
||||
];
|
||||
</script>
|
||||
<!-- @include ../part/result_tail_script.part.html -->
|
||||
</body>
|
||||
</html>
|
||||
57
src/man/login.html
Normal file
57
src/man/login.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<!--
|
||||
TODO Working.... RSA....
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
|
||||
<title>登录</title>
|
||||
<link rel="stylesheet" type="text/css" href="../cdn/weui.min.css?${MONSTER}" />
|
||||
<link rel="stylesheet" type="text/css" href="../cdn/common.css?${MONSTER}" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="page">
|
||||
<div class="head">
|
||||
<h1 class="title">报修平台管理</h1>
|
||||
<p class="desc">中山学院网络维护科在线保修平台</p>
|
||||
</div>
|
||||
<!--Body-->
|
||||
<div class="weui_cells_title">登录</div>
|
||||
<div class="weui_cells weui_cells_form">
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd">
|
||||
<label class="weui_label">用户名</label>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" type="number"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui_cell "><!--weui_cell_warn-->
|
||||
<div class="weui_cell_hd">
|
||||
<label class="weui_label">密码</label>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" type="password"/>
|
||||
</div>
|
||||
<div class="weui_cell_ft">
|
||||
<i class="weui_icon_warn"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui_cells_tips">快登录,没时间解释了</div>
|
||||
<button class="weui_btn weui_btn_primary">登录</button>
|
||||
<!--Body-->
|
||||
</div>
|
||||
<div class="bottom weui_extra_area">
|
||||
<i class="weui_icon_info"></i>
|
||||
<p class="first">电子科技大学中山学院网络维护科</p>
|
||||
<p>©<a href="http://weibo.com/chinavl">刘越</a> 2015 and Background by <a href="#">Sola</a></p>
|
||||
</div>
|
||||
<script src="../cdn/zepto.min.js?${MONSTER}" type="text/javascript"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
18
src/man/part/add/actionsheet_isp.part.html
Normal file
18
src/man/part/add/actionsheet_isp.part.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!--选择运营商的用户ID-->
|
||||
<div id="as_all" class="hide">
|
||||
<div class="weui_mask_transition" id="as_mask" style="display: none;"
|
||||
onclick="add_hideAS();"></div>
|
||||
<div class="weui_actionsheet" id="as_body">
|
||||
<div class="weui_actionsheet_menu">
|
||||
<div class="weui_actionsheet_cell" onclick="add_onASClick('100104',this);"
|
||||
>联通工单(香晖)</div>
|
||||
<div class="weui_actionsheet_cell" onclick="add_onASClick('100864',this);"
|
||||
>移动工单(香晖)</div>
|
||||
<div class="weui_actionsheet_cell" onclick="add_onASClick('100865',this);"
|
||||
>移动工单(凤翔片区)</div>
|
||||
</div>
|
||||
<div class="weui_actionsheet_action">
|
||||
<div class="weui_actionsheet_cell" onclick="add_hideAS();">取消</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
69
src/man/part/add/body.part.html
Normal file
69
src/man/part/add/body.part.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!-- @include ../../../part/man_backhome.part.html -->
|
||||
|
||||
<!--用户信息-->
|
||||
<div>
|
||||
<div class="weui_cells_title">添加信息</div>
|
||||
<div class="weui_cells weui_cells_form">
|
||||
<div id="cell_sid" class="weui_cell">
|
||||
<div class="weui_cell_hd">
|
||||
<label style="width: 4.5em;" class="weui_label">学号</label>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input id="sid" class="weui_input" type="text" placeholder="学号/工单类型号" onblur="add_checkUser();" />
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui_cell" id="cell_check" style="width: auto;float: left;margin-top: .2em;">
|
||||
<div class="weui_cell_hd">
|
||||
<label style="width: 5em;" class="weui_label">姓名校检:</label>
|
||||
</div>
|
||||
<div class="weui_cell_bd ">
|
||||
<input class="weui_input" id="name" type="text" disabled="disabled" value="" style="color: #777;width: 5em;" />
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
#cell_check:before {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
<button class="weui_btn weui_btn_mini weui_btn_plain_primary" style="float: right;padding: .3em 1em;margin-top: .5em;" onclick="add_openAS();">选择工单类型号</button>
|
||||
<div class="fix_float"></div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<!--错误信息-->
|
||||
<div id="div_form">
|
||||
<!--<form action="http://wts.sola.love/api/ticketsubmit" method="post">-->
|
||||
<div class="weui_cells_title">详细信息</div>
|
||||
<div class="weui_cells weui_cells_form">
|
||||
<div id="cell_code" class="weui_cell">
|
||||
<div class="weui_cell_hd">
|
||||
<label class="weui_label" style="width: 4em;">错误代码</label>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input id="text_code" class="weui_input" type="number" placeholder="如果没有,可以不填" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="cell_date" class="weui_cell">
|
||||
<div class="weui_cell_hd">
|
||||
<label class="weui_label" style="width: 4em;">出现时间</label>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input id="text_date" class="weui_input" type="date" placeholder="如果不记得,可以不选" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="cell_dec" class="weui_cell">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<textarea id="text_ori_desc" class="weui_textarea" placeholder="这个必须填一下哦~" style="height: 9em;"></textarea>
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="desc" id="desc" />
|
||||
<button type="submit" id="btn_subtmit" class="weui_btn weui_btn_primary">添加报修</button>
|
||||
<!--</form>-->
|
||||
|
||||
</div>
|
||||
14
src/man/part/add/dlg_fail.part.html
Normal file
14
src/man/part/add/dlg_fail.part.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!--提交出错Dialog-->
|
||||
<div id="failDlg" class="weui_dialog_alert hide">
|
||||
<div class="weui_mask"></div>
|
||||
<div class="weui_dialog">
|
||||
<div class="weui_dialog_hd"><strong class="weui_dialog_title">报修出错</strong></div>
|
||||
<div class="weui_dialog_bd">
|
||||
<i class="weui_icon_msg weui_icon_warn"></i>
|
||||
<p style="font-size: 1.3em;color: #F76260;">处理出错!</p>
|
||||
</div>
|
||||
<div class="weui_dialog_ft">
|
||||
<a href="javascript:$('#failDlg').hide();if(window.crcw)closePage();" class="weui_btn_dialog primary">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
21
src/man/part/add/toast_loading.part.html
Normal file
21
src/man/part/add/toast_loading.part.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!--加载Toast-->
|
||||
<div id="toast_loading" class="weui_loading_toast hide">
|
||||
<div class="weui_mask_transparent"></div>
|
||||
<div class="weui_toast">
|
||||
<div class="weui_loading">
|
||||
<div class="weui_loading_leaf weui_loading_leaf_0"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_1"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_2"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_3"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_4"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_5"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_6"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_7"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_8"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_9"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_10"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_11"></div>
|
||||
</div>
|
||||
<p class="weui_toast_content">操作中</p>
|
||||
</div>
|
||||
</div>
|
||||
43
src/man/part/home/body.part.html
Normal file
43
src/man/part/home/body.part.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<div class="weui_cells_title hide" data-permit="LBN">查询</div>
|
||||
|
||||
<div class="weui_cells weui_cells_access">
|
||||
<a class="weui_cell hide" href="javascript:NMFunc.route('list.html?stat=today');" data-permit="LBN">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p>查看今日主线任务</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft"></div>
|
||||
</a>
|
||||
<a class="weui_cell hide" href="javascript:NMFunc.route('lists.html');" data-permit="LBN">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p>查看今日全部任务</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft"></div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="weui_cells_title hide" data-permit="PKA">
|
||||
日志</div>
|
||||
|
||||
<div class="weui_cells weui_cells_access hide" data-permit="PKA">
|
||||
<a class="weui_cell" href="javascript:NMFunc.route('log.html');">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p>查看报修记录处理记录</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft"></div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="weui_cells_title hide" data-permit="KTM">
|
||||
添加</div>
|
||||
|
||||
<div class="weui_cells weui_cells_access hide" data-permit="KTM">
|
||||
<a class="weui_cell" href="javascript:NMFunc.route('add.html');">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p>添加报修记录到系统</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft"></div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!--修复底部-->
|
||||
<div style="margin: 0 0 100px 0;"></div>
|
||||
27
src/man/part/list/body.part.html
Normal file
27
src/man/part/list/body.part.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!-- @include ../../../part/man_backhome.part.html -->
|
||||
|
||||
<!-- 更改查询 -->
|
||||
<div class="weui_cells weui_cells_access" style="margin-top: 0;">
|
||||
<a id="btn_open_qdlg" class="weui_cell" href="javascript:;">
|
||||
<div class="weui_cell_hd"><i class="weui_icon_info_circle"></i></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p style="padding-top: 0.3em;">更改查询</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft"></div>
|
||||
</a>
|
||||
</div>
|
||||
<!--查询结果-->
|
||||
<div id="div_ret">
|
||||
<table id="tb_ret" class="table" style="width: 98%;margin: 5px auto;"></table>
|
||||
</div>
|
||||
<!--翻页-->
|
||||
<div id="div_page">
|
||||
<div id="div_last_page" class="hide" style="width: 50%; float: left;">
|
||||
<a href="javascript:;" class="weui_btn weui_btn_plain_default">上一页</a>
|
||||
</div>
|
||||
<a id="next_page" class="hide" href="javascript:;" class="weui_btn weui_btn_plain_primary">下一页</a>
|
||||
<div style="clear: none;"></div>
|
||||
</div>
|
||||
|
||||
<!--修复底部-->
|
||||
<div style="margin: 0 0 120px 0;"></div>
|
||||
18
src/man/part/list/dlg_browser_history.part.html
Normal file
18
src/man/part/list/dlg_browser_history.part.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!-- 内嵌浏览器对话框 -->
|
||||
<div class="weui_dialog_alert hide" id="dlg_browser">
|
||||
<div class="weui_mask"></div>
|
||||
<div class="weui_dialog">
|
||||
<div class="weui_dialog_hd" style="padding-top: .5em;">
|
||||
<strong class="weui_dialog_title"
|
||||
style="float: left;margin: .3em 0 0 1em;">操作历史</strong>
|
||||
<button onclick="$('#dlg_op').show();$('#dlg_browser').hide();"
|
||||
class="weui_btn weui_btn_mini weui_btn_default"
|
||||
style="padding: .3em 2em;margin-right: 1em;float: right;">关闭</button>
|
||||
<div class="fix_float"></div>
|
||||
</div>
|
||||
<div class="weui_dialog_bd" style="padding: .6em 1.2em;-webkit-overflow-scrolling: touch;overflow-y: scroll;height: 350px;">
|
||||
<iframe id="if_browser" src=""
|
||||
style="border: none;width: 100%;height: 350px;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
58
src/man/part/list/dlg_operation.part.html
Normal file
58
src/man/part/list/dlg_operation.part.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!-- 操作对话框 -->
|
||||
<div class="weui_dialog_alert hide" id="dlg_op">
|
||||
<div class="weui_mask"></div>
|
||||
<div class="weui_dialog">
|
||||
<div class="weui_dialog_hd" style="padding-top: .5em;">
|
||||
<strong class="weui_dialog_title" id="dlg_op_title"
|
||||
style="float: left;margin: .3em 0 0 1em;">操作(`・д・´) </strong>
|
||||
<button onclick="$('#dlg_op').hide();showTicketTrack(nowOpObj.id);"
|
||||
class="weui_btn weui_btn_mini weui_btn_default"
|
||||
style="padding: .3em 2em;margin-right: 1em;float: right;">操作历史</button>
|
||||
<div class="fix_float"></div>
|
||||
</div>
|
||||
<div class="weui_dialog_bd">
|
||||
<div class="weui_cells">
|
||||
<div class="weui_cell weui_cell_warn" style="
|
||||
box-align: start;-webkit-box-align: start;
|
||||
align-items: flex-start;-webkit-align-items: flex-start;">
|
||||
<div class="weui_cell_hd">
|
||||
<label class="weui_label" style="width: 4.6em">维修简述</label>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<textarea class="weui_textarea" type="text" placeholder="(必填)" rows="3"
|
||||
id="text_op_brief" style="color: #333;" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dlg_op_btns" style="text-align: left;">
|
||||
<div class="weui_cells_title" style="text-align: left;">已解决状态</div>
|
||||
<div class="weui_cells weui_cells_access" style="background: #DAF0DA">
|
||||
<a class="weui_cell" href="javascript:onOpActionBtnClick(9);">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p style="color: #5CB85C">问题解决</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft"></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="weui_cells_title" style="text-align: left;">未解决状态</div>
|
||||
<div class="weui_cells weui_cells_access">
|
||||
<a class="weui_cell" href="javascript:onOpActionBtnClick(2);" style="background: #FCEFDC">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p style="color: #F0AD4E;">推迟解决</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft">人不在/时间不足</div>
|
||||
</a>
|
||||
<a class="weui_cell" href="javascript:onOpActionBtnClick(4);" style="background: #F9E2E2">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p style="color: #D9534F;">无法解决</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft">上报处理~</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui_dialog_ft">
|
||||
<a id="btn_op_cancel" href="javascript:;" class="weui_btn_dialog default">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
52
src/man/part/list/dlg_query.part.html
Normal file
52
src/man/part/list/dlg_query.part.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!--查询对话框-->
|
||||
<div class="weui_dialog_alert hide" id="dlg_q">
|
||||
<div class="weui_mask"></div>
|
||||
<div class="weui_dialog">
|
||||
<div class="weui_dialog_hd"><strong class="weui_dialog_title">查询记录</strong></div>
|
||||
<div class="weui_dialog_bd">
|
||||
<div id="msg_q_error" class="weui_cells hide">
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><i class="weui_icon_warn"></i></div>
|
||||
<div class="weui_cell_bd" style="padding: 0.4em 0 0 0.5em;color: #F43530;">
|
||||
<p>查询出错</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui_cells_title">宿舍片区</div>
|
||||
<div class="weui_cells weui_cells_split">
|
||||
<div class="weui_cell weui_cell_select">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<select class="weui_select" name="select1" id="sel_block" ontouchend="window.fuckios=new Date().getTime();">
|
||||
<option selected value="1">岐头</option>
|
||||
<option value="2">北门</option>
|
||||
<option value="3">东门</option>
|
||||
<option value="4">香晖</option>
|
||||
<option value="5">凤翔</option>
|
||||
<option value="6">别墅</option>
|
||||
<option value="8">朝晖</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui_cells_title">记录状态</div>
|
||||
<div class="weui_cells weui_cells_split">
|
||||
<div class="weui_cell weui_cell_select">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<select class="weui_select" name="select1">
|
||||
<!--<option value="0" disabled="disabled">全部</option>-->
|
||||
<option selected value="1">未修</option>
|
||||
<!--<option value="2">已修</option>
|
||||
<option value="3">解决好</option>
|
||||
<option value="4">人不在</option>-->
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<a id="btn_query" class="weui_btn weui_btn_primary">查询</a>
|
||||
</div>
|
||||
<div id="btn_q_cancel" class="weui_dialog_ft">
|
||||
<a class="weui_btn_dialog default">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
21
src/man/part/list/toast_loading.part.html
Normal file
21
src/man/part/list/toast_loading.part.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!--加载Toast-->
|
||||
<div id="toast_loading" class="weui_loading_toast hide">
|
||||
<div class="weui_mask_transparent"></div>
|
||||
<div class="weui_toast">
|
||||
<div class="weui_loading">
|
||||
<div class="weui_loading_leaf weui_loading_leaf_0"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_1"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_2"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_3"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_4"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_5"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_6"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_7"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_8"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_9"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_10"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_11"></div>
|
||||
</div>
|
||||
<p class="weui_toast_content">操作中</p>
|
||||
</div>
|
||||
</div>
|
||||
68
src/man/part/lists/body.part.html
Normal file
68
src/man/part/lists/body.part.html
Normal file
@@ -0,0 +1,68 @@
|
||||
<!-- @include ../../../part/man_backhome.part.html -->
|
||||
|
||||
<!--更改查询-->
|
||||
<div class="weui_cells weui_cells_access" style="margin-top: 0;">
|
||||
<a id="btn_open_qdlg" class="weui_cell" href="javascript:;">
|
||||
<div class="weui_cell_hd"><i class="weui_icon_info_circle"></i></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p style="padding-top: 0.3em;">更改查询</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft"></div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 显示结果 -->
|
||||
<div class="weui_cells weui_cells_access">
|
||||
<a id="btn_more1" class="weui_cell" href="javascript:lists_toggleResult(1);">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p>岐头</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft">--</div>
|
||||
</a>
|
||||
<table id="tb_ret1" class="table hide" style="width: 98%;margin: 5px auto;"></table>
|
||||
<a id="btn_more2" class="weui_cell" href="javascript:lists_toggleResult(2);">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p>北门</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft">--</div>
|
||||
</a>
|
||||
<table id="tb_ret2" class="table hide" style="width: 98%;margin: 5px auto;"></table>
|
||||
<a id="btn_more3" class="weui_cell" href="javascript:lists_toggleResult(3);">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p>东门</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft">--</div>
|
||||
</a>
|
||||
<table id="tb_ret3" class="table hide" style="width: 98%;margin: 5px auto;"></table>
|
||||
<a id="btn_more4" class="weui_cell" href="javascript:lists_toggleResult(4);">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p>香晖</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft">--</div>
|
||||
</a>
|
||||
<table id="tb_ret4" class="table hide" style="width: 98%;margin: 5px auto;"></table>
|
||||
<a id="btn_more5" class="weui_cell" href="javascript:lists_toggleResult(5);">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p>凤翔</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft">--</div>
|
||||
</a>
|
||||
<table id="tb_ret5" class="table hide" style="width: 98%;margin: 5px auto;"></table>
|
||||
<a id="btn_more8" class="weui_cell" href="javascript:lists_toggleResult(8);">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p>朝晖</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft">--</div>
|
||||
</a>
|
||||
<table id="tb_ret8" class="table hide" style="width: 98%;margin: 5px auto;"></table>
|
||||
</div>
|
||||
|
||||
<!--翻页-->
|
||||
<div id="div_page">
|
||||
<div id="div_last_page" class="hide" style="width: 50%; float: left;">
|
||||
<a href="javascript:;" class="weui_btn weui_btn_plain_default">上一页</a>
|
||||
</div>
|
||||
<a id="next_page" class="hide" href="javascript:;" class="weui_btn weui_btn_plain_primary">下一页</a>
|
||||
<div style="clear: none;"></div>
|
||||
</div>
|
||||
18
src/man/part/lists/dlg_browser_history.part.html
Normal file
18
src/man/part/lists/dlg_browser_history.part.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!-- 内嵌浏览器对话框 -->
|
||||
<div class="weui_dialog_alert hide" id="dlg_browser">
|
||||
<div class="weui_mask"></div>
|
||||
<div class="weui_dialog">
|
||||
<div class="weui_dialog_hd" style="padding-top: .5em;">
|
||||
<strong class="weui_dialog_title"
|
||||
style="float: left;margin: .3em 0 0 1em;">操作历史</strong>
|
||||
<button onclick="$('#dlg_op').show();$('#dlg_browser').hide();"
|
||||
class="weui_btn weui_btn_mini weui_btn_default"
|
||||
style="padding: .3em 2em;margin-right: 1em;float: right;">关闭</button>
|
||||
<div class="fix_float"></div>
|
||||
</div>
|
||||
<div class="weui_dialog_bd" style="padding: .6em 1.2em;-webkit-overflow-scrolling: touch;overflow-y: scroll;height: 350px;">
|
||||
<iframe id="if_browser" src=""
|
||||
style="border: none;width: 100%;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
52
src/man/part/lists/dlg_operation.part.html
Normal file
52
src/man/part/lists/dlg_operation.part.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!-- 操作对话框 -->
|
||||
<div class="weui_dialog_alert hide" id="dlg_op">
|
||||
<div class="weui_mask"></div>
|
||||
<div class="weui_dialog">
|
||||
<div class="weui_dialog_hd" style="padding-top: .5em;">
|
||||
<strong class="weui_dialog_title" id="dlg_op_title" style="float: left;margin: .3em 0 0 1em;">操作(`・д・´) </strong>
|
||||
<button onclick="$('#dlg_op').hide();showTicketTrack(nowOpObj.id);" class="weui_btn weui_btn_mini weui_btn_default" style="padding: .3em 2em;margin-right: 1em;float: right;">操作历史</button>
|
||||
<div class="fix_float"></div>
|
||||
</div>
|
||||
<div class="weui_dialog_bd">
|
||||
<div class="weui_cells">
|
||||
<div class="weui_cell weui_cell_warn">
|
||||
<div class="weui_cell_hd">
|
||||
<label class="weui_label" style="width: 4.6em;">维修简述</label>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" type="text" placeholder="没人可不填" id="text_op_brief" style="color: #333;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dlg_op_btns" style="text-align: left;">
|
||||
<div class="weui_cells_title" style="text-align: left;">已解决状态</div>
|
||||
<div class="weui_cells weui_cells_access">
|
||||
<a class="weui_cell" onclick="onOpActionBtnClick(9);">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p style="color: #5CB85C;">问题解决</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft"></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="weui_cells_title" style="text-align: left;">未解决状态</div>
|
||||
<div class="weui_cells weui_cells_access">
|
||||
<a class="weui_cell" onclick="onOpActionBtnClick(2);">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p style="color: #5BC0DE;">推迟解决</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft">人不在/时间不足</div>
|
||||
</a>
|
||||
<a class="weui_cell" onclick="onOpActionBtnClick(4);">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p style="color: #D9534F;">无法解决</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft">记得上报哦~</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui_dialog_ft">
|
||||
<a id="btn_op_cancel" href="javascript:;" class="weui_btn_dialog default">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
42
src/man/part/lists/dlg_query.part.html
Normal file
42
src/man/part/lists/dlg_query.part.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!--查询对话框-->
|
||||
<div class="weui_dialog_alert hide" id="dlg_q">
|
||||
<div class="weui_mask"></div>
|
||||
<div class="weui_dialog">
|
||||
<div class="weui_dialog_hd"><strong class="weui_dialog_title">查询记录</strong></div>
|
||||
<div class="weui_dialog_bd">
|
||||
<div id="msg_q_error" class="weui_cells hide">
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><i class="weui_icon_warn"></i></div>
|
||||
<div class="weui_cell_bd" style="padding: 0.4em 0 0 0.5em;color: #F43530;">
|
||||
<p>查询出错</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui_cells_title">宿舍片区</div>
|
||||
<div class="weui_cells weui_cells_split">
|
||||
<div class="weui_cell weui_cell_select">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<select class="weui_select" name="select1" id="sel_block" disabled="disabled">
|
||||
<option selected value="0">全部</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui_cells_title">记录状态</div>
|
||||
<div class="weui_cells weui_cells_split">
|
||||
<div class="weui_cell weui_cell_select">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<select class="weui_select" name="select1">
|
||||
<option selected value="1">未修</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<a id="btn_query" class="weui_btn weui_btn_primary">查询</a>
|
||||
</div>
|
||||
<div id="btn_q_cancel" class="weui_dialog_ft">
|
||||
<a class="weui_btn_dialog default">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
21
src/man/part/lists/toast_loading.part.html
Normal file
21
src/man/part/lists/toast_loading.part.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!--加载Toast-->
|
||||
<div id="toast_loading" class="weui_loading_toast hide">
|
||||
<div class="weui_mask_transparent"></div>
|
||||
<div class="weui_toast">
|
||||
<div class="weui_loading">
|
||||
<div class="weui_loading_leaf weui_loading_leaf_0"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_1"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_2"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_3"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_4"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_5"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_6"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_7"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_8"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_9"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_10"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_11"></div>
|
||||
</div>
|
||||
<p class="weui_toast_content">操作中</p>
|
||||
</div>
|
||||
</div>
|
||||
30
src/man/part/log.sub/body.part.html
Normal file
30
src/man/part/log.sub/body.part.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!-- 出错信息 -->
|
||||
<div id="page_error" class="hide" style="text-align: center; padding: 3em 1em;">
|
||||
<i class="weui_icon_msg weui_icon_warn"></i>
|
||||
<p style="color: #888;margin-top: 1em;font-size: 1.3em;">出错</p>
|
||||
</div>
|
||||
|
||||
<button id="btn_last" class="weui_btn weui_btn_plain_default hide" style="margin-top: 1em;">上一页</button>
|
||||
|
||||
<!-- 主显示区域 -->
|
||||
<div id="page_result" class="page" style="width: 100%;max-width: none;overflow-x: hidden;">
|
||||
<!--Body-->
|
||||
<div class="p_bg"></div>
|
||||
<div id="base_item" class="weui_cell p_fg hide" data-tid="TicketID">
|
||||
<!--Demo-->
|
||||
<div class="weui_cell_hd">
|
||||
<div class="ti_icon point"></div>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary" style="max-width: 680px;">
|
||||
<span class="ti_id yahei">ID</span>
|
||||
<span class='ti_status yahei'>修后状态</span>
|
||||
<span class='ti_name yahei'>修理人员</span>
|
||||
<p class="ti_user">用户信息</p>
|
||||
<p class="ti_desc">报修简述</p>
|
||||
<p class="ti_remark">修理心得</p>
|
||||
</div>
|
||||
<div class="ti_time" class="weui_cell_ft">修理时间</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="btn_next" class="weui_btn weui_btn_plain_primary">下一页</button>
|
||||
46
src/man/part/log/body.part.html
Normal file
46
src/man/part/log/body.part.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!-- @include ../../../part/man_backhome.part.html -->
|
||||
|
||||
<div class="weui_cells_title">
|
||||
不输入选项就表示<b>今天</b>
|
||||
</div>
|
||||
<div class="weui_cells weui_cells_form" style="padding: 0;">
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd">
|
||||
<label style="width: 4.5em;" class="weui_label">起始日期</label>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" type="date" id="date_start">
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd">
|
||||
<label style="width: 4.5em;" for="" class="weui_label">结束日期</label>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" type="date" id="date_stop">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui_cells weui_cells_access" style="margin-top: 0;">
|
||||
<a id="btn_query" class="weui_cell" onclick="log_onQueryBtnClick();">
|
||||
<!--<div class="weui_cell_hd"><i class="weui_icon_info_circle"></i></div>-->
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p style="padding-top: 0.3em;text-align: center;">查询</p>
|
||||
</div>
|
||||
<div class="weui_cell_ft"></div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!--<div style="width: 100%;max-width: 800px;margin: 0 auto;">-->
|
||||
<iframe id="if_browser" onload="try{log_resizeLogBrowser();}catch(e){}" style="width:100%;border:none;" scrolling="no">
|
||||
</iframe>
|
||||
<!--</div>-->
|
||||
<!-- 主显示区 -->
|
||||
|
||||
<div id="div_page">
|
||||
<div id="div_last_page" class="hide" style="width: 50%; float: left;">
|
||||
<a href="javascript:;" class="weui_btn weui_btn_plain_default">上一页</a>
|
||||
</div>
|
||||
<a id="next_page" class="hide" href="javascript:;" class="weui_btn weui_btn_plain_primary">下一页</a>
|
||||
<div style="clear: none;"></div>
|
||||
</div>
|
||||
21
src/man/part/log/dlg_browser_history.part.html
Normal file
21
src/man/part/log/dlg_browser_history.part.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!-- 内嵌浏览器对话框 -->
|
||||
<div class="weui_dialog_alert hide" id="dlg_browser">
|
||||
<div class="weui_mask"></div>
|
||||
<div class="weui_dialog">
|
||||
<div class="weui_dialog_hd" style="padding-top: .5em;">
|
||||
<strong class="weui_dialog_title"
|
||||
style="float: left;margin: .3em 0 0 1em">操作历史</strong>
|
||||
<span id="track_id" style="color: #27AE60;font-family: 'microsoft yahei';
|
||||
font-size: 1.2em;float: left;margin-top: .1em;">
|
||||
50</span>
|
||||
<button onclick="$('#dlg_browser').hide();"
|
||||
class="weui_btn weui_btn_mini weui_btn_default"
|
||||
style="padding: .3em 2em;margin-right: 1em;float: right;">关闭</button>
|
||||
<div class="fix_float"></div>
|
||||
</div>
|
||||
<div class="weui_dialog_bd" style="padding: .6em 1.2em;-webkit-overflow-scrolling: touch;overflow-y: scroll;height: 350px;">
|
||||
<iframe id="if_browser2" src=""
|
||||
style="border: none;width: 100%;height: 350px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
21
src/man/part/track.sub/body.part.html
Normal file
21
src/man/part/track.sub/body.part.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<div id="page_error" class="hide" style="text-align: center; padding: 3em 1em;">
|
||||
<i class="weui_icon_msg weui_icon_warn"></i>
|
||||
<p style="color: #888;margin-top: 1em;font-size: 1.3em;">出错</p>
|
||||
</div>
|
||||
<div id="page_result" class="page" style="width: 100%;max-width: none;overflow-x: hidden;">
|
||||
<!--Body-->
|
||||
<div class="p_bg"></div>
|
||||
<div id="base_item" class="weui_cell p_fg hide">
|
||||
<!--Demo-->
|
||||
<div class="weui_cell_hd">
|
||||
<div class="ti_icon point"></div>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p class='ti_name'>修理人员</p>
|
||||
<p class='ti_status'>修后状态</p>
|
||||
<p class="ti_remark">修理心得</p>
|
||||
</div>
|
||||
<div class="ti_time" class="weui_cell_ft">修理时间</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
31
src/man/track.sub.html
Normal file
31
src/man/track.sub.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<!-- @extend ../part/wrap/head.part.html -->记录操作历史(子页面)<!-- @endextend -->
|
||||
|
||||
<!-- @include ../part/common_js_loader.part.html -->
|
||||
<script>
|
||||
//加载基本函数库,并且验证微信
|
||||
window.allowDesktop = {};
|
||||
NMJsLoader('../cdn/functions.js', 'functions');
|
||||
</script>
|
||||
|
||||
<!-- @include ../part/common_head_style.part.html -->
|
||||
<!--加载lytable样式表-->
|
||||
<link id="style_log_track" rel="stylesheet" href="css/track.sub.css?<!--@echo TIME-->"></link>
|
||||
<!--<script>NMLoadCSS(style_log_track,'css/track.sub.css','log_track');</script>-->
|
||||
|
||||
|
||||
<!-- @include ../part/wrap/headbody_sub.part.html -->
|
||||
|
||||
<input type="hidden" id="token" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
|
||||
|
||||
<!-- @include part/track.sub/body.part.html -->
|
||||
|
||||
<script>
|
||||
window.NMLazyJs = [
|
||||
['zepto', '../cdn/zepto.min.js'],
|
||||
['userfield', '../cdn/userfield.js'],
|
||||
['man_log_track','js/track.sub.js'],
|
||||
];
|
||||
</script>
|
||||
<!-- @include ../part/result_tail_script.part.html -->
|
||||
</body>
|
||||
</html>
|
||||
9
src/page_result/egg_loader.part.html
Normal file
9
src/page_result/egg_loader.part.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<!--彩蛋-->
|
||||
<style id="style_egg"></style>
|
||||
<script type="text/javascript">
|
||||
var ts = parseInt(new Date().getTime()/1000);
|
||||
if(ts%53==1){
|
||||
NMJsLoader('../egg/doge.js','egg_doge');
|
||||
NMLoadCSS(style_egg,'../egg/doge.css','egg_doge');
|
||||
}
|
||||
</script>
|
||||
96
src/page_result/result.js
Normal file
96
src/page_result/result.js
Normal file
@@ -0,0 +1,96 @@
|
||||
//localStorage.clear();//DEBUG FIXME
|
||||
/*
|
||||
* 显示绑定结果
|
||||
*/
|
||||
//消息图标
|
||||
$icon = NMFunc.e('icon_main');
|
||||
//消息简述
|
||||
$brief = NMFunc.e('text_brief');
|
||||
//消息标题
|
||||
$title = NMFunc.e('text_title');
|
||||
//确定按钮
|
||||
$btn = NMFunc.e('btn_ok');
|
||||
|
||||
$btn.onclick = function(){
|
||||
WeixinJSBridge.call('closeWindow');
|
||||
};
|
||||
|
||||
//获得参数
|
||||
var up = NMFunc.getURLParam;
|
||||
var op = parseInt( up('op' , 0 ));
|
||||
var type = parseInt( up('type' , -1));
|
||||
//msg,title和icon为自定义标题,说明,图标样式,在type存在并且不为88时生效,否则为默认标题,说明,图标样式
|
||||
var msg = up('msg' , '').replace(/\+/g,' ');
|
||||
var title = up('title' , '').replace(/\+/g,' ');
|
||||
var btnStatus = up('btn' , '');
|
||||
var icon = up('icon' , '');
|
||||
window.gotoPage = up('redirect' , '');
|
||||
|
||||
//设置整个文档的标题
|
||||
document.title = title || genDocTitle(op, type);
|
||||
//如果需要跳转
|
||||
gotoPage && setTimeout('window.location.href=gotoPage;',3500);
|
||||
|
||||
switch(type){
|
||||
case 88:
|
||||
showResult('抱歉', '可能我们忘记告诉您 \n 请使用微信访问我们的平台 ( > c < ) ', 'weui_icon_info');
|
||||
break;
|
||||
case 1:
|
||||
showResult(title || getSuccessTitle(op),
|
||||
msg || '点击 确定 退出页面',
|
||||
icon || 'weui_icon_success');
|
||||
btnStatus == 'hide' || showButton(btnStatus || '确定','weui_btn_primary');
|
||||
break;
|
||||
case 0:
|
||||
showResult(title || getFailTitle(op),
|
||||
msg || (getFailTitle(op) + '.Sola不说是什么原因,让你猜'),
|
||||
icon || 'weui_icon_warn');
|
||||
btnStatus == 'hide' || showButton(btnStatus || '关闭','weui_btn_warn');
|
||||
break;
|
||||
default://-1
|
||||
showResult('警告你哦', '不要乱来,我们已经记录你的微信信息了哦', 'weui_icon_safe_warn');
|
||||
}
|
||||
|
||||
|
||||
//* 生成用于当前HTML文档的标题
|
||||
//* op: 操作, type: 操作结果类型
|
||||
function genDocTitle(op,type){
|
||||
if(type == 88)//非微信访问
|
||||
return '(。・`ω´・)抱歉';
|
||||
var t = [['', '绑定结果' ], ['', '查询失败' ], ['报修失败', '报修成功' ], ['', '' ], ['修改失败', '修改成功' ] ];
|
||||
return (t[op] && t[op][type]) || '非法请求';
|
||||
}
|
||||
|
||||
//将信息显示出来
|
||||
function showResult(title, msg, iconClass) {
|
||||
addClass($icon, iconClass);
|
||||
$title.innerText = title;
|
||||
$brief.innerText = msg;
|
||||
}
|
||||
//将按钮显示出来
|
||||
function showButton(text, btnClass) {
|
||||
addClass($btn,btnClass);
|
||||
$btn.innerText = text;
|
||||
removeClass($btn,'hide');
|
||||
}
|
||||
|
||||
function getSuccessTitle(op){
|
||||
var t = ['绑定成功','','修改成功']
|
||||
return t[op] || '报修成功';
|
||||
}
|
||||
function getFailTitle(op){
|
||||
var t = ['绑定失败', '查询出错', '报修出错', '修改失败'];t[10] = '页面失效';
|
||||
return t[op] || '操作有误';
|
||||
}
|
||||
|
||||
/*
|
||||
* DOM样式操作
|
||||
*/
|
||||
function hasClass(e, c){return new RegExp('(\\s|^)' + c + '(\\s|$)').test(e.className);}
|
||||
function addClass(e, c) {
|
||||
hasClass(e, c) || (e.className += ' ' + c );
|
||||
}
|
||||
function removeClass(e, c) {
|
||||
if(hasClass(e, c))
|
||||
e.className = e.className.replace(new RegExp('(\\s|^)' + c + '(\\s|$)'),' ');
|
||||
}
|
||||
16
src/part/_tail_info.part.html
Normal file
16
src/part/_tail_info.part.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<i class="weui_icon_info"></i>
|
||||
<p class="mark">
|
||||
电子科技大学中山学院网络维护科
|
||||
</p>
|
||||
<p>©
|
||||
<a href="<!-- @echo URL_LIUYUE_LINK -->">刘越</a> 2020 and Background by
|
||||
<a href="<!-- @echo URL_SOLA_LINK -->">Sola</a>
|
||||
</p>
|
||||
<p>Maintenance by
|
||||
<a href="<!-- @echo URL_HTROY_LINK -->">Htroy</a> &
|
||||
<a href="<!-- @echo URL_JAY_LINK -->">Jay</a>
|
||||
</p>
|
||||
<p class="small">
|
||||
<span>architecture:</span><span class="mark"><!-- @echo VERSION --></span> |
|
||||
<span>updated:</span><span class="mark"><!-- @echo TIME --></span>
|
||||
</p>
|
||||
3
src/part/common_head_meta.part.html
Normal file
3
src/part/common_head_meta.part.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
|
||||
2
src/part/common_head_style.part.html
Normal file
2
src/part/common_head_style.part.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<link rel="stylesheet" href="../cdn/weui.min.css?<!-- @echo TIME -->"></link>
|
||||
<link rel="stylesheet" href="../cdn/common.css?<!-- @echo TIME -->"></link>
|
||||
27
src/part/common_js_loader.part.html
Normal file
27
src/part/common_js_loader.part.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<script>
|
||||
//Js文件加载器
|
||||
//jsName==undefine 表示不缓存
|
||||
//onlyCache==true 表示只缓存不执行(默认执行)
|
||||
function NMJsLoader(jsPath,jsName,onlyCache){
|
||||
jsName = undefined;//TODO Debug Mode
|
||||
var check = '<!-- @echo TIME -->';
|
||||
var lp = 'zsxy_nm_cache_';
|
||||
if(jsName && localStorage){
|
||||
var cache = localStorage.getItem(lp+jsName);
|
||||
if(cache){
|
||||
var obj = JSON.parse(cache);
|
||||
if(check == obj.check)
|
||||
return onlyCache || (console.log('使用缓存:'+jsName),eval(obj.script));
|
||||
}
|
||||
}
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("get",jsPath+'?'+check, false);//console.clear();
|
||||
xhr.send();
|
||||
if(xhr.status==200){
|
||||
var obj = {'check':check,'script':xhr.responseText};
|
||||
if(jsName)localStorage.setItem(lp+jsName,JSON.stringify(obj));
|
||||
return onlyCache || eval(obj.script);
|
||||
}
|
||||
alert('页面加载出错,指定文件无法被下载!\n'+jsPath);
|
||||
}
|
||||
</script>
|
||||
3
src/part/common_tail_info.part.html
Normal file
3
src/part/common_tail_info.part.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="bottom">
|
||||
<!-- @include _tail_info.part.html -->
|
||||
</div>
|
||||
3
src/part/common_tail_info_fixed.part.html
Normal file
3
src/part/common_tail_info_fixed.part.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="bottom weui_extra_area">
|
||||
<!-- @include _tail_info.part.html -->
|
||||
</div>
|
||||
4
src/part/man_backhome.part.html
Normal file
4
src/part/man_backhome.part.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<!-- 返回主页按钮 -->
|
||||
<a class="weui_btn weui_btn_mini weui_btn_default"
|
||||
style="margin: 0 0 .5em 0;padding: 5px 50px;"
|
||||
href="javascript:NMFunc.route('home.html');">返回主页</a>
|
||||
13
src/part/man_tail_script.part.html
Normal file
13
src/part/man_tail_script.part.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<script>
|
||||
//加载延时加载的Javascript
|
||||
window.NMloadLazyJs = function(){
|
||||
if(window.NMLazyJs)
|
||||
setTimeout(function(){
|
||||
var p = NMLazyJs;
|
||||
for(var i=0;i<p.length;i++)
|
||||
NMJsLoader(p[i][1],p[i][0],p[i][2]);
|
||||
},500);
|
||||
};
|
||||
//验证SolaToken
|
||||
SToken.init(NMFunc.getURLParam('token'),'token');
|
||||
</script>
|
||||
12
src/part/result_tail_script.part.html
Normal file
12
src/part/result_tail_script.part.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!--这个tail适用与不需要自动验证SToken的页面-->
|
||||
<!-- result.html xx.sub.html -->
|
||||
|
||||
<script>
|
||||
//加载延时加载的Javascript
|
||||
if(window.NMLazyJs)
|
||||
setTimeout(function(){
|
||||
var p = NMLazyJs;
|
||||
for(var i=0;i<p.length;i++)
|
||||
NMJsLoader(p[i][1],p[i][0],p[i][2]);
|
||||
},100);
|
||||
</script>
|
||||
13
src/part/usr_tail_script.part.html
Normal file
13
src/part/usr_tail_script.part.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<script>
|
||||
//加载延时加载的Javascript
|
||||
window.NMloadLazyJs = function(){
|
||||
if(window.NMLazyJs)
|
||||
setTimeout(function(){
|
||||
var p = NMLazyJs;
|
||||
for(var i=0;i<p.length;i++)
|
||||
NMJsLoader(p[i][1],p[i][0],p[i][2]);
|
||||
},1000);
|
||||
};
|
||||
//验证SolaToken
|
||||
SToken.init(NMFunc.getURLParam('token'),'token');
|
||||
</script>
|
||||
2
src/part/wrap/body_desc.part.html
Normal file
2
src/part/wrap/body_desc.part.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<p class="desc"><!-- @extendable --></p>
|
||||
</div>
|
||||
2
src/part/wrap/body_head.part.html
Normal file
2
src/part/wrap/body_head.part.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<div class="head">
|
||||
<h1 class="title"><!-- @extendable --></h1>
|
||||
7
src/part/wrap/head.part.html
Normal file
7
src/part/wrap/head.part.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- @include ../common_head_meta.part.html -->
|
||||
<title>
|
||||
<!-- @extendable -->
|
||||
</title>
|
||||
4
src/part/wrap/headbody.part.html
Normal file
4
src/part/wrap/headbody.part.html
Normal file
@@ -0,0 +1,4 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- @extendable -->
|
||||
<div class="page">
|
||||
4
src/part/wrap/headbody_man.part.html
Normal file
4
src/part/wrap/headbody_man.part.html
Normal file
@@ -0,0 +1,4 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- @extendable -->
|
||||
<div class="page" style="max-width: 1224px;">
|
||||
6
src/part/wrap/headbody_result.part.html
Normal file
6
src/part/wrap/headbody_result.part.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<!-- 为result.html 适用的headbody.part.html -->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- @extendable -->
|
||||
<div class="weui_msg">
|
||||
3
src/part/wrap/headbody_sub.part.html
Normal file
3
src/part/wrap/headbody_sub.part.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<!-- 为xxx.sub.html 适用的headbody.part.html -->
|
||||
</head>
|
||||
<body>
|
||||
5
src/part/wrap/tail.part.html
Normal file
5
src/part/wrap/tail.part.html
Normal file
@@ -0,0 +1,5 @@
|
||||
</div>
|
||||
<!-- @include ../common_tail_info.part.html -->
|
||||
<!-- @extendable -->
|
||||
</body>
|
||||
</html>
|
||||
5
src/part/wrap/tail_fixed.part.html
Normal file
5
src/part/wrap/tail_fixed.part.html
Normal file
@@ -0,0 +1,5 @@
|
||||
</div>
|
||||
<!-- @include ../common_tail_info_fixed.part.html -->
|
||||
<!-- @extendable -->
|
||||
</body>
|
||||
</html>
|
||||
42
src/result.html
Normal file
42
src/result.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!-- @extend part/wrap/head.part.html -->结果<!-- @endextend -->
|
||||
|
||||
<!-- head内容(title之后的内容) -->
|
||||
|
||||
<base href="<!-- @echo VERSION -->/cdn" />
|
||||
|
||||
<!-- @include part/common_js_loader.part.html -->
|
||||
<script>
|
||||
//加载基本函数库,并且验证微信
|
||||
window.allowDesktop={};
|
||||
NMJsLoader('../cdn/functions.js','functions');
|
||||
</script>
|
||||
|
||||
<!-- @include part/common_head_style.part.html -->
|
||||
<style>body{overflow: hidden;}</style>
|
||||
|
||||
<!-- @extend part/wrap/headbody_result.part.html -->
|
||||
<!-- Body最开头的内容 -->
|
||||
<!-- @endextend -->
|
||||
|
||||
<div class="weui_icon_area">
|
||||
<i id="icon_main" class="weui_icon_msg"></i></div>
|
||||
<div class="weui_text_area">
|
||||
<h2 id="text_title" class="weui_msg_title"><!--标题--></h2>
|
||||
<p id="text_brief" class="weui_msg_desc"><!--简介--></p>
|
||||
</div>
|
||||
<div class="weui_opr_area">
|
||||
<p class="weui_btn_area">
|
||||
<a id="btn_ok" href="javascript:;" class="weui_btn hide">完成</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- @extend part/wrap/tail_fixed.part.html -->
|
||||
<!-- body尾部的脚本-->
|
||||
<script>
|
||||
window.NMLazyJs=[
|
||||
['page_result','../page_result/result.js'],
|
||||
];
|
||||
</script>
|
||||
<!-- @include part/result_tail_script.part.html -->
|
||||
<!-- include-static page_result/egg_loader.part.html -->
|
||||
<!-- @endextend -->
|
||||
3
src/tmpl/ajax/index.ajax.html
Normal file
3
src/tmpl/ajax/index.ajax.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<center>
|
||||
只是文档内容
|
||||
</center>
|
||||
20
src/tmpl/index.html
Normal file
20
src/tmpl/index.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!-- @extend ../part/wrap/head.part.html -->
|
||||
模版标题
|
||||
<!-- @endextend -->
|
||||
<!-- @include ../part/common_head_style.part.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/headbody.part.html --><!-- @endextend -->
|
||||
|
||||
<!-- @extend ../part/wrap/body_head.part.html -->
|
||||
这是页面上的标题
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @extend ../part/wrap/body_desc.part.html -->
|
||||
页面上的描述
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @include ajax/index.ajax.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/tail_fixed.part.html -->
|
||||
<!-- @include ../part/usr_tail_script.part.html -->
|
||||
<!-- @endextend -->
|
||||
71
src/user/js/list.js
Normal file
71
src/user/js/list.js
Normal file
@@ -0,0 +1,71 @@
|
||||
SToken.opera = 1;
|
||||
|
||||
queryStart();
|
||||
|
||||
/*
|
||||
* ------------------------------------------
|
||||
* ________________处理结果___________________
|
||||
* ------------------------------------------
|
||||
*/
|
||||
//@XXX window.listResult
|
||||
function onFillTable(row,col,head){
|
||||
switch(col){
|
||||
case 0:return listResult[row].id;
|
||||
case 1:return userf.getStatHTML(listResult[row].status);
|
||||
case 2:return userf.getDate(listResult[row].submitTime);
|
||||
case 3:return listResult[row].description.replace(/\n/g,'<br />');
|
||||
}
|
||||
}
|
||||
function onClickTable(){
|
||||
var id = $(this).attr('data-row');
|
||||
var ret = listResult[id];
|
||||
if(ret.status == undefined || ret.status == 0)return ;
|
||||
var fix_people = '外星人⊙﹏⊙‖∣';if(ret.operator!=undefined && ret.operator.name!=undefined)fix_people = ret.operator.name;
|
||||
var fix_date = '遇见你的那一天';if(ret.updateTime!=undefined)fix_date = userf.getDate(ret.updateTime);
|
||||
var fix_desc = '轻轻的他走了,不留下一点描述....';if(ret.remark!=undefined)fix_desc = ret.remark;
|
||||
var god = fix_people.toLowerCase();
|
||||
if(god =='sola' || god == '\u5218\u8d8a' || god == '\u59dc\u5b50\u9e92')
|
||||
$('#text_fix_id').addClass('god');
|
||||
else $('#text_fix_id').removeClass('god');
|
||||
$('#text_fix_id').text(fix_people);
|
||||
$('#text_fix_date').text(fix_date);
|
||||
$('#text_fix_remark').text(fix_desc);
|
||||
$('#dlg_fixinfo').show();
|
||||
|
||||
}
|
||||
|
||||
function handlerResult(){
|
||||
var head = ['编号','状态','报修日期','简述'];
|
||||
var tb = $('#tb_result');
|
||||
tb.tableFill(head,listResult.length,onFillTable);
|
||||
tb.lyTable();
|
||||
$('#tb_result tbody tr').each(function(i){
|
||||
$(this).attr('data-row',i);
|
||||
}).unbind('click').click(onClickTable);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* -------------------------------------------
|
||||
* _______________查询方法_____________________
|
||||
* -------------------------------------------
|
||||
*/
|
||||
//是时候去查询了
|
||||
function queryStart() {
|
||||
var queryURL = '/*@echo URL_SOLA_TICKET_QUERY*/?token='+$('#token').val()+'&';
|
||||
NMFunc.reqServer(queryURL, list_queryDone, 0, solaDisappear);
|
||||
}
|
||||
//查询到结果了
|
||||
function list_queryDone(data,param){
|
||||
$('#queryingToast').hide();
|
||||
if(!data.errCode){
|
||||
window.listResult = data;
|
||||
handlerResult();
|
||||
}else{
|
||||
NMFunc.result(1, 0, data.errMsg || '页面过期');
|
||||
}
|
||||
}
|
||||
//Sola消失了
|
||||
function solaDisappear(){
|
||||
NMFunc.result(1,0,'Sola端出问题了,无法回应你的查询请求');
|
||||
}
|
||||
169
src/user/js/modi.js
Normal file
169
src/user/js/modi.js
Normal file
@@ -0,0 +1,169 @@
|
||||
//设置SToken的操作为(3)(修改资料)
|
||||
SToken.opera = 3;
|
||||
|
||||
//页面上重要的控件对象
|
||||
btn_sb = $('#btn_bind');
|
||||
text_warn = $('#text_error');
|
||||
|
||||
text_name = $('#name');
|
||||
text_sid = $('#sid');
|
||||
sel_isp = $('#isp');
|
||||
text_user = $('#username');
|
||||
text_room = $('#room');
|
||||
text_phone = $('#phone');
|
||||
|
||||
/*
|
||||
* 从URL加载用户资料
|
||||
*/
|
||||
var getP = NMFunc.getURLParam;
|
||||
(function(pArr){
|
||||
for(var k in pArr){
|
||||
var v = getP(k,pArr[k]);
|
||||
$('#'+k).val(typeof pArr[k] == 'number' ? parseInt(v) : v);
|
||||
}
|
||||
})({
|
||||
'name' : 'Sola丢了你的姓名',
|
||||
'phone' :'',
|
||||
'room' :'',
|
||||
'username' :'⊙ˍ⊙Sola不告诉我你的帐号',
|
||||
'block' :12,
|
||||
'isp' :1
|
||||
});
|
||||
|
||||
|
||||
//字段的正则匹配式
|
||||
rule_user = [
|
||||
/^1\d{10}$/g,//电
|
||||
/^ZS(?:ZJLAN)?\d{10}@16900.gd$/g,//联
|
||||
/^1\d{10}@139.gd$/g,//移
|
||||
/^\S+$/g];//其
|
||||
rule_room = /^[1-9]{1}\d{2,4}$/g;
|
||||
rule_phone = /^1\d{10}$/g;
|
||||
|
||||
//绑定字段合法性检测事件(光标移开时)
|
||||
sel_isp.blur(checkUserFromISP);
|
||||
text_user.blur(checkUser);
|
||||
text_room.blur(checkRoom);
|
||||
text_phone.blur(checkPhone);
|
||||
|
||||
//提交绑定
|
||||
btn_sb.click(function(){
|
||||
text_warn.hide();
|
||||
if(!checkUser()){text_user.focus();return false;}
|
||||
if(!checkRoom()){text_room.focus();return false;}
|
||||
if(!checkPhone()){text_phone.focus();return false;}
|
||||
modiRequest();
|
||||
return true;
|
||||
});
|
||||
|
||||
/*
|
||||
* 收到Sola端传来的数据
|
||||
*/
|
||||
window.onModiResult = function(data,param){
|
||||
$('#loadingToast').hide();
|
||||
var code = parseInt(data.errCode || 0);
|
||||
switch(code){
|
||||
case 0:
|
||||
//正常
|
||||
return NMFunc.result(3,1);
|
||||
case -20:
|
||||
case -9://Auth验证错误,跳转
|
||||
return NMFunc.result(3,0,data.errMsg);
|
||||
case -5://输入错误,显示错误即可
|
||||
if(data.errMsg)
|
||||
return alert('Sola说你的输入有误,但是他不告诉你是哪儿有误~~');
|
||||
bindErrorInput(data.errMsg);
|
||||
return ;
|
||||
default:
|
||||
alert('Sola端服务器通信异常,返回的数据我不认识了(⊙0⊙)!\n状态码:'+code+'\n描述:'+data.errMsg);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 从Sola返回结果中绑定错误字段
|
||||
*/
|
||||
function bindErrorInput(retMsg){
|
||||
console.warn
|
||||
retMsg = retMsg.toUpperCase().trim();
|
||||
var e = undefined;
|
||||
var eMsg = '';
|
||||
while(true){
|
||||
if(retMsg.indexOf('DUPLICATED_')>=0){//字段重复
|
||||
if(retMsg.indexOf('PHONE')>=0){
|
||||
e = text_phone; eMsg = '当前联系方式已被绑定';break;
|
||||
}else if(retMsg.indexOf('ACCOUNT')>=0){
|
||||
e = text_user; eMsg = '当前宽带账户已被绑定';break;
|
||||
}else if(retMsg.indexOf('WECHAT')>=0){
|
||||
return NMFunc.result(3,0,'当前微信已被绑定');
|
||||
}
|
||||
}
|
||||
if(retMsg == 'USER_ALREADY_REGISTERED'){
|
||||
return NMFunc.result(3,0,'当前微信已被绑定');
|
||||
}
|
||||
if(retMsg.indexOf('INVALID_')>=0){//字段不合法
|
||||
if(retMsg.indexOf('ISP')>=0 || retMsg.indexOf('ACCOUNT')>=0){
|
||||
e = text_user;eMsg = '请输入正确的宽带帐号';break;
|
||||
}
|
||||
if(retMsg.indexOf('ROOM')>=0){
|
||||
e = text_room;eMsg = '请输入正确的宿舍号';break;
|
||||
}
|
||||
if(retMsg.indexOf('PHONE')>=0){
|
||||
e = text_phone;eMsg = '请输入正确的手机号';break;
|
||||
}
|
||||
}
|
||||
alert('Sola说:\n\t'+retMsg+'\nP.s.他之前没和我说过这个,所以我也不知道什么意思.(∵)nnn');
|
||||
return;}
|
||||
hasError(e,eMsg)
|
||||
}
|
||||
|
||||
//Sola消失了
|
||||
function solaDisappear(){
|
||||
$('#loadingToast').hide();
|
||||
alert('Sola端出问题了,无法回应你的报修请求');
|
||||
}
|
||||
|
||||
/*
|
||||
* 当用户点击注册时
|
||||
*/
|
||||
function modiRequest(){
|
||||
baseURL = '/*@echo URL_SOLA_MODI*/?';
|
||||
var regURL = baseURL
|
||||
+'&phone='+text_phone.val()
|
||||
+'&room='+text_room.val()
|
||||
+'&username='+encodeURIComponent(text_user.val())
|
||||
+'&block='+$('#block').val()
|
||||
+'&isp='+sel_isp.val()
|
||||
+'&token='+$('#token').val()
|
||||
+'&';
|
||||
|
||||
$('#loadingToast').show();
|
||||
NMFunc.reqServer(regURL, onModiResult, 0, solaDisappear);
|
||||
}
|
||||
|
||||
function hasError(e,errmsg){
|
||||
if(e!=undefined && e!=null)
|
||||
e.parents(".weui_cell").addClass("weui_cell_warn");
|
||||
text_warn.text(errmsg);
|
||||
text_warn.show();
|
||||
}
|
||||
function hasnotError(e){
|
||||
e.parents(".weui_cell").removeClass("weui_cell_warn");
|
||||
text_warn.hide();
|
||||
}
|
||||
function checkUserFromISP(){
|
||||
if(text_user.val().trim().length>0)
|
||||
checkUser();
|
||||
}
|
||||
|
||||
function checkUser(){
|
||||
if(!text_user.val().trim().match(rule_user[sel_isp.val()-1])){
|
||||
hasError(text_user,"请输入正确的宽带帐号");return false;
|
||||
}else{hasnotError(text_user);}return true;
|
||||
}
|
||||
function checkRoom(){
|
||||
if(!text_room.val().match(rule_room)){hasError(text_room,"请输入正确的宿舍房号");return false;}
|
||||
else{hasnotError(text_room);}return true;
|
||||
}
|
||||
function checkPhone(){
|
||||
if(!text_phone.val().match(rule_phone)){hasError(text_phone,"请输入正确的手机号码");return false;}
|
||||
else{hasnotError(text_phone);}return true;
|
||||
}
|
||||
185
src/user/js/reg.js
Normal file
185
src/user/js/reg.js
Normal file
@@ -0,0 +1,185 @@
|
||||
|
||||
//页面上重要的控件对象
|
||||
btn_sb = $('#btn_bind');
|
||||
text_warn = $('#text_error');
|
||||
|
||||
text_name = $('#name');
|
||||
text_sid = $('#sid');
|
||||
sel_isp = $('#isp');
|
||||
text_user = $('#username');
|
||||
text_room = $('#room');
|
||||
text_phone = $('#phone');
|
||||
|
||||
//字段的正则匹配式
|
||||
// rule_sid = /^20\d{11}$/g;
|
||||
rule_sid = /^[0-9A-Za-z]{1,20}$/g;
|
||||
rule_name = /^\S{2,5}$/g;
|
||||
rule_user = [
|
||||
/^1\d{10}$/g,//电
|
||||
/^ZS(?:ZJLAN)?\d{10}@16900.gd$/g,//联
|
||||
/^1\d{10}@139.gd$/g,//移
|
||||
/^\S+$/g];//其
|
||||
rule_room = /^[1-9]{1}\d{2,4}$/g;
|
||||
rule_phone = /^1\d{10}$/g;
|
||||
|
||||
//绑定字段合法性检测事件(光标移开时)
|
||||
text_name.blur(checkName);
|
||||
text_sid.blur(checkSid);
|
||||
sel_isp.blur(checkUserFromISP);
|
||||
text_user.blur(checkUser);
|
||||
text_room.blur(checkRoom);
|
||||
text_phone.blur(checkPhone);
|
||||
|
||||
//提交绑定
|
||||
btn_sb.click(function(){
|
||||
text_warn.hide();
|
||||
if(!checkName()){text_name.focus();return false;}
|
||||
if(!checkSid()){text_sid.focus();return false;}
|
||||
if(!checkUser()){text_user.focus();return false;}
|
||||
if(!checkRoom()){text_room.focus();return false;}
|
||||
if(!checkPhone()){text_phone.focus();return false;}
|
||||
regRequest();
|
||||
return true;
|
||||
});
|
||||
|
||||
/*
|
||||
* 收到Sola端传来的数据
|
||||
*/
|
||||
window.onRegResult = function(data,param){
|
||||
$('#loadingToast').hide();
|
||||
var code = parseInt(data.errCode || 0);
|
||||
switch(code){
|
||||
case 0://注册成功
|
||||
return NMFunc.result(0,1);
|
||||
case -20:
|
||||
case -9://Auth验证错误,跳转
|
||||
return NMFunc.result(0,0,data.errMsg);
|
||||
case -5://输入错误,显示错误即可
|
||||
if(!data.errMsg)
|
||||
return alert('Sola说你的输入有误,但是他不告诉你是哪儿有误~~');
|
||||
bindErrorInput(data.errMsg);
|
||||
return ;
|
||||
default:
|
||||
alert('Sola端服务器通信异常,返回的数据我不认识了(⊙0⊙)!\n状态码:'+code+'\n描述:'+data.errMsg);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 从Sola返回结果中绑定错误字段
|
||||
*/
|
||||
function bindErrorInput(retMsg){
|
||||
retMsg = retMsg.toUpperCase().trim();
|
||||
var e = undefined;
|
||||
var eMsg = '';
|
||||
while(true){
|
||||
if(retMsg.indexOf('DUPLICATED_')>=0){//字段重复
|
||||
if(retMsg.indexOf('PHONE')>=0){
|
||||
e = text_phone; eMsg = '当前联系方式已被绑定';break;
|
||||
}else if(retMsg.indexOf('ACCOUNT')>=0){
|
||||
e = text_user; eMsg = '当前宽带账户已被绑定';break;
|
||||
}else if(retMsg.indexOf('WECHAT')>=0){
|
||||
window.location.href = '/*@echo URL_RESULT */?type=0&msg=当前微信已被绑定';return ;
|
||||
}
|
||||
}
|
||||
if(retMsg == 'USER_ALREADY_REGISTERED'){
|
||||
window.location.href = '/*@echo URL_RESULT */?type=0&msg=当前微信已绑定';return ;
|
||||
}
|
||||
if(retMsg.indexOf('INVALID_')>=0){//字段不合法
|
||||
if(retMsg.indexOf('STUDENT')>=0){
|
||||
e = text_sid;eMsg = '请输入正确的学号(后端验证失败)';break;
|
||||
}
|
||||
if(retMsg.indexOf('NAME')>=0){
|
||||
e = text_name;eMsg = '请输入正确的姓名(后端验证失败)';break;
|
||||
}
|
||||
if(retMsg.indexOf('ISP')>=0 || retMsg.indexOf('ACCOUNT')>=0){
|
||||
e = text_user;eMsg = '请输入正确的宽带帐号(后端验证失败)';break;
|
||||
}
|
||||
if(retMsg.indexOf('ROOM')>=0){
|
||||
e = text_room;eMsg = '请输入正确的宿舍号(后端验证失败)';break;
|
||||
}
|
||||
if(retMsg.indexOf('PHONE')>=0){
|
||||
e = text_phone;eMsg = '请输入正确的手机号(后端验证失败)';break;
|
||||
}
|
||||
}
|
||||
alert('Sola说:\n\t'+retMsg+'\nP.s.他之前没和我说过这个,所以我也不知道什么意思.(∵)nnn');
|
||||
return;}
|
||||
hasError(e,eMsg)
|
||||
}
|
||||
|
||||
//Sola消失了
|
||||
function solaDisappear(){
|
||||
window.location.href = '/*@echo URL_RESULT */?op=1&type=0&msg=Sola端出问题了,无法回应你的报修请求';
|
||||
}
|
||||
|
||||
/*
|
||||
* 当用户点击注册时
|
||||
*/
|
||||
function regRequest(){
|
||||
baseURL = '/*@echo URL_SOLA_REG */?';
|
||||
var regURL = baseURL
|
||||
+'name='+encodeURIComponent(text_name.val())
|
||||
+'&sid='+String(text_sid.val()).replace(/^JJ/i, '').replace(/^Z/i, '')
|
||||
+'&phone='+text_phone.val()
|
||||
+'&room='+text_room.val()
|
||||
+'&username='+encodeURIComponent(text_user.val())
|
||||
+'&block='+$('#block').val()
|
||||
+'&isp='+sel_isp.val()
|
||||
+'&token='+$('#token').val()
|
||||
+'&';
|
||||
$('#loadingToast').show();
|
||||
NMFunc.reqServer(regURL, onRegResult, 0, solaDisappear);
|
||||
}
|
||||
|
||||
function hasError(e,errmsg,nofocus){
|
||||
if(nofocus==undefined)nofocus=false;
|
||||
if(e!=undefined && e!=null)
|
||||
e.parents(".weui_cell").addClass("weui_cell_warn");
|
||||
if(!nofocus)e.focus();
|
||||
text_warn.text(errmsg);
|
||||
text_warn.show();
|
||||
}
|
||||
function hasnotError(e){
|
||||
e.parents(".weui_cell").removeClass("weui_cell_warn");
|
||||
text_warn.hide();
|
||||
}
|
||||
function checkName(){
|
||||
if(!text_name.val().match(rule_name)){
|
||||
hasError(text_name,"请输入正确的姓名",isThisAInput(this));
|
||||
return false;
|
||||
}else{hasnotError(text_name);return true;}
|
||||
}
|
||||
function checkSid(){
|
||||
if(!text_sid.val().match(rule_sid)){
|
||||
hasError(text_sid,"请输入正确的学号",isThisAInput(this));
|
||||
return false;
|
||||
}else{hasnotError(text_sid);}return true;
|
||||
}
|
||||
function checkUserFromISP(){
|
||||
if(text_user.val().trim().length>0)
|
||||
checkUser();
|
||||
}
|
||||
|
||||
function checkUser(){
|
||||
if(!text_user.val().trim().match(rule_user[sel_isp.val()-1])){
|
||||
hasError(text_user,"请输入正确的宽带帐号",isThisAInput(this));
|
||||
return false;
|
||||
}else{hasnotError(text_user);}return true;
|
||||
}
|
||||
function checkRoom(){
|
||||
if(!text_room.val().match(rule_room)){
|
||||
hasError(text_room,"请输入正确的宿舍房号",isThisAInput(this));
|
||||
return false;
|
||||
}else{hasnotError(text_room);}return true;
|
||||
}
|
||||
function checkPhone(){
|
||||
if(!text_phone.val().match(rule_phone)){
|
||||
hasError(text_phone,"请输入正确的手机号码",isThisAInput(this));
|
||||
return false;
|
||||
}else{hasnotError(text_phone);}return true;
|
||||
}
|
||||
/*
|
||||
* 判断检测报错的对象是否来自输入控件
|
||||
*/
|
||||
function isThisAInput(obj){
|
||||
if(!obj.outerHTML)return false;
|
||||
return obj.outerHTML.search(/^<input/g)>=0;
|
||||
}
|
||||
75
src/user/js/rrepair.js
Normal file
75
src/user/js/rrepair.js
Normal file
@@ -0,0 +1,75 @@
|
||||
//设置SToken的操作为(2)(提交报修)
|
||||
SToken.opera = 2;
|
||||
|
||||
$('#cb_sure').change(function(){
|
||||
if(this.checked)$('#div_form').show();
|
||||
else $('#div_form').hide();
|
||||
});
|
||||
$('#btn_subtmit').click(function(){
|
||||
var oriDesc = $('#text_ori_desc').val().trim();
|
||||
if(oriDesc.length == 0){
|
||||
onFormError('请填写一下故障简述吧','cell_dec','textarea');
|
||||
return false;
|
||||
}else if(oriDesc.length >=255){
|
||||
onFormError('请你简述一下就好了,不需要太长的哦','cell_dec','textarea');
|
||||
return false;
|
||||
}
|
||||
var desc = '',tmp;
|
||||
if((tmp = $('#text_date').val()).length != 0){
|
||||
desc += '发生时间: '+tmp+'\n';
|
||||
}
|
||||
if((tmp = $('#text_code').val()).length != 0){
|
||||
desc += '故障代码: '+tmp+'\n';
|
||||
}
|
||||
desc += '故障简述: '+$('#text_ori_desc').val().trim();
|
||||
$('#desc').val(desc);
|
||||
$('#loadingToast').show();
|
||||
var u = '/*@echo URL_SOLA_SUBMIT*/?desc='+encodeURIComponent(desc)+'&token='+$('#token').val()+'&';
|
||||
NMFunc.reqServer(u, rrepair_onSubmit, 0, solaDisappear);
|
||||
return true;
|
||||
});
|
||||
|
||||
loadUserInfo();
|
||||
function loadUserInfo(){
|
||||
var getP = NMFunc.getURLParam;
|
||||
$('#text_user').text(getP('name','霸气的名字'));
|
||||
$('#text_phone').text(getP('phone','外星人的联系方式'));
|
||||
$('#text_room').text(userf.getAllInfo(
|
||||
parseInt(getP('block',0)),getP('room','舍管房间'),
|
||||
parseInt(getP('isp',0))
|
||||
));
|
||||
}
|
||||
/*
|
||||
* --------------------------已经提交----------------------
|
||||
*/
|
||||
//XXX window.crcw 当结果弹窗关闭时关闭窗口
|
||||
window.rrepair_onSubmit = function(data,param){
|
||||
window.crcw = false;
|
||||
$('#failDlg').hide();
|
||||
$('#loadingToast').hide();
|
||||
if(!data.errCode)
|
||||
return NMFunc.result(2,1);
|
||||
data.errCode == -20 && (window.crcw = true);
|
||||
$('#failDlg p').text(data.errMsg || 'Sola居然不说是什么错误...');
|
||||
$('#failDlg').show();
|
||||
}
|
||||
|
||||
//Sola消失了
|
||||
function solaDisappear(){
|
||||
$('#loadingToast').hide();
|
||||
$('#failDlg p').text('Sola端出问题了,无法回应你的报修请求');
|
||||
$('#failDlg').show();
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX 可重用表单错误处理机制
|
||||
*/
|
||||
function onFormError(errMsg,cellId,inputTag){
|
||||
inputTag = inputTag==undefined?'input':inputTag;
|
||||
$('#err_tip').text(errMsg).show();
|
||||
setTimeout(error_hide,2500);
|
||||
$('#'+cellId).addClass('weui_cell_warn')
|
||||
.find(inputTag).unbind('focus').focusout(onError_focus).focus();
|
||||
}
|
||||
function onError_focus(){$(this).parents('.weui_cell').removeClass('weui_cell_warn');}
|
||||
function error_hide(){$('#err_tip').hide();}
|
||||
56
src/user/list.html
Normal file
56
src/user/list.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<!-- @extend ../part/wrap/head.part.html -->查询<!-- @endextend -->
|
||||
<!-- @include ../part/common_js_loader.part.html -->
|
||||
|
||||
<script>
|
||||
//加载基本函数库,并且验证微信
|
||||
// window.allowDesktop={};
|
||||
NMJsLoader('../cdn/functions.js','functions');
|
||||
</script>
|
||||
|
||||
<!-- @include ../part/common_head_style.part.html -->
|
||||
<link rel="stylesheet" id="style_lytable" href="../cdn/lytable.min.css?<!-- @echo TIME-->"></link>
|
||||
<!--<script>NMLoadCSS(document.getElementById(style_lytable),'../cdn/lytable.min.css','lytable');</script>-->
|
||||
|
||||
<!-- @extend ../part/wrap/headbody.part.html -->
|
||||
<!-- Body最开头的内容 -->
|
||||
|
||||
<!-- @include-static part/list/toast_loading.part.html -->
|
||||
<!-- @include-static part/list/dlg_info.part.html -->
|
||||
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @extend ../part/wrap/body_head.part.html -->报修记录<!-- @endextend -->
|
||||
<!-- @extend ../part/wrap/body_desc.part.html -->你最近五单报修记录(点击可以查看处理结果)<!-- @endextend -->
|
||||
|
||||
|
||||
<!-- 表单开始 -->
|
||||
<input type="hidden" id="token" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
|
||||
|
||||
<!--Body-->
|
||||
<table class="table" id="tb_result" style="width: 98%;margin: 0 auto;"></table>
|
||||
|
||||
<div class="weui_cells">
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd">
|
||||
<i class="weui_icon_info_circle"></i>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p style="padding: .3em 0 0 .5em;color: #888;font-size: .8em;">
|
||||
由于环(bo)保(kuan)原因.<br/>数据库只会保留你最近五单的报修记录
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- @extend ../part/wrap/tail.part.html -->
|
||||
<script>
|
||||
window.NMLazyJs=[
|
||||
['zepto','../cdn/zepto.min.js'],
|
||||
['userfield','../cdn/userfield.js'],
|
||||
['lytable','../cdn/lyTableAll.min.js'],
|
||||
['user_list','js/list.js'],
|
||||
];
|
||||
</script>
|
||||
<!-- @include ../part/usr_tail_script.part.html -->
|
||||
<!-- @endextend -->
|
||||
133
src/user/modi.html
Normal file
133
src/user/modi.html
Normal file
@@ -0,0 +1,133 @@
|
||||
<!-- @extend ../part/wrap/head.part.html -->修改资料<!-- @endextend -->
|
||||
<!-- @include ../part/common_js_loader.part.html -->
|
||||
|
||||
<script>
|
||||
//加载基本函数库,并且验证微信
|
||||
// window.allowDesktop={};
|
||||
NMJsLoader('../cdn/functions.js','functions');
|
||||
</script>
|
||||
|
||||
<!-- @include ../part/common_head_style.part.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/headbody.part.html -->
|
||||
<!-- Body最开头的内容 -->
|
||||
<!-- @include-static part/reg/toast_loading.part.html -->
|
||||
<div id="text_error" class="weui_toptips weui_warn"></div>
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @extend ../part/wrap/body_head.part.html -->修改资料<!-- @endextend -->
|
||||
<!-- @extend ../part/wrap/body_desc.part.html -->换手机,换宿舍,换宽带(( ‵ □ ′ )) <!-- @endextend -->
|
||||
|
||||
|
||||
<!--表单开始-->
|
||||
<input type="hidden" id="token" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
|
||||
<div class="weui_cells_title">个人信息</div>
|
||||
<div class="weui_cells weui_cells_form">
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 5em;" >姓名</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" id="name" type="text" placeholder="输入你的大名吧~"/>
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 5em;" >学号</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" id="sid" type="text"/>
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 5em;">联系手机</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary"><input class="weui_input" id="phone" type="number"/></div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="weui_cells_title">宿舍信息</div>
|
||||
<div class="weui_cells weui_cells_form">
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 4em;">宿舍楼号</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<select class="weui_select" type="text" id="block" name="block" style="height: 1.5em;">
|
||||
<!-- @include-static part/reg/select_block.part.html -->
|
||||
</select>
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 5em;">宿舍号</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary"><input class="weui_input" id="room" type="number"/></div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="weui_cells_title">宽带信息</div>
|
||||
<div class="weui_cells weui_cells_form">
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 4em;">运营商</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<select class="weui_select" type="text" id="isp" name="isp" style="height: 1.5em;">
|
||||
<option value="1">电信</option>
|
||||
<option value="2">联通</option>
|
||||
<option value="3">移动</option>
|
||||
<option value="4">其他</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 5em;">宽带帐号</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" id="username" type="text" placeholder="输入你上网用到的账户名" />
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="weui_cells_title" style="margin-top: 0;padding-top: .2em;height: 2.2em;">
|
||||
<a href="javascript:$('#dlg_more').show();">
|
||||
<div style="float: right;margin:.1em 0 0 .5em; color: #7F8C8D;border-bottom: thin solid #7F8C8D;">
|
||||
为什么我的帐号老是不正确?
|
||||
</div>
|
||||
<div style="float: right;"><i class="weui_icon_info_circle"></i></div>
|
||||
</a>
|
||||
<div class="fix_float"></div>
|
||||
</div>
|
||||
|
||||
<!--用户协议-->
|
||||
<div class="weui_cells weui_cells_checkbox" id="div_cb_read" style="background-color: transparent;">
|
||||
<label class="weui_cell weui_check_label" for="cb_read">
|
||||
<div class="weui_cell_hd">
|
||||
<input type="checkbox" class="weui_check" id="cb_read"
|
||||
onchange="if(this.checked)$('#btn_bind').removeAttr('disabled');else $('#btn_bind').attr('disabled','disabled');">
|
||||
<i class="weui_icon_checked"></i>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary" >
|
||||
<p style="margin-top: .3em;">我确认以上信息非冒用他人信息或虚假信息</p>
|
||||
</div>
|
||||
</label>
|
||||
<style type="text/css">
|
||||
#div_cb_read:before,
|
||||
#div_cb_read .weui_cell:before{
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
|
||||
|
||||
<button class="weui_btn weui_btn_primary" id="btn_bind" disabled="disabled">绑定</button>
|
||||
<style>
|
||||
#btn_bind:disabled{color:rgba(255,255,255,.6);}
|
||||
</style>
|
||||
|
||||
<!-- @extend ../part/wrap/tail.part.html -->
|
||||
<script>
|
||||
window.NMLazyJs=[
|
||||
['zepto','../cdn/zepto.min.js'],
|
||||
['user_modi','js/modi.js'],
|
||||
['userfield','../cdn/userfield.js',true],
|
||||
];
|
||||
</script>
|
||||
<!-- @include ../part/usr_tail_script.part.html -->
|
||||
<!-- @endextend -->
|
||||
32
src/user/part/list/dlg_info.part.html
Normal file
32
src/user/part/list/dlg_info.part.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<!-- 维修信息对话框 -->
|
||||
<div id="dlg_fixinfo" class="weui_dialog_alert hide">
|
||||
<div class="weui_mask"></div>
|
||||
<div class="weui_dialog">
|
||||
<div class="weui_dialog_hd"><strong class="weui_dialog_title">反馈信息</strong></div>
|
||||
<div class="weui_article">
|
||||
<h2 class="title">维修人员</h2><p id="text_fix_id"></p>
|
||||
<h2 class="title">维修时间</h2><p id="text_fix_date"></p>
|
||||
<h2 class="title">维修简述</h2><p id="text_fix_remark"></p>
|
||||
</div>
|
||||
<div class="weui_dialog_ft">
|
||||
<a href="javascript:$('#dlg_fixinfo').hide();"
|
||||
class="weui_btn_dialog primary">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.god{
|
||||
-webkit-animation:twink 1s infinite ease;
|
||||
animation:twink 2s infinite ease;
|
||||
}
|
||||
@-webkit-keyframes twink{
|
||||
0%{color: #F1970F;}25%{color: #DA880D;}
|
||||
50%{color: #C2790C;}75%{color: #DA880D;}
|
||||
100%{color: #F1970F;}
|
||||
}
|
||||
@keyframes twink{
|
||||
0%{color: #F1970F;}25%{color: #DA880D;}
|
||||
50%{color: #C2790C;}75%{color: #DA880D;}
|
||||
100%{color: #F1970F;}
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
22
src/user/part/list/toast_loading.part.html
Normal file
22
src/user/part/list/toast_loading.part.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!--查询中的Toast-->
|
||||
<div id="queryingToast" class="weui_loading_toast">
|
||||
<div class="weui_mask_transparent"></div>
|
||||
<div class="weui_toast">
|
||||
<div class="weui_loading">
|
||||
<!-- :) -->
|
||||
<div class="weui_loading_leaf weui_loading_leaf_0"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_1"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_2"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_3"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_4"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_5"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_6"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_7"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_8"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_9"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_10"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_11"></div>
|
||||
</div>
|
||||
<p class="weui_toast_content">查询中</p>
|
||||
</div>
|
||||
</div>
|
||||
16
src/user/part/reg/dlg_binderror.part.html
Normal file
16
src/user/part/reg/dlg_binderror.part.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!--宽带帐号绑定问题 对话框 -->
|
||||
<div id="dlg_more" class="weui_dialog_alert hide">
|
||||
<div class="weui_mask"></div>
|
||||
<div class="weui_dialog">
|
||||
<div class="weui_dialog_hd"><strong class="weui_dialog_title">账号问题</strong></div>
|
||||
<div class="weui_dialog_bd">
|
||||
非常抱歉!<br />
|
||||
由于目前校园中存在的宽带的帐号类型很多,导致目前的宽带帐号校检存在一定局限性,
|
||||
若你目前填入的宽带帐号是正确的但被提示错误,你可以在<b>宽带</b>处选择<i>其他</i>一项
|
||||
并在<b>宽带账户</b>前面填写你开通的宽带类型(<i>电信</i>,<i>移动</i>,<i>联通</i>)即可.<br />
|
||||
</div>
|
||||
<div class="weui_dialog_ft">
|
||||
<a href="javascript:$('#dlg_more').hide();" class="weui_btn_dialog primary">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
37
src/user/part/reg/select_block.part.html
Normal file
37
src/user/part/reg/select_block.part.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<option disabled="disabled">朝晖苑</option>
|
||||
<option value="80">朝晖苑</option>
|
||||
|
||||
<option disabled="disabled">岐头生活区</option>
|
||||
<option value="12">16栋</option>
|
||||
<option value="13">17栋</option>
|
||||
<option value="10">18栋</option>
|
||||
<option value="11">19栋</option>
|
||||
|
||||
<option disabled="disabled">北门生活区</option>
|
||||
<option value="20">7栋</option>
|
||||
<option value="21">8栋</option>
|
||||
<option value="22">9栋</option>
|
||||
<option value="23">10栋</option>
|
||||
<option value="24">11栋</option>
|
||||
|
||||
<option disabled="disabled">东门生活区</option>
|
||||
<option value="30">12栋</option>
|
||||
<option value="31">13栋</option>
|
||||
<option value="32">14栋</option>
|
||||
<option value="33">15栋</option>
|
||||
<option value="34">20栋</option>
|
||||
<option value="35">21栋</option>
|
||||
|
||||
<option disabled="disabled">香晖苑</option>
|
||||
<option value="40">A栋</option>
|
||||
<option value="41">B栋</option>
|
||||
<option value="42">C栋</option>
|
||||
<option value="43">D栋</option>
|
||||
|
||||
<option disabled="disabled">凤翔生活区</option>
|
||||
<option value="50">1栋</option>
|
||||
<option value="51">2栋</option>
|
||||
<option value="52">3栋</option>
|
||||
<option value="53">4栋</option>
|
||||
<option value="54">5栋</option>
|
||||
<option value="55">6栋</option>
|
||||
21
src/user/part/reg/toast_loading.part.html
Normal file
21
src/user/part/reg/toast_loading.part.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!--绑定中Toast-->
|
||||
<div id="loadingToast" class="weui_loading_toast" style="display:none;">
|
||||
<div class="weui_mask_transparent"></div>
|
||||
<div class="weui_toast">
|
||||
<div class="weui_loading">
|
||||
<div class="weui_loading_leaf weui_loading_leaf_0"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_1"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_2"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_3"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_4"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_5"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_6"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_7"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_8"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_9"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_10"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_11"></div>
|
||||
</div>
|
||||
<p class="weui_toast_content">微信绑定中</p>
|
||||
</div>
|
||||
</div>
|
||||
15
src/user/part/rrepair/dlg_fail.part.html
Normal file
15
src/user/part/rrepair/dlg_fail.part.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!--提交出错Dialog-->
|
||||
<div id="failDlg" class="weui_dialog_alert hide">
|
||||
<div class="weui_mask"></div>
|
||||
<div class="weui_dialog">
|
||||
<div class="weui_dialog_hd"><strong class="weui_dialog_title">报修出错</strong></div>
|
||||
<div class="weui_dialog_bd">
|
||||
<i class="weui_icon_msg weui_icon_warn"></i>
|
||||
<p style="font-size: 1.3em;color: #F76260;">处理出错!</p>
|
||||
</div>
|
||||
<div class="weui_dialog_ft">
|
||||
<a href="javascript:$('#failDlg').hide();if(window.crcw)NMFunc.closePage();"
|
||||
class="weui_btn_dialog primary">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
21
src/user/part/rrepair/toast_loading.part.html
Normal file
21
src/user/part/rrepair/toast_loading.part.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!--绑定中Toast-->
|
||||
<div id="loadingToast" class="weui_loading_toast" style="display:none;">
|
||||
<div class="weui_mask_transparent"></div>
|
||||
<div class="weui_toast">
|
||||
<div class="weui_loading">
|
||||
<div class="weui_loading_leaf weui_loading_leaf_0"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_1"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_2"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_3"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_4"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_5"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_6"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_7"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_8"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_9"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_10"></div>
|
||||
<div class="weui_loading_leaf weui_loading_leaf_11"></div>
|
||||
</div>
|
||||
<p class="weui_toast_content">提交报修中...</p>
|
||||
</div>
|
||||
</div>
|
||||
141
src/user/reg.html
Normal file
141
src/user/reg.html
Normal file
@@ -0,0 +1,141 @@
|
||||
<!-- @extend ../part/wrap/head.part.html -->微信绑定<!-- @endextend -->
|
||||
<!-- @include ../part/common_js_loader.part.html -->
|
||||
|
||||
<script>
|
||||
//加载基本函数库,并且验证微信
|
||||
// window.allowDesktop={};
|
||||
NMJsLoader('../cdn/functions.js','functions');
|
||||
</script>
|
||||
|
||||
<!-- @include ../part/common_head_style.part.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/headbody.part.html -->
|
||||
<!-- Body最开头的内容 -->
|
||||
<!-- @include-static part/reg/toast_loading.part.html -->
|
||||
<div id="text_error" class="weui_toptips weui_warn"></div>
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @extend ../part/wrap/body_head.part.html -->绑定微信<!-- @endextend -->
|
||||
<!-- @extend ../part/wrap/body_desc.part.html -->中山学院网络维护科在线报修平台<!-- @endextend -->
|
||||
|
||||
<!--宽带帐号绑定问题 对话框 -->
|
||||
<!-- @include-static part/reg/dlg_binderror.part.html -->
|
||||
|
||||
|
||||
<!--表单开始-->
|
||||
<input type="hidden" id="token" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
|
||||
<div class="weui_cells_title">个人信息</div>
|
||||
<div class="weui_cells weui_cells_form">
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 5em;" >姓名</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" id="name" type="text" placeholder="输入你的大名吧~"/>
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 5em;" >学号</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" id="sid" type="text"/>
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 5em;">联系手机</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary"><input class="weui_input" id="phone" type="number"/></div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="weui_cells_title">宿舍信息</div>
|
||||
<div class="weui_cells weui_cells_form">
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 4em;">宿舍楼号</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<select class="weui_select" type="text" id="block" name="block" style="height: 1.5em;">
|
||||
<!-- @include-static part/reg/select_block.part.html -->
|
||||
</select>
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 5em;">宿舍号</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary"><input class="weui_input" id="room" type="number"/></div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="weui_cells_title">宽带信息</div>
|
||||
<div class="weui_cells weui_cells_form">
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 4em;">运营商</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<select class="weui_select" type="text" id="isp" name="isp" style="height: 1.5em;">
|
||||
<option value="1">电信</option>
|
||||
<option value="2">联通</option>
|
||||
<option value="3">移动</option>
|
||||
<option value="4">其他</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 5em;">宽带帐号</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input class="weui_input" id="username" type="text" placeholder="输入你上网用到的账户名" />
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="weui_cells_title" style="margin-top: 0;padding-top: .2em;height: 2.2em;">
|
||||
<a href="javascript:$('#dlg_more').show();">
|
||||
<div style="float: right;margin:.1em 0 0 .5em; color: #7F8C8D;border-bottom: thin solid #7F8C8D;">
|
||||
为什么我的帐号老是不正确?
|
||||
</div>
|
||||
<div style="float: right;"><i class="weui_icon_info_circle"></i></div>
|
||||
</a>
|
||||
<div class="fix_float"></div>
|
||||
</div>
|
||||
|
||||
<!--用户协议-->
|
||||
<div class="weui_cells weui_cells_checkbox" id="div_cb_read" style="background-color: transparent;">
|
||||
<label class="weui_cell weui_check_label" for="cb_read">
|
||||
<div class="weui_cell_hd">
|
||||
<input type="checkbox" class="weui_check" id="cb_read"
|
||||
onchange="if(this.checked)$('#btn_bind').removeAttr('disabled');else $('#btn_bind').attr('disabled','disabled');">
|
||||
<i class="weui_icon_checked"></i>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary" >
|
||||
<p style="margin-top: .3em;">我确认以上信息非冒用他人信息或虚假信息</p>
|
||||
</div>
|
||||
</label>
|
||||
<style type="text/css">
|
||||
#div_cb_read:before,
|
||||
#div_cb_read .weui_cell:before{
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
|
||||
|
||||
<button class="weui_btn weui_btn_primary" id="btn_bind" disabled="disabled">绑定</button>
|
||||
<style>
|
||||
#btn_bind:disabled{color:rgba(255,255,255,.6);}
|
||||
</style>
|
||||
|
||||
<!-- @extend ../part/wrap/tail.part.html -->
|
||||
<script>
|
||||
window.NMLazyJs=[
|
||||
['zepto','../cdn/zepto.min.js'],
|
||||
['user_reg','js/reg.js'],
|
||||
['userfield','../cdn/userfield.js',true],
|
||||
['lytable','../cdn/lyTableAll.min.js',true],
|
||||
['page_result','../page_result/result.js',true],
|
||||
['user_rrepair','js/rrepair.js',true],
|
||||
['user_list','js/list.js',true],
|
||||
['user_modi','js/modi.js',true],
|
||||
];
|
||||
</script>
|
||||
<!-- @include ../part/usr_tail_script.part.html -->
|
||||
<!-- @endextend -->
|
||||
104
src/user/rrepair.html
Normal file
104
src/user/rrepair.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<!-- @extend ../part/wrap/head.part.html -->故障报修<!-- @endextend -->
|
||||
<!-- @include ../part/common_js_loader.part.html -->
|
||||
|
||||
<script>
|
||||
//加载基本函数库,并且验证微信
|
||||
// window.allowDesktop={};
|
||||
NMJsLoader('../cdn/functions.js','functions');
|
||||
</script>
|
||||
|
||||
<!-- @include ../part/common_head_style.part.html -->
|
||||
|
||||
<!-- @extend ../part/wrap/headbody.part.html -->
|
||||
<!-- Body最开头的内容 -->
|
||||
<!-- @include-static part/rrepair/dlg_fail.part.html -->
|
||||
<!-- @include-static part/rrepair/toast_loading.part.html -->
|
||||
<div id="err_tip" class="weui_toptips weui_warn"></div>
|
||||
<!-- @endextend -->
|
||||
|
||||
<!-- @extend ../part/wrap/body_head.part.html -->故障报修<!-- @endextend -->
|
||||
<!-- @extend ../part/wrap/body_desc.part.html -->你写的详细点,我们就修的快一点<!-- @endextend -->
|
||||
|
||||
|
||||
<!-- 表单开始 -->
|
||||
<input type="hidden" id="token" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
|
||||
|
||||
<!-- 确认信息部分 -->
|
||||
<div>
|
||||
<div class="weui_cells_title">故障报修人</div>
|
||||
<div class="weui_cells">
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_bd weui_cell_primary"><p>姓名</p></div>
|
||||
<div id="text_user" class="weui_cell_ft"></div>
|
||||
</div>
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_bd weui_cell_primary"><p>宿舍宽带</p></div>
|
||||
<div id="text_room" class="weui_cell_ft"></div>
|
||||
</div>
|
||||
<div class="weui_cell">
|
||||
<div class="weui_cell_bd weui_cell_primary"><p>联系方式</p></div>
|
||||
<div id="text_phone" class="weui_cell_ft"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weui_cells weui_cells_checkbox">
|
||||
<label class="weui_cell weui_check_label" for="cb_sure">
|
||||
<div class="weui_cell_hd">
|
||||
<input type="checkbox" class="weui_check" id="cb_sure">
|
||||
<i class="weui_icon_checked"></i>
|
||||
</div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<p style="padding-top: 0.1em; text-align: center;">我已确认报修基本信息无误</p>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 详细情况填写部分 -->
|
||||
<div id="div_form" class="hide">
|
||||
<div class="weui_cells_title">有什么错误代码出现吗?</div>
|
||||
<div class="weui_cells weui_cells_form">
|
||||
<div id="cell_code" class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 4em;">错误代码</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input id="text_code" class="weui_input" type="number" placeholder="如果没有,可以不填"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="weui_cells_title">还记得是什么时候出现故障的吗?</div>
|
||||
<div class="weui_cells weui_cells_form">
|
||||
<div id="cell_date" class="weui_cell">
|
||||
<div class="weui_cell_hd"><label class="weui_label" style="width: 4em;">出现时间</label></div>
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<input id="text_date" class="weui_input" type="date" placeholder="如果不记得,可以不选"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="weui_cells_title">简单描述一下问题吧</div>
|
||||
<div class="weui_cells weui_cells_form">
|
||||
<div id="cell_dec" class="weui_cell">
|
||||
<div class="weui_cell_bd weui_cell_primary">
|
||||
<textarea id="text_ori_desc" class="weui_textarea" placeholder="这个必须填一下哦~"
|
||||
style="height: 9em;"></textarea>
|
||||
</div>
|
||||
<div class="weui_cell_ft"><i class="weui_icon_warn"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="desc" id="desc"/>
|
||||
<button type="submit" id="btn_subtmit" class="weui_btn weui_btn_primary">提交报修</button>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- @extend ../part/wrap/tail.part.html -->
|
||||
<script>
|
||||
window.NMLazyJs=[
|
||||
['zepto','../cdn/zepto.min.js'],
|
||||
['userfield','../cdn/userfield.js'],
|
||||
['user_rrepair','js/rrepair.js'],
|
||||
['user_list','js/list.js',true],
|
||||
];
|
||||
</script>
|
||||
<!-- @include ../part/usr_tail_script.part.html -->
|
||||
<!-- @endextend -->
|
||||
31
url_config.js
Normal file
31
url_config.js
Normal file
@@ -0,0 +1,31 @@
|
||||
//URL跳转
|
||||
|
||||
var SOLA_DOMAIN = 'https://wwbx.zsxyww.htroy.com/api/';
|
||||
var SOLA_DOMAIN_ADMIN = SOLA_DOMAIN + 'admin/';
|
||||
|
||||
var exportParams = {
|
||||
release_urls : {
|
||||
SOLA_LINK : 'https://github.com/unlimitedsola',
|
||||
LIUYUE_LINK : 'https://github.com/hangxingliu',
|
||||
HTROY_LINK : 'https://github.com/FsHtroy',
|
||||
JAY_LINK : 'https://github.com/Jayjjjjj',
|
||||
RESULT : '../result.html',
|
||||
|
||||
SOLA_CHECK_TOKEN : `${SOLA_DOMAIN}checksession`,
|
||||
SOLA_REG : `${SOLA_DOMAIN}register`,
|
||||
SOLA_MODI : `${SOLA_DOMAIN}profilemodify`,
|
||||
SOLA_SUBMIT : `${SOLA_DOMAIN}ticketsubmit`,
|
||||
|
||||
SOLA_TICKET_QUERY : `${SOLA_DOMAIN}ticketquery`,
|
||||
SOLA_TICKET_LOOKUP : `${SOLA_DOMAIN_ADMIN}ticketlookup`,
|
||||
SOLA_TICKET_UPDATE : `${SOLA_DOMAIN_ADMIN}ticketupdate`,
|
||||
SOLA_TICKET_PUSH : `${SOLA_DOMAIN_ADMIN}ticketpush`,
|
||||
|
||||
SOLA_TICKET_TRACK : `${SOLA_DOMAIN_ADMIN}tickettrack`,
|
||||
SOLA_TICKET_LOG : `${SOLA_DOMAIN_ADMIN}ticketlog`,
|
||||
|
||||
SOLA_GET_USER : `${SOLA_DOMAIN_ADMIN}getuser`,
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = exportParams;
|
||||
Reference in New Issue
Block a user