UNPKG

hera-cli

Version:
27 lines (25 loc) 535 B
var util = require('../../../../util/util.js') var formatLocation = util.formatLocation Page({ data: { hasLocation: false }, chooseLocation: function () { var that = this wx.chooseLocation({ success: function (res) { console.log(res) that.setData({ hasLocation: true, location: formatLocation(res.longitude, res.latitude), locationAddress: res.address }) } }) }, clear: function () { this.setData({ hasLocation: false }) } })