增加创建房间的mask层

This commit is contained in:
zhl 2019-03-06 11:06:12 +08:00
parent 7df1ea5516
commit 3b8b25d2b8
5 changed files with 68 additions and 12 deletions

21
fc/dist/gbajs.min.css vendored
View File

@ -516,4 +516,23 @@ canvas {
vertical-align: bottom;
font-family: monospace;
display:none;
}*/
}*/
.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%
}

View File

@ -14,19 +14,15 @@
<script type="text/javascript" src="js/netWorkHandle.js?v=6"></script>
<script type="text/javascript" src="js/network.js?v=6"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/nes-embed.js?v=6"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> -->
<style>
.background-div{
position: absolute;
background-color: #000;
top: 0;
left: 0;
bottom: 0;
right: 0;
<script type="text/javascript">
var showInviteMask = function() {
document.getElementById('info-mask').style.display = '';
}
</style>
var hideInviteMask = function (){
document.getElementById('info-mask').style.display = 'none';
}
</script>
</head>
<body>
@ -57,7 +53,9 @@
<div class="key-btn kay-ST flat-btn" data-key="ST">开始</div>
</div>
</div>
<div class='info-mask' id='info-mask' style="display: none;">
</div>
</body>
</html>

View File

@ -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);

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

37
gulpfile.js Normal file
View File

@ -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');
  });