邓洁 : 地图接口
This commit is contained in:
10
pages.json
10
pages.json
@@ -125,6 +125,8 @@
|
|||||||
"path": "pages/index/NavBarPages/zrxx/zrxx",
|
"path": "pages/index/NavBarPages/zrxx/zrxx",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "转让信息",
|
"navigationBarTitleText": "转让信息",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#339967",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -132,6 +134,8 @@
|
|||||||
"path": "pages/index/NavBarPages/zdxx/zdxx",
|
"path": "pages/index/NavBarPages/zdxx/zdxx",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "找店信息",
|
"navigationBarTitleText": "找店信息",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#339967",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -139,6 +143,8 @@
|
|||||||
"path": "pages/index/NavBarPages/czxx/czxx",
|
"path": "pages/index/NavBarPages/czxx/czxx",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "出租信息",
|
"navigationBarTitleText": "出租信息",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#339967",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -146,6 +152,8 @@
|
|||||||
"path": "pages/index/NavBarPages/xmzs/xmzs",
|
"path": "pages/index/NavBarPages/xmzs/xmzs",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "项目招商",
|
"navigationBarTitleText": "项目招商",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#339967",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -153,6 +161,8 @@
|
|||||||
"path": "pages/index/NavBarPages/cjal/cjal",
|
"path": "pages/index/NavBarPages/cjal/cjal",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "成交案例",
|
"navigationBarTitleText": "成交案例",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#339967",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,18 +3,13 @@
|
|||||||
<InputAndSwiper type='0' :bannerURL="swiperList"></InputAndSwiper>
|
<InputAndSwiper type='0' :bannerURL="swiperList"></InputAndSwiper>
|
||||||
<view class="home-content">
|
<view class="home-content">
|
||||||
<view class="service">
|
<view class="service">
|
||||||
<u-image src="/static/statistics/sy_icon_lxkf.png" width="108rpx" height="108rpx"/>
|
<u-image src="/static/statistics/sy_icon_lxkf.png" width="108rpx" height="108rpx" />
|
||||||
<button
|
<button open-type="contact" bindcontact="handleContact" session-from="sessionFrom" class="service-btn">
|
||||||
open-type="contact"
|
|
||||||
bindcontact="handleContact"
|
|
||||||
session-from="sessionFrom"
|
|
||||||
class="service-btn"
|
|
||||||
>
|
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<HomeNavCard></HomeNavCard>
|
<HomeNavCard></HomeNavCard>
|
||||||
<HomeNoticeBar :text="notice" />
|
<HomeNoticeBar :text="notice" />
|
||||||
<Statistics :statNum="statNum"/>
|
<Statistics :statNum="statNum" />
|
||||||
<view class="show-and-search">
|
<view class="show-and-search">
|
||||||
<view class="show-tab list-tab" :class="{ 'tab-activate': chooseIndex === 0 }" @click="this.chooseIndex=0">
|
<view class="show-tab list-tab" :class="{ 'tab-activate': chooseIndex === 0 }" @click="this.chooseIndex=0">
|
||||||
<text>店铺列表</text>
|
<text>店铺列表</text>
|
||||||
@@ -46,7 +41,7 @@
|
|||||||
notice: [],
|
notice: [],
|
||||||
chooseIndex: 0,
|
chooseIndex: 0,
|
||||||
statNum: {},
|
statNum: {},
|
||||||
swiperList:[]
|
swiperList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -56,18 +51,18 @@
|
|||||||
this.open()
|
this.open()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getBanner(){
|
getBanner() {
|
||||||
this.$api.getBanner().then(res=>{
|
this.$api.getBanner().then(res => {
|
||||||
this.swiperList = res.data.data.map(item=>this.$api.imgUrl+item.img)
|
this.swiperList = res.data.data.map(item => this.$api.imgUrl + item.img)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getNotice(){
|
getNotice() {
|
||||||
this.$api.getHotInfo().then(res=>{
|
this.$api.getHotInfo().then(res => {
|
||||||
this.notice = res.data.data.map(item=>item.title)
|
this.notice = res.data.data.map(item => item.title)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getStat(){
|
getStat() {
|
||||||
this.$api.getStat().then(res=>{
|
this.$api.getStat().then(res => {
|
||||||
this.statNum = res.data.data
|
this.statNum = res.data.data
|
||||||
console.log(res.data.data);
|
console.log(res.data.data);
|
||||||
})
|
})
|
||||||
@@ -95,6 +90,8 @@
|
|||||||
success(res) {
|
success(res) {
|
||||||
console.log('res.latitude', res.latitude);
|
console.log('res.latitude', res.latitude);
|
||||||
console.log('res.longitude', res.longitude);
|
console.log('res.longitude', res.longitude);
|
||||||
|
uni.setStorageSync('latitude', res.latitude);
|
||||||
|
uni.setStorageSync('longitude', res.longitude);
|
||||||
qqmapsdk.reverseGeocoder({
|
qqmapsdk.reverseGeocoder({
|
||||||
location: {
|
location: {
|
||||||
latitude: res.latitude,
|
latitude: res.latitude,
|
||||||
@@ -106,7 +103,7 @@
|
|||||||
console.log(re.result.ad_info.district);
|
console.log(re.result.ad_info.district);
|
||||||
let city = re.result.ad_info.city
|
let city = re.result.ad_info.city
|
||||||
let district = re.result.ad_info.district
|
let district = re.result.ad_info.district
|
||||||
console.log('city-code',re.result.ad_info.city_code.substring(3));
|
console.log('city-code', re.result.ad_info.city_code.substring(3));
|
||||||
uni.setStorageSync('city_code', re.result.ad_info.city_code.substring(3));
|
uni.setStorageSync('city_code', re.result.ad_info.city_code.substring(3));
|
||||||
uni.setStorageSync('city', city.slice(0, 2));
|
uni.setStorageSync('city', city.slice(0, 2));
|
||||||
uni.setStorageSync('district', district);
|
uni.setStorageSync('district', district);
|
||||||
@@ -127,11 +124,11 @@
|
|||||||
open() {
|
open() {
|
||||||
var that = this
|
var that = this
|
||||||
uni.getSetting({
|
uni.getSetting({
|
||||||
success: function (res) {
|
success: function(res) {
|
||||||
if (res.authSetting['scope.userFuzzyLocation']) {
|
if (res.authSetting['scope.userFuzzyLocation']) {
|
||||||
console.log('用户已经授权定位权限');
|
console.log('用户已经授权定位权限');
|
||||||
} else {
|
} else {
|
||||||
console.log('用户未授权定位权限');
|
console.log('用户未授权定位权限');
|
||||||
uni.authorize({
|
uni.authorize({
|
||||||
scope: 'scope.userFuzzyLocation',
|
scope: 'scope.userFuzzyLocation',
|
||||||
success: function() {
|
success: function() {
|
||||||
@@ -161,8 +158,8 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -176,11 +173,13 @@
|
|||||||
|
|
||||||
.home-content {
|
.home-content {
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
|
|
||||||
.service {
|
.service {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 17rpx;
|
right: 17rpx;
|
||||||
top: 1109rpx;
|
top: 1109rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
||||||
.service-btn {
|
.service-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -189,6 +188,7 @@
|
|||||||
width: 108rpx;
|
width: 108rpx;
|
||||||
height: 108rpx;
|
height: 108rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.service-btn::after {
|
.service-btn::after {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,42 @@
|
|||||||
console.log("markerClusterCreate", e);
|
console.log("markerClusterCreate", e);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getMapList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getMapList() {
|
||||||
|
const realData = {
|
||||||
|
longitude: uni.getStorageSync('longitude'),
|
||||||
|
latitude: uni.getStorageSync('latitude'),
|
||||||
|
radius: 100
|
||||||
|
}
|
||||||
|
const mockData = {
|
||||||
|
longitude: 23.40,
|
||||||
|
latitude: 116.38,
|
||||||
|
radius: 1111111111
|
||||||
|
}
|
||||||
|
this.$api.getMap(mockData).then(res => {
|
||||||
|
console.log('getMap', res);
|
||||||
|
let obj = {}
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
// res.data.data.forEach(item => {
|
||||||
|
// obj = {
|
||||||
|
// id: parseInt(item.id),
|
||||||
|
// latitude: item.lat,
|
||||||
|
// longitude: item.lng,
|
||||||
|
// // iconPath: '../../../static/map/sp_icon_dw.png',
|
||||||
|
// width: '58rpx',
|
||||||
|
// height: '72rpx',
|
||||||
|
// rotate: 0,
|
||||||
|
// alpha: 1
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// this.marker.push(obj)
|
||||||
|
// console.log('this.marker', this.marker);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 图标点击
|
// 图标点击
|
||||||
markerClick(e) {
|
markerClick(e) {
|
||||||
console.log('标记点击', e);
|
console.log('标记点击', e);
|
||||||
|
|||||||
@@ -128,8 +128,8 @@ const toast = {
|
|||||||
}
|
}
|
||||||
const apiService = {
|
const apiService = {
|
||||||
serverHost,
|
serverHost,
|
||||||
imgUrl:'https://spsp.feashow.com/',
|
imgUrl: 'https://spsp.feashow.com/',
|
||||||
key:'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB',
|
key: 'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB',
|
||||||
uploadImgUrl: serverHost + `/upload/image/`,
|
uploadImgUrl: serverHost + `/upload/image/`,
|
||||||
//登录接口
|
//登录接口
|
||||||
login(data) {
|
login(data) {
|
||||||
@@ -145,6 +145,13 @@ const apiService = {
|
|||||||
resolve(service.post(url, data))
|
resolve(service.post(url, data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//地图
|
||||||
|
getMap(data) {
|
||||||
|
const url = '/home/map'
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
resolve(service.post(url, data))
|
||||||
|
})
|
||||||
|
},
|
||||||
// 获取客服电话
|
// 获取客服电话
|
||||||
getCsTel() {
|
getCsTel() {
|
||||||
const url = '/center/cfg?key=kf_phone'
|
const url = '/center/cfg?key=kf_phone'
|
||||||
@@ -203,10 +210,10 @@ const apiService = {
|
|||||||
resolve(service.get(url))
|
resolve(service.get(url))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
editPersonInfo(data){
|
editPersonInfo(data) {
|
||||||
const url = `/center/userupdate`
|
const url = `/center/userupdate`
|
||||||
return new Promise((resolve,reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve(service.post(url,data))
|
resolve(service.post(url, data))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user