You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
473 lines
18 KiB
473 lines
18 KiB
<template>
|
|
<view>
|
|
<!-- 状态栏 -->
|
|
<view class="status" :style="{position:headerPosition}"></view>
|
|
<view class="header" :style="{position:headerPosition}">
|
|
<view class="addr" @click="goPostion">
|
|
<!-- <view class="icon location"></view> -->
|
|
{{city}}<image mode="widthFix" style="width: 15px;" src="../../../static/img/jt.png"></image>
|
|
</view>
|
|
<view class="input-box">
|
|
<input placeholder="搜索卡券" placeholder-style="color:#c0c0c0;" @tap="toSearch()" />
|
|
<view class="icon search"></view>
|
|
</view>
|
|
<!-- <view class="icon-btn"> -->
|
|
<!-- <view class="icon yuyin-home"></view> -->
|
|
<!-- <button open-type="contact" class="icon" show-message-card session-from send-message-path send-message-title> -->
|
|
<!-- <image style="width: 30px;height: 30px;" @click="toScan"
|
|
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAGv0lEQVR4Xu2dgXHUSBBFWxFABuAIgAjgIsBEwBEBvRHgi2D7IsCO4EwEQARnIjgcARCBrj43WyV0s961u1vWSH+qXK6yd1rdv59Go1lNqxO2VSvQrTp6Bi8EYOUQEAACsHIFVh4+RwACsHIFVh4+RwACsHIFVh4+RwACsHIFVh4+RwACsHIFVh4+RwACsHIFVh4+RwACkKuAqj7uuu553/enIvJQRF4kHvGriPxhZucZx1DV30XknYg8zrBfbH4Ske9d1132ff/ZzBBTWksbAZD4IhZEm7qdRAtX4vln6kBEBDAD6hQQUgAoZ8r7exBrd8jfzAxnUlhTVYxcH8MM3t7Qm4yRLRwAVUXi7+OsH0q6RAAQ37mZvbk9O/t7hAIwk+R/MDPMN8Kbql6KyMtww7czGApBGABHDPvXInJVfkKH56F+0UP/ODflUnC7lB3/aVxmnpafRzd0C7schABwYIL0Q0TOzMyO14GfVFWFbiLyYI8aIRPdKAAwU31dcfSLiJxmzWCXjomqYjSAtk8qsV6YmXuu5Qbghr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lIR+wLOReT1yC/3iwyC9WvenKqeici7OQJQI/ODmeHvbEEKqOqliLwcmXNXEYsYAbAn8NvIsfQCh0G6NmNGVWsFN90nmhsAKKiqtcvABrtEm1F4xo6qKjaEYmPouLlLyUYBgFKwIHTYsHsVm0TTCx7POHdu18qm0I+D3ddDmydefUMAKKNAbZKCIofYwkwI7oBCSf77yu5rWLswM7xAytUiAfj5JisReTIeCbquO9tut3+6PF1Z581m87bve5xU+94L6D77IWkYAGUUgLM42x9U8oW/Y0S46roOoKS07XaLEqtpbbPZZJW8fdj3PWoA7H5uqrDuvvbvBAoFoECAAJDgGgRpiRkYvjSzVxkHUlUsxNz37W3I0J8GwGAkqF0OMvJSsxm+ErlvKXaqgMpxQpMffgkYilHeconbl/+tXk0g2hIBCBv2h/qHXwLGycX7gkQEk5nxcnEmByETpBHQtVvdzBh2ti+gX9adVDoAuyjKiPCiXEMhJiaM4zsGr6DXRSwsTIW38v4jwJz5AixMYrGGgqVfvB849RZ6MgDCs0GDIQoQgBAZ2zVCANrNXYjnBCBExnaNEIB2cxfiOQEIkbFdIwSg3dyFeE4AQmRs1wgBaDd3IZ4TgBAZ2zVCANrNXYjnBCBExnaNEIB2cxfiOQEIkbFdIwSg3dyFeE4AQmRs18i/zMYNrphXcJEAAAAASUVORK5CYII=">
|
|
</image> -->
|
|
<!-- </button> -->
|
|
<!-- </view> -->
|
|
</view>
|
|
<!-- 占位 -->
|
|
<view class="place"></view>
|
|
<view class="category-list">
|
|
<!-- 左侧分类导航 -->
|
|
<scroll-view scroll-y="true" class="left">
|
|
<view class="row" v-for="(mers,index) in MerchantList" :key="mers.id"
|
|
:class="[index==showCategoryIndex?'on':'']" @click="showCategory(index,mers.id)">
|
|
<view class="text">
|
|
<view class="block"></view>
|
|
{{mers.merchantName}}
|
|
</view>
|
|
</view>
|
|
|
|
</scroll-view>
|
|
<!-- 右侧子导航 -->
|
|
<scroll-view scroll-y="true" class="right">
|
|
<view class="category">
|
|
<!-- <view class="banner">
|
|
<image src="/static/img/banner3.png"></image>
|
|
</view> -->
|
|
<view v-if="categoryList == '' " class="mart60 fotct font14 fcor666">
|
|
<image style="width: 100px;height: 100px;"
|
|
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAPoElEQVR4Xu1daXBcRxGefqusIisJUS6UiwApU4TiKkhxQ8UU91Gc5XAYE8na995KsoiVkBPiXTuxndiWHMmr9+atLYMxhJiQOyE4IcoB4aaAgiKFCyoQElS5lEocKZG0r6l2zUuthazdfvv20s783e6Z7p7v9XT3zOyA0K2hLQANrb1WXmgANDgINAA0ABrcAg2uvvYAGgANboEGV197AA2AxrQAIoLneWtJe9M00wCAjWiJhvMAqVTKaG9vXwsAV+RPOCKuGx8fT6dSKb+RgNAwANi7d29sYmKCvvhvF5jg9W1tbenly5fnGgEIix4AY2NjTfv371+LiN/iTCgAXLl06dL0smXLZjl89Ua7aAEgpTxCCEFf/OUlTspVQoi0ZVkzJfZTk+yLDgBDQ0PNzc3NtL5fFqXFEXHj9PR0uq+v76Uo+612X4sGALt27TpyenqavvhLymzUTfF4PN3R0fFimcepSPd1D4CBgYGWJUuWUFR/McdiAHBfLpdLE08sFqMY4Rwm/9UHDhxI9/f3T3H4ao22bgEgpVyi1viLOEYNJj6ZTN6Xz+c4zjlhgCCEuEbFCJMcOWqFtu4AsHv37tapqSly9d/kGBEA7s7lchvmTvzcPkoAwuaWlpb0ypUrX+DIVW3augFAJpM5ir5QALiQabQ7fN/fUmjiowICAGyZmZlJ9/T0HGDKWRXymgfAzp07j56dnaUv/gKOhRDxJkQc4k58VEAQQmxtampKr1q16nmO3JWmrVkA7Nmz55jJyUkKzvqZRrne93231ImPEAiDra2tqRUrVjzH1KMi5DUHgMHBwWMpqhdCnM+0wPeEEJ5lWT9n8rHIS4gRtk1OTqbXrFnzLGvAMhPXDABGRkbaDMOgNf4bHJ0BYGcul/OSyeRvOHyl0oYFAiJe6/t+uru7e6JUGaLgrzoAduzYcVwul6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A0uAUaXH3tATQAGtwCDa6+9gAaAA1ugQZX/3+DPb4XwPiylgAAAABJRU5ErkJggg==">
|
|
</image>
|
|
<view class="mart10">暂无数据</view>
|
|
</view>
|
|
<view class="list">
|
|
<view class="box" v-for="(box,i) in categoryList" :key="i" @tap="toCategory(box)"
|
|
v-show="i==showCategoryIndex">
|
|
<image :src="imageUrl+box.ext1"></image>
|
|
<view class="text">{{box.storeName}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- <view class="loading-text" @click="getCouponList">{{ loadingText }}</view> -->
|
|
</scroll-view>
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
<script>
|
|
import {
|
|
getCouponList,
|
|
getStoreListByMerchant,
|
|
getMerchantList
|
|
} from "../../../Utils/Api.js";
|
|
let app = getApp();
|
|
export default {
|
|
data() {
|
|
return {
|
|
showCategoryIndex: 0,
|
|
headerPosition: "fixed",
|
|
city: "",
|
|
imageUrl: app.globalData.imgUrl,
|
|
//分类列表
|
|
categoryList: [],
|
|
MerchantList: [],
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
isNoMoreData: false
|
|
// loadingText: '点击加载更多'
|
|
}
|
|
},
|
|
onPageScroll(e) {
|
|
//兼容iOS端下拉时顶部漂移
|
|
if (e.scrollTop >= 0) {
|
|
this.headerPosition = "fixed";
|
|
} else {
|
|
this.headerPosition = "absolute";
|
|
}
|
|
},
|
|
onLoad() {
|
|
},
|
|
onShow() {
|
|
this.categoryList = [];
|
|
this.MerchantList = [];
|
|
if (app.globalData.cityName != '') {
|
|
this.city = app.globalData.cityName;
|
|
this.getMerchantList();
|
|
}else{
|
|
this.postionIng();
|
|
}
|
|
|
|
},
|
|
methods: {
|
|
postionIng() {
|
|
let that = this;
|
|
uni.getLocation({
|
|
type: 'wgs84',
|
|
success: function(res) {
|
|
app.globalData.latitude = res.latitude;
|
|
app.globalData.longitude = res.longitude;
|
|
// #ifdef H5
|
|
that.getUserLocation(res.longitude, res.latitude);
|
|
// #endif
|
|
// #ifdef MP
|
|
uni.request({
|
|
url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + res.latitude +
|
|
',' + res.longitude + '&key=7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB',
|
|
data: {},
|
|
success: function(res) {
|
|
that.city = res.data.result.address_component.city.replace(/市/g,
|
|
'');
|
|
app.globalData.cityId = res.data.result.ad_info.adcode;
|
|
// app.globalData.cityId = '500100';
|
|
that.getMerchantList();
|
|
}
|
|
})
|
|
// #endif
|
|
}
|
|
})
|
|
},
|
|
//金纬度转
|
|
getUserLocation(long, lat) {
|
|
let vm = this;
|
|
let url =
|
|
'https://apis.map.qq.com/ws/geocoder/v1?coord_type=5&get_poi=1&output=jsonp&poi_options=page_size=1;page_index=1';
|
|
let locationObj = lat + ',' + long;
|
|
this.$jsonp(url, {
|
|
key: '7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB',
|
|
location: locationObj
|
|
})
|
|
.then(res => {
|
|
vm.city = res.result.address_component.city.replace(/市/g,
|
|
'');
|
|
app.globalData.cityId = res.result.ad_info.adcode;
|
|
vm.getMerchantList();
|
|
})
|
|
.catch(err => {
|
|
console.log(err);
|
|
});
|
|
},
|
|
// 商户列表
|
|
getMerchantList() {
|
|
let params = {
|
|
regionId: app.globalData.cityId
|
|
}
|
|
getMerchantList(params).then(res => {
|
|
if (res.return_code == '000000' && res.return_data !='') {
|
|
this.MerchantList = res.return_data;
|
|
this.getStoreListByMerchant(res.return_data[0].id);
|
|
|
|
} else {
|
|
this.MerchantList = [];
|
|
uni.showToast({
|
|
title: '暂无数据',
|
|
icon: 'none',
|
|
duration: 2000
|
|
})
|
|
}
|
|
})
|
|
},
|
|
//扫码
|
|
toScan() {
|
|
uni.scanCode({
|
|
success: function(res) {
|
|
uni.navigateTo({
|
|
url: '../../goods/coupons-info-details/coupons-info-details?id=' + JSON
|
|
.parse(res.result).code
|
|
})
|
|
},
|
|
fail() {
|
|
uni.showToast({
|
|
title: '无法识别二维码',
|
|
icon: 'none',
|
|
duration: 2000
|
|
})
|
|
}
|
|
});
|
|
|
|
},
|
|
//跳转位置
|
|
goPostion() {
|
|
uni.navigateTo({
|
|
url: '/pages/user/positioning/positioning'
|
|
})
|
|
},
|
|
//门店列表
|
|
getStoreListByMerchant(item) {
|
|
uni.showLoading({
|
|
title: '加载中...'
|
|
})
|
|
|
|
let params = {
|
|
merchantId: item,
|
|
longitude: app.globalData.longitude,
|
|
latitude: app.globalData.latitude
|
|
}
|
|
getStoreListByMerchant(params).then(res => {
|
|
uni.hideLoading();
|
|
if (res.return_code == '000000') {
|
|
this.categoryList = res.return_data
|
|
} else {
|
|
this.categoryList = [];
|
|
}
|
|
})
|
|
|
|
},
|
|
//分类切换显示
|
|
showCategory(index, item) {
|
|
this.showCategoryIndex = index;
|
|
this.getStoreListByMerchant(item);
|
|
},
|
|
toCategory(e) {
|
|
uni.navigateTo({
|
|
url: '../../goods/store-list/store-details?id=' + e.id + '&juli=' + e.distance
|
|
})
|
|
// uni.navigateTo({
|
|
// url: '../../goods/goods?id=' + e
|
|
// });
|
|
},
|
|
//搜索跳转
|
|
toSearch() {
|
|
uni.navigateTo({
|
|
url: '../../goods/HM-search/HM-search'
|
|
})
|
|
// uni.showToast({title: "建议跳转到新页面做搜索功能"});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss">
|
|
.status {
|
|
width: 100%;
|
|
height: 0;
|
|
position: fixed;
|
|
z-index: 10;
|
|
background-color: #fff;
|
|
top: 0;
|
|
/* #ifdef APP-PLUS */
|
|
height: var(--status-bar-height); //覆盖样式
|
|
/* #endif */
|
|
}
|
|
|
|
button::after {
|
|
border: none
|
|
}
|
|
|
|
.loading-text {
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 60upx;
|
|
color: #979797;
|
|
font-size: 24upx;
|
|
}
|
|
|
|
.header {
|
|
width: 92%;
|
|
padding: 0 4%;
|
|
height: 100upx;
|
|
display: flex;
|
|
align-items: center;
|
|
position: fixed;
|
|
top: 0;
|
|
z-index: 10;
|
|
background-color: #0083f5;
|
|
/* #ifdef APP-PLUS */
|
|
top: var(--status-bar-height);
|
|
/* #endif */
|
|
|
|
.addr {
|
|
width: 120upx;
|
|
height: 60upx;
|
|
flex-shrink: 0;
|
|
color: #FFFFFF;
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 28upx;
|
|
.icon {
|
|
height: 60upx;
|
|
margin-right: 5upx;
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 42upx;
|
|
color: #ffc50a;
|
|
}
|
|
}
|
|
|
|
.input-box {
|
|
width: 100%;
|
|
height: 70rpx;
|
|
background-color: #f5f5f5;
|
|
border-radius: 10rpx;
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.icon {
|
|
display: flex;
|
|
align-items: center;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
width: 60upx;
|
|
height: 60upx;
|
|
font-size: 34upx;
|
|
color: #c0c0c0;
|
|
}
|
|
|
|
input {
|
|
padding-left: 28upx;
|
|
height: 28upx;
|
|
font-size: 28upx;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.icon-btn {
|
|
width: 60upx;
|
|
height: 60upx;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
|
|
.icon {
|
|
width: 60upx;
|
|
height: 60upx;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
font-size: 42upx;
|
|
background-color: transparent;
|
|
}
|
|
}
|
|
}
|
|
|
|
.place {
|
|
|
|
background-color: #ffffff;
|
|
height: 100upx;
|
|
/* #ifdef APP-PLUS */
|
|
margin-top: var(--status-bar-height);
|
|
/* #endif */
|
|
}
|
|
|
|
.category-list {
|
|
width: 100%;
|
|
background-color: #fff;
|
|
display: flex;
|
|
|
|
.left,
|
|
.right {
|
|
position: absolute;
|
|
|
|
top: 100upx;
|
|
/* #ifdef APP-PLUS */
|
|
top: calc(100upx + var(--status-bar-height));
|
|
/* #endif */
|
|
bottom: 0upx;
|
|
}
|
|
|
|
.left {
|
|
width: 24%;
|
|
left: 0upx;
|
|
background-color: #f2f2f2;
|
|
|
|
.row {
|
|
width: 100%;
|
|
height: 90upx;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.text {
|
|
width: 100%;
|
|
position: relative;
|
|
font-size: 28upx;
|
|
display: flex;
|
|
justify-content: center;
|
|
color: #3c3c3c;
|
|
|
|
.block {
|
|
position: absolute;
|
|
width: 0upx;
|
|
left: 0;
|
|
}
|
|
}
|
|
|
|
&.on {
|
|
height: 100upx;
|
|
background-color: #fff;
|
|
|
|
.text {
|
|
font-size: 30upx;
|
|
font-weight: 600;
|
|
color: #2d2d2d;
|
|
|
|
.block {
|
|
width: 10upx;
|
|
height: 80%;
|
|
top: 10%;
|
|
background-color: #0083f5;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.right {
|
|
width: 76%;
|
|
left: 24%;
|
|
|
|
.category {
|
|
width: 94%;
|
|
padding: 20upx 3%;
|
|
|
|
.banner {
|
|
width: 100%;
|
|
height: 24.262vw;
|
|
border-radius: 10upx;
|
|
overflow: hidden;
|
|
box-shadow: 0upx 5upx 20upx rgba(0, 0, 0, 0.3);
|
|
|
|
image {
|
|
width: 100%;
|
|
height: 24.262vw;
|
|
}
|
|
}
|
|
|
|
.list {
|
|
margin-top: 40upx;
|
|
width: 100%;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
|
|
.box {
|
|
width: calc(70vw / 2);
|
|
margin-bottom: 30upx;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
|
|
image {
|
|
width: 60%;
|
|
height: calc(70vw / 2 * 0.6);
|
|
}
|
|
|
|
.text {
|
|
margin-top: 5upx;
|
|
width: 80%;
|
|
display: flex;
|
|
justify-content: center;
|
|
font-size: 26upx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
|