Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-fe
·
Commits
Go to a project
GitLab
Go to group
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
6dcca6c7d93b01f74177480d604e2773ac17f5a6
1 parent
84e8fd4d
4.4 bug解决
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
95 deletions
client/js/common/drag.js
client/js/common/grid.js
client/js/common/util.js
client/js/guang/contentEdit.js
server/config/common.js
server/config/searchApi.js
server/views/pages/guang/contentEdit.html
client/js/common/drag.js
View file @
6dcca6c
...
...
@@ -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
]);
}
}
...
...
client/js/common/grid.js
View file @
6dcca6c
...
...
@@ -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
,
...
...
client/js/common/util.js
View file @
6dcca6c
...
...
@@ -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
,
...
...
client/js/guang/contentEdit.js
View file @
6dcca6c
...
...
@@ -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"
,
".dragItem
1
"
,
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"
,
".dragItem
1
"
,
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"
,
{
...
...
server/config/common.js
View file @
6dcca6c
...
...
@@ -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.2
10
:8088/platform'
,
domain
:
'http://192.168.102.2
02
: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',//王伟
...
...
server/config/searchApi.js
View file @
6dcca6c
...
...
@@ -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'
}
}
}
};
...
...
server/views/pages/guang/contentEdit.html
View file @
6dcca6c
...
...
@@ -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 dragItem
2"
>
<
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]]"
>
...
...
Please
register
or
login
to post a comment