登录
This commit is contained in:
@@ -45,12 +45,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiLogin ref="login"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {mapState} from "vuex";
|
||||
import {mapActions, mapState} from "vuex";
|
||||
const recorderManager = uni.getRecorderManager();
|
||||
const innerAudioContext = uni.createInnerAudioContext();
|
||||
innerAudioContext.autoplay = true;
|
||||
@@ -85,28 +86,30 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
...mapState(['user', 'token']),
|
||||
},
|
||||
onLoad() {
|
||||
this.autoLogin().then(() => {
|
||||
this.getHistoryList()
|
||||
uni.getLocation({
|
||||
type: 'wgs84', // 返回可以用于uni.openLocation的经纬度,默认为wgs84的gps坐标
|
||||
success : (res) => {
|
||||
let location = `${res.latitude}, ${res.longitude}`
|
||||
this.$instance.post(`/admin/area/reverseGeocoding?location=${location}`).then(res => {
|
||||
if(res && res.code == 0){
|
||||
this.areaId = res.data.result.addressComponent.adcode + '000000'
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: (error) => {
|
||||
console.log('获取位置失败:', error);
|
||||
}
|
||||
});
|
||||
})
|
||||
recorderManager.onStop((res)=> {
|
||||
console.log(res)
|
||||
this.upLoad(res.tempFilePath)
|
||||
});
|
||||
this.getHistoryList()
|
||||
uni.getLocation({
|
||||
type: 'wgs84', // 返回可以用于uni.openLocation的经纬度,默认为wgs84的gps坐标
|
||||
success : (res) => {
|
||||
let location = `${res.latitude}, ${res.longitude}`
|
||||
this.$instance.post(`/admin/area/reverseGeocoding?location=${location}`).then(res => {
|
||||
if(res && res.code == 0){
|
||||
this.areaId = res.data.result.addressComponent.adcode + '000000'
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: (error) => {
|
||||
console.log('获取位置失败:', error);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
if(this.current > this.pages) {
|
||||
@@ -116,6 +119,7 @@ export default {
|
||||
this.getHistoryList()
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['autoLogin']),
|
||||
startRecord() {
|
||||
if(this.isFlag) return
|
||||
this.isStart = true
|
||||
|
||||
Reference in New Issue
Block a user