locationBtnClick: function () {
var pagess=this;
if (this.data.longitudeValue.length == 0 || this.data.latitudeValue.length == 0) {
this.setData({
longitudeTx: '没值',
latitudeTx: '没值'
})
}
else {
this.setData({
longitudeTx: this.data.longitudeValue,
latitudeTx: this.data.latitudeValue,
scales: 16
})
wx.request({
url: '.......', data: { },
header: { 'Content-Type': 'application/json' },
success: function(ops) {
console.log(ops.data)
pagess.setData({
arv: ops.data
})
console.log(this.data.arv)
wx.showModal({
title: '提示',
content: this.data.arv,
success: function(res) {
if (res.confirm) {
console.log('用户点击确定')
}
}
})
}
})
console.log("点击了按钮"+this.data.latitudeValue)
}
},
相似问题