| | |
| | | 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 |
| | |
| | | }) |
| | | }, |
| | | 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() { |