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) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
height='38'></u-navbar>
|
height='38'></u-navbar>
|
||||||
<view class="navtop">
|
<view class="navtop">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<!-- <view class="" style="width: 90rpx;height: 90rpx;margin-right: 30rpx;">
|
<!-- <view class="" style="width: 90rpx;height: 90rpx;margin-right: 30rpx;">
|
||||||
<image src="../../static/image/nt20.jfif" mode=""></image>
|
<image src="../../static/image/nt20.jfif" mode=""></image>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="leftpic">
|
<view class="leftpic">
|
||||||
|
@ -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>
|
||||||
|
@ -97,24 +102,24 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
nickName:'',
|
nickName: '',
|
||||||
tel:'',
|
tel: '',
|
||||||
imgad:'',
|
imgad: '',
|
||||||
flag:false,
|
flag: false,
|
||||||
userid:''
|
userid: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.nickName = uni.getStorageSync('userdata').nickName
|
this.nickName = uni.getStorageSync('userdata').nickName
|
||||||
this.tel = uni.getStorageSync('userdata').mobile
|
this.tel = uni.getStorageSync('userdata').mobile
|
||||||
this.userid = uni.getStorageSync('userdata').agentId
|
this.userid = uni.getStorageSync('userdata').agentId
|
||||||
// console.log(this.userid);
|
// console.log(this.userid);
|
||||||
if(this.userid == '' || this.userid == null){
|
if (this.userid == '' || this.userid == null) {
|
||||||
this.flag = false
|
this.flag = false
|
||||||
}else{
|
} else {
|
||||||
this.flag = true
|
this.flag = true
|
||||||
}
|
}
|
||||||
this.getad()
|
this.getad()
|
||||||
|
@ -136,25 +141,25 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/myorder/index'
|
url: '/pages/myorder/index'
|
||||||
})
|
})
|
||||||
}else if(num == 0){
|
} else if (num == 0) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/agentpages/index/index'
|
url: '/pages/agentpages/index/index'
|
||||||
})
|
})
|
||||||
}else if(num == 6){
|
} else if (num == 6) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/page_user/hezuo/index'
|
url: '/page_user/hezuo/index'
|
||||||
})
|
})
|
||||||
}else if(num == 3){
|
} else if (num == 3) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/page_user/about?tit=' + '用户协议'
|
url: '/page_user/about?tit=' + '用户协议'
|
||||||
})
|
})
|
||||||
}else if(num == 4){
|
} else if (num == 4) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/page_user/about?tit=' + '隐私政策'
|
url: '/page_user/about?tit=' + '隐私政策'
|
||||||
})
|
})
|
||||||
}else if(num == 5){
|
} else if (num == 5) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/page_user/about?tit=' + '关于我们'
|
url: '/page_user/about?tit=' + '关于我们'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -205,7 +210,8 @@
|
||||||
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;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
|
@ -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