Authored by 肖亚东

地图功能开发

... ... @@ -12,7 +12,8 @@
"pages/brands/brands",
"pages/brands/brandDetail",
"pages/webview/webview",
"pages/bindPhoneNumber/bindPhoneNumber"
"pages/bindPhoneNumber/bindPhoneNumber",
"pages/activity/map"
],
"window": {
"navigationBarTextStyle": "white",
... ...
... ... @@ -29,7 +29,17 @@ Component({
*/
methods: {
jump(event) {
this.triggerEvent('jumpMap');
let that = this
wx.getStorage({
key: 'map',
success: function (res) {
if (res.data.length > 0) {
wx.navigateTo({
url: '/pages/activity/map?mapUrl=' + res.data
})
}
}
})
}
}
})
... ...
... ... @@ -82,12 +82,6 @@ Page({
// }
},
jumpMap() {
wx.navigateTo({
url: `../webview/webview?url=https://activity.yoho.cn/feature/507.html?share_id=2647`,
})
},
onHide: function() {
//Do some when page hide.
... ...
... ... @@ -10,5 +10,5 @@
</block>
</block>
<map-animation bottom="40" bind:jumpMap="jumpMap"></map-animation>
<map-animation bottom="40"></map-animation>
</view>
\ No newline at end of file
... ...
Page({
data: {
mapUrl: '',
},
onLoad: function(options) {
//Do some initialize when page load.
let mapUrl = options.mapUrl;
this.setData({
mapUrl
})
},
onReady: function() {
//Do some when page ready.
},
onShow: function() {
//Do some when page show.
},
onHide: function() {
//Do some when page hide.
},
onUnload: function() {
//Do some when page unload.
},
onPullDownRefresh: function() {
//Do some when page pull down.
}
})
\ No newline at end of file
... ...
{
"usingComponents": {
}
}
\ No newline at end of file
... ...
<image src="{{mapUrl}}" class="map-image" mode="aspectFit"></image>
... ...
.map-image {
width: 750rpx;
height: 667rpx;
}
\ No newline at end of file
... ...
... ... @@ -125,13 +125,6 @@ Page({
handlerMove(){
},
jumpMap() {
wx.navigateTo({
url: `../webview/webview?url=https://activity.yoho.cn/feature/507.html?share_id=2647`,
})
},
})
function data_letter_sort(data) {
... ...
... ... @@ -35,6 +35,6 @@
</view>
</view>
<map-animation bottom="100" bind:jumpMap="jumpMap"></map-animation>
<map-animation bottom="100"></map-animation>
</block>
... ...
... ... @@ -49,6 +49,10 @@ Page({
key: "social",
data: floorData.social
});
wx.setStorage({
key: "map",
data: floorData.map
});
}
})
.catch(error => {
... ...