jiangping
2024-07-26 2faa6546a9f9ddb29f81cbc9770fc25b95703695
wechat_jiaxuan/pages/store/info.js
@@ -22,20 +22,30 @@
      bottomLift: app.bottomLift
    })
    const res = wx.getMenuButtonBoundingClientRect()
    this.setData({clientHeight: res.height})
    this.setData({clientTop: res.top})
    this.setData({
      clientHeight: res.height
    })
    this.setData({
      clientTop: res.top
    })
  },
  navback() {
    wx.navigateBack()
  },
  makePhone(e) {
    const { linkPhone } = this.data.info
    wx.makePhoneCall({ phoneNumber: linkPhone })
    const {
      linkPhone
    } = this.data.info
    wx.makePhoneCall({
      phoneNumber: linkPhone
    })
  },
  callPhone(e) {
    const phone = e.currentTarget.dataset.phone
    wx.makePhoneCall({ phoneNumber: phone })
    wx.makePhoneCall({
      phoneNumber: phone
    })
  },
  handleDetail(e) {
    const id = e.currentTarget.dataset.id
@@ -44,22 +54,23 @@
    })
  },
  handleNavigation() {
    wx.getLocation({
      type: 'gcj02', //返回可以用于wx.openLocation的经纬度
      success (res) {
        const latitude = res.latitude
        const longitude = res.longitude
        wx.openLocation({
          latitude,
          longitude,
          scale: 18
        })
      }
     })
    const info = this.data.info
    const latitude = info.latitude
    const longitude = info.longitude
    wx.openLocation({
      latitude,
      longitude,
      name: info.name,
      scale: 18
    })
  },
  getDetail(id) {
    getShopDetail({shopId: id}).then(res => {
      this.setData({ info: res.data })
    getShopDetail({
      shopId: id
    }).then(res => {
      this.setData({
        info: res.data
      })
    })
  },
  onReady() {