Authored by weiqingting

bug 修改

... ... @@ -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:'试穿模特管理'
}
});
... ...
... ... @@ -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];
... ... @@ -49,14 +49,14 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo
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:"接口异常"});
res.json({code:500,message:err.message||'接口异常'});
return;
}
//callback
... ... @@ -78,7 +78,7 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo
if (model&&model.readable) {
model.pipe(res);
}else if (view && method == "get" && !req.xhr) {
res.render(view, local, me.client(res, view, model,clientmodel));
res.render(view, local, me.client(res, clientsrc, model,clientmodel));
} else {
res.json(model);
}
... ... @@ -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;
... ...
... ... @@ -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>
... ...
<%include '../../common/__ui/header'%>
<%include '../../common/__partail/ListHeader'%>
<div class="panel panel-default">
<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 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-primary mr5">保存</a>
<a id="save_btn" class="btn btn-success mr5">保存</a>
<a href="/operations/activitytemplate/index" class="btn btn-primary mr5">取消</a>
</div>
</div>
</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 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 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, "&quot;")]]" 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, "&quot;")]]" data-field="url">
<button style="margin: 10px 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: 5px">注:分享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>
... ...
... ... @@ -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">
... ...
... ... @@ -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">
... ...
... ... @@ -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">
... ...