提交 6c56e7b5 authored 作者: 黎九's avatar 黎九

迭代更新

上级 683787f2
......@@ -13,6 +13,7 @@ export default {
};
</script>
<style>
/*每个页面公共css */
</style>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
......@@ -9,6 +10,11 @@
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
<script>
// VConsole will be exported to `window.VConsole` by default.
var vConsole = new window.VConsole();
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
......
......@@ -139,5 +139,15 @@
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {}
"uniIdRouter": {},
"condition" : { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [
{
"name": "", //模式名称
"path": "", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}
]
}
}
......@@ -51,9 +51,12 @@
}
.cccc{
margin-top: 40rpx;
width: 40%;
width: 80%;
margin: auto;
margin-bottom: 100rpx;
text-align: center;
font-size: 30rpx;
color: red;
}
.postFrom{
margin-top: 40rpx;
......@@ -62,9 +65,17 @@
// margin-bottom: 30rpx;
}
.cccText{
// font-size: 30rpx
// margin-bottom: 20rpx;
}
.cccBut{
height: 92rpx;
background: linear-gradient(270deg, #8171fc, #a471fc);
width: 80%;
margin: auto;
margin-top: 20rpx;
// background: linear-gradient(270deg, #0e4efc, #5b5bfc);
background-color: #4e6ef2;
border-radius: 46rpx;
color: #fff !important;
font-size: 32rpx;
......
......@@ -9,11 +9,25 @@
<span class="cardSpan">身份证号:</span><input type="text" class="cardInp" placeholder="请输入身份证号" v-model="card">
</view>
<view class="cccc">
<button class="cccBut" @click="chooseVideo">实名验证</button>
<text class="cccText">请使用前置摄头录制一段2~3秒人脸视频,录制完成后上传进行实人认证</text>
<button class="cccBut" @click="chooseVideo">{{videoYes ? '重新录制':'录制实人认证视频'}}</button>
</view>
<view class="postFrom">
<button class="fromBut" @click="getAuthen">确认提交</button>
<view class="postFrom" v-if="!logNice">
<button type="primary" class="fromBut" @click="getAuthen">确认提交</button>
</view>
<view class="postFrom" v-if="logNice">
<button class="fromBut" @click="back">返回</button>
</view>
<u-modal confirmText="我已知晓" :show="modalShow" @confirm="onModalConfirm">
<view class="modal" :style="`max-height: ${modalHeight}rpx; overflow-y: scroll; white-space: pre-wrap`">
<u-parse content='1.确保摄像头无遮挡物,录制清晰、稳定的视频。
2.调整光线:选择明亮、均匀的环境,避免强光或阴影。
3.角度和距离:将摄像设备置于与人脸平行的位置,并保持适当距离。
4.简洁背景:选择无干扰的背景,突出人脸。
5.面部配合:被拍摄者需保持自然面部表情,避免遮挡物。
6.确保人脸清晰可见,无噪点或模糊现象。' />
</view>
</u-modal>
</view>
</template>
......@@ -25,9 +39,18 @@
card: '',
videoUrl: {},
videoYes: false,
Jbool: false
Jbool: false,
logNice: false,
modalShow: false,
};
},
computed: {
modalHeight() {
// console.log(innerHeight);
return Math.ceil(window.innerHeight * 2 * 0.6);
},
},
methods: {
chooseVideo() {
// console.log(this.name,this.card);
......@@ -36,32 +59,34 @@
} else if (this.card == '') {
return uni.$u.toast('请输入身份证号');
}
uni.chooseVideo({
sourceType: ['camera'],
compressed: true,
maxDuration: 10,
camera: 'front',
success: res => {
// console.log(res.tempFile);
this.videoYes = true
this.videoUrl = res.tempFile
},
fail: e => {
console.log(e);
}
})
this.modalShow = true
},
back() {
uni.navigateBack()
},
onModalConfirm() {
this.modalShow = false
uni.chooseVideo({
sourceType: ['camera'],
compressed: true,
maxDuration: 4,
camera: 'front',
success: res => {
// console.log(res.tempFile);
this.videoYes = true
this.videoUrl = res.tempFile
},
fail: e => {
console.log(e);
}
})
},
getAuthen() {
if (this.Jbool) {
return uni.showToast({
title: "正在上传"
})
}
this.Jbool=true
// console.log(123);
// uni.$u.route({ url: 'pages/mine/index'});
uni.showLoading({
title: '加载中'
});
if (this.name == '') {
return uni.$u.toast('请输入姓名');
} else if (this.card == '') {
......@@ -80,20 +105,16 @@
success: function(res) {
this.Jbool = false
uni.hideLoading()
uni.showToast({
title: "上传成功"
})
// console.log(res);
return uni.$u.toast('实名认证完成');
setTimeout(function() {
uni.navigateBack()
}, 2000)
// this.logNice = true
},
fail: function(err) {
this.Jbool = false
uni.hideLoading()
uni.showToast({
title: "上传失败"
})
// uni.hideLoading()
return uni.$u.toast('实名认证失败');
}
})
......
......@@ -57,6 +57,8 @@
</view>
</view>
</view>
</view>
<view class="unauthorized" v-else>
......@@ -79,7 +81,7 @@ export default {
token: null,
canIUseGetUserProfile: false,
userDetail: {},
Look:true
Look:true,
};
},
......@@ -89,7 +91,7 @@ export default {
this.token = '1234qwer1234';
this.fetchUserInfo();
},
methods: {
async fetchUserInfo() {
const { detail } = await uni.$u.http.get('/api/user_center/detail');
......@@ -108,12 +110,14 @@ export default {
},
getAuthentication(){
if(!this.Look){
// this.modalShow=true
uni.$u.route({ url: 'pages/Authentication/Authentication' });
}else{
uni.$u.toast('已经完成实名认证');
}
// console.log(123);
uni.$u.toast('已经完成实名认证');
},
async tailor() {
try {
await uni.$u.http.get('/api/user/logout', { params: { token: '' } });
......@@ -124,6 +128,7 @@ export default {
myIntegral() {
uni.$u.route({ url: 'pages/mine-integral/index' });
},
},
};
</script>
......
......@@ -77,14 +77,13 @@ export default {
computed: {
modalHeight() {
// console.log(innerHeight);
// return Math.ceil(window.innerHeight * 2 * 0.6);
return Math.ceil(window.innerHeight * 2 * 0.6);
},
},
onLoad(query) {
this.fetchPhotoTaskTypeData();
// this.fetchPhotoTaskTypeDetail();
this.isFirstRecord = this.getIsFirstRecord();
// console.log(this.isFirstRecord);
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论