Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
白杨
/
shrae-app
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 3057d888
authored
Mar 07, 2018
by
lixiaofeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加修改字段
1 parent
929874d9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
262 additions
and
6 deletions
changeValue.html
dataPage.html
src/css/reset.css
src/js/imgUp.js
changeValue.html
0 → 100644
View file @
3057d88
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=750, user-scalable=no,maximum-scale=1.2, minimum-scale=0.3"
>
<title>
修改字段
</title>
<link
rel=
"stylesheet"
href=
"src/css/reset.css"
>
<style>
*
{
margin
:
0
;
padding
:
0
;
}
body
{
background
:
#fff
;
}
.wrap
.title
{
width
:
100%
;
height
:
80px
;
line-height
:
80px
;
text-align
:
center
;
font-size
:
32px
;
position
:
relative
;
}
.wrap
.title
.back
{
display
:
block
;
width
:
34px
;
height
:
30px
;
position
:
absolute
;
top
:
25px
;
left
:
15px
;
background
:
url("src/image/btn_back.png")
no-repeat
0
0
;
-webkit-background-size
:
100%
;
background-size
:
100%
;
-webkit-transform
:
scale
(
0.8
);
-moz-transform
:
scale
(
0.8
);
-ms-transform
:
scale
(
0.8
);
-o-transform
:
scale
(
0.8
);
transform
:
scale
(
0.8
);
}
.wrap
.title
.confirm
{
display
:
block
;
width
:
100px
;
height
:
50px
;
text-align
:
center
;
line-height
:
50px
;
color
:
#fff
;
background
:
#27B1A4
;
font-size
:
24px
;
position
:
absolute
;
top
:
15px
;
right
:
15px
;
}
.wrap
input
{
width
:
92%
;
display
:
block
;
margin
:
0
auto
;
padding
:
10px
0
;
box-sizing
:
border-box
;
border
:
none
;
border-bottom
:
2px
solid
#27B1A4
;
font-size
:
24px
;
}
p
{
font-size
:
28px
;
box-sizing
:
border-box
;
padding
:
0
4%
;
color
:
#c1c1c1
;
margin-top
:
5px
;
}
</style>
</head>
<body>
<div
class=
"wrap"
>
<div
class=
"title"
>
<span
class=
"back"
></span>
修改字段
<span
class=
"confirm"
>
保存
</span>
</div>
<input
type=
"text"
/>
<p>
字段
</p>
</div>
</body>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"
></script>
<script
src=
"src/js/saasService.js"
></script>
<script
src=
"src/js/main.js"
></script>
<script>
var
name
=
localStorage
.
getItem
(
'name'
)
$
(
'.confirm'
).
on
(
'click'
,
function
(
e
)
{
var
value
=
$
(
'input'
).
val
()
if
(
!
value
){
alert
(
'请输入字段!'
);
return
}
$
.
ajax
({
type
:
"POST"
,
url
:
saas
.
customUrl
+
"/point/updatePoint"
,
data
:{
custom_id
:
"{\"fieldName\":\"名称\",\"fieldValue\":\"网点1\"}"
,
infos
:
"[{\"fieldName\":"
+
name
+
",\"fieldValue\":"
+
value
+
"}]"
},
success
:
function
(
data
)
{
console
.
log
(
data
)
}
})
})
$
(
'.back'
).
on
(
'click'
,
function
()
{
window
.
history
.
back
()
})
</script>
</html>
\ No newline at end of file
dataPage.html
View file @
3057d88
...
...
@@ -133,6 +133,7 @@
<!--<hr class="layui-bg-gray"><br>-->
<!--<p style=" margin:5px; text-align:center;"><input type="submit" value="保 存" id="submit"/></p>-->
</form>
<div></div>
</body>
<script
src=
"./src/js/saasService.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"
></script>
...
...
@@ -156,8 +157,8 @@
for
(
var
i
=
0
;
i
<
msg
.
length
;
i
++
){
// console.log(msg[i])
var
num
=
i
+
1
str
+=
"<input type=\"text\" name=\"key0"
+
num
+
"\" class=\"key\" value="
+
(
msg
[
i
].
fieldName
?
msg
[
i
].
fieldName
:
''
)
+
"><br>\n"
+
"\t\t\t<input type=\"text\"
name=\"value0"
+
num
+
"\" class=\"value\"
value="
+
(
msg
[
i
].
fieldValue
?
msg
[
i
].
fieldValue
:
''
)
+
"><br>\n"
+
str
+=
"<input type=\"text\"
readonly
name=\"key0"
+
num
+
"\" class=\"key\" value="
+
(
msg
[
i
].
fieldName
?
msg
[
i
].
fieldName
:
''
)
+
"><br>\n"
+
"\t\t\t<input type=\"text\"
readonly name=\"value0"
+
num
+
"\" class=\"value change\" change='change'
value="
+
(
msg
[
i
].
fieldValue
?
msg
[
i
].
fieldValue
:
''
)
+
"><br>\n"
+
"\t\t\t\n"
+
"\t\t\t<hr class=\"layui-bg-gray\">"
}
...
...
@@ -180,5 +181,18 @@
window
.
location
.
href
=
'./uploadImage.html'
}
})
$
(
'#form'
).
on
(
'click'
,
function
(
e
)
{
// console.log($(e.target).attr('change') == 'change')
if
(
$
(
e
.
target
).
attr
(
'change'
)
==
'change'
){
console
.
log
(
$
(
e
.
target
))
console
.
log
(
$
(
e
.
target
).
attr
(
'name'
).
substring
(
5
))
var
num
=
$
(
e
.
target
).
attr
(
'name'
).
substring
(
5
)
console
.
log
(
$
(
"input[name=key"
+
num
+
"]"
).
val
())
var
name
=
$
(
"input[name=key"
+
num
+
"]"
).
val
()
localStorage
.
setItem
(
'name'
,
name
)
location
.
href
=
'./changeValue.html'
}
})
</script>
</html>
src/css/reset.css
0 → 100644
View file @
3057d88
@charset
"utf-8"
;
*
{
margin
:
0
;
padding
:
0
;
}
article
,
aside
,
details
,
figcaption
,
figure
,
footer
,
header
,
hgroup
,
menu
,
nav
,
section
{
display
:
block
;
}
img
{
border
:
0px
;
}
body
{
/*line-height: 1;*/
-webkit-tap-highlight-color
:
rgba
(
0
,
0
,
0
,
0
);
}
ol
,
ul
{
list-style
:
none
;
}
blockquote
,
q
{
quotes
:
none
;
}
blockquote
:before
,
blockquote
:after
,
q
:before
,
q
:after
{
content
:
''
;
content
:
none
;
}
table
{
border-collapse
:
collapse
;
border-spacing
:
0
;
}
input
[
type
=
"number"
]
{
-moz-appearance
:
textfield
;}
input
::-webkit-outer-spin-button
,
input
::-webkit-inner-spin-button
{
appearance
:
none
;
-moz-appearance
:
none
;
-webkit-appearance
:
none
;
margin
:
0
;
}
.hide
{
display
:
none
!important
;
}
label
{
-webkit-tap-highlight-color
:
rgba
(
0
,
0
,
0
,
0
);
}
i
,
b
{
font-style
:
normal
;
font-weight
:
normal
;
}
button
,
input
{
margin
:
0
;
-webkit-box-sizing
:
border-box
;
-webkit-tap-highlight-color
:
rgba
(
0
,
0
,
0
,
0
);
word-wrap
:
break-word
;
word-break
:
break-all
;
padding
:
0
;
margin
:
0
;
}
button
,
input
,
select
,
textarea
{
outline
:
0
;
}
textarea
,
input
{
resize
:
none
;
outline
:
0
}
button
{
outline
:
none
;
border
:
none
;
background
:
none
;
}
button
,
html
input
[
type
=
button
],
input
[
type
=
submit
]
{
-webkit-appearance
:
none
;
cursor
:
pointer
;
outline
:
none
;
border
:
none
;
}
*
:not
(
input
,
textarea
)
{
-webkit-touch-callout
:
inherit
;
-webkit-user-select
:
auto
}
a
{
text-decoration
:
none
;
-webkit-tap-highlight-color
:
rgba
(
0
,
0
,
0
,
0
);
color
:
#424954
;
cursor
:
pointer
;
}
body
{
width
:
100%
;
font-family
:
Hiragino
Sans
GB
,
Arial
,
Helvetica
,
"微软雅黑"
,
sans-serif
;
font-size
:
16px
;
-webkit-touch-callout
:
inherit
;
/*-webkit-user-select: auto;*/
background
:
#f6f6f6
;
color
:
#424954
;
/*-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;*/
}
dt
,
dd
{
display
:
inline-block
}
img
{
vertical-align
:
middle
;
}
textarea
{
resize
:
none
;
-webkit-appearance
:
none
}
ul
,
ol
,
li
{
list-style
:
none
}
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
font-weight
:
normal
}
a
:hover
{
text-decoration
:
underline
;
}
.left
{
float
:
left
;
}
.right
{
float
:
right
;
}
.boverflow
{
overflow
:
hidden
;
}
src/js/imgUp.js
View file @
3057d88
...
...
@@ -125,11 +125,7 @@ $(function(){
}
return
arrFiles
;
}
})
/**
* 返回上一页
*/
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment