银花优选微信小程序修改后的最新版本代码
This commit is contained in:
54
pages/map/index.js
Normal file
54
pages/map/index.js
Normal file
@@ -0,0 +1,54 @@
|
||||
var app = getApp()
|
||||
var that=null
|
||||
var sopenFrame=null
|
||||
var areas = null;
|
||||
Page( {
|
||||
data: {
|
||||
loadingHidden:false,
|
||||
latitude:0,
|
||||
longitude:0,
|
||||
address:"",
|
||||
scale:15,
|
||||
markers: []
|
||||
},
|
||||
onReady: function(e) {
|
||||
// 使用 wx.createMapContext 获取 map 上下文
|
||||
this.mapCtx = wx.createMapContext('myMap');
|
||||
},
|
||||
onLoad: function(options) {
|
||||
|
||||
that = this
|
||||
if(options.lat&&options.lon){
|
||||
that.setData({
|
||||
latitude:options.lat,
|
||||
longitude:options.lon,
|
||||
address:options.address,
|
||||
loadingHidden:true,
|
||||
markers: [{
|
||||
id:8900,
|
||||
latitude: options.lat,
|
||||
longitude: options.lon,
|
||||
iconPath: '../../images/position-picker2.png',
|
||||
width: 80,
|
||||
height: 80,
|
||||
callout: {
|
||||
content: options.address,
|
||||
display: 'ALWAYS',
|
||||
color: '#000',
|
||||
bgColor: '#fff',
|
||||
padding: 5,
|
||||
borderRadius: 10,
|
||||
borderColor: '#f1f1f1',
|
||||
fontSize: 14,
|
||||
borderWidth: 1,
|
||||
textAlign: 'center',
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
that.rdata()
|
||||
},rdata: function() {
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
3
pages/map/index.json
Normal file
3
pages/map/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "显示地图"
|
||||
}
|
||||
13
pages/map/index.wxml
Normal file
13
pages/map/index.wxml
Normal file
@@ -0,0 +1,13 @@
|
||||
<view class="container">
|
||||
<map id="myMap" latitude="{{latitude}}" longitude="{{longitude}}" scale="{{scale}}" style="width: 100%; height: 100vh;" show-location="{{true}}" markers="{{markers}}">
|
||||
|
||||
</map>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<loading hidden="{{loadingHidden}}">
|
||||
加载中...
|
||||
</loading>
|
||||
72
pages/map/index.wxss
Normal file
72
pages/map/index.wxss
Normal file
@@ -0,0 +1,72 @@
|
||||
page{
|
||||
background: #ccc;
|
||||
}
|
||||
.container {
|
||||
position: relative;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-flex-flow: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
|
||||
}
|
||||
.footer{
|
||||
position: fixed;
|
||||
z-index: 10000;
|
||||
bottom:0;
|
||||
left:0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
.footer button{width:100%;height:2.5em; line-height: 2.5em; background:linear-gradient(to right,#00B050,#00B050); color:#fff;border-radius:0;}
|
||||
.myaddress-box{display: flex;flex-direction: column;flex-grow: 1; align-items: center;justify-content: center;width:100%; padding:0; box-sizing: border-box;}
|
||||
.myaddress-item{width:100%; padding:0.8em; box-sizing: border-box;border:1px solid #f1f1f1; background-color:#fff;border-radius:0.5em;}
|
||||
.myaddress-contact{width:100%;}
|
||||
.myaddress-bottom{width:100%;margin-top:0.5em; display: flex;flex-direction: row; align-items: center;justify-content: center;}
|
||||
.myaddress-bottom .myaddress-btn{width:100%;}
|
||||
.myaddress-bottom .myaddress-btn image{width:1.2em;height:1.2em; vertical-align: middle;}
|
||||
.fromtitle{width:100%; background-color:#fff; padding:1em; box-sizing: border-box;}
|
||||
.fromtitle text{float:left;}
|
||||
.fromtitle image{float:left;width:1.2em; height:1.2em;}
|
||||
.fromtitle image.arrowdown{float:right; }
|
||||
.myaddress-box .frombody{padding:0.5em 1em;width:100%; display: flex;flex-direction: column; align-items: center; background-color:#fff;box-sizing: border-box;}
|
||||
.myaddress-box .frombody view{position: relative;float:left; width:100%;display: flex;flex-direction:row;border-bottom:1px solid #f1f1f1;padding:0.5em 0; box-sizing: border-box;}
|
||||
.myaddress-box .frombody view text{padding:0;height:2.5em; line-height: 2.5em;}
|
||||
.myaddress-box .frombody view input{width:14em;height:2.5em; line-height: 2.5em;}
|
||||
.myaddress-box .frombody view.area input{width:12.8em;}
|
||||
.myaddress-box .frombody view.area image{position: absolute; top:1.1em; right:0; width:1.2em;height:1.2em;}
|
||||
|
||||
.myaddress-box .frombody view.upimage_box text{width: 12.8em;}
|
||||
.myaddress-box .frombody view.upimage_box .image{border: 0;}
|
||||
.myaddress-box .frombody view.upimage_box .image image{width:4em;height:4em;border:1px solid #f1f1f1;}
|
||||
.myaddress-box .frombody view.upimage0_box{flex-direction: column;}
|
||||
.myaddress-box .frombody view.upimage0_box view{border: 0;}
|
||||
.myaddress-box .frombody view.upimage0_box .upimage0_box_to{flex-direction:row}
|
||||
.myaddress-box .frombody view.upimage0_box .upimage0_box_to .image{flex-direction:column}
|
||||
.myaddress-box .frombody view.upimage0_box .upimage0_box_to .image text{font-size: 0.85em;}
|
||||
.myaddress-box .frombody view.upimage0_box .upimage0_box_to .image image{width:4em;height:4em;border:1px solid #f1f1f1;}
|
||||
.Hidden_box{ position: fixed;display: flex;align-items: center; justify-content: center; top:0; left:0; width:100%;height:100vh; background:rgba(0, 0, 0, 0.5);z-index: 2;}
|
||||
.section{position: relative; bottom:0; width:90%; height:20em; padding: 0 1em; background-color: #fff; box-sizing: border-box; border-radius:0.5em;}
|
||||
.section .close{position: absolute; right:0.5em; top:0.5em; width:1.5em; height:1.5em; padding:0.15em; background-color:#fff;border:1px solid #f1f1f1;border-radius:50%;box-sizing:border-box;}
|
||||
.section .close image{width:100%;height:100%;}
|
||||
.section-title{width:100%;height:2.5em; line-height: 2.5em; text-align: center; font-weight: 600;border-bottom:1px solid #f1f1f1;}
|
||||
.section-body{width:100%;}
|
||||
.section-body view{width:100%;display: flex;flex-direction: row; align-items: center;border-bottom:1px solid #f1f1f1;padding:0.5em 0; box-sizing: border-box; line-height:1.5em;}
|
||||
.section-body view text{color:#000;}
|
||||
.section-body view .picker_hx{color:#939393;line-height:2.5em;}
|
||||
.section-body view .picker_hx view{ float:left; position: relative; display: block; border:0;min-width:10em; padding-left:1em; box-sizing: border-box;border:1px solid #dfdfdf;border-radius:0.3em;line-height:2em;}
|
||||
.section-body view .picker_hx image{position: absolute; top:1em;right:0.6em; width:1.2em;height:1.2em;}
|
||||
.myaddress-box .frombody view.area .picker_hx{display: flex;flex-direction:row;}
|
||||
.myaddress-box .frombody view.area .picker_hx input{position: absolute; top:0.6em;right:1.6em;}
|
||||
.center{
|
||||
width: 4em;
|
||||
height: 4em;
|
||||
}
|
||||
.nodata{padding-top:1em; text-align: center; line-height: 1.5em; color:#939393;}
|
||||
.nodata image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
Reference in New Issue
Block a user