Commit af97a0ce authored by 786817560's avatar 786817560

'提交代码'

parent 9baa1b7f
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
...@@ -13,6 +14,8 @@ ...@@ -13,6 +14,8 @@
<script type="text/javascript" src="./static/vuePlatform.js"></script> <script type="text/javascript" src="./static/vuePlatform.js"></script>
<script type="text/javascript" src="./static/prototype.js"></script> <script type="text/javascript" src="./static/prototype.js"></script>
<script type="text/javascript" src="cordova.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> <title>xcmg</title>
</head> </head>
<body> <body>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Descrip: 主页 * @Descrip: 主页
* @Author: your name * @Author: your name
* @Date: 2019-10-10 14:25:15 * @Date: 2019-10-10 14:25:15
* @LastEditTime: 2019-10-12 11:27:42 * @LastEditTime: 2019-10-12 17:22:27
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
--> -->
<template> <template>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div slot="left" class="h-header-btn"> <div slot="left" class="h-header-btn">
<!-- <i class="ion-ios-arrow-back" /> --> <!-- <i class="ion-ios-arrow-back" /> -->
<img class="locations" src="@/assets/homePage/location.png" alt="" @click="location"> <img class="locations" src="@/assets/homePage/location.png" alt="" @click="location">
<span>徐州</span> <span>{{ city }}</span>
</div> </div>
<div slot="center" @click="getLocation">徐工租赁</div> <div slot="center" @click="getLocation">徐工租赁</div>
</h-header> </h-header>
...@@ -73,6 +73,7 @@ export default { ...@@ -73,6 +73,7 @@ export default {
name: 'HomePage', name: 'HomePage',
data () { data () {
return { return {
city: '',
functionList: [ functionList: [
{ {
functionIcon: require('@/assets/homePage/product-select.png'), functionIcon: require('@/assets/homePage/product-select.png'),
...@@ -106,10 +107,26 @@ export default { ...@@ -106,10 +107,26 @@ export default {
{ {
// 定位 // 定位
getLocation () { getLocation () {
let url = 'http://api.map.baidu.com/location/ip?ak=2h7McXV8X4CmFkYEuhPGWLKWpdQrdHCg&coor=bd09ll' // let url = 'http://api.map.baidu.com/location/ip?ak=2h7McXV8X4CmFkYEuhPGWLKWpdQrdHCg&coor=bd09ll'
this.hlsHttp.post(url).then(function (res) { // this.hlsHttp.post(url).then(function (res) {
console.log(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) { goFunctionHome (data) {
// if (data.functionState === 'NaturePersonReadOnly') { // if (data.functionState === 'NaturePersonReadOnly') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment