1.新添商户成地图可视化页面

yj-dev
杨杰 2 years ago
parent 67e8b1bf33
commit b6b881de22
  1. 36
      App.vue
  2. 2
      index.html
  3. 780
      pages/tabBar/category/category.vue
  4. 1996
      pages/tabBar/home/home.vue
  5. 2
      pages/user/coupon/coupon.vue

@ -99,25 +99,25 @@
// #endif // #endif
// #ifdef H5 // #ifdef H5
let that = this; let that = this;
that.globalData.url = 'https://hsgcs.dctpay.com/crest'; // that.globalData.url = 'https://hsgcs.dctpay.com/crest';
that.globalData.v1url = 'https://hsgcs.dctpay.com/v1'; // that.globalData.v1url = 'https://hsgcs.dctpay.com/v1';
that.globalData.payurl = 'https://gratia-pay.dctpay.com/crest'; // that.globalData.payurl = 'https://gratia-pay.dctpay.com/crest';
that.globalData.orderurl = 'https://hsgcs.dctpay.com/order'; // that.globalData.orderurl = 'https://hsgcs.dctpay.com/order';
that.globalData.userurl = 'https://hsgcs.dctpay.com/user'; // that.globalData.userurl = 'https://hsgcs.dctpay.com/user';
that.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest'; // that.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest';
that.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/'; // that.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/';
that.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/'; // that.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/';
that.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/'; // that.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/';
// that.globalData.url = 'https://hsg.dctpay.com/crest'; that.globalData.url = 'https://hsg.dctpay.com/crest';
// that.globalData.v1url = 'https://hsg.dctpay.com/v1'; that.globalData.v1url = 'https://hsg.dctpay.com/v1';
// that.globalData.payurl = 'https://pay.dctpay.com/crest'; that.globalData.payurl = 'https://pay.dctpay.com/crest';
// that.globalData.orderurl = 'https://hsg.dctpay.com/order'; that.globalData.orderurl = 'https://hsg.dctpay.com/order';
// that.globalData.userurl = 'https://hsg.dctpay.com/user'; that.globalData.userurl = 'https://hsg.dctpay.com/user';
// that.globalData.brestUrl = 'https://hsg.dctpay.com/brest'; that.globalData.brestUrl = 'https://hsg.dctpay.com/brest';
// that.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/'; that.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/';
// that.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/'; that.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/';
// that.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/'; that.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/';
uni.getStorage({ uni.getStorage({
key: 'openId', key: 'openId',
success(e) { success(e) {

@ -18,7 +18,7 @@
<script src="https://unpkg.com/video.js/dist/video.min.js"></script> <script src="https://unpkg.com/video.js/dist/video.min.js"></script>
<script src="https://cdn.bootcss.com/socket.io/2.1.1/socket.io.js"></script> <script src="https://cdn.bootcss.com/socket.io/2.1.1/socket.io.js"></script>
<script src="https://open.95516.com/s/open/js/upsdk.js"></script> <script src="https://open.95516.com/s/open/js/upsdk.js"></script>
<script src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"></script> <!-- <script src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"></script> -->
</head> </head>
<body> <body>
<noscript> <noscript>

@ -1,603 +1,177 @@
<template> <template>
<view> <view class="content">
<!-- 状态栏 --> <map style="width: 100%; height: 90vh;" :style="{height:mapheight}" :show-location='true' :latitude="latitude"
<view class="status" :style="{position:headerPosition}"></view> :longitude="longitude" :markers="marker" :scale="scale" @markertap="markertap" @callouttap='callouttap'>
<view class="header" :style="{position:headerPosition}"> </map>
<view class="addr" @click="goPostion"> </view>
<!-- <view class="icon location"></view> --> </template>
{{city}}
<image mode="widthFix" style="width: 15px;" :src="imagewxUrl+imgadres"></image> <script>
</view> export default {
<view class="input-box"> data() {
<input placeholder="搜索门店" placeholder-style="color:#c0c0c0;" @tap="toSearch()" /> return {
<view class="icon search"></view> latitude: 23.106574, //
</view> longitude: 113.324587, //
</view> scale: 13, //
<!-- 占位 --> bottomData: false,
<view class="place"></view> marker: [{
<!-- <view class="category-list"> --> id: 0,
<view class="width100 height45l backcorfff" v-if="MerchantList != ''"> latitude: 23.13065, //
<view class="width90"> longitude: 113.3274, //
<!-- <view class="stuMenu flleft fotct" @click="showPopup() ">{{showCategoryIndex}} iconPath: '../../../static/img/user/user5.png', //
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image> rotate: 0, //
</view> --> width: 20, //
<picker mode="selector" :range="MerchantList" range-key="merchantName" @change="showCategory"> height: 20, //
<view class="font14">{{showCategoryIndex}} // title:'',//
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image> alpha: 0.9, //
</view> callout: { //
</picker> content: '天宝大厦', //
</view> color: '#ffffff', //
</view> fontSize: 14, //
borderRadius: 22, //
<view v-if="categoryList == '' " class="mart60 fotct font14 fcor666 fotct width100"> borderWidth: '10',
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres3"></image> bgColor: '#e51860', //
</view> display: 'ALWAYS', //
},
<view class="width96 height100p backcorfff border-r mart10" v-for="(box,i) in categoryList" :key="i"> },
<image mode="widthFix" :src="imageUrl+box.ext1" class="recontleft flleft mart10 border-r" {
style="max-height: 80px;" @click="toCategory(box)"> id: 1234597,
</image> latitude: 23.106574, //
<view class="recontright"> longitude: 113.324587, //
<view class="text2 width100 font18 fontwig6 paddtop15" @click="toCategory(box)"> iconPath: '../../../static/img/user/user5.png', //
{{box.storeName}} rotate: 0, //
</view> width: 20, //
<view class="width100 mart10 height22"> height: 20, //
<view class="width70 flleft text1 font13 fcor999" @click="toCategory(box)"> // title:'',//
{{box.address}} alpha: 0.9, //
</view> // label:{// //H5
<view class="width30 flright font13 fcor666 fotct" @click="seeloaction(item)"> // color:'red',//
<image mode="widthFix" :src="imagewxUrl+imgadres4" style="width: 10px;"></image> // },
{{box.distance}}km callout: { //
</view> content: '广州塔', //
</view> color: '#ffffff', //
</view> fontSize: 14, //
</view> borderRadius: 22, //
<!-- <wybPopup ref="popup" type="top" height="800" width="500" radius="6" :showCloseIcon="false"> borderWidth: '10',
<view class="fotct font18 fontwig6 fcor333 mart10 height30">筛选门店</view> bgColor: '#e51860', //
<view class="mart15"> display: 'ALWAYS', //
<view :class="item.merchantName == showCategoryIndex?'activeRefuel':'refuel'" },
v-for="(item,index) in MerchantList" :key="index" @click="showCategory(item.merchantName,item.id)"> },
{{item.merchantName}} {
</view> id: 2,
</view> latitude: 23.1338, //
</wybPopup> --> longitude: 113.33052, //
<!-- #ifdef MP--> iconPath: '../../../static/img/user/user5.png', //
<button open-type="contact"> rotate: 0, //
<image :src="imagewxUrl+imgadres5" mode="widthFix" class="xfimg"></image> width: 20, //
</button> height: 20, //
<!-- #endif --> alpha: 0.9, //
<!-- #ifdef H5--> callout: { //
<image :src="imagewxUrl+imgadres5" mode="widthFix" class="h5xfimg" @click="playPhone"></image> content: '德隆大厦', //
<!-- #endif --> color: '#ffffff', //
</view> fontSize: 14, //
</template> borderRadius: 22, //
<script> borderWidth: '10',
import { bgColor: '#e51860', //
getCouponList, display: 'ALWAYS', //
getStoreListByMerchant, },
getMerchantList, },
findByLatAndLng {
} from "../../../Utils/Api.js"; id: 3,
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; latitude: 23.136455, //
let app = getApp(); longitude: 113.329002, //
export default { iconPath: '../../../static/img/user/user5.png', //
components: { rotate: 0, //
wybPopup width: 20, //
}, height: 20, //
data() { alpha: 0.9, //
return { callout: { //
showCategoryIndex: '', content: '羊城国际商贸中心', //
showCategoryIndexId: '', color: '#ffffff', //
headerPosition: "fixed", fontSize: 14, //
imagewxUrl: app.globalData.imageWxImg, borderRadius: 22, //
imgadres: 'jt.png', borderWidth: '10',
imgadres2: 'xiala.png', bgColor: '#e51860', //
imgadres1: 'noorder.png', display: 'ALWAYS', //
imgadres4: 'dh.png', },
imgadres3: 'noorder.png', },
imgadres5: 'cusservice.png', {
city: "", id: 4,
imageUrl: app.globalData.imgUrl, latitude: 23.224781, //
// longitude: 113.293911, //
categoryList: [], iconPath: '../../../static/img/user/user5.png', //
MerchantList: [], rotate: 0, //
pageNum: 1, width: 20, //
pageSize: 10, height: 20, //
isNoMoreData: false alpha: 0.9, //
// loadingText: '' callout: { //
} content: '天瑞广场A座', //
}, color: '#ffffff', //
onPageScroll(e) { fontSize: 16, //
//iOS borderRadius: 22, //
if (e.scrollTop >= 0) { borderWidth: '12',
this.headerPosition = "fixed"; bgColor: '#e51860', //
} else { display: 'ALWAYS', //
this.headerPosition = "absolute"; },
} },
}, {
onLoad() {}, id: 5,
onShow() { latitude: 23.072726, //
this.pageNum = 1; longitude: 113.277921, //
this.categoryList = []; iconPath: '../../../static/img/user/user5.png', //
this.MerchantList = []; rotate: 0, //
if (app.globalData.cityName != '') { width: 20, //
this.city = app.globalData.qianzhuCityName; height: 20, //
this.getMerchantList(); alpha: 0.9, //
} else { callout: { //
this.postionIng(); content: '大米和小米儿童康复(广州盈丰)中心', //
} color: '#ffffff', //
fontSize: 14, //
}, borderRadius: 22, //
//page.json"onReachBottomDistance" borderWidth: '8',
onReachBottom() { bgColor: '#e51860', //
this.getStoreListByMerchant(); display: 'ALWAYS', //
}, },
methods: { },
// ],
showPopup() { }
this.$refs.popup.show(); },
}, onLoad() {
postionIng() {
let that = this; },
uni.getLocation({ computed: {
type: 'wgs84', mapheight() {
success: function(res) { let data = ''
app.globalData.latitude = res.latitude; if (this.bottomData) {
app.globalData.longitude = res.longitude; if (this.upTop) {
that.findByLatAndLng(res.longitude, res.latitude); data = '50px'
// uni.request({ } else {
// url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + res.latitude + data = '200px'
// ',' + res.longitude + '&key=7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB', }
// data: {}, } else {
// success: function(res) { data = '90vh'
// that.city = res.data.result.address_component.city.replace(//g, }
// ''); return data
// app.globalData.cityId = res.data.result.ad_info.adcode; },
// // app.globalData.cityId = '500100'; coverbottom() {
// that.getMerchantList(); let data = ''
// } if (this.bottomData) {
// }) data = '20rpx'
} } else {
}) data = '100rpx'
}, }
// return data
findByLatAndLng(item, item1) { }
let datas = { },
lng: item, methods: {
lat: item1 //
} markertap(e) {
findByLatAndLng(datas).then(res => { console.log("===你点击了标记点===", e)
if (res.return_code == '000000') { },
this.city = res.return_data.provinceName; //
app.globalData.cityName = res.return_data.provinceName; callouttap(e) {
app.globalData.qianzhuCityName = res.return_data.cityName; console.log('地图点击事件', e)
app.globalData.cityId = res.return_data.regionId; }
// app.globalData.cityId = '500100'; }
if (res.return_data.result.addressComponent.adcode) { }
this.getMerchantList(); </script>
}
}
});
},
//
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.showCategoryIndex = res.return_data[0].merchantName;
this.showCategoryIndexId = res.return_data[0].id;
this.pageNum = 1;
this.pageSize = 10;
this.isNoMoreData = false;
this.categoryList = [];
this.getStoreListByMerchant();
} else {
this.MerchantList = [];
uni.showToast({
title: '暂无数据',
icon: 'none',
duration: 2000
})
}
})
},
//
goPostion() {
uni.navigateTo({
url: '/pages/user/positioning/positioning'
})
},
//
getStoreListByMerchant() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let pagenum = this.pageNum;
let params = {
merchantId: this.showCategoryIndexId,
longitude: app.globalData.longitude,
latitude: app.globalData.latitude,
pageNum: pagenum,
pageSize: this.pageSize
}
getStoreListByMerchant(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.hideLoading();
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
this.categoryList = this.categoryList.concat(res.return_data.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.categoryList = [];
}
})
},
//
showCategory(e) {
this.showCategoryIndex = this.MerchantList[e.target.value].merchantName;
this.showCategoryIndexId = this.MerchantList[e.target.value].id;
this.pageNum = 1;
this.pageSize = 10;
this.isNoMoreData = false;
this.categoryList = [];
this.getStoreListByMerchant();
},
toCategory(e) {
uni.navigateTo({
url: '../../goods/store-list/store-details?id=' + e.id + '&juli=' + e.distance
})
// uni.navigateTo({
// url: '../../goods/goods?id=' + e
// });
uni.setStorage({
key: "store_id",
data: e.id
})
uni.setStorage({
key: "store_juli",
data: e.distance
})
},
//
toSearch() {
uni.navigateTo({
url: '../../goods/HM-search/HM-search'
})
// uni.showToast({title: ""});
},
//
playPhone() {
let cont = "本服务由惠兑礼品提供\n400-678-0738";
let content = cont.replace(/<br>/g,"\n");
uni.showModal({
title: '客服',
content: content,
success: function(res) {
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: '4006780738', //
success: function(e) {
console.log(e);
},
fail: function(e) {
console.log(e);
}
})
}
}
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #f1f3f5;
}
.h5xfimg {
width: 80rpx;
bottom: 140rpx;
position: fixed;
right: 40rpx;
}
.xfimg {
width: 80rpx;
bottom: 60rpx;
position: fixed;
right: 40rpx;
}
.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
}
.recontleft {
width: 80px;
margin-left: 10px;
}
.recontright {
margin-left: 100px;
}
.refuel {
padding: 6px 5px;
border-radius: 5px;
background-color: #f6f6f6;
color: #666666;
margin-left: 10px;
margin-top: 15px;
display: inline-block;
font-size: 13px;
width: 18%;
text-align: center;
}
.activeRefuel {
padding: 6px 5px;
border-radius: 5px;
border: 1px solid #089bf5;
color: #089bf5;
margin-left: 10px;
margin-top: 15px;
display: inline-block;
font-size: 13px;
width: 18%;
text-align: center;
}
.stuMenu {
width: 33.3%;
height: 30px;
line-height: 30px;
font-size: 14px;
margin-top: 10px;
color: #333333;
}
.stuimg {
width: 10px;
vertical-align: middle;
}
.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%;
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>

File diff suppressed because one or more lines are too long

@ -220,7 +220,7 @@
font-size: 16px; font-size: 16px;
} }
</style> </style>
<button class="download" style="height:40px;line-height: 40PX;width:100%;border:none;">立即使用</button> <button class="download" style="height:40px;line-height: 40PX;width:100%;border:none;">使用</button>
</script> </script>
</wx-open-launch-weapp> </wx-open-launch-weapp>

Loading…
Cancel
Save