main
123456 4 weeks ago
parent 7a07f3895b
commit 626acddca3
  1. 14
      manifest.json
  2. 7
      pages.json
  3. 1
      pages/index/index.vue
  4. 2
      pages/pipei/shipin/detail.nvue
  5. 8
      pages/users/edit/index.vue
  6. 421
      pages/users/renzheng/camera.nvue
  7. 24
      pages/users/renzheng/shiming.vue
  8. BIN
      static/shibie/alive_mask@3x.png
  9. BIN
      static/shibie/audio/open-eyes.wav
  10. BIN
      static/shibie/audio/open_eyes.wav
  11. BIN
      static/shibie/audio/open_mouth.wav
  12. BIN
      static/shibie/audio/turn_left.wav
  13. BIN
      static/shibie/audio/turn_right.wav
  14. BIN
      static/shibie/audio_close@3x.png
  15. BIN
      static/shibie/audio_open@3x.png
  16. BIN
      static/shibie/home_bg@3x.png
  17. BIN
      static/shibie/icon_back@3x.png
  18. BIN
      static/shibie/icon_check@3x.png
  19. BIN
      static/shibie/open_eyes.gif
  20. BIN
      static/shibie/open_mouth.gif
  21. BIN
      static/shibie/pic_front.png
  22. BIN
      static/shibie/result_fail@3x.png
  23. BIN
      static/shibie/result_success@3x.png
  24. BIN
      static/shibie/turn_left.gif
  25. BIN
      static/shibie/turn_right.gif
  26. BIN
      static/shibie/uni.ttf
  27. BIN
      static/shibie/yidun_logo@3x.png
  28. 4
      unpackage/cache/wgt/__UNI__7C06BEE/app-config-service.js
  29. 6
      unpackage/cache/wgt/__UNI__7C06BEE/app-service.js
  30. 2
      unpackage/cache/wgt/__UNI__7C06BEE/app-view.js
  31. 2
      unpackage/cache/wgt/__UNI__7C06BEE/manifest.json
  32. 2
      unpackage/cache/wgt/__UNI__7C06BEE/pages/pipei/shipin/detail.js
  33. 1
      unpackage/cache/wgt/__UNI__7C06BEE/pages/users/renzheng/camera.js
  34. BIN
      unpackage/debug/android_debug.apk
  35. 4
      unpackage/dist/build/app-plus/app-config-service.js
  36. 4
      unpackage/dist/build/app-plus/app-service.js
  37. 2
      unpackage/dist/build/app-plus/app-view.js
  38. 2
      unpackage/dist/build/app-plus/manifest.json
  39. 2
      unpackage/dist/build/app-plus/pages/pipei/shipin/detail.js
  40. 1
      unpackage/dist/build/app-plus/pages/users/renzheng/camera.js
  41. 4
      unpackage/dist/dev/app-plus/androidPrivacy.json
  42. 4
      unpackage/dist/dev/app-plus/app-config-service.js
  43. 160
      unpackage/dist/dev/app-plus/app-service.js
  44. 20
      unpackage/dist/dev/app-plus/app-view.js
  45. 2
      unpackage/dist/dev/app-plus/manifest.json
  46. 753
      unpackage/dist/dev/app-plus/pages/pipei/shipin/detail.js
  47. 1901
      unpackage/dist/dev/app-plus/pages/users/renzheng/camera.js
  48. BIN
      unpackage/dist/dev/app-plus/static/shibie/alive_mask@3x.png
  49. BIN
      unpackage/dist/dev/app-plus/static/shibie/audio/open-eyes.wav
  50. BIN
      unpackage/dist/dev/app-plus/static/shibie/audio/open_eyes.wav
  51. BIN
      unpackage/dist/dev/app-plus/static/shibie/audio/open_mouth.wav
  52. BIN
      unpackage/dist/dev/app-plus/static/shibie/audio/turn_left.wav
  53. BIN
      unpackage/dist/dev/app-plus/static/shibie/audio/turn_right.wav
  54. BIN
      unpackage/dist/dev/app-plus/static/shibie/audio_close@3x.png
  55. BIN
      unpackage/dist/dev/app-plus/static/shibie/audio_open@3x.png
  56. BIN
      unpackage/dist/dev/app-plus/static/shibie/home_bg@3x.png
  57. BIN
      unpackage/dist/dev/app-plus/static/shibie/icon_back@3x.png
  58. BIN
      unpackage/dist/dev/app-plus/static/shibie/icon_check@3x.png
  59. BIN
      unpackage/dist/dev/app-plus/static/shibie/open_eyes.gif
  60. BIN
      unpackage/dist/dev/app-plus/static/shibie/open_mouth.gif
  61. BIN
      unpackage/dist/dev/app-plus/static/shibie/pic_front.png
  62. BIN
      unpackage/dist/dev/app-plus/static/shibie/result_fail@3x.png
  63. BIN
      unpackage/dist/dev/app-plus/static/shibie/result_success@3x.png
  64. BIN
      unpackage/dist/dev/app-plus/static/shibie/turn_left.gif
  65. BIN
      unpackage/dist/dev/app-plus/static/shibie/turn_right.gif
  66. BIN
      unpackage/dist/dev/app-plus/static/shibie/uni.ttf
  67. BIN
      unpackage/dist/dev/app-plus/static/shibie/yidun_logo@3x.png

