diff --git a/api/api.js b/api/api.js index fd71e1d..7967913 100644 --- a/api/api.js +++ b/api/api.js @@ -58,6 +58,8 @@ const config = { teamApply: { url: '/team/apply', method: 'POST', + auth: true, + limit : 800, }, @@ -65,6 +67,8 @@ const config = { authApply: { url: '/auth/apply', method: 'POST', + auth: true, + limit : 800, }, // 实名认证详情 authInfo: { @@ -77,12 +81,22 @@ const config = { clock: { url: '/clock/in', method: 'POST', + showLoading : true, + auth: true, + limit : 800, }, // 打卡详情列表 clockList: { url: '/clock/in/log', method: 'GET', }, + // 打卡统计 + clockTotal: { + url: '/clock/in/total', + method: 'GET', + showLoading : true, + debounce : 400, + }, } diff --git a/config.js b/config.js index 178d43d..a328ebc 100644 --- a/config.js +++ b/config.js @@ -6,7 +6,7 @@ import uvUI from '@/uni_modules/uv-ui-tools' Vue.use(uvUI); // 当前环境 -const type = 'prod' +const type = 'dev' // 环境配置 diff --git a/pages/subPack/human/human.vue b/pages/subPack/human/human.vue index c1d7367..1882dba 100644 --- a/pages/subPack/human/human.vue +++ b/pages/subPack/human/human.vue @@ -71,16 +71,10 @@ console.log(res); self.form.lat = res.position.latitude self.form.lon = res.position.longitude - self.form.address = res.addressDetail.name + self.form.address = res.address }) }, methods: { - //返回首页 - toHome() { - uni.navigateTo({ - url: "/pages/index/index" - }) - }, // 人脸认证通过后拍照 photo() { let self = this @@ -116,9 +110,13 @@ this.$api('clock', this.form, res => { if(res.code == 200){ - uni.reLaunch({ - url: '/pages/index/index' + + uni.showToast({ + title: '打卡成功', + icon:'none' }) + + setTimeout(uni.navigateBack, 1000, -1) } }) }, diff --git a/pages/subPack/record/record.vue b/pages/subPack/record/record.vue index ae08818..b9be2b1 100644 --- a/pages/subPack/record/record.vue +++ b/pages/subPack/record/record.vue @@ -20,8 +20,8 @@ - {{ year }} - {{ monthDay }} + {{ selectDate.format('YYYY') }}年 + {{ selectDate.format('MM') }}月 正常 @@ -30,13 +30,16 @@ - + - 正常:5 - 缺卡:3 - 未打卡:2 + 正常:{{ clockTotal.normal }} + 缺卡:{{ clockTotal.noCard }} + 未打卡:{{ clockTotal.abnormal }} @@ -46,12 +49,21 @@ 今日打卡详情 - +