Browse Source

修改扫码入企扫码功能兼容市监二维码

统计分析页面路由补充
v3
chenrui 2 years ago
parent
commit
80fa503aaf
  1. 3
      src/views/common/analyse.vue
  2. 7
      src/views/enforce/scanQrCode.vue

3
src/views/common/analyse.vue

@ -345,7 +345,8 @@
onBeforeUnmount(() => { onBeforeUnmount(() => {
// 当前路由不是首页,且用户确认离开时 // 当前路由不是首页,且用户确认离开时
router.replace('/enforceHome'); // 替换到首页 // 替换到首页
router.replace('/enforceHome');
}); });
onUnmounted(() => { onUnmounted(() => {

7
src/views/enforce/scanQrCode.vue

@ -163,8 +163,9 @@
console.log("=========== 扫码返回 ===========") console.log("=========== 扫码返回 ===========")
console.log(res) console.log(res)
//TODO 判断是否是市监 //TODO 判断是否是市监
if(isHttpLink(res)){ if(isHttpLink(res.resultStr)){
getEnterpriseInfoBySj({"url":res},success =>{
getEnterpriseInfoBySj({"url":res.resultStr},success =>{
if (success.success) { if (success.success) {
router.push({ router.push({
path: "/enterpriseScanPreview", path: "/enterpriseScanPreview",
@ -180,6 +181,7 @@
}) })
} }
},error =>{}) },error =>{})
}else{ }else{
const scanObj = JSON.parse(res.resultStr); const scanObj = JSON.parse(res.resultStr);
// 判断二维码是否过期, 如果已过期则跳转提示页 // 判断二维码是否过期, 如果已过期则跳转提示页
@ -288,7 +290,6 @@ const isHttpLink = (url) =>{
<script> <script>
//不扫码企业筛选弹窗 //不扫码企业筛选弹窗
import Popup from '@/views/enforce/noScanFilter.vue'; import Popup from '@/views/enforce/noScanFilter.vue';
import { error } from "echarts/types/src/util/log.js";
export default { export default {
components: { components: {

Loading…
Cancel
Save