|
@ -10,26 +10,31 @@ |
|
|
|
|
|
|
|
|
<!-- 人脸识别图片 --> |
|
|
<!-- 人脸识别图片 --> |
|
|
<view class="human-face-img"> |
|
|
<view class="human-face-img"> |
|
|
<image src="https://tennis-oss.xzaiyp.top/2024-10-22/508376c5-64b2-472f-8e25-a2469b632a39.png" mode="widthFix"></image> |
|
|
|
|
|
|
|
|
<image v-if="!isPhoto" |
|
|
|
|
|
src="https://tennis-oss.xzaiyp.top/2024-10-22/508376c5-64b2-472f-8e25-a2469b632a39.png" mode="widthFix"> |
|
|
|
|
|
</image> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 人脸识别说明 --> |
|
|
<!-- 人脸识别说明 --> |
|
|
<view class="human-face-desc"> |
|
|
<view class="human-face-desc"> |
|
|
人脸认证仅能由<text class="name">李*意</text>本人完成验证时,请将镜头对准您的脸部 |
|
|
|
|
|
|
|
|
人脸认证仅能由<text class="name">{{ userInfo.auth.name }}</text>本人完成验证时,请将镜头对准您的脸部 |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 说明 --> |
|
|
<!-- 说明 --> |
|
|
<view class="desc"> |
|
|
<view class="desc"> |
|
|
<view class="desc-item"> |
|
|
<view class="desc-item"> |
|
|
<image src="https://tennis-oss.xzaiyp.top/2024-10-22/a0bf2da9-c25a-4d5c-8c77-7318bd86227d.png" mode="widthFix"></image> |
|
|
|
|
|
|
|
|
<image src="https://tennis-oss.xzaiyp.top/2024-10-22/a0bf2da9-c25a-4d5c-8c77-7318bd86227d.png" |
|
|
|
|
|
mode="widthFix"></image> |
|
|
<view class="text">避免遮挡</view> |
|
|
<view class="text">避免遮挡</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="desc-item"> |
|
|
<view class="desc-item"> |
|
|
<image src="https://tennis-oss.xzaiyp.top/2024-10-22/feb72bfb-8271-4e48-8081-d72811543918.png" mode="widthFix"></image> |
|
|
|
|
|
|
|
|
<image src="https://tennis-oss.xzaiyp.top/2024-10-22/feb72bfb-8271-4e48-8081-d72811543918.png" |
|
|
|
|
|
mode="widthFix"></image> |
|
|
<view class="text">光线充足</view> |
|
|
<view class="text">光线充足</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="desc-item"> |
|
|
<view class="desc-item"> |
|
|
<image src="https://tennis-oss.xzaiyp.top/2024-10-22/5fd8a6a7-a13e-44d6-acf1-a7ada94c699d.png" mode="widthFix"></image> |
|
|
|
|
|
|
|
|
<image src="https://tennis-oss.xzaiyp.top/2024-10-22/5fd8a6a7-a13e-44d6-acf1-a7ada94c699d.png" |
|
|
|
|
|
mode="widthFix"></image> |
|
|
<view class="text">正对充足</view> |
|
|
<view class="text">正对充足</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -42,13 +47,33 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
import position from '@/utils/position.js' |
|
|
|
|
|
import { |
|
|
|
|
|
mapState |
|
|
|
|
|
} from 'vuex' |
|
|
export default { |
|
|
export default { |
|
|
name: "HumanFace", |
|
|
name: "HumanFace", |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
|
|
|
|
|
|
isPhoto: false, |
|
|
|
|
|
form : { |
|
|
|
|
|
pic : '', |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
computed: { |
|
|
|
|
|
...mapState(['teamList', 'userInfo']), |
|
|
|
|
|
}, |
|
|
|
|
|
onShow() { |
|
|
|
|
|
let self = this |
|
|
|
|
|
position.getLocationDetail() |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
console.log(res); |
|
|
|
|
|
self.form.lat = res.position.latitude |
|
|
|
|
|
self.form.lon = res.position.longitude |
|
|
|
|
|
self.form.address = res.addressDetail.name |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
//返回首页 |
|
|
//返回首页 |
|
|
toHome() { |
|
|
toHome() { |
|
@ -58,19 +83,45 @@ |
|
|
}, |
|
|
}, |
|
|
// 人脸认证通过后拍照 |
|
|
// 人脸认证通过后拍照 |
|
|
photo() { |
|
|
photo() { |
|
|
|
|
|
let self = this |
|
|
uni.chooseImage({ |
|
|
uni.chooseImage({ |
|
|
count: 1, //默认9 |
|
|
count: 1, //默认9 |
|
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 |
|
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 |
|
|
sourceType: ['camera '], //从相册选择 |
|
|
|
|
|
|
|
|
sourceType: ['camera '], //这要注意,camera掉拍照,album是打开手机相册 |
|
|
success: function(res) { |
|
|
success: function(res) { |
|
|
console.log(JSON.stringify(res.tempFilePaths)); |
|
|
console.log(JSON.stringify(res.tempFilePaths)); |
|
|
//后续在这里上传文件 |
|
|
//后续在这里上传文件 |
|
|
uni.navigateTo({ |
|
|
|
|
|
url: "/pages/subPack/punchCard/punchCard" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.$Oss.ossUpload(res.tempFilePaths[0]).then(url => { |
|
|
|
|
|
self.form.pic = url |
|
|
|
|
|
self.submit() |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// uni.navigateTo({ |
|
|
|
|
|
// url: "/pages/subPack/punchCard/punchCard" |
|
|
|
|
|
// }) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
submit(){ |
|
|
|
|
|
if (this.$utils.verificationAll(this.form, { |
|
|
|
|
|
lat : '经纬度缺失,请打开GPS', |
|
|
|
|
|
lon : '经纬度缺失,请打开GPS', |
|
|
|
|
|
address : '获取地址失败', |
|
|
|
|
|
pic : '请拍照', |
|
|
|
|
|
})) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.$api('clock', this.form, res => { |
|
|
|
|
|
if(res.code == 200){ |
|
|
|
|
|
uni.reLaunch({ |
|
|
|
|
|
url: '/pages/index/index' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|