提交 683787f2 authored 作者: 黎九's avatar 黎九

迭代更新

上级 9b9dcb4f
{
"version" : "1.0",
"configurations" : [
{
"playground" : "standard",
"type" : "uni-app:app-ios"
},
{
"app-plus" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}
......@@ -22,6 +22,13 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/Authentication/Authentication",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/article-detail/index",
"style": {
......
.wrapper{
height: 300rpx;
padding-top: 50rpx;
}
.oneText{
width: 90%;
padding: 10rpx;
margin: auto;
margin-bottom: 30rpx;
display: flex;
}
.nameInp{
width: 100%;
// border: 1px solid #cccc;
padding: 22rpx 20rpx;
background: #f5f5f5;
border: 2rpx solid #d3d3d3;
font-size: 24rpx;
font-weight: 400;
color: #000000;
}
.nameSpan{
width: 34%;
text-align: center;
line-height: 80rpx;
}
.cardSpan{
width: 34%;
text-align: center;
line-height: 80rpx;
}
.cardInp{
width: 100%;
// border: 1px solid #cccc;
padding: 22rpx 20rpx;
background: #f5f5f5;
border: 2rpx solid #d3d3d3;
font-size: 24rpx;
font-weight: 400;
color: #000000;
}
.twoText{
width: 90%;
margin: auto;
padding: 10rpx;
display: flex;
// border: 1px solid #cccc;
margin-bottom: 30rpx;
}
.cccc{
margin-top: 40rpx;
width: 40%;
margin: auto;
margin-bottom: 100rpx;
}
.postFrom{
margin-top: 40rpx;
width: 93%;
margin: auto;
// margin-bottom: 30rpx;
}
.cccBut{
height: 92rpx;
background: linear-gradient(270deg, #8171fc, #a471fc);
border-radius: 46rpx;
color: #fff !important;
font-size: 32rpx;
font-weight: 500;
display: flex;
justify-content: center;
align-items: center;
}
.fromBut{
height: 92rpx;
background: linear-gradient(270deg, #8171fc, #a471fc);
border-radius: 46rpx;
color: #fff !important;
font-size: 32rpx;
font-weight: 500;
display: flex;
justify-content: center;
align-items: center;
}
\ No newline at end of file
<template>
<view class="wrapper">
<view class="oneText">
<span class="nameSpan">姓名:</span><input type="text" class="nameInp" placeholder="请输入姓名" v-model="name">
</view>
<view class="twoText">
<span class="cardSpan">身份证号:</span><input type="text" class="cardInp" placeholder="请输入身份证号" v-model="card">
</view>
<view class="cccc">
<button class="cccBut" @click="chooseVideo">实名验证</button>
</view>
<view class="postFrom">
<button class="fromBut" @click="getAuthen">确认提交</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
name: "",
card: '',
videoUrl: {},
videoYes: false,
Jbool: false
};
},
methods: {
chooseVideo() {
// console.log(this.name,this.card);
if (this.name == '') {
return uni.$u.toast('请输入姓名');
} 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);
}
})
},
getAuthen() {
if (this.Jbool) {
return uni.showToast({
title: "正在上传"
})
}
this.Jbool=true
// console.log(123);
// uni.$u.route({ url: 'pages/mine/index'});
if (this.name == '') {
return uni.$u.toast('请输入姓名');
} else if (this.card == '') {
return uni.$u.toast('请输入身份证号');
} else if (!this.videoYes) {
return uni.$u.toast('请完成实名验证');
}
uni.uploadFile({
url: "/api/user/real_person_auth",
file: this.videoUrl,
name: "video",
formData: {
"name": this.name,
"id_card": this.card //其他表单字段,可根据需求添加
},
success: function(res) {
this.Jbool = false
uni.hideLoading()
uni.showToast({
title: "上传成功"
})
// console.log(res);
setTimeout(function() {
uni.navigateBack()
}, 2000)
},
fail: function(err) {
this.Jbool = false
uni.hideLoading()
uni.showToast({
title: "上传失败"
})
}
})
}
}
}
</script>
<style scoped lang="scss">
@import 'Authentication.scss';
// @import 'index.scss';
</style>
\ No newline at end of file
......@@ -39,6 +39,13 @@
</view>
<image mode="aspectFill" class="arrow_right" src="/static/icon/arrow_right1@2x.png" />
</view>
<view class="my_items" @click="getAuthentication">
<view class="my_item_left">
<image mode="aspectFill" class="task_icon" src="/static/icon/ic_wd_gy@2x.png" />
<view class="item_name">{{!Look ? '实名验证' : '已完成认证'}}</view>
</view>
<image mode="aspectFill" class="arrow_right" src="/static/icon/arrow_right1@2x.png" />
</view>
<!-- 注销登录 -->
<!-- <view class="my_items" @click="tailor">-->
<!-- <view class="my_item_left">-->
......@@ -72,6 +79,7 @@ export default {
token: null,
canIUseGetUserProfile: false,
userDetail: {},
Look:true
};
},
......@@ -85,7 +93,9 @@ export default {
methods: {
async fetchUserInfo() {
const { detail } = await uni.$u.http.get('/api/user_center/detail');
console.log(detail);
this.userDetail = detail;
this.Look = detail.is_real_auth
},
myPhoto() {
......@@ -94,7 +104,15 @@ export default {
about() {
uni.$u.route({ url: 'pages/mine-about/index' });
},
getAuthentication(){
if(!this.Look){
uni.$u.route({ url: 'pages/Authentication/Authentication' });
}
// console.log(123);
uni.$u.toast('已经完成实名认证');
},
async tailor() {
try {
......@@ -103,7 +121,6 @@ export default {
} finally {
}
},
myIntegral() {
uni.$u.route({ url: 'pages/mine-integral/index' });
},
......
......@@ -32,6 +32,7 @@
</u-modal>
-->
</view>
</view>
</template>
......@@ -75,7 +76,8 @@ export default {
computed: {
modalHeight() {
return Math.ceil(window.innerHeight * 2 * 0.6);
// console.log(innerHeight);
// return Math.ceil(window.innerHeight * 2 * 0.6);
},
},
......@@ -155,7 +157,10 @@ export default {
} ,
});
},
getIsFirstRecord() {
let isFirstRecord = uni.getStorageSync('isFirstRecord');
if (!isFirstRecord){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论