Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
张桐
/
xdykt-build
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
张桐
2017-03-06 09:51:46 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
77c88e7aa4ee14a3a145b522311b01b1a5d34aa4
77c88e7a
1 parent
350d148c
修改撤销上一步标注,只能撤销当前页, 修改用户名从地址栏取到
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
88 行增加
和
46 行删除
index.html
js/McuClient.js
js/draw.js
js/index.js
src/main.js
index.html
查看文件 @
77c88e7
...
...
@@ -27,7 +27,6 @@
<script
type=
"text/javascript"
src=
"src/videoWithFlash.js"
></script>
<!--<script type="text/javascript" src="src/nativeVideo.js"></script>-->
</head>
...
...
@@ -81,7 +80,30 @@
<!--<i></i>-->
<!--</div>-->
<!--<a id="a-status" href="javascript: void(0)">未开始</a></li>-->
<!--右侧未开始-->
<div
class=
"am-dropdown"
data-am-dropdown
>
<button
type=
"button"
class=
"am-btn am-btn-primary am-dropdown-toggle "
data-am-dropdown-toggle
><span
id=
"span-iconfont"
class=
"span-classes iconfont"
>

</span><span
id=
"class-now"
>
未开始
</span>
</button>
<ul
class=
"am-dropdown-content"
>
<li><span
id=
"am-dropdown-content-span-1"
class=
"am-dropdown-content-span iconfont"
>

</span>
<button
id=
"classes-status-1"
type=
"button"
class=
"am-btn am-btn-primary am-dropdown-content-button"
href=
"#"
>
开始上课
</button>
</li>
<li><span
class=
"am-dropdown-content-span iconfont"
>

</span>
<button
id=
"classes-status-2"
type=
"button"
class=
"am-btn am-btn-primary am-dropdown-content-button"
data-am-modal=
"{target: '#end-classes', closeViaDimmer: 0, width: 340, height: 172}"
href=
"#"
>
结束课堂
</button>
</li>
</ul>
</div>
<li
class=
"classroom"
><a
id=
"classCurName"
href=
"javascript: void(0)"
></a></li>
<li
class=
"classCurId"
><a
id=
"classCurId"
href=
"javascript: void(0)"
></a></li>
...
...
@@ -165,30 +187,30 @@
</button></a>
</div>
<!--右侧未开始-->
<div
class=
"am-dropdown"
data-am-dropdown
>
<button
type=
"button"
class=
"am-btn am-btn-primary am-dropdown-toggle "
data-am-dropdown-toggle
><span
id=
"span-iconfont"
class=
"span-classes iconfont"
>

</span><span
id=
"class-now"
>
未开始
</span>
</button>
<ul
class=
"am-dropdown-content"
>
<li><span
id=
"am-dropdown-content-span-1"
class=
"am-dropdown-content-span iconfont"
>

</span>
<button
id=
"classes-status-1"
type=
"button"
class=
"am-btn am-btn-primary am-dropdown-content-button"
href=
"#"
>
开始上课
</button>
</li>
<li><span
class=
"am-dropdown-content-span iconfont"
>

