Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
3e585daa
Commit
3e585daa
authored
Oct 10, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加新的嵌套模板
parent
7e1ecd3a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
445 additions
and
83 deletions
+445
-83
UserCenterController.php
src/frontend/controllers/UserCenterController.php
+16
-3
center.php
src/frontend/views/layouts/center.php
+75
-0
class-center.php
src/frontend/views/layouts/class-center.php
+124
-0
user-center.php
src/frontend/views/layouts/user-center.php
+54
-50
info.php
src/frontend/views/user-center/info.php
+33
-7
style.css
src/frontend/web/css/style.css
+131
-1
info.js
src/frontend/web/js/user-center/info.js
+12
-22
No files found.
src/frontend/controllers/UserCenterController.php
View file @
3e585daa
...
@@ -14,10 +14,12 @@ use common\libs\Utils;
...
@@ -14,10 +14,12 @@ use common\libs\Utils;
use
common\models\BrowseRecord
;
use
common\models\BrowseRecord
;
use
common\models\Favorite
;
use
common\models\Favorite
;
use
common\models\Orders
;
use
common\models\Orders
;
use
common\models\UploadPools
;
use
common\models\User
;
use
common\models\User
;
use
yii\base\ErrorException
;
use
yii\base\ErrorException
;
use
yii\base\Exception
;
use
yii\base\Exception
;
use
yii\filters\AccessControl
;
use
yii\filters\AccessControl
;
use
yii\helpers\Html
;
use
yii\web\Controller
;
use
yii\web\Controller
;
use
Yii
;
use
Yii
;
...
@@ -121,9 +123,20 @@ class UserCenterController extends Controller
...
@@ -121,9 +123,20 @@ class UserCenterController extends Controller
$msg
=
'昵称超过长度限制'
;
$msg
=
'昵称超过长度限制'
;
}
else
{
}
else
{
$user
=
Yii
::
$app
->
user
->
identity
;
$user
=
Yii
::
$app
->
user
->
identity
;
$user
->
avatar
=
$avatar
;
$oldAvatar
=
FALSE
;
//标记是否进行资源清理
$user
->
username
=
$username
;
if
(
$user
->
avatar
!==
$avatar
)
{
$user
->
save
();
$oldAvatar
=
$user
->
avatar
;
}
}
$user
->
avatar
=
Html
::
encode
(
$avatar
);
$user
->
username
=
Html
::
encode
(
$username
);
$user
->
save
();
//资源清理
if
(
$oldAvatar
)
{
//删除
UploadPools
::
deleteFile
(
UploadPools
::
getSkey
(
'public'
,
$oldAvatar
));
//认领资源
UploadPools
::
claimFileBySkey
(
UploadPools
::
getSkey
(
'public'
,
$avatar
));
}
}
Utils
::
ajaxResponse
(
$status
,
$msg
);
Utils
::
ajaxResponse
(
$status
,
$msg
);
}
else
{
}
else
{
...
...
src/frontend/views/layouts/center.php
0 → 100644
View file @
3e585daa
<?php
use
yii\helpers\Html
;
use
yii\web\View
;
use
frontend\assets\AppAsset
;
/* @var $this \yii\web\View */
/* @var $content string */
AppAsset
::
register
(
$this
);
AppAsset
::
addCss
(
$this
,
'@web/assets/css/style.css'
);
//$assetsUrl = Yii::$app->assetManager->baseUrl.'/assets';
//
//$js = <<<JS
//var global = (function () {
// this.static_url = "$assetsUrl";
//})();
//JS;
//
//$this->registerJs($js, View::POS_HEAD);
$js
=
<<<JS
$(function() {
var Accordion = function(el, multiple) {
this.el = el || {};
this.multiple = multiple || false;
// Variables privadas
var links = this.el.find(".link");
// Evento
links.on("click", {el: this.el, multiple: this.multiple}, this.dropdown)
};
Accordion.prototype.dropdown = function(e) {
var el = e.data.el, self = $(this), next = self.next();
next.slideToggle();
self.parent().toggleClass("open");
if (!e.data.multiple) {
el.find(".submenu").not(next).slideUp().parent().removeClass("open");
}
};
new Accordion($("#accordion"), false);
});
JS;
$this
->
registerJs
(
$js
,
View
::
POS_END
);
?>
<?php
$this
->
beginPage
()
?>
<!DOCTYPE html>
<html
lang=
"
<?=
\Yii
::
$app
->
language
?>
"
>
<head>
<meta
charset=
"
<?=
Yii
::
$app
->
charset
?>
"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<title>
<?=
$this
->
title
?
Html
::
encode
(
$this
->
title
)
.
'-'
:
''
?>
最课堂
</title>
<?=
Html
::
csrfMetaTags
()
?>
<?php
$this
->
head
()
?>
</head>
<body>
<?php
$this
->
beginBody
();
?>
<?=
$content
?>
<div
class=
"foot navbar-fixed-bottom"
>
<p><a
href=
"#"
>
隐私权政策
</a>
-
<a
href=
"#"
>
服务条款
</a>
-
<a
href=
"#"
>
地图条款
</a></p>
<p>
©2016 Zuiketang.com
</p>
</div>
<?php
$this
->
endBody
();
?>
</body>
</html>
<?php
$this
->
endPage
();
?>
src/frontend/views/layouts/class-center.php
0 → 100644
View file @
3e585daa
<?php
use
yii\helpers\Html
;
use
yii\web\View
;
use
frontend\assets\AppAsset
;
/* @var $this \yii\web\View */
/* @var $content string */
AppAsset
::
register
(
$this
);
AppAsset
::
addCss
(
$this
,
'@web/assets/css/style.css'
);
//$assetsUrl = Yii::$app->assetManager->baseUrl.'/assets';
//
//$js = <<<JS
//var global = (function () {
// this.static_url = "$assetsUrl";
//})();
//JS;
//
//$this->registerJs($js, View::POS_HEAD);
$js
=
<<<JS
$(function() {
var Accordion = function(el, multiple) {
this.el = el || {};
this.multiple = multiple || false;
// Variables privadas
var links = this.el.find(".link");
// Evento
links.on("click", {el: this.el, multiple: this.multiple}, this.dropdown)
};
Accordion.prototype.dropdown = function(e) {
var el = e.data.el, self = $(this), next = self.next();
next.slideToggle();
self.parent().toggleClass("open");
if (!e.data.multiple) {
el.find(".submenu").not(next).slideUp().parent().removeClass("open");
}
};
new Accordion($("#accordion"), false);
});
JS;
$this
->
registerJs
(
$js
,
View
::
POS_END
);
?>
<?php
$this
->
beginPage
()
?>
<!DOCTYPE html>
<html
lang=
"
<?=
\Yii
::
$app
->
language
?>
"
>
<head>
<meta
charset=
"
<?=
Yii
::
$app
->
charset
?>
"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<title>
<?=
$this
->
title
?
Html
::
encode
(
$this
->
title
)
.
'-'
:
''
?>
最课堂
</title>
<?=
Html
::
csrfMetaTags
()
?>
<?php
$this
->
head
()
?>
</head>
<body>
<?php
$this
->
beginBody
();
?>
<?php
$this
->
beginContent
(
'@app/views/layouts/center.php'
);
?>
<div
class=
"tp-sidebar"
>
<div
class=
"logo"
><a
href=
"/"
><img
src=
"
<?=
Yii
::
$app
->
assetManager
->
baseUrl
?>
/img/logo.png"
></a></div>
<div
class=
"side-menu"
>
<!-- Contenedor -->
<ul
id=
"accordion"
class=
"accordion"
>
<li>
<div
class=
"link"
><i
class=
"icon-palette"
></i>
我的课堂
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<li
class=
"active"
><a
href=
"#"
>
课堂概况
</a></li>
<li><a
href=
"#"
>
讲师管理
</a></li>
</ul>
</li>
<li>
<div
class=
"link"
><i
class=
"icon-ondemand_video"
></i>
我的课程
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<li><a
href=
"#"
>
发布课程
</a></li>
<li><a
href=
"#"
>
课程列表
</a></li>
</ul>
</li>
<li>
<div
class=
"link"
><i
class=
"icon-fingerprint"
></i>
我的会员
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<li><a
href=
"#"
>
会员列表
</a></li>
</ul>
</li>
<li>
<div
class=
"link"
><i
class=
"icon-bell"
></i>
知识有价
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<li><a
href=
"#"
>
购买记录
</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div
class=
"auto-main"
>
<div
class=
"tp-head navbar-fixed-top clearfix"
>
<div
class=
"menu-btn fl"
><a
href=
"#"
><i
class=
"icon-menu"
></i></a></div>
<div
class=
"avatar fr"
><a
href=
"#"
><img
src=
"
<?=
Yii
::
$app
->
assetManager
->
baseUrl
?>
/img/avatar.jpg"
></a></div>
</div>
<div
class=
"tp-main"
>
<div
class=
"container"
>
<?=
$content
?>
</div>
</div>
</div>
<?php
$this
->
endContent
();
?>
<div
class=
"foot navbar-fixed-bottom"
>
<p><a
href=
"#"
>
隐私权政策
</a>
-
<a
href=
"#"
>
服务条款
</a>
-
<a
href=
"#"
>
地图条款
</a></p>
<p>
©2016 Zuiketang.com
</p>
</div>
<?php
$this
->
endBody
();
?>
</body>
</html>
<?php
$this
->
endPage
();
?>
src/frontend/views/layouts/user-center.php
View file @
3e585daa
...
@@ -50,68 +50,72 @@ $this->registerJs($js, View::POS_END);
...
@@ -50,68 +50,72 @@ $this->registerJs($js, View::POS_END);
?>
?>
<?php
$this
->
beginPage
()
?>
<?php
$this
->
beginPage
()
?>
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"
<?=
\Yii
::
$app
->
language
?>
"
>
<html
lang=
"
<?=
\Yii
::
$app
->
language
?>
"
>
<head>
<head>
<meta
charset=
"
<?=
Yii
::
$app
->
charset
?>
"
>
<meta
charset=
"
<?=
Yii
::
$app
->
charset
?>
"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<title>
<?=
$this
->
title
?
Html
::
encode
(
$this
->
title
)
.
'-'
:
''
?>
最课堂
</title>
<title>
<?=
$this
->
title
?
Html
::
encode
(
$this
->
title
)
.
'-'
:
''
?>
最课堂
</title>
<?=
Html
::
csrfMetaTags
()
?>
<?=
Html
::
csrfMetaTags
()
?>
<?php
$this
->
head
()
?>
<?php
$this
->
head
()
?>
</head>
</head>
<body>
<body>
<?php
$this
->
beginBody
();
?>
<?php
$this
->
beginBody
();
?>
<?php
$this
->
beginContent
(
'@app/views/layouts/center.php'
);
?>
<div
class=
"tp-sidebar"
>
<div
class=
"tp-sidebar"
>
<div
class=
"logo"
><a
href=
"/"
><img
src=
"
<?=
Yii
::
$app
->
assetManager
->
baseUrl
?>
/img/logo.png"
></a></div>
<div
class=
"logo"
><a
href=
"/"
><img
src=
"
<?=
Yii
::
$app
->
assetManager
->
baseUrl
?>
/img/logo.png"
></a></div>
<div
class=
"side-menu"
>
<div
class=
"side-menu"
>
<!-- Contenedor -->
<!-- Contenedor -->
<ul
id=
"accordion"
class=
"accordion"
>
<ul
id=
"accordion"
class=
"accordion"
>
<li>
<li>
<div
class=
"link"
><i
class=
"icon-palette"
></i>
我的课堂
<i
class=
"icon-navigate_next"
></i></div>
<div
class=
"link"
><i
class=
"icon-palette"
></i>
我的课堂
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<ul
class=
"submenu"
>
<li
class=
"active"
><a
href=
"#"
>
课堂概况
</a></li>
<li
class=
"active"
><a
href=
"#"
>
课堂概况
</a></li>
<li><a
href=
"#"
>
讲师管理
</a></li>
<li><a
href=
"#"
>
讲师管理
</a></li>
</ul>
</ul>
</li>
</li>
<li>
<li>
<div
class=
"link"
><i
class=
"icon-ondemand_video"
></i>
我的课程
<i
class=
"icon-navigate_next"
></i></div>
<div
class=
"link"
><i
class=
"icon-ondemand_video"
></i>
我的课程
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<ul
class=
"submenu"
>
<li><a
href=
"#"
>
发布课程
</a></li>
<li><a
href=
"#"
>
发布课程
</a></li>
<li><a
href=
"#"
>
课程列表
</a></li>
<li><a
href=
"#"
>
课程列表
</a></li>
</ul>
</ul>
</li>
</li>
<li>
<li>
<div
class=
"link"
><i
class=
"icon-fingerprint"
></i>
我的会员
<i
class=
"icon-navigate_next"
></i></div>
<div
class=
"link"
><i
class=
"icon-fingerprint"
></i>
我的会员
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<ul
class=
"submenu"
>
<li><a
href=
"#"
>
会员列表
</a></li>
<li><a
href=
"#"
>
会员列表
</a></li>
</ul>
</ul>
</li>
</li>
<li><div
class=
"link"
><i
class=
"icon-bell"
></i>
知识有价
<i
class=
"icon-navigate_next"
></i></div>
<li>
<ul
class=
"submenu"
>
<div
class=
"link"
><i
class=
"icon-bell"
></i>
知识有价
<i
class=
"icon-navigate_next"
></i></div>
<li><a
href=
"#"
>
购买记录
</a></li>
<ul
class=
"submenu"
>
</ul>
<li><a
href=
"#"
>
购买记录
</a></li>
</li>
</ul>
</ul>
</li>
</div>
</ul>
</div>
</div>
</div>
<div
class=
"auto-main"
>
<div
class=
"auto-main"
>
<div
class=
"tp-head navbar-fixed-top clearfix"
>
<div
class=
"tp-head navbar-fixed-top clearfix"
>
<div
class=
"menu-btn fl"
><a
href=
"#"
><i
class=
"icon-menu"
></i></a></div>
<div
class=
"menu-btn fl"
><a
href=
"#"
><i
class=
"icon-menu"
></i></a></div>
<div
class=
"avatar fr"
><a
href=
"#"
><img
src=
"
<?=
Yii
::
$app
->
assetManager
->
baseUrl
?>
/img/avatar.jpg"
></a></div>
<div
class=
"avatar fr"
><a
href=
"#"
><img
src=
"
<?=
Yii
::
$app
->
assetManager
->
baseUrl
?>
/img/avatar.jpg"
></a></div>
</div>
</div>
<div
class=
"tp-main"
>
<div
class=
"tp-main"
>
<div
class=
"container"
>
<div
class=
"container"
>
<?=
$content
?>
<?=
$content
?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
$this
->
endContent
();
?>
<div
class=
"foot navbar-fixed-bottom"
>
<div
class=
"foot navbar-fixed-bottom"
>
<p><a
href=
"#"
>
隐私权政策
</a>
-
<a
href=
"#"
>
服务条款
</a>
-
<a
href=
"#"
>
地图条款
</a></p>
<p><a
href=
"#"
>
隐私权政策
</a>
-
<a
href=
"#"
>
服务条款
</a>
-
<a
href=
"#"
>
地图条款
</a></p>
<p>
©2016 Zuiketang.com
</p>
<p>
©2016 Zuiketang.com
</p>
</div>
</div>
<?php
$this
->
endBody
();
?>
<?php
$this
->
endBody
();
?>
...
...
src/frontend/views/user-center/info.php
View file @
3e585daa
...
@@ -9,20 +9,28 @@
...
@@ -9,20 +9,28 @@
$url
=
Yii
::
$app
->
qiniu
->
storages
[
'public'
][
'url'
];
$url
=
Yii
::
$app
->
qiniu
->
storages
[
'public'
][
'url'
];
?>
?>
<div
class=
"add-box"
>
<div
id=
"edit-container"
class=
"add-box"
style=
"display: none"
>
<div
class=
"add-box-main"
>
<div
class=
"add-box-main"
>
<div
class=
"tit"
>
基本信息
</div>
<div
class=
"tit"
>
基本信息
</div>
<div
class=
"upload-avatar"
id=
"avatar-uploader"
token=
"
<?=
$publicToken
?>
"
>
<div
id=
"upload-avatar-value"
>
<i
class=
" icon-image"
></i>
<p>
上传头像
</p>
</div>
<span
id=
"upload-process"
style=
"display:none;"
class=
"loading-tip"
>
上传中
</span>
<div
class=
"upload-avatar"
>
<img
id=
"avatar-uploader"
token=
"
<?=
$publicToken
?>
"
src=
"
<?php
echo
\yii\bootstrap\Html
::
encode
(
Yii
::
$app
->
user
->
identity
->
avatar
===
''
?
\frontend\assets\AppAsset
::
getStaticUrl
(
'img/avatar.jpg'
)
:
$url
.
Yii
::
$app
->
user
->
identity
->
avatar
)
?>
"
>
<input
id=
"avatar"
type=
"hidden"
value=
"
<?=
\yii\bootstrap\Html
::
encode
(
Yii
::
$app
->
user
->
identity
->
avatar
)
?>
"
>
</div>
</div>
<input
id=
"avatar"
type=
"hidden"
value=
"
<?=
\yii\bootstrap\Html
::
encode
(
Yii
::
$app
->
user
->
identity
->
avatar
)
?>
"
>
<div
class=
"type-name"
>
<div
class=
"type-name"
>
<input
id=
"username"
type=
"text"
value=
"
<?=
\yii\bootstrap\Html
::
encode
(
Yii
::
$app
->
user
->
identity
->
username
)
?>
"
<input
id=
"username"
type=
"text"
value=
"
<?=
\yii\bootstrap\Html
::
encode
(
Yii
::
$app
->
user
->
identity
->
username
)
?>
"
placeholder=
"请输入您的昵称..."
>
placeholder=
"请输入您的昵称..."
>
</div>
</div>
...
@@ -32,3 +40,21 @@ $url = Yii::$app->qiniu->storages['public']['url'];
...
@@ -32,3 +40,21 @@ $url = Yii::$app->qiniu->storages['public']['url'];
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"normal-container"
class=
"add-box"
>
<div
class=
"add-box-main"
>
<div
class=
"tit"
>
基本信息
</div>
<div
class=
"upload-avatar"
>
<img
id=
"avatar-uploader"
src=
"
<?php
echo
\yii\bootstrap\Html
::
encode
(
Yii
::
$app
->
user
->
identity
->
avatar
===
''
?
\frontend\assets\AppAsset
::
getStaticUrl
(
'img/avatar.jpg'
)
:
$url
.
Yii
::
$app
->
user
->
identity
->
avatar
)
?>
"
>
</div>
<div
class=
"type-name m-b-20"
>
<?=
\yii\bootstrap\Html
::
encode
(
Yii
::
$app
->
user
->
identity
->
username
)
?>
</div>
<a
id=
"edit"
href=
"javascript:;"
class=
"edit-info"
><i
class=
"icon-mode_edit"
></i></a>
</div>
</div>
src/frontend/web/css/style.css
View file @
3e585daa
...
@@ -15,6 +15,16 @@ html {
...
@@ -15,6 +15,16 @@ html {
width
:
100%
;
width
:
100%
;
}
}
.m-t-20
{
margin-top
:
20px
;
}
.m-b-20
{
margin-bottom
:
20px
;
}
.d-i-b
{
display
:
inline-block
;
}
/*side bar*/
/*side bar*/
.tp-sidebar
{
.tp-sidebar
{
...
@@ -381,11 +391,13 @@ html {
...
@@ -381,11 +391,13 @@ html {
background-color
:
#fff
;
background-color
:
#fff
;
}
}
.add-box-main
{
.add-box-main
{
position
:
relative
;
padding
:
20px
40px
;
padding
:
20px
40px
;
text-align
:
center
;
text-align
:
center
;
}
}
.add-box-main
.tit
{
.add-box-main
.tit
{
text-align
:
left
;
text-align
:
left
;
font-size
:
16px
;
}
}
.upload-avatar
{
.upload-avatar
{
position
:
relative
;
position
:
relative
;
...
@@ -420,9 +432,46 @@ html {
...
@@ -420,9 +432,46 @@ html {
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.upload-avatar
img
{
.upload-avatar
img
{
position
:
absolute
;
left
:
0
;
top
:
0
;
height
:
100px
;
height
:
100px
;
width
:
100px
;
width
:
100px
;
border-radius
:
100%
;
border-radius
:
100%
;
z-index
:
2
;
}
.upload-avatar
span
.loading-tip
{
position
:
absolute
;
display
:
inline-block
;
width
:
100px
;
height
:
100px
;
text-align
:
center
;
line-height
:
100px
;
color
:
#fff
;
top
:
0
;
left
:
0
;
border-radius
:
100%
;
background-color
:
rgba
(
0
,
0
,
0
,
.5
);
z-index
:
3
;
}
.edit-info
{
position
:
absolute
;
display
:
inline-block
;
width
:
50px
;
height
:
50px
;
border-radius
:
100%
;
text-align
:
center
;
line-height
:
52px
;
font-size
:
18px
;
text-decoration
:
none
;
right
:
20px
;
top
:
20px
;
background-color
:
#f3f3f3
;
}
.edit-info
:hover
{
background-color
:
#3f7de4
;
color
:
#fff
;
text-decoration
:
none
;
}
}
.type-name
{
.type-name
{
font-size
:
14px
;
font-size
:
14px
;
...
@@ -558,6 +607,11 @@ fieldset[disabled] .input-r-control {
...
@@ -558,6 +607,11 @@ fieldset[disabled] .input-r-control {
background-color
:
#eee
;
background-color
:
#eee
;
opacity
:
1
;
opacity
:
1
;
}
}
.reset-input
{
width
:
100px
;
display
:
inline-block
;
margin-left
:
20px
;
}
textarea
.input-r-control
{
textarea
.input-r-control
{
height
:
auto
;
height
:
auto
;
}
}
...
@@ -747,7 +801,7 @@ textarea.input-r-control {
...
@@ -747,7 +801,7 @@ textarea.input-r-control {
.cls-list-box
.col-md-4
{
.cls-list-box
.col-md-4
{
}
}
.cls-box-main
{
.cls-box-main
{
margin
:
0
10px
1
0px
10px
;
margin
:
0
10px
4
0px
10px
;
background-color
:
#fff
;
background-color
:
#fff
;
height
:
350px
;
height
:
350px
;
}
}
...
@@ -770,6 +824,10 @@ textarea.input-r-control {
...
@@ -770,6 +824,10 @@ textarea.input-r-control {
.video-list-cnt
.tit
{
.video-list-cnt
.tit
{
font-size
:
14px
;
font-size
:
14px
;
}
}
.video-list-cnt
.tit
a
{
color
:
#333
;
text-decoration
:
none
;
}
.video-list-cnt
.description
{
.video-list-cnt
.description
{
font-size
:
12px
;
font-size
:
12px
;
line-height
:
1.6
;
line-height
:
1.6
;
...
@@ -926,4 +984,76 @@ textarea.input-r-control {
...
@@ -926,4 +984,76 @@ textarea.input-r-control {
.buy-recode-top
.col-md-4
p
{
.buy-recode-top
.col-md-4
p
{
font-size
:
30px
;
font-size
:
30px
;
color
:
#259e2b
;
color
:
#259e2b
;
}
/*user center side menu*/
.simple-menu
li
{
width
:
100%
;
}
.simple-menu
li
a
{
position
:
relative
;
display
:
block
;
padding-left
:
50px
;
border-left
:
2px
solid
transparent
;
color
:
#7fa6ad
;
height
:
50px
;
line-height
:
50px
;
text-decoration
:
none
;
}
.simple-menu
li
a
i
{
position
:
absolute
;
left
:
10px
;
top
:
0
;
display
:
inline-block
;
width
:
50px
;
height
:
50px
;
text-align
:
center
;
line-height
:
50px
;
padding-right
:
12px
;
font-size
:
18px
;
}
.simple-menu
li
.active
a
{
background-color
:
#313a46
;
border-left
:
2px
solid
#607ca1
;
color
:
#fff
;
}
.apply-class
button
{
width
:
200px
;
margin-left
:
10px
;
}
.sm-box
{
height
:
320px
;
}
.sm-box
.price
{
height
:
40px
;
line-height
:
40px
;
color
:
#f11300
;
}
.play-mask
{
position
:
absolute
;
display
:
inline-block
;
top
:
0
;
left
:
0
;
width
:
100%
;
background-color
:
rgba
(
0
,
0
,
0
,
.2
);
height
:
220px
;
line-height
:
240px
;
text-align
:
center
;
z-index
:
8
;
opacity
:
0
;
-webkit-transition
:
all
0.4s
ease
;
-o-transition
:
all
0.4s
ease
;
transition
:
all
0.4s
ease
;
}
.play-mask
a
{
display
:
block
;
}
.play-mask
i
{
color
:
#fff
;
font-size
:
38px
;
}
.sm-box
:hover
.play-mask
{
opacity
:
1
;
}
}
\ No newline at end of file
src/frontend/web/js/user-center/info.js
View file @
3e585daa
...
@@ -36,34 +36,19 @@ require.ensure('../libs/plupload/plupload.full.min.js', function () {
...
@@ -36,34 +36,19 @@ require.ensure('../libs/plupload/plupload.full.min.js', function () {
// 每个文件上传前,处理相关的事情
// 每个文件上传前,处理相关的事情
},
},
'UploadProgress'
:
function
(
up
,
file
)
{
'UploadProgress'
:
function
(
up
,
file
)
{
// progress.css("width", file.percent + "%");
$
(
'#upload-process'
).
show
();
// infoProgress.text(file.percent);
// infoSpeed.text(filesize(up.total.bytesPerSec));
//
// // var avgSpeed = file.loaded / (((new Date()).getTime() - startTime) / 1000);
//
// var sizeRemain = file.origSize - file.loaded;
// var leftSeconds = sizeRemain / up.total.bytesPerSec;
// var toDate = new Date();
// toDate.setTime((new Date()).getTime() + leftSeconds * 1000);
// infoRemain.text(moment(toDate).toNow(true));
// infoProgress.text(file.percent);
// $("#" + file.id + " .attachup-list-element-status").html("上传中 - " + file.percent + "%");
},
},
'FileUploaded'
:
function
(
up
,
file
,
info
)
{
'FileUploaded'
:
function
(
up
,
file
,
info
)
{
// 每个文件上传成功后,处理相关的事情
// 每个文件上传成功后,处理相关的事情
// 其中info是文件上传成功后,服务端返回的json,形式如:
// {
$
(
'#upload-process'
).
hide
();
// "hash": "Fh8xVqod2MQ1mocfI4S4KpRL6D98",
// "key": "gogopher.jpg"
// }
// 查看简单反馈
var
res
=
JSON
.
parse
(
info
.
response
);
var
res
=
JSON
.
parse
(
info
.
response
);
var
url
=
__QINIU_URL__
+
res
.
key
;
var
url
=
__QINIU_URL__
+
res
.
key
;
$
(
'#avatar-uploader'
).
attr
(
'src'
,
url
);
var
html
=
'<img src="'
+
url
+
'">'
;
$
(
'#upload-avatar-value'
).
html
(
html
);
$
(
'#avatar'
).
val
(
res
.
key
);
$
(
'#avatar'
).
val
(
res
.
key
);
},
},
'Error'
:
function
(
up
,
err
,
errTip
)
{
'Error'
:
function
(
up
,
err
,
errTip
)
{
//上传出错时,处理相关的事情
//上传出错时,处理相关的事情
...
@@ -104,7 +89,7 @@ $("#save").click(function () {
...
@@ -104,7 +89,7 @@ $("#save").click(function () {
if
(
!
reponse
.
status
===
true
)
{
if
(
!
reponse
.
status
===
true
)
{
layer
.
alert
(
reponse
.
message
||
'系统错误'
,
{
icon
:
2
,
title
:
"提示"
})
layer
.
alert
(
reponse
.
message
||
'系统错误'
,
{
icon
:
2
,
title
:
"提示"
})
}
else
{
}
else
{
layer
.
alert
(
'保存成功'
,
{
icon
:
1
,
title
:
"提示"
})
window
.
location
.
reload
();
}
}
}
}
}).
error
(
function
()
{
}).
error
(
function
()
{
...
@@ -113,3 +98,8 @@ $("#save").click(function () {
...
@@ -113,3 +98,8 @@ $("#save").click(function () {
})
})
});
});
$
(
'#edit'
).
click
(
function
()
{
$
(
'#edit-container'
).
show
();
$
(
'#normal-container'
).
hide
();
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment