diff --git a/src/project/biaopin/AppDialogue/Talk.vue b/src/project/biaopin/AppDialogue/Talk.vue index 39cb87f3..b1d4e7ce 100644 --- a/src/project/biaopin/AppDialogue/Talk.vue +++ b/src/project/biaopin/AppDialogue/Talk.vue @@ -131,7 +131,7 @@ export default { } }, computed: { - ...mapState(['user', 'token']), + ...mapState(['user', 'wxwork']), }, onLoad() { }, @@ -146,7 +146,7 @@ export default { this.getHistoryList() }, methods: { - ...mapActions(['autoLogin', 'getUserInfo', 'injectJWeixin',]), + ...mapActions(['autoLogin', 'getUserInfo', 'injectJWeixin', 'agentSign']), startRecord() { this.isStart = true this.recorder = Recorder({ @@ -356,19 +356,23 @@ export default { }) }, getLocation() { - this.injectJWeixin(['getLocation']).then(() => { - wx.getLocation({ - type: 'wgs84', - success: res => { - this.latLng = `${res.latitude},${res.longitude}` - }, - error: res => { - console.log(res) - } + this.agentSign({ + corpId: this.wxwork.config.corpId, + suiteId: this.wxwork.config.suiteId + }).then(() => { + this.injectJWeixin(['getLocation']).then(() => { + wx.getLocation({ + type: 'wgs84', + success: res => { + this.latLng = `${res.latitude},${res.longitude}` + }, + error: res => { + console.log(res) + } + }) + }).catch(e => { }) - }).catch(e => { }) - }, }, }