提交 4c468abb 作者: 龚洪江

地图优化

上级 35da9398
{
"systemParams": "win32-x64-93",
"modulesFolders": [
"node_modules"
],
"flags": [],
"linkedModules": [],
"topLevelPatterns": [
"weixin-js-sdk@^1.6.0"
],
"lockfileEntries": {
"weixin-js-sdk@^1.6.0": "https://registry.yarnpkg.com/weixin-js-sdk/-/weixin-js-sdk-1.6.0.tgz#ff50484d8118ce1208f11248cf4a1c0831577514"
},
"files": [],
"artifacts": {}
}
\ No newline at end of file
微信官方 js-sdk
----
说明: 仅将官方 js-sdk 发布到 npm,支持 CommonJS,便于 browserify, webpack 等直接使用
js源码: https://res.wx.qq.com/open/js/jweixin-1.6.0.js
官方使用说明: https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115
安装:
npm install weixin-js-sdk
使用:
var wx = require('weixin-js-sdk');
### Old versions
* [1.0.0](https://github.com/yanxi-me/weixin-js-sdk/tree/1.0.0)
* [1.2.0](https://github.com/yanxi-me/weixin-js-sdk/tree/1.2.0)
{
"name": "weixin-js-sdk",
"version": "1.6.0",
"main": "index.js",
"description": "微信官方 js-sdk CommonJS 版",
"repository": {
"type": "git",
"url": "https://github.com/yanxi-com/weixin-js-sdk.git"
}
}
{
"dependencies": {
"weixin-js-sdk": "^1.6.0"
}
}
......@@ -8,9 +8,9 @@
<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" @click="toAddWebsit"></image>
</view>
<view class="websit-node-list-wrap">
<view class="websit-node-list-wrap" >
<view class="ios-wrap">
<view class="head-tip"></view>
<!-- <view class="title">服务网点</view> -->
......@@ -29,7 +29,7 @@
<view class="flyer-head" v-if="currentTipIndex===1">
<div class="name">{{item.flyerName}}</div>
<div class="phone">
{{item.phoneNum.substring(0,3)+'****'+item.phoneNum.substring(item.phoneNum.length-4,item.phoneNum.length)}}
{{item.phoneNum |getPhoneStr }}
</div>
</view>
<view class="uav-head" v-if="currentTipIndex===2">
......@@ -76,6 +76,7 @@
</template>
<script>
import wx from 'weixin-js-sdk';
export default {
data() {
return {
......@@ -94,7 +95,10 @@
nation: "中国",
nation_code: "156",
province: "广东省",
},
isHeight:false,
websitHeight:0
}
},
onLoad(option) {
......@@ -108,6 +112,23 @@
// });
this.location = JSON.parse(str);
},
filters:{
getPhoneStr(value){
let str=String(value)
return str.substring(0,3)+'****'+str.substring(str.length-4,str.length)
}
},
onPageScroll(e) {
// console.log('滚动事件--->',e)
// let height= uni.getSystemInfoSync().screenHeight
// console.log('高度-->',height)
// if(height-e.scrollTop<=200){
// this.isHeight=true
// this.websitHeight=height-200
// }else{
// this.isHeight=false
// }
},
onReachBottom() {
if (this.currentTipIndex != 0) {
console.log('触底了-->')
......@@ -223,13 +244,14 @@
initAmap() {
this.map = new AMap.Map('map', {
// 显示地图缩放级别
zoom: 8,
zoom: 6,
// 地图中心点
resizeEnable: true,
center: [this.location.location.lng, this.location.location.lat],
});
this.map.on("complete", async () => {
console.log("地图加载完成!");
console.log("地图加载完成!",this.map);
// this.map.setCenterOffset(0.5,0.3)
await this.getMarkPoint();
this.setMassMarks();
});
......@@ -238,17 +260,17 @@
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), // 图标显示位置偏移量,基准点为图标左上角
anchor: new AMap.Pixel(20, 20), // 图标显示位置偏移量,基准点为图标左上角
},
{
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), // 图标显示位置偏移量,基准点为图标左上角
anchor: new AMap.Pixel(20, 20), // 图标显示位置偏移量,基准点为图标左上角
},
{
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), // 图标显示位置偏移量,基准点为图标左上角
anchor: new AMap.Pixel(20, 20), // 图标显示位置偏移量,基准点为图标左上角
}
];
this.massMarks = new AMap.MassMarks(this.markers, {
......@@ -302,15 +324,18 @@
this.currentTipIndex = index;
switch (index) {
case 0:
this.map.setZoom(6)
await this.getMarkPoint()
this.massMarks.setData(this.markers)
break;
case 1:
this.map.setZoom(8)
this.query.pageNo = 1
await this.getFlyerDotList()
this.massMarks.setData(this.markers)
break;
case 2:
this.map.setZoom(8)
this.query.pageNo = 1
await this.getDeviceDotList()
this.massMarks.setData(this.markers)
......@@ -545,7 +570,14 @@
}
}
}
.websit-node-list-height{
// height: 800rpx;
position: fixed;
top: 200rpx;
bottom: 0;
width: 100%;
overflow: auto;
}
.websit-node-head-wrap {
position: fixed;
top: 10px;
......
<!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.7e38ba15.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.f4f8a04d.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
weixin-js-sdk@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/weixin-js-sdk/-/weixin-js-sdk-1.6.0.tgz#ff50484d8118ce1208f11248cf4a1c0831577514"
integrity sha512-3IYQH7aalJGFJrwdT3epvTdR1MboMiH7vIZ5BRL2eYOJ12BNah7csoMkmSZzkq1+l92sSq29XdTCVjCJoK2sBQ==
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论