</span>
<button
id=
"classes-status-2"
type=
"button"
class=
"am-btn am-btn-primary am-dropdown-content-button"
data-am-modal=
"{target: '#end-classes', closeViaDimmer: 0, width: 340, height: 172}"
href=
"#"
>
结束课堂
</button>
</li>
</ul>
</div>
<!--<!–右侧未开始–>-->
<!--<div class="am-dropdown" data-am-dropdown>-->
<!--<button type="button" class="am-btn am-btn-primary am-dropdown-toggle " data-am-dropdown-toggle><span-->
<!--id="span-iconfont" class="span-classes iconfont"></span><span id="class-now">未开始</span>-->
<!--</button>-->
<!--<ul class="am-dropdown-content">-->
<!--<li><span id="am-dropdown-content-span-1" class="am-dropdown-content-span iconfont"></span>-->
<!--<button id="classes-status-1" type="button"-->
<!--class="am-btn am-btn-primary am-dropdown-content-button"-->
<!--href="#">开始上课-->
<!--</button>-->
<!--</li>-->
<!--<li><span class="am-dropdown-content-span iconfont"></span>-->
<!--<button id="classes-status-2" type="button"-->
<!--class="am-btn am-btn-primary am-dropdown-content-button"-->
<!--data-am-modal="{target: '#end-classes', closeViaDimmer: 0, width: 340, height: 172}"-->
<!--href="#">结束课堂-->
<!--</button>-->
<!--</li>-->
<!--</ul>-->
<!--</div>-->
<!--弹出层-结束课堂-->
...
...
@@ -586,7 +608,7 @@
<li></li>
<li
class=
"userNameLi"
>
<div
class=
"userNameBg"
></div>
<input
value=
"xdykt"
class=
"userNameInput"
type=
"text"
placeholder=
"请输入用户名"
maxlength=
"20"
onkeyup=
"this.value=this.value.replace(/^ +| +$/g,'')"
>
<input
class=
"userNameInput"
type=
"text"
placeholder=
"请输入用户名"
maxlength=
"20"
onkeyup=
"this.value=this.value.replace(/^ +| +$/g,'')"
>
</li>
<li>
<p
class=
"userTip"
></p>
...
...
js/McuClient.js
查看文件 @
77c88e7
此 diff 太大无法显示。
js/draw.js
查看文件 @
77c88e7
...
...
@@ -13,7 +13,6 @@ var canvasWidth = 880;
var
canvasHeight
=
718
;
var
recordPencilResult
=
{};
var
recordPencilObj
=
{};
var
recordPencil
=
[];
var
recordPencilTotal
=
[];
var
recordPencilId
;
...
...
@@ -59,7 +58,7 @@ var canvasTop;
var
canvasLeft
;
//画笔大小
var
size
=
2
;
var
size
=
1
;
var
color
=
'#b8242a'
;
//画图形
...
...
@@ -419,11 +418,7 @@ var color = '#b8242a';
//
// }
}
//撤销上一步操作
function
lastStep
()
{
client
.
sendGotoPrev
();
}
//清空层
function
clearContextCan
(
type
){
if
(
!
type
){
...
...
@@ -495,7 +490,7 @@ window.draw={
clearCanvasCon
:
clearCanvasCon
,
trans
:
trans
,
clearContextCan
:
clearContextCan
,
lastStep
:
lastStep
,
clearDocCanvas
:
clearDocCanvas
};
})();
\ No newline at end of file
...
...
js/index.js
查看文件 @
77c88e7
...
...
@@ -24,11 +24,10 @@ $(function (){
draw
.
draw_graph
(
'pencil'
,
this
);
});
$
(
".rescind"
).
on
(
"click"
,
function
()
{
draw
.
lastStep
();
client
.
sendGotoPrev
();
});
$
(
".handwriting"
).
on
(
"click"
,
function
()
{
draw
.
draw_graph
(
'handwriting'
,
this
);
});
...
...
src/main.js
查看文件 @
77c88e7
...
...
@@ -48,7 +48,6 @@ $(function () {
initEngine
();
//加载MCUClientEngine;
listenClass
();
loading
();
urlParamsJudge
();
//对地址栏参数的数据进行判断
});
...
...
@@ -610,7 +609,7 @@ function classFailed(callbackData) {
switch
(
code
)
{
case
100
:
//当前没有 课堂号 用户角色 ip
if
((
classLoadInfo
.
classId
)
==
""
||
classLoadInfo
.
userRole
==
""
||
(
classLoadInfo
.
portal
)
==
":"
||
(
classLoadInfo
.
portalPort
)
==
""
||
(
classLoadInfo
.
portalIP
)
==
""
||
(
classLoadInfo
.
userName
)
==
""
||
(
classLoadInfo
.
userType
==
""
)
){
if
((
classLoadInfo
.
classId
)
==
""
||
classLoadInfo
.
userRole
==
""
||
(
classLoadInfo
.
portal
)
==
":"
||
(
classLoadInfo
.
portalPort
)
==
""
||
(
classLoadInfo
.
portalIP
)
==
""
||
(
classLoadInfo
.
userName
)
==
""
){
console
.
log
(
"不会执行clientInit"
);
//用户进行角色选择
...
...
@@ -744,10 +743,14 @@ function showLogin(isShow){
"margin"
:
"0 auto"
});
if
(
isShow
)
{
//登录页面显示(有密码)
$
(
".loginBg "
).
css
(
"display"
,
"block"
);
console
.
log
(
"loginBgblock"
);
$
(
".userNameInput"
)[
0
].
value
=
classLoadInfo
.
userName
;
$
(
".passWordInput"
)[
0
].
innerHTML
=
$
(
".passWordInput"
)[
0
].
value
;
$
(
".userNameInput"
).
focus
(
function
()
{
$
(
".userTip"
).
css
(
"margin-left"
,
"0"
);
$
(
".userTip"
)[
0
].
innerHTML
=
"支持中文、字母、数字、“-”“_”的组合,4-20个字符"
;
...
...
@@ -777,11 +780,15 @@ function showLogin(isShow){
$
(
".passWordInput"
).
blur
(
function
()
{
$
(
".passWordTip"
)[
0
].
innerHTML
=
"请输入课堂密码"
;
})
$
(
"#btnLogin"
).
click
(
function
(
e
)
{
console
.
log
(
"点击了登录按钮---------->"
);
var
userName
=
$
(
".userNameInput"
).
val
();
var
pwd
=
$
(
".passWordInput"
).
val
();
var
userName
=
classLoadInfo
.
userName
;
var
pwd
=
$
(
".passWordInput"
)[
0
].
value
;
// var userName = $(".userNameInput").val();
// var pwd = $(".passWordInput").val();
if
(
!
userName
)
{
$
(
".userTip"
).
css
(
"margin-left"
,
"45px"
);
...
...
@@ -796,11 +803,12 @@ function showLogin(isShow){
if
(
$
(
".passWordInput"
).
val
().
length
>=
1
){
$
(
".passWordTip"
)[
0
].
innerHTML
=
""
;
}
if
((
$
(
'.userNameInput'
).
val
().
length
>=
4
)
&&
(
$
(
".passWordInput"
).
val
().
length
>=
1
))
{
if
((
$
(
'.userNameInput'
).
val
().
length
>=
1
)
&&
(
$
(
".passWordInput"
).
val
().
length
>=
1
))
{
console
.
log
(
userName
,
pwd
);
onJoinClass
(
userName
,
pwd
);
}
});
// $("#btnLogin").trigger("click");
}
else
{
//登录页面显示(无密码)
...
...
@@ -809,6 +817,8 @@ function showLogin(isShow){
$
(
".btnLoginLi"
).
css
(
"margin-top"
,
"30px"
);
console
.
log
(
"无密码"
);
$
(
".userNameInput"
)[
0
].
value
=
classLoadInfo
.
userName
;
$
(
".passWordInput"
)[
0
].
value
=
$
(
".passWordInput"
)[
0
].
innerHTML
;
$
(
".userNameInput"
).
focus
(
function
()
{
$
(
".userTip"
).
css
(
"margin-left"
,
"0"
);
$
(
".userTip"
)[
0
].
innerHTML
=
"支持中文、字母、数字、“-”“_”的组合,4-20个字符"
;
...
...
@@ -834,15 +844,17 @@ function showLogin(isShow){
$
(
"#btnLogin"
).
click
(
function
(
e
)
{
console
.
log
(
"点击了登录按钮---------->"
);
var
userName
=
$
(
".userNameInput"
).
val
();
var
pwd
=
$
(
".passWordInput"
).
val
();
var
userName
=
classLoadInfo
.
userName
;
console
.
log
(
userName
,
pwd
);
// var userName = $(".userNameInput").val();
// var pwd = $(".passWordInput").val();
if
(
$
(
".userNameInput"
).
length
)
{
if
(
!
userName
)
{
$
(
".userTip"
).
css
(
"margin-left"
,
"45px"
);
$
(
".userTip"
)[
0
].
innerHTML
=
"用户名不能为空"
;
}
}
if
(
$
(
'.userNameInput'
).
val
().
length
>=
4
){
if
(
$
(
'.userNameInput'
).
val
().
length
>=
1
){
onJoinClass
(
userName
);
}
});
...
...
@@ -1044,9 +1056,19 @@ function whiteboardUpdate(callbackData) {
console
.
log
(
"同步canvas消息"
);
console
.
log
(
callbackData
);
draw
.
drawCanvas
(
callbackData
);
// if (callbackData.annotaionItems.length>0) {
// if (callbackData.annotaionItems[0].pointGroup.length > 0) {
// $(".rescind").on("click", function () {
// client.sendGotoPrev();
// });
// }
// }
$
(
".spinner"
).
css
(
"display"
,
"none"
);
$
(
".spinner1"
).
css
(
"display"
,
"none"
);
// $(".doc-headline-a").trigger("click");
}
...
...
@@ -1151,6 +1173,8 @@ function urlParamsJudge(){
classParamInfo
.
userId
=
classLoadInfo
.
userId
;
//第三方用户id
classParamInfo
.
userType
=
classLoadInfo
.
userType
;
//用户的身份 默认1
classParamInfo
.
userName
=
classLoadInfo
.
userName
;
//第三方用户名称
// classParamInfo.passWord=classLoadInfo.passWord; //用户密码
console
.
log
(
"传给底层,进行初始化的数据"
);
console
.
log
(
classParamInfo
);
clientInit
(
classParamInfo
);
...
...
@@ -1177,6 +1201,8 @@ function getURLParams(){
classLoadInfo
.
userType
=
parseInt
(
classUrlParam
.
userType
)
||
1
;
classLoadInfo
.
userId
=
classUrlParam
.
userId
?
classUrlParam
.
userId
:
"0"
;
classLoadInfo
.
portal
=
classLoadInfo
.
portalIP
+
":"
+
classLoadInfo
.
portalPort
;
// classLoadInfo.passWord=classUrlParam.passWord||"";
console
.
log
(
classLoadInfo
);
return
classLoadInfo
;
}
...
...
请
注册
或
登录
后发表评论