Authored by weiqingting

bug 修改

@@ -8,9 +8,7 @@ module.exports = function (app) { @@ -8,9 +8,7 @@ module.exports = function (app) {
8 app.get("/shotManage/model/index", "shootMeter.Model.Index",function(){ 8 app.get("/shotManage/model/index", "shootMeter.Model.Index",function(){
9 this.$extend={ 9 this.$extend={
10 moduleName:'拍摄复尺', 10 moduleName:'拍摄复尺',
11 - pageName:'拍摄模特管理',  
12 - type:1,  
13 - typeName:"拍摄模特" 11 + pageName:'拍摄模特管理'
14 } 12 }
15 }); 13 });
16 14
@@ -31,9 +29,7 @@ module.exports = function (app) { @@ -31,9 +29,7 @@ module.exports = function (app) {
31 app.get("/meterManage/tryModel/index", "shootMeter.TryModel.Index",function(){ 29 app.get("/meterManage/tryModel/index", "shootMeter.TryModel.Index",function(){
32 this.$extend={ 30 this.$extend={
33 moduleName:'拍摄复尺', 31 moduleName:'拍摄复尺',
34 - pageName:'试穿模特管理',  
35 - type: 2,  
36 - typeName:'试穿模特管理' 32 + pageName:'试穿模特管理'
37 } 33 }
38 }); 34 });
39 35
@@ -26,7 +26,7 @@ Controller.prototype.__parseReq=function(req){ @@ -26,7 +26,7 @@ Controller.prototype.__parseReq=function(req){
26 } 26 }
27 } 27 }
28 28
29 -Controller.prototype.__define=function(method,router,view,apis,callback,clientmodel){ 29 +Controller.prototype.__define=function(method,router,view,apis,callback,clientmodel,clientsrc){
30 var me=this,isObj=false; 30 var me=this,isObj=false;
31 if(typeof apis=="string"){ 31 if(typeof apis=="string"){
32 apis=[apis]; 32 apis=[apis];
@@ -49,14 +49,14 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo @@ -49,14 +49,14 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo
49 model=callback.apply(local, args); 49 model=callback.apply(local, args);
50 } 50 }
51 if(view){ 51 if(view){
52 - res.render(view,local,me.client(res,view,model,clientmodel)); 52 + res.render(view,local,me.client(res,clientsrc,model,clientmodel));
53 } 53 }
54 54
55 return; 55 return;
56 } 56 }
57 args.push(function (err, interfaces, names){ 57 args.push(function (err, interfaces, names){
58 if (err) { 58 if (err) {
59 - res.json({code:500,message:"接口异常"}); 59 + res.json({code:500,message:err.message||'接口异常'});
60 return; 60 return;
61 } 61 }
62 //callback 62 //callback
@@ -78,7 +78,7 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo @@ -78,7 +78,7 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo
78 if (model&&model.readable) { 78 if (model&&model.readable) {
79 model.pipe(res); 79 model.pipe(res);
80 }else if (view && method == "get" && !req.xhr) { 80 }else if (view && method == "get" && !req.xhr) {
81 - res.render(view, local, me.client(res, view, model,clientmodel)); 81 + res.render(view, local, me.client(res, clientsrc, model,clientmodel));
82 } else { 82 } else {
83 res.json(model); 83 res.json(model);
84 } 84 }
@@ -106,7 +106,7 @@ Controller.prototype.vue=function(router,views,apis,callback){ @@ -106,7 +106,7 @@ Controller.prototype.vue=function(router,views,apis,callback){
106 apis=[]; 106 apis=[];
107 } 107 }
108 apis=apis||[]; 108 apis=apis||[];
109 - me.__define("get",router,views,apis,callback,"vue"); 109 + me.__define("get",router,"common.Vue",apis,callback,"vue",views);
110 } 110 }
111 Controller.prototype.get=function(router,views,apis,callback){ 111 Controller.prototype.get=function(router,views,apis,callback){
112 var me=this; 112 var me=this;
@@ -120,7 +120,7 @@ Controller.prototype.get=function(router,views,apis,callback){ @@ -120,7 +120,7 @@ Controller.prototype.get=function(router,views,apis,callback){
120 apis=[]; 120 apis=[];
121 } 121 }
122 apis=apis||[]; 122 apis=apis||[];
123 - me.__define("get",router,views,apis,callback,"jquery"); 123 + me.__define("get",router,views,apis,callback,"jquery",views);
124 } 124 }
125 Controller.prototype.post=function(router,apis,callback){ 125 Controller.prototype.post=function(router,apis,callback){
126 var me=this; 126 var me=this;
@@ -10,7 +10,13 @@ @@ -10,7 +10,13 @@
10 <li><% pageName %></li> 10 <li><% pageName %></li>
11 </ul> 11 </ul>
12 <div style="margin-top: 4px"> 12 <div style="margin-top: 4px">
13 - <h4 style="line-height: 30px;font-size: 24px"><% pageName %></h4> 13 + <h4 style="line-height: 30px;font-size: 24px">
  14 + <%if subPageName%>
  15 + <%subPageName%>
  16 + <%else%>
  17 + <%pageName%>
  18 + <%/if%>
  19 + </h4>
14 </div> 20 </div>
15 </div> 21 </div>
16 </div> 22 </div>
1 <%include '../../common/__ui/header'%> 1 <%include '../../common/__ui/header'%>
2 <%include '../../common/__partail/ListHeader'%> 2 <%include '../../common/__partail/ListHeader'%>
3 3
4 -<div class="panel panel-default"> 4 +<div class="contentpanel">
  5 + <div class="panel panel-default">
5 <div class="panel-heading"> 6 <div class="panel-heading">
6 <h4 class="panel-title">添加活动模板</h4> 7 <h4 class="panel-title">添加活动模板</h4>
7 </div><!-- panel-heading --> 8 </div><!-- panel-heading -->
8 <div class="panel-body" role="<%type%>" id="wrap-content" data-id="<%id%>" url="<%url%>"> 9 <div class="panel-body" role="<%type%>" id="wrap-content" data-id="<%id%>" url="<%url%>">
9 - <div class="row" id="content-template">  
10 -  
11 - </div><!-- row --> 10 + <div class="row" id="content-template"></div><!-- row -->
12 </div><!-- panel-body --> 11 </div><!-- panel-body -->
13 <div class="panel-footer"> 12 <div class="panel-footer">
14 <div class="row"> 13 <div class="row">
15 <div class="col-sm-9 col-sm-offset-3"> 14 <div class="col-sm-9 col-sm-offset-3">
16 - <a id="save_btn" class="btn btn-primary mr5">保存</a> 15 + <a id="save_btn" class="btn btn-success mr5">保存</a>
17 <a href="/operations/activitytemplate/index" class="btn btn-primary mr5">取消</a> 16 <a href="/operations/activitytemplate/index" class="btn btn-primary mr5">取消</a>
18 </div> 17 </div>
19 18
20 </div> 19 </div>
21 </div><!-- panel-footer --> 20 </div><!-- panel-footer -->
  21 + </div>
22 </div> 22 </div>
23 23
24 <script type="text/template" id="template"> 24 <script type="text/template" id="template">
25 <div class="form-group"> 25 <div class="form-group">
26 <label class="col-sm-1 control-label">模板标题</label> 26 <label class="col-sm-1 control-label">模板标题</label>
27 - <div class="col-sm-4">  
28 - <input type="text" name="title" class="form-control observe" placeholder="模板标题" required="" value="[[title]]" data-field="title"> 27 + <div class="col-sm-5">
  28 + <input type="text" name="title" class="form-control observe" placeholder="模板标题" required=""
  29 + value="[[title]]" data-field="title" maxlength="20">
  30 + <p style="color:#999; margin-top: 5px">注:标题不能超过20个字符</p>
29 </div> 31 </div>
30 </div><!-- form-group --> 32 </div><!-- form-group -->
31 <div class="form-group"> 33 <div class="form-group">
32 <label class="col-sm-1 control-label">上传图片</label> 34 <label class="col-sm-1 control-label">上传图片</label>
33 <div class="col-sm-8"> 35 <div class="col-sm-8">
34 - <input type="text" name="image" id="image" class="form-control observe" placeholder="图片地址" value="[[image]]" data-field="image"> 36 + <input type="text" name="image" id="image" class="form-control observe" placeholder="图片地址" value="[[image]]"
  37 + data-field="image">
35 <input id="uploadBox" name="图片" type="file" style="position: absolute; top: 0;left: 0;z-index: -999"> 38 <input id="uploadBox" name="图片" type="file" style="position: absolute; top: 0;left: 0;z-index: -999">
36 - <div id="chooseFile" class="file-name btn btn-success">请选择文件</div> 39 + <div style="margin: 10px 0 5px" id="chooseFile" class="file-name btn btn-success">请选择文件</div>
37 </div> 40 </div>
38 </div> 41 </div>
39 </div> 42 </div>
40 <div class="form-group"> 43 <div class="form-group">
41 <label class="col-sm-1 control-label">跳转链接</label> 44 <label class="col-sm-1 control-label">跳转链接</label>
42 - <div class="col-sm-9">  
43 - <input type="text" name="url" id="url" class="form-control observe" placeholder="跳转链接" value="[[url.replace(/"/g, "&quot;")]]" data-field="url">  
44 - <button type="button" class="btn btn-info" id="addUrl">添加链接</button> 45 + <div class="col-sm-8">
  46 + <input type="text" name="url" id="url" class="form-control observe" placeholder="跳转链接"
  47 + value="[[url.replace(/"/g, "&quot;")]]" data-field="url">
  48 + <button style="margin: 10px 0" type="button" class="btn btn-info" id="addUrl">添加链接</button>
