wechatapp/pages/myObj/myObj.js

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

// pages/myObj/myObj.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    lat: '29.600073',
    lng: '106.236894',
    address:"重庆璧山区璧铜路4号"
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.data.lng = options.lng;
    this.data.lat = options.lat;
    this.data.address = options.address;
    wx.openLocation({
      type: 'gcj02',
      longitude: Number(this.data.lng),
      latitude: Number(this.data.lat),
      name: this.data.address,
      address: this.data.address
    })
  },

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

  },

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

  },

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

  },

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

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
后面还有 17 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。