Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xugong
hls-xcmg-vue-app
Commits
af97a0ce
Commit
af97a0ce
authored
Oct 12, 2019
by
786817560
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'提交代码'
parent
9baa1b7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
index.html
index.html
+3
-0
home-page.vue
src/pages/home/home-page.vue
+23
-6
No files found.
index.html
View file @
af97a0ce
<!DOCTYPE html>
<html>
<head>
...
...
@@ -13,6 +14,8 @@
<script
type=
"text/javascript"
src=
"./static/vuePlatform.js"
></script>
<script
type=
"text/javascript"
src=
"./static/prototype.js"
></script>
<script
type=
"text/javascript"
src=
"cordova.js"
></script>
<!-- 定位 -->
<script
type=
"text/javascript"
src=
"http://api.map.baidu.com/api?v=2.0&ak=CyOWd7pmPurvZ0PERgxEOlAlifG0y7Sp"
></script>
<title>
xcmg
</title>
</head>
<body>
...
...
src/pages/home/home-page.vue
View file @
af97a0ce
...
...
@@ -2,7 +2,7 @@
* @Descrip: 主页
* @Author: your name
* @Date: 2019-10-10 14:25:15
* @LastEditTime: 2019-10-12 1
1:27:42
* @LastEditTime: 2019-10-12 1
7:22:27
* @LastEditors: Please set LastEditors
-->
<
template
>
...
...
@@ -11,7 +11,7 @@
<div
slot=
"left"
class=
"h-header-btn"
>
<!--
<i
class=
"ion-ios-arrow-back"
/>
-->
<img
class=
"locations"
src=
"@/assets/homePage/location.png"
alt=
""
@
click=
"location"
>
<span>
徐州
</span>
<span>
{{
city
}}
</span>
</div>
<div
slot=
"center"
@
click=
"getLocation"
>
徐工租赁
</div>
</h-header>
...
...
@@ -73,6 +73,7 @@ export default {
name
:
'HomePage'
,
data
()
{
return
{
city
:
''
,
functionList
:
[
{
functionIcon
:
require
(
'@/assets/homePage/product-select.png'
),
...
...
@@ -106,10 +107,26 @@ export default {
{
// 定位
getLocation
()
{
let
url
=
'http://api.map.baidu.com/location/ip?ak=2h7McXV8X4CmFkYEuhPGWLKWpdQrdHCg&coor=bd09ll'
this
.
hlsHttp
.
post
(
url
).
then
(
function
(
res
)
{
console
.
log
(
res
)
})
// let url = 'http://api.map.baidu.com/location/ip?ak=2h7McXV8X4CmFkYEuhPGWLKWpdQrdHCg&coor=bd09ll'
// this.hlsHttp.post(url).then(function (res) {
// console.log(res)
// })
// this.getAddress = function () {
let
vm
=
this
var
geolocation
=
new
BMap
.
Geolocation
()
geolocation
.
getCurrentPosition
(
function
(
res
)
{
// debugger
if
(
this
.
getStatus
()
===
0
)
{
console
.
log
(
'定位。。。。'
,
res
.
address
.
city
)
vm
.
city
=
res
.
address
.
city
// $rootScope.city = res.address.city
// $rootScope.addr = ''
}
else
{
// $rootScope.city = ''
// $rootScope.addr = ''
}
},
{
enableHighAccuracy
:
true
})
// }
},
goFunctionHome
(
data
)
{
// if (data.functionState === 'NaturePersonReadOnly') {
...
...
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