|
- <template>
- <view class="page">
- <view class="btn scanCodeBtn" @click="tapScan">扫码签到</view>
- <scanCode ref="refScanCode"></scanCode>
- </view>
- </template>
-
- <script>
- import scanCode from "@/components/scanCode.vue"
- export default {
- components:{scanCode},
- data() {
- return {};
- },
- methods: {
- tapScan() {
- this.$refs['refScanCode'].scanCode().then(res=>{
- if (!res) return;
- var userInfo = this.GET_GLOBAL("loginUser");
- var result = this.HTTP_GET(
- "learun/adms/PersonnelManagement/DutySchedule/scan",
- {
- userid: userInfo.userId,
- dutyid: res.result,
- },
- "签到时出错"
- ).then(res1=>{
- this.TOAST(res1.result)
- })
- })
- },
- },
- };
- </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>
|