|
|
@@ -1,45 +1,46 @@ |
|
|
|
<template> |
|
|
|
<view class="page"> |
|
|
|
<view class="btn" @click="tapScan"> 扫码 </view> |
|
|
|
<view class="btn scanCodeBtn" @click="tapScan">扫码签到</view> |
|
|
|
<scanCode ref="refScanCode"></scanCode> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import scanCodeFun from "@/common/js/scanCodeFun.js"; |
|
|
|
import scanCode from "@/components/scanCode.vue" |
|
|
|
export default { |
|
|
|
components:{scanCode}, |
|
|
|
data() { |
|
|
|
return {}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
init() { |
|
|
|
let _this = this; |
|
|
|
scanCodeFun.scanCodeFun().then((res) => { |
|
|
|
if (!res) return; |
|
|
|
var userInfo = this.GET_GLOBAL("loginUser"); |
|
|
|
var result = this.HTTP_GET( |
|
|
|
"learun/adms/PersonnelManagement/MeetingSignInRecord/scan", |
|
|
|
{ |
|
|
|
userid: userInfo.userId, |
|
|
|
meetid: res.result, |
|
|
|
}, |
|
|
|
"签到时出错" |
|
|
|
).then(res1=>{this.TOAST(res1.result )}) |
|
|
|
}); |
|
|
|
}, |
|
|
|
tapScan() { |
|
|
|
this.init(); |
|
|
|
this.$refs['refScanCode'].scanCode().then(res=>{ |
|
|
|
if (!res) return; |
|
|
|
var userInfo = this.GET_GLOBAL("loginUser"); |
|
|
|
var result = this.HTTP_GET( |
|
|
|
"learun/adms/PersonnelManagement/MeetingSignInRecord/scan", |
|
|
|
{ |
|
|
|
userid: userInfo.userId, |
|
|
|
meetid: res.result, |
|
|
|
}, |
|
|
|
"签到时出错" |
|
|
|
).then(res1=>{ |
|
|
|
this.TOAST(res1.result) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
let _this = this; |
|
|
|
setTimeout(function () { |
|
|
|
_this.init(); |
|
|
|
}, 100); |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
@import "~@/common/css/sidepage.less"; |
|
|
|
@import "~@/common/css/customlist.less"; |
|
|
|
.scanCodeBtn{ |
|
|
|
width: 120px; |
|
|
|
height: 120px; |
|
|
|
border-radius: 50%; |
|
|
|
line-height: 120px; |
|
|
|
margin-top: 180px; |
|
|
|
} |
|
|
|
</style> |