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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletions
public/js/web/design.js
resources/views/web/design.blade.php
public/js/web/design.js
View file @
3f42f449
...
...
@@ -3,9 +3,36 @@ var tag={
hbisAct
:
0
,
//是否画布区域
isClick
:
0
,
init
:
function
(){
if
(
$
(
"#templateid"
).
val
()){
//编辑
tag
.
getInfo
();
}
else
{
//新增
tag
.
editUi
();
}
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
(){
$
(
"body"
).
attr
(
"onselectstart"
,
"return false"
);
// 基本实例化:
...
...
@@ -359,7 +386,10 @@ var tag={
$
(
".edit-con .huabuitem"
).
removeClass
(
"act"
);
$
(
".edit-con"
).
removeClass
(
"init-border"
);
obj
.
htmlp
=
String
(
$
(
".edit-box"
).
html
());
obj
.
designName
=
$
(
".designName"
).
val
()
obj
.
designName
=
$
(
".designName"
).
val
();
if
(
$
(
"#templateid"
).
val
()){
obj
.
t_id
=
$
(
"#templateid"
).
val
()
}
$
.
ajax
({
url
:
'/ajax/add_template'
,
type
:
'post'
,
...
...
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-tools"
>
<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