Commit af97a0ce authored by 786817560's avatar 786817560

'提交代码'

parent 9baa1b7f
<!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>
......
......@@ -2,7 +2,7 @@
* @Descrip: 主页
* @Author: your name
* @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
-->
<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') {
......
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