|
@ -3,6 +3,23 @@ |
|
|
background:#F6F6F6; |
|
|
background:#F6F6F6; |
|
|
padding-bottom:20rpx; |
|
|
padding-bottom:20rpx; |
|
|
min-height:100%; |
|
|
min-height:100%; |
|
|
|
|
|
&>.top{ |
|
|
|
|
|
position:absolute; |
|
|
|
|
|
top:0; |
|
|
|
|
|
left:0; |
|
|
|
|
|
width:100%; |
|
|
|
|
|
z-index: 20; |
|
|
|
|
|
padding:calc(var(--status-bar-height) + 10rpx) 30rpx 0; |
|
|
|
|
|
color:#fff; |
|
|
|
|
|
font-size:24rpx; |
|
|
|
|
|
display:flex; |
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
background:rgba(0,0,0,0.1); |
|
|
|
|
|
.plant-dingweixiao:before{ |
|
|
|
|
|
font-size:20rpx; |
|
|
|
|
|
margin-right:5rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
&>.head{ |
|
|
&>.head{ |
|
|
padding:30rpx; |
|
|
padding:30rpx; |
|
|
width:calc(100% - 60rpx); |
|
|
width:calc(100% - 60rpx); |
|
@ -225,6 +242,9 @@ |
|
|
</style> |
|
|
</style> |
|
|
<template> |
|
|
<template> |
|
|
<view class="container"> |
|
|
<view class="container"> |
|
|
|
|
|
<view class="top"> |
|
|
|
|
|
<text class="plant-dingweixiao" @click="!adderss.isOk && refreshPosition()">{{adderss.isOk?adderss.city:"点击重新获取定位"}}</text> <text class="date">{{new Date().format("M月 d日")}}</text> |
|
|
|
|
|
</view> |
|
|
<swiper autoplay :interval="5*1000" v-if="headImgs.length>0" class="headImg" circular> |
|
|
<swiper autoplay :interval="5*1000" v-if="headImgs.length>0" class="headImg" circular> |
|
|
<swiper-item v-for="(v,k) in headImgs" :key="k"> |
|
|
<swiper-item v-for="(v,k) in headImgs" :key="k"> |
|
|
<u-image :src="`${host}/${v}`" width="100%" height="100%" mode="aspectFill"> |
|
|
<u-image :src="`${host}/${v}`" width="100%" height="100%" mode="aspectFill"> |
|
@ -322,6 +342,7 @@ import request,{host} from '@/common/request' |
|
|
baseInfo:{}, |
|
|
baseInfo:{}, |
|
|
baseIndex:"", |
|
|
baseIndex:"", |
|
|
stockList:[], |
|
|
stockList:[], |
|
|
|
|
|
adderss:{}, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed:{ |
|
|
computed:{ |
|
@ -354,6 +375,20 @@ import request,{host} from '@/common/request' |
|
|
} |
|
|
} |
|
|
this.$provise.on("updateMassif", this.getMassif) |
|
|
this.$provise.on("updateMassif", this.getMassif) |
|
|
this.$provise.on("updateStock", this.getStock) |
|
|
this.$provise.on("updateStock", this.getStock) |
|
|
|
|
|
|
|
|
|
|
|
uni.getLocation({ |
|
|
|
|
|
type:"gcj02", |
|
|
|
|
|
geocode:true, |
|
|
|
|
|
isHighAccuracy:true, |
|
|
|
|
|
success:res=>{ |
|
|
|
|
|
this.adderss={ |
|
|
|
|
|
...res.address, |
|
|
|
|
|
longitude:res.longitude, |
|
|
|
|
|
latitude:res.latitude, |
|
|
|
|
|
isOk:true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
async getHeadImg(){ |
|
|
async getHeadImg(){ |
|
@ -446,6 +481,29 @@ import request,{host} from '@/common/request' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
//重新定位 |
|
|
|
|
|
refreshPosition(){ |
|
|
|
|
|
uni.getLocation({ |
|
|
|
|
|
type:"gcj02", |
|
|
|
|
|
geocode:true, |
|
|
|
|
|
isHighAccuracy:true, |
|
|
|
|
|
success:res=>{ |
|
|
|
|
|
this.adderss={ |
|
|
|
|
|
...res.address, |
|
|
|
|
|
longitude:res.longitude, |
|
|
|
|
|
latitude:res.latitude, |
|
|
|
|
|
isOk:true |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
fail(){ |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
title:"提示", |
|
|
|
|
|
content:"获取定位失败!", |
|
|
|
|
|
showCancel:false, |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
onUnload(){ |
|
|
onUnload(){ |
|
|
this.$provise.off("updateMassif") |
|
|
this.$provise.off("updateMassif") |
|
|