修改接口地址

This commit is contained in:
duan
2024-05-15 16:56:29 +08:00
parent 8b3dd745ac
commit 9c25679656
8 changed files with 51 additions and 19 deletions

View File

@@ -20,11 +20,11 @@
{{item.shopName}}
</view>
</view>
<view class="fivecontent_itemoneboxtow flex-start">
<view class="fivecontent_itemoneboxtow flex-start" @click="goMap">
<image class="fivecontent_itemoneboxtowimage"
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/dw.png" mode="widthFix"></image>
<view class="fivecontent_itemoneboxtow_o">
{{item.address}}
{{item.address.length>7?item.address.substring(0,7)+'...':item.address}}
</view>
<view class="fivecontent_itemoneboxtow_t">
{{item.distances}}km
@@ -81,6 +81,12 @@
this.distiricttopCommon()
},
methods: {
goMap() {
uni.openLocation({
longitude: uni.cache.get('getLocationstorage').lng,
latitude: uni.cache.get('getLocationstorage').lat
})
},
init_fn(e) {
this.list = []
this.form.page = 1 //页数
@@ -98,13 +104,13 @@
type: 'subShop', //团购卷品类Id/subShop-预约到店
orderBy: ''
})
if (res.code == 0) {
if (res.code == 0) {
this.toplist = res.data.carousel[0]
}
},
async distirictsubShopList() {
let res = await this.api.distirictsubShopList({
address:uni.cache.get('getLocationstorage').address, //地址
address: uni.cache.get('getLocationstorage').address, //地址
lng: uni.cache.get('getLocationstorage').lng,
lat: uni.cache.get('getLocationstorage').lat,
distanceInKm: '10', //默认10 以经纬度为中心 多大范围以内 单位km
@@ -119,7 +125,7 @@
this.form.status = 'loading';
this.form.page = ++this.form.page;
setTimeout(() => {
this.list = [...this.list,...res.data.list]
this.list = [...this.list, ...res.data.list]
this.form.status = 'loading';
if (res.data.pageNum == res.data.pages) {
this.form.status = 'nomore';