Authored by weiqingting

... ... @@ -42,7 +42,7 @@ var urlObj = {
'guangGetSort':'/guang/article/getSortList'//逛-分类
};
var minimumResultsForSearch = ["sortbybrand", "getjitSup", "sortsize2"];
var minimumResultsForSearch = ["sortbybrand", "getjitSup", "sortsize2","querySupplier"];
var dropDown = function(option) {
new dropDown.prototype.init(option);
... ...
... ... @@ -23,7 +23,7 @@ var util = {
},
error: function(err) {
if(err.status==200){
location.href="/login";
// location.href="/login";
}
console.log("ajax.ERROR", err);
return false;
... ...
... ... @@ -2,13 +2,14 @@ var $ = require('jquery'),
common = require('../common/common');
var ENUM={};
// common.util.__ajax({
// url:'EnumListRest/getEnumList',
// url:'/guang/article/getEnumList',
// async:false
// },function(res){
// ENUM=res.data;
// });
console.log(ENUM);
$("#panel-body").html(common.util.__template2($("#tempalte1").html(),{}));
$("#panel-body").html(common.util.__template2($("#tempalte1").html(),ENUM));
new common.dropDown({el:"#authorId",ajax:"guangGetAuthorList"});
new common.dropDown({el:"#maxSortId",ajax:"guangGetSort",params:function(){
... ... @@ -18,26 +19,39 @@ new common.dropDown({el:"#minSortId",ajax:"guangGetSort",params:function(){
return {pid:$("#maxSortId").val()};
}});
var g=new common.gird({
el:"grid",
var g= new common.grid({
el:"#gird",
columns:[
{display:"选择","type":"checkbox"},
{display:"标签名",name:"tagName"}
{display:"选择","type":"checkbox"},
{display:"标签名",name:"tagName"}
]
});
var Url={},Urls=[];
$(document).on("click","#addUrl",function(){
common.dialog.confirm("添加链接",common.util.__template2($("#template2").html(),{}),function(){
Url[$("#goTo").val()]=$("#goToUrl").val();
//todo
Urls=[];
for(var i in Url){
Urls.push({url:i,text:Url[i]});
}
$("#url").val(JSON.stringify(Urls));
});
});
$(document).on("click","#TagsSelectBtn",function(){
common.dialog.confirm("选择标签","<div id='gird'></div>",function(){
$("#taglist").html(common.util.__template2($("#template4").html(),{tags:g.selected}));
});
g.init('/guang/tags/getList');
});
$(document).on("click",".tag a",function(){
var index=$(this).data("index");
g.selected.splice(index,1);
$("#taglist").html(common.util.__template2($("#template4").html(),{tags:g.selected}));
return false;
});
var e=new common.edit("#panel-body",{});
e.init();
... ...
... ... @@ -19,10 +19,9 @@ var config = {
//http://172.16.6.124:8088/platform/product/queryAllProductAttr
//domain: 'http://172.16.6.146:8088/platform', //玛丽
// domain: 'http://192.168.102.202:8088/platform',
//domain:'http://172.16.6.197:8080/yohobuy-platform-web',//葛超
// domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超
// domain: 'http://192.168.102.202:8088/platform',
// domain: 'http://192.168.102.202:8088/platform',
//domain:'http://172.16.9.8:8080/yohobuy-platform-web',//葛超
domain: 'http://192.168.102.202:8088/platform',
//domain: 'http://172.16.6.239:8080', //孙杰翔
loggers: {
... ...
... ... @@ -547,7 +547,7 @@ exports.res = [{ //基础商品列表
name: "barCode",
type: "String"
}]
},{
}, {
route:'/ajax/queryBatchImportResult',
method:'POST',
url:'/product/queryBatchImportResult',
... ...
... ... @@ -145,7 +145,7 @@ exports.res = [
method:'POST',
url:'/guang/article/getSortList',
params:[
{name:"pid",type:"Number"}
{name:"pid",type:"String"}
]
}
... ...
... ... @@ -530,7 +530,7 @@ exports.res = [
{
route:'/guang/article/getEnumList',
method:'POST',
url:'EnumListRest/getEnumList'
url:'/EnumListRest/getEnumList'
},
{
route:'/guang/tags/getList',
... ...
... ... @@ -165,7 +165,7 @@
<label class="col-sm-2 control-label">选择标签:</label>
<div class="col-sm-6">
<div id="taglist" class="tagwrap">
<span class="tag"><span>街头&nbsp;&nbsp;</span><a href="#" title="Removing tag">x</a></span>
</div>
</div>
<div class="col-sm-1">
... ... @@ -180,7 +180,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">选择跳转目的地:</label>
<div class="col-sm-8">
<select name="goTo" class="form-control">
<select name="goTo" id="goTo" class="form-control">
<option value="">选择跳转目的</option>
<option value="brand">品牌列表页</option>
<option value="productDetail">商品详情页</option>
... ... @@ -218,7 +218,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">跳转地址:</label>
<div class="col-sm-8">
<textarea rows="2" id="articleSummary" class="form-control" placeholder="文章摘要" ></textarea>
<textarea rows="2" id="goToUrl" class="form-control" placeholder="跳转地址" ></textarea>
</div>
</div>
... ... @@ -238,4 +238,10 @@
</li>
[[/each]]
</script>
<script type="text/template" id="template4">
[[each tags as tag __index]]
<span class="tag"><span>[[tag.tagName]]</span><a href="#" title="Removing tag" data-index='[[__index]]'>x</a></span>
[[/each]]
</script>
\ No newline at end of file
... ...