// pages/2/page2.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    detailsVisible: {
      location: false,
      method: false,
      postProcessing: false
    },
      latitude: 39.67594,
      longitude:115.815738,
      bankName: "云水洞",
      
    imageUrls: [
      'cloud://cloud1-1gyrfhlpd08770de.636c-cloud1-1gyrfhlpd08770de-1319290214/image111/云水洞.jpg',
      'cloud://cloud1-1gyrfhlpd08770de.636c-cloud1-1gyrfhlpd08770de-1319290214/image111/云水洞1.jpg',
      'cloud://cloud1-1gyrfhlpd08770de.636c-cloud1-1gyrfhlpd08770de-1319290214/image111/云水洞2.jpg'
    ],
  },
  DH1: function () {
    var that = this;
    var lat = Number(that.data.latitude);
    var lon = Number(that.data.longitude);
    var bankName = that.data.bankName;
  
    wx.openLocation({
      latitude: lat,
      longitude: lon,
      name: bankName,
      scale: 28
    });
  },
  toggleDetails: function (event) {
    var detailType = event.currentTarget.dataset.type;
    var detailsVisible = this.data.detailsVisible;
    detailsVisible[detailType] = !detailsVisible[detailType];
    this.setData({
      detailsVisible: detailsVisible
    });
    
  },
  QJ: function () {
    wx.navigateTo({
      url: '/pages/7/page7?url=https://www.720yun.com/vr/362jOswwsu1',
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    wx.getLocation({
      type: 'wgs84',
      success: function (res) {
        that.setData({
          latitude: res.latitude,
          longitude: res.longitude
        });
      }
    });
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})