|
|
|
@ -1,15 +1,13 @@ |
|
|
|
|
<template> |
|
|
|
|
<uni-popup ref="alertDialog" :is-mask-click="false"> |
|
|
|
|
<uni-popup ref="alertDialog" :is-mask-click="false" type="bottom" background-color="#fff" borderRadius="20px 20px 0 0"> |
|
|
|
|
<view class="realname-wrap"> |
|
|
|
|
<view class="realname-form"> |
|
|
|
|
<uni-forms label-width="70" label-align="right"> |
|
|
|
|
<uni-forms-item label="真实姓名" required> |
|
|
|
|
<uni-easyinput type="text" v-model.trim="realNameForm.userName" placeholder="请输入真实姓名" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="学号"> |
|
|
|
|
<uni-easyinput type="text" v-model.trim="realNameForm.workNumber" placeholder="请输入学号" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
</uni-forms> |
|
|
|
|
<view class="line"> |
|
|
|
|
<input type="text" v-model.trim="realNameForm.userName" placeholder="请输入真实姓名" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="line"> |
|
|
|
|
<input type="text" v-model.trim="realNameForm.workNumber" placeholder="请输入学号" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="btn" @click="realNameSubmit">确认</view> |
|
|
|
|
</view> |
|
|
|
@ -35,8 +33,13 @@ |
|
|
|
|
async handleRealName () { |
|
|
|
|
const res = await checkUserNameOrWorkNumber() |
|
|
|
|
// 如果没有真实姓名,则弹框提示填写 |
|
|
|
|
if (!res.hasName) this.realNameForm.workNumber = res.workNumber || '' |
|
|
|
|
this.$refs.alertDialog[res.hasName ? 'close' : 'open']() |
|
|
|
|
if (!res.hasName) { |
|
|
|
|
this.$refs.alertDialog.open('bottom') |
|
|
|
|
this.realNameForm.workNumber = res.workNumber || '' |
|
|
|
|
} else { |
|
|
|
|
this.$refs.alertDialog.close() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// 真实姓名提交 |
|
|
|
|
async realNameSubmit() { |
|
|
|
@ -54,19 +57,39 @@ |
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
.realname-wrap { |
|
|
|
|
width: 460rpx; |
|
|
|
|
width: 100%; |
|
|
|
|
padding-bottom: 20rpx; |
|
|
|
|
background-color: #fff; |
|
|
|
|
border-radius: 20rpx; |
|
|
|
|
border-radius: 20rpx 20rpx 0 0; |
|
|
|
|
.realname-form { |
|
|
|
|
padding: 30rpx 30rpx 0; |
|
|
|
|
} |
|
|
|
|
.line { |
|
|
|
|
padding: 20rpx 0; |
|
|
|
|
margin-bottom: 10rpx; |
|
|
|
|
&:not(.not-bd) { |
|
|
|
|
border-bottom: 1px solid #f3f3f3; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.label { |
|
|
|
|
width: 200rpx; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
color: #565656; |
|
|
|
|
} |
|
|
|
|
input { |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
color: #333; |
|
|
|
|
} |
|
|
|
|
.btn { |
|
|
|
|
flex: 1; |
|
|
|
|
padding: 22rpx 16rpx; |
|
|
|
|
font-size: 24rpx; |
|
|
|
|
color: #007EFF; |
|
|
|
|
width: 300rpx; |
|
|
|
|
height: 60rpx; |
|
|
|
|
margin: 30rpx auto 0; |
|
|
|
|
font-size: 30rpx; |
|
|
|
|
text-align: center; |
|
|
|
|
border-top: 1px solid #eee; |
|
|
|
|
color: #fff; |
|
|
|
|
line-height: 60rpx; |
|
|
|
|
background-color: #007EFF; |
|
|
|
|
border-radius: 40rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|