yurong/.svn/pristine/9d/9d7bd063e5fff8ab7269c95ba12...

102 lines
3.4 KiB
Plaintext

<template>
<view class="content">
<image src="/static/beijingda.png" class="w-750 h-430 absolute" style="z-index: 1;"></image>
<uni-status-bar></uni-status-bar>
<view class="relative zi-2 pl-20 pr-20">
<view class="pt-20 pb-20 colfff br-10 rowsb rowsm">
<view class="rows rowsm fs-26 h-76 lh-76 tct pl-14 pr-14" style="">
<text style="flex-shrink: 0;">{{ app.location.Address || '未知'}}</text>
<uni-icons type="bottom" color="#fff"></uni-icons>
</view>
<!-- <uni-search-bar bgColor="#fff"></uni-search-bar> -->
<view @tap="goNext('/pages/index/pagesOne/mall/mall?type=1')" class="rows rowsm h-76 bgff br-40 pl-30 pr-10">
<uni-icons class="" size="18" type="search" color="#97A4BB"></uni-icons>
<input placeholder="输入搜索的内容" class="fs-26 col999 pl-10 w-360"/>
<view class="w-120 h-60 br-30 fs-28 lh-60 tct colfff bg">搜索</view>
</view>
</view>
<swiper class=" mt-20 h-392 w-710" indicator-dots>
<swiper-item v-for="(item,index) in banner" :key="index">
<image :src="URL + item.image" class="w-710 h-392 br-20" mode="aspectFill"></image>
</swiper-item>
</swiper>
<view class="w-710 h-100 relativem mt-20">
<image src="/static/tonhgzhic.png" class="w-710 h-100"></image>
</view>
<view class="rowsb rowsw pt-20">
<image class="w-342 h-192 mb-20" @tap="goPath(item.path)" v-for="(item,index) in list" :key="index" :src="item.src"></image>
</view>
<image src="/static/xinfugonhse.png" class="w-710 h-190"></image>
<view class="rows rowsm fs-28 pt-30">
<image src="/static/hot.png" class="w-32 h-42"></image>
<text class="ml-10 fw-600">热门推荐</text>
</view>
<view class="pt-30">
<goodslist :type="1" :goodslist="goodslist"></goodslist>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [
{path:'/pages/index/pagesOne/vipMall/vipMall', src: '/static/hsidhf.png'},
{path:'/pages/index/pagesOne/scoreMall/scoreMall', src: '/static/sdghsdg.png'},
{path:'/pages/index/pagesOne/mall/mall?type=2', src: '/static/guanggaozhuabd.png'},
{path:'/pages/index/pagesOne/vipActive/vipActive', src: '/static/srtgbd.png'},
],
goodslist: [],
banner: [],
}
},
onLoad() {
this.getBanner()
//获取地址后请求商家列表
// #ifdef MP-WEIXIN
getApp().getAddress().then(res => {
this.getShoplist()
})
// #endif
// #ifdef H5
//开发状态
this.app.location.latitude = '36.667123'
this.app.location.longitude = '117.076244'
this.app.location.Address = '济南市'
this.getShoplist()
// #endif
},
methods: {
goPath(path) {
if (path != '/pages/qushi/qushi') {
this.goNext(path)
} else {
this.$tools.goSwitchTab(path)
}
},
getShoplist() {//获取商家列表
this.axiosFromToken('POST','index/business', {
switch: 1, lng: this.app.location.longitude,
lat: this.app.location.latitude
}, '加载中').then(res => {
this.goodslist = res.data ?? []
})
},
getBanner() {
this.axiosFromToken('POST','index/banner', {}, '加载中').then(res => {
this.banner = res.data
})
}
},
}
</script>
<style lang="scss">
page {
background: #f7f6fa;
}
</style>