├── .gitignore ├── .idea ├── .name ├── encodings.xml ├── jsLibraryMappings.xml ├── libraries │ └── shellac_node_modules.xml ├── modules.xml ├── scopes │ └── scope_settings.xml ├── shellac.iml ├── vcs.xml └── workspace.xml ├── FileConfig.js ├── README.md ├── dist └── index.html ├── gulpfile.js ├── pack ├── package.json ├── public ├── favicon.ico ├── index.html └── manifest.json ├── src ├── App.css ├── App.js ├── App.test.js ├── component │ ├── BannerComponent.js │ ├── ContactComponent.js │ ├── CopyRightComponent.js │ ├── HeaderComponent.js │ ├── contactus │ │ └── ContactUsComponent.js │ ├── feedback │ │ └── FeedBackComponent.js │ ├── index │ │ └── indexComponent.js │ └── invalid │ │ └── InvalidComponent.js ├── index.css ├── index.js ├── logo.svg ├── registerServiceWorker.js └── static │ ├── css │ ├── front.css │ ├── index.css │ ├── select.css │ └── swipe.css │ ├── font │ ├── iconfont.eot │ ├── iconfont.svg │ ├── iconfont.ttf │ └── iconfont.woff │ ├── images │ ├── afh.png │ ├── animation_1.gif │ ├── arrow_left.png │ ├── arrow_left1.png │ ├── arrow_right.png │ ├── arrow_right1.png │ ├── ban_1.png │ ├── ban_2.png │ ├── ban_3.png │ ├── ban_4.png │ ├── banner │ │ ├── banner_1.png │ │ ├── banner_2.png │ │ ├── banner_3.png │ │ ├── banner_4.png │ │ ├── banner_5.png │ │ └── banner_6.png │ ├── banner_1.png │ ├── banner_2.png │ ├── banner_3.png │ ├── banner_4.png │ ├── banner_5.png │ ├── banner_6.png │ ├── bg.jpg │ ├── bg2.jpg │ ├── bg_haslogo.jpg │ ├── btn_right.jpg │ ├── countryImg │ │ ├── CN.png │ │ ├── ID.png │ │ ├── IQ.png │ │ ├── KZ.png │ │ └── RU.png │ ├── cx_again.jpg │ ├── cx_first.jpg │ ├── cx_valid.jpg │ ├── favicon.ico │ ├── gif │ │ ├── animation_1.gif │ │ ├── gif_1.GIF │ │ └── loading.gif │ ├── gif_1.GIF │ ├── icon.gif │ ├── icon │ │ └── favicon.ico │ ├── label │ │ ├── Indonesia_label.jpg │ │ ├── Russia_label.png │ │ └── ar-sa_label.jpg │ ├── lbl_digitcode.jpg │ ├── loading.gif │ ├── logo.gif │ ├── logo.png │ ├── next.jpg │ ├── oil_1.png │ ├── oil_2.png │ ├── oil_3.png │ ├── selectLanguageLeft.png │ ├── start.png │ ├── true_icon.png │ ├── up.jpg │ ├── yd.png │ └── ymny.png │ ├── js │ ├── BroswerUtil.js │ ├── Event.js │ ├── Red.js │ ├── Slider.js │ ├── function.js │ ├── functionUtil.js │ └── vendor │ │ ├── jquery-1.10.2.min.js │ │ └── modernizr-2.6.2.min.js │ └── script │ └── plugins │ ├── BroswerUtil.js │ ├── Event.js │ ├── Red.js │ ├── Slider.js │ ├── bank.js │ ├── common.js │ ├── functionUtil.js │ ├── iosSelect.js │ ├── iscroll.js │ ├── jquery-1.10.2.min.js │ ├── layer_mobile │ ├── layer.js │ └── need │ │ └── layer.css │ ├── nav.js │ ├── navbar.js │ └── swipe.js ├── webpack.config.js └── webpack.readme /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | shellac -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/jsLibraryMappings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/libraries/shellac_node_modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/shellac.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FileConfig.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var path = require('path'); 4 | 5 | /* 环境信息 */ 6 | var evr = { 7 | develop: true 8 | } 9 | 10 | 11 | /* src路径 */ 12 | var 13 | src = { 14 | 15 | Tpl: ['tpl/**'], 16 | 17 | Css: ['src/static/css/*.css'], 18 | CssConcatName: 'main.min.css', 19 | 20 | Js: ['src/static/js/*.js'], 21 | 22 | Html: ['/**.html'], 23 | 24 | Image: ['src/static/images/*.jbg', 'src/static/images/*.png'], 25 | 26 | Less: ['src/static/less/*.less'], 27 | 28 | Watch:['src./*.html','./src/**/*.js'], 29 | 30 | dirReplacements: { 31 | 'src/css': 'css/', 32 | 'src/js': 'js/' 33 | }, 34 | WebPack:[ 35 | 36 | ] 37 | 38 | } 39 | 40 | var output = { 41 | dist: 'dist/static' 42 | } 43 | 44 | 45 | var FileConfig = function () { 46 | this.src = src; 47 | this.evr = evr; 48 | this.path = path; 49 | this.output = output; 50 | }; 51 | 52 | module.exports = new FileConfig(); 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 25 | React-ShellAC 26 | 28 | 29 | 30 | 33 |
34 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 导入工具包 require('node_modules里对应模块') 3 | * require('gulp') 4 | * 5 | * 定义任务 name:任务名称 deps:依赖任务名称 fn:回调函数 6 | * gulp.task(name[, deps], fn) 7 | * 8 | * 执行任务处理的文件 globs:处理的文件路径(字符串或者字符串数组) 9 | * gulp.src(globs[, options]) 10 | * 11 | * 处理完后文件生成路径 12 | * gulp.dest(path[, options]) 13 | * 14 | * 该任务调用的模块 15 | * pipe 16 | * 17 | * **/ 18 | 19 | var gulp = require('gulp'), //本地安装gulp所用到的地方 20 | less = require('gulp-less'),//编译Less 21 | gulpif = require('gulp-if'),//if判断,用来区别生产环境还是开发环境的 22 | cssmin = require('gulp-minify-css'),//压缩css 23 | imagemin = require('gulp-imagemin'),//图片压缩 24 | rename = require('gulp-rename'),//文件重命名 25 | concat = require('gulp-concat'),//文件合并 26 | rev = require('gulp-rev'),//更改版本号 27 | clean = require('gulp-clean'),//删除 28 | htmlmin = require('gulp-htmlmin'), 29 | 30 | gulpWebpack = require('gulp-webpack'), 31 | webpack = require('webpack'), 32 | webpackConfig = require('./webpack.config'), 33 | 34 | connect = require('gulp-connect'), 35 | runSequence = require('run-sequence').use(gulp),//队列 36 | uglify = require('gulp-uglify'),//混淆js 37 | revCollector = require('gulp-rev-collector'), 38 | watch = require('gulp-watch'), 39 | fileConfig = require('./FileConfig');//基础配置 40 | 41 | // 说明 42 | gulp.task('help', function () { 43 | 44 | console.log(' gulp Less 编译Less并且压缩css'); 45 | 46 | console.log(' gulp Css 压缩css'); 47 | 48 | console.log(' gulp CssConcat 合并压缩css'); 49 | 50 | console.log(' gulp Js 压缩混淆js'); 51 | 52 | console.log(' gulp Html 压缩html'); 53 | 54 | console.log(' gulp Image 压缩image'); 55 | 56 | console.log(' gulp clean 清空dist下的所有目录'); 57 | 58 | console.log(' gulp Watch 监视文件是否发生改变,并且自动刷新'); 59 | 60 | console.log(' gulp rev 替换路径'); 61 | 62 | console.log(' gulp easy_webpack 打包'); 63 | 64 | console.log(' gulp default 默认任务'); 65 | 66 | }); 67 | 68 | 69 | //编译Less并且压缩改名*.min.css 70 | gulp.task('Less', function () { 71 | gulp.src(fileConfig.src.Less, {base: '.'}) //该任务针对的文件 72 | .pipe(rename({suffix: '.min'})) 73 | .pipe(less()) //该任务调用的模块 74 | .pipe(cssmin()) //该任务调用的模块 75 | .pipe(gulp.dest(fileConfig.output.dist)); //将会在src/css下生成index.css 76 | }); 77 | 78 | //压缩Css改名*.min.css 79 | gulp.task('Css', function () { 80 | gulp.src(fileConfig.src.Css, {base: '.'}) 81 | .pipe(rename({suffix: '.min'})) 82 | .pipe(cssmin()) 83 | .pipe(rev.manifest()) 84 | .pipe(gulp.dest(fileConfig.output.dist)) 85 | }); 86 | 87 | //压缩合并Css改名*.min.css 88 | gulp.task('CssConcat', function () { 89 | gulp.src(fileConfig.src.Css, {base: '.'}) 90 | .pipe(rename({suffix: '.min'})) 91 | .pipe(cssmin()) 92 | .pipe(rev.manifest({merge: true})) 93 | .pipe(concat(fileConfig.src.CssConcatName)) 94 | .pipe(gulp.dest(fileConfig.output.dist)) 95 | }); 96 | 97 | //压缩混淆js 98 | gulp.task('Js', function () { 99 | return gulp.src(fileConfig.src.Js, {base: '.'}) 100 | .pipe(gulp.dest(fileConfig.output.dist)) 101 | .pipe(uglify()) 102 | .pipe(rename({suffix: '.min'})) 103 | .pipe(rev.manifest({merge: true})) 104 | .pipe(gulp.dest(fileConfig.output.dist)) 105 | }); 106 | 107 | //压缩html 108 | gulp.task('Html', function () { 109 | var options = { 110 | removeComments: true, 111 | collapseWhitespace: true, 112 | collapseBooleanAttributes: true, 113 | removeEmptyAttributes: true, 114 | removeScriptTypeAttributes: true, 115 | removeStyleLinkTypeAttributes: true, 116 | minifyJS: true, 117 | minifyCSS: true 118 | }; 119 | return gulp.src(fileConfig.src.Html, {base: '.'}) 120 | .pipe(htmlmin(options)) 121 | .pipe(gulp.dest(fileConfig.output.dist)) 122 | }); 123 | 124 | //压缩jpg png 125 | gulp.task('Image', function () { 126 | return gulp.src(fileConfig.src.Image, {base: '.'}) 127 | .pipe(gulpif(fileConfig.evr.develop, imagemin())) 128 | .pipe(gulp.dest(fileConfig.output.dist)); 129 | }); 130 | 131 | //清空发布目录 132 | gulp.task('clean', function () { 133 | return gulp.src('dist/*', {read: false}) 134 | .pipe(clean()); 135 | }); 136 | 137 | gulp.task('Watch', function () { 138 | watch(fileConfig.src.Watch) 139 | .pipe(connect.reload()) 140 | }); 141 | 142 | gulp.task('rev', function () { 143 | return gulp.src(['./rev/**/*.json', './dist/index.html']) 144 | .pipe(revCollector({ 145 | replaceReved: true, 146 | dirReplacements: fileConfig.src.dirReplacements 147 | })) 148 | .pipe(gulp.dest('./dist/')); 149 | }); 150 | 151 | gulp.task('easy_webpack', function () { 152 | gulp.src('') 153 | .pipe(gulpWebpack(webpackConfig, webpack)) 154 | .pipe(gulp.dest(fileConfig.output.dist)) 155 | }); 156 | 157 | 158 | //默认执行 159 | gulp.task('default', function (cb) { 160 | runSequence('clean', 'Css', 'Js', 'Html', 'Image', 'easy_webpack', cb) 161 | }); 162 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /pack: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'), 2 | concat = require('gulp-concat'), 3 | less = require('gulp-less'), 4 | minifyCss = require('gulp-minify-css'), 5 | minify = require('gulp-minify'), 6 | zip = require('gulp-zip'), 7 | moment = require("moment"), 8 | ftp = require('gulp-ftp'), 9 | git = require('gulp-git'), 10 | runSequence = require('run-sequence'), 11 | argv = require('minimist')(process.argv.slice(2)), 12 | argv = require('minimist')(process.argv.slice(2)), 13 | del = require('del'), 14 | uglify = require('gulp-uglify'), 15 | htmlmin = require('gulp-htmlmin'), 16 | ngAnnotate = require('gulp-ng-annotate'); 17 | 18 | 19 | var path = { 20 | input: { 21 | html: ['src/app/*.html'], 22 | js: ['src/app/js/*.js'], 23 | less: ['src/app/less/*.less'], 24 | image: ['src/app/image/*'], 25 | fonts: ['src/app/fonts/*'], 26 | plugins: ['src/plugins/**/*'] 27 | }, 28 | output: { 29 | dist: 'dist', 30 | plugins: 'dist/plugins' 31 | } 32 | } 33 | 34 | 35 | 36 | gulp.task('commit', function(){ 37 | return gulp.src('./demo/**/*') 38 | .pipe(git.add()) 39 | .pipe(git.commit()); 40 | }); 41 | 42 | 43 | gulp.task('checkout',[commit], function () { 44 | gitTag = argv.tag; 45 | git.checkout(gitTag, function (err) { 46 | if (err) throw err; 47 | }); 48 | }) 49 | 50 | //压缩html 51 | gulp.task('html', function () { 52 | var options = { 53 | removeComments: true, 54 | collapseWhitespace: true, 55 | collapseBooleanAttributes: true, 56 | removeEmptyAttributes: true, 57 | removeScriptTypeAttributes: true, 58 | removeStyleLinkTypeAttributes: true, 59 | minifyJS: true, 60 | minifyCSS: true 61 | }; 62 | return gulp.src(config.input.html) 63 | .pipe(htmlmin(options)) 64 | .pipe(gulp.dest(config.output.dist))//gulp dest是输出 65 | }); 66 | 67 | 68 | //压缩合并JS 69 | gulp.task('js', function (done) { 70 | return gulp.src(config.input.js) 71 | .pipe(ngAnnotate({single_quotes: true})) 72 | .pipe(uglify()) 73 | .pipe(concat('index.min.js')) 74 | .pipe(gulp.dest(config.output.dist)) 75 | }); 76 | 77 | 78 | gulp.task('zip_new', function () { 79 | var timeStamp = moment().format("YYYY-MM-D_HH-mm-ss_"); 80 | return gulp.src(config.input.zip) 81 | .pipe(zip("dist_" + timeStamp + ".zip")) 82 | .pipe(gulp.dest(config.output.dist)); 83 | }); 84 | 85 | //发送至指定服务器 86 | gulp.task('ftp', function () { 87 | gulp.src("dist_zip/*") 88 | .pipe(ftp({ 89 | host: 'someHost', 90 | port: 21, 91 | //user: 'anonymous', 92 | //pass:null, 93 | remotePath: "somePath/" 94 | })); 95 | }); 96 | 97 | //一键打包 98 | gulp.task('publish', function (callback) { 99 | runSequence(['html', 'js','less', 'copy'],'zip_new',ftp,callback); 100 | }); 101 | 102 | 103 | 104 | 105 | /////////////////////////////////////////////////////////// 106 | //import gulp from 'gulp'; 107 | var gulp = require('gulp'); 108 | import fileConfig from 'FileConfig'; 109 | // 说明 110 | 111 | gulp.task('help', function () { 112 | 113 | console.log(' gulp build 文件打包'); 114 | 115 | console.log(' gulp watch 文件监控打包'); 116 | 117 | console.log(' gulp help gulp参数说明'); 118 | 119 | console.log(' gulp server 测试server'); 120 | 121 | console.log(' gulp -p 生产环境(默认生产环境)'); 122 | 123 | console.log(' gulp -d 开发环境'); 124 | 125 | console.log(' gulp -m 部分模块打包(默认全部打包)'); 126 | 127 | }); 128 | 129 | /* 默认 */ 130 | gulp.task('default', function () { 131 | 132 | gulp.start('help'); 133 | 134 | }); 135 | 136 | 137 | /* 载入工具 */ 138 | var argv = require('yargs').argv, 139 | _ = require('lodash'), 140 | path = require('path'); 141 | 142 | 143 | //创建任务 144 | gulp.task('build', function () { 145 | 146 | var evr = argv.p || !argv.d; //生产环境为true,开发环境为false,默认为true 147 | 148 | var mod = argv.m || 'all';//模块明,默认为全部 149 | 150 | 151 | /* 路径初始化 */ 152 | 153 | fileConfig.init(evr); 154 | //console.log(' '+evr) 155 | //console.log(' '+mod) 156 | 157 | 158 | }); 159 | 160 | 161 | 162 | gulp.task('clean', function() { 163 | 164 | if(mod === 'all') { 165 | 166 | var clean_path = path.join( evr&& basePath.production || basePath.develop, '/'); 167 | 168 | return gulp.src([clean_path], {read:false}) 169 | 170 | .pipe(clean()); 171 | 172 | } 173 | 174 | }); 175 | 176 | 177 | // 载入外挂 178 | 179 | var browserify = require('browserify'),//这里用不上,管理js依赖的 180 | 181 | source = require('vinyl-source-stream'),//同样这里用不上,和上面那个一起的 182 | 183 | uglify = require('gulp-uglify'),//混淆js 184 | 185 | clean = require('gulp-clean'),//清理文件 186 | 187 | notify = require('gulp-notify'),//加控制台文字描述用的 188 | 189 | buffer = require('vinyl-buffer'), 190 | 191 | less = require('gulp-less'),//转换less用的 192 | 193 | autoprefixer = require('gulp-autoprefixer'),//增加私有变量前缀 194 | 195 | minifycss = require('gulp-minify-css'),//压缩 196 | 197 | concat = require('gulp-concat'),//合并 198 | 199 | fileinclude = require('gulp-file-include'),// include 文件用 200 | 201 | template = require('gulp-template'),//替换变量以及动态html用 202 | 203 | rename = require('gulp-rename'),//重命名 204 | 205 | webserver = require('gulp-webserver'),//一个简单的server,用python的SimpleHttpServer会锁文件夹 206 | 207 | imagemin = require('gulp-imagemin'),//图片压缩 208 | 209 | gulpif = require('gulp-if'),//if判断,用来区别生产环境还是开发环境的 210 | 211 | rev = require('gulp-rev'),//加MD5后缀 212 | 213 | revReplace = require('gulp-rev-replace'),//替换引用的加了md5后缀的文件名,修改过,用来加cdn前缀 214 | 215 | addsrc = require('gulp-add-src'),//pipeline中途添加文件夹,这里没有用到 216 | 217 | del = require('del'),//也是个删除··· 218 | 219 | vinylPaths = require('vinyl-paths'),//操作pipe中文件路径的,加md5的时候用到了 220 | 221 | runSequence = require('run-sequence');//控制task顺序 222 | 223 | 224 | /* 打包方法 */ 225 | 226 | var teemoGulp = { 227 | 228 | /* html打包 */ 229 | 230 | buildHtml: function () { 231 | var src = arguments[0], dest = arguments[1], flag = arguments[2], options = arguments[3]; 232 | 233 | return gulp.src(src) 234 | 235 | .pipe(fileinclude({ 236 | 237 | basepath: basePath.source 238 | 239 | })) 240 | 241 | .pipe(template(options, { 242 | 243 | //interpolate: /\{-([\s\S]+?)-\}/g 244 | 245 | })) 246 | 247 | .pipe(gulp.dest(dest)) 248 | 249 | }, 250 | 251 | /* css 打包 */ 252 | 253 | buildCss: function () { 254 | }, 255 | 256 | /* js打包 */ 257 | 258 | buildJs: function () { 259 | var src = arguments[0], dest = arguments[1], flag = arguments[2] 260 | 261 | return gulp.src(src) 262 | 263 | .pipe(gulp.dest(dest)) 264 | 265 | 266 | .pipe(uglify()) 267 | 268 | .pipe(rename({suffix: '.min'})) 269 | 270 | .pipe(gulp.dest(dest)); 271 | }, 272 | 273 | /* img打包 */ 274 | 275 | buildImg: function () { 276 | var src = arguments[0], dest = arguments[1], flag = arguments[2] 277 | 278 | return gulp.src(src) 279 | 280 | .pipe(gulpif(flag, imagemin())) 281 | 282 | .pipe(gulp.dest(dest)); 283 | }, 284 | 285 | /* md5打包 */ 286 | 287 | buildMd5: function () { 288 | } 289 | 290 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shellac", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "es6-promise": "^4.1.1", 7 | "isomorphic-fetch": "^2.2.1", 8 | "jquery": "^3.2.1", 9 | "react": "^15.6.1", 10 | "react-dom": "^15.6.1", 11 | "react-router": "^3.0.0", 12 | "react-router-dom": "^4.1.1", 13 | "swiper": "^3.4.2" 14 | }, 15 | "devDependencies": { 16 | "babel-core": "^6.25.0", 17 | "babel-loader": "^7.1.1", 18 | "babel-preset-es2015": "^6.24.1", 19 | "babel-preset-es2015-node5": "^1.2.0", 20 | "babel-preset-react": "^6.24.1", 21 | "babelify": "^7.3.0", 22 | "browserify": "^14.4.0", 23 | "css-loader": "^0.28.4", 24 | "file-loader": "^0.11.2", 25 | "gulp": "^3.9.1", 26 | "gulp-babel": "^6.1.2", 27 | "gulp-browserify": "^0.5.1", 28 | "gulp-clean": "^0.3.2", 29 | "gulp-concat": "^2.6.1", 30 | "gulp-connect": "^5.0.0", 31 | "gulp-htmlmin": "^3.0.0", 32 | "gulp-if": "^2.0.2", 33 | "gulp-imagemin": "^3.3.0", 34 | "gulp-less": "^3.3.2", 35 | "gulp-load-plugins": "^1.5.0", 36 | "gulp-minify-css": "^1.2.4", 37 | "gulp-react": "^3.1.0", 38 | "gulp-reactify": "^3.0.1", 39 | "gulp-rename": "^1.2.2", 40 | "gulp-rev": "^7.1.2", 41 | "gulp-rev-collector": "^1.2.2", 42 | "gulp-sourcemaps": "^2.6.0", 43 | "gulp-uglify": "^3.0.0", 44 | "gulp-util": "^3.0.8", 45 | "gulp-watch": "^4.3.11", 46 | "gulp-webpack": "^1.5.0", 47 | "jsx-loader": "^0.13.2", 48 | "react": "^15.6.1", 49 | "react-dom": "^15.6.1", 50 | "react-scripts": "1.0.8", 51 | "reactify": "^1.1.1", 52 | "run-sequence": "^2.0.0", 53 | "sass-loader": "^6.0.6", 54 | "style-loader": "^0.18.2", 55 | "url-loader": "^0.5.9", 56 | "vinyl-buffer": "^1.0.0", 57 | "vinyl-source-stream": "^1.1.0", 58 | "webpack": "^3.1.0" 59 | }, 60 | "scripts": { 61 | "start": "react-scripts start", 62 | "build": "react-scripts build webpack", 63 | "test": "react-scripts test --env=jsdom", 64 | "eject": "react-scripts eject" 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 25 | React-ShellAC 26 | 28 | 29 | 30 | 33 |
34 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 80px; 8 | } 9 | 10 | .App-header { 11 | background-color: #222; 12 | height: 150px; 13 | padding: 20px; 14 | color: white; 15 | } 16 | 17 | .App-intro { 18 | font-size: large; 19 | } 20 | 21 | @keyframes App-logo-spin { 22 | from { transform: rotate(0deg); } 23 | to { transform: rotate(360deg); } 24 | } 25 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | 5 | class App extends Component { 6 | render() { 7 | return ( 8 |
9 |
10 | logo 11 |

Welcome to React

12 |
13 |

14 | To get started, edit 15 | src/App.js 16 | and save to reload. 17 |

18 |
19 | ); 20 | } 21 | } 22 | 23 | export default App; 24 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | }); 9 | -------------------------------------------------------------------------------- /src/component/BannerComponent.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | import banner1 from '../static/images/banner/banner_1.png'; 4 | import banner2 from '../static/images/banner/banner_2.png'; 5 | import banner3 from '../static/images/banner/banner_3.png'; 6 | import banner4 from '../static/images/banner/banner_4.png'; 7 | import banner5 from '../static/images/banner/banner_5.png'; 8 | import banner6 from '../static/images/banner/banner_6.png'; 9 | 10 | 11 | 12 | class BannerComponent extends React.Component { 13 | 14 | constructor(props) { 15 | super(props); 16 | } 17 | 18 | render() { 19 | return ( 20 |
21 |
22 |
23 | 24 |
25 |
26 | 27 |
28 |
29 | 30 |
31 |
32 | 33 |
34 |
35 | 36 |
37 |
38 | 39 |
40 |
41 | 42 |
43 | 44 |
45 |
46 | 47 |
48 |
49 | 50 | ) 51 | 52 | } 53 | 54 | } 55 | 56 | export {BannerComponent}; -------------------------------------------------------------------------------- /src/component/ContactComponent.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Link } from 'react-router'; 3 | 4 | class ContactComponent extends React.Component { 5 | 6 | render() { 7 | 8 | return ( 9 | 10 |
11 | 12 | Contact us | 13 | 14 | Privacy Policy | 15 | 16 | Terms & Conditions 17 |
18 | 19 | ) 20 | 21 | } 22 | 23 | } 24 | 25 | export {ContactComponent} -------------------------------------------------------------------------------- /src/component/CopyRightComponent.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | 4 | class CopyRightComponent extends React.Component { 5 | 6 | render() { 7 | 8 | return ( 9 | 10 |
11 | © 2017 Shell.All rights reserved. 12 | 13 | 14 | www.ac.shell.com 15 | 16 |
17 | 18 | ) 19 | 20 | } 21 | 22 | } 23 | 24 | export {CopyRightComponent} -------------------------------------------------------------------------------- /src/component/HeaderComponent.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | 4 | class HeaderComponent extends React.Component{ 5 | constructor(props){ 6 | super(props); 7 | } 8 | 9 | 10 | render(){ 11 | return ( 12 |
13 |
Shell Anti-Counterfeit System
14 |
15 | 16 | 17 | 18 |
19 | 24 |
25 | 26 | ) 27 | 28 | } 29 | } 30 | 31 | export {HeaderComponent}; -------------------------------------------------------------------------------- /src/component/contactus/ContactUsComponent.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import '../../static/css/swipe.css' 3 | import '../../static/css/front.css' 4 | import '../../static/css/index.css' 5 | import '../../static/css/select.css' 6 | import {HeaderComponent} from '../HeaderComponent'; 7 | import {BannerComponent} from '../BannerComponent'; 8 | import { ContactComponent } from '../ContactComponent'; 9 | import { CopyRightComponent } from '../CopyRightComponent'; 10 | 11 | 12 | class ContactUsComponent extends React.Component { 13 | 14 | constructor(props) { 15 | super(props); 16 | } 17 | 18 | 19 | render() { 20 | return ( 21 |
22 | 27 |
28 |
29 | 30 |
31 |
32 |
33 |
34 |
35 |

China.

36 |

37 | Tel: 38 | 021-386 25099

39 |

40 | Email: 41 | shellac@yesno.com.cn

42 |
43 |
44 |
45 |
46 |
47 | 48 |
49 | 50 |
51 | 52 |
53 |
54 |
55 |
56 | 57 |
58 | ) 59 | } 60 | 61 | } 62 | 63 | 64 | export {ContactUsComponent} -------------------------------------------------------------------------------- /src/component/feedback/FeedBackComponent.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import '../../static/css/swipe.css' 3 | import '../../static/css/front.css' 4 | import '../../static/css/index.css' 5 | import '../../static/css/select.css' 6 | import {HeaderComponent} from '../HeaderComponent'; 7 | import {BannerComponent} from '../BannerComponent'; 8 | import { ContactComponent } from '../ContactComponent'; 9 | import { CopyRightComponent } from '../CopyRightComponent'; 10 | 11 | 12 | class FeedBackComponent extends React.Component { 13 | 14 | render() { 15 | 16 | return ( 17 | 18 |
19 | 20 |
21 |
22 | 27 |
28 | 29 |
30 |
31 |
32 |
33 |
34 |

Your feedback is important to Shell Lubricants.

35 |

Please complete the feedback form.If your know where,when and who you purchased this product from,it is important to tell us.

36 |

37 | Anti-Counterfeit code: 38 | 0000 0000 0000 0000

39 |

40 | 41 | Name: 42 | (Optional) 43 | 44 |

45 |

46 | 47 | Tel: 48 | (Optional) 49 | 50 |

51 |

52 | 53 | Email: 54 | 55 | 56 |

57 |
58 |
59 |

Feedback

60 | 61 |
62 |

Example:

63 |

I have bought one bottle of4L Helix Ultra from Auto-parts city,which is located in Road No.322,Huan Street.The store contract number is 130-0000-0000.And found that the anti-counterfeit code does not exist.Can you help me? Or let me known the nearest Shell authorised store?

64 |
65 |

66 | 70 |

71 |
72 | 73 | 74 |
75 |
76 |
77 |
78 |
79 |
80 | 81 |

82 | 83 |

84 |
85 |
86 |
87 |
88 | 89 |
90 |
91 | 92 |
93 |
94 |
95 | ) 96 | 97 | } 98 | 99 | } 100 | 101 | 102 | export {FeedBackComponent} -------------------------------------------------------------------------------- /src/component/index/indexComponent.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import start from '../../static/images/start.png'; 3 | import animotion from '../../static/images/animation_1.gif'; 4 | import loadingImg from '../../static/images/gif/loading.gif'; 5 | import '../../static/css/swipe.css' 6 | import '../../static/css/front.css' 7 | import '../../static/css/index.css' 8 | import '../../static/css/select.css' 9 | import {HeaderComponent} from '../HeaderComponent'; 10 | import {BannerComponent} from '../BannerComponent'; 11 | import { ContactComponent } from '../ContactComponent'; 12 | import { CopyRightComponent } from '../CopyRightComponent'; 13 | import {browserHistory} from 'react-router'; 14 | 15 | import {nav} from '../../static/script/plugins/nav.js' 16 | import { Slider } from '../../static/script/plugins/Slider.js'; 17 | import $ from 'jquery'; 18 | 19 | //http://www.open-open.com/lib/view/open1481164240760.html 20 | //http://visionmedia.github.io/superagent/ 21 | 22 | 23 | class IndexComponent extends React.Component { 24 | 25 | constructor(props) { 26 | super(props); 27 | this.state = { 28 | 29 | country: 'us', 30 | language: 'en', 31 | digitcode: "", 32 | realperson: '0', 33 | tipCode: 'ERROR! You have entered an incorrect code.(Please try again)', 34 | sliderTip: 'SLIDE to confirm you are human', 35 | show: {"display": "none"}, 36 | tipCodeshow: {"visibility": "hidden"}, 37 | allow1Submit: false, 38 | allow2Submit: false 39 | } 40 | } 41 | 42 | 43 | handleData(e) { 44 | var eleId = e.target.id; 45 | if (eleId == 'label' || eleId == 'pageSlide') { 46 | if (this.captcha.value == '1') { 47 | this.setState({ 48 | realperson: '1', 49 | sliderTip: 'Thank you!', 50 | allow2Submit: true 51 | }) 52 | } 53 | } else if (eleId == 'txtCode') { 54 | 55 | if (/^\d{16}$/.test(e.target.value) || !e.target.value) { 56 | this.setState({ 57 | tipCodeshow: {"visibility": "hidden"}, 58 | allow1Submit: true 59 | }); 60 | 61 | 62 | } else { 63 | this.setState({ 64 | tipCodeshow: {"display": "block"}, 65 | allow1Submit: false 66 | }); 67 | } 68 | 69 | 70 | this.setState({ 71 | digitcode: e.target.value 72 | }) 73 | 74 | 75 | } 76 | } 77 | 78 | 79 | handleSubmit(event) { 80 | event.preventDefault(); 81 | if (!this.state.allow1Submit || !this.state.allow2Submit) { 82 | return false; 83 | } 84 | 85 | 86 | this.setState({ 87 | show: {"display": "block"} 88 | }); 89 | var digitcode = this.state.digitcode; 90 | browserHistory.push('/invalid/' + digitcode); 91 | //request 92 | // .post('http://10.20.26.19/shell2/Ajax/FWAcCode.ashx') 93 | // .type('form') 94 | // .send({ 95 | // language: 'en', 96 | // country: 'us', 97 | // channelType: 'W', 98 | // channel: '1', 99 | // accode: this.state.digitcode 100 | // }) 101 | // .end(function (err, res) { 102 | // console.log(err) 103 | // console.log(res) 104 | // 105 | // }); 106 | } 107 | 108 | 109 | componentDidMount() { 110 | nav(); 111 | var slider1 = new Slider(); 112 | slider1.Init(); 113 | ///屏幕大小发生改变时触发 114 | $(window).resize(function () { 115 | slider1.HanderIn(); 116 | slider1.HanderOut(); 117 | }); 118 | 119 | } 120 | 121 | componentWillUnmount() { 122 | console.log(2) 123 | } 124 | 125 | render() { 126 | return ( 127 |
128 |
129 |
130 |
131 | 132 |
133 |
134 | 137 |
138 |
139 | 140 |
141 |
142 |
143 |

