提交 1c04d2f2 作者: 龚洪江

数据切换

上级 ce2f67de
// 测试服务器
// const baseURL = 'https://testapi.sharefly.mmcuav.cn/'
// const routeURL='https://csfpg.sharefly.mmcuav.cn/'
const baseURL = 'https://testapi.sharefly.mmcuav.cn/'
// 正式服
const baseURL = "https://csfapi.mmcuav.cn/"
const routeURL='https://sharefly.mmcuav.cn/'
// const baseURL = "https://csfapi.mmcuav.cn/"
const api = {
getWebSitList:'systemservlet/website/getWebsiteList'
getWebSitList:'systemservlet/website/getWebsiteList',
flyerDotList:'flyerservlet/flyeraccount/bitmap' ,
deviceDotList:'deviceservlet/device/bitmap'
}
export {
api,
baseURL,
routeURL
}
\ No newline at end of file
......@@ -5,10 +5,10 @@
<view class="provice-title">{{ location.province }}</view>
<img src="@/assets/image/bot-arrow.png" alt="" />
</view> -->
<view class="websit-node-head-wrap">
<image src="../../static/images/map-tip.png" mode="widthFix" class="img-1"></image>
<view class="websit-node-head-wrap">
<image src="../../static/images/map-tip.png" mode="widthFix" class="img-1"></image>
<!-- <view class=" animate__animated animate__tada animate__infinite animate__delay-1s btn-img" style="background:red"></view> -->
<image src="../../static/images/go.png" mode="widthFix" class=" animate__heartBeat btn-img"></image>
<image src="../../static/images/go.png" mode="widthFix" class=" animate__heartBeat btn-img"></image>
</view>
<view class="websit-node-list-wrap">
<view class="ios-wrap">
......@@ -27,10 +27,10 @@
<view class="left-info">
<view class="head">{{ item.dizhi }}网点</view>
<view class="meta">
<view class="grade">4.{{ RandomNum(5, 9) }}</view>
<view class="grade">{{item.grade}}</view>
<view class="tip">
近天{{ RandomNum(1, 10)}}服务次数超{{
RandomNum(4, 5) * 10
近天{{item.day}}服务次数超{{
item.count
}}
</view>
</view>
......@@ -48,7 +48,7 @@
<view class="current-status">
<view class="swiper-no-swiping">
<swiper :options="swiperOptions">
<swiper-slide v-for="(item, index) in cityList" :key="index">
<swiper-slide v-for="(item, index ) in cityList" :key="index">
<view class="swiper-slide">
{{ item }}网点{{ labelList[RandomNum(0, 2)] }}
</view>
......@@ -69,7 +69,7 @@
return {
title: 'Hello',
location: {},
locationData:{
locationData: {
adcode: "440305",
city: "深圳市",
city_code: "156440300",
......@@ -86,10 +86,10 @@
}
},
onLoad(option) {
if(option.location){
if (option.location) {
}
let str = this.getQueryString("location") || JSON.stringify(this.locationData) ;
let str = this.getQueryString("location") || JSON.stringify(this.locationData);
// uni.showToast({
// title: str,
// icon:'none'
......@@ -102,22 +102,14 @@
url: "/page-home/cooperation/cooperation"
});
},
RandomNum(minNum, maxNum) {
return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
},
// 数据切换
changeTabEvent(index) {
this.currentTipIndex = index;
document.title = this.tipList[index].label;
},
getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) {
return decodeURIComponent(r[2]);
}
return null;
}
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) {
return decodeURIComponent(r[2]);
}
return null;
}
}
}
</script>
......@@ -129,7 +121,6 @@
map: null,
markers: [],
websitList: [],
// swiperOptions: {
// autoplay: {
// delay: 2000,
......@@ -166,6 +157,7 @@
},
], //数据切换
currentTipIndex: 0,
massMarks: undefined, //海量点对象
};
},
mounted() {
......@@ -207,19 +199,30 @@
});
},
setMassMarks() {
let styleObject = {
url: "https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/servicepot.png", // 图标地址
size: new AMap.Size(40, 40), // 图标大小
anchor: new AMap.Pixel(5, 5), // 图标显示位置偏移量,基准点为图标左上角
};
let massMarks = new AMap.MassMarks(this.markers, {
let styleList = [{
url: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/servicepot.png', // 图标地址
size: new AMap.Size(40, 40), // 图标大小
anchor: new AMap.Pixel(5, 5), // 图标显示位置偏移量,基准点为图标左上角
},
{
url: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/mmc1_flyer.png', // 图标地址
size: new AMap.Size(40, 40), // 图标大小
anchor: new AMap.Pixel(5, 5), // 图标显示位置偏移量,基准点为图标左上角
},
{
url: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/mmc1.png', // 图标地址
size: new AMap.Size(40, 40), // 图标大小
anchor: new AMap.Pixel(5, 5), // 图标显示位置偏移量,基准点为图标左上角
}
];
this.massMarks = new AMap.MassMarks(this.markers, {
zIndex: 5, // 海量点图层叠加的顺序
zooms: [3, 19], // 在指定地图缩放级别范围内展示海量点图层
style: styleObject, // 设置样式对象
style: styleList, // 设置样式对象
});
console.log("massMarks-->", massMarks);
console.log("massMarks-->", this.massMarks);
// 将海量点添加至地图实例
massMarks.setMap(this.map);
this.massMarks.setMap(this.map);
},
async getMarkPoint() {
let res = await this.$httpRequest({
......@@ -232,7 +235,12 @@
})
if (res.result) {
let nodeList = res.result.reduce((pre, cur) => {
let list = cur.locationList.filter((item) => item.range >= 100);
let list = cur.locationList.filter((item) => {
item.grade = '4.' + this.RandomNum(5, 9)
item.day = this.RandomNum(1, 10)
item.count = this.RandomNum(4, 5) * 10
return item.range >= 100
});
pre.push(...list);
// }
return pre;
......@@ -248,10 +256,71 @@
return {
id: index,
lnglat: [item.jd, item.wd],
style: 0
};
});
}
},
// 数据切换
async changeTabEvent(index) {
this.currentTipIndex = index;
switch (index) {
case 0:
await this.getMarkPoint()
this.massMarks.setData(this.markers)
break;
case 1:
await this.getFlyerDotList()
this.massMarks.setData(this.markers)
break;
case 2:
await this.getDeviceDotList()
this.massMarks.setData(this.markers)
break;
}
document.title = this.tipList[index].label;
},
async getFlyerDotList(data) {
let res = await this.$httpRequest({
url: this.$api.flyerDotList,
method: 'get',
data: {
lat: this.location.location.lat,
lon: this.location.location.lng,
}
})
if (res.result && res.result.length != 0) {
this.markers = res.result.slice(0, 1999).map((item, index) => {
return {
id: index,
lnglat: [item.lon, item.lat],
style: 1
};
});
}
},
async getDeviceDotList() {
let res = await this.$httpRequest({
url: this.$api.deviceDotList,
method: 'get',
data: {
lat: this.location.location.lat,
lon: this.location.location.lng,
}
})
if (res.result && res.result.length != 0) {
this.markers = res.result.map((item, index) => {
return {
id: index,
lnglat: [item.lon, item.lat],
style: 2
};
});
}
},
RandomNum(minNum, maxNum) {
return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
},
},
};
</script>
......@@ -264,7 +333,7 @@
.websit-node-list-wrap {
position: absolute;
left: 0;
top: 60%;
top: 78%;
width: 100%;
background: #f9f9f9;
border-radius: 36rpx 36rpx 0px 0px;
......@@ -396,9 +465,11 @@
left: 50%;
transform: translateX(-50%);
width: 90%;
.img-1 {
width: 100%;
}
.btn-img {
width: 84rpx;
position: absolute;
......
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>全国网点</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/h5/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/h5/static/js/chunk-vendors.ed1c0629.js></script><script src=/h5/static/js/index.2fcd7cef.js></script></body></html>
\ No newline at end of file
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/h5/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/h5/static/js/chunk-vendors.ed1c0629.js></script><script src=/h5/static/js/index.fd493a86.js></script></body></html>
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-index"],{1131:function(t,e,i){t.exports=i.p+"static/img/map-tip.67b83e54.png"},2909:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var a=s(i("6005")),n=s(i("db90")),r=s(i("06c5")),o=s(i("3427"));function s(t){return t&&t.__esModule?t:{default:t}}function d(t){return(0,a.default)(t)||(0,n.default)(t)||(0,r.default)(t)||(0,o.default)()}},3427:function(t,e,i){"use strict";function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(e,"__esModule",{value:!0}),e.default=a},"394e":function(t,e,i){"use strict";var a=i("c01a"),n=i.n(a);n.a},6005:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var a=n(i("6b75"));function n(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t))return(0,a.default)(t)}},"936b":function(t,e,i){t.exports=i.p+"static/img/go.4568a42b.png"},9498:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.websit-node-wrap[data-v-43775848]{position:relative;height:100vh}.websit-node-wrap .websit-node-list-wrap[data-v-43775848]{position:absolute;left:0;top:60%;width:100%;background:#f9f9f9;border-radius:%?36?% %?36?% 0 0}.websit-node-wrap .websit-node-list-wrap .ios-wrap[data-v-43775848]{padding:0 %?26?% %?144?% %?26?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .head-tip[data-v-43775848]{width:%?100?%;height:%?8?%;background:#d1d1d1;border-radius:%?4?%;margin:0 auto;margin-top:%?20?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .tip-tap-wrap[data-v-43775848]{display:flex;align-items:center;margin-top:%?30?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .tip-tap-wrap .tip-item[data-v-43775848]{flex:1;height:%?68?%;background:#e9e9ec;border-radius:%?8?%;font-size:%?28?%;font-weight:400;color:#000;line-height:%?68?%;text-align:center;padding:0 %?20?%;box-sizing:border-box;white-space:nowrap}.websit-node-wrap .websit-node-list-wrap .ios-wrap .tip-tap-wrap .tip-item[data-v-43775848]:not(:last-child){margin-right:%?20?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .tip-tap-wrap .tip-active[data-v-43775848]{background:linear-gradient(270deg,#1966fe,#188bfe);color:#fff}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap[data-v-43775848]{margin-top:%?40?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item[data-v-43775848]{background:#fff;border-radius:%?12?%;box-sizing:border-box;padding:%?20?% %?20?% %?20?% %?34?%;display:flex;align-items:center;margin-bottom:%?16?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .left-info[data-v-43775848]{flex:1}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .left-info .head[data-v-43775848]{font-size:%?28?%;font-weight:500;color:#1e1e1e}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .left-info .meta[data-v-43775848]{width:100%;margin-top:%?20?%;display:flex;align-items:center}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .left-info .meta .grade[data-v-43775848]{font-size:%?26?%;font-weight:600;color:#fe6000;margin-right:%?10?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .left-info .meta .tip[data-v-43775848]{font-size:%?20?%;font-weight:500;color:#fe9324;height:%?32?%;line-height:%?32?%;background:#fef8e1;border-radius:%?4?%;padding:0 %?8?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .line[data-v-43775848]{width:1px;height:%?80?%;background-color:#eaeaea;margin:0 %?16?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .right-info[data-v-43775848]{font-size:%?22?%;font-weight:400;color:#6f6f6f}.websit-node-wrap .websit-node-head-wrap[data-v-43775848]{position:fixed;top:10px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:90%}.websit-node-wrap .websit-node-head-wrap .img-1[data-v-43775848]{width:100%}.websit-node-wrap .websit-node-head-wrap .btn-img[data-v-43775848]{width:%?84?%;position:absolute;top:30%;right:%?48?%}.map-content[data-v-43775848]{width:100%;height:100vh;position:fixed;top:0;left:0}.animate__heartBeat[data-v-43775848]{-webkit-animation:heartBeat 2s infinite;animation:heartBeat 2s infinite}',""]),t.exports=e},a4fe:function(t,e,i){"use strict";i.r(e);var a=i("e27b"),n=i.n(a);for(var r in a)"default"!==r&&function(t){i.d(e,t,(function(){return a[t]}))}(r);e["default"]=n.a},aa43:function(t,e,i){"use strict";i.r(e);var a=i("bb3c"),n=i.n(a);for(var r in a)"default"!==r&&function(t){i.d(e,t,(function(){return a[t]}))}(r);e["default"]=n.a},ae5e:function(t,e,i){"use strict";i.r(e);var a=i("e983"),n=i("a4fe");for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);var o=i("aa43");for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);i("394e");var s=i("f0c5");n["default"].__module="ModuleInstance";var d=Object(s["a"])(o["default"],a["b"],a["c"],!1,null,"43775848",null,!1,a["a"],n["default"]);e["default"]=d.exports},bb3c:function(t,e,i){"use strict";i("e25e"),i("4d63"),i("ac1f"),i("25f0"),i("466d"),i("841c"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={data:function(){return{title:"Hello",location:{},locationData:{adcode:"440305",city:"深圳市",city_code:"156440300",district:"南山区",location:{lat:39.9219,lng:116.44355},name:"中国,广东省,深圳市,南山区",nation:"中国",nation_code:"156",province:"广东省"}}},onLoad:function(t){t.location;var e=this.getQueryString("location")||JSON.stringify(this.locationData);this.location=JSON.parse(e)},methods:{toAddWebsit:function(){wx.miniProgram.navigateTo({url:"/page-home/cooperation/cooperation"})},RandomNum:function(t,e){return parseInt(Math.random()*(e-t+1)+t,10)},changeTabEvent:function(t){this.currentTipIndex=t,document.title=this.tipList[t].label},getQueryString:function(t){var e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i"),i=window.location.search.substr(1).match(e);return null!=i?decodeURIComponent(i[2]):null}}};e.default=a},c01a:function(t,e,i){var a=i("9498");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("6948ccf5",a,!0,{sourceMap:!1,shadowMode:!1})},db90:function(t,e,i){"use strict";function a(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}i("a4d3"),i("e01a"),i("d28b"),i("a630"),i("d3b7"),i("3ca3"),i("ddb0"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=a},e27b:function(t,e,i){"use strict";var a=i("4ea4");i("4de4"),i("d81d"),i("13d5"),i("4e82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(i("2909"));i("96cf");var r=a(i("1da1")),o={data:function(){return{map:null,markers:[],websitList:[],tipList:[{label:"服务网点",val:1},{label:"在线飞手",val:2},{label:"无人机",val:3}],currentTipIndex:0}},mounted:function(){var t=this;if(window.AMap)this.initAmap();else{var e=document.createElement("script");e.src="https://webapi.amap.com/maps?v=1.4.10&key=d78a13e2379db4234cae886709151ddf&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.MarkerClusterer",e.onload=function(){window._AMapSecurityConfig={securityJsCode:"d78a13e2379db4234cae886709151ddf"},t.initAmap()},document.head.appendChild(e)}},beforeDestroy:function(){},methods:{initAmap:function(){var t=this;this.map=new AMap.Map("map",{zoom:6,resizeEnable:!0,center:[this.location.location.lng,this.location.location.lat]}),this.map.on("complete",(0,r.default)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log("地图加载完成!"),e.next=3,t.getMarkPoint();case 3:t.setMassMarks();case 4:case"end":return e.stop()}}),e)}))))},setMassMarks:function(){var t={url:"https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/servicepot.png",size:new AMap.Size(40,40),anchor:new AMap.Pixel(5,5)},e=new AMap.MassMarks(this.markers,{zIndex:5,zooms:[3,19],style:t});console.log("massMarks--\x3e",e),e.setMap(this.map)},getMarkPoint:function(){var t=this;return(0,r.default)(regeneratorRuntime.mark((function e(){var i,a,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$httpRequest({url:t.$api.getWebSitList,method:"get",data:{lat:t.location.location.lat,lon:t.location.location.lng}});case 2:i=e.sent,i.result&&(a=i.result.reduce((function(t,e){var i=e.locationList.filter((function(t){return t.range>=100}));return t.push.apply(t,(0,n.default)(i)),t}),[]),r=a.filter((function(t){return t.range<=1e3})),t.websitList=r.sort((function(t,e){return t.range-e.range})),t.markers=a.map((function(t,e){return{id:e,lnglat:[t.jd,t.wd]}})));case 4:case"end":return e.stop()}}),e)})))()}}};e.default=o},e983:function(t,e,i){"use strict";var a;i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return a}));var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"websit-node-wrap"},[a("v-uni-view",{staticClass:"map-content",attrs:{id:"map"}}),a("v-uni-view",{staticClass:"websit-node-head-wrap"},[a("v-uni-image",{staticClass:"img-1",attrs:{src:i("1131"),mode:"widthFix"}}),a("v-uni-image",{staticClass:" animate__heartBeat btn-img",attrs:{src:i("936b"),mode:"widthFix"}})],1),a("v-uni-view",{staticClass:"websit-node-list-wrap"},[a("v-uni-view",{staticClass:"ios-wrap"},[a("v-uni-view",{staticClass:"head-tip"}),a("v-uni-view",{staticClass:"tip-tap-wrap"},t._l(t.tipList,(function(e,i){return a("v-uni-view",{key:i,class:{"tip-item":!0,"tip-active":i===t.currentTipIndex},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.changeTabEvent(i)}}},[t._v(t._s(e.label))])})),1),a("v-uni-view",{staticClass:"websit-item-wrap"},t._l(t.websitList,(function(e,i){return a("v-uni-view",{key:i,staticClass:"websit-item"},[a("v-uni-view",{staticClass:"left-info"},[a("v-uni-view",{staticClass:"head"},[t._v(t._s(e.dizhi)+"网点")]),a("v-uni-view",{staticClass:"meta"},[a("v-uni-view",{staticClass:"grade"},[t._v("4."+t._s(t.RandomNum(5,9))+"分")]),a("v-uni-view",{staticClass:"tip"},[t._v("近天"+t._s(t.RandomNum(1,10))+"服务次数超"+t._s(10*t.RandomNum(4,5))+"次")])],1)],1),a("v-uni-view",{staticClass:"line"}),a("v-uni-view",{staticClass:"right-info"},[t._v("距你"+t._s(Number(e.range).toFixed(0))+"km")])],1)})),1)],1)],1)],1)},r=[]}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-index"],{1131:function(t,e,i){t.exports=i.p+"static/img/map-tip.67b83e54.png"},"1db7":function(t,e,i){"use strict";var a=i("ca1e"),n=i.n(a);n.a},2909:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var a=s(i("6005")),n=s(i("db90")),r=s(i("06c5")),o=s(i("3427"));function s(t){return t&&t.__esModule?t:{default:t}}function d(t){return(0,a.default)(t)||(0,n.default)(t)||(0,r.default)(t)||(0,o.default)()}},3427:function(t,e,i){"use strict";function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(e,"__esModule",{value:!0}),e.default=a},6005:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var a=n(i("6b75"));function n(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t))return(0,a.default)(t)}},"936b":function(t,e,i){t.exports=i.p+"static/img/go.4568a42b.png"},a4fe:function(t,e,i){"use strict";i.r(e);var a=i("e27b"),n=i.n(a);for(var r in a)"default"!==r&&function(t){i.d(e,t,(function(){return a[t]}))}(r);e["default"]=n.a},aa43:function(t,e,i){"use strict";i.r(e);var a=i("bb3c"),n=i.n(a);for(var r in a)"default"!==r&&function(t){i.d(e,t,(function(){return a[t]}))}(r);e["default"]=n.a},ae5e:function(t,e,i){"use strict";i.r(e);var a=i("f2de"),n=i("a4fe");for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);var o=i("aa43");for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);i("1db7");var s=i("f0c5");n["default"].__module="ModuleInstance";var d=Object(s["a"])(o["default"],a["b"],a["c"],!1,null,"0988500c",null,!1,a["a"],n["default"]);e["default"]=d.exports},bb3c:function(t,e,i){"use strict";i("4d63"),i("ac1f"),i("25f0"),i("466d"),i("841c"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={data:function(){return{title:"Hello",location:{},locationData:{adcode:"440305",city:"深圳市",city_code:"156440300",district:"南山区",location:{lat:39.9219,lng:116.44355},name:"中国,广东省,深圳市,南山区",nation:"中国",nation_code:"156",province:"广东省"}}},onLoad:function(t){t.location;var e=this.getQueryString("location")||JSON.stringify(this.locationData);this.location=JSON.parse(e)},methods:{toAddWebsit:function(){wx.miniProgram.navigateTo({url:"/page-home/cooperation/cooperation"})},changeTabEvent:function(t){this.currentTipIndex=t,document.title=this.tipList[t].label},getQueryString:function(t){var e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i"),i=window.location.search.substr(1).match(e);return null!=i?decodeURIComponent(i[2]):null}}};e.default=a},ca1e:function(t,e,i){var a=i("e290");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("6ab1c2c6",a,!0,{sourceMap:!1,shadowMode:!1})},db90:function(t,e,i){"use strict";function a(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}i("a4d3"),i("e01a"),i("d28b"),i("a630"),i("d3b7"),i("3ca3"),i("ddb0"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=a},e27b:function(t,e,i){"use strict";var a=i("4ea4");i("4de4"),i("d81d"),i("13d5"),i("4e82"),i("e25e"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(i("2909"));i("96cf");var r=a(i("1da1")),o={data:function(){return{map:null,markers:[],websitList:[],tipList:[{label:"服务网点",val:1},{label:"在线飞手",val:2},{label:"无人机",val:3}],currentTipIndex:0}},mounted:function(){var t=this;if(window.AMap)this.initAmap();else{var e=document.createElement("script");e.src="https://webapi.amap.com/maps?v=1.4.10&key=d78a13e2379db4234cae886709151ddf&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.MarkerClusterer",e.onload=function(){window._AMapSecurityConfig={securityJsCode:"d78a13e2379db4234cae886709151ddf"},t.initAmap()},document.head.appendChild(e)}},beforeDestroy:function(){},methods:{initAmap:function(){var t=this;this.map=new AMap.Map("map",{zoom:6,resizeEnable:!0,center:[this.location.location.lng,this.location.location.lat]}),this.map.on("complete",(0,r.default)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log("地图加载完成!"),e.next=3,t.getMarkPoint();case 3:t.setMassMarks();case 4:case"end":return e.stop()}}),e)}))))},setMassMarks:function(){var t={url:"https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/servicepot.png",size:new AMap.Size(40,40),anchor:new AMap.Pixel(5,5)},e=new AMap.MassMarks(this.markers,{zIndex:5,zooms:[3,19],style:t});console.log("massMarks--\x3e",e),e.setMap(this.map)},getMarkPoint:function(){var t=this;return(0,r.default)(regeneratorRuntime.mark((function e(){var i,a,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$httpRequest({url:t.$api.getWebSitList,method:"get",data:{lat:t.location.location.lat,lon:t.location.location.lng}});case 2:i=e.sent,i.result&&(a=i.result.reduce((function(e,i){var a=i.locationList.filter((function(e){return e.grade="4."+t.RandomNum(5,9),e.day=t.RandomNum(1,10),e.count=10*t.RandomNum(4,5),e.range>=100}));return e.push.apply(e,(0,n.default)(a)),e}),[]),r=a.filter((function(t){return t.range<=1e3})),t.websitList=r.sort((function(t,e){return t.range-e.range})),t.markers=a.map((function(t,e){return{id:e,lnglat:[t.jd,t.wd]}})));case 4:case"end":return e.stop()}}),e)})))()},RandomNum:function(t,e){return parseInt(Math.random()*(e-t+1)+t,10)}}};e.default=o},e290:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.websit-node-wrap[data-v-0988500c]{position:relative;height:100vh}.websit-node-wrap .websit-node-list-wrap[data-v-0988500c]{position:absolute;left:0;top:78%;width:100%;background:#f9f9f9;border-radius:%?36?% %?36?% 0 0}.websit-node-wrap .websit-node-list-wrap .ios-wrap[data-v-0988500c]{padding:0 %?26?% %?144?% %?26?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .head-tip[data-v-0988500c]{width:%?100?%;height:%?8?%;background:#d1d1d1;border-radius:%?4?%;margin:0 auto;margin-top:%?20?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .tip-tap-wrap[data-v-0988500c]{display:flex;align-items:center;margin-top:%?30?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .tip-tap-wrap .tip-item[data-v-0988500c]{flex:1;height:%?68?%;background:#e9e9ec;border-radius:%?8?%;font-size:%?28?%;font-weight:400;color:#000;line-height:%?68?%;text-align:center;padding:0 %?20?%;box-sizing:border-box;white-space:nowrap}.websit-node-wrap .websit-node-list-wrap .ios-wrap .tip-tap-wrap .tip-item[data-v-0988500c]:not(:last-child){margin-right:%?20?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .tip-tap-wrap .tip-active[data-v-0988500c]{background:linear-gradient(270deg,#1966fe,#188bfe);color:#fff}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap[data-v-0988500c]{margin-top:%?40?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item[data-v-0988500c]{background:#fff;border-radius:%?12?%;box-sizing:border-box;padding:%?20?% %?20?% %?20?% %?34?%;display:flex;align-items:center;margin-bottom:%?16?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .left-info[data-v-0988500c]{flex:1}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .left-info .head[data-v-0988500c]{font-size:%?28?%;font-weight:500;color:#1e1e1e}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .left-info .meta[data-v-0988500c]{width:100%;margin-top:%?20?%;display:flex;align-items:center}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .left-info .meta .grade[data-v-0988500c]{font-size:%?26?%;font-weight:600;color:#fe6000;margin-right:%?10?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .left-info .meta .tip[data-v-0988500c]{font-size:%?20?%;font-weight:500;color:#fe9324;height:%?32?%;line-height:%?32?%;background:#fef8e1;border-radius:%?4?%;padding:0 %?8?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .line[data-v-0988500c]{width:1px;height:%?80?%;background-color:#eaeaea;margin:0 %?16?%}.websit-node-wrap .websit-node-list-wrap .ios-wrap .websit-item-wrap .websit-item .right-info[data-v-0988500c]{font-size:%?22?%;font-weight:400;color:#6f6f6f}.websit-node-wrap .websit-node-head-wrap[data-v-0988500c]{position:fixed;top:10px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:90%}.websit-node-wrap .websit-node-head-wrap .img-1[data-v-0988500c]{width:100%}.websit-node-wrap .websit-node-head-wrap .btn-img[data-v-0988500c]{width:%?84?%;position:absolute;top:30%;right:%?48?%}.map-content[data-v-0988500c]{width:100%;height:100vh;position:fixed;top:0;left:0}.animate__heartBeat[data-v-0988500c]{-webkit-animation:heartBeat 2s infinite;animation:heartBeat 2s infinite}',""]),t.exports=e},f2de:function(t,e,i){"use strict";var a;i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return a}));var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"websit-node-wrap"},[a("v-uni-view",{staticClass:"map-content",attrs:{id:"map"}}),a("v-uni-view",{staticClass:"websit-node-head-wrap"},[a("v-uni-image",{staticClass:"img-1",attrs:{src:i("1131"),mode:"widthFix"}}),a("v-uni-image",{staticClass:" animate__heartBeat btn-img",attrs:{src:i("936b"),mode:"widthFix"}})],1),a("v-uni-view",{staticClass:"websit-node-list-wrap"},[a("v-uni-view",{staticClass:"ios-wrap"},[a("v-uni-view",{staticClass:"head-tip"}),a("v-uni-view",{staticClass:"tip-tap-wrap"},t._l(t.tipList,(function(e,i){return a("v-uni-view",{key:i,class:{"tip-item":!0,"tip-active":i===t.currentTipIndex},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.changeTabEvent(i)}}},[t._v(t._s(e.label))])})),1),a("v-uni-view",{staticClass:"websit-item-wrap"},t._l(t.websitList,(function(e,i){return a("v-uni-view",{key:i,staticClass:"websit-item"},[a("v-uni-view",{staticClass:"left-info"},[a("v-uni-view",{staticClass:"head"},[t._v(t._s(e.dizhi)+"网点")]),a("v-uni-view",{staticClass:"meta"},[a("v-uni-view",{staticClass:"grade"},[t._v(t._s(e.grade)+"分")]),a("v-uni-view",{staticClass:"tip"},[t._v("近天"+t._s(e.day)+"服务次数超"+t._s(e.count)+"次")])],1)],1),a("v-uni-view",{staticClass:"line"}),a("v-uni-view",{staticClass:"right-info"},[t._v("距你"+t._s(Number(e.range).toFixed(0))+"km")])],1)})),1)],1)],1)],1)},r=[]}}]);
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论