浏览代码

扫码优化

wulanhaote
庞东旭 2 年前
父节点
当前提交
78024603f2
共有 4 个文件被更改,包括 41 次插入18 次删除
  1. +1
    -1
      src/components/qrcode/Scaner.vue
  2. +19
    -4
      src/views/lawEnforcement/retrospect/retrospectDetail.vue
  3. +21
    -13
      src/views/lawEnforcement/retrospect/scan.vue
  4. 二进制
      static/images/lawEnforcement/icon/close.png

+ 1
- 1
src/components/qrcode/Scaner.vue 查看文件

@@ -254,7 +254,7 @@ export default {
display: inline-block;
height: 24PX;
width: 24PX;
/*background: url('../assets/close.png') no-repeat center;*/
background: url('../../../static/images/lawEnforcement/icon/close.png') no-repeat center;
background-size: auto 100%;
position: absolute;
right: 8PX;


+ 19
- 4
src/views/lawEnforcement/retrospect/retrospectDetail.vue 查看文件

@@ -23,11 +23,11 @@
<div class="main">

<div class="main_box">
<a href="http://y.acexe.cn?q=10946481001086181062569234199632" style="font-size: 14px;display: block;width: 100%;text-align: center;">http://y.acexe.cn?q=10946481001086181062569234199632</a>
<a style="font-size: 14px;display: block;width: 100%;text-align: center;">{{scanLink}}</a>
</div>

<div class="iframe-wrap">
<iframe id="iframe" src="http://y.acexe.cn?q=10946481001086181062569234199632" class="iframe" width="100%" frameborder="0"></iframe>
<div class="iframe-wrap" v-if="scanLink.indexOf('http')>0">
<iframe id="iframe" :src="scanLink" class="iframe" width="100%" frameborder="0"></iframe>
</div>

<!-- <div class="main_box center_box" style="margin-top: 10px;">-->
@@ -60,7 +60,8 @@
</template>

<script>
import { getScheme } from "@/api/lawEnforcement/index";
import {getScheme, getSurveyByCaseId} from "@/api/lawEnforcement/index";
import Cookies from "js-cookie";
export default {
name: "programmeDetail",
data() {
@@ -84,6 +85,8 @@
activeNames: ['1'],
activeNames1: ['1'],
activeNames2: ['1'],

scanLink:'',
};
},
created() {
@@ -99,6 +102,18 @@
window.history.go(-1)
}
},
watch: {
$route (to, from ) {
// 监听路由变化, 实现类似 小程序的 onShow 事件
if (to.path === '/lawEnforcement/retrospectDetail') {
// do anything you want
if (Cookies.get('scanLink')){
this.scanLink = Cookies.get('scanLink');
Cookies.remove('scanLink')
}
}
}
},
}
</script>



+ 21
- 13
src/views/lawEnforcement/retrospect/scan.vue 查看文件

@@ -2,7 +2,7 @@
<div class="scan">
<div class="nav">
<a class="close" @click="() => $router.go(-1)"></a>
<p class="title">Scan QRcode</p>
<p class="title">扫一扫</p>
</div>
<div class="scroll-container">
<Scaner
@@ -19,6 +19,7 @@
<script>

import Scaner from '@/components/qrcode//Scaner';
import Cookies from "js-cookie";

export default {
name: 'Scan',
@@ -35,7 +36,10 @@ export default {
codeScanned(code) {
this.scanned = code;
setTimeout(() => {
alert(`扫码解析成功: ${code}`);
// alert(`扫码解析成功: ${code}`);
Cookies.remove('scanLink')
Cookies.set("scanLink", code);
history.back(-1);
}, 200)
},
errorCaptured(error) {
@@ -80,29 +84,33 @@ export default {
width: 100%;
}
.scan .nav {
width: 100%;
height: 48PX;
line-height: 48PX;
height: 116px;
background: url('../../../../static/images/lawEnforcement/new/list_head.png') no-repeat;
background-size: 100% 100%;
position: fixed;
top: 0;
left: 0;
width: 100%;
font-size: 36px;
line-height: 116px;
text-align: center;
color: #fff;
z-index: 999;
}
.scan .nav .title {
padding: 0;
margin: 0;
font-size: 16PX;
color: #FFFFFF;
background: rebeccapurple;
text-align: center;
}
.scan .nav .close {
display: inline-block;
height: 22PX;
width: 22PX;
background: url('../../../assets/images/sunVillage_info/list_icon_5.png') no-repeat center;
background-size: auto 100%;
width: 24px;
height: 43.2px;
background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
background-size: 20px 36px;
position: absolute;
left: 16PX;
top: 14PX;
left: 38px;
top: 36px;
}
</style>

二进制
static/images/lawEnforcement/icon/close.png 查看文件

之前 之后
宽度: 48  |  高度: 48  |  大小: 413 B

正在加载...
取消
保存