Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOOD
·
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
microTT
9 years ago
Commit
3200e33a994f92b61f56282f239c0d10c165c03a
1 parent
b1d247f7
在线登记表单缓存
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
2 deletions
res/js/yohood.js
website/view/script/onlinereg/exhibitor.php
res/js/yohood.js
View file @
3200e33
...
...
@@ -1330,6 +1330,74 @@ define('yohood', function(require, exports) {
$
(
this
).
attr
(
'src'
,
src
+
'?1'
);
});
({
key
:
(
function
()
{
var
href
=
location
.
href
.
split
(
"/"
),
index
=
href
.
indexOf
(
"onlinereg"
);
return
href
[
index
+
1
];
}()),
setStroage
:
function
(
data
)
{
var
dataString
=
JSON
.
stringify
(
data
),
href
=
location
.
href
.
split
(
"/"
),
index
=
href
.
indexOf
(
"onlinereg"
);
key
=
href
[
index
+
1
];
window
.
localStorage
.
setItem
(
this
.
key
,
dataString
)
},
getStroage
:
function
(
key
)
{
return
JSON
.
parse
(
window
.
localStorage
.
getItem
(
key
));
},
clearStroage
:
function
(
key
)
{
window
.
localStorage
.
removeItem
(
key
);
},
computedData
:
function
(
data
)
{
var
$form
=
$
(
"form"
),
$elem
=
$form
.
find
(
"input, textarea"
),
key
=
""
,
len
=
0
;
for
(
key
in
data
)
{
if
(
data
.
hasOwnProperty
(
key
))
{
$elem
=
$form
.
find
(
"input[name="
+
key
+
"], textarea[name="
+
key
+
"]"
);
if
(
$elem
.
size
()
>
0
)
{
if
(
$elem
.
attr
(
"type"
)
===
"radio"
)
{
console
.
log
(
$elem
.
parent
(
"div"
).
find
(
"input[value="
+
data
[
key
]
+
"]"
));
$elem
.
parent
(
"div"
).
find
(
"input[value="
+
data
[
key
]
+
"]"
)[
0
].
checked
=
true
;
}
else
{
$elem
.
val
(
data
[
key
]);
}
}
}
}
},
init
:
function
()
{
var
that
=
this
,
data
=
{};
data
=
this
.
getStroage
(
this
.
key
);
this
.
computedData
(
data
);
$
(
"input,textarea"
).
on
(
"keyup"
,
function
()
{
getFormData
(
that
.
setStroage
);
});
$
(
"input[type=radio]"
).
on
(
"change"
,
function
()
{
getFormData
(
that
.
setStroage
);
});
$
(
".content-header a"
).
on
(
"click"
,
function
()
{
that
.
clearStroage
(
that
.
key
);
});
}
}).
init
();
function
getFormData
(
callback
)
{
var
$formBox
;
...
...
@@ -1388,6 +1456,7 @@ define('yohood', function(require, exports) {
code
:
code
,
type
:
type
};
callback
(
resData
);
}
...
...
website/view/script/onlinereg/exhibitor.php
View file @
3200e33
...
...
@@ -16,8 +16,8 @@
<div
class=
"content-sub"
>
<ul>
<li><span>
联系人:
</span><p>
Eva.Gong
</p></li>
<li><span>
邮
<i></i>
箱:
</span><p>
eva.gong@yoho.cn
</p></li>
<li><span>
电
<i></i>
话:
</span><p>
+86 18616740570
</p></li>
<li><span>
邮
<i>
空
</i>
箱:
</span><p>
eva.gong@yoho.cn
</p></li>
<li><span>
电
<i>
空
</i>
话:
</span><p>
+86 18616740570
</p></li>
</ul>
</div>
</div>
...
...
Please
register
or
login
to post a comment