hookehuyr

fix 扫描功能测试

<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-23 14:54:34
* @LastEditTime: 2024-09-23 15:50:51
* @FilePath: /map-demo/src/views/bieyuan/map.vue
* @Description: 公众地图主体页面
-->
......@@ -95,6 +95,7 @@ import pageInfo from '@/views/bieyuan/info.vue'
import audioBackground1 from '@/components/audioBackground1.vue'
import { mapState, mapActions } from 'pinia'
import { mainStore } from '@/store'
import { parseQueryString } from '@/utils/tools'
const GPS = {
PI: 3.14159265358979324,
......@@ -639,12 +640,14 @@ export default {
scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码,默认二者都有
success: (res) => {
var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
// TODO: 等待真实扫描数据结构
let id = parseQueryString(result).id;
let marker_id = parseQueryString(result).marker_id;
// 跳转详情页
this.$router.push({
path: '/bieyuan/info',
query: {
id: this.$route.query.id,
marker_id: '2098987'
id,
marker_id
}
})
}
......