144 | WELCOME

145 |
146 |
147 |

148 | Thank you for purchasing a Shell Lubricants Product. 149 | Please use our 150 | Anti-Counterfeit system to verify its authenticity. 151 |

152 |
153 |

154 | Select Country 155 | Select Language 156 |

157 |
158 |
159 |
160 | 161 |
162 |

163 | 164 |

165 |

166 | China

167 | 168 |
169 |
170 |
171 | 172 |
173 |

174 | Mandarin

175 | 176 |
177 |
178 |
179 |
180 |
181 |
182 | 183 | 184 |
185 |
186 |
187 |

188 | Enter 16-digit Anti-Couterfeit code:

189 |

190 | PLEASE UNCOVER LABEL to find 191 |
192 | 16 digit Anti-Counterfeit Code 193 |

194 | 196 |

197 | {this.state.tipCode} 198 |

199 |
200 | 201 |
202 |
203 |
204 |
205 |
206 |
207 |

208 | Real person confirmation

209 |
210 |
211 |
212 |
213 | 214 | this.captcha = captcha 215 | } value="0"/> 216 | 217 | {this.state.sliderTip} 218 |
219 |
220 |
221 |
222 |
223 | 224 |
225 |
226 |
227 |
228 |
229 | 230 |
231 |
232 | 233 |
234 |
235 |
236 |
237 |
238 | 239 |
240 |
241 | 242 |
243 |
244 |
245 | ) 246 | } 247 | 248 | } 249 | 250 | 251 | export {IndexComponent} -------------------------------------------------------------------------------- /src/component/invalid/InvalidComponent.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import '../../static/css/swipe.css' 3 | import '../../static/css/front.css' 4 | import '../../static/css/index.css' 5 | import '../../static/css/select.css' 6 | import imgVerified from '../../static/images/oil_2.png'; 7 | import imgExpired from '../../static/images/oil_1.png'; 8 | import imgInvalid from '../../static/images/oil_3.png'; 9 | import {HeaderComponent} from '../HeaderComponent'; 10 | import { ContactComponent } from '../ContactComponent'; 11 | import { CopyRightComponent } from '../CopyRightComponent'; 12 | import loadingImg from '../../static/images/gif/loading.gif'; 13 | import request from 'superagent'; 14 | import {Link} from 'react-router'; 15 | 16 | function Dts(props) { 17 | if (props.packsize || props.productname || props.productdate || props.batchnum) { 18 | return (
19 |
20 |

Pack size:

21 |

Product name:

22 |

Product date:

23 |

Batch number:

24 |
25 |
26 |

{props.packsize}

27 |

{props.productname}

28 |

{props.productdate}

29 |

{props.batchnum}

30 |
31 |
); 32 | } 33 | return (); 34 | } 35 | 36 | class InvalidComponent extends React.Component { 37 | 38 | constructor(props) { 39 | super(props) 40 | 41 | this.state = { 42 | ResponseText: "", 43 | show: {"display": "block"}, 44 | imgTip: '', 45 | result: '', 46 | resultContent: '', 47 | notice1: '', 48 | notice2: '', 49 | dts: {} 50 | }; 51 | } 52 | 53 | componentWillMount() { 54 | console.log("componentWillMount"); 55 | var _self = this; 56 | request 57 | .post('http://10.20.26.19/shell2/Ajax/FWAcCode.ashx') 58 | .type('form') 59 | .send({ 60 | language: 'en-us', 61 | country: 'CN', 62 | channelType: 'W', 63 | channel: '10', 64 | accode: this.props.routeParams.code 65 | }) 66 | //.end(function (err, res) { 67 | // _self.setState({ 68 | // ResponseText: res.text 69 | // }) 70 | // 71 | //}); 72 | .then(function (res) { 73 | console.log(res) 74 | 75 | _self.setState({ 76 | ResponseText: res.text 77 | }) 78 | 79 | _self.setState({ 80 | show: {"display": "none"} 81 | }); 82 | 83 | var img = '', result = ''; 84 | if ((res.text.split('^')[1] == '10020401')) { 85 | img = imgVerified; 86 | result = " Code verified"; 87 | } else if ((res.text.split('^')[1] == '10020402')) { 88 | img = imgExpired; 89 | result = " Code verified"; 90 | } else { 91 | img = imgInvalid; 92 | result = "Code invalid"; 93 | } 94 | var n = ('' + (res.text.split('^')[2]) + '').split('|'); 95 | console.log(res.text)//{PackSize:1L-5L,ProductName:,ProductionDate:,BatchNumber:} 96 | 97 | var dts = {}; 98 | if (n.length > 1 && n[2].indexOf('}') > -1) { 99 | var arrayDts = n[2].replace('{', '').replace('}', '').split(','); 100 | for (var i in arrayDts) { 101 | dts[arrayDts[i].split(':')[0]] = arrayDts[i].split(':')[1]; 102 | } 103 | } 104 | _self.setState({ 105 | imgTip: img, 106 | result: result, 107 | resultContent: n[0], 108 | notice1: n.length > 1 && n[2].indexOf('}') < -1 ? n[2] : '', 109 | notice2: n.length > 2 ? n[3] : '', 110 | dts: dts 111 | }) 112 | 113 | } 114 | , 115 | function (error) { 116 | alert("filad" + error) 117 | } 118 | ) 119 | ; 120 | } 121 | 122 | componentDidMount() { 123 | console.log("componentDidMount"); 124 | } 125 | 126 | componentWillUnmount() { 127 | console.log("componentWillUnmount") 128 | } 129 | 130 | 131 | render() { 132 | return ( 133 |
134 |
135 |
136 |
137 | 138 |
139 |
140 | 145 |
146 |
147 |
148 |

149 | {this.state.result} 150 |

151 |

152 | {this.state.resultContent} 153 |

154 |
155 |

156 | 您的 16 位防伪码:

157 |

158 | {this.props.routeParams.code}

159 | 160 | 161 |
162 |
163 |
164 | oil 165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 | 178 |
179 |

Understand label features

180 |

Feedback

181 |
182 |
183 |
184 |
185 |

{this.state.notice1}

186 |

{this.state.notice2}

187 |
188 | 189 | 190 | 191 |
192 |
193 |
194 |
195 |
196 |
197 | 198 |
199 |
200 | 201 |
202 |
203 |
204 |
205 | ) 206 | } 207 | 208 | 209 | } 210 | 211 | 212 | export {InvalidComponent} -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | visibility:hidden; 6 | } 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import {IndexComponent} from './component/index/indexComponent'; 4 | import {ContactUsComponent} from './component/contactus/ContactUsComponent'; 5 | import {InvalidComponent} from './component/invalid/InvalidComponent'; 6 | import {FeedBackComponent} from './component/feedback/FeedBackComponent'; 7 | import {Router,Route,IndexRoute,hashHistory,browserHistory} from 'react-router'; 8 | 9 | //npm install jquery --save 10 | //mpm install swipe --save 11 | //npm install -S react-router 12 | //npm install --save react-router@3.0.0 13 | //npm install --save isomorphic-fetch es6-promise(superagent代替) 14 | //npm install superagent 15 | 16 | //import $ from 'jquery' 17 | 18 | //import './index.css'; 19 | //import App from './App'; 20 | //import registerServiceWorker from './registerServiceWorker'; 21 | 22 | 23 | ReactDOM.render( 24 | ( 25 |
26 | 27 | 28 | 29 | 30 | 31 |
32 |
) 33 | , document.getElementById('root')); 34 | 35 | //nav(); 36 | //var slider1 = new Slider(); 37 | //slider1.Init(); 38 | /////屏幕大小发生改变时触发 39 | //$(window).resize(function () { 40 | // slider1.HanderIn(); 41 | // slider1.HanderOut(); 42 | //}); 43 | -------------------------------------------------------------------------------- /src/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/registerServiceWorker.js: -------------------------------------------------------------------------------- 1 | // In production, we register a service worker to serve assets from local cache. 2 | 3 | // This lets the app load faster on subsequent visits in production, and gives 4 | // it offline capabilities. However, it also means that developers (and users) 5 | // will only see deployed updates on the "N+1" visit to a page, since previously 6 | // cached resources are updated in the background. 7 | 8 | // To learn more about the benefits of this model, read https://goo.gl/KwvDNy. 9 | // This link also includes instructions on opting out of this behavior. 10 | 11 | const isLocalhost = Boolean( 12 | window.location.hostname === 'localhost' || 13 | // [::1] is the IPv6 localhost address. 14 | window.location.hostname === '[::1]' || 15 | // 127.0.0.1/8 is considered localhost for IPv4. 16 | window.location.hostname.match( 17 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ 18 | ) 19 | ); 20 | 21 | export default function register() { 22 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { 23 | // The URL constructor is available in all browsers that support SW. 24 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location); 25 | if (publicUrl.origin !== window.location.origin) { 26 | // Our service worker won't work if PUBLIC_URL is on a different origin 27 | // from what our page is served on. This might happen if a CDN is used to 28 | // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 29 | return; 30 | } 31 | 32 | window.addEventListener('load', () => { 33 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; 34 | 35 | if (!isLocalhost) { 36 | // Is not local host. Just register service worker 37 | registerValidSW(swUrl); 38 | } else { 39 | // This is running on localhost. Lets check if a service worker still exists or not. 40 | checkValidServiceWorker(swUrl); 41 | } 42 | }); 43 | } 44 | } 45 | 46 | function registerValidSW(swUrl) { 47 | navigator.serviceWorker 48 | .register(swUrl) 49 | .then(registration => { 50 | registration.onupdatefound = () => { 51 | const installingWorker = registration.installing; 52 | installingWorker.onstatechange = () => { 53 | if (installingWorker.state === 'installed') { 54 | if (navigator.serviceWorker.controller) { 55 | // At this point, the old content will have been purged and 56 | // the fresh content will have been added to the cache. 57 | // It's the perfect time to display a "New content is 58 | // available; please refresh." message in your web app. 59 | console.log('New content is available; please refresh.'); 60 | } else { 61 | // At this point, everything has been precached. 62 | // It's the perfect time to display a 63 | // "Content is cached for offline use." message. 64 | console.log('Content is cached for offline use.'); 65 | } 66 | } 67 | }; 68 | }; 69 | }) 70 | .catch(error => { 71 | console.error('Error during service worker registration:', error); 72 | }); 73 | } 74 | 75 | function checkValidServiceWorker(swUrl) { 76 | // Check if the service worker can be found. If it can't reload the page. 77 | fetch(swUrl) 78 | .then(response => { 79 | // Ensure service worker exists, and that we really are getting a JS file. 80 | if ( 81 | response.status === 404 || 82 | response.headers.get('content-type').indexOf('javascript') === -1 83 | ) { 84 | // No service worker found. Probably a different app. Reload the page. 85 | navigator.serviceWorker.ready.then(registration => { 86 | registration.unregister().then(() => { 87 | window.location.reload(); 88 | }); 89 | }); 90 | } else { 91 | // Service worker found. Proceed as normal. 92 | registerValidSW(swUrl); 93 | } 94 | }) 95 | .catch(() => { 96 | console.log( 97 | 'No internet connection found. App is running in offline mode.' 98 | ); 99 | }); 100 | } 101 | 102 | export function unregister() { 103 | if ('serviceWorker' in navigator) { 104 | navigator.serviceWorker.ready.then(registration => { 105 | registration.unregister(); 106 | }); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/static/css/front.css: -------------------------------------------------------------------------------- 1 | /********公共样式*********/ 2 | html { 3 | height: 100%; 4 | } 5 | 6 | body { 7 | font-family: Arial, Roboto, Helvetica, 'Microsoft YaHei', STHeiti, sans-serif; 8 | width: 100%; 9 | min-height: 100%; 10 | margin: 0; 11 | padding: 0; 12 | position: relative; 13 | overflow: auto; 14 | box-sizing: border-box; 15 | color: #575656; 16 | font-size: 13px; 17 | } 18 | 19 | @media screen and (orientation: landscape) { 20 | body { 21 | overflow-y: auto; 22 | } 23 | } 24 | 25 | ul, ol, li, dl, dt, dd, p, h1, h2, h3, h4, h5, h6, div, button, a, form, textarea, th, tr, td, table, span { 26 | margin: 0; 27 | padding: 0; 28 | box-sizing: border-box; 29 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 30 | -webkit-appearance: none; 31 | -moz-appearance: none; 32 | } 33 | 34 | a { 35 | text-decoration: none; 36 | color: #333; 37 | } 38 | 39 | ul, ol { 40 | list-style: none; 41 | } 42 | 43 | input[type="text"], input[type="button"], input[type="tel"], input[type="email"], input[type="submit"], input[type="reset"], button { 44 | -webkit-appearance: none; 45 | border-radius: 0; 46 | border: none; 47 | outline: none; 48 | } 49 | 50 | /*input:not input[type="checkbox"],button { 51 | -webkit-appearance: none; 52 | border-radius: 0; 53 | border: none; 54 | outline: none; 55 | }*/ 56 | /*input.checkbox{ 57 | appearance:auto!important; 58 | -webkit-appearance:auto!important; 59 | }*/ 60 | .parent { 61 | width: 100%; 62 | height: 100%; 63 | display: table; 64 | } 65 | 66 | .child { 67 | display: table-cell; 68 | vertical-align: middle; 69 | } 70 | 71 | .clearfix:before { 72 | content: ''; 73 | display: table; 74 | } 75 | 76 | .clearfix:after { 77 | content: ''; 78 | display: table; 79 | clear: both; 80 | } 81 | 82 | .mask { 83 | width: 100%; 84 | height: 100%; 85 | position: absolute; 86 | left: 0; 87 | top: 0; 88 | background: rgba(0, 0, 0, 0.6); 89 | z-index: 99; 90 | } 91 | 92 | .none { 93 | display: none; 94 | } 95 | 96 | .clear { 97 | clear: both; 98 | } 99 | 100 | .swiper-container { 101 | width: 100%; 102 | height: 100%; 103 | } 104 | 105 | .swiper-slide { 106 | text-align: center; 107 | font-size: 18px; 108 | 109 | /* Center slide text vertically */ 110 | display: -webkit-box; 111 | display: -ms-flexbox; 112 | display: -webkit-flex; 113 | display: flex; 114 | -webkit-box-pack: center; 115 | -ms-flex-pack: center; 116 | -webkit-justify-content: center; 117 | justify-content: center; 118 | -webkit-box-align: center; 119 | -ms-flex-align: center; 120 | -webkit-align-items: center; 121 | align-items: center; 122 | height: auto; 123 | } 124 | 125 | .swiper-button-next, .swiper-button-prev { 126 | background-image: none; 127 | width: 27px; 128 | height: 27px; 129 | background: #e5efd8; 130 | 131 | } 132 | 133 | /*.swiper-slide:last-child>img,.swiper-slide:nth-of-type(5) img{ 134 | cursor:pointer; 135 | }*/ 136 | 137 | @font-face { 138 | font-family: 'iconfont'; 139 | src: url('../font/iconfont.eot'); 140 | src: url('../font/iconfont.eot?#iefix') format('embedded-opentype'), 141 | url('../font/iconfont.woff') format('woff'), 142 | url('../font/iconfont.ttf') format('truetype'), 143 | url('../font/iconfont.svg#iconfont') format('svg'); 144 | } 145 | 146 | .iconfont { 147 | font-family: "iconfont" !important; 148 | font-size: 22px; 149 | font-style: normal; 150 | -webkit-font-smoothing: antialiased; 151 | -webkit-text-stroke-width: 0.2px; 152 | -moz-osx-font-smoothing: grayscale; 153 | position: relative; 154 | left: 2px; 155 | top: 2px; 156 | 157 | } 158 | 159 | .loading { 160 | width: 100px; 161 | height: 100px; 162 | position: absolute; 163 | text-align: center; 164 | left: 0; 165 | right: 0; 166 | top: 0; 167 | bottom: 0; 168 | margin: auto; /*50%为自身尺寸的一半*/ 169 | z-index: 20001; 170 | } 171 | 172 | .loading-mask { 173 | position: fixed; 174 | left: 0; 175 | top: 0; 176 | width: 100%; 177 | height: 100%; 178 | z-index: 20000; 179 | background-color: #000; 180 | filter: alpha(opacity=30); 181 | -moz-opacity: 0.30; 182 | opacity: 0.30; 183 | text-align: center; 184 | overflow: hidden; 185 | overflow-y: visible; 186 | } -------------------------------------------------------------------------------- /src/static/css/select.css: -------------------------------------------------------------------------------- 1 | div, ul, li { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | ul, li { 6 | list-style: none outside none; 7 | } 8 | 9 | /* layer begin */ 10 | .ios-select-widget-box.olay { 11 | position: absolute; 12 | z-index: 500; 13 | top: 0; 14 | left: 0; 15 | width: 100%; 16 | height: 100%; 17 | opacity: 1; 18 | background: rgba(0, 0, 0, 0.75); 19 | } 20 | .ios-select-widget-box.olay > div { 21 | position: fixed; 22 | z-index: 1000; 23 | width: 100%; 24 | height: 100%; 25 | background-color: #f2f2f2; 26 | bottom: 0; 27 | left: 0; 28 | visibility: visible; 29 | } 30 | .ios-select-widget-box header.iosselect-header { 31 | height: 44px; 32 | line-height: 44px; 33 | background-color: #eee; 34 | width: 100%; 35 | z-index: 9999; 36 | text-align: center; 37 | } 38 | .ios-select-widget-box header.iosselect-header a { 39 | font-size: 16px; 40 | color: #e94643; 41 | text-decoration: none; 42 | } 43 | .ios-select-widget-box header.iosselect-header a.close { 44 | float: left; 45 | padding-left: 15px; 46 | height: 44px; 47 | line-height: 44px; 48 | } 49 | .ios-select-widget-box header.iosselect-header a.sure { 50 | float: right; 51 | padding-right: 15px; 52 | height: 44px; 53 | line-height: 44px; 54 | } 55 | .ios-select-widget-box { 56 | padding-top: 44px; 57 | } 58 | .ios-select-widget-box .one-level-contain, 59 | .ios-select-widget-box .two-level-contain, 60 | .ios-select-widget-box .three-level-contain, 61 | .ios-select-widget-box .four-level-contain, 62 | .ios-select-widget-box .five-level-contain { 63 | height: 100%; 64 | overflow: hidden; 65 | } 66 | .ios-select-widget-box .iosselect-box { 67 | overflow: hidden; 68 | } 69 | .ios-select-widget-box .iosselect-box > div { 70 | display: block; 71 | float: left; 72 | } 73 | .ios-select-widget-box ul { 74 | background-color: #fff; 75 | } 76 | .ios-select-widget-box ul li { 77 | font-size: 13px; 78 | height: 35px; 79 | line-height: 35px; 80 | background-color: #fff; 81 | white-space: nowrap; 82 | overflow: hidden; 83 | text-overflow: ellipsis; 84 | text-align: center; 85 | color: #111; 86 | opacity: .3; 87 | } 88 | .ios-select-widget-box ul li.at { 89 | font-size: 16px; 90 | opacity: 1; 91 | } 92 | .ios-select-widget-box ul li.side1 { 93 | font-size: 15px; 94 | opacity: .7; 95 | } 96 | .ios-select-widget-box ul li.side2 { 97 | font-size: 14px; 98 | opacity: .5; 99 | } 100 | .ios-select-widget-box.one-level-box .one-level-contain { 101 | width: 100%; 102 | } 103 | .ios-select-widget-box.one-level-box .two-level-contain, 104 | .ios-select-widget-box.one-level-box .three-level-contain, 105 | .ios-select-widget-box.one-level-box .four-level-contain, 106 | .ios-select-widget-box.one-level-box .five-level-contain, 107 | { 108 | width: 0; 109 | } 110 | .ios-select-widget-box.two-level-box .one-level-contain, 111 | .ios-select-widget-box.two-level-box .two-level-contain { 112 | width: 50%; 113 | } 114 | .ios-select-widget-box.two-level-box .three-level-contain, 115 | .ios-select-widget-box.two-level-box .four-level-contain, 116 | .ios-select-widget-box.two-level-box .five-level-contain, 117 | { 118 | width: 0; 119 | } 120 | .ios-select-widget-box.three-level-box .one-level-contain, 121 | .ios-select-widget-box.three-level-box .two-level-contain { 122 | width: 30%; 123 | } 124 | .ios-select-widget-box.three-level-box .three-level-contain { 125 | width: 40%; 126 | } 127 | .ios-select-widget-box.three-level-box .four-level-contain 128 | .ios-select-widget-box.three-level-box .five-level-contain { 129 | width: 0%; 130 | } 131 | 132 | .ios-select-widget-box.four-level-box .one-level-contain, 133 | .ios-select-widget-box.four-level-box .two-level-contain, 134 | .ios-select-widget-box.four-level-box .three-level-contain, 135 | .ios-select-widget-box.four-level-box .four-level-contain { 136 | width: 25%; 137 | } 138 | .ios-select-widget-box.four-level-box .five-level-contain { 139 | width: 0%; 140 | } 141 | 142 | .ios-select-widget-box.five-level-box .one-level-contain, 143 | .ios-select-widget-box.five-level-box .two-level-contain, 144 | .ios-select-widget-box.five-level-box .three-level-contain, 145 | .ios-select-widget-box.five-level-box .four-level-contain, 146 | .ios-select-widget-box.five-level-box .five-level-contain { 147 | width: 20%; 148 | } 149 | .ios-select-widget-box .cover-area1 { 150 | width: 100%; 151 | border: none; 152 | border-top: 1px solid #d9d9d9; 153 | position: absolute; 154 | top: 149px; 155 | margin: 0; 156 | height: 0; 157 | } 158 | .ios-select-widget-box .cover-area2 { 159 | width: 100%; 160 | border: none; 161 | border-top: 1px solid #d9d9d9; 162 | position: absolute; 163 | top: 183px; 164 | margin: 0; 165 | height: 0; 166 | } 167 | .ios-select-widget-box #iosSelectTitle { 168 | margin: 0; 169 | padding: 0; 170 | display: inline-block; 171 | font-size: 16px; 172 | font-weight: normal; 173 | color: #333; 174 | } 175 | .ios-select-body-class { 176 | overflow: hidden; 177 | position: fixed; 178 | top: 0; 179 | left: 0; 180 | right: 0; 181 | bottom: 0; 182 | } 183 | .ios-select-widget-box.olay > div > .ios-select-loading-box { 184 | width: 100%; 185 | height: 100%; 186 | position: absolute; 187 | top: 0; 188 | bottom: 0; 189 | left: 0; 190 | right: 0; 191 | background-color: rgba(0,0,0,.5); 192 | display: none; 193 | } 194 | .ios-select-widget-box.olay > div > .ios-select-loading-box > .ios-select-loading { 195 | width: 50px; 196 | height: 50px; 197 | position: absolute; 198 | left: 50%; 199 | top: 50%; 200 | margin-top: -25px; 201 | margin-left: -25px; 202 | /*background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1OEMxMEI3NDI3MEIxMUU2ODVGMzhFNjYyMDIyOUFCMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1OEMxMEI3NTI3MEIxMUU2ODVGMzhFNjYyMDIyOUFCMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU4QzEwQjcyMjcwQjExRTY4NUYzOEU2NjIwMjI5QUIwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU4QzEwQjczMjcwQjExRTY4NUYzOEU2NjIwMjI5QUIwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+GeWqMwAAA+BJREFUeNrMmVlsTGEUx+9cXZQiLZWKklhbQSSlSMUWSxAiJGJ5aSQehOiDF7yI4EFILW99I3iRSJGUPkiILSKp2OuJVtHWkrRVapn2jv+R/ycnn5l27rQz10l+mWlyl/+c833nO+c0FIlEnATMBbPAIn5OBuPAENAKToC74BtoB59AG/D9spBPgaPBdrAFjJH7Fa66TkRuNe8gP8Bb8Ap8j/eFaXFelwv286WZfKG2WL9SX5cFCuntBvAc/OoPD64HJ8EI5Q3tmW7whl4pAl/AUfAEDKZnQ1HuFXGPQGOiAsW7x8A26wUhirgMLnGtfe3hGcO5NApARpRnSchrY0UhlkAJxxmw0npYBzgOKinSj6WDCfRyphWFJnAPdMUjUH71WbDKElcDykGL0zcbCEroVf389+CW7Uk3ygNk/azghYIHDoCN/SDO4W6+A55aAiUrzImWz7StA2WWuF2gIpEc1ovVgQeWyELm06gCc8ARJU44DM45yTPZII8tkXO5DP4RuI8iPYqr4YmQbJN8+E4JlA1abAuUBbtZeU526O4khDWW3QdhK9TZWmAZd6/x3inw0UmdSZJ/pgSKlilGoMvTwoiTw/20k3p7yTyovRgScTNAvgrvFSbkVJuE+LU6GiXEefJHqfKefF5zgrMGVRnJZ4HEerryXjdzU1DWbB2BI10mRuPBej+1WhKsi8vLeDDXZRllwtvoBG8davNmS4gHUZyTQIWSrM1iQpyZptafo4QGabp9+JNmOijMY9MTtGWpEHe5PDHMGsz/DwQOUwI7XVYUZheP1ZVEAJbOFsGswTYR+EKF2NWVRABWwHPYeLDFZWKOKJFLAhRYpMQJjS7rsWYlcjlTT6pNOr5pahfL5m12KaparUPpZTcEILCEjjGniCy9iMk3F9hImzCXcZqQKhOnLFShjbBX/psQP4Aq5UUpdfZEGXEkKzGvZf4zu/exOdV0T1LJCZTx4gK2msm2Uq494z1pS29Ea5ra2RPrrm4HpwvJsplgtTW/kXq0M1ZffF2F2uMNe+nJUD+HVWaLm8AAtXNrOXTqcfQh2fwQmKdST4TTgAp6ui+WTWFTrUpedu15Fs29Do/kuDsIZlsiW7njryZQ2MrAaD5Yqko88+w6zoPCfsdv5VwjnnXayA67zYmUdGM/e0i+E7nWivnDPUWEz6iyPedngLkY7ARDrQeb72GOz5roVY/eylMHvxflXjkpLoKHfZ2wmhJIkvcylUi9BAnTa9U9DD59CzQm/csaZv0cn0JbOeK4ye/xbfcE/w0hYZvElnU8GEXBGRQjeewzi5B6rtP6RGY9vwUYACMHTam1T1ebAAAAAElFTkSuQmCC) no-repeat 0 0; 203 | background-size: contain;*/ 204 | -webkit-animation: loading-keyframe 1s infinite linear; 205 | animation: loading-keyframe 1s infinite linear; 206 | } 207 | @-webkit-keyframes loading-keyframe { 208 | from { 209 | -webkit-transform: rotate(0deg); 210 | } 211 | to { 212 | -webkit-transform: rotate(360deg); 213 | } 214 | } 215 | @keyframes loading-keyframe { 216 | from { 217 | transform: rotate(0deg); 218 | } 219 | to { 220 | transform: rotate(360deg); 221 | } 222 | } -------------------------------------------------------------------------------- /src/static/css/swipe.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Swiper 3.4.2 3 | * Most modern mobile touch slider and framework with hardware accelerated transitions 4 | * 5 | * http://www.idangero.us/swiper/ 6 | * 7 | * Copyright 2017, Vladimir Kharlampidi 8 | * The iDangero.us 9 | * http://www.idangero.us/ 10 | * 11 | * Licensed under MIT 12 | * 13 | * Released on: March 10, 2017 14 | */ 15 | .swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;z-index:1}.swiper-container-no-flexbox .swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-moz-box-orient:vertical;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-ms-transition-property:-ms-transform;transition-property:transform;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate(0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-container-multirow>.swiper-wrapper{-webkit-box-lines:multiple;-moz-box-lines:multiple;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-moz-transition-timing-function:ease-out;-ms-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;width:100%;height:100%;position:relative}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;-webkit-transition-property:-webkit-transform,height;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-ms-transition-property:-ms-transform;transition-property:transform,height}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-wp8-horizontal{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-wp8-vertical{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;-moz-background-size:27px 44px;-webkit-background-size:27px 44px;background-size:27px 44px;background-position:center;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");left:10px;right:auto}.swiper-button-prev.swiper-button-black,.swiper-container-rtl .swiper-button-next.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.swiper-button-white,.swiper-container-rtl .swiper-button-next.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");right:10px;left:auto}.swiper-button-next.swiper-button-black,.swiper-container-rtl .swiper-button-prev.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-white,.swiper-container-rtl .swiper-button-prev.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s;transition:.3s;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-moz-appearance:none;-ms-appearance:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-white .swiper-pagination-bullet{background:#fff}.swiper-pagination-bullet-active{opacity:1;background:#007aff}.swiper-pagination-white .swiper-pagination-bullet-active{background:#fff}.swiper-pagination-black .swiper-pagination-bullet-active{background:#000}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-o-transform:translate(0,-50%);-ms-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:5px 0;display:block}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 5px}.swiper-pagination-progress{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progress .swiper-pagination-progressbar{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-moz-transform-origin:left top;-ms-transform-origin:left top;-o-transform-origin:left top;transform-origin:left top}.swiper-container-rtl .swiper-pagination-progress .swiper-pagination-progressbar{-webkit-transform-origin:right top;-moz-transform-origin:right top;-ms-transform-origin:right top;-o-transform-origin:right top;transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progress{width:100%;height:4px;left:0;top:0}.swiper-container-vertical>.swiper-pagination-progress{width:4px;height:100%;left:0;top:0}.swiper-pagination-progress.swiper-pagination-white{background:rgba(255,255,255,.5)}.swiper-pagination-progress.swiper-pagination-white .swiper-pagination-progressbar{background:#fff}.swiper-pagination-progress.swiper-pagination-black .swiper-pagination-progressbar{background:#000}.swiper-container-3d{-webkit-perspective:1200px;-moz-perspective:1200px;-o-perspective:1200px;perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;-ms-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-moz-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-moz-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-moz-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-moz-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-coverflow .swiper-wrapper,.swiper-container-flip .swiper-wrapper{-ms-perspective:1200px}.swiper-container-cube,.swiper-container-flip{overflow:visible}.swiper-container-cube .swiper-slide,.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-cube .swiper-slide .swiper-slide,.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active,.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top,.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-slide{visibility:hidden;-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube.swiper-container-rtl .swiper-slide{-webkit-transform-origin:100% 0;-moz-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-fade.swiper-container-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;-moz-transition-timing-function:ease-out;-ms-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-moz-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;-moz-transform-origin:50%;transform-origin:50%;-webkit-animation:swiper-preloader-spin 1s steps(12,end) infinite;-moz-animation:swiper-preloader-spin 1s steps(12,end) infinite;animation:swiper-preloader-spin 1s steps(12,end) infinite}.swiper-lazy-preloader:after{display:block;content:"";width:100%;height:100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");background-position:50%;-webkit-background-size:100%;background-size:100%;background-repeat:no-repeat}.swiper-lazy-preloader-white:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}@-webkit-keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg)}}@keyframes swiper-preloader-spin{100%{transform:rotate(360deg)}} -------------------------------------------------------------------------------- /src/static/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/font/iconfont.eot -------------------------------------------------------------------------------- /src/static/font/iconfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Created by FontForge 20120731 at Mon Jun 19 13:38:37 2017 6 | By admin 7 | 8 | 9 | 10 | 24 | 26 | 28 | 30 | 32 | 34 | 38 | 40 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/static/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/font/iconfont.ttf -------------------------------------------------------------------------------- /src/static/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/font/iconfont.woff -------------------------------------------------------------------------------- /src/static/images/afh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/afh.png -------------------------------------------------------------------------------- /src/static/images/animation_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/animation_1.gif -------------------------------------------------------------------------------- /src/static/images/arrow_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/arrow_left.png -------------------------------------------------------------------------------- /src/static/images/arrow_left1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/arrow_left1.png -------------------------------------------------------------------------------- /src/static/images/arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/arrow_right.png -------------------------------------------------------------------------------- /src/static/images/arrow_right1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/arrow_right1.png -------------------------------------------------------------------------------- /src/static/images/ban_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/ban_1.png -------------------------------------------------------------------------------- /src/static/images/ban_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/ban_2.png -------------------------------------------------------------------------------- /src/static/images/ban_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/ban_3.png -------------------------------------------------------------------------------- /src/static/images/ban_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/ban_4.png -------------------------------------------------------------------------------- /src/static/images/banner/banner_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/banner/banner_1.png -------------------------------------------------------------------------------- /src/static/images/banner/banner_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/banner/banner_2.png -------------------------------------------------------------------------------- /src/static/images/banner/banner_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/banner/banner_3.png -------------------------------------------------------------------------------- /src/static/images/banner/banner_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/banner/banner_4.png -------------------------------------------------------------------------------- /src/static/images/banner/banner_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/banner/banner_5.png -------------------------------------------------------------------------------- /src/static/images/banner/banner_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/banner/banner_6.png -------------------------------------------------------------------------------- /src/static/images/banner_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/banner_1.png -------------------------------------------------------------------------------- /src/static/images/banner_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/banner_2.png -------------------------------------------------------------------------------- /src/static/images/banner_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/banner_3.png -------------------------------------------------------------------------------- /src/static/images/banner_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/banner_4.png -------------------------------------------------------------------------------- /src/static/images/banner_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/banner_5.png -------------------------------------------------------------------------------- /src/static/images/banner_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/banner_6.png -------------------------------------------------------------------------------- /src/static/images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/bg.jpg -------------------------------------------------------------------------------- /src/static/images/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/bg2.jpg -------------------------------------------------------------------------------- /src/static/images/bg_haslogo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/bg_haslogo.jpg -------------------------------------------------------------------------------- /src/static/images/btn_right.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/btn_right.jpg -------------------------------------------------------------------------------- /src/static/images/countryImg/CN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/countryImg/CN.png -------------------------------------------------------------------------------- /src/static/images/countryImg/ID.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/countryImg/ID.png -------------------------------------------------------------------------------- /src/static/images/countryImg/IQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/countryImg/IQ.png -------------------------------------------------------------------------------- /src/static/images/countryImg/KZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/countryImg/KZ.png -------------------------------------------------------------------------------- /src/static/images/countryImg/RU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/countryImg/RU.png -------------------------------------------------------------------------------- /src/static/images/cx_again.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/cx_again.jpg -------------------------------------------------------------------------------- /src/static/images/cx_first.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/cx_first.jpg -------------------------------------------------------------------------------- /src/static/images/cx_valid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/cx_valid.jpg -------------------------------------------------------------------------------- /src/static/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/favicon.ico -------------------------------------------------------------------------------- /src/static/images/gif/animation_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/gif/animation_1.gif -------------------------------------------------------------------------------- /src/static/images/gif/gif_1.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/gif/gif_1.GIF -------------------------------------------------------------------------------- /src/static/images/gif/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/gif/loading.gif -------------------------------------------------------------------------------- /src/static/images/gif_1.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/gif_1.GIF -------------------------------------------------------------------------------- /src/static/images/icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/icon.gif -------------------------------------------------------------------------------- /src/static/images/icon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/icon/favicon.ico -------------------------------------------------------------------------------- /src/static/images/label/Indonesia_label.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/label/Indonesia_label.jpg -------------------------------------------------------------------------------- /src/static/images/label/Russia_label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/label/Russia_label.png -------------------------------------------------------------------------------- /src/static/images/label/ar-sa_label.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/label/ar-sa_label.jpg -------------------------------------------------------------------------------- /src/static/images/lbl_digitcode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/lbl_digitcode.jpg -------------------------------------------------------------------------------- /src/static/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/loading.gif -------------------------------------------------------------------------------- /src/static/images/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/logo.gif -------------------------------------------------------------------------------- /src/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/logo.png -------------------------------------------------------------------------------- /src/static/images/next.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/next.jpg -------------------------------------------------------------------------------- /src/static/images/oil_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/oil_1.png -------------------------------------------------------------------------------- /src/static/images/oil_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/oil_2.png -------------------------------------------------------------------------------- /src/static/images/oil_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/oil_3.png -------------------------------------------------------------------------------- /src/static/images/selectLanguageLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/selectLanguageLeft.png -------------------------------------------------------------------------------- /src/static/images/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/start.png -------------------------------------------------------------------------------- /src/static/images/true_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/true_icon.png -------------------------------------------------------------------------------- /src/static/images/up.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/up.jpg -------------------------------------------------------------------------------- /src/static/images/yd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/yd.png -------------------------------------------------------------------------------- /src/static/images/ymny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/images/ymny.png -------------------------------------------------------------------------------- /src/static/js/BroswerUtil.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Administrator on 15-1-12. 3 | */ 4 | function BroswerUtil() { 5 | } 6 | 7 | BroswerUtil = { 8 | //检测浏览器版本 9 | getBrowserVersion: function () { 10 | var agent = navigator.userAgent.toLowerCase(); 11 | var arr = []; 12 | var Browser = ""; 13 | var Bversion = ""; 14 | var verinNum = ""; 15 | //IE 16 | if (agent.indexOf("msie") > 0) { 17 | var regStr_ie = /msie [\d.]+;/gi; 18 | Browser = "IE"; 19 | Bversion = "" + agent.match(regStr_ie) 20 | } 21 | //firefox 22 | else if (agent.indexOf("firefox") > 0) { 23 | var regStr_ff = /firefox\/[\d.]+/gi; 24 | Browser = "firefox"; 25 | Bversion = "" + agent.match(regStr_ff); 26 | } 27 | //Chrome 28 | else if (agent.indexOf("chrome") > 0) { 29 | var regStr_chrome = /chrome\/[\d.]+/gi; 30 | Browser = "chrome"; 31 | Bversion = "" + agent.match(regStr_chrome); 32 | } 33 | //Safari 34 | else if (agent.indexOf("safari") > 0 && agent.indexOf("chrome") < 0) { 35 | var regStr_saf = /version\/[\d.]+/gi; 36 | Browser = "safari"; 37 | Bversion = "" + agent.match(regStr_saf); 38 | } 39 | //Opera 40 | else if (agent.indexOf("opera") >= 0) { 41 | var regStr_opera = /version\/[\d.]+/gi; 42 | Browser = "opera"; 43 | Bversion = "" + agent.match(regStr_opera); 44 | } else { 45 | var browser = navigator.appName; 46 | if (browser == "Netscape") { 47 | var version = agent.split(";"); 48 | var trim_Version = version[7].replace(/[ ]/g, ""); 49 | var rvStr = trim_Version.match(/[\d\.]/g).toString(); 50 | var rv = rvStr.replace(/[,]/g, ""); 51 | Bversion = rv; 52 | Browser = "IE" 53 | } 54 | } 55 | verinNum = (Bversion + "").replace(/[^0-9.]/ig, ""); 56 | arr.push(Browser); 57 | arr.push(verinNum); 58 | return arr; 59 | }, 60 | //检测是否是XX浏览器 61 | WB: (function () { 62 | var UserAgent = navigator.userAgent.toLowerCase(); 63 | return { 64 | isIE6: /msie 6.0/.test(UserAgent), // IE6 65 | isIE7: /msie 7.0/.test(UserAgent), // IE7 66 | isIE8: /msie 8.0/.test(UserAgent), // IE8 67 | isIE9: /msie 9.0/.test(UserAgent), // IE9 68 | isIE10: /msie 10.0/.test(UserAgent), // IE10 69 | isIE11: /msie 11.0/.test(UserAgent), // IE11 70 | isLB: /lbbrowser/.test(UserAgent), // 猎豹浏览器 71 | isUc: /ucweb/.test(UserAgent), // UC浏览器 72 | is360: /360se/.test(UserAgent), // 360浏览器 73 | isBaidu: /bidubrowser/.test(UserAgent), // 百度浏览器 74 | isSougou: /metasr/.test(UserAgent), // 搜狗浏览器 75 | isChrome: /chrome/.test(UserAgent.substr(-33, 6)), // Chrome浏览器 76 | isFirefox: /firefox/.test(UserAgent), // 火狐浏览器 77 | isOpera: /opera/.test(UserAgent), // Opera浏览器 78 | isSafire: /safari/.test(UserAgent) && !/chrome/.test(UserAgent), // safire浏览器 79 | isQQ: /qqbrowser/.test(UserAgent)//qq浏览器 80 | }; 81 | })(), 82 | //检测当前操作系统 83 | CurrentSystem: (function () { 84 | var system = { 85 | win: false, 86 | mac: false, 87 | xll: false, 88 | iphone: false, 89 | ipoad: false, 90 | ipad: false, 91 | ios: false, 92 | android: false, 93 | nokiaN: false, 94 | winMobile: false, 95 | wii: false, 96 | ps: false 97 | }; 98 | 99 | var ua = navigator.userAgent; 100 | // 检测平台 101 | var p = navigator.platform; 102 | system.win = p.indexOf('Win') == 0; 103 | system.mac = p.indexOf('Mac') == 0; 104 | system.xll = (p.indexOf('Xll') == 0 || p.indexOf('Linux') == 0); 105 | 106 | // 检测Windows操作系统 107 | if (system.win) { 108 | if (/Win(?:dows )?([^do]{2})\s?(\d+\.\d+)?/.test(ua)) { 109 | if (RegExp['$1'] == 'NT') { 110 | switch (RegExp['$2']) { 111 | case '5.0': 112 | system.win = '2000'; 113 | break; 114 | case '5.1': 115 | system.win = 'XP'; 116 | break; 117 | case '6.0': 118 | system.win = 'Vista'; 119 | break; 120 | case '6.1': 121 | system.win = '7'; 122 | break; 123 | case '6.2': 124 | system.win = '8'; 125 | break; 126 | default: 127 | system.win = 'NT'; 128 | break; 129 | } 130 | } else if (RegExp['$1'] == '9x') { 131 | system.win = 'ME'; 132 | } else { 133 | system.win = RegExp['$1']; 134 | } 135 | } 136 | } 137 | 138 | // 移动设备 139 | system.iphone = ua.indexOf('iPhone') > -1; 140 | system.ipod = ua.indexOf('iPod') > -1; 141 | system.ipad = ua.indexOf('iPad') > -1; 142 | system.nokiaN = ua.indexOf('nokiaN') > -1; 143 | 144 | // windows mobile 145 | if (system.win == 'CE') { 146 | system.winMobile = system.win; 147 | } else if (system.win == 'Ph') { 148 | if (/Windows Phone OS (\d+.\d)/i.test(ua)) { 149 | system.win = 'Phone'; 150 | system.winMobile = parseFloat(RegExp['$1']); 151 | } 152 | } 153 | 154 | // 检测IOS版本 155 | if (system.mac && ua.indexOf('Mobile') > -1) { 156 | if (/CPU (?:iPhone )?OS (\d+_\d+)/i.test(ua)) { 157 | system.ios = parseFloat(RegExp['$1'].replace('_', '.')); 158 | } else { 159 | system.ios = 2; // 不能真正检测出来,所以只能猜测 160 | } 161 | } 162 | 163 | // 检测Android版本 164 | if (/Android (\d+\.\d+)/i.test(ua)) { 165 | system.android = parseFloat(RegExp['$1']); 166 | } 167 | 168 | // 游戏系统 169 | system.wii = ua.indexOf('Wii') > -1; 170 | system.ps = /PlayStation/i.test(ua); 171 | 172 | return { 173 | system: system 174 | } 175 | })() 176 | } 177 | 178 | 179 | -------------------------------------------------------------------------------- /src/static/js/Event.js: -------------------------------------------------------------------------------- 1 | function EventUtil() { 2 | var _self = this; 3 | ///添加事件 4 | var addEvent = (function () { 5 | if (document.addEventListener) { 6 | return function (el, type, fn) { 7 | el.addEventListener(type, fn, false); 8 | } 9 | } else { 10 | return function (el, type, fn) { 11 | el.attachEvent("on" + type, function () { 12 | return fn.call(el, window.event); 13 | }); 14 | } 15 | } 16 | })(); 17 | 18 | ///添加属性改变事件 19 | var addPropertyChangeEvent = function (obj, fn) { 20 | if (window.ActiveXObject) { 21 | obj.onpropertychange = fn; 22 | } else { 23 | obj.addEventListener("input", fn, false); 24 | } 25 | } 26 | 27 | //移除事件 28 | var removeEvent = function (obj, type, fn) { 29 | if (obj.removeEventListener) { 30 | obj.removeEventListener(type, fn, false); 31 | } else if (obj.detachEvent) { 32 | obj.detachEvent("on" + type, obj["on" + type + fn]); 33 | obj["on" + type + fn] = null; 34 | } 35 | } 36 | 37 | //加载事件 38 | var loadEvent = function (fn) { 39 | var oldonload = window.onload; 40 | if (typeof oldonload != "function") { 41 | window.onload = fn; 42 | } else { 43 | window.onload = function () { 44 | oldonload(); 45 | fn(); 46 | } 47 | } 48 | } 49 | 50 | //阻止事件 51 | var stopEvent = function (e) { 52 | e = e || window.event; 53 | if (e.preventDefault) { 54 | e.preventDefault(); 55 | e.stopPropagation(); 56 | } else { 57 | e.returnValue = false; 58 | e.cancelBubble = true; 59 | } 60 | } 61 | 62 | //如果仅仅是阻止事件冒泡 63 | var stopPropagation = function (e) { 64 | e = e || window.event; 65 | if (! +"\v1") { 66 | e.cancelBubble = true; 67 | } else { 68 | e.stopPropagation(); 69 | } 70 | } 71 | 72 | //取得事件源对象 73 | var getEvent1 = function (e) { 74 | e = e || window.event; 75 | var obj = e.srcElement ? e.srcElement : e.target; 76 | return obj; 77 | } 78 | //取得事件源对象 79 | var getEvent2 = function (e) { 80 | if (window.event) return window.event; 81 | var c = getEvent2.caller; 82 | while (c.caller) { 83 | c = c.caller; 84 | } 85 | return c.arguments[0]; 86 | } 87 | 88 | //或者这个功能更强大 89 | var getEvent3 = function (e) { 90 | var e = e || window.event; 91 | if (!e) { 92 | var c = this.getEvent3.caller; 93 | while (c) { 94 | e = c.arguments[0]; 95 | if (e && (Event == e.constructor || MouseEvent == e.constructor)) { 96 | break; 97 | } 98 | c = c.caller; 99 | } 100 | } 101 | var target = e.srcElement ? e.srcElement : e.target, 102 | currentN = target.nodeName.toLowerCase(), 103 | parentN = target.parentNode.nodeName.toLowerCase(), 104 | grandN = target.parentNode.parentNode.nodeName.toLowerCase(); 105 | return [e, target, currentN, parentN, grandN]; 106 | } 107 | 108 | 109 | _self.addEvent = addEvent; 110 | _self.addPropertyChangeEvent = addPropertyChangeEvent; 111 | _self.removeEvent = removeEvent; 112 | _self.loadEvent = loadEvent; 113 | _self.stopEvent = stopEvent; 114 | _self.stopPropagation = stopPropagation; 115 | _self.getEvent1 = getEvent1; 116 | _self.getEvent2 = getEvent2; 117 | _self.getEvent3 = getEvent3; 118 | } 119 | //var eventUtil = new EventUtil(); 120 | //eventUtil.loadEvent(function () { 121 | // eventUtil.addEvent(document, "click", function (e) { 122 | // alert(eventUtil.getEvent3(e)); 123 | // }); 124 | 125 | // eventUtil.addPropertyChangeEvent(document, function (e) { 126 | // alert(eventUtil.getEvent3(e)); 127 | // }); 128 | //}); -------------------------------------------------------------------------------- /src/static/js/Red.js: -------------------------------------------------------------------------------- 1 | /// 2 | ///检测表单中的不能为空(.notnull)的验证 3 | /* 4 | 时间:2012-6-6 5 | 作用:一对form标签下有多个(包括一个)表单需要提交时,使用js准确的判断当前按钮对那些元素做判断 6 | 7 | 用法:在form标签下 找到当前 表单的容器 给予class="form",当前表单的提交按钮给予 class="check" 8 | 需要验证为空的元素给予class="notnull" nullmsg="xx不能为空!"提示,需要进行逻辑判断的表单给予class="need" 9 | 判断的类型给予 class="num"(只能是数字) 验证的提示 logicmsg="XX只能是数字" 10 | 11 | 给予class="errorMessage"显示错误信息块 12 | 给予class="warn"显示错误信息 13 | 未使用js面向对象编程 14 | 逻辑判断,不传入need标识,直接给出正则表达式属性(自定义)regex="/^\d$/" 做出判断 15 | 16 | 在外部实现 17 | Global.submitCallback button回调函数 18 | Global.confirmCallback confirm回调函数; 19 | 需要改进的地方: 20 | 改进成一个jquery插件 21 | 22 | 更新时间:2014年12月3日 16:23:22 23 | 作者:Amber.Xu 24 | */ 25 | //$(document).ready( 26 | // function () { 27 | // $("form").find(".notnull").bind({ 28 | // focus: function () { 29 | // if ($(this).attr("value") == this.defaultValue) { 30 | // $(this).attr("value", ""); 31 | // } 32 | // }, 33 | // blur: function () { 34 | // if ($(this).attr("value") == "") { 35 | // $(this).attr("value", this.defaultValue); 36 | // } 37 | // } 38 | // }); 39 | // } 40 | //); 41 | ///*封装一个万能检测表单的方法*/ 42 | ///event.srcElement:引发事件的目标对象,常用于onclick事件。 43 | ///event.fromElement:引发事件的对象源,常用于onmouseout和onmouseover事件。 44 | ///event.toElement:引发事件后,鼠标移动到的目标源,常用于onmouseout和onmouseover事件。 45 | function Global() { 46 | var _self = this; 47 | } 48 | //用于.check按钮的回调 49 | Global.submitCallback = null; 50 | //用于.confirm按钮的回调 51 | Global.confirmCallback = null; 52 | 53 | $(document).ready(function () { 54 | //form body 55 | $("body").find(".form").each(function () { 56 | var form = this; 57 | this.onclick = function (e) { 58 | return Main(e, form); 59 | } 60 | 61 | document.onkeydown = function (eve) { 62 | var e = eve || window.event || arguments.callee.caller.arguments[0]; 63 | if (e && e.keyCode == 13) { 64 | return Main(e, form, true); 65 | } 66 | } 67 | }); 68 | 69 | //程序入口 70 | function Main(e, form, _Enter) { 71 | var button = null; 72 | try { 73 | button = e.srcElement == null ? document.activeElement : e.srcElement; 74 | } catch (e) { 75 | console.log(e.message) 76 | button = document.activeElement; 77 | } 78 | if ($(button).is(".check") || _Enter) { 79 | //alert("提交") 80 | var sub = (checkform(form) && CheckInputRex(form) && checkselect(form) && checkChecked(form) && checkValid(form)); 81 | if (sub) { 82 | // Call our callback, but using our own instance as the context 83 | Global.submitCallback.call(form, [e]); 84 | } else 85 | return sub; 86 | } else if ($(button).is(".confirm")) { 87 | //alert("删除") 88 | var sub = confirm($(button).attr("title")); 89 | if (sub) { 90 | Global.confirmCallback.call(form, [e]); 91 | } else 92 | return sub; 93 | } else { 94 | // //alert("其它") 95 | return true; 96 | } 97 | } 98 | 99 | /*检测表单中不能为空的元素*/ 100 | function checkform(form) { 101 | var b = true; 102 | $(form).find(".notnull").each(function () { 103 | if ($.trim($(this).val()).length <= 0 || $.trim($(this).val()) == $.trim($(this).attr("placeholder"))) {//|| $(this).val() == this.defaultValue 104 | // $(this).parents(".form").find(".warn").text($(this).attr("nullmsg")); 105 | // $(this).parents(".form").find(".errorMessage").show(); 106 | alert($(this).attr("nullmsg")); 107 | $(this).select(); 108 | $(this).focus(); 109 | return b = false; 110 | } 111 | }); 112 | if (b == true) { 113 | $(form).find(".warn").text(""); 114 | $(form).find(".errorMessage").hide(); 115 | } 116 | return b; 117 | } 118 | 119 | /*检测表单中必选的下拉列表*/ 120 | function checkselect(form) { 121 | var b = true; 122 | $(form).find(".select").each(function (i) { 123 | var ck = $(this).find('option:selected').text(); 124 | if (ck.indexOf("选择") > -1) { 125 | // $(this).parents(".form").find(".warn").text($(this).attr("nullmsg")); 126 | // $(this).parents(".form").find(".errorMessage").show(); 127 | 128 | alert($(this).attr("nullmsg")); 129 | $(this).select(); 130 | $(this).focus(); 131 | return b = false; 132 | } 133 | }); 134 | return b; 135 | } 136 | 137 | 138 | /*检测表单中验证模式*/ 139 | function checkValid(form) { 140 | var b = true; 141 | $(form).find(".valid").each(function (i) { 142 | var isValid = parseInt($(this).val()); 143 | if (!isValid) { 144 | // $(this).parents(".form").find(".warn").text($(this).attr("validmsg")); 145 | // $(this).parents(".form").find(".errorMessage").show(); 146 | 147 | alert($(this).attr("validmsg")); 148 | $(this).select(); 149 | $(this).focus(); 150 | return b = false; 151 | } 152 | 153 | }); 154 | return b; 155 | } 156 | 157 | /*检测表单中必选的复选框*/ 158 | function checkChecked(form) { 159 | var b = true; 160 | $(form).find(".checkbox").each(function (i) { 161 | var ck = $(this)[0].checked; 162 | if (!ck) { 163 | // $(this).parents(".form").find(".warn").text($(this).attr("nullmsg")); 164 | // $(this).parents(".form").find(".errorMessage").show(); 165 | 166 | alert($(this).attr("nullmsg")) 167 | $(this).select(); 168 | $(this).focus(); 169 | return b = false; 170 | } 171 | }); 172 | return b; 173 | } 174 | 175 | //检查是否匹配该正则表达式 176 | function GetFlase(value, reg, ele) { 177 | if (reg.test(value)) { 178 | return true; 179 | } 180 | // $(ele).parents(".form").find(".warn").text($(ele).attr("logicmsg")); 181 | // $(ele).parents(".form").find(".errorMessage").show(); 182 | alert($(ele).attr("logicmsg")); 183 | $(ele).focus(); 184 | $(ele).select(); 185 | return false; //不能提交 186 | } 187 | 188 | 189 | ///检查正则 190 | function CheckInputRex(form) { 191 | var b = true; 192 | $(form).find("input[type='text']").each(function () { 193 | if (typeof ($(this).attr("regex")) == 'string') { 194 | if ($.trim($(this).val()).length > 0 && $.trim($(this).val()) != $.trim($(this).attr("placeholder"))) { 195 | //当前表单的值 196 | var value = $(this).attr("value") || $(this).val(); 197 | var regx = eval($(this).attr("regex")); 198 | return b = GetFlase(value, regx, this); 199 | } 200 | } 201 | }); 202 | return b; 203 | } 204 | }); 205 | -------------------------------------------------------------------------------- /src/static/js/Slider.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Administrator on 15-1-9. 3 | */ 4 | //滑动条对象 5 | function Slider(swipestart, min, max, index, IsOk, lableIndex) { 6 | var _self = this; 7 | //是否开始滑动 8 | _self.swipestart = swipestart; 9 | //最小值 10 | _self.min = min; 11 | //最大值 12 | _self.max = max; 13 | //当前滑动条所处的位置 14 | _self.index = index; 15 | //是否滑动成功 16 | _self.IsOk = IsOk; 17 | //鼠标在滑动按钮的位置 18 | _self.lableIndex = lableIndex; 19 | 20 | var mobile = BroswerUtil.CurrentSystem.system.android || 21 | BroswerUtil.CurrentSystem.system.ios || 22 | BroswerUtil.CurrentSystem.system.ipad || 23 | BroswerUtil.CurrentSystem.system.iphone || 24 | BroswerUtil.CurrentSystem.system.ipoad || 25 | BroswerUtil.CurrentSystem.system.ipod || 26 | BroswerUtil.CurrentSystem.system.nokiaN; 27 | 28 | _self.mobile = mobile; 29 | 30 | 31 | var width = document.body.clientWidth; 32 | 33 | var isMobile = width <= 767; 34 | _self.isMobile = isMobile; 35 | } 36 | 37 | //初始化 38 | Slider.prototype.Init = function () { 39 | //2015年3月4日 11:30:46注释 40 | //document.getElementById("btnSubmit").disabled = true; 41 | var _self = this; 42 | $("#label").on("mousedown", function (event) { 43 | var e = event || window.event; 44 | _self.lableIndex = e.clientX - this.offsetLeft; 45 | if (!_self.IsOk) 46 | _self.HanderIn(); 47 | }); 48 | 49 | $("#pageSlide").on("mousemove", function (event) { 50 | if (!_self.IsOk) 51 | _self.HanderMove(event); 52 | }); 53 | 54 | $(document).on("mouseup", function (event) { 55 | if (!_self.IsOk) 56 | _self.HanderOut(); 57 | 58 | }); 59 | 60 | 61 | $("#label").on("touchstart", function (event) { 62 | try { 63 | var e = event || window.event; 64 | //event.originalEvent.changedTouches[0].clientX //event.originalEvent.pageX 65 | _self.lableIndex = event.originalEvent.changedTouches[0].clientX - this.offsetLeft; 66 | if (!_self.IsOk) 67 | _self.HanderIn(); 68 | 69 | } catch (e) { 70 | console.log(navigator.appVersion + "不支持TouchEvent事件!" + e.message); 71 | } 72 | }); 73 | 74 | $("#pageSlide").on("touchmove", function (event) { 75 | try { 76 | if (!_self.IsOk) 77 | _self.HanderMove(event); 78 | } catch (e) { 79 | console.log(navigator.appVersion + "不支持touchmove事件!" + e.message); 80 | } 81 | 82 | }); 83 | 84 | $(document).on("touchend", function (event) { 85 | try { 86 | if (!_self.IsOk) 87 | _self.HanderOut(); 88 | } catch (e) { 89 | console.log(navigator.appVersion + "不支持touchend事件!" + e.message); 90 | } 91 | 92 | }); 93 | } 94 | 95 | //鼠标/手指接触滑动按钮 96 | Slider.prototype.HanderIn = function () { 97 | var _self = this; 98 | _self.swipestart = true; 99 | _self.min = 0; 100 | _self.max = $("#slider").width(); 101 | if (_self.lableIndex < 0) { 102 | _self.lableIndex = 0; 103 | } 104 | } 105 | 106 | //鼠标/手指移出 107 | Slider.prototype.HanderOut = function () { 108 | var _self = this; 109 | //停止 110 | _self.swipestart = false; 111 | _self.Move(); 112 | } 113 | 114 | //鼠标/手指移动 115 | Slider.prototype.HanderMove = function (event) { 116 | var _self = this; 117 | if (_self.swipestart && !_self.IsOk) { 118 | event.preventDefault(); 119 | var event = event || window.event; 120 | //移动端(平板或者手机) 121 | if (_self.mobile) { 122 | //event.originalEvent.changedTouches[0].clientX //event.originalEvent.pageX 123 | _self.index = event.originalEvent.changedTouches[0].clientX - _self.lableIndex; 124 | 125 | //屏幕小于767 而且 不是移动端(平板或者手机) (这种情况属于用户把浏览器调到手机大小时) 126 | } else if (_self.isMobile && !_self.mobile) { 127 | _self.index = event.clientX - _self.lableIndex; 128 | } else { 129 | _self.index = event.clientX - _self.lableIndex; 130 | } 131 | _self.Move(); 132 | } 133 | } 134 | 135 | //鼠标/手指移动 136 | Slider.prototype.Move = function () { 137 | var _self = this; 138 | if (_self.index > 0) { 139 | var style = ""; 140 | if (_self.isMobile) { 141 | style = { 142 | "border-bottom-left-radius": "0px", "border-top-left-radius": "0px", 143 | "border-bottom-right-radius": "15px", "border-top-right-radius": "15px" 144 | }; 145 | } else { 146 | style = { 147 | "border-bottom-left-radius": "0px", "border-top-left-radius": "0px", 148 | "border-bottom-right-radius": "29px", "border-top-right-radius": "29px" 149 | }; 150 | } 151 | $(".slider.left").css(style); 152 | } 153 | 154 | 155 | //$(".warn").text("index:" + _self.index + ", max" + _self.max + ",lableIndex:" + _self.lableIndex + ",value:" + $("#captcha").val()); 156 | var num; //30 62 157 | if (_self.isMobile) { num = 28; } else { num = 62; } 158 | if ((_self.index + num) >= _self.max) { 159 | _self.index = _self.max - num; 160 | } 161 | if (_self.index < 0) { 162 | _self.index = _self.min; 163 | var style = ""; 164 | if (_self.isMobile) { 165 | var style = { 166 | "border-bottom-left-radius": "15px", "border-top-left-radius": "15px", 167 | "border-bottom-right-radius": "0px", "border-top-right-radius": "0px" 168 | }; 169 | } else { 170 | var style = { 171 | "border-bottom-left-radius": "28px", "border-top-left-radius": "28px", 172 | "border-bottom-right-radius": "0px", "border-top-right-radius": "0px" 173 | }; 174 | } 175 | $(".slider.left").css(style); 176 | } 177 | $(".label").css("left", _self.index + "px"); 178 | if (_self.index == (_self.max - num)) { 179 | //停止 180 | _self.swipestart = false; 181 | _self.IsOk = true; //解锁 182 | $("#captcha").val(1); 183 | $("#lableTip").text(document.getElementById("lableTip").attributes["hasslider"].value); 184 | //2015年3月4日 11:31:16注释 185 | //document.getElementById("btnSubmit").disabled = false;k 186 | } else { 187 | _self.IsOk = false; //未解锁 188 | $("#captcha").val(0); 189 | $("#lableTip").text(document.getElementById("lableTip").attributes["noslider"].value); 190 | //2015年3月4日 11:31:24注释 191 | //document.getElementById("btnSubmit").disabled = true; 192 | } 193 | } -------------------------------------------------------------------------------- /src/static/js/function.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Administrator on 15-1-19. 3 | */ 4 | function MenuItemClick() { 5 | var menuItem = document.getElementById("menuItem"); 6 | var linkMenu = document.getElementById("linkMenu"); 7 | linkMenu.onclick = function () { 8 | if (menuItem.style.display == "block") { 9 | menuItem.style.display = "none" 10 | } else { 11 | menuItem.style.display = "block" 12 | } 13 | } 14 | } 15 | 16 | 17 | 18 | /*label*/ 19 | function ShowNext(option) { 20 | this.obj = document.getElementById(option.id); 21 | this.defaultShow = document.getElementById(option.defaultShow); 22 | this.nextShow = document.getElementById(option.nextShow); 23 | } 24 | 25 | ShowNext.prototype.init = function () { 26 | var _self = this; 27 | _self.obj.onclick = function (ev) { 28 | var event = ev || window.event; 29 | event.preventDefault(); 30 | var val = _self.obj.attributes["value"].value; 31 | //当前第一页 32 | if (val == "next") { 33 | _self.defaultShow.style.display = "none"; //第一页隐藏 34 | _self.nextShow.style.display = "block"; //第二页展示 35 | _self.obj.attributes["value"].value = ""; //设置标识属性 36 | _self.obj.innerHTML = _self.obj.attributes["after"].value; 37 | } else {//当前第二页 38 | _self.defaultShow.style.display = "block"; //第一页展示 39 | _self.nextShow.style.display = "none"; //第二页隐藏 40 | _self.obj.attributes["value"].value = "next"; //设置标识属性 41 | _self.obj.innerHTML = _self.obj.attributes["before"].value; 42 | } 43 | } 44 | } 45 | 46 | 47 | //placeholder不支持情况下(模拟placeholder状态) 48 | function placeHolder(option) { 49 | var _self = this; 50 | _self.placeholder = option.placeholder; 51 | _self.input = document.getElementById(option.id); 52 | 53 | 54 | _self.focusFirst = function () { 55 | var Range = _self.input.createTextRange(); 56 | Range.moveEnd('character', _self.input.value.length); 57 | Range.moveStart('character', 0); // 58 | Range.collapse(); 59 | Range.select(); 60 | } 61 | 62 | _self.fontColor = function () { 63 | _self.input.style.color = "#999"; 64 | } 65 | _self.clearfontColor = function () { 66 | _self.input.style.color = ''; 67 | } 68 | 69 | 70 | 71 | } 72 | 73 | placeHolder.prototype.Init = function () { 74 | var _self = this; 75 | var isPlaceholderSupport = 'placeholder' in document.createElement('input'); 76 | if (!isPlaceholderSupport) { 77 | _self.fontColor(); 78 | _self.input.value = _self.placeholder; 79 | var event = new EventUtil(); 80 | event.addEvent(_self.input, "keydown", function (input) { 81 | 82 | 83 | if (_self.input.value == _self.placeholder) { 84 | _self.fontColor(); 85 | } else { 86 | _self.clearfontColor(); 87 | } 88 | 89 | }); 90 | event.addEvent(_self.input, "keyup", function (input) { 91 | if (_self.input.value == _self.placeholder) { 92 | _self.fontColor(); 93 | } else { 94 | _self.clearfontColor(); 95 | } 96 | }); 97 | 98 | event.addEvent(_self.input, "blur", function (input) { 99 | if (_self.input.value.replace(/(^\s*)|(\s*$)/g, '') == '') { 100 | _self.input.value = _self.placeholder; 101 | _self.fontColor(); 102 | } 103 | }); 104 | 105 | event.addEvent(_self.input, "focus", function (input) { 106 | if (_self.input.value == _self.placeholder) { 107 | _self.input.value = ""; 108 | } 109 | }); 110 | 111 | // event.addEvent(_self.input, "click", function (input) { 112 | // if (_self.input.value == _self.placeholder) { 113 | // _self.focusFirst(); 114 | // _self.fontColor(); 115 | // } else { 116 | // _self.clearfontColor(); 117 | // } 118 | // }); 119 | 120 | 121 | } 122 | 123 | 124 | } 125 | 126 | -------------------------------------------------------------------------------- /src/static/js/functionUtil.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/js/functionUtil.js -------------------------------------------------------------------------------- /src/static/js/vendor/modernizr-2.6.2.min.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f 0) { 17 | var regStr_ie = /msie [\d.]+;/gi; 18 | Browser = "IE"; 19 | Bversion = "" + agent.match(regStr_ie) 20 | } 21 | //firefox 22 | else if (agent.indexOf("firefox") > 0) { 23 | var regStr_ff = /firefox\/[\d.]+/gi; 24 | Browser = "firefox"; 25 | Bversion = "" + agent.match(regStr_ff); 26 | } 27 | //Chrome 28 | else if (agent.indexOf("chrome") > 0) { 29 | var regStr_chrome = /chrome\/[\d.]+/gi; 30 | Browser = "chrome"; 31 | Bversion = "" + agent.match(regStr_chrome); 32 | } 33 | //Safari 34 | else if (agent.indexOf("safari") > 0 && agent.indexOf("chrome") < 0) { 35 | var regStr_saf = /version\/[\d.]+/gi; 36 | Browser = "safari"; 37 | Bversion = "" + agent.match(regStr_saf); 38 | } 39 | //Opera 40 | else if (agent.indexOf("opera") >= 0) { 41 | var regStr_opera = /version\/[\d.]+/gi; 42 | Browser = "opera"; 43 | Bversion = "" + agent.match(regStr_opera); 44 | } else { 45 | var browser = navigator.appName; 46 | if (browser == "Netscape") { 47 | var version = agent.split(";"); 48 | var trim_Version = version[7].replace(/[ ]/g, ""); 49 | var rvStr = trim_Version.match(/[\d\.]/g).toString(); 50 | var rv = rvStr.replace(/[,]/g, ""); 51 | Bversion = rv; 52 | Browser = "IE" 53 | } 54 | } 55 | verinNum = (Bversion + "").replace(/[^0-9.]/ig, ""); 56 | arr.push(Browser); 57 | arr.push(verinNum); 58 | return arr; 59 | }, 60 | //检测是否是XX浏览器 61 | WB: (function () { 62 | var UserAgent = navigator.userAgent.toLowerCase(); 63 | return { 64 | isIE6: /msie 6.0/.test(UserAgent), // IE6 65 | isIE7: /msie 7.0/.test(UserAgent), // IE7 66 | isIE8: /msie 8.0/.test(UserAgent), // IE8 67 | isIE9: /msie 9.0/.test(UserAgent), // IE9 68 | isIE10: /msie 10.0/.test(UserAgent), // IE10 69 | isIE11: /msie 11.0/.test(UserAgent), // IE11 70 | isLB: /lbbrowser/.test(UserAgent), // 猎豹浏览器 71 | isUc: /ucweb/.test(UserAgent), // UC浏览器 72 | is360: /360se/.test(UserAgent), // 360浏览器 73 | isBaidu: /bidubrowser/.test(UserAgent), // 百度浏览器 74 | isSougou: /metasr/.test(UserAgent), // 搜狗浏览器 75 | isChrome: /chrome/.test(UserAgent.substr(-33, 6)), // Chrome浏览器 76 | isFirefox: /firefox/.test(UserAgent), // 火狐浏览器 77 | isOpera: /opera/.test(UserAgent), // Opera浏览器 78 | isSafire: /safari/.test(UserAgent) && !/chrome/.test(UserAgent), // safire浏览器 79 | isQQ: /qqbrowser/.test(UserAgent)//qq浏览器 80 | }; 81 | })(), 82 | //检测当前操作系统 83 | CurrentSystem: (function () { 84 | var system = { 85 | win: false, 86 | mac: false, 87 | xll: false, 88 | iphone: false, 89 | ipoad: false, 90 | ipad: false, 91 | ios: false, 92 | android: false, 93 | nokiaN: false, 94 | winMobile: false, 95 | wii: false, 96 | ps: false 97 | }; 98 | 99 | var ua = navigator.userAgent; 100 | // 检测平台 101 | var p = navigator.platform; 102 | system.win = p.indexOf('Win') == 0; 103 | system.mac = p.indexOf('Mac') == 0; 104 | system.xll = (p.indexOf('Xll') == 0 || p.indexOf('Linux') == 0); 105 | 106 | // 检测Windows操作系统 107 | if (system.win) { 108 | if (/Win(?:dows )?([^do]{2})\s?(\d+\.\d+)?/.test(ua)) { 109 | if (RegExp['$1'] == 'NT') { 110 | switch (RegExp['$2']) { 111 | case '5.0': 112 | system.win = '2000'; 113 | break; 114 | case '5.1': 115 | system.win = 'XP'; 116 | break; 117 | case '6.0': 118 | system.win = 'Vista'; 119 | break; 120 | case '6.1': 121 | system.win = '7'; 122 | break; 123 | case '6.2': 124 | system.win = '8'; 125 | break; 126 | default: 127 | system.win = 'NT'; 128 | break; 129 | } 130 | } else if (RegExp['$1'] == '9x') { 131 | system.win = 'ME'; 132 | } else { 133 | system.win = RegExp['$1']; 134 | } 135 | } 136 | } 137 | 138 | // 移动设备 139 | system.iphone = ua.indexOf('iPhone') > -1; 140 | system.ipod = ua.indexOf('iPod') > -1; 141 | system.ipad = ua.indexOf('iPad') > -1; 142 | system.nokiaN = ua.indexOf('nokiaN') > -1; 143 | 144 | // windows mobile 145 | if (system.win == 'CE') { 146 | system.winMobile = system.win; 147 | } else if (system.win == 'Ph') { 148 | if (/Windows Phone OS (\d+.\d)/i.test(ua)) { 149 | system.win = 'Phone'; 150 | system.winMobile = parseFloat(RegExp['$1']); 151 | } 152 | } 153 | 154 | // 检测IOS版本 155 | if (system.mac && ua.indexOf('Mobile') > -1) { 156 | if (/CPU (?:iPhone )?OS (\d+_\d+)/i.test(ua)) { 157 | system.ios = parseFloat(RegExp['$1'].replace('_', '.')); 158 | } else { 159 | system.ios = 2; // 不能真正检测出来,所以只能猜测 160 | } 161 | } 162 | 163 | // 检测Android版本 164 | if (/Android (\d+\.\d+)/i.test(ua)) { 165 | system.android = parseFloat(RegExp['$1']); 166 | } 167 | 168 | // 游戏系统 169 | system.wii = ua.indexOf('Wii') > -1; 170 | system.ps = /PlayStation/i.test(ua); 171 | 172 | return { 173 | system: system 174 | } 175 | })() 176 | } 177 | 178 | 179 | 180 | export {BroswerUtil} 181 | 182 | 183 | -------------------------------------------------------------------------------- /src/static/script/plugins/Event.js: -------------------------------------------------------------------------------- 1 | function EventUtil() { 2 | var _self = this; 3 | ///添加事件 4 | var addEvent = (function () { 5 | if (document.addEventListener) { 6 | return function (el, type, fn) { 7 | el.addEventListener(type, fn, false); 8 | } 9 | } else { 10 | return function (el, type, fn) { 11 | el.attachEvent("on" + type, function () { 12 | return fn.call(el, window.event); 13 | }); 14 | } 15 | } 16 | })(); 17 | 18 | ///添加属性改变事件 19 | var addPropertyChangeEvent = function (obj, fn) { 20 | if (window.ActiveXObject) { 21 | obj.onpropertychange = fn; 22 | } else { 23 | obj.addEventListener("input", fn, false); 24 | } 25 | } 26 | 27 | //移除事件 28 | var removeEvent = function (obj, type, fn) { 29 | if (obj.removeEventListener) { 30 | obj.removeEventListener(type, fn, false); 31 | } else if (obj.detachEvent) { 32 | obj.detachEvent("on" + type, obj["on" + type + fn]); 33 | obj["on" + type + fn] = null; 34 | } 35 | } 36 | 37 | //加载事件 38 | var loadEvent = function (fn) { 39 | var oldonload = window.onload; 40 | if (typeof oldonload != "function") { 41 | window.onload = fn; 42 | } else { 43 | window.onload = function () { 44 | oldonload(); 45 | fn(); 46 | } 47 | } 48 | } 49 | 50 | //阻止事件 51 | var stopEvent = function (e) { 52 | e = e || window.event; 53 | if (e.preventDefault) { 54 | e.preventDefault(); 55 | e.stopPropagation(); 56 | } else { 57 | e.returnValue = false; 58 | e.cancelBubble = true; 59 | } 60 | } 61 | 62 | //如果仅仅是阻止事件冒泡 63 | var stopPropagation = function (e) { 64 | e = e || window.event; 65 | if (! +"\v1") { 66 | e.cancelBubble = true; 67 | } else { 68 | e.stopPropagation(); 69 | } 70 | } 71 | 72 | //取得事件源对象 73 | var getEvent1 = function (e) { 74 | e = e || window.event; 75 | var obj = e.srcElement ? e.srcElement : e.target; 76 | return obj; 77 | } 78 | //取得事件源对象 79 | var getEvent2 = function (e) { 80 | if (window.event) return window.event; 81 | var c = getEvent2.caller; 82 | while (c.caller) { 83 | c = c.caller; 84 | } 85 | return c.arguments[0]; 86 | } 87 | 88 | //或者这个功能更强大 89 | var getEvent3 = function (e) { 90 | var e = e || window.event; 91 | if (!e) { 92 | var c = this.getEvent3.caller; 93 | while (c) { 94 | e = c.arguments[0]; 95 | if (e && (Event == e.constructor || MouseEvent == e.constructor)) { 96 | break; 97 | } 98 | c = c.caller; 99 | } 100 | } 101 | var target = e.srcElement ? e.srcElement : e.target, 102 | currentN = target.nodeName.toLowerCase(), 103 | parentN = target.parentNode.nodeName.toLowerCase(), 104 | grandN = target.parentNode.parentNode.nodeName.toLowerCase(); 105 | return [e, target, currentN, parentN, grandN]; 106 | } 107 | 108 | 109 | _self.addEvent = addEvent; 110 | _self.addPropertyChangeEvent = addPropertyChangeEvent; 111 | _self.removeEvent = removeEvent; 112 | _self.loadEvent = loadEvent; 113 | _self.stopEvent = stopEvent; 114 | _self.stopPropagation = stopPropagation; 115 | _self.getEvent1 = getEvent1; 116 | _self.getEvent2 = getEvent2; 117 | _self.getEvent3 = getEvent3; 118 | } 119 | //var eventUtil = new EventUtil(); 120 | //eventUtil.loadEvent(function () { 121 | // eventUtil.addEvent(document, "click", function (e) { 122 | // alert(eventUtil.getEvent3(e)); 123 | // }); 124 | 125 | // eventUtil.addPropertyChangeEvent(document, function (e) { 126 | // alert(eventUtil.getEvent3(e)); 127 | // }); 128 | //}); -------------------------------------------------------------------------------- /src/static/script/plugins/Red.js: -------------------------------------------------------------------------------- 1 | /// 2 | ///检测表单中的不能为空(.notnull)的验证 3 | /* 4 | 时间:2012-6-6 5 | 作用:一对form标签下有多个(包括一个)表单需要提交时,使用js准确的判断当前按钮对那些元素做判断 6 | 7 | 用法:在form标签下 找到当前 表单的容器 给予class="form",当前表单的提交按钮给予 class="check" 8 | 需要验证为空的元素给予class="notnull" nullmsg="xx不能为空!"提示,需要进行逻辑判断的表单给予class="need" 9 | 判断的类型给予 class="num"(只能是数字) 验证的提示 logicmsg="XX只能是数字" 10 | 11 | 给予class="errorMessage"显示错误信息块 12 | 给予class="warn"显示错误信息 13 | 未使用js面向对象编程 14 | 逻辑判断,不传入need标识,直接给出正则表达式属性(自定义)regex="/^\d$/" 做出判断 15 | 16 | 在外部实现 17 | Global.submitCallback button回调函数 18 | Global.confirmCallback confirm回调函数; 19 | 需要改进的地方: 20 | 改进成一个jquery插件 21 | 22 | 更新时间:2014年12月3日 16:23:22 23 | 作者:Amber.Xu 24 | */ 25 | //$(document).ready( 26 | // function () { 27 | // $("form").find(".notnull").bind({ 28 | // focus: function () { 29 | // if ($(this).attr("value") == this.defaultValue) { 30 | // $(this).attr("value", ""); 31 | // } 32 | // }, 33 | // blur: function () { 34 | // if ($(this).attr("value") == "") { 35 | // $(this).attr("value", this.defaultValue); 36 | // } 37 | // } 38 | // }); 39 | // } 40 | //); 41 | ///*封装一个万能检测表单的方法*/ 42 | ///event.srcElement:引发事件的目标对象,常用于onclick事件。 43 | ///event.fromElement:引发事件的对象源,常用于onmouseout和onmouseover事件。 44 | ///event.toElement:引发事件后,鼠标移动到的目标源,常用于onmouseout和onmouseover事件。 45 | function Global() { 46 | var _self = this; 47 | } 48 | //用于.check按钮的回调 49 | Global.submitCallback = null; 50 | //用于.confirm按钮的回调 51 | Global.confirmCallback = null; 52 | 53 | $(document).ready(function () { 54 | //form body 55 | $("body").find(".form").each(function () { 56 | var form = this; 57 | this.onclick = function (e) { 58 | return Main(e, form); 59 | } 60 | 61 | document.onkeydown = function (eve) { 62 | var e = eve || window.event || arguments.callee.caller.arguments[0]; 63 | if (e && e.keyCode == 13) { 64 | return Main(e, form, true); 65 | } 66 | } 67 | }); 68 | 69 | //程序入口 70 | function Main(e, form, _Enter) { 71 | var button = null; 72 | try { 73 | button = e.srcElement == null ? document.activeElement : e.srcElement; 74 | } catch (e) { 75 | console.log(e.message) 76 | button = document.activeElement; 77 | } 78 | if ($(button).is(".check") || _Enter) { 79 | //alert("提交") 80 | var sub = (checkform(form) && CheckInputRex(form) && checkselect(form) && checkChecked(form) && checkValid(form)); 81 | if (sub) { 82 | // Call our callback, but using our own instance as the context 83 | Global.submitCallback.call(form, [e]); 84 | } else 85 | return sub; 86 | } else if ($(button).is(".confirm")) { 87 | //alert("删除") 88 | var sub = confirm($(button).attr("title")); 89 | if (sub) { 90 | Global.confirmCallback.call(form, [e]); 91 | } else 92 | return sub; 93 | } else { 94 | // //alert("其它") 95 | return true; 96 | } 97 | } 98 | 99 | /*检测表单中不能为空的元素*/ 100 | function checkform(form) { 101 | var b = true; 102 | $(form).find(".notnull").each(function () { 103 | if ($.trim($(this).val()).length <= 0 || $.trim($(this).val()) == $.trim($(this).attr("placeholder"))) {//|| $(this).val() == this.defaultValue 104 | // $(this).parents(".form").find(".warn").text($(this).attr("nullmsg")); 105 | // $(this).parents(".form").find(".errorMessage").show(); 106 | alert($(this).attr("nullmsg")); 107 | $(this).select(); 108 | $(this).focus(); 109 | return b = false; 110 | } 111 | }); 112 | if (b == true) { 113 | $(form).find(".warn").text(""); 114 | $(form).find(".errorMessage").hide(); 115 | } 116 | return b; 117 | } 118 | 119 | /*检测表单中必选的下拉列表*/ 120 | function checkselect(form) { 121 | var b = true; 122 | $(form).find(".select").each(function (i) { 123 | var ck = $(this).find('option:selected').text(); 124 | if (ck.indexOf("选择") > -1) { 125 | // $(this).parents(".form").find(".warn").text($(this).attr("nullmsg")); 126 | // $(this).parents(".form").find(".errorMessage").show(); 127 | 128 | alert($(this).attr("nullmsg")); 129 | $(this).select(); 130 | $(this).focus(); 131 | return b = false; 132 | } 133 | }); 134 | return b; 135 | } 136 | 137 | 138 | /*检测表单中验证模式*/ 139 | function checkValid(form) { 140 | var b = true; 141 | $(form).find(".valid").each(function (i) { 142 | var isValid = parseInt($(this).val()); 143 | if (!isValid) { 144 | // $(this).parents(".form").find(".warn").text($(this).attr("validmsg")); 145 | // $(this).parents(".form").find(".errorMessage").show(); 146 | 147 | alert($(this).attr("validmsg")); 148 | $(this).select(); 149 | $(this).focus(); 150 | return b = false; 151 | } 152 | 153 | }); 154 | return b; 155 | } 156 | 157 | /*检测表单中必选的复选框*/ 158 | function checkChecked(form) { 159 | var b = true; 160 | $(form).find(".checkbox").each(function (i) { 161 | var ck = $(this)[0].checked; 162 | if (!ck) { 163 | // $(this).parents(".form").find(".warn").text($(this).attr("nullmsg")); 164 | // $(this).parents(".form").find(".errorMessage").show(); 165 | 166 | alert($(this).attr("nullmsg")) 167 | $(this).select(); 168 | $(this).focus(); 169 | return b = false; 170 | } 171 | }); 172 | return b; 173 | } 174 | 175 | //检查是否匹配该正则表达式 176 | function GetFlase(value, reg, ele) { 177 | if (reg.test(value)) { 178 | return true; 179 | } 180 | // $(ele).parents(".form").find(".warn").text($(ele).attr("logicmsg")); 181 | // $(ele).parents(".form").find(".errorMessage").show(); 182 | alert($(ele).attr("logicmsg")); 183 | $(ele).focus(); 184 | $(ele).select(); 185 | return false; //不能提交 186 | } 187 | 188 | 189 | ///检查正则 190 | function CheckInputRex(form) { 191 | var b = true; 192 | $(form).find("input[type='text']").each(function () { 193 | if (typeof ($(this).attr("regex")) == 'string') { 194 | if ($.trim($(this).val()).length > 0 && $.trim($(this).val()) != $.trim($(this).attr("placeholder"))) { 195 | //当前表单的值 196 | var value = $(this).attr("value") || $(this).val(); 197 | var regx = eval($(this).attr("regex")); 198 | return b = GetFlase(value, regx, this); 199 | } 200 | } 201 | }); 202 | return b; 203 | } 204 | }); 205 | -------------------------------------------------------------------------------- /src/static/script/plugins/Slider.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery'; 2 | import {BroswerUtil} from './BroswerUtil.js'; 3 | 4 | 5 | /** 6 | * Created by Administrator on 15-1-9. 7 | */ 8 | //滑动条对象 9 | function Slider(swipestart, min, max, index, IsOk, lableIndex) { 10 | var _self = this; 11 | //是否开始滑动 12 | _self.swipestart = swipestart; 13 | //最小值 14 | _self.min = min; 15 | //最大值 16 | _self.max = max; 17 | //当前滑动条所处的位置 18 | _self.index = index; 19 | //是否滑动成功 20 | _self.IsOk = IsOk; 21 | //鼠标在滑动按钮的位置 22 | _self.lableIndex = lableIndex; 23 | 24 | var mobile = BroswerUtil.CurrentSystem.system.android || 25 | BroswerUtil.CurrentSystem.system.ios || 26 | BroswerUtil.CurrentSystem.system.ipad || 27 | BroswerUtil.CurrentSystem.system.iphone || 28 | BroswerUtil.CurrentSystem.system.ipoad || 29 | BroswerUtil.CurrentSystem.system.ipod || 30 | BroswerUtil.CurrentSystem.system.nokiaN; 31 | 32 | _self.mobile = mobile; 33 | 34 | 35 | var width = document.body.clientWidth; 36 | 37 | var isMobile = width <= 767; 38 | _self.isMobile = isMobile; 39 | } 40 | 41 | //初始化 42 | Slider.prototype.Init = function () { 43 | //2015年3月4日 11:30:46注释 44 | //document.getElementById("btnSubmit").disabled = true; 45 | var _self = this; 46 | $("#label").on("mousedown", function (event) { 47 | var e = event || window.event; 48 | _self.lableIndex = e.clientX - this.offsetLeft; 49 | if (!_self.IsOk) 50 | _self.HanderIn(); 51 | }); 52 | 53 | $("#pageSlide").on("mousemove", function (event) { 54 | if (!_self.IsOk) 55 | _self.HanderMove(event); 56 | }); 57 | 58 | $(document).on("mouseup", function (event) { 59 | if (!_self.IsOk) 60 | _self.HanderOut(); 61 | 62 | }); 63 | 64 | 65 | $("#label").on("touchstart", function (event) { 66 | try { 67 | var e = event || window.event; 68 | //event.originalEvent.changedTouches[0].clientX //event.originalEvent.pageX 69 | _self.lableIndex = event.originalEvent.changedTouches[0].clientX - this.offsetLeft; 70 | if (!_self.IsOk) 71 | _self.HanderIn(); 72 | 73 | } catch (e) { 74 | console.log(navigator.appVersion + "不支持TouchEvent事件!" + e.message); 75 | } 76 | }); 77 | 78 | $("#pageSlide").on("touchmove", function (event) { 79 | try { 80 | if (!_self.IsOk) 81 | _self.HanderMove(event); 82 | } catch (e) { 83 | console.log(navigator.appVersion + "不支持touchmove事件!" + e.message); 84 | } 85 | 86 | }); 87 | 88 | $(document).on("touchend", function (event) { 89 | try { 90 | if (!_self.IsOk) 91 | _self.HanderOut(); 92 | } catch (e) { 93 | console.log(navigator.appVersion + "不支持touchend事件!" + e.message); 94 | } 95 | 96 | }); 97 | } 98 | 99 | //鼠标/手指接触滑动按钮 100 | Slider.prototype.HanderIn = function () { 101 | var _self = this; 102 | _self.swipestart = true; 103 | _self.min = 0; 104 | _self.max = $("#slider").width(); 105 | // console.log(_self.max); 106 | if (_self.lableIndex < 0) { 107 | _self.lableIndex = 0; 108 | } 109 | } 110 | 111 | //鼠标/手指移出 112 | Slider.prototype.HanderOut = function () { 113 | var _self = this; 114 | //停止 115 | _self.swipestart = false; 116 | _self.Move(); 117 | } 118 | 119 | //鼠标/手指移动 120 | Slider.prototype.HanderMove = function (event) { 121 | var _self = this; 122 | if (_self.swipestart && !_self.IsOk) { 123 | event.preventDefault(); 124 | var event = event || window.event; 125 | //移动端(平板或者手机) 126 | if (_self.mobile) { 127 | //event.originalEvent.changedTouches[0].clientX //event.originalEvent.pageX 128 | _self.index = event.originalEvent.changedTouches[0].clientX - _self.lableIndex; 129 | 130 | //屏幕小于767 而且 不是移动端(平板或者手机) (这种情况属于用户把浏览器调到手机大小时) 131 | } else if (_self.isMobile && !_self.mobile) { 132 | _self.index = event.clientX - _self.lableIndex; 133 | } else { 134 | _self.index = event.clientX - _self.lableIndex; 135 | } 136 | _self.Move(); 137 | } 138 | } 139 | 140 | 141 | Slider.prototype.SliderCallBack = null; 142 | 143 | //鼠标/手指移动 144 | Slider.prototype.Move = function () { 145 | var _self = this; 146 | if (_self.index > 0) { 147 | var style = ""; 148 | if (_self.isMobile) { 149 | style = { 150 | "border-bottom-left-radius": "0px", "border-top-left-radius": "0px", 151 | "border-bottom-right-radius": "10px", "border-top-right-radius": "10px" 152 | }; 153 | } else { 154 | style = { 155 | "border-bottom-left-radius": "0px", "border-top-left-radius": "0px", 156 | "border-bottom-right-radius": "10px", "border-top-right-radius": "10px" 157 | }; 158 | } 159 | $(".slider.left").css(style); 160 | } 161 | 162 | 163 | //$(".warn").text("index:" + _self.index + ", max" + _self.max + ",lableIndex:" + _self.lableIndex + ",value:" + $("#captcha").val()); 164 | var num; //30 62 165 | if (_self.isMobile) { 166 | num = 10; 167 | } else { 168 | num = 19; 169 | } 170 | if ((_self.index + num) >= _self.max) { 171 | _self.index = _self.max - num; 172 | } 173 | if (_self.index < 0) { 174 | _self.index = _self.min; 175 | var style = ""; 176 | if (_self.isMobile) { 177 | var style = { 178 | "border-bottom-left-radius": "10px", "border-top-left-radius": "10px", 179 | "border-bottom-right-radius": "0px", "border-top-right-radius": "0px" 180 | }; 181 | } else { 182 | var style = { 183 | "border-bottom-left-radius": "10px", "border-top-left-radius": "10px", 184 | "border-bottom-right-radius": "0px", "border-top-right-radius": "0px" 185 | }; 186 | } 187 | $(".slider.left").css(style); 188 | } 189 | $(".label").css("left", _self.index + "px"); 190 | if (_self.index == (_self.max - num)) { 191 | //停止 192 | _self.swipestart = false; 193 | _self.IsOk = true; //解锁 194 | $("#captcha").val(1); 195 | //$("#lableTip").text(document.getElementById("lableTip").attributes["hasslider"].value); 196 | if (_self.SliderCallBack) 197 | _self.SliderCallBack.call(this, [1]) 198 | //2015年3月4日 11:31:16注释 199 | //document.getElementById("btnSubmit").disabled = false;k 200 | } else { 201 | _self.IsOk = false; //未解锁 202 | $("#captcha").val(0); 203 | // $("#lableTip").text(document.getElementById("lableTip").attributes["noslider"].value); 204 | //2015年3月4日 11:31:24注释 205 | //document.getElementById("btnSubmit").disabled = true; 206 | } 207 | } 208 | 209 | 210 | export { Slider } 211 | -------------------------------------------------------------------------------- /src/static/script/plugins/bank.js: -------------------------------------------------------------------------------- 1 | var data = [ 2 | {'id': '10001', 'value': 'Mandarin'}, 3 | {'id': '10002', 'value': 'Spanish'}, 4 | {'id': '10003', 'value': 'Bahasa'}, 5 | {'id': '10004', 'value': 'Urdu'}, 6 | {'id': '10005', 'value': 'Russian'}, 7 | {'id': '10006', 'value': 'Spanish'}, 8 | {'id': '10007', 'value': 'Portuguese'}, 9 | {'id': '10008', 'value': 'Thai'}, 10 | 11 | {'id': '10009', 'value': 'Vietnamese'}, 12 | {'id': '10010', 'value': 'Turkish'}, 13 | {'id': '10011', 'value': 'Arabia'}, 14 | {'id': '10012', 'value': '阿拉伯语'}, 15 | {'id': '10013', 'value': '俄罗斯语'}, 16 | {'id': '10014', 'value': 'English'}, 17 | ]; -------------------------------------------------------------------------------- /src/static/script/plugins/common.js: -------------------------------------------------------------------------------- 1 | // //设置布尔值作为开关 2 | // var bol=true; 3 | // //设置定时器 4 | // var timer=null; 5 | // //设定navbar(就是会移到下方的部分) 6 | // var t=$("#navbar").height(); 7 | // 8 | // var maxH=50; 9 | // var minH=0; 10 | // //设定nav(就是最外面的父级) 11 | // //navbar已经定位,无法将下方内容顶开,需要同时变更父级的高度来顶开下方的内容 12 | // var navT=$("nav").height(); 13 | // var navMaxH=100; 14 | // var navMinH=50; 15 | // $("#btn").click(function(){ 16 | // //判断布尔值 17 | // if(bol){ 18 | // $("#navbar").css('borderTop','1px solid #eee'); 19 | // timer=setInterval(function(){ 20 | // t+=50; 21 | // navT+=50; 22 | // //父级nav上限 23 | // if(navT>=navMaxH){ 24 | // navT=navMaxH; 25 | // } 26 | // //navbar上限 27 | // if(t>=maxH){ 28 | // t=maxH; 29 | // navT=navMaxH; 30 | // clearInterval(timer) 31 | // } 32 | // $("#navbar").animate({height:t+'px'}); 33 | // $("nav").animate({height:navT+'px'}); 34 | // },3) 35 | // //布尔值改为false,下次点击时,就会执行else中的语句 36 | // bol=false; 37 | // }else{ 38 | // timer=setInterval(function(){ 39 | // t-=50; 40 | // navT-=50; 41 | // //父级nav下限 42 | // if(navT<=navMinH){ 43 | // navT=navMinH; 44 | // } 45 | // //navbar下限 46 | // if(t<=minH){ 47 | // t=minH; 48 | // navT=navMinH; 49 | // clearInterval(timer); 50 | // } 51 | // $("#navbar").animate({height:t+'px'}); 52 | // $("nav").animate({height:navT+'px'}); 53 | // },3) 54 | // //布尔值改为true,下次点击时,就会执行if中的语句 55 | // bol=true; 56 | // } 57 | // }) 58 | 59 | 60 | //设置布尔值开关 61 | var bol=true; 62 | //设置定时器 63 | var timer=null; 64 | //设定navbar(就是会移到下方的部分) 65 | var t=$("#navbar").height(); 66 | 67 | var maxH=50; 68 | var minH=0; 69 | $("#btn").click(function(){ 70 | //alert(1); 71 | //判断布尔值 72 | if(bol){ 73 | $("#navbar").css('borderTop','1px solid #eee'); 74 | timer=setInterval(function(){ 75 | t+=50; 76 | //navbar上限 77 | if(t>=maxH){ 78 | t=maxH; 79 | clearInterval(timer) 80 | } 81 | $("#navbar").animate({height:t+'px'}); 82 | },3) 83 | //布尔值改为false,下次点击时,就会执行else中的语句 84 | bol=false; 85 | }else{ 86 | //$("#navbar").css('borderTop','none'); 87 | timer=setInterval(function(){ 88 | t-=50; 89 | //navbar下限 90 | if(t<=minH){ 91 | t=minH; 92 | clearInterval(timer); 93 | } 94 | $("#navbar").animate({height:t+'px'}); 95 | },3) 96 | //布尔值改为true,下次点击时,就会执行if中的语句 97 | bol=true; 98 | } 99 | }) 100 | -------------------------------------------------------------------------------- /src/static/script/plugins/functionUtil.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/shellac/0a5575ae3652b92fa76da0b29d340a8f9e5a6fb6/src/static/script/plugins/functionUtil.js -------------------------------------------------------------------------------- /src/static/script/plugins/layer_mobile/layer.js: -------------------------------------------------------------------------------- 1 | /*! layer mobile-v2.0 弹层组件移动版 License LGPL http://layer.layui.com/mobile By 贤心 */ 2 | ; 3 | !function (a) { 4 | "use strict"; 5 | var b = document, c = "querySelectorAll", d = "getElementsByClassName", e = function (a) { 6 | return b[c](a) 7 | }, f = {type: 0, shade: !0, shadeClose: !0, fixed: !0, anim: "scale"}, g = { 8 | extend: function (a) { 9 | var b = JSON.parse(JSON.stringify(f)); 10 | for (var c in a)b[c] = a[c]; 11 | return b 12 | }, timer: {}, end: {} 13 | }; 14 | g.touch = function (a, b) { 15 | a.addEventListener("click", function (a) { 16 | b.call(this, a) 17 | }, !1) 18 | }; 19 | var h = 0, i = ["layui-m-layer"], j = function (a) { 20 | var b = this; 21 | b.config = g.extend(a), b.view() 22 | }; 23 | j.prototype.view = function () { 24 | var a = this, c = a.config, f = b.createElement("div"); 25 | a.id = f.id = i[0] + h, f.setAttribute("class", i[0] + " " + i[0] + (c.type || 0)), f.setAttribute("index", h); 26 | var g = function () { 27 | var a = "object" == typeof c.title; 28 | return c.title ? '