@ -162,6 +162,20 @@
"pid" : "3617",
"parameters" : {}
}
},
"YD-Alive" : {
"__plugin_info__" : {
"name" : "易盾活体检测",
"description" : "录制眨眼视频后上传,判断用户是否为活体、真人",
"platforms" : "Android,iOS",
"url" : "https://ext.dcloud.net.cn/plugin?id=1663",
"android_package_name" : "com.chunwan",
"ios_bundle_id" : "com.chunwan",
"isCloud" : true,
"bought" : 1,
"pid" : "1663",
"parameters" : {}
}
}
}
},

@ -537,6 +537,13 @@
"navigationBarTitleText" : "",
"navigationStyle": "custom" //
}
},
{
"path" : "pages/users/renzheng/camera",
"style" :
{
"navigationBarTitleText" : "刷脸认证"
}
}
],
"globalStyle": {

@ -82,6 +82,7 @@
</template>
<script>
import permision from "@/js_sdk/wa-permission/permission.js"
export default {
data() {
return {

@ -207,8 +207,8 @@
this.isStart = (this.type == 3||this.type == 4)?(o.fid?false:true):true
this.isShexiang = (this.type == 2 || this.type == 4)?true:false
this.isJieshou = o.type<=2?true:false;
this.winWidth = uni.getSystemInfoSync().windowWidth;
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
this.winWidth = uni.getSystemInfoSync().windowWidth;
this.winHeight = uni.getSystemInfoSync().windowHeight;
},
async onReady() {

@ -251,9 +251,6 @@
if(res.statusCode == 200){
const {code, data, msg} = JSON.parse(res.data);
if(code == 200){
uni.showToast({
title: "上传成功"
})
that.toReg(data)
}else{
uni.showToast({
@ -502,11 +499,16 @@
},
//
async toReg(faceImage) {
console.log(faceImage)
const {code, data, msg} = await this.$api.detectLivingFace({
userId: uni.getStorageSync("userInfo").id,
faceImage
})
console.log(code, data, msg)
if(code == 200){
uni.showToast({
title: "上传成功"
})
this.userInfo.faceImage = faceImage
this.$forceUpdate();
}else{

@ -0,0 +1,421 @@
<template>
<view class="yd-check" :style="{'width': winWidth+'px', 'height': winHeight+'px'}">
<view class="check-preview">
<view class="check-preview__content">
<camera_preview ref="aliveDetect" class="check-preview__camera"></camera_preview>
<image class="check-preview__mask" :style="{ backgroundColor: maskColor }"
src="/static/shibie/alive_mask@3x.png" @load="handleImgLoad"></image>
</view>
<view class="check-preview__audio" @click="toggleAudioSwitch">
<image class="check-preview__switch"
:src="enableAudio ? '/static/shibie/audio_open@3x.png' : '/static/shibie/audio_close@3x.png'"></image>
</view>
<view class="check-preview__timer progress-timer">
<text class="txt">{{ restSec }}</text>
<view class="progress-timer__right">
<view ref="rightCircle" class="progress-timer__circle progress-timer__circle--right"></view>
</view>
<view class="progress-timer__left">
<view ref="leftCircle" class="progress-timer__circle progress-timer__circle--left"></view>
</view>
</view>
</view>
<view class="check-process">
<view class="check-process__tip">{{ curAction.tip }}</view>
<image class="check-process__img" :src="`/static/shibie/${curAction.image}`"></image>
<view class="check-steps">
<view v-for="(item,index) in commands" :key="index"
:class="['check-steps__item', curAction.step === index ? 'check-steps__item--active' : '']">
<text v-if="curAction.step === index" class="check-steps__text">{{ index+1 }}</text>
</view>
</view>
</view>
</view>
</template>
<script>
import api from '@/api/index.js'
const DETECT_ACTION_TYPES = {
'1': ['向右转头', 'turn_right.gif', 'turn_right.wav'],
'2': ['向左转头', 'turn_left.gif', 'turn_left.wav'],
'3': ['张嘴动作', 'open_mouth.gif', 'open_mouth.wav'],
'4': ['眨眼动作', 'open_eyes.gif', 'open_eyes.wav']
}
const innerAudioContext = uni.createInnerAudioContext()
innerAudioContext.onPlay(() => {
console.log('音频开始播放')
})
innerAudioContext.onError((res) => {
console.log(res.errMsg)
console.log(res.errCode)
})
const animation = weex.requireModule('animation')
export default {
data() {
return {
curAction: {
step: 0,
tip: '',
image: 'pic_front.png'
},
restSec: 0,
enableAudio: true,
timer: null,
maskColor: '#fff',
isTimeout: false,
commands: [],
winWidth: 0,
winHeight: 0,
idCard: "",
realName: ""
};
},
onLoad(o) {
this.realName = decodeURIComponent(o.realName);
this.idCard = o.idCard;
console.log(o)
this.winWidth = uni.getSystemInfoSync().windowWidth;
this.winHeight = uni.getSystemInfoSync().windowHeight;
},
onReady() {
console.log("页面初次渲染完成");
this.initAliveDetect()
},
onBackPress() {
this.$refs.aliveDetect.stopDetect()
},
onUnload() {
console.log("页面卸载");
if (innerAudioContext != null && !innerAudioContext.paused) {
innerAudioContext.pause()
innerAudioContext.stop()
innerAudioContext.destroy()
innerAudioContext = null
}
this.timer && clearInterval(this.timer)
},
methods: {
initAliveDetect() {
this.timer && (clearInterval(this.timer))
this.curAction = {
step: 0,
tip: '',
image: 'pic_front.png'
}
this.$refs.aliveDetect.init({
'businessID': '043948b2576b41dc9d23d14b4e500b7a',
'timeout': 60,
'isDebug': true
}, this.handleCheck)
this.$refs.aliveDetect.startDetect()
this.restSec = 60
this.timer = setInterval(() => {
if (this.restSec <= 0) {
clearInterval(this.timer)
this.timer = null
} else {
this.restSec = this.restSec - 1
}
}, 1000)
// nvue不支持css animatin和uni的animation,所以使用weex内置的动画
animation.transition(this.$refs.leftCircle, {
styles: {
transform: 'rotate(135deg)'
},
duration: 15000,
timingFunction: 'linear',
needLayout: false,
delay: 15000
})
animation.transition(this.$refs.rightCircle, {
styles: {
transform: 'rotate(225deg)'
},
duration: 15000,
timingFunction: 'linear',
needLayout: false,
delay: 0
})
},
//去登录
async toReg(token) {
const res = await api.realNameAuth({
userId: uni.getStorageSync("userInfo").id,
realName: this.realName,
idCard: this.idCard,
token
})
console.log({
userId: uni.getStorageSync("userInfo").id,
realName: this.realName,
idCard: this.idCard,
token
})
console.log(res)
if(res.code == 200){
uni.showToast({
title: "提交成功"
})
setTimeout(()=>{
uni.navigateBack({
delta: 2
})
},2000)
}else{
uni.showToast({
icon: "none",
position: "bottom",
title: res.msg
})
}
},
handleCheck(ev) {
// 初始化活体检测引擎成功
if (typeof ev !== 'object') {
return
}
const method = ev['method']
const data = ev['data']
if (method == "onReady") {
const result = data['initResult']
console.log(result ? "引擎初始化成功" : "引擎初始化失败")
} else if (method == "onConfig") {
// 动作序列
let commands = [];
for (let i = 0; i < data['actions'].length; i++) {
commands.push(parseInt(data['actions'][i]))
};
this.commands = commands;
} else if (method == "onChecking") {
// 检测提示
const actionType = data['currentStep'] + ''
if (Object.keys(DETECT_ACTION_TYPES).includes(actionType) &&
actionType !== this.curAction.type) {
const hit = DETECT_ACTION_TYPES[actionType]
this.curAction = {
step: this.curAction.step + 1,
type: actionType,
tip: hit[0],
image: hit[1]
}
console.log(this.curAction)
console.log(data)
this.playAudioIfEnable(hit[2])
}
} else if (method == "onChecked") {
// // 检测结果
console.log(data)
this.toReg(data.token)
clearInterval(this.timer)
this.timer = null
return
} else if (method == "onError") {
// 检测失败
console.log("错误码为:" + data['code']);
console.log("错误信息为:" + data['message']);
uni.showToast({
icon: 'none',
title: data['message']
})
} else if (method == "overTime") {
// 超时
clearInterval(this.timer)
this.timer = null
uni.showModal({
title: '检测超时',
content: '请在规定时间内完成动作',
cancelText: '返回上一页',
confirmText: '重试',
success: (res) => {
if (res.confirm) {
this.initAliveDetect()
} else {
uni.navigateBack()
}
},
fail: () => {
uni.navigateBack()
}
})
}
},
playAudioIfEnable(src) {
if (!this.enableAudio) return
innerAudioContext.src = `/static/shibie/audio/${src}`
innerAudioContext.play()
},
toggleAudioSwitch() {
this.enableAudio = !this.enableAudio
},
handleImgLoad() {
setTimeout(() => {
this.maskColor = 'transparent'
}, 120)
}
}
}
</script>
<style lang="scss">
.yd-check {
background-color: #ffffff;
}
.check-preview {
align-items: center;
justify-content: center;
position: relative;
}
.check-preview__content {
width: 504rpx;
height: 672rpx;
margin-top: 6rpx;
position: relative;
}
.check-preview__mask {
width: 504rpx;
height: 672rpx;
position: absolute;
top: 0;
left: 0;
z-index: 9999;
transition: backgroundColor 0.3s;
background-color: #ffffff;
}
.check-preview__camera {
width: 504rpx;
height: 672rpx;
border-radius: 50%;
}
.check-preview__audio {
position: absolute;
top: 0;
right: 40rpx;
width: 48rpx;
height: 48rpx;
}
.check-preview__switch {
width: 48rpx;
height: 48rpx;
}
.check-preview__timer {
position: absolute;
top: 80rpx;
right: 40rpx;
width: 60rpx;
height: 60rpx;
line-height: 60rpx;
color: #222;
font-size: 26rpx;
justify-content: center;
align-items: center;
.txt{
font-size: 26rpx;
color: #000;
}
}
.progress-timer__right,
.progress-timer__left {
width: 30rpx;
height: 60rpx;
position: absolute;
top: 0;
overflow: hidden;
}
.progress-timer__right {
right: 0;
}
.progress-timer__left {
left: 0;
}
.progress-timer__circle {
width: 60rpx;
height: 60rpx;
border-style: solid;
border-width: 6rpx;
border-color: #000000;
border-radius: 50%;
position: absolute;
top: 0;
}
.progress-timer__circle--right {
border-right-color: #ccc;
border-top-color: #ccc;
right: 0;
transform: rotate(45deg);
}
.progress-timer__circle--left {
border-left-color: #ccc;
border-top-color: #ccc;
left: 0;
transform: rotate(-45deg);
}
.check-process {
padding-top: 90rpx;
justify-content: center;
align-items: center;
}
.check-process__tip {
opacity: 0.85;
font-size: 40rpx;
color: #000;
text-align: center;
line-height: 56rpx;
height: 56rpx;
}
.check-process__img {
width: 280rpx;
height: 280rpx;
margin-top: 8rpx;
text-align: center;
}
.check-steps {
flex-direction: row;
justify-content: space-around;
align-items: center;
width: 240rpx;
margin-top: 32rpx;
}
.check-steps__item {
font-size: 0px;
width: 20rpx;
height: 20rpx;
background-color: #DDE3EF;
border-radius: 50%;
}
.check-steps__item--active {
width: 40rpx;
height: 40rpx;
background-color: #000000;
justify-content: center;
}
.check-steps__text {
color: #FFFFFF;
line-height: 40rpx;
font-size: 28rpx;
text-align: center;
}
</style>

@ -18,6 +18,7 @@
</template>
<script>
import permision from "@/js_sdk/wa-permission/permission.js"
export default {
data() {
return {
@ -60,7 +61,7 @@
})
},
methods: {
toNext() {
async toNext() {
const that = this;
if(!that.realName){
uni.showToast({
@ -78,6 +79,23 @@
})
return
}
// #ifdef APP-PLUS
if (uni.getSystemInfoSync().platform === "android") {
const res1 = await permision.requestAndroidPermission(
"android.permission.CAMERA"
);
if(res1==1){
uni.navigateTo({
url: "/pages/users/renzheng/camera?realName="+this.realName+"&idCard="+this.idCard
})
}
return ;
}
// #endif
uni.navigateTo({
url: "/pages/users/renzheng/camera"
})
return ;
that.$u.route({
// ""
url: '/uni_modules/vk-uview-ui/components/u-avatar-cropper/u-avatar-shiming',
@ -93,12 +111,12 @@
})
},
//
async toReg(avatar) {
async toReg(token) {
const {code, data, msg} = await this.$api.realNameAuth({
userId: uni.getStorageSync("userInfo").id,
realName: this.realName,
idCard: this.idCard,
avatar
token
})
if(code == 200){
uni.showToast({

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -3,12 +3,12 @@
"prompt" : "template",
"title" : "服务协议与隐私政策",
"message" : "\t <br/>\r\r
\t <a href=\"https://admin.njshengsong.cn/pages/users/user_about/index?from=sys_user_agree\">《用户协议》</a> 与 <a href=\"https://admin.njshengsong.cn/pages/users/user_about/index?from=sys_userr_privacy\">《隐私政策》</a>了解详细信息。如你同意,请点击“我同意”开始接受我们的服务。",
\t <a href=\"https://api.lyiyuan.cn/profile/upload/web/index.html#/pages/users/about/index?type=CONFIG_USER_AGREEMENT\">《用户协议》</a> 与 <a href=\"https://api.lyiyuan.cn/profile/upload/web/index.html#/pages/users/about/index?type=CONFIG_PRIVACY_POLICY\">《隐私政策》</a>了解详细信息。如你同意,请点击“我同意”开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"second" : {
"title" : "确认提示",
"message" : "进入应用前,你需先同意<a href=\"https://admin.njshengsong.cn/pages/users/user_about/index?from=sys_user_agree\">《用户协议》</a> 与 <a href=\"https://admin.njshengsong.cn/pages/users/user_about/index?from=sys_userr_privacy\">《隐私政策》</a>,否则将退出应用。",
"message" : "进入应用前,你需先同意<a href=\"https://api.lyiyuan.cn/profile/upload/web/index.html#/pages/users/about/index?type=CONFIG_USER_AGREEMENT\">《用户协议》</a> 与 <a href=\"https://api.lyiyuan.cn/profile/upload/web/index.html#/pages/users/about/index?type=CONFIG_PRIVACY_POLICY\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -611,8 +611,11 @@ var render = function () {
"uni-view",
{ staticClass: _vm._$g(12, "sc"), attrs: { _i: 12 } },
[
_c("u-divider", { attrs: { _i: 13 } }, [_vm._v("其他登录")]),
_c(
_vm._$g(13, "i")
? _c("u-divider", { attrs: { _i: 13 } }, [_vm._v("其他登录")])
: _vm._e(),
_vm._$g(14, "i")
? _c(
"uni-view",
{ staticClass: _vm._$g(14, "sc"), attrs: { _i: 14 } },
[
@ -626,7 +629,8 @@ var render = function () {
}),
],
1
),
)
: _vm._e(),
_c(
"uni-view",
{ staticClass: _vm._$g(16, "sc"), attrs: { _i: 16 } },
@ -35901,8 +35905,11 @@ var render = function () {
"uni-view",
{ staticClass: _vm._$g(15, "sc"), attrs: { _i: 15 } },
[
_c("u-divider", { attrs: { _i: 16 } }, [_vm._v("其他登录")]),
_c(
_vm._$g(16, "i")
? _c("u-divider", { attrs: { _i: 16 } }, [_vm._v("其他登录")])
: _vm._e(),
_vm._$g(17, "i")
? _c(
"uni-view",
{ staticClass: _vm._$g(17, "sc"), attrs: { _i: 17 } },
[
@ -35916,7 +35923,8 @@ var render = function () {
}),
],
1
),
)
: _vm._e(),
_c(
"uni-view",
{ staticClass: _vm._$g(19, "sc"), attrs: { _i: 19 } },

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Loading…
Cancel
Save