Commit df3e39b9 by 李嘉林

扫码核验

parent 7cf72f4c
......@@ -22,6 +22,7 @@
"pages/wo/checkHistory/main",
"pages/wo/diningPlace/main",
"pages/wo/reportTheLoss/main",
"pages/wo/verification/main",
"pages/wxArticle/main"
],
"usingComponents": {},
......
......@@ -227,6 +227,11 @@ export default {
} catch (e) {
console.log('存入openid失败',e)
}
console.log(this.$store.state.mixid,'mixid------230')
//冬奥会测试赛(mixid=CL)定制一键登录直接返回不用手机号
if(this.$store.state.mixid == 'antgood') {
res.data.data.isHaveUnion = "true"
}
if (res.data.data.isHaveUnion == "true") {
//有账号
this.backParams += `&sessionid=${
......
<template>
<!-- 核验 -->
<div class="verification">
<div class="top">
<div class="topMain flex">
<div class="scan flex" @click="scanCode">
<i class="iconfont icon-richscan_icon"></i>
</div>
<div class="ipt">
<input
type="text"
name=""
value=""
v-model="checkText"
placeholder="输入人员核验码"
/>
</div>
<div class="checkBtn flex" @click="toCheck">核验</div>
</div>
</div>
<div class="userInfo">
<div class="img">
<image
mode="widthFix"
src="http://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/f96b596d-e1e4-43c1-b707-226ff7d107bd.png"
alt=""
></image>
</div>
<div class="cell flex">
<div class="label">姓名</div>
<div class="val">张三</div>
</div>
<div class="cell flex">
<div class="label">单位</div>
<div class="val">张家口市公安局</div>
</div>
<div class="cell flex">
<div class="label">身份</div>
<div class="val">工作人员</div>
</div>
<div class="cell flex">
<div class="label">工作地点</div>
<div class="val">云顶</div>
</div>
<div class="cell flex">
<div class="label">就餐地点</div>
<div class="val">云顶大酒店1层</div>
</div>
</div>
<div class="seat"></div>
<div class="btm flex">
<div class="btn" @click="confirm">再扫一次</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: "verification",
data() {
return {
checkText: "",
};
},
components: {},
computed: {},
onReady() {
console.log("---onready");
wx.setNavigationBarTitle({ title: "核验" });
},
onLoad() {
console.log("---onLoad");
},
onShow() {
console.log("---onShow");
},
methods: {
toCheck() {
wx.showLoading({
title: "加载中...",
});
setTimeout(() => {
wx.hideLoading();
}, 500);
},
confirm() {
this.scanCode();
},
scanCode() {
let _this = this;
// 允许从相机和相册扫码
wx.showLoading({
title: "加载中...",
});
wx.scanCode({
success(res) {
console.log(res, "---success");
_this.checkText = res.result;
},
fail(res) {
wx.showToast({
title: "扫码失败",
icon: "error",
duration: 1000,
});
console.log(res,'----fail');
},
complete(res) {
console.log(res,'----res')
wx.hideLoading();
},
});
},
},
};
</script>
<style lang="scss" scoped>
.verification {
.top {
padding: 10px 14px;
.topMain {
align-items: center;
justify-content: space-between;
border: 1px solid #d8d8d8;
border-radius: 4px;
padding-right: 6px;
.scan {
align-items: center;
justify-content: center;
border-right: 1px solid #d8d8d8;
width: 44px;
height: 44px;
i {
color: #229df1;
font-size: 23px;
}
}
.ipt {
flex: 1;
margin: 0 10px;
font-size: 16px;
}
.checkBtn {
align-items: center;
justify-content: center;
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
background: #229df1;
border-radius: 6px;
color: #ffffff;
padding: 0 12px;
height: 34px;
}
}
border-bottom: 10px solid #f6f7f9;
}
.userInfo {
.img {
width: 104px;
height: 128px;
margin: 10px auto;
image {
width: 100%;
height: 100%;
}
}
.cell {
padding: 12px 20px;
background: #fff;
border-bottom: 1px solid #d8d8d8;
align-items: center;
justify-content: space-between;
.label {
font-size: 15px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.val {
width: 70%;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
text-align: right;
}
}
}
.seat {
width: 100%;
height: 60px;
}
.btm {
position: fixed;
bottom: 0;
height: 60px;
background: #fff;
width: 100%;
justify-content: center;
align-items: center;
padding-bottom: 10px;
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 90%;
height: 46px;
border-radius: 4px;
color: #fff;
background: #229df1;
}
}
}
</style>
import Vue from 'vue'
import App from './index'
const app = new Vue(App)
app.$mount()
{
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment