Browse Source

修改航拍链接跳转逻辑

master
王健 4 years ago
parent
commit
75a49a44ac
  1. 3
      app.json
  2. 13
      components/detail-announcement/detail-announcement.js
  3. 2
      components/detail-announcement/detail-announcement.wxml
  4. 68
      pages/link/link.js
  5. 3
      pages/link/link.json
  6. 3
      pages/link/link.wxml
  7. 1
      pages/link/link.wxss

3
app.json

@ -20,7 +20,8 @@
"pages/about/about",
"pages/calculation-detail/calculation-detail",
"pages/lookStay-detail/lookStay-detail",
"pages/preview/preview"
"pages/preview/preview",
"pages/link/link"
],
"permission": {
"scope.userLocation": {

13
components/detail-announcement/detail-announcement.js

@ -56,6 +56,19 @@ Component({
})
}
},
preview() {
if (this.properties.info.aerialLink) {
wx.navigateTo({
url: '/pages/link/link?src=' + this.properties.info.aerialLink,
})
} else {
wx.showToast({
title: '暂无资料可预览',
icon: 'none',
duration: 2000
})
}
},
//导航
navigato() {
var proposedseriaId = this.properties.info.proposedseriaId

2
components/detail-announcement/detail-announcement.wxml

@ -66,6 +66,8 @@
</view>
<view class="list-info-item">其他资料:<text class="see" bindtap='previewImage' data-type="otherInfo">点击查看</text></view>
</view>
<view class="list-info-item">航拍全景:<text class="see" bindtap='preview'>点击查看</text>
</view>
</view>
<view class="list">

68
pages/link/link.js

@ -0,0 +1,68 @@
// pages/link/link.js
Page({
/**
* 页面的初始数据
*/
data: {
src: ""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
src: options.src
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

3
pages/link/link.json

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

3
pages/link/link.wxml

@ -0,0 +1,3 @@
<!--pages/link/link.wxml-->
<!-- <text>pages/link/link.wxml</text> -->
<web-view src="{{src}}"></web-view>

1
pages/link/link.wxss

@ -0,0 +1 @@
/* pages/link/link.wxss */
Loading…
Cancel
Save