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 @@
今日打卡详情
-
+
-
+
- {{ item.createTime }}
+ {{ item.clockInTime }}
+
+ {{ selectDate.format('YYYY-MM-DD ') + item.clockStartTime }}
+
+ 缺卡
+
+
{{ item.address }}
@@ -65,70 +77,69 @@
@@ -147,7 +158,7 @@
// 签到日历
.sign-calendar {
background: white;
- border-radius: 15rpx;
+ border-radius: 30rpx;
overflow: hidden;
margin-top: 30rpx;
box-sizing: border-box;
@@ -162,6 +173,7 @@
.user-img {
width: 150rpx;
height: 150rpx;
+ border-radius: 20rpx;
}
.base {
@@ -248,6 +260,10 @@
// 修改日历样式
&::v-deep .uni-calendar__header {
+ // display: none !important;
+ }
+
+ &::v-deep .uni-calendar__header-text{
display: none !important;
}
@@ -266,7 +282,7 @@
// 今日打卡详情
.today-detail {
- border-radius: 15rpx;
+ border-radius: 30rpx;
background: white;
margin-top: 35rpx;
box-sizing: border-box;
@@ -284,10 +300,26 @@
margin: 15rpx 0rpx;
box-sizing: border-box;
padding: 20rpx 15rpx;
+ font-size: 26rpx;
image {
- width: 30%;
+ width: 220rpx;
border-radius: 10rpx;
+ flex-shrink: 0;
+ height: 150rpx;
+ }
+
+ .time{
+ display: flex;
+ align-items: center;
+ .tag{
+ border: 1px solid #F97D00;
+ color: #F97D00;
+ padding: 2rpx 6rpx;
+ border-radius: 10rpx;
+ font-size: 22rpx;
+ margin-left: 20rpx;
+ }
}
.sign-detail {
diff --git a/utils/index.js b/utils/index.js
index b40f098..7a33f47 100644
--- a/utils/index.js
+++ b/utils/index.js
@@ -27,4 +27,11 @@ Vue.prototype.$dayjs = dayjs
Vue.prototype.$timeUtils = time
Vue.prototype.$utils = util
-Vue.prototype.$md5 = md5
\ No newline at end of file
+Vue.prototype.$md5 = md5
+
+Vue.prototype.previewImage = (urls, current) => {
+ uni.previewImage({
+ urls,
+ current,
+ })
+}
\ No newline at end of file
diff --git a/utils/position.js b/utils/position.js
index 09513cd..a5e46fc 100644
--- a/utils/position.js
+++ b/utils/position.js
@@ -92,7 +92,8 @@ function getUserAddress(latitude, longitude, key) { //通过经纬度获取用
latitude: lat,
longitude: lng
},
- addressDetail: res.data.result.ad_info
+ addressDetail: res.data.result.ad_info,
+ address : res.data.result.address
}
resolve(data)
},