This commit is contained in:
binbin_pan 2024-08-29 08:58:38 +08:00
parent 79f2a9d6b1
commit 9dc605192f
3 changed files with 11 additions and 6 deletions

View File

@ -434,8 +434,8 @@ export default {
},
data: params,
success: res => {
console.log('🚀 ~ openFaceScan ~ res-人脸识别:', res)
res = res.data
console.log('🚀 ~ openFaceScan ~ res-人脸识别:', res, res.code)
if (res.code == 200) {
this.$refs.uToast.show({
message: '人脸识别成功',

View File

@ -53,11 +53,13 @@
</template>
<script>
import config from '@/config'
export default {
data() {
return {
infos: {
avatar: '',
avatar: config.fileUrl + uni.getStorageSync('facePath'),
username: '',
unit: ''
}
@ -68,7 +70,6 @@
opt = JSON.parse(opt.params)
this.infos.username = opt.userName
this.infos.unit = opt.className
this.infos.avatar = uni.getStorageSync('facePath')
},
methods: {
//

View File

@ -110,7 +110,7 @@ export default {
},
success: res => {
res = res.data
console.log('🚀 ~ this.uploadFaceRecognition ~ res上传成功:', res)
console.log('🚀 ~ this.uploadFaceRecognition ~ res上传成功:', res, res.code)
if (res.code == 200) {
uni.showToast({
title: '人脸信息录入成功',
@ -118,13 +118,17 @@ export default {
})
uni.removeStorageSync('facePath')
uni.setStorageSync('facePath', this.facePath)
setTimeout(() => {
uni.navigateTo({
url: '/pages/YNEduApp/user/user'
})
}, 1000)
} else {
uni.showToast({
title: '人脸信息录入失败',
title: res.msg,
icon: 'none'
})
}
uni.navigateBack()
},
fail: err => {
console.log('🚀 ~ this.uploadFaceRecognition ~ err:', err)