Authored by weiqingting

4.4 bug解决

... ... @@ -25,7 +25,8 @@ drag.prototype = {
this.dragItemList[i].index = i;
}
for(var i=0; i<this.dragItemList.length; i++){
$(this.dragItemList[i]).css("position", "absolute").css("margin", 0).css("width","100%");
var w=$(this.dragItemList[i]).css("width")||"100%";
$(this.dragItemList[i]).css("position", "absolute").css("margin", 0).css("width",w);
this.setDrag(this.dragItemList[i]);
}
}
... ...
... ... @@ -214,6 +214,11 @@ grid.prototype = {
var g = this,
p = this.options;
var timeid;
if(p.url.indexOf('?')==-1){
p.url+="?";
}
p.url+="_datetime_="+Date.now();
var ajaxOptions = {
type: 'POST',
url: p.url,
... ...
... ... @@ -5,6 +5,10 @@ var util = {
util.__tip(options.data, "warning");
return false;
} else {
if(options.url.indexOf('?')==-1){
options.url+="?";
}
options.url+="_datetime_="+Date.now();
$.ajax({
type: options.type || 'POST',
url: options.url,
... ...
... ... @@ -352,16 +352,18 @@ $(document).on("dblclick", "#add-content>li.custom-group", function () {
$(this).find(".edit").click();
});
//拖拽
$(document).on("mouseover", ".dragItem", function () {
$(document).on("mouseover", ".dragItem1", function () {
var drag = new common.drag("#add-content", Bll.contentDatas, function (data) {
Bll.contentDatas = data;
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
});
drag.Initialize();
});
$(document).on("mouseleave", ".dragItem", function () {
$(document).on("mouseleave", ".dragItem1", function () {
new common.drag("#add-content").destroy();
});
/******************************************标签部分**********************************/
/**
* 标签列表
... ... @@ -691,6 +693,36 @@ $(document).on("click", ".removepic", function () {
datas: isg ? Bll.module.contentData.data[i].list : Bll.module.contentData.data
}));
});
//拖拽商品
$(document).on("mouseover", ".dragItem2", function () {
var $parent = $(this).parents("ul.imagegroup");
var i = $parent.data("i");//组标志
var isg = typeof(i) === "number" ? true : false;
var __data__=null;
if (isg) {
__data__=Bll.module.contentData.data[i].list;
}else{
__data__=Bll.module.contentData.data;
}
var drag = new common.drag(".imagegroup", __data__, function (data) {
if (isg) {
Bll.module.contentData.data[i].list=data;
Bll.module.contentData.data[i].cover.cover = Bll.module.contentData.data[i].list[0].src;
Bll.module.contentData.data[i].cover.maxSortId = Bll.module.contentData.data[i].list[0].maxSortId;
}else{
Bll.module.contentData.data=data;
}
$parent.html(common.util.__template2($("#template_dialog_goodsimgs").html(), {
datas: data
}));
});
drag.Initialize();
});
$(document).on("mouseleave", ".dragItem2", function () {
new common.drag(".imagegroup").destroy();
});
/******************************************其余界面部分**********************************/
var e = new common.edit("#panel-body", {
... ...
... ... @@ -22,7 +22,7 @@ var config = {
//domain: 'http://172.16.6.146:8088/platform', //玛丽
//domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超
// domain: 'http://192.168.102.216:8086/platform',
domain: 'http://192.168.102.210:8088/platform',
domain: 'http://192.168.102.202:8088/platform',
//domain: 'http://172.16.6.146:8088/platform',
//domain:'http://172.16.6.120:8088/platform',//曹艳
//domain:'http://172.16.6.231:8080/platform',//王伟
... ...
... ... @@ -10,102 +10,16 @@ var util = require('../util/common');
*/
var config = {
'development': {
redis: null,
apiKey: 'sd4H1ecAqlp',
//domain:'http://172.16.6.140:8088/platform', // Object
//domain: 'http://172.16.6.236:8088/platform',// 钱军
// domain:'http://172.16.6.176:8088/platform',// 王书生
// domain:'http://172.16.6.141:9090/',// 赵琪
// domain: 'http://172.16.6.214:8088/platform',//陈超
//http://172.16.6.124:8088/platform/product/queryAllProductAttr
//domain: 'http://172.16.6.146:8088/platform', //玛丽
//domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超
// domain: 'http://192.168.102.216:8086/platform',
domain: 'http://192.168.102.202:8088/platform',
//domain:'http://172.16.6.120:8088/platform',//曹艳
//domain:'http://172.16.6.231:8080/platform',//王伟
//domain: 'http://172.16.6.239:8080', //孙杰翔
//domain:'http://172.16.6.189:8088/platform', //李健1
//domain:'http://192.168.102.216:8180/platform', //李健2
//domain: 'http://172.16.6.243:8088/platform', //谭玲
//domain: 'http://172.16.6.108:8088/platform', //谭玲
//domain: 'http://172.16.6.204:8088/platform', //陆斌斌
yohoSearch: 'http://192.168.102.216:8087/yohosearch',
loggers: {
api: {
level: 'verbose'
},
yo: {
level: 'verbose'
},
app: {
level: 'verbose'
}
}
yohoSearch: 'http://192.168.102.216:8080/yohosearch',
},
'test': {
redis: {
port: 6379,
host: 'localhost'
},
apiKey: 'sd4H1ecAqlp',
domain: 'http://192.168.102.202:8088/platform',
yohoSearch: 'http://192.168.102.216:8087/yohosearch',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
api: {
level: 'verbose'
},
yo: {
level: 'verbose'
},
app: {
level: 'verbose'
}
}
},
'preview': {
redis: {
port: 6379,
host: '192.168.74.17'
},
apiKey: 'sd4H1ecAqlp',
domain: 'http://192.168.102.202:8081/platform',
yohoSearch: 'http://192.168.102.216:8087/yohosearch',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
api: {
level: 'info'
},
yo: {
level: 'info'
},
app: {
level: 'info'
}
}
},
'production': {
redis: {
port: 16379,
host: 'localhost'
},
apiKey: 'sd4H1ecAqlp',
domain: 'http://192.168.81.6:8189/yoho-admin-portal',
yohoSearch: 'http://search.yohoops.org/yohosearch',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
api: {
level: 'warn'
},
yo: {
level: 'warn'
},
app: {
level: 'warn'
}
}
}
};
... ...
... ... @@ -293,7 +293,7 @@
<!--文章内容--内容-->
<script type="text/template" id="template_content">
[[each modules as module index]]
<li class="form-group custom-group dragItem" data-index="[[index]]" style="width: 100%">
<li class="form-group custom-group dragItem dragItem1" data-index="[[index]]" style="width: 100%">
[[if module.contentData.template_name=='text']]
<div class="col-sm-12"><h3>[[module.contentData.data.text]]</h3></div>
[[else if module.contentData.template_name=='singleImage']]
... ... @@ -429,7 +429,7 @@
<div class="col-sm-12">
<ul class="cover-image-list col-sm-10 imagegroup" id="goodspic">
[[each contentData.data as item index]]
<li class="cover-image-item image-list" data-index="2">
<li class="cover-image-item image-list dragItem dragItem2" >
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[item.src]]">
... ... @@ -453,7 +453,7 @@
<script type="text/template" id="template_dialog_goodsimgs">
[[each datas as data index]]
<li class="cover-image-item image-list" data-index="2">
<li class="cover-image-item image-list dragItem dragItem2">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[data.src]]">
... ... @@ -522,7 +522,7 @@
<div class="col-sm-10">
<ul class="cover-image-list col-sm-10 imagegroup" data-i="[[i]]">
[[each items.list as item index]]
<li class="cover-image-item image-list" data-index="2">
<li class="cover-image-item image-list dragItem dragItem2" data-index="2">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[item.src]]">
... ...