aaa
This commit is contained in:
parent
71af7a8bf5
commit
127e82e880
|
@ -195,6 +195,26 @@
|
||||||
address: this.mapaddress
|
address: this.mapaddress
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
async setMapScale(e, val) {
|
||||||
|
let mapContext = uni.createMapContext('map', this);
|
||||||
|
let setScale = () => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
mapContext.getScale({
|
||||||
|
success: r => {
|
||||||
|
resolve()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
};
|
||||||
|
await setScale();
|
||||||
|
mapContext.moveToLocation({
|
||||||
|
success: (res) => {
|
||||||
|
const timer = setTimeout(() => {
|
||||||
|
clearTimeout(timer);
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
getMyLocation() {
|
getMyLocation() {
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
|
@ -203,6 +223,7 @@
|
||||||
this.jinweidu = res.longitude + ',' + res.latitude
|
this.jinweidu = res.longitude + ',' + res.latitude
|
||||||
this.latitude = Number(res.latitude.toFixed(5)) - 0.004
|
this.latitude = Number(res.latitude.toFixed(5)) - 0.004
|
||||||
this.longitude = Number(res.longitude.toFixed(5)) + 0.004
|
this.longitude = Number(res.longitude.toFixed(5)) + 0.004
|
||||||
|
this.setMapScale()
|
||||||
// 请求附近的店铺
|
// 请求附近的店铺
|
||||||
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(res => {
|
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
|
@ -472,6 +472,7 @@
|
||||||
this.jinweidu = res.longitude + ',' + res.latitude
|
this.jinweidu = res.longitude + ',' + res.latitude
|
||||||
this.latitude = Number(res.latitude.toFixed(5)) - 0.004
|
this.latitude = Number(res.latitude.toFixed(5)) - 0.004
|
||||||
this.longitude = Number(res.longitude.toFixed(5)) + 0.004
|
this.longitude = Number(res.longitude.toFixed(5)) + 0.004
|
||||||
|
this.setMapScale()
|
||||||
// 请求附近的店铺
|
// 请求附近的店铺
|
||||||
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(
|
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(
|
||||||
res => {
|
res => {
|
||||||
|
@ -860,6 +861,7 @@
|
||||||
image {
|
image {
|
||||||
width: 680rpx;
|
width: 680rpx;
|
||||||
height: 238rpx;
|
height: 238rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -196,6 +196,7 @@
|
||||||
this.jinweidu = res.longitude + ',' + res.latitude
|
this.jinweidu = res.longitude + ',' + res.latitude
|
||||||
this.latitude = Number(res.latitude.toFixed(5)) - 0.004
|
this.latitude = Number(res.latitude.toFixed(5)) - 0.004
|
||||||
this.longitude = Number(res.longitude.toFixed(5)) + 0.004
|
this.longitude = Number(res.longitude.toFixed(5)) + 0.004
|
||||||
|
this.setMapScale()
|
||||||
// 请求附近的店铺
|
// 请求附近的店铺
|
||||||
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(res => {
|
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
<view class="bdlist">
|
<view class="bdlist">
|
||||||
<view class="grlist" @click="btnpage(1)" style="margin-top: 0;">
|
<view class="grlist" @click="btnpage(1)" style="margin-top: 0;">
|
||||||
<view class="">
|
<view class="">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u4ShKzt0cAXXEJScC9tJ" mode=""></image> <text class="wz">押金</text> <text
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u4ShKzt0cAXXEJScC9tJ" mode=""></image>
|
||||||
class="cz">未充值</text>
|
<text class="wz">押金</text> <text class="cz">未充值</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
|
@ -36,7 +36,8 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="grlist" @click="btnpage(2)">
|
<view class="grlist" @click="btnpage(2)">
|
||||||
<view class="">
|
<view class="">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u3cvPoqBH0tT6AuOpZRh" mode=""></image> <text class="wz">我的订单</text>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u3cvPoqBH0tT6AuOpZRh" mode=""></image>
|
||||||
|
<text class="wz">我的订单</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
|
@ -44,7 +45,8 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="grlist" @click="btnpage(3)">
|
<view class="grlist" @click="btnpage(3)">
|
||||||
<view class="">
|
<view class="">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uhvHT4OPl2R3VJF9V9tS" mode=""></image> <text class="wz">用户协议</text>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uhvHT4OPl2R3VJF9V9tS" mode=""></image>
|
||||||
|
<text class="wz">用户协议</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
|
@ -52,7 +54,8 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="grlist" @click="btnpage(4)">
|
<view class="grlist" @click="btnpage(4)">
|
||||||
<view class="">
|
<view class="">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uMRvWCHDoBFzMHy9jhIt" mode=""></image> <text class="wz">隐私政策</text>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uMRvWCHDoBFzMHy9jhIt" mode=""></image>
|
||||||
|
<text class="wz">隐私政策</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
|
@ -60,7 +63,8 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="grlist" @click="btnpage(5)">
|
<view class="grlist" @click="btnpage(5)">
|
||||||
<view class="">
|
<view class="">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uANEp4scpqfFnIqUsIrn" mode=""></image> <text class="wz">关于我们</text>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uANEp4scpqfFnIqUsIrn" mode=""></image>
|
||||||
|
<text class="wz">关于我们</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
|
@ -68,7 +72,8 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="grlist" @click="btnpage(6)" style="border:0;">
|
<view class="grlist" @click="btnpage(6)" style="border:0;">
|
||||||
<view class="">
|
<view class="">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uAd7FaUVsKB4bvmvQNKK" mode=""></image> <text class="wz">合作加盟</text>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uAd7FaUVsKB4bvmvQNKK" mode=""></image>
|
||||||
|
<text class="wz">合作加盟</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
|
@ -205,6 +210,7 @@
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 42rpx;
|
left: 42rpx;
|
||||||
top: 160px;
|
top: 160px;
|
||||||
|
|
||||||
view {
|
view {
|
||||||
background: #7FE3BA;
|
background: #7FE3BA;
|
||||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||||
|
@ -351,13 +357,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.bdpic {
|
.bdpic {
|
||||||
width: 100%;
|
width: 680rpx;
|
||||||
height: 238rpx;
|
height: 238rpx;
|
||||||
|
margin: auto;
|
||||||
margin-top: 32rpx;
|
margin-top: 32rpx;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 100%;
|
width: 680rpx;
|
||||||
height: 100%;
|
height: 238rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user