/** wx.chooseLocation({ success: function (res) { console.log("簽到", res) if (res.latitude && res.longitude) { that.setData({ 'signInObj.signInName': res.name,//地址名 'signInObj.signInAddress': res.address,//地址 'signInObj.signInLatitude': res.latitude,//緯度 'signInObj.signInLongitude': res.longitude,//經度 'signInObj.signInState': "已簽到",//簽到標記 'signInObj.signInTime': util.serverFormatTime(new Date()), signInTime: util.frontFormatTime(new Date()) }) } else { wx.showModal({ confirmColor: '#2c89da', cancelColor: '#515151', confirmText: '好的', content: '沒有經緯度將無法提交,請打開手機GPS定位再試', showCancel: false, title: '沒有獲取到經緯度信息', success: (result) => { }, fail: (res) => { }, complete: (res) => { }, }) } }, fail: function (res) { wx.showToast({ title: '獲取位置失敗!', duration: 1800, icon: 'none', mask: false, }) console.error("getLocation:fail"); }, complete: function (res) { // console.log("獲取簽到位置信,結束!"); } }); */