Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_wxcp_app into dev
This commit is contained in:
@@ -1,20 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="AppSignIn">
|
<div class="AppSignIn">
|
||||||
<div class="title">签到记录</div>
|
<div class="title">打卡记录</div>
|
||||||
|
|
||||||
<div class="sign_list">
|
<div class="sign_list" style="overflow-y: scroll;">
|
||||||
<div class="sign_card" v-for="item in signlist" :key="item.id">
|
<div class="sign_card" v-for="item in signlist" :key="item.id">
|
||||||
<div class="sign_left">{{ item.createTime.substring(0,5) }}</div>
|
<div class="sign_left">{{ item.createTime.substring(0,5) }}</div>
|
||||||
<div class="sign_right">
|
<div class="sign_right">
|
||||||
<div class="time">{{ item.createDate }}</div>
|
<div class="time">{{ item.createDate }}</div>
|
||||||
<div class="tips">签到成功</div>
|
<div class="tips">打卡成功</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="sign_card">
|
||||||
|
<div class="sign_left">08:23</div>
|
||||||
|
<div class="sign_right">
|
||||||
|
<div class="time">2023-02-03</div>
|
||||||
|
<div class="tips">打卡成功</div>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sign_btn">
|
<div class="sign_btn">
|
||||||
<div class="btn" @click="signIn" :class="status==0? '': 'active'">
|
<div class="btn" @click="signIn" :class="status==0? '': 'active'">
|
||||||
<div>{{ status==1? '已签到':'签到'}}</div>
|
<div>{{ status==1? '已打卡':'打卡'}}</div>
|
||||||
<div>{{ time }}</div>
|
<div>{{ time }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -25,11 +32,11 @@
|
|||||||
import dayjs from "dayjs"
|
import dayjs from "dayjs"
|
||||||
import { mapState } from "vuex"
|
import { mapState } from "vuex"
|
||||||
export default {
|
export default {
|
||||||
appName: "签到",
|
appName: "打卡",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
time: '',
|
time: '',
|
||||||
status: 0, // 签到状态:0、未签到;1、已签到
|
status: 0, // 打卡状态:0、未打卡;1、已打卡
|
||||||
signlist: [],
|
signlist: [],
|
||||||
current: 1,
|
current: 1,
|
||||||
}
|
}
|
||||||
@@ -39,13 +46,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.$http.post(`/api/appwechatsigninfo/listByWxUserId?current=${this.current}`).then(res=> {
|
this.$http.post(`/api/appwechatsigninfo/listByWxUserId?current=${this.current}&size=3000`).then(res=> {
|
||||||
if(res?.data?.records) {
|
if(res?.data?.records) {
|
||||||
this.signlist = res.data.records
|
this.signlist = res.data.records
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 今天的签到状态
|
// 今天的打卡状态
|
||||||
getToday() {
|
getToday() {
|
||||||
this.$http.post(`/api/appwechatsigninfo/queryNowDetail`).then(res=> {
|
this.$http.post(`/api/appwechatsigninfo/queryNowDetail`).then(res=> {
|
||||||
if(res?.data) {
|
if(res?.data) {
|
||||||
@@ -53,26 +60,22 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 签到
|
// 打卡
|
||||||
signIn() {
|
signIn() {
|
||||||
if(this.status == 1) {
|
if(this.status == 1) {
|
||||||
return this.$u.toast("已签到,请勿重复签到!")
|
return this.$u.toast("已打卡,请勿重复打卡!")
|
||||||
}
|
}
|
||||||
this.$http.post(`/api/appwechatsigninfo/sign`).then(res=> {
|
this.$http.post(`/api/appwechatsigninfo/sign`).then(res=> {
|
||||||
if(res.code == 0) {
|
if(res.code == 0) {
|
||||||
this.$u.toast(`签到成功`)
|
this.$u.toast(`打卡成功`)
|
||||||
this.getToday()
|
this.getToday()
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
}).catch(err=> console.log(err))
|
}).catch(err=> console.log(err))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
|
||||||
this.current++
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '签到'
|
document.title = '每日打卡'
|
||||||
this.getToday()
|
this.getToday()
|
||||||
this.getList()
|
this.getList()
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
@@ -104,6 +107,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sign_list {
|
.sign_list {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
.sign_card {
|
.sign_card {
|
||||||
display: flex;
|
display: flex;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
|
|||||||
Reference in New Issue
Block a user