45 <p style="color:#999">注:链接中不能有英文单引号</p> 49 <p style="color:#999">注:链接中不能有英文单引号</p>
46 </div> 50 </div>
47 </div><!-- form-group --> 51 </div><!-- form-group -->
48 <div class="form-group"> 52 <div class="form-group">
49 <label class="col-sm-1 control-label">分享ID</label> 53 <label class="col-sm-1 control-label">分享ID</label>
50 - <div class="col-sm-2">  
51 - <input type="text" name="share_id" class="form-control observe" placeholder="分享ID" required="" value="[[shareId]]" data-field="shareId"> 54 + <div class="col-sm-5">
  55 + <input type="text" name="share_id" class="form-control observe" placeholder="分享ID" required=""
  56 + value="[[shareId]]" data-field="shareId" maxlength="11">
  57 + <p style="color:#999; margin-top: 5px">注:分享ID必须为数字且长度不能超过11</p>
52 </div> 58 </div>
53 </div><!-- form-group --> 59 </div><!-- form-group -->
54 </script> 60 </script>
@@ -62,17 +68,14 @@ @@ -62,17 +68,14 @@
62 <select name="goTo" id="goTo" class="form-control" value="[[action]]"> 68 <select name="goTo" id="goTo" class="form-control" value="[[action]]">
63 [[layout action_template]] 69 [[layout action_template]]
64 </select> 70 </select>
65 -  
66 </div> 71 </div>
67 </div> 72 </div>
68 73
69 <div class="form-group"> 74 <div class="form-group">
70 <label class="col-sm-2 control-label">跳转地址:</label> 75 <label class="col-sm-2 control-label">跳转地址:</label>
71 -  
72 <div class="col-sm-8"> 76 <div class="col-sm-8">
73 <textarea rows="2" id="goToUrl" class="form-control" placeholder="跳转地址">[[url]]</textarea> 77 <textarea rows="2" id="goToUrl" class="form-control" placeholder="跳转地址">[[url]]</textarea>
74 </div> 78 </div>
75 -  
76 </div> 79 </div>
77 </div> 80 </div>
78 </script> 81 </script>
@@ -44,8 +44,9 @@ @@ -44,8 +44,9 @@
44 <label class="col-sm-2 control-label">名称</label> 44 <label class="col-sm-2 control-label">名称</label>
45 <div class="col-sm-10"> 45 <div class="col-sm-10">
46 <input type="text" name="ico_name" class="form-control observe" placeholder="名称" required 46 <input type="text" name="ico_name" class="form-control observe" placeholder="名称" required
47 - value="[[icoName]]" data-field="icoName"> 47 + value="[[icoName]]" data-field="icoName" maxlength="20">
48 <input type="hidden" name="id" class="form-control" value="[[id]]"> 48 <input type="hidden" name="id" class="form-control" value="[[id]]">
  49 + <p style="color:#999">注:名称不能超过20个字符</p>
49 </div> 50 </div>
50 </div><!-- form-group --> 51 </div><!-- form-group -->
51 <div class="form-group"> 52 <div class="form-group">
@@ -33,7 +33,6 @@ @@ -33,7 +33,6 @@
33 </div> 33 </div>
34 </div> 34 </div>
35 <div id="content-list"></div> 35 <div id="content-list"></div>
36 - <input type="hidden" id="aa" value="{{type}}"/>  
37 </div> 36 </div>
38 37
39 <script type="text/template" id="template"> 38 <script type="text/template" id="template">
@@ -27,7 +27,6 @@ @@ -27,7 +27,6 @@
27 </div> 27 </div>
28 </div> 28 </div>
29 <div id="content-list"></div> 29 <div id="content-list"></div>
30 - <input type="hidden" id="aa" value="{{type}}"/>  
31 </div> 30 </div>
32 31
33 <script type="text/template" id="template"> 32 <script type="text/template" id="template">