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 71fbd94b
authored
Mar 09, 2018
by
白杨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网点界面
1 parent
3057d888
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
21 deletions
changeValue.html
dataPage.html
index.html
src/js/imgUp.js
src/js/index.js
src/js/main.js
src/js/saasService.js
changeValue.html
View file @
71fbd94
...
@@ -85,23 +85,38 @@
...
@@ -85,23 +85,38 @@
<script
src=
"src/js/main.js"
></script>
<script
src=
"src/js/main.js"
></script>
<script>
<script>
var
name
=
localStorage
.
getItem
(
'name'
)
var
name
=
localStorage
.
getItem
(
'name'
)
var
phone
=
localStorage
.
getItem
(
'phone'
)
$
(
'.confirm'
).
on
(
'click'
,
function
(
e
)
{
$
(
'.confirm'
).
on
(
'click'
,
function
(
e
)
{
var
value
=
$
(
'input'
).
val
()
var
value
=
$
(
'input'
).
val
()
if
(
!
value
){
if
(
!
value
){
alert
(
'请输入字段!'
);
alert
(
'请输入字段!'
);
return
return
}
}
$
.
ajax
({
// $.ajax({
type
:
"POST"
,
// type: "POST",
url
:
saas
.
customUrl
+
"/point/updatePoint"
,
// url:saas.customUrl + "/point/updatePoint",
data
:{
// data:{
custom_id
:
"{\"fieldName\":\"名称\",\"fieldValue\":\"网点1\"}"
,
// custom_id:"{\"fieldName\":\"手机号\",\"fieldValue\":\""+phone+"\"}",
// infos:"[{\"fieldName\":"+ name +",\"fieldValue\":"+ value +"}]"
// },
// success:function (data) {
// console.log(data)
// }
// })
var
method
=
"/point/updatePoint"
;
var
parameter
=
{
custom_id
:
"{\"fieldName\":\"手机号\",\"fieldValue\":\""
+
phone
+
"\"}"
,
infos
:
"[{\"fieldName\":"
+
name
+
",\"fieldValue\":"
+
value
+
"}]"
infos
:
"[{\"fieldName\":"
+
name
+
",\"fieldValue\":"
+
value
+
"}]"
},
};
success
:
function
(
data
)
{
saas
.
customHttpRequest
(
method
,
parameter
,
function
(
data
)
{
console
.
log
(
data
)
if
(
data
.
code
==
"s001"
){
alert
(
'字段修改成功'
);
}
}
})
},
function
(
error
)
{
});
})
})
$
(
'.back'
).
on
(
'click'
,
function
()
{
$
(
'.back'
).
on
(
'click'
,
function
()
{
window
.
history
.
back
()
window
.
history
.
back
()
...
...
dataPage.html
View file @
71fbd94
...
@@ -163,7 +163,7 @@
...
@@ -163,7 +163,7 @@
"\t\t\t<hr class=\"layui-bg-gray\">"
"\t\t\t<hr class=\"layui-bg-gray\">"
}
}
for
(
var
i
=
0
;
i
<
photo
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
photo
.
length
;
i
++
){
photo
[
i
].
photoPath
=
saas
.
url
+
"/v1/point/getFile?ak=
30bdc45ee00940cda7917d134fdb1523
&filePath="
+
photo
[
i
].
photoPath
photo
[
i
].
photoPath
=
saas
.
url
+
"/v1/point/getFile?ak=
"
+
saas
.
ak
+
"
&filePath="
+
photo
[
i
].
photoPath
strImg
+=
"<img src="
+
photo
[
i
].
photoPath
+
" class=\"item\"/>"
strImg
+=
"<img src="
+
photo
[
i
].
photoPath
+
" class=\"item\"/>"
Imgarr
.
push
({
photoPath
:
photo
[
i
].
photoPath
,
id
:
photo
[
i
].
id
})
Imgarr
.
push
({
photoPath
:
photo
[
i
].
photoPath
,
id
:
photo
[
i
].
id
})
}
}
...
...
index.html
View file @
71fbd94
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
<div
class=
"div-password"
>
<div
class=
"div-password"
>
<label>
请输入手机号:
</label>
<label>
请输入手机号:
</label>
<div
style=
"margin-top: 10px;"
>
<div
style=
"margin-top: 10px;"
>
<input
type=
"text"
>
<input
type=
"text"
id=
"txt_phone"
>
<button
id=
"btn_test"
>
提取
</button>
<button
id=
"btn_test"
>
提取
</button>
</div>
</div>
</div>
</div>
...
...
src/js/imgUp.js
View file @
71fbd94
...
@@ -87,7 +87,7 @@ $(function(){
...
@@ -87,7 +87,7 @@ $(function(){
delParent
.
remove
()
delParent
.
remove
()
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
"http://114.55.43.0:16907/v1/point/deletePhoto?ak=30bdc45ee00940cda7917d134fdb1523
&fileId="
+
delImgId
,
url
:
saas
.
url
+
"/v1/point/deletePhoto?ak="
+
saas
.
ak
+
"
&fileId="
+
delImgId
,
success
:
function
(
msg
){
success
:
function
(
msg
){
console
.
log
(
msg
)
console
.
log
(
msg
)
}
}
...
...
src/js/index.js
View file @
71fbd94
...
@@ -5,7 +5,11 @@ var index = {
...
@@ -5,7 +5,11 @@ var index = {
});
});
},
},
mainReturn
:
function
()
{
mainReturn
:
function
()
{
var
txt
=
$
(
'#txt_phone'
).
val
();
if
(
txt
!=
""
){
localStorage
.
setItem
(
'phone'
,
txt
);
//跳转主界面
//跳转主界面
window
.
location
.
href
=
"main.html"
;
window
.
location
.
href
=
"main.html"
;
}
}
}
}
}
\ No newline at end of file
src/js/main.js
View file @
71fbd94
...
@@ -65,9 +65,10 @@ var main = {
...
@@ -65,9 +65,10 @@ var main = {
// this.getInfoSuccess(11);
// this.getInfoSuccess(11);
},
},
validate
:
function
()
{
validate
:
function
()
{
var
phone
=
localStorage
.
getItem
(
'phone'
);
var
method
=
"/v1/point/search"
;
var
method
=
"/v1/point/search"
;
var
parameter
=
{
var
parameter
=
{
custom_id
:
"{\"fieldName\":\"
名称\",\"fieldValue\":\"网点1
\"}"
custom_id
:
"{\"fieldName\":\"
手机号\",\"fieldValue\":\""
+
phone
+
"
\"}"
};
};
saas
.
saasHttpRequest
(
method
,
parameter
,
this
.
validateSuccess
,
this
.
validateError
);
saas
.
saasHttpRequest
(
method
,
parameter
,
this
.
validateSuccess
,
this
.
validateError
);
},
},
...
@@ -169,15 +170,20 @@ var main = {
...
@@ -169,15 +170,20 @@ var main = {
// main.updatePoint(geometry.x,geometry.y);
// main.updatePoint(geometry.x,geometry.y);
},
},
updatePoint
:
function
(
x
,
y
)
{
updatePoint
:
function
(
x
,
y
)
{
var
phone
=
localStorage
.
getItem
(
'phone'
);
var
method
=
"/point/updatePoint"
;
var
method
=
"/point/updatePoint"
;
var
parameter
=
{
var
parameter
=
{
custom_id
:
"{\"fieldName\":\"
名称\",\"fieldValue\":\"网点1
\"}"
,
custom_id
:
"{\"fieldName\":\"
手机号\",\"fieldValue\":\""
+
phone
+
"
\"}"
,
infos
:
"[{\"fieldName\":\"
名称\",\"fieldValue\":\"网点1
\"}]"
,
infos
:
"[{\"fieldName\":\"
手机号\",\"fieldValue\":\""
+
phone
+
"
\"}]"
,
x
:
x
,
x
:
x
,
y
:
y
,
y
:
y
,
coord_type
:
"gcj02mc"
coord_type
:
"gcj02mc"
};
};
saas
.
customHttpRequest
(
method
,
parameter
,
this
.
getInfoSuccess
,
this
.
getInfoError
);
saas
.
customHttpRequest
(
method
,
parameter
,
function
(
data
)
{
},
function
(
error
)
{
});
}
}
}
}
src/js/saasService.js
View file @
71fbd94
var
saas
=
{
var
saas
=
{
// url: "http://saasapi.dituhui.com",
url
:
"http://saasapi.dituhui.com"
,
url
:
"http://114.55.43.0:16907"
,
// url: "http://114.55.43.0:16907",
customUrl
:
"http://localhost:8080"
,
// customUrl:"http://120.55.114.153:16900",
// ak:"ee824a89bb2b4c7cb74399bf9d5165bc",
customUrl
:
"http://localhost:16900"
,
ak
:
"30bdc45ee00940cda7917d134fdb1523"
,
ak
:
"ee824a89bb2b4c7cb74399bf9d5165bc"
,
// ak:"30bdc45ee00940cda7917d134fdb1523",
saasHttpRequest
:
function
(
method
,
parameter
,
successComplate
,
errorComplate
)
{
saasHttpRequest
:
function
(
method
,
parameter
,
successComplate
,
errorComplate
)
{
if
(
parameter
){
if
(
parameter
){
parameter
.
ak
=
saas
.
ak
;
parameter
.
ak
=
saas
.
ak
;
...
...
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