|
@@ -4,6 +4,7 @@
|
|
|
mask-background-color="rgba(0, 0, 0, 0.4);">
|
|
|
<uni-popup-dialog mode="input" class="phone-ksxz-dialog" title="身份确认" :duration="2000" :before-close="true"
|
|
|
cancelText="修改" @close="handleClose" @confirm="handleConfirm">
|
|
|
+ <view @click="handleCloseOnly" class="closeIcon">x</view>
|
|
|
<view class="ksxz-content-box">
|
|
|
<view class="phone-name-box">
|
|
|
<!-- #ifdef H5 -->
|
|
@@ -11,12 +12,11 @@
|
|
|
<!-- <image :src="data.icon" /> -->
|
|
|
<!-- #endif -->
|
|
|
</view>
|
|
|
- <view>姓名:{{data.realName}}</view>
|
|
|
- <view>电话:{{data.userName}}</view>
|
|
|
+ <view :class="{isEmpty: data.realName}">姓名:{{data.realName}}</view>
|
|
|
+ <view :class="{isEmpty: !data.realName}">电话:{{data.userName}}</view>
|
|
|
<view>职业:{{data.zyName}}</view>
|
|
|
<view>等级:{{data.zyLevelName}}</view>
|
|
|
- <view>身份证号(护照号):{{data.idcard}}</view>
|
|
|
- <view>性别:{{data.gender == 0?'未知': data.gender == '2' ? '女': '男'}}</view>
|
|
|
+ <view :class="{isEmpty: !data.realName}">证件号:{{data.idcard}}</view>
|
|
|
</view>
|
|
|
</uni-popup-dialog>
|
|
|
</uni-popup>
|
|
@@ -42,6 +42,10 @@
|
|
|
|
|
|
const emits = defineEmits(['confirm', 'changeData'])
|
|
|
|
|
|
+ function handleCloseOnly() {
|
|
|
+ popupRef.value.close()
|
|
|
+ }
|
|
|
+
|
|
|
function showDialog(options) {
|
|
|
data.realName = options.realName;
|
|
|
data.userName = options.userName;
|
|
@@ -61,6 +65,27 @@
|
|
|
}
|
|
|
|
|
|
function handleConfirm() {
|
|
|
+ let arr = [];
|
|
|
+ if (data.realName) {
|
|
|
+ arr.push('姓名');
|
|
|
+ }
|
|
|
+ if (data.userName) {
|
|
|
+ arr.push('电话');
|
|
|
+ }
|
|
|
+ if (data.icon) {
|
|
|
+ arr.push('头像');
|
|
|
+ }
|
|
|
+ if (data.idcard) {
|
|
|
+ arr.push('证件号');
|
|
|
+ }
|
|
|
+ if (data.realName || !data.userName||!data.icon||!data.idcard) {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: `请完善${arr.join('、')}信息!`
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
emits('confirm', data);
|
|
|
popupRef.value.close()
|
|
|
}
|
|
@@ -70,6 +95,8 @@
|
|
|
})
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss">
|
|
|
-
|
|
|
+<style scoped lang="scss">
|
|
|
+.isEmpty {
|
|
|
+ color: #ff0101;
|
|
|
+}
|
|
|
</style>
|