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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
24 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 @@
<script
src=
"src/js/main.js"
></script>
<script>
var
name
=
localStorage
.
getItem
(
'name'
)
var
phone
=
localStorage
.
getItem
(
'phone'
)
$
(
'.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
)
// $.ajax({
// type: "POST",
// url:saas.customUrl + "/point/updatePoint",
// data:{
// 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
+
"}]"
};
saas
.
customHttpRequest
(
method
,
parameter
,
function
(
data
)
{
if
(
data
.
code
==
"s001"
){
alert
(
'字段修改成功'
);
}
})
},
function
(
error
)
{
});
})
$
(
'.back'
).
on
(
'click'
,
function
()
{
window
.
history
.
back
()
...
...
dataPage.html
View file @
71fbd94
...
...
@@ -163,7 +163,7 @@
"\t\t\t<hr class=\"layui-bg-gray\">"
}
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\"/>"
Imgarr
.
push
({
photoPath
:
photo
[
i
].
photoPath
,
id
:
photo
[
i
].
id
})
}
...
...
index.html
View file @
71fbd94
...
...
@@ -78,7 +78,7 @@
<div
class=
"div-password"
>
<label>
请输入手机号:
</label>
<div
style=
"margin-top: 10px;"
>
<input
type=
"text"
>
<input
type=
"text"
id=
"txt_phone"
>
<button
id=
"btn_test"
>
提取
</button>
</div>
</div>
...
...
src/js/imgUp.js
View file @
71fbd94
...
...
@@ -87,7 +87,7 @@ $(function(){
delParent
.
remove
()
$
.
ajax
({
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
){
console
.
log
(
msg
)
}
...
...
src/js/index.js
View file @
71fbd94
...
...
@@ -5,7 +5,11 @@ var index = {
});
},
mainReturn
:
function
()
{
//跳转主界面
window
.
location
.
href
=
"main.html"
;
var
txt
=
$
(
'#txt_phone'
).
val
();
if
(
txt
!=
""
){
localStorage
.
setItem
(
'phone'
,
txt
);
//跳转主界面
window
.
location
.
href
=
"main.html"
;
}
}
}
\ No newline at end of file
src/js/main.js
View file @
71fbd94
...
...
@@ -65,9 +65,10 @@ var main = {
// this.getInfoSuccess(11);
},
validate
:
function
()
{
var
phone
=
localStorage
.
getItem
(
'phone'
);
var
method
=
"/v1/point/search"
;
var
parameter
=
{
custom_id
:
"{\"fieldName\":\"
名称\",\"fieldValue\":\"网点1
\"}"
custom_id
:
"{\"fieldName\":\"
手机号\",\"fieldValue\":\""
+
phone
+
"
\"}"
};
saas
.
saasHttpRequest
(
method
,
parameter
,
this
.
validateSuccess
,
this
.
validateError
);
},
...
...
@@ -169,15 +170,20 @@ var main = {
// main.updatePoint(geometry.x,geometry.y);
},
updatePoint
:
function
(
x
,
y
)
{
var
phone
=
localStorage
.
getItem
(
'phone'
);
var
method
=
"/point/updatePoint"
;
var
parameter
=
{
custom_id
:
"{\"fieldName\":\"
名称\",\"fieldValue\":\"网点1
\"}"
,
infos
:
"[{\"fieldName\":\"
名称\",\"fieldValue\":\"网点1
\"}]"
,
custom_id
:
"{\"fieldName\":\"
手机号\",\"fieldValue\":\""
+
phone
+
"
\"}"
,
infos
:
"[{\"fieldName\":\"
手机号\",\"fieldValue\":\""
+
phone
+
"
\"}]"
,
x
:
x
,
y
:
y
,
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
=
{
// url: "http://saasapi.dituhui.com",
url
:
"http://114.55.43.0:16907"
,
customUrl
:
"http://localhost:8080"
,
// ak:"ee824a89bb2b4c7cb74399bf9d5165bc",
ak
:
"30bdc45ee00940cda7917d134fdb1523"
,
url
:
"http://saasapi.dituhui.com"
,
// url: "http://114.55.43.0:16907",
// customUrl:"http://120.55.114.153:16900",
customUrl
:
"http://localhost:16900"
,
ak
:
"ee824a89bb2b4c7cb74399bf9d5165bc"
,
// ak:"30bdc45ee00940cda7917d134fdb1523",
saasHttpRequest
:
function
(
method
,
parameter
,
successComplate
,
errorComplate
)
{
if
(
parameter
){
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