' + (a ? c.title[0] : c.title) + "

" : "" 29 | }(), j = function () { 30 | "string" == typeof c.btn && (c.btn = [c.btn]); 31 | var a, b = (c.btn || []).length; 32 | return 0 !== b && c.btn ? (a = '' + c.btn[0] + "", 2 === b && (a = '' + c.btn[1] + "" + a), '
' + a + "
") : "" 33 | }(); 34 | if (c.fixed || (c.top = c.hasOwnProperty("top") ? c.top : 100, c.style = c.style || "", c.style += " top:" + (b.body.scrollTop + c.top) + "px"), 2 === c.type && (c.content = '

' + (c.content || "") + "

"), c.skin && (c.anim = "scale"), "msg" === c.skin && (c.shade = !1), f.innerHTML = (c.shade ? "
' : "") + '
" + g + '
' + c.content + "
" + j + "
", !c.type || 2 === c.type) { 35 | var k = b[d](i[0] + c.type), l = k.length; 36 | l >= 1 && layer.close(k[0].getAttribute("index")) 37 | } 38 | document.body.appendChild(f); 39 | var m = a.elem = e("#" + a.id)[0]; 40 | c.success && c.success(m), a.index = h++, a.action(c, m) 41 | }, j.prototype.action = function (a, b) { 42 | var c = this; 43 | a.time && (g.timer[c.index] = setTimeout(function () { 44 | layer.close(c.index) 45 | }, 1e3 * a.time)); 46 | var e = function () { 47 | var b = this.getAttribute("type"); 48 | 0 == b ? (a.no && a.no(), layer.close(c.index)) : a.yes ? a.yes(c.index) : layer.close(c.index) 49 | }; 50 | if (a.btn)for (var f = b[d]("layui-m-layerbtn")[0].children, h = f.length, i = 0; h > i; i++)g.touch(f[i], e); 51 | if (a.shade && a.shadeClose) { 52 | var j = b[d]("layui-m-layershade")[0]; 53 | g.touch(j, function () { 54 | layer.close(c.index, a.end) 55 | }) 56 | } 57 | a.end && (g.end[c.index] = a.end) 58 | }, a.layer = { 59 | v: "2.0", index: h, open: function (a) { 60 | var b = new j(a || {}); 61 | return b.index 62 | }, close: function (a) { 63 | var c = e("#" + i[0] + a)[0]; 64 | c && (c.innerHTML = "", b.body.removeChild(c), clearTimeout(g.timer[a]), delete g.timer[a], "function" == typeof g.end[a] && g.end[a](), delete g.end[a]) 65 | }, closeAll: function () { 66 | for (var a = b[d](i[0]), c = 0, e = a.length; e > c; c++)layer.close(0 | a[0].getAttribute("index")) 67 | } 68 | }, "function" == typeof define ? define(function () { 69 | return layer 70 | }) : function () { 71 | var a = document.scripts, c = a[a.length - 1], d = c.src, e = d.substring(0, d.lastIndexOf("/") + 1); 72 | c.getAttribute("merge") || document.head.appendChild(function () { 73 | var a = b.createElement("link"); 74 | return a.href = e + "need/layer.css?2.0", a.type = "text/css", a.rel = "styleSheet", a.id = "layermcss", a 75 | }()) 76 | }() 77 | }(window); -------------------------------------------------------------------------------- /src/static/script/plugins/layer_mobile/need/layer.css: -------------------------------------------------------------------------------- 1 | .layui-m-layer { 2 | position: relative; 3 | z-index: 19891014 4 | } 5 | 6 | .layui-m-layer * { 7 | -webkit-box-sizing: content-box; 8 | -moz-box-sizing: content-box; 9 | box-sizing: content-box 10 | } 11 | 12 | .layui-m-layermain, .layui-m-layershade { 13 | position: fixed; 14 | left: 0; 15 | top: 0; 16 | width: 100%; 17 | height: 100%; 18 | } 19 | 20 | .layui-m-layershade { 21 | background-color: rgba(0, 0, 0, .7); 22 | pointer-events: auto 23 | } 24 | 25 | .layui-m-layermain { 26 | display: table; 27 | font-family: 'qiti'; 28 | pointer-events: none; 29 | letter-spacing: 1px; 30 | } 31 | 32 | .layui-m-layermain .layui-m-layersection { 33 | display: table-cell; 34 | vertical-align: middle; 35 | text-align: center 36 | } 37 | 38 | .layui-m-layerchild { 39 | position: relative; 40 | display: inline-block; 41 | text-align: left; 42 | background-color: #fff; 43 | font-size:0.8rem; 44 | border-radius: 5px; 45 | box-shadow: 0 0 8px rgba(0, 0, 0, .1); 46 | pointer-events: auto; 47 | -webkit-overflow-scrolling: touch; 48 | -webkit-animation-fill-mode: both; 49 | animation-fill-mode: both; 50 | -webkit-animation-duration: .2s; 51 | animation-duration: .2s 52 | } 53 | 54 | @-webkit-keyframes layui-m-anim-scale { 55 | 0% { 56 | opacity: 0; 57 | -webkit-transform: scale(.5); 58 | transform: scale(.5) 59 | } 60 | 100% { 61 | opacity: 1; 62 | -webkit-transform: scale(1); 63 | transform: scale(1) 64 | } 65 | } 66 | 67 | @keyframes layui-m-anim-scale { 68 | 0% { 69 | opacity: 0; 70 | -webkit-transform: scale(.5); 71 | transform: scale(.5) 72 | } 73 | 100% { 74 | opacity: 1; 75 | -webkit-transform: scale(1); 76 | transform: scale(1) 77 | } 78 | } 79 | 80 | .layui-m-anim-scale { 81 | animation-name: layui-m-anim-scale; 82 | -webkit-animation-name: layui-m-anim-scale 83 | } 84 | 85 | @-webkit-keyframes layui-m-anim-up { 86 | 0% { 87 | opacity: 0; 88 | -webkit-transform: translateY(800px); 89 | transform: translateY(800px) 90 | } 91 | 100% { 92 | opacity: 1; 93 | -webkit-transform: translateY(0); 94 | transform: translateY(0) 95 | } 96 | } 97 | 98 | @keyframes layui-m-anim-up { 99 | 0% { 100 | opacity: 0; 101 | -webkit-transform: translateY(800px); 102 | transform: translateY(800px) 103 | } 104 | 100% { 105 | opacity: 1; 106 | -webkit-transform: translateY(0); 107 | transform: translateY(0) 108 | } 109 | } 110 | 111 | .layui-m-anim-up { 112 | -webkit-animation-name: layui-m-anim-up; 113 | animation-name: layui-m-anim-up 114 | } 115 | 116 | .layui-m-layer0 .layui-m-layerchild { 117 | width: 90%; 118 | max-width: 640px 119 | } 120 | 121 | .layui-m-layer1 .layui-m-layerchild { 122 | border: none; 123 | border-radius: 0 124 | } 125 | 126 | .layui-m-layer2 .layui-m-layerchild { 127 | width: auto; 128 | max-width: 260px; 129 | min-width: 40px; 130 | border: none; 131 | background: 0 0; 132 | box-shadow: none; 133 | color: #fff 134 | } 135 | 136 | .layui-m-layerchild h3 { 137 | padding: 0 10px; 138 | height: 60px; 139 | line-height: 60px; 140 | font-size: 16px; 141 | font-weight: 400; 142 | border-radius: 5px 5px 0 0; 143 | text-align: center 144 | } 145 | 146 | .layui-m-layerbtn span, .layui-m-layerchild h3 { 147 | text-overflow: ellipsis; 148 | overflow: hidden; 149 | white-space: nowrap 150 | } 151 | 152 | .layui-m-layercont { 153 | padding: 50px 30px; 154 | line-height: 22px; 155 | text-align: center 156 | } 157 | 158 | .layui-m-layer1 .layui-m-layercont { 159 | padding: 0; 160 | text-align: left 161 | } 162 | 163 | .layui-m-layer2 .layui-m-layercont { 164 | text-align: center; 165 | padding: 0; 166 | line-height: 0 167 | } 168 | 169 | .layui-m-layer2 .layui-m-layercont i { 170 | width: 25px; 171 | height: 25px; 172 | margin-left: 8px; 173 | display: inline-block; 174 | background-color: #fff; 175 | border-radius: 100%; 176 | -webkit-animation: layui-m-anim-loading 1.4s infinite ease-in-out; 177 | animation: layui-m-anim-loading 1.4s infinite ease-in-out; 178 | -webkit-animation-fill-mode: both; 179 | animation-fill-mode: both 180 | } 181 | 182 | .layui-m-layerbtn, .layui-m-layerbtn span { 183 | position: relative; 184 | text-align: center; 185 | border-radius: 0 0 5px 5px 186 | } 187 | 188 | .layui-m-layer2 .layui-m-layercont p { 189 | margin-top: 20px 190 | } 191 | 192 | @-webkit-keyframes layui-m-anim-loading { 193 | 0%, 100%, 80% { 194 | transform: scale(0); 195 | -webkit-transform: scale(0) 196 | } 197 | 40% { 198 | transform: scale(1); 199 | -webkit-transform: scale(1) 200 | } 201 | } 202 | 203 | @keyframes layui-m-anim-loading { 204 | 0%, 100%, 80% { 205 | transform: scale(0); 206 | -webkit-transform: scale(0) 207 | } 208 | 40% { 209 | transform: scale(1); 210 | -webkit-transform: scale(1) 211 | } 212 | } 213 | 214 | .layui-m-layer2 .layui-m-layercont i:first-child { 215 | margin-left: 0; 216 | -webkit-animation-delay: -.32s; 217 | animation-delay: -.32s 218 | } 219 | 220 | .layui-m-layer2 .layui-m-layercont i.layui-m-layerload { 221 | -webkit-animation-delay: -.16s; 222 | animation-delay: -.16s 223 | } 224 | 225 | .layui-m-layer2 .layui-m-layercont > div { 226 | line-height: 22px; 227 | padding-top: 7px; 228 | margin-bottom: 20px; 229 | font-size: 14px 230 | } 231 | 232 | .layui-m-layerbtn { 233 | display: box; 234 | display: -moz-box; 235 | display: -webkit-box; 236 | width: 100%; 237 | height: 50px; 238 | line-height: 50px; 239 | font-size: 0; 240 | border-top: 1px solid #D0D0D0; 241 | background-color: #F2F2F2 242 | } 243 | 244 | .layui-m-layerbtn span { 245 | display: block; 246 | -moz-box-flex: 1; 247 | box-flex: 1; 248 | -webkit-box-flex: 1; 249 | font-size: 14px; 250 | cursor: pointer 251 | } 252 | 253 | .layui-m-layerbtn span[yes] { 254 | color: #40AFFE 255 | } 256 | 257 | .layui-m-layerbtn span[no] { 258 | border-right: 1px solid #D0D0D0; 259 | border-radius: 0 0 0 5px 260 | } 261 | 262 | .layui-m-layerbtn span:active { 263 | background-color: #F6F6F6 264 | } 265 | 266 | .layui-m-layerend { 267 | position: absolute; 268 | right: 7px; 269 | top: 10px; 270 | width: 30px; 271 | height: 30px; 272 | border: 0; 273 | font-weight: 400; 274 | background: 0 0; 275 | cursor: pointer; 276 | -webkit-appearance: none; 277 | font-size: 30px 278 | } 279 | 280 | .layui-m-layerend::after, .layui-m-layerend::before { 281 | position: absolute; 282 | left: 5px; 283 | top: 15px; 284 | content: ''; 285 | width: 18px; 286 | height: 1px; 287 | background-color: #999; 288 | transform: rotate(45deg); 289 | -webkit-transform: rotate(45deg); 290 | border-radius: 3px 291 | } 292 | 293 | .layui-m-layerend::after { 294 | transform: rotate(-45deg); 295 | -webkit-transform: rotate(-45deg) 296 | } 297 | 298 | body .layui-m-layer .layui-m-layer-footer { 299 | position: fixed; 300 | width: 95%; 301 | max-width: 100%; 302 | margin: 0 auto; 303 | left: 0; 304 | right: 0; 305 | bottom: 10px; 306 | background: 0 0 307 | } 308 | 309 | .layui-m-layer-footer .layui-m-layercont { 310 | padding: 20px; 311 | border-radius: 5px 5px 0 0; 312 | background-color: rgba(255, 255, 255, .8) 313 | } 314 | 315 | .layui-m-layer-footer .layui-m-layerbtn { 316 | display: block; 317 | height: auto; 318 | background: 0 0; 319 | border-top: none 320 | } 321 | 322 | .layui-m-layer-footer .layui-m-layerbtn span { 323 | background-color: rgba(255, 255, 255, .8) 324 | } 325 | 326 | .layui-m-layer-footer .layui-m-layerbtn span[no] { 327 | color: #FD482C; 328 | border-top: 1px solid #c2c2c2; 329 | border-radius: 0 0 5px 5px 330 | } 331 | 332 | .layui-m-layer-footer .layui-m-layerbtn span[yes] { 333 | margin-top: 10px; 334 | border-radius: 5px 335 | } 336 | 337 | body .layui-m-layer .layui-m-layer-msg { 338 | width: auto; 339 | max-width: 90%; 340 | margin: 0 auto; 341 | bottom: 0; 342 | background-color: rgba(0, 0, 0, .7); 343 | color: #fff 344 | } 345 | 346 | .layui-m-layer-msg .layui-m-layercont { 347 | padding: 10px 20px 348 | } -------------------------------------------------------------------------------- /src/static/script/plugins/nav.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery'; 2 | import Swiper from 'swiper'; 3 | function nav(){ 4 | //轮播图 5 | var swiper = new Swiper('.swiper-container', { 6 | pagination: '.swiper-pagination', 7 | nextButton: '.swiper-button-next', 8 | prevButton: '.swiper-button-prev', 9 | paginationClickable: true, 10 | spaceBetween: 30, 11 | centeredSlides: true, 12 | autoplay: 2500, 13 | speed: 1100, 14 | autoplayDisableOnInteraction: false 15 | }); 16 | $(".swiper-container").mouseenter(function () {//滑过悬停 17 | swiper.stopAutoplay(); //swiper 为上面你swiper实例化的名称 18 | }).mouseleave(function () {//离开开启 19 | swiper.startAutoplay(); 20 | }); 21 | //弹窗 22 | $('.layer_img').click(function () { 23 | $('.pop_layer,.gif_mask').show(); 24 | $('.navbar').css({'height': '0', 'border-top': 'none'}); 25 | $(".pop_layer img").attr("src", $(this).attr("layergif")) 26 | setTimeout(function () { 27 | $('.pop_layer,.gif_mask').hide(); 28 | }, 24000) 29 | }) 30 | $('.gif_mask').click(function () { 31 | $('.pop_layer,.gif_mask,.pop_layer1').hide(); 32 | }) 33 | //textarea 34 | $(".tip_text").click(function () { 35 | $('.tip_text').hide(); 36 | $("textarea").focus(); 37 | }) 38 | $("textarea").blur(function () { 39 | if ($("textarea").val() == "") { 40 | $('.tip_text').show(); 41 | } else { 42 | $('.tip_text').hide(); 43 | } 44 | 45 | }) 46 | 47 | //reset 48 | $('.inpu_res').click(function () { 49 | $('.cnt_inpu input,textarea').val(''); 50 | $('.tip_text').show(); 51 | }) 52 | //label 53 | //$(".label_player").click(function () { 54 | // $('.pop_layer,.gif_mask').show(); 55 | // $('.navbar').css({ 'height': '0', 'border-top': 'none' }); 56 | //}) 57 | $(".layer_clcik").click(function () { 58 | $('.pop_layer,.gif_mask').show(); 59 | $('.navbar').css({'height': '0', 'border-top': 'none'}); 60 | $(".pop_layer img").attr("src", $($(this).find("a")[0]).attr("labelgif")) 61 | }) 62 | //动态获取cnt_left的高度,赋给下拉菜单的top值 63 | var ht = $(".cnt_left").height(); 64 | $("#_select,#flags").css("top", ht + 4 + 'px'); 65 | //获取下拉菜单到底端的距离 页面没有出现滚动条的时候 66 | //console.log($(".cn_main").offset().top); 67 | //var tt=$(window).height(); 68 | var tt = $("body").outerHeight(true); 69 | console.log(tt); 70 | var ss = $("body").outerHeight(true) - $(".cn_main").offset().top - $(".cnt_left").height() - 114; 71 | $("#flags,#_select").css({'height': 'auto', 'max-height': ss}); 72 | //下拉列表 73 | var imgss = ['start.png', 'afh.png', 'ymny.png', 'yd.png', 'start.png', 'afh.png', 'ymny.png', 'yd.png', 'start.png', 'afh.png', 'ymny.png', 'yd.png', 'ymny.png', 'afh.png', 'ymny.png']; 74 | var texts = ['China', 'Colombia', 'Indonesia', 'Malaysia', 'Pakistan', 'Russia', 'Argentina', 'Brazil', 'Thailand', 'Victnam', 'Turkey', 'Arabiac', '伊拉克', 'Казахстан', 'South Africa']; 75 | function GetQueryString(name) { 76 | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 77 | var r = window.location.search.substr(1).match(reg); 78 | if (r != null) return (r[2]); 79 | return ''; 80 | } 81 | //if (!navigator.userAgent.match(/mobile/i)&& navigator.userAgent.match(/mobile/i) && screen.width>767) { 82 | $('.country_left').click(function () { 83 | $(".countryContainer").toggle(); 84 | }) 85 | 86 | //点击空白处隐藏下拉菜单 87 | // $("*").click(function (event) { 88 | // if (!$(this).hasClass("countryContainer")&&!$(this).hasClass("country_left")){ 89 | // $(".countryContainer").hide(); 90 | // } 91 | // event.stopPropagation(); 92 | // }); 93 | $('#currentCountry').val(GetQueryString("c")); 94 | // $("#count").html(decodeURI((GetQueryString("c")|| 'China'))); 95 | // $(".country_img img").attr('src','static/images/'+imgss[GetQueryString("t")||[0]]); 96 | $("#flags li").click(function () { 97 | // var index = $(this).index(); 98 | // $("#count").html(texts[index]); 99 | // $(".country_img img").attr('src', 'static/images/' + imgss[index]); 100 | //改变国家 101 | $("#ddlCountry").val($(this).attr("class")); 102 | $("#changeCountry").val("1"); 103 | $('form')[0].action = "index.aspx" + window.location.search; 104 | $('form')[0].submit(); 105 | 106 | }) 107 | 108 | $(".country_right").click(function () { 109 | $(".countryContainer1").toggle(); 110 | }) 111 | $('#currentLanguage').val(GetQueryString("n")); 112 | //$('.select_language').html(decodeURI(GetQueryString("n") || 'Mandarin')); 113 | $("#_select li").click(function () { 114 | $("#language").val($(this).attr("class")); 115 | $("#changeLan").val("1"); 116 | $('form')[0].action = "index.aspx" + window.location.search; 117 | $('form')[0].submit(); 118 | }) 119 | 120 | //滚动条事件 121 | // $(window).scroll(function(){ 122 | // var st= $(this).scrollTop(); 123 | // //console.log(st); 124 | // //$("#flags").css('height',st); 125 | // 126 | // if(st>=$(document).height()-$(window).height()){ 127 | // console.log(st); 128 | // $("#flags").css('height',st+'px'); 129 | // } 130 | // }) 131 | //} 132 | // Mobile 这里是只有再 移动设备 上访问时 133 | // if (navigator.userAgent.match(/mobile/i) && screen.width<767) { 134 | // //$('#_select,#flags').hide(); 135 | // $("#flags").addClass('_flags'); 136 | // $('.country_left').click(function(){ 137 | // $("#_flags,.gif_mask").show(); 138 | // $("#_flags").animate({'bottom':'0px'}); 139 | // $("#navbar").css('border-top','none'); 140 | // $('body').css('position','fixed'); 141 | // 142 | // // 143 | // $(".gif_mask").on('touchmove',function(e){ 144 | // e.preventDefault(); //阻止默认行为 145 | // }) 146 | // 147 | // $('.gif_mask').click(function(){ 148 | // //$("#_flags").hide(); 149 | // $("#navbar").css('border-top','1px solid #ddd'); 150 | // $('body').css('position','relative'); 151 | // $("#_flags").animate({'bottom':'-260px'}); 152 | // }) 153 | // }) 154 | // $('#_flags li').click(function(){ 155 | // //$('.gif_mask,#flags').hide(); 156 | // //$("#navbar").css('border-top','1px solid #ddd'); 157 | // var index=$(this).index(); 158 | // $("#count").html(texts[index]); 159 | // $(".country_img img").attr('src','../../static/images/'+imgss[index]); 160 | // $('body').css('position','relative'); 161 | // $("#_flags").animate({'bottom':'-260px'},300,function(){ 162 | // $(".gif_mask").hide() 163 | // }); 164 | // 165 | // }) 166 | // 167 | // $('.country_right').click(function(){ 168 | // $("#_selects,.gif_mask").show(); 169 | // $('body').css('position','fixed'); 170 | // $("#_selects").animate({'bottom':'0px'}); 171 | // $("#navbar").css('border-top','none'); 172 | // 173 | // // 174 | // $(".gif_mask").on('touchmove',function(e){ 175 | // e.preventDefault(); //阻止默认行为 176 | // }) 177 | // 178 | // $('.gif_mask').click(function(){ 179 | // //$("#_selects").hide(); 180 | // $("#navbar").css('border-top','1px solid #ddd'); 181 | // $('body').css('position','relative'); 182 | // $("#_selects").animate({'bottom':'-260px'}); 183 | // 184 | // }) 185 | // }) 186 | // 187 | // $('#_selects li').click(function(){ 188 | // //$('.gif_mask,#_select').hide(); 189 | // //$("#navbar").css('border-top','1px solid #ddd'); 190 | // var index=$(this).index(); 191 | // $(".select_language").html($(this).html()); 192 | // $('body').css('position','relative'); 193 | // //$("#_selects").animate({'bottom':'-260px'}); 194 | // $("#_selects").animate({'bottom':'-260px'},300,function(){ 195 | // $(".gif_mask").hide() 196 | // }); 197 | // }) 198 | // } 199 | 200 | if (navigator.userAgent.match(/mobile/i) && window.screen.width < 767) { 201 | 202 | var ht = $(".cnt_left").height(); 203 | $("#_select,#flags").css("top", 'auto'); 204 | 205 | $('.country_left').click(function () { 206 | $(".gif_mask,.countryContainer").show(); 207 | $('.select_flag').animate({'bottom': '0'}); 208 | $("#navbar").css('border-top', 'none'); 209 | $('body').css('position', 'fixed'); 210 | 211 | $(".gif_mask").on('touchmove', function (e) { 212 | e.preventDefault(); //阻止默认行为 213 | }) 214 | 215 | }) 216 | 217 | $(".gif_mask").click(function () { 218 | $('.select_flag').animate({'bottom': '-300px'}, 300, function () { 219 | $(".gif_mask").hide() 220 | }); 221 | $('body').css('position', 'relative'); 222 | }) 223 | 224 | $(".select_flag li").click(function () { 225 | // $(".select_flag").animate({'bottom':'-260px'}); 226 | $('body').css('position', 'relative'); 227 | }) 228 | 229 | 230 | $('.country_right').click(function () { 231 | $(".gif_mask,.countryContainer1").show(); 232 | $('#_select').animate({'bottom': '0'}); 233 | $("#navbar").css('border-top', 'none'); 234 | $('body').css('position', 'fixed'); 235 | 236 | $(".gif_mask").on('touchmove', function (e) { 237 | e.preventDefault(); //阻止默认行为 238 | }) 239 | 240 | }) 241 | 242 | $(".gif_mask").click(function () { 243 | $('#_select').animate({'bottom': '-300px'}, 300, function () { 244 | $(".gif_mask").hide() 245 | }); 246 | $('body').css('position', 'relative'); 247 | }) 248 | 249 | $("#_select li").click(function () { 250 | // $("#_select").animate({'bottom':'-260px'}); 251 | $('body').css('position', 'relative'); 252 | }) 253 | } 254 | 255 | 256 | }(window) 257 | 258 | 259 | export {nav} 260 | 261 | 262 | -------------------------------------------------------------------------------- /src/static/script/plugins/navbar.js: -------------------------------------------------------------------------------- 1 | //设置布尔值开关 2 | var bol=true; 3 | //设置定时器 4 | var timer=null; 5 | //设定navbar(就是会移到下方的部分) 6 | var t=$("#navbar").height(); 7 | 8 | var maxH=50; 9 | var minH=0; 10 | $("#btn").click(function(){ 11 | //判断布尔值 12 | if(bol){ 13 | timer=setInterval(function(){ 14 | t+=50; 15 | navT+=50; 16 | //navbar上限 17 | if(t>=maxH){ 18 | t=maxH; 19 | navT=navMaxH; 20 | clearInterval(timer) 21 | } 22 | $("#navbar").animate({height:t+'px'}); 23 | },3) 24 | //布尔值改为false,下次点击时,就会执行else中的语句 25 | bol=false; 26 | }else{ 27 | timer=setInterval(function(){ 28 | t-=50; 29 | navT-=50; 30 | //navbar下限 31 | if(t<=minH){ 32 | t=minH; 33 | navT=navMinH; 34 | clearInterval(timer); 35 | } 36 | $("#navbar").animate({height:t+'px'}); 37 | },3) 38 | //布尔值改为true,下次点击时,就会执行if中的语句 39 | bol=true; 40 | } 41 | }) -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var webpack = require('webpack'); 3 | 4 | var ROOT_PATH = path.resolve(__dirname); 5 | var APP_PATH = path.resolve(__dirname, './src/index.js'); 6 | var BUILD_PATH = path.resolve(__dirname, './build'); 7 | 8 | module.exports = { 9 | entry: APP_PATH, 10 | output: { 11 | path: BUILD_PATH, 12 | filename: 'bundle.js' 13 | }, 14 | module: { 15 | loaders: [{ 16 | test: /\.jsx?$/, 17 | loaders: ['babel-loader?presets[]=es2015,presets[]=react'] 18 | }, 19 | //{test: /\.js$/, loader: "babel"} 20 | // {test: /\.css$/, loader: "style!css"}, 21 | { 22 | test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/, 23 | loader: 'url-loader?limit=8192&name=images/[hash:8].[name].[ext]' 24 | }, 25 | { 26 | test: /\.css$/, 27 | loader: 'style-loader!css-loader' 28 | } 29 | 30 | ] 31 | } 32 | } -------------------------------------------------------------------------------- /webpack.readme: -------------------------------------------------------------------------------- 1 | npm install react --save-dev 2 | npm install react-dom --save-dev 3 | npm install webpack --save-dev 4 | npm install babel-loader --save-dev --------------------------------------------------------------------------------