Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liuloulou
/
yohobuy-portal-fe2
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
weiqingting
9 years ago
Commit
9d14f208512e7201b529e082a0a0fc856af17853
1 parent
3a539805
bug 修改
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
75 additions
and
71 deletions
server/controllers/shootMeter.index.js
server/libs/Controller.js
server/views/common/__partail/ListHeader.html
server/views/operations/activitytemplate/Edit.html
server/views/operations/icon/Index.html
server/views/shootMeter/Model/Index.html
server/views/shootMeter/TryModel/Index.html
server/controllers/shootMeter.index.js
View file @
9d14f20
...
...
@@ -8,9 +8,7 @@ module.exports = function (app) {
app
.
get
(
"/shotManage/model/index"
,
"shootMeter.Model.Index"
,
function
(){
this
.
$extend
=
{
moduleName
:
'拍摄复尺'
,
pageName
:
'拍摄模特管理'
,
type
:
1
,
typeName
:
"拍摄模特"
pageName
:
'拍摄模特管理'
}
});
...
...
@@ -31,9 +29,7 @@ module.exports = function (app) {
app
.
get
(
"/meterManage/tryModel/index"
,
"shootMeter.TryModel.Index"
,
function
(){
this
.
$extend
=
{
moduleName
:
'拍摄复尺'
,
pageName
:
'试穿模特管理'
,
type
:
2
,
typeName
:
'试穿模特管理'
pageName
:
'试穿模特管理'
}
});
...
...
server/libs/Controller.js
View file @
9d14f20
...
...
@@ -26,7 +26,7 @@ Controller.prototype.__parseReq=function(req){
}
}
Controller
.
prototype
.
__define
=
function
(
method
,
router
,
view
,
apis
,
callback
,
clientmodel
){
Controller
.
prototype
.
__define
=
function
(
method
,
router
,
view
,
apis
,
callback
,
clientmodel
,
clientsrc
){
var
me
=
this
,
isObj
=
false
;
if
(
typeof
apis
==
"string"
){
apis
=
[
apis
];
...
...
@@ -34,34 +34,34 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo
}
/*参数验证*/
var
guid
=
md5
(
router
+
":"
+
method
)
me
.
on
(
guid
,
function
(){
var
args
=
[].
slice
.
call
(
arguments
,
0
);
var
req
=
args
[
0
],
res
=
args
[
1
];
var
req
=
args
[
0
],
res
=
args
[
1
];
var
local
=
{
__session__
:
req
.
session
,
$extend
:
{}
};
var
local
=
{
__session__
:
req
.
session
,
$extend
:
{}
};
/*如果接口不存在 就实现express 原来的方法*/
if
(
!
apis
.
length
){
var
model
=
{};
if
(
callback
){
model
=
callback
.
apply
(
local
,
args
);
model
=
callback
.
apply
(
local
,
args
);
}
if
(
view
){
res
.
render
(
view
,
local
,
me
.
client
(
res
,
view
,
model
,
clientmodel
));
res
.
render
(
view
,
local
,
me
.
client
(
res
,
clientsrc
,
model
,
clientmodel
));
}
return
;
}
args
.
push
(
function
(
err
,
interfaces
,
names
){
if
(
err
)
{
res
.
json
({
code
:
500
,
message
:
"接口异常"
});
return
;
}
args
.
push
(
function
(
err
,
interfaces
,
names
){
if
(
err
)
{
res
.
json
({
code
:
500
,
message
:
err
.
message
||
'接口异常'
});
return
;
}
//callback
var
model
=
{};
if
(
typeof
callback
==
"function"
)
{
if
(
typeof
callback
==
"function"
)
{
model
=
callback
.
apply
(
local
,
interfaces
.
concat
(
args
));
}
else
{
interfaces
.
forEach
(
function
(
item
,
index
){
...
...
@@ -70,18 +70,18 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo
}
else
{
model
[
names
[
index
]]
=
item
;
}
});
}
if
(
res
.
__complete__
){
return
;
}
if
(
model
&&
model
.
readable
)
{
model
.
pipe
(
res
);
}
else
if
(
view
&&
method
==
"get"
&&
!
req
.
xhr
)
{
res
.
render
(
view
,
local
,
me
.
client
(
res
,
view
,
model
,
clientmodel
));
}
else
{
res
.
json
(
model
);
}
});
}
if
(
res
.
__complete__
){
return
;
}
if
(
model
&&
model
.
readable
)
{
model
.
pipe
(
res
);
}
else
if
(
view
&&
method
==
"get"
&&
!
req
.
xhr
)
{
res
.
render
(
view
,
local
,
me
.
client
(
res
,
clientsrc
,
model
,
clientmodel
));
}
else
{
res
.
json
(
model
);
}
});
//调用接口获取数据
me
.
interfaces
.
require
.
apply
(
me
.
interfaces
,[
apis
].
concat
(
args
));
...
...
@@ -91,8 +91,8 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo
guid
:
guid
,
url
:
router
,
method
:
method
});
//console.log(me.routers);
});
//console.log(me.routers);
}
Controller
.
prototype
.
vue
=
function
(
router
,
views
,
apis
,
callback
){
var
me
=
this
;
...
...
@@ -106,7 +106,7 @@ Controller.prototype.vue=function(router,views,apis,callback){
apis
=
[];
}
apis
=
apis
||
[];
me
.
__define
(
"get"
,
router
,
views
,
apis
,
callback
,
"vue"
);
me
.
__define
(
"get"
,
router
,
"common.Vue"
,
apis
,
callback
,
"vue"
,
views
);
}
Controller
.
prototype
.
get
=
function
(
router
,
views
,
apis
,
callback
){
var
me
=
this
;
...
...
@@ -120,7 +120,7 @@ Controller.prototype.get=function(router,views,apis,callback){
apis
=
[];
}
apis
=
apis
||
[];
me
.
__define
(
"get"
,
router
,
views
,
apis
,
callback
,
"jquery"
);
me
.
__define
(
"get"
,
router
,
views
,
apis
,
callback
,
"jquery"
,
views
);
}
Controller
.
prototype
.
post
=
function
(
router
,
apis
,
callback
){
var
me
=
this
;
...
...
server/views/common/__partail/ListHeader.html
View file @
9d14f20
...
...
@@ -10,7 +10,13 @@
<li>
<
% pageName %>
</li>
</ul>
<div
style=
"margin-top: 4px"
>
<h4
style=
"line-height: 30px;font-size: 24px"
>
<
% pageName %>
</h4>
<h4
style=
"line-height: 30px;font-size: 24px"
>
<
%if subPageName%>
<
%subPageName%>
<
%else%>
<
%pageName%>
<
%/if%>
</h4>
</div>
</div>
</div>
...
...
server/views/operations/activitytemplate/Edit.html
View file @
9d14f20
<
%include '../../common/__ui/header'%>
<
%include '../../common/__partail/ListHeader'%>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h4
class=
"panel-title"
>
添加活动模板
</h4>
</div>
<!-- panel-heading -->
<div
class=
"panel-body"
role=
"<%type%>"
id=
"wrap-content"
data-id=
"<%id%>"
url=
"<%url%>"
>
<div
class=
"row"
id=
"content-template"
>
<div
class=
"contentpanel"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h4
class=
"panel-title"
>
添加活动模板
</h4>
</div>
<!-- panel-heading -->
<div
class=
"panel-body"
role=
"<%type%>"
id=
"wrap-content"
data-id=
"<%id%>"
url=
"<%url%>"
>
<div
class=
"row"
id=
"content-template"
></div>
<!-- row -->
</div>
<!-- panel-body -->
<div
class=
"panel-footer"
>
<div
class=
"row"
>
<div
class=
"col-sm-9 col-sm-offset-3"
>
<a
id=
"save_btn"
class=
"btn btn-success mr5"
>
保存
</a>
<a
href=
"/operations/activitytemplate/index"
class=
"btn btn-primary mr5"
>
取消
</a>
</div>
</div>
<!-- row -->
</div>
<!-- panel-body -->
<div
class=
"panel-footer"
>
<div
class=
"row"
>
<div
class=
"col-sm-9 col-sm-offset-3"
>
<a
id=
"save_btn"
class=
"btn btn-primary mr5"
>
保存
</a>
<a
href=
"/operations/activitytemplate/index"
class=
"btn btn-primary mr5"
>
取消
</a>
</div>
</div>
</div>
<!-- panel-footer -->
</div>
<!-- panel-footer -->
</div>
</div>
<script
type=
"text/template"
id=
"template"
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-1 control-label"
>
模板标题
<
/label
>
<
div
class
=
"col-sm-4"
>
<
input
type
=
"text"
name
=
"title"
class
=
"form-control observe"
placeholder
=
"模板标题"
required
=
""
value
=
"[[title]]"
data
-
field
=
"title"
>
<
div
class
=
"col-sm-5"
>
<
input
type
=
"text"
name
=
"title"
class
=
"form-control observe"
placeholder
=
"模板标题"
required
=
""
value
=
"[[title]]"
data
-
field
=
"title"
maxlength
=
"20"
>
<
p
style
=
"color:#999; margin-top: 5px"
>
注:标题不能超过
20
个字符
<
/p
>
<
/div
>
<
/div><!-- form-group --
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-1 control-label"
>
上传图片
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"text"
name
=
"image"
id
=
"image"
class
=
"form-control observe"
placeholder
=
"图片地址"
value
=
"[[image]]"
data
-
field
=
"image"
>
<
input
id
=
"uploadBox"
name
=
"图片"
type
=
"file"
style
=
"position: absolute; top: 0;left: 0;z-index: -999"
>
<
div
id
=
"chooseFile"
class
=
"file-name btn btn-success"
>
请选择文件
<
/div
>
<
/div
>
<
input
type
=
"text"
name
=
"image"
id
=
"image"
class
=
"form-control observe"
placeholder
=
"图片地址"
value
=
"[[image]]"
data
-
field
=
"image"
>
<
input
id
=
"uploadBox"
name
=
"图片"
type
=
"file"
style
=
"position: absolute; top: 0;left: 0;z-index: -999"
>
<
div
style
=
"margin: 10px 0 5px"
id
=
"chooseFile"
class
=
"file-name btn btn-success"
>
请选择文件
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-1 control-label"
>
跳转链接
<
/label
>
<
div
class
=
"col-sm-9"
>
<
input
type
=
"text"
name
=
"url"
id
=
"url"
class
=
"form-control observe"
placeholder
=
"跳转链接"
value
=
"[[url.replace(/"
/
g
,
"""
)]]
" data-field="
url
">
<button type="
button
" class="
btn
btn
-
info
" id="
addUrl
">添加链接</button>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"text"
name
=
"url"
id
=
"url"
class
=
"form-control observe"
placeholder
=
"跳转链接"
value
=
"[[url.replace(/"
/
g
,
"""
)]]
" data-field="
url
">
<button style="
margin
:
10
px
0
" type="
button
" class="
btn
btn
-
info
" id="
addUrl
">添加链接</button>
<p style="
color
:#
999
">注:链接中不能有英文单引号</p>
</div>
</div><!-- form-group -->
<div class="
form
-
group
">
<label class="
col
-
sm
-
1
control
-
label
">分享ID</label>
<div class="
col
-
sm
-
2
">
<input type="
text
" name="
share_id
" class="
form
-
control
observe
" placeholder="
分享
ID
" required="" value="
[[
shareId
]]
" data-field="
shareId
"
>
<div class="
col
-
sm
-
5
">
<input type="
text
" name="
share_id
" class="
form
-
control
observe
" placeholder="
分享
ID
" required=""
value="
[[
shareId
]]
" data-field="
shareId
" maxlength="
11
">
<p style="
color
:#
999
;
margin
-
top
:
5
px
"
>
注:分享
ID
必须为数字且长度不能超过
11
位
<
/p
>
<
/div
>
<
/div><!-- form-group --
>
</script>
...
...
@@ -62,17 +68,14 @@
<
select
name
=
"goTo"
id
=
"goTo"
class
=
"form-control"
value
=
"[[action]]"
>
[[
layout
action_template
]]
<
/select
>
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
>
跳转地址:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
textarea
rows
=
"2"
id
=
"goToUrl"
class
=
"form-control"
placeholder
=
"跳转地址"
>
[[
url
]]
<
/textarea
>
<
/div
>
<
/div
>
<
/div
>
</script>
...
...
server/views/operations/icon/Index.html
View file @
9d14f20
...
...
@@ -44,8 +44,9 @@
<
label
class
=
"col-sm-2 control-label"
>
名称
<
/label
>
<
div
class
=
"col-sm-10"
>
<
input
type
=
"text"
name
=
"ico_name"
class
=
"form-control observe"
placeholder
=
"名称"
required
value
=
"[[icoName]]"
data
-
field
=
"icoName"
>
value
=
"[[icoName]]"
data
-
field
=
"icoName"
maxlength
=
"20"
>
<
input
type
=
"hidden"
name
=
"id"
class
=
"form-control"
value
=
"[[id]]"
>
<
p
style
=
"color:#999"
>
注:名称不能超过
20
个字符
<
/p
>
<
/div
>
<
/div><!-- form-group --
>
<
div
class
=
"form-group"
>
...
...
server/views/shootMeter/Model/Index.html
View file @
9d14f20
...
...
@@ -33,7 +33,6 @@
</div>
</div>
<div
id=
"content-list"
></div>
<input
type=
"hidden"
id=
"aa"
value=
"{{type}}"
/>
</div>
<script
type=
"text/template"
id=
"template"
>
...
...
server/views/shootMeter/TryModel/Index.html
View file @
9d14f20
...
...
@@ -27,7 +27,6 @@
</div>
</div>
<div
id=
"content-list"
></div>
<input
type=
"hidden"
id=
"aa"
value=
"{{type}}"
/>
</div>
<script
type=
"text/template"
id=
"template"
>
...
...
Please
register
or
login
to post a comment