diff --git a/fc/dist/gbajs.min.css b/fc/dist/gbajs.min.css index c141fdd..08e93e2 100644 --- a/fc/dist/gbajs.min.css +++ b/fc/dist/gbajs.min.css @@ -516,4 +516,23 @@ canvas { vertical-align: bottom; font-family: monospace; display:none; -}*/ \ No newline at end of file +}*/ +.background-div{ + position: fixed; + background-color: #000; + top: 0; + left: 0; + bottom: 0; + right: 0; +} +.info-mask { + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + background-color: #fff; + background-image:url(../resources/invite-mask.png); + background-repeat:no-repeat; + background-size: 100% +} diff --git a/fc/index.html b/fc/index.html index b630c26..b3a0bca 100644 --- a/fc/index.html +++ b/fc/index.html @@ -14,19 +14,15 @@ - - - + var hideInviteMask = function (){ + document.getElementById('info-mask').style.display = 'none'; + } + @@ -57,7 +53,9 @@
开始
+ diff --git a/fc/js/network.js b/fc/js/network.js index 31547bf..cad99cc 100644 --- a/fc/js/network.js +++ b/fc/js/network.js @@ -64,6 +64,7 @@ nwm = function(){ // var temp = res; // temp.userProfile = JSON.parse(temp.userProfile); // self.roomUserInfoList.push(temp); + hideInviteMask(); if(self.cbjoinRoomNotify){ self.cbjoinRoomNotify(res); } @@ -85,6 +86,7 @@ nwm = function(){ console.log(res.roomID); self.roomID = res.roomID; wx.miniProgram.postMessage({ data: self.roomID }) + showInviteMask(); } if(self.cbOnCreateRoom){ self.cbOnCreateRoom(res); diff --git a/fc/resources/invite-mask.png b/fc/resources/invite-mask.png new file mode 100644 index 0000000..330ffaa Binary files /dev/null and b/fc/resources/invite-mask.png differ diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..3f0e118 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,37 @@ +var gulp = require('gulp'), + concat = require('gulp-concat'), + // uglify = require('gulp-uglify'), + uglify = require('gulp-uglify-es').default, + rename = require('gulp-rename'), + jshint = require('gulp-jshint'), + notify = require('gulp-notify'),//提示信息 + stripDebug = require("gulp-strip-debug"),//移除console语句 + gutil = require('gulp-util'); + + gulp.task('jslint', function () { + return gulp.src('fc/js/*.js') + .pipe(jshint()) + .pipe(jshint.reporter('default')) + .pipe(notify({message: 'finished jslint'})); + }); + + gulp.task('minifyjsfc', function() { + return gulp.src('fc/js/*.js') + // .pipe(concat('main.js')) + // .pipe(rename({suffix: '.min'})) + //https://github.com/mishoo/UglifyJS2 + .pipe(uglify({ + mangle:false, + compress:false, + output: { + comments: false //保留注释, all: 保留所有,some:只保留license等信息,false: 不保留,正则或者function + } + })) + .pipe(stripDebug()) + .pipe(gulp.dest('fc/dist/js')) + .pipe(notify({message: 'finished dist'})); + }); + + gulp.task('default', ['jslint'], function() { + gulp.start('minifyjsfc'); +  });