You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<template>
|
|
|
|
<u-navbar
|
|
|
|
:title="title"
|
|
|
|
:auto-back="true"
|
|
|
|
left-icon-size="40rpx"
|
|
|
|
:safe-area-inset-top="true"
|
|
|
|
:placeholder="true"
|
|
|
|
bgColor="#fff"
|
|
|
|
></u-navbar>
|
|
|
|
<view class="body-background"></view>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import {imghost} from "@/config/host";
|
|
|
|
import api from "@/utils/functions";
|
|
|
|
import {activitySign} from "../../api/activity";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
computed: {},
|
|
|
|
components: {
|
|
|
|
|
|
|
|
},
|
|
|
|
onLoad(option) {
|
|
|
|
this.activityId = option.id;
|
|
|
|
this.signIn();
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
title: '扫码签到',
|
|
|
|
activityId:'',
|
|
|
|
staticImage: {
|
|
|
|
bg: imghost + '/BG.png',
|
|
|
|
fxxDone: imghost + '/fxx-done.png',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
signIn(){
|
|
|
|
uni.showLoading({title:'签到中'});
|
|
|
|
activitySign({activity_id:this.activityId}).then(res => {
|
|
|
|
uni.hideLoading();
|
|
|
|
if(res.code === 200){
|
|
|
|
api.navTo('/pages/ScanCode/done')
|
|
|
|
}else{
|
|
|
|
api.error(res.msg)
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch(err => {
|
|
|
|
uni.hideLoading();
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
|
|
</style>
|