Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-fe2
·
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
xuhongyun
8 years ago
Commit
6dad1e543f7f8860881127f19399536de020ddfb
1 parent
145b5044
build
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
215 additions
and
91 deletions
dist/yohobuy-portal-fe/5.0.2/jquery/brand.decorate.Edit.js
dist/yohobuy-portal-fe/5.0.2/jquery/goods.netsale.Edit.js
dist/yohobuy-portal-fe/5.0.2/jquery/shop.Edit.js
server/controllers/brand.brand.js
server/interfaces/brand.brand.js
dist/yohobuy-portal-fe/5.0.2/jquery/brand.decorate.Edit.js
View file @
6dad1e5
...
...
@@ -34,30 +34,54 @@ webpackJsonp([20],{
e
.
init
();
$
(
document
).
on
(
'click'
,
'#save_branddecorate'
,
function
()
{
e
.
submit
(
$
(
"#basicForm"
).
attr
(
"action"
),
function
(
option
)
{
option
.
data
.
brandIntro
=
UMdescriptioner
.
getContent
();
var
isShipping
=
$
(
"input[type='checkbox'][name='isShipping']"
);
if
(
isShipping
.
is
(
':checked'
)){
option
.
data
.
isShipping
=
1
;
}
else
{
option
.
data
.
isShipping
=
0
;
}
option
.
success
=
function
(
res
)
{
if
(
res
.
code
==
"200"
)
{
e
.
$tip
(
"提交成功"
,
function
()
{
location
.
href
=
"/erpproduct/brands/decorate/index"
},
'growl-success'
);
}
else
{
e
.
$tip
(
res
.
message
);
var
params
=
{
brandIntro
:
UMdescriptioner
.
getContent
()
}
common
.
util
.
__ajax
(
{
url
:
'/sensitiveWord/validate'
,
data
:
{
"validateContent"
:
JSON
.
stringify
(
params
)
}
return
false
;
};
option
.
error
=
function
(
res
)
{
e
.
$tip
(
res
.
message
);
};
console
.
log
(
option
.
data
);
});
},
function
(
rs
)
{
var
tipText
=
""
;
if
(
rs
.
data
)
{
var
jsonMain
=
rs
.
data
;
if
(
!
$
.
isEmptyObject
(
jsonMain
.
brandIntro
)){
tipText
=
"品牌介绍包含违禁词:"
+
jsonMain
.
brandIntro
+
"!"
;
}
}
common
.
dialog
.
confirm
(
"温馨提示"
,
tipText
+
"确定提交吗?"
,
function
(){
e
.
submit
(
$
(
"#basicForm"
).
attr
(
"action"
),
function
(
option
)
{
option
.
data
.
brandIntro
=
UMdescriptioner
.
getContent
();
var
isShipping
=
$
(
"input[type='checkbox'][name='isShipping']"
);
if
(
isShipping
.
is
(
':checked'
)){
option
.
data
.
isShipping
=
1
;
}
else
{
option
.
data
.
isShipping
=
0
;
}
option
.
success
=
function
(
res
)
{
if
(
res
.
code
==
"200"
)
{
e
.
$tip
(
"提交成功"
,
function
()
{
location
.
href
=
"/erpproduct/brands/decorate/index"
},
'growl-success'
);
}
else
{
e
.
$tip
(
res
.
message
);
}
return
false
;
};
option
.
error
=
function
(
res
)
{
e
.
$tip
(
res
.
message
);
};
console
.
log
(
option
.
data
);
});
});
},
true
);
return
false
;
});
...
...
dist/yohobuy-portal-fe/5.0.2/jquery/goods.netsale.Edit.js
View file @
6dad1e5
...
...
@@ -13461,27 +13461,51 @@ webpackJsonp([46],{
return
;
}
common
.
util
.
__ajax
({
url
:
'/goods/product/saveNetSaleBaseInfo'
,
data
:{
productSkn
:
basicInfo
.
productSkn
,
productName
:
common
.
util
.
__input
(
'productName'
),
isNew
:
common
.
util
.
__input
(
'[name=isNew]:checked'
),
sellChannels
:
common
.
util
.
__input
(
'[name=sellChannels]:checked'
),
phrase
:
phraseValue
,
outSaleTime
:
common
.
util
.
__input
(
'outSaleTime'
),
shopIds
:
common
.
util
.
__input
(
'[name=shopIds]:checked'
),
delayArrivalNotice
:
common
.
util
.
__input
(
'delayArrivalNotice'
),
grade
:
common
.
util
.
__input
(
'grade'
)
||
0
,
isLimited
:
common
.
util
.
__input
(
'isLimited'
)
||
'N'
,
isOutlets
:
common
.
util
.
__input
(
'isOutLets2'
)
||
'N'
,
seasons
:
common
.
util
.
__input
(
'seasons'
)
}
})
if
(
common
.
util
.
__sknOperateLog
(
basicInfo
.
productSkn
,
common
.
util
.
__input
(
'phrase'
),
oldphrase
,
6
))
{
oldphrase
=
common
.
util
.
__input
(
'phrase'
);
}
var
params
=
{
phrase
:
phraseValue
}
common
.
util
.
__ajax
(
{
url
:
'/sensitiveWord/validate'
,
data
:
{
"validateContent"
:
JSON
.
stringify
(
params
)
}
},
function
(
rs
)
{
var
tipText
=
""
;
if
(
rs
.
data
)
{
var
jsonMain
=
rs
.
data
;
if
(
!
$
.
isEmptyObject
(
jsonMain
.
phrase
)){
tipText
=
"推荐短语包含违禁词:"
+
jsonMain
.
phrase
+
"!"
;
}
}
common
.
dialog
.
confirm
(
"温馨提示"
,
tipText
+
"确定提交吗?"
,
function
(){
common
.
util
.
__ajax
({
url
:
'/goods/product/saveNetSaleBaseInfo'
,
data
:{
productSkn
:
basicInfo
.
productSkn
,
productName
:
common
.
util
.
__input
(
'productName'
),
isNew
:
common
.
util
.
__input
(
'[name=isNew]:checked'
),
sellChannels
:
common
.
util
.
__input
(
'[name=sellChannels]:checked'
),
phrase
:
phraseValue
,
outSaleTime
:
common
.
util
.
__input
(
'outSaleTime'
),
shopIds
:
common
.
util
.
__input
(
'[name=shopIds]:checked'
),
delayArrivalNotice
:
common
.
util
.
__input
(
'delayArrivalNotice'
),
grade
:
common
.
util
.
__input
(
'grade'
)
||
0
,
isLimited
:
common
.
util
.
__input
(
'isLimited'
)
||
'N'
,
isOutlets
:
common
.
util
.
__input
(
'isOutLets2'
)
||
'N'
,
seasons
:
common
.
util
.
__input
(
'seasons'
)
}
})
if
(
common
.
util
.
__sknOperateLog
(
basicInfo
.
productSkn
,
common
.
util
.
__input
(
'phrase'
),
oldphrase
,
6
))
{
oldphrase
=
common
.
util
.
__input
(
'phrase'
);
}
});
},
true
);
})
// var e = new common.edit('#basicInfoWrap');
// e.init();
...
...
@@ -13558,13 +13582,35 @@ webpackJsonp([46],{
var
content
=
UMdescriptioner
.
getContent
();
var
reg2
=
new
RegExp
(
"\\?imageView2/0/q/75"
,
"g"
);
content
=
content
.
replace
(
reg2
,
''
);
common
.
util
.
__ajax
({
url
:
'/product/saveProductDesc'
,
data
:{
productSkn
:
productSkn
,
productDesc
:
content
}
});
var
params
=
{
content
:
content
}
common
.
util
.
__ajax
(
{
url
:
'/sensitiveWord/validate'
,
data
:
{
"validateContent"
:
JSON
.
stringify
(
params
)
}
},
function
(
rs
)
{
var
tipText
=
""
;
if
(
rs
.
data
)
{
var
jsonMain
=
rs
.
data
;
if
(
!
$
.
isEmptyObject
(
jsonMain
.
content
)){
tipText
=
"商品描述包含违禁词:"
+
jsonMain
.
content
+
"!"
;
}
}
common
.
dialog
.
confirm
(
"温馨提示"
,
tipText
+
"确定提交吗?"
,
function
(){
common
.
util
.
__ajax
({
url
:
'/product/saveProductDesc'
,
data
:{
productSkn
:
productSkn
,
productDesc
:
content
}
});
});
},
true
);
});
...
...
@@ -14544,17 +14590,40 @@ webpackJsonp([46],{
return
attributeArr
;
}
$
(
'#saveAddInfo'
).
on
(
'click'
,
function
()
{
common
.
util
.
__ajax
({
url
:
'/goods/product/saveAfterSaleInfo'
,
data
:{
productSkn
:
basicInfo
.
productSkn
,
makeCrafts
:
common
.
util
.
__input
(
'makeCrafts'
),
salesPhrase
:
common
.
util
.
__input
(
'salesPhrase'
),
isHostsell
:
common
.
util
.
__input
(
'[name=isHostsell]:checked'
),
wearSense
:
sense
(),
attributeProValuesTwo
:
JSON
.
stringify
(
attributeObj
())
}
});
var
params
=
{
salesPhrase
:
common
.
util
.
__input
(
'salesPhrase'
)
}
common
.
util
.
__ajax
(
{
url
:
'/sensitiveWord/validate'
,
data
:
{
"validateContent"
:
JSON
.
stringify
(
params
)
}
},
function
(
rs
)
{
var
tipText
=
""
;
if
(
rs
.
data
)
{
var
jsonMain
=
rs
.
data
;
if
(
!
$
.
isEmptyObject
(
jsonMain
.
salesPhrase
)){
tipText
=
"促销短语包含违禁词:"
+
jsonMain
.
salesPhrase
+
"!"
;
}
}
common
.
dialog
.
confirm
(
"温馨提示"
,
tipText
+
"确定提交吗?"
,
function
(){
common
.
util
.
__ajax
({
url
:
'/goods/product/saveAfterSaleInfo'
,
data
:{
productSkn
:
basicInfo
.
productSkn
,
makeCrafts
:
common
.
util
.
__input
(
'makeCrafts'
),
salesPhrase
:
common
.
util
.
__input
(
'salesPhrase'
),
isHostsell
:
common
.
util
.
__input
(
'[name=isHostsell]:checked'
),
wearSense
:
sense
(),
attributeProValuesTwo
:
JSON
.
stringify
(
attributeObj
())
}
});
});
},
true
);
});
//去编辑商品名称
...
...
dist/yohobuy-portal-fe/5.0.2/jquery/shop.Edit.js
View file @
6dad1e5
...
...
@@ -294,36 +294,57 @@ webpackJsonp([161],{
e
.
init
();
var
submit
=
function
(
callback
){
var
result
=
e
.
submit
(
$
(
"#storeForm"
).
attr
(
"action"
),
function
(
option
){
option
.
data
=
$
.
extend
({},
option
.
data
,
_arr
);
option
.
data
.
shopIntro
=
UMshopintro
.
getContent
();
console
.
log
(
option
.
data
);
option
.
success
=
function
(
res
){
if
(
res
.
code
==
"200"
){
e
.
$tip
(
'提交成功'
,
function
(){
//location.href="/supplier/store/index";
history
.
go
(
-
1
);
},
'growl-success'
);
}
else
{
e
.
$tip
(
res
.
message
);
$
(
".btn-cun"
).
removeAttr
(
"disabled"
);
$
(
".btn-success"
).
removeAttr
(
"disabled"
);
}
return
false
;
},
option
.
error
=
function
(
res
){
e
.
$tip
(
"提交失败"
);
$
(
".btn-cun"
).
removeAttr
(
"disabled"
);
$
(
".btn-success"
).
removeAttr
(
"disabled"
);
}
callback
&&
callback
(
option
.
data
);
});
// 发生校验错误
if
(
result
===
false
)
{
$
(
".btn-cun"
).
removeAttr
(
"disabled"
);
$
(
".btn-success"
).
removeAttr
(
"disabled"
);
var
params
=
{
shopIntro
:
UMshopintro
.
getContent
()
}
common
.
util
.
__ajax
(
{
url
:
'/sensitiveWord/validate'
,
data
:
{
"validateContent"
:
JSON
.
stringify
(
params
)
}
},
function
(
rs
)
{
var
tipText
=
""
;
if
(
rs
.
data
)
{
var
jsonMain
=
rs
.
data
;
if
(
!
$
.
isEmptyObject
(
jsonMain
.
shopIntro
)){
tipText
=
"店铺简介包含违禁词:"
+
jsonMain
.
shopIntro
+
"!"
;
}
}
common
.
dialog
.
confirm
(
"温馨提示"
,
tipText
+
"确定提交吗?"
,
function
(){
var
result
=
e
.
submit
(
$
(
"#storeForm"
).
attr
(
"action"
),
function
(
option
){
option
.
data
=
$
.
extend
({},
option
.
data
,
_arr
);
option
.
data
.
shopIntro
=
UMshopintro
.
getContent
();
console
.
log
(
option
.
data
);
option
.
success
=
function
(
res
){
if
(
res
.
code
==
"200"
){
e
.
$tip
(
'提交成功'
,
function
(){
//location.href="/supplier/store/index";
history
.
go
(
-
1
);
},
'growl-success'
);
}
else
{
e
.
$tip
(
res
.
message
);
$
(
".btn-cun"
).
removeAttr
(
"disabled"
);
$
(
".btn-success"
).
removeAttr
(
"disabled"
);
}
return
false
;
},
option
.
error
=
function
(
res
){
e
.
$tip
(
"提交失败"
);
$
(
".btn-cun"
).
removeAttr
(
"disabled"
);
$
(
".btn-success"
).
removeAttr
(
"disabled"
);
}
callback
&&
callback
(
option
.
data
);
});
// 发生校验错误
if
(
result
===
false
)
{
$
(
".btn-cun"
).
removeAttr
(
"disabled"
);
$
(
".btn-success"
).
removeAttr
(
"disabled"
);
}
});
},
true
);
};
//提交
...
...
server/controllers/brand.brand.js
View file @
6dad1e5
...
...
@@ -78,4 +78,6 @@ module.exports = function (app){
app
.
post
(
"/brandImage/detail"
,
"brandImage_detail"
);
//修改
app
.
post
(
"/brandImage/update"
,
"brandImage_update"
);
app
.
post
(
"/sensitiveWord/validate"
,
"brand_validateSensitiveWord"
);
}
...
...
server/interfaces/brand.brand.js
View file @
6dad1e5
...
...
@@ -117,6 +117,14 @@ module.exports={
{
name
:
'isShipping'
,
type
:
'string'
},
{
name
:
'offlineBrandIco'
,
type
:
'string'
}
]
},
validateSensitiveWord
:
{
title
:
"品牌装修-验证违禁词"
,
url
:
"/sensitiveWord/validate"
,
params
:[
{
name
:
'validateContent'
,
type
:
'string'
}
]
}
}
}
...
...
Please
register
or
login
to post a comment