Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
note-library
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3f42f449
authored
May 12, 2020
by
肖康
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
x
parent
15e7e49c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
23 deletions
public/js/web/design.js
resources/views/web/design.blade.php
public/js/web/design.js
View file @
3f42f449
...
@@ -3,13 +3,40 @@ var tag={
...
@@ -3,13 +3,40 @@ var tag={
hbisAct
:
0
,
//是否画布区域
hbisAct
:
0
,
//是否画布区域
isClick
:
0
,
isClick
:
0
,
init
:
function
(){
init
:
function
(){
tag
.
editUi
();
if
(
$
(
"#templateid"
).
val
()){
//编辑
tag
.
getInfo
();
}
else
{
//新增
tag
.
editUi
();
}
tag
.
handle
();
tag
.
handle
();
},
},
getInfo
:
function
(){
$
.
ajax
({
url
:
'/ajax/getTemplateDetail?t_id='
+
$
(
"#templateid"
).
val
(),
type
:
'get'
,
success
:
function
(
resp
)
{
if
(
resp
.
err_code
==
0
)
{
$
(
".designName"
).
val
(
resp
.
data
.
template_name
)
var
abobj
=
eval
(
'('
+
resp
.
data
.
template_extend
.
attribute
+
')'
);
$
(
".tag-border"
).
val
(
abobj
.
lableBorder
);
$
(
".tag-bgm"
).
val
(
abobj
.
lableBg
);
$
(
".tag-size"
).
val
(
abobj
.
lableSize
);
$
(
".edit-box"
).
html
(
resp
.
data
.
template_extend
.
html
);
tag
.
editUi
();
}
},
error
:
function
(
err
)
{
console
.
log
(
err
)
}
})
},
editUi
:
function
(){
editUi
:
function
(){
$
(
"body"
).
attr
(
"onselectstart"
,
"return false"
);
$
(
"body"
).
attr
(
"onselectstart"
,
"return false"
);
// 基本实例化:
// 基本实例化:
$
(
'#colorpicker'
).
colorpicker
();
$
(
'#colorpicker'
).
colorpicker
();
//编辑画布渲染样式
//编辑画布渲染样式
var
gezilist
=
$
(
".tag-size"
).
val
().
split
(
"*"
);
var
gezilist
=
$
(
".tag-size"
).
val
().
split
(
"*"
);
...
@@ -359,27 +386,30 @@ var tag={
...
@@ -359,27 +386,30 @@ var tag={
$
(
".edit-con .huabuitem"
).
removeClass
(
"act"
);
$
(
".edit-con .huabuitem"
).
removeClass
(
"act"
);
$
(
".edit-con"
).
removeClass
(
"init-border"
);
$
(
".edit-con"
).
removeClass
(
"init-border"
);
obj
.
htmlp
=
String
(
$
(
".edit-box"
).
html
());
obj
.
htmlp
=
String
(
$
(
".edit-box"
).
html
());
obj
.
designName
=
$
(
".designName"
).
val
()
obj
.
designName
=
$
(
".designName"
).
val
();
$
.
ajax
({
if
(
$
(
"#templateid"
).
val
()){
url
:
'/ajax/add_template'
,
obj
.
t_id
=
$
(
"#templateid"
).
val
()
type
:
'post'
,
}
data
:
obj
,
$
.
ajax
({
success
:
function
(
resp
)
{
url
:
'/ajax/add_template'
,
if
(
resp
.
err_code
==
0
)
{
type
:
'post'
,
layer
.
msg
(
"提交成功"
,{
time
:
2000
});
data
:
obj
,
setTimeout
(
function
(){
success
:
function
(
resp
)
{
window
.
location
.
href
=
"/web/labelList"
if
(
resp
.
err_code
==
0
)
{
},
2000
)
layer
.
msg
(
"提交成功"
,{
time
:
2000
});
setTimeout
(
function
(){
}
else
{
window
.
location
.
href
=
"/web/labelList"
layer
.
msg
(
resp
.
err_msg
,{
time
:
2000
});
},
2000
)
tag
.
editUi
();
}
else
{
layer
.
msg
(
resp
.
err_msg
,{
time
:
2000
});
tag
.
editUi
();
}
},
error
:
function
(
err
)
{
console
.
log
(
err
)
}
}
},
})
error
:
function
(
err
)
{
console
.
log
(
err
)
}
})
})
})
...
...
resources/views/web/design.blade.php
View file @
3f42f449
<input
type=
"hidden"
id=
"templateid"
value=
'{{Request::input("t_id")}}'
/>
<div
class=
"tag-content"
>
<div
class=
"tag-content"
>
<div
class=
"tag-tools"
>
<div
class=
"tag-tools"
>
<div
class=
"tips"
>
请拖动此处标签制作工具到下方编辑区域编辑!
</div>
<div
class=
"tips"
>
请拖动此处标签制作工具到下方编辑区域编辑!
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment