Files
wangxiaowei 47d06ae355 修改页面
2025-06-06 18:03:22 +08:00

1404 lines
37 KiB
Vue

<template>
<view class="page" :style="themeColor">
<view class="flex benben-position-layout flex flex-wrap align-center classificationList_flex_0"
:style="{ height: (88 + StatusBarRpx) + 'rpx', paddingTop: StatusBarRpx + 'rpx' }">
<view class='flex flex-wrap align-center justify-between flex-sub classificationList_fd0_0'>
<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
<text class='fu-iconfont2 classificationList_fd0_0_c0_c0' @tap.stop="handleJumpDiy"
data-type="back" data-url="1">&#xE794;</text>
</view>
<view class='flex flex-wrap align-stretch justify-center flex-sub'>
<text class='classificationList_fd0_0_c1_c0'>{{ title }}</text>
</view>
<view class='flex flex-wrap align-center classificationList_fd0_0_c2'>
</view>
</view>
</view>
<view :style="{ height: (88 + StatusBarRpx) + 'rpx' }"></view>
<!---flex布局flex布局开始-->
<view class="flex benben-flex-layout flex-wrap align-center classificationList_flex_1">
<view class='flex flex-wrap align-center flex-sub classificationList_fd1_0'>
<image class='classificationList_fd1_0_c0' mode="aspectFit" :src='STATIC_URL + "53.png"'></image>
<input class='flex-sub' type="text" placeholder="请输入关键字" confirm-type="done" :maxlength="-1"
placeholder-style="color:rgba(153, 153, 153, 1);font-size:28rpx" v-model="fd1_0_c1" />
</view>
</view>
<!---flex布局flex布局结束-->
<!---flex布局flex布局开始-->
<!-- <view class="flex flex-wrap align-center justify-center benben-flex-layout">
<view style="position: relative">
<swiper ref="benbenSwiperfd2_0" @change="bannerIndexfd2_0 = $event.detail.current"
class='flex position-relative classificationList_fd2_0' previous-margin="0rpx" next-margin="0rpx"
:display-multiple-items="1" :interval="5000" :duration="500" :autoplay='true'
indicator-active-color="#fff" indicator-dots="true" :circular='true'>
<swiper-item class='flex classificationList_fd2_0_c1' v-for="(item, index) in banners"
:key="index">
<image class='classificationList_fd2_0_c1_c0' mode="aspectFill" :src='item.thumb'></image>
</swiper-item>
</swiper> -->
<!-- <view style="position: absolute"
class="flex dot flex align-center justify-center classificationList_swiperDotfd2_0">
<view class='flex flex align-center justify-center classificationList_numberfd2_0_c0'>
<text>{{bannerIndexfd2_0+1}}</text>
<text>/</text>
<text>{{banners.length}}</text>
</view>
</view> -->
<!-- </view>
</view> -->
<!---flex布局flex布局结束-->
<!---flex布局flex布局开始-->
<view class="flex benben-flex-layout flex-wrap align-center classificationList_flex_3">
<view class='flex flex-wrap align-center flex-sub'>
<view class='classificationList_fd3_0_c0 flex align-center flex-wrap' :scroll-x='true'
:show-scrollbar='true'>
<!-- <view class='benben-scroll-x'>
<view class='flex benben-scroll flex align-center'>
</view>
</view> -->
<view @tap="handleSelectClassify(item.aid)" v-for="(item, index) in cateList" :key="index"
class='flex flex-direction flex-wrap align-center classificationList_fd3_0_c0_c0'>
<image class='classificationList_fd3_0_c0_c0_c0' mode="aspectFill" :src='item.thumb'></image>
<text class='classificationList_fd3_0_c0_c0_c1'>{{ item.title }}</text>
</view>
<view @tap="handleSelectClassify('')"
class='flex flex-direction flex-wrap align-center classificationList_fd3_0_c0_c0'>
<image class='classificationList_fd3_0_c0_c0_c0' mode="aspectFill"
:src='STATIC_URL + "all3.png"'></image>
<text class='classificationList_fd3_0_c0_c0_c1'>全部</text>
</view>
</view>
</view>
</view>
<!---flex布局flex布局结束-->
<!---flex布局flex布局开始-->
<view class="flex benben-flex-layout flex-wrap align-center classificationList_flex_4">
<view class='flex flex-wrap align-center flex-sub classificationList_fd4_0'>
<view>
<benben-flex-tabs class-name='classificationList_benbenTabsfd4_0_c0' v-model="tabls"
ref="benben_tabsfd4_0_c0" select-mark="benben_tabsfd4_0_c0" key="benben_tabsfd4_0_c0"
:open-title-type='false' :open-sticky='true' :top='0' :is-show-content='false'
:scrollspy='false' :tabs-info.sync="tabsInfofd4_0_c0">
<scroll-view @scroll="tabsInfofd4_0_c0.scrollX = $event.detail.scrollLeft"
id="benben_tabsfd4_0_c0" class="benben-tabs" style="width:750rpx" :scroll-x="true"
:scroll-left.sync="tabsInfofd4_0_c0.moveX" scroll-with-animation="all .3s ease">
<view class="benben-tabs-content" id="benben_tabsfd4_0_c0-content">
<view id="benben_tabsfd4_0_c0-title" class="benben-tabs-title flex align-center flex ">
<!-- <view
:class="{ 'checkTitlefd4_0_c0': tabls == '1', 'flex flex-wrap align-center classificationList_titlefd4_0_c0_c3': true }"
@tap="handleChangeTabs(1)" :id="`benben_tabsfd4_0_c0-title-item-${'1'}`">
<text>{{ sorting_id }}</text>
<image class='classificationList_titleItemfd4_0_c0_c3_c1'
:src='STATIC_URL + "62.png"'></image>
</view> -->
<view class="classificationList_sort_item" @tap="handleChooseSort('aid', '综合排序')">综合排序</view>
<view class="classificationList_sort_item" @tap="handleChooseSort('score', '好评最高')">好评最高</view>
<view
:class="{ 'currentFilter': tabls == '2', 'classificationList_sort_item flex flex-wrap align-center': true }"
@tap="handleChangeTabs(2)" :id="`benben_tabsfd4_0_c0-title-item-${'2'}`">
<text>距离</text>
<view
class='flex flex-direction flex-wrap align-center classificationList_titleItemfd4_0_c0_c4_c1'>
<image v-if="tabls == 2 && sort == 'asc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c0' mode="aspectFit"
:src='STATIC_URL + "63.png"'></image>
<image v-if="tabls != 2 || sort == 'desc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c0' mode="aspectFit"
:src='STATIC_URL + "64.png"'></image>
<image v-if="tabls != 2 || sort == 'asc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c1' mode="aspectFit"
:src='STATIC_URL + "62.png"'></image>
<image v-if="tabls == 2 && sort == 'desc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c1' mode="aspectFit"
:src='STATIC_URL + "65.png"'></image>
</view>
</view>
<view
:class="{ 'currentFilter': tabls == '3', 'classificationList_sort_item flex flex-wrap align-center classificationList_titlefd4_0_c0_c5': true }"
@tap="handleChangeTabs(3)" :id="`benben_tabsfd4_0_c0-title-item-${'3'}`">
<text>关注</text>
<view
class='flex flex-direction flex-wrap align-center classificationList_titleItemfd4_0_c0_c5_c1'>
<image v-if="tabls == 3 && sort == 'asc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c0' mode="aspectFit"
:src='STATIC_URL + "63.png"'></image>
<image v-if="tabls != 3 || sort == 'desc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c0' mode="aspectFit"
:src='STATIC_URL + "64.png"'></image>
<image v-if="tabls != 3 || sort == 'asc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c1' mode="aspectFit"
:src='STATIC_URL + "62.png"'></image>
<image v-if="tabls == 3 && sort == 'desc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c1' mode="aspectFit"
:src='STATIC_URL + "65.png"'></image>
<!-- <image class='classificationList_titleItemfd4_0_c0_c5_c1_c0' mode="aspectFit"
:src='STATIC_URL+"64.png"'></image>
<image class='classificationList_titleItemfd4_0_c0_c5_c1_c1' mode="aspectFit"
:src='STATIC_URL+"65.png"'></image> -->
</view>
</view>
</view>
<view :style="{ left: tabsInfofd4_0_c0.lineleft, maxWidth: tabsInfofd4_0_c0.lineWidth }"
id="benben_tabsfd4_0_c0-line" class="benben-tabs-line flex benben-flex-tabs-line">
</view>
</view>
</scroll-view>
</benben-flex-tabs>
</view>
</view>
</view>
<!---flex布局flex布局结束-->
<!---flex布局flex布局开始-->
<fu-loading v-if="isShowLoading"></fu-loading>
<fu-empty-ui v-if="list.length === 0 && isInit"></fu-empty-ui>
<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout classificationList_flex_5"
@tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/`">
<view class='flex flex-wrap align-center classificationList_fd5_0' v-for="(item, index) in list"
style="position: relative;"
:key="index" @tap.stop="handleJumpDiy" data-type="navigateTo"
:data-url="`/pages/dpxq/storeDetails/storeDetails?id=${item.aid}`">
<view class="point-bg">
<view class="point-bg-txt">积分{{item.score_rate}}%</view>
</view>
<view class='flex flex-direction flex-wrap align-start'>
<!-- <view class='flex flex-wrap align-center justify-center classificationList_fd5_0_c0_c0'>
<text class='classificationList_fd5_0_c0_c0_c0'>积分</text>
<text class='classificationList_fd5_0_c0_c0_c1'>{{ item.score_rate }}</text>
<text class='classificationList_fd5_0_c0_c0_c2'>%</text>
</view> -->
<view class='flex flex-wrap align-center'>
<image class='classificationList_fd5_0_c0_c1_c0' mode="aspectFill" :src='item.logo'></image>
</view>
</view>
<view class='flex flex-direction flex-wrap align-stretch flex-sub classificationList_fd5_0_c1'>
<view class='flex flex-direction flex-wrap align-start'>
<view class='flex flex-wrap align-center'>
<text class='classificationList_fd5_0_c1_c0_c0_c0'>{{ item.store_name }}</text>
</view>
</view>
<view class='flex flex-wrap align-center classificationList_fd5_0_c1_c1'>
<image class='classificationList_fd5_0_c1_c1_c0' mode="aspectFit" :src='STATIC_URL + "31.png"'>
</image>
<!-- <uv-rate count="5" :value="item.score" inactiveColor="#FF5951" activeColor="#FF5951" gutter="1" :allowHalf="true"></uv-rate> -->
<!-- <text class='homePage_fd4_1_c1_c1_c1'>{{item.score}}</text> -->
<text class='classificationList_fd5_0_c1_c1_c1'>{{ item.score }}</text>
<text class='classificationList_fd5_0_c1_c1_c2'>分</text>
</view>
<view class='flex flex-wrap align-center justify-between classificationList_fd5_0_c1_c2'>
<view class='flex flex-wrap align-center'>
<text class='classificationList_fd5_0_c1_c2_c0_c0'>关注人数</text>
<text class='classificationList_fd5_0_c1_c2_c0_c1'>{{ item.collect_num }}</text>
</view>
<!-- <view class='flex flex-wrap align-center'>
<text class='classificationList_fd5_0_c1_c2_c1_c0'>人均¥</text>
<text class='classificationList_fd5_0_c1_c2_c1_c1'>{{item.per_capita}}</text>
</view> -->
</view>
<view class='flex flex-wrap align-center justify-between classificationList_fd5_0_c1_c3'>
<view class='flex flex-wrap align-center'>
<text class='classificationList_fd5_0_c1_c3_c0_c0'>起送¥</text>
<text class='classificationList_fd5_0_c1_c3_c0_c1'>{{ item.start_price }} </text>
</view>
<view class='flex flex-wrap align-center'>
<text class='classificationList_fd5_0_c1_c3_c1_c0'>约</text>
<text class='classificationList_fd5_0_c1_c3_c1_c1'>{{ item.minute }}</text>
<text class='classificationList_fd5_0_c1_c3_c1_c2'>分钟</text>
<text class='classificationList_fd5_0_c1_c3_c1_c3'>{{ item.distance }}</text>
<text class='classificationList_fd5_0_c1_c3_c1_c4'>km</text>
</view>
</view>
</view>
</view>
</view>
<uni-load-more v-if="list.length != 0" :status="status"></uni-load-more>
<!---flex布局flex布局结束-->
<!--选择器开始 -->
<benben-picker ref="benbenWritePickerCodepicker6" :visible.sync="pickerDiy1684548668465"
:label.sync='sorting_id' :options='sorting_List' mode='selector' :mask-show='true' :timeout='true'
:picker-height='88' default-type='value' :default-props='{ "label": "name", "value": "value" }'>
<template #picker-header>
<view class='flex flex-wrap align-center justify-between classificationList_picker6_0'>
<text @tap="$refs.benbenWritePickerCodepicker6.cancel()">取消</text>
<text>综合排序</text>
<text class='classificationList_picker6_0_c2'
@tap="$refs.benbenWritePickerCodepicker6.pickerConfirm()">确认</text>
</view>
</template>
</benben-picker>
<!--选择器结束 -->
<view class="popup-mask" v-if="showPopup"></view>
<view class="popup" v-if="showPopup">
<benben-flex-tabs class-name='classificationList_benbenTabsfd4_0_c011' v-model="tabls"
ref="benben_tabsfd4_0_c0" select-mark="benben_tabsfd4_0_c0" key="benben_tabsfd4_0_c0"
:open-title-type='false' :open-sticky='true' :top='0' :is-show-content='false' :scrollspy='false'
:tabs-info.sync="tabsInfofd4_0_c0">
<scroll-view @scroll="tabsInfofd4_0_c0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd4_0_c0"
class="benben-tabs" style="width:750rpx" :scroll-x="true" :scroll-left.sync="tabsInfofd4_0_c0.moveX"
scroll-with-animation="all .3s ease">
<view class="benben-tabs-content" id="benben_tabsfd4_0_c0-content">
<view id="benben_tabsfd4_0_c0-title" class="benben-tabs-title flex align-center flex ">
<view
:class="{ 'checkTitlefd4_0_c0': tabls == '1', 'flex flex-wrap align-center classificationList_titlefd4_0_c0_c3': true }"
@tap="handleChangeTabs(1)" :id="`benben_tabsfd4_0_c0-title-item-${'1'}`">
<text>{{ sorting_id }}</text>
<image class='classificationList_titleItemfd4_0_c0_c3_c1' :src='STATIC_URL + "62.png"'>
</image>
</view>
<view
:class="{ 'checkTitlefd4_0_c0': tabls == '2', 'flex flex-wrap align-center classificationList_titlefd4_0_c0_c4': true }"
@tap="handleChangeTabs(2)" :id="`benben_tabsfd4_0_c0-title-item-${'2'}`">
<text>距离</text>
<view
class='flex flex-direction flex-wrap align-center classificationList_titleItemfd4_0_c0_c4_c1'>
<image v-if="tabls == 2 && sort == 'asc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c0' mode="aspectFit"
:src='STATIC_URL + "63.png"'></image>
<image v-if="tabls != 2 || sort == 'desc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c0' mode="aspectFit"
:src='STATIC_URL + "64.png"'></image>
<image v-if="tabls != 2 || sort == 'asc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c1' mode="aspectFit"
:src='STATIC_URL + "62.png"'></image>
<image v-if="tabls == 2 && sort == 'desc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c1' mode="aspectFit"
:src='STATIC_URL + "65.png"'></image>
</view>
</view>
<view
:class="{ 'checkTitlefd4_0_c0': tabls == '3', 'flex flex-wrap align-center classificationList_titlefd4_0_c0_c5': true }"
@tap="handleChangeTabs(3)" :id="`benben_tabsfd4_0_c0-title-item-${'3'}`">
<text>关注</text>
<view
class='flex flex-direction flex-wrap align-center classificationList_titleItemfd4_0_c0_c5_c1'>
<image v-if="tabls == 3 && sort == 'asc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c0' mode="aspectFit"
:src='STATIC_URL + "63.png"'></image>
<image v-if="tabls != 3 || sort == 'desc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c0' mode="aspectFit"
:src='STATIC_URL + "64.png"'></image>
<image v-if="tabls != 3 || sort == 'asc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c1' mode="aspectFit"
:src='STATIC_URL + "62.png"'></image>
<image v-if="tabls == 3 && sort == 'desc'"
class='classificationList_titleItemfd4_0_c0_c4_c1_c1' mode="aspectFit"
:src='STATIC_URL + "65.png"'></image>
<!-- <image class='classificationList_titleItemfd4_0_c0_c5_c1_c0' mode="aspectFit"
:src='STATIC_URL+"64.png"'></image>
<image class='classificationList_titleItemfd4_0_c0_c5_c1_c1' mode="aspectFit"
:src='STATIC_URL+"65.png"'></image> -->
</view>
</view>
</view>
<view :style="{ left: tabsInfofd4_0_c0.lineleft, maxWidth: tabsInfofd4_0_c0.lineWidth }"
id="benben_tabsfd4_0_c0-line" class="benben-tabs-line flex benben-flex-tabs-line"></view>
</view>
</scroll-view>
</benben-flex-tabs>
<view class="list-wrap">
<view class="list">
<view class="item" @tap="handleChooseSort('aid', '综合排序')"><text class="title"
:class="sortType == 'aid' ? 'colors' : ''">综合排序</text></view>
<!-- <view class="item" @tap="handleChooseSort('start_price', '人均价最低')"><text class="title" :class="sortType == 'start_price' ? 'colors' : ''">人均价最低</text></view> -->
<view class="item" @tap="handleChooseSort('score', '好评最高')"><text class="title"
:class="sortType == 'score' ? 'colors' : ''">好评最高</text></view>
</view>
</view>
</view>
</view>
</template>
<script>
import amap from '@/common/amap-wx.js';
// import pagingList from '@/common/mixin/paging_list.js';
import {
validate
} from '@/common/utils/validate.js'
export default {
components: {},
// mixins: [pagingList],
data() {
return {
showPopup: false,
"pickerDiy1684548668465": false,
"tabsInfofd4_0_c0": {
lineleft: '',
lineWidth: '',
moveX: 0,
scrollX: 0,
PageScrollX: 0
},
"bannerIndexfd2_0": 0,
"fd1_0_c1": "",
"minixPagingListsApi": "",
"pageingListApiMethod": "",
"allowOnloadGetList": false,
"tabls": "1",
"input_content": "",
"data": [],
"sorting_List": [{
"name": "综合排序",
"value": "1",
"image": ""
}, {
"name": "人均价最低",
"value": "2",
"image": ""
}, {
"name": "好评最高",
"value": "3",
"image": ""
}, {
"name": "好评最高",
"value": "4",
"image": ""
}],
"sorting_id": "综合排序",
id: '',
title: '',
banners: [],
cateList: [],
sort: 'desc',
lat: '',
lng: '',
list: [],
isShowLoading: false,
isInit: false,
status: 'more', // 表示是否有数据可以请求
page: 1,
amapPlugin: null, //new地图
key: '886bfe2d6c32bd8eac97c2e6d821ed0b',
sortType: 'aid',
cid: '',
sortName: ''
};
},
computed: {
themeColor() {
return this.$store.getters.themeColor
},
},
watch: {},
onLoad(options) {
this.id = options.id || '';
this.title = options.title || '';
this.cid = options.cid || '';
this.getSwiper();
this.getCateList();
this.amapPlugin = new amap.AMapWX({
key: this.key
});
},
onUnload() {
},
onReady() {
},
onShow() {
if (global.lat && global.lng) {
this.lat = global.lat
this.lng = global.lng
this.status = 'more';
this.page = 1;
this.isInit = false;
this.list = [];
this.getRecommendList(true);
} else {
this._getLocation()
}
// // #ifdef APP-PLUS
// this._getPermission()
// // #endif
// // #ifndef APP-PLUS
// this._getLocation()
// // #endif
},
onHide() {
},
onResize() {
},
onPullDownRefresh() {
if (global.lat && global.lng) {
this.lat = global.lat
this.lng = global.lng
this.status = 'more';
this.page = 1;
this.isInit = false;
this.list = [];
this.getRecommendList(true);
} else {
this._getLocation()
}
// this.$refs.guess && this.$refs.guess.refresh();
setTimeout(() => {
uni.stopPullDownRefresh();
}, 1000);
},
onReachBottom(e) {
this.getRecommendList();
},
onPageScroll(e) {
},
methods: {
handleSelectClassify(id) {
this.cid = id;
this.status = 'more';
this.page = 1;
this.isInit = false;
this.list = [];
this.getRecommendList(true);
},
handleChooseSort(type, name) {
this.sortType = type;
this.sortName = name;
this.sorting_id = name;
if (this.showPopup) {
this.showPopup = false;
}
this.sort = 'desc'
if (type == 'start_price') {
this.sort = 'asc'
}
this.tabls = 1;
if (global.lat && global.lng) {
this.lat = global.lat
this.lng = global.lng
this.status = 'more';
this.page = 1;
this.isInit = false;
this.list = [];
this.getRecommendList(true);
} else {
this._getLocation()
}
},
handleChangeTabs(type) {
if (this.showPopup) {
this.showPopup = false;
}
if (type == 1) {
if (!this.showPopup) {
this.showPopup = true
return false;
} else {
this.sort = 'desc'
}
// this.sort = 'asc'
}
if (type == 2) {
if (this.tabls == 2) {
this.sort = this.sort == 'asc' ? 'desc' : 'asc'
} else {
this.sort = 'desc'
}
}
if (type == 3) {
if (this.tabls == 3) {
this.sort = this.sort == 'asc' ? 'desc' : 'asc'
} else {
this.sort = 'desc'
}
}
this.tabls = type;
if (global.lat && global.lng) {
this.lat = global.lat
this.lng = global.lng
this.status = 'more';
this.page = 1;
this.isInit = false;
this.list = [];
this.getRecommendList(true);
} else {
this._getLocation()
}
},
/**
* 获取附近商家列表
* @param {Object} value
*/
getRecommendList(value) {
if (this.status != 'more') return;
this.status = 'loading';
let data = {
store_name: this.keyword,
list_rows: 20,
page: this.page,
lat: this.lat,
lng: this.lng,
is_recommend: 0,
sort_field: this.tabls == 1 ? this.sortType : this.tabls == 2 ? 'distance' : 'collect_num',
sort_type: this.sort,
cate_id: this.id,
};
if (this.cid) {
data.storecategory_id = this.cid;
} else {
data.cate_id = this.id;
}
// console.log('请求的数据', data);
if (this.page == 1 && value) {
this.isShowLoading = true;
}
this.$api
.post(global.apiUrls.getShopList, data)
.then(res => {
console.log('订单列表', res);
this.isShowLoading = false;
if (res.data.code == 1) {
var curPageData = res.data.data.data;
if (this.page == 1) this.list = [];
this.list = this.list.concat(curPageData);
console.log('上拉加载', curPageData.length, this.size);
if (res.data.data.last_page > this.page) {
this.status = 'more';
this.page++;
} else {
this.status = 'noMore';
}
} else {
this.$message.info(res.data.msg);
}
this.isInit = true;
uni.stopPullDownRefresh();
})
.catch(err => {
this.isShowLoading = false;
uni.stopPullDownRefresh();
});
},
_getPermission() {
uni.getSystemInfo({
success: (res) => {
if (res.platform == 'android') {
let isLocation = uni.getStorageSync('LVTAI_USER_LOCATION') || false;
if (!isLocation) {
uni.showModal({
title: '温馨提示',
content: '我们需要获取您的定位权限以提供对应的服务',
// showCancel: false,
confirmText: '去获取',
success: res => {
if (res.confirm) {
this._getLocation();
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
this._getLocation();
}
} else {
this._getLocation();
}
}
});
},
// vue的method里编写如下代码
async requestAndroidPermission(permisionID) {
var permisionStatus = await permision.requestAndroidPermission(permisionID);
console.log(permisionStatus);
return permisionStatus;
},
_getLocation() {
// #ifdef H5
this.lat = '34.738695';
this.lng = '113.64328';
this.status = 'more';
this.page = 1;
this.isInit = false;
this.list = [];
this.address = '华城国际中心'
this.getRecommendList(true);
// #endif
// #ifdef APP-PLUS
this.amapPlugin.getRegeo({
success: res => {
console.log(res[0]);
uni.setStorageSync('LVTAI_USER_LOCATION', true);
this.address = res[0].regeocodeData.addressComponent.city;
this.lat = res[0].latitude;
this.lng = res[0].longitude;
this.status = 'more';
this.page = 1;
this.isInit = false;
this.list = [];
this.getRecommendList(true);
},
fail: err => {
}
});
// #endif
},
//切换列表排序
switchTypeFunc(type) {
this.type = type;
if (this.stor == 'desc') {
this.stor = 'asc';
if (this.shopType == '1') {
return
}
if (this.shopType == '2') {
return
}
}
if (this.stor == 'asc') {
this.stor = 'desc';
if (this.shopType == '1') {
return
}
if (this.shopType == '2') {
return
}
}
if (this.stor == '') {
this.stor = 'desc';
if (this.shopType == '1') {
return
}
if (this.shopType == '2') {
return
}
}
},
// 获取轮播图
getSwiper() {
this.$api.post(global.apiUrls.getSwiperList, {
operationadstype_id: 3
})
.then(res => {
if (res.data.code == 1) {
this.banners = res.data.data;
}
})
.catch(err => {
console.log(err);
});
},
// 获取金刚区分类
getCateList() {
this.$api.post(global.apiUrls.getSecondCateList, { pid: this.id }).then(res => {
if (res.data.code == 1) {
let cateList = res.data.data;
if (cateList.length) {
cateList.reverse()
}
this.cateList = cateList;
}
})
.catch(err => {
console.log(err);
});
},
//清空搜索框
clearSearchFunc() {
if (this.input_content != '') {
this.input_content = '';
}
},
//地址列表
address_listFunc() {
this.minixPagingListsApi = global.apiUrls.post636f7683cf195;
this.pageingListApiMethod = 'get';
this.allowOnloadGetList = false;
this.pagingListPostDataContent = {}
this.listData = [];
this.data = this.listData;
this.pagingListToggle();
return
},
pagingListPostData() {
return this.pagingListPostDataContent
}
}
};
</script>
<style lang="scss" scoped>
.page {
width: 100vw;
overflow-x: hidden;
min-height: calc(100vh - var(--window-bottom));
background: rgba(246, 247, 249, 1);
background-size: 100% auto !important;
}
.classificationList_flex_0 {
background: #fff;
width: 750rpx;
height: 88rpx;
overflow: hidden;
z-index: 10;
top: 0rpx;
background-size: 100% auto !important;
}
.classificationList_fd0_0_c2 {
width: 32rpx;
height: 32rpx;
}
.classificationList_fd0_0_c1_c0 {
font-size: 36rpx;
font-weight: 500;
color: #333;
line-height: 88rpx;
}
.classificationList_fd0_0_c0_c0 {
font-size: 32rpx;
font-weight: 500;
color: #333;
line-height: 88rpx;
}
.classificationList_fd0_0 {
margin: 0rpx 32rpx 0rpx 32rpx;
}
.classificationList_flex_1 {
padding: 24rpx 32rpx 24rpx 32rpx;
}
.classificationList_fd1_0_c0 {
width: 28rpx;
height: 28rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
margin: 0rpx 16rpx 0rpx 0rpx;
}
.classificationList_fd1_0 {
background: rgba(255, 255, 255, 1);
border-radius: 32rpx 32rpx 32rpx 32rpx;
background-size: 100% auto !important;
padding: 12rpx 24rpx 12rpx 24rpx;
}
.classificationList_numberfd2_0_c0 {
background: #d5d5d5;
position: absolute;
bottom: 20rpx;
right: 30rpx;
width: 80rpx;
height: 40rpx;
border-radius: 6rpx 6rpx 6rpx 6rpx;
font-size: 24rpx;
color: #FFFFFF;
line-height: 46rpx;
font-weight: 400;
}
.classificationList_fd2_0_c1 {
width: 702rpx;
height: 280rpx;
}
.classificationList_fd2_0_c1_c0 {
width: 702rpx;
height: 280rpx;
border-radius: 20rpx 20rpx 20rpx 20rpx;
}
.classificationList_fd2_0 {
width: 702rpx;
height: 280rpx;
}
.classificationList_swiperDotUnselectedfd2_0 {
border: 1px solid rgba(0, 0, 0, 0.3);
background: rgba(0, 0, 0, 0.3);
width: 16rpx;
height: 16rpx;
border-radius: 100rpx 100rpx 100rpx 100rpx;
margin: 0rpx 6rpx 0rpx 0rpx;
font-size: 24rpx;
color: #fff;
}
.classificationList_swiperDotSelectedfd2_0 {
border: 1px solid #00A7FF;
background: #00A7FF;
width: 16rpx;
height: 16rpx;
border-radius: 100rpx 100rpx 100rpx 100rpx;
margin: 0rpx 6rpx 0rpx 0rpx;
font-size: 24rpx;
color: #fff;
}
::v-deep .classificationList_swiperDotfd2_0 {
position: absolute;
bottom: 8rpx;
left: 0rpx;
right: 0rpx;
}
.classificationList_flex_3 {
padding: 40rpx 0rpx 40rpx 32rpx;
}
.classificationList_fd3_0_c0_c4_c1 {
color: #333333;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
margin: 16rpx 0rpx 0rpx 0rpx;
max-width: 120rpx;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
.classificationList_fd3_0_c0_c4_c0 {
width: 120rpx;
height: 120rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
}
.classificationList_fd3_0_c0_c4 {
width: 120rpx;
margin: 0rpx 40rpx 0rpx 0rpx;
}
.classificationList_fd3_0_c0_c3_c1 {
color: #333333;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
margin: 16rpx 0rpx 0rpx 0rpx;
max-width: 120rpx;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
.classificationList_fd3_0_c0_c3_c0 {
width: 120rpx;
height: 120rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
}
.classificationList_fd3_0_c0_c3 {
width: 120rpx;
margin: 0rpx 40rpx 0rpx 0rpx;
}
.classificationList_fd3_0_c0_c2_c1 {
color: #333333;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
margin: 16rpx 0rpx 0rpx 0rpx;
max-width: 120rpx;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
.classificationList_fd3_0_c0_c2_c0 {
width: 120rpx;
height: 120rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
}
.classificationList_fd3_0_c0_c2 {
width: 120rpx;
margin: 0rpx 40rpx 0rpx 0rpx;
}
.classificationList_fd3_0_c0_c1_c1 {
color: #333333;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
margin: 16rpx 0rpx 0rpx 0rpx;
max-width: 120rpx;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
.classificationList_fd3_0_c0_c1_c0 {
width: 120rpx;
height: 120rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
}
.classificationList_fd3_0_c0_c1 {
width: 120rpx;
margin: 0rpx 40rpx 0rpx 0rpx;
}
.classificationList_fd3_0_c0_c0_c1 {
color: #333333;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
margin: 16rpx 0rpx 0rpx 0rpx;
max-width: 120rpx;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
.classificationList_fd3_0_c0_c0_c0 {
width: 120rpx;
height: 120rpx;
border-radius: 60rpx;
}
.classificationList_fd3_0_c0_c0 {
width: 20%;
margin: 0rpx 0rpx 30rpx 0rpx;
}
.classificationList_fd3_0_c0 {
touch-action: none;
width: 686rpx;
}
.classificationList_flex_4 {
background: linear-gradient(360deg, #F6F7F9 0%, #FFFFFF 100%);
background-size: 100% auto !important;
}
.classificationList_titleItemfd4_0_c0_c5_c1_c1 {
width: 16rpx;
height: 9rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
margin: 8rpx 0rpx 0rpx 0rpx;
}
.classificationList_titleItemfd4_0_c0_c5_c1_c0 {
width: 16rpx;
height: 9rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
.classificationList_titleItemfd4_0_c0_c5_c1 {
margin: 0rpx 0rpx 0rpx 12rpx;
}
.classificationList_titlefd4_0_c0_c5 {
margin: 0rpx 56rpx 0rpx 0rpx;
}
.classificationList_titleItemfd4_0_c0_c4_c1_c1 {
width: 16rpx;
height: 9rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
margin: 8rpx 0rpx 0rpx 0rpx;
}
.classificationList_titleItemfd4_0_c0_c4_c1_c0 {
width: 16rpx;
height: 9rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
margin: 0rpx 0rpx 0rpx 0rpx;
}
.classificationList_titleItemfd4_0_c0_c4_c1 {
margin: 0rpx 0rpx 0rpx 12rpx;
}
.classificationList_titlefd4_0_c0_c4 {
margin: 0rpx 56rpx 0rpx 0rpx;
}
.classificationList_titleItemfd4_0_c0_c3_c1 {
width: 16rpx;
height: 9rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
margin: 0rpx 0rpx 0rpx 12rpx;
}
.classificationList_titlefd4_0_c0_c3 {
margin: 0rpx 56rpx 0rpx 0rpx;
}
.checkTitlefd4_0_c0 {
font-weight: 700 !important;
font-size: 32rpx !important;
color: rgba(51, 51, 51, 1) !important;
// background-color: rgba(255, 255, 255, 1) !important;
}
::v-deep .classificationList_benbenTabsfd4_0_c0 {
background: linear-gradient(360deg, #F6F7F9 0%, #FFFFFF 100%);
width: 750rpx;
height: 90rpx;
white-space: nowrap;
text-align: center;
font-size: 32rpx;
font-weight: 400;
color: rgba(51, 51, 51, 1);
}
::v-deep .classificationList_benbenTabsfd4_0_c011 {
width: 750rpx;
height: 90rpx;
white-space: nowrap;
text-align: center;
font-size: 32rpx;
font-weight: 400;
color: rgba(51, 51, 51, 1);
}
.classificationList_fd4_0 {
margin: 0rpx 0rpx 0rpx 32rpx;
}
.classificationList_flex_5 {
padding: 24rpx 24rpx 0rpx 24rpx;
}
.classificationList_fd5_0_c1_c3_c1_c4 {
color: #999999;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
}
.classificationList_fd5_0_c1_c3_c1_c3 {
color: #999999;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
margin-left: 8rpx;
}
.classificationList_fd5_0_c1_c3_c1_c2 {
color: #999999;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
}
.classificationList_fd5_0_c1_c3_c1_c1 {
color: #999999;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
}
.classificationList_fd5_0_c1_c3_c1_c0 {
color: #999999;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
}
.classificationList_fd5_0_c1_c3_c0_c1 {
color: #333333;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
}
.classificationList_fd5_0_c1_c3_c0_c0 {
color: #333333;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
}
.classificationList_fd5_0_c1_c3 {
margin: 18rpx 0rpx 0rpx 0rpx;
}
.classificationList_fd5_0_c1_c2_c1_c1 {
color: #333333;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
}
.classificationList_fd5_0_c1_c2_c1_c0 {
color: #333333;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
}
.classificationList_fd5_0_c1_c2_c0_c1 {
color: #333333;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
}
.classificationList_fd5_0_c1_c2_c0_c0 {
color: #333333;
font-size: 24rpx;
font-weight: 400;
line-height: 24rpx;
}
.classificationList_fd5_0_c1_c2 {
margin: 18rpx 0rpx 0rpx 0rpx;
}
.classificationList_fd5_0_c1_c1_c2 {
color: #FF9D00;
font-size: 28rpx;
font-weight: 700;
line-height: 30rpx;
}
.classificationList_fd5_0_c1_c1_c1 {
color: #FF9D00;
font-size: 28rpx;
font-weight: 700;
line-height: 30rpx;
}
.classificationList_fd5_0_c1_c1_c0 {
width: 20rpx;
height: 19rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
margin: 0rpx 8rpx 0rpx 0rpx;
}
.classificationList_fd5_0_c1_c1 {
margin: 18rpx 0rpx 0rpx 0rpx;
}
.classificationList_fd5_0_c1_c0_c0_c0 {
color: #333333;
font-size: 32rpx;
font-weight: 600;
line-height: 32rpx;
}
.classificationList_fd5_0_c1 {
margin: 0rpx 0rpx 0rpx 24rpx;
}
.classificationList_fd5_0_c0_c1_c0 {
width: 180rpx;
height: 180rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
}
.classificationList_fd5_0_c0_c0_c2 {
color: #FFFFFF;
font-size: 20rpx;
font-weight: 500;
line-height: 36rpx;
}
.classificationList_fd5_0_c0_c0_c1 {
color: #FFFFFF;
font-size: 20rpx;
font-weight: 500;
line-height: 36rpx;
}
.classificationList_fd5_0_c0_c0_c0 {
color: #FFFFFF;
font-size: 20rpx;
font-weight: 500;
line-height: 36rpx;
}
.classificationList_fd5_0_c0_c0 {
background: url(https://lvtai-files.oss-cn-beijing.aliyuncs.com/mini/23.png) no-repeat, rgba(255, 162, 31, 1);
width: 128rpx;
height: 36rpx;
background-size: 100% auto !important;
border-radius: 16rpx 0rpx 24rpx 0rpx;
position: absolute;
z-index: 8;
}
.classificationList_fd5_0 {
background: rgba(255, 255, 255, 1);
margin: 0rpx 0rpx 24rpx 0rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
background-size: 100% auto !important;
padding: 24rpx 24rpx 24rpx 24rpx;
}
.classificationList_picker6_0_c2 {
color: #4781f5;
}
.classificationList_picker6_0 {
border-bottom: 1px solid #eee;
background: #fff;
padding: 0rpx 32rpx 0rpx 32rpx;
line-height: 88rpx;
border-radius: 25rpx 25rpx 0rpx 0rpx;
background-size: 100% auto !important;
}
.popup-mask {
width: 100%;
height: 100vh;
background-color: rgba(0, 0, 0, 0.3);
position: fixed;
top: 0;
left: 0;
z-index: 9;
}
.popup {
padding: 0 32rpx;
// padding: 40rpx;
position: fixed;
top: calc(var(--status-bar-height) + 44px);
width: 750rpx;
background-color: #fff;
border-radius: 0 0 24rpx 24rpx;
z-index: 99999;
}
.list-wrap {
display: flex;
flex-direction: row;
}
.list {
flex: 1;
}
.item {
// margin-bottom: 24rpx;
line-height: 80rpx;
}
.title {
font-size: 28rpx;
color: #666;
}
.activet {
color: #36AA2E !important;
}
.btn-wrap {
margin-top: 32rpx;
display: flex;
flex-direction: row;
justify-content: center;
}
.btn {
width: 200rpx;
height: 64rpx;
background-color: #EEEEEE;
border-radius: 32px 32px 32px 32px;
display: flex;
align-items: center;
justify-content: center;
}
.btn-unselect {
width: 240rpx;
}
.btn-unselect.active {
margin-left: 20rpx;
}
.btn-text {
font-size: 24rpx;
color: #666;
}
.active {
margin-left: 20rpx;
background-color: #36AA2E;
}
.btn-text-active {
font-size: 24rpx;
color: #fff;
}
.classificationList_sort_item {
background-color: #fff;
border-radius: 10rpx 10rpx 10rpx 10rpx;
padding: 10rpx 14rpx;
margin-left: 16rpx;
font-size: 26rpx;
color: #303131;
}
.currentFilter {
color: #34B945;
}
.point-bg {
background: url(https://lvtai-files.oss-cn-beijing.aliyuncs.com/mini/point_bg.png) no-repeat;
background-size: cover;
position: absolute;
top: -32rpx;
left: -32rpx;
z-index: 10;
width: 112rpx;
height: 112rpx;
}
.point-bg-txt {
transform: rotate(315deg);
font-size: 20rpx;
color: #fff;
margin-left: 12rpx;
margin-top: 32rpx;
}
</style>