This commit is contained in:
shuhongfan
2023-09-04 16:40:17 +08:00
commit cf5ac25c14
8267 changed files with 1305066 additions and 0 deletions

View File

@@ -0,0 +1,123 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
var utils_validate = require("../../utils/validate.js");
var pages_api_my = require("../../pages/api/my.js");
require("../../utils/request.js");
require("../../utils/env.js");
require("../../pages/api/login.js");
if (!Array) {
const _component_nav_bar = common_vendor.resolveComponent("nav-bar");
_component_nav_bar();
}
const _sfc_main = {
__name: "index",
setup(__props) {
let namePlaceholder = common_vendor.ref("\u8BF7\u586B\u5199");
let idcardPlaceholder = common_vendor.ref("\u8BF7\u586B\u5199");
let showClearIconName = common_vendor.ref(false);
let showClearIcon = common_vendor.ref(false);
let nameInputValue = common_vendor.ref("");
let inputClearValue = common_vendor.ref("");
const isCanAuth = common_vendor.computed$1(() => {
return utils_validate.validateIdentityCard(inputClearValue.value) && nameInputValue.value;
});
const clearInput = (event) => {
inputClearValue.value = event.detail.value;
if (event.detail.value.length > 0) {
showClearIcon.value = true;
} else {
showClearIcon.value = false;
idcardPlaceholder.value = "\u8BF7\u586B\u5199";
}
};
const clearInputName = (event) => {
nameInputValue.value = event.detail.value;
if (event.detail.value.length > 0) {
showClearIconName.value = true;
} else {
showClearIconName.value = false;
namePlaceholder.value = "\u8BF7\u586B\u5199";
}
};
const clearIconName = () => {
nameInputValue.value = "";
showClearIconName.value = false;
namePlaceholder.value = "\u8BF7\u586B\u5199";
if (!inputClearValue.value) {
idcardPlaceholder.value = "\u8BF7\u586B\u5199";
}
};
const clearIcon = () => {
inputClearValue.value = "";
showClearIcon.value = false;
idcardPlaceholder.value = "\u8BF7\u586B\u5199";
if (!nameInputValue.value) {
namePlaceholder.value = "\u8BF7\u586B\u5199";
}
};
const doAuth = () => {
if (!isCanAuth.value) {
return common_vendor.index.showToast({
title: "\u4FE1\u606F\u586B\u5199\u4E0D\u5B8C\u6574",
icon: "none",
duration: 1e3
});
}
pages_api_my.getRealNameStatusApi({
flag: 1,
idCard: inputClearValue.value,
name: nameInputValue.value
}).then((res) => {
if (res.code !== 200) {
common_vendor.index.showToast({
title: res.msg,
icon: "none",
duration: 1e3
});
} else {
common_vendor.index.showToast({
title: "\u8BA4\u8BC1\u6210\u529F",
icon: "none",
duration: 1e3
});
setTimeout(() => {
common_vendor.index.switchTab({
url: "/pages/my/index"
});
}, 2e3);
}
}).catch(() => {
common_vendor.index.showToast({
title: "\u7F51\u7EDC\u5F02\u5E38",
duration: 2e3,
icon: "none"
});
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
title: "\u5B9E\u540D\u8BA4\u8BC1"
}),
b: common_vendor.o(clearInputName),
c: common_vendor.unref(nameInputValue),
d: common_vendor.unref(namePlaceholder),
e: common_vendor.unref(showClearIconName)
}, common_vendor.unref(showClearIconName) ? {
f: common_vendor.o(clearIconName)
} : {}, {
g: common_vendor.o(clearInput),
h: common_vendor.unref(inputClearValue),
i: common_vendor.unref(idcardPlaceholder),
j: common_vendor.unref(showClearIcon)
}, common_vendor.unref(showClearIcon) ? {
k: common_vendor.o(clearIcon)
} : {}, {
l: common_vendor.n(common_vendor.unref(isCanAuth) ? "active" : ""),
m: common_vendor.o(doAuth)
});
};
}
};
var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-71333222"], ["__file", "E:/project/project-wl-yonghuduan-uniapp-vue3/subPages/realName-authentication/index.vue"]]);
wx.createPage(MiniProgramPage);

View File

@@ -0,0 +1,6 @@
{
"navigationStyle": "custom",
"navigationBarTitleText": "实名认证",
"enablePullDownRefresh": false,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<nav-bar wx:if="{{a}}" class="data-v-71333222" u-i="71333222-0" bind:__l="__l" u-p="{{a}}"></nav-bar><view class="realName-authentication data-v-71333222"><view class="tips data-v-71333222">当前仅支持持有中国内地居民身份证的用户进行线上实名认证</view><view class="content data-v-71333222"> 根据《邮件快件实名收寄管理办法》等相关法律法规的要求,为了更好地向您提供邮件快件的收寄件服务,需您提供真实的身份信息。后续您本人寄件时仅需出示有效身份证件供查阅确认即可,无需再次采集。 </view><view class="form data-v-71333222"><view class="name-item data-v-71333222"><view class="label data-v-71333222">姓名</view><view class="input-box data-v-71333222"><input bindinput="{{b}}" value="{{c}}" placeholder-class="phcolor" class="uni-input data-v-71333222" placeholder="{{d}}"/><image wx:if="{{e}}" class="uni-icon data-v-71333222" src="/static/shanchu.png" bindtap="{{f}}"/></view></view><view class="identify-item data-v-71333222"><view class="label data-v-71333222">身份证号</view><view class="input-box data-v-71333222"><input bindinput="{{g}}" value="{{h}}" placeholder-class="phcolor" class="uni-input data-v-71333222" placeholder="{{i}}"/><image wx:if="{{j}}" class="uni-icon data-v-71333222" src="/static/shanchu.png" bindtap="{{k}}"/></view></view></view><view class="footer data-v-71333222"><view class="{{['btn', 'data-v-71333222', l]}}" bindtap="{{m}}">开始认证</view></view></view>

View File

@@ -0,0 +1,82 @@
/* 水平间距 */
/* 水平间距 */
.realName-authentication .tips.data-v-71333222 {
height: 60rpx;
width: 100%;
background: #FAF4DE;
color: #EA8A57;
font-size: 22rpx;
display: flex;
align-items: center;
}
.realName-authentication .tips.data-v-71333222::before {
content: "";
display: block;
width: 10rpx;
height: 10rpx;
border-radius: 50%;
background: #E88649;
margin: 0 20rpx;
}
.realName-authentication .content.data-v-71333222 {
height: 136rpx;
background: #FFFFFF;
border-radius: 24rpx;
border-radius: 20rpx;
font-size: 24rpx;
color: #919191;
margin: 21rpx;
padding: 40rpx 36rpx;
}
.realName-authentication .form.data-v-71333222 {
background: #FFFFFF;
border-radius: 24rpx;
border-radius: 20rpx;
padding: 0 24rpx;
margin: 0 21rpx;
}
.realName-authentication .form .name-item.data-v-71333222, .realName-authentication .form .identify-item.data-v-71333222 {
display: flex;
align-items: center;
justify-content: space-between;
height: 104rpx;
}
.realName-authentication .form .name-item .label.data-v-71333222, .realName-authentication .form .identify-item .label.data-v-71333222 {
font-size: 30rpx;
font-weight: bold;
}
.realName-authentication .form .name-item .input-box.data-v-71333222, .realName-authentication .form .identify-item .input-box.data-v-71333222 {
display: flex;
}
.realName-authentication .form .name-item .input-box .uni-input.data-v-71333222, .realName-authentication .form .identify-item .input-box .uni-input.data-v-71333222 {
text-align: right;
}
.realName-authentication .form .name-item .input-box .uni-icon.data-v-71333222, .realName-authentication .form .identify-item .input-box .uni-icon.data-v-71333222 {
width: 48rpx;
height: 48rpx;
}
.realName-authentication .form .name-item.data-v-71333222 {
border-bottom: 2rpx solid #F4F4F4;
}
.realName-authentication .footer.data-v-71333222 {
position: fixed;
width: 100%;
height: 164rpx;
background: #FFFFFF;
bottom: 0;
}
.realName-authentication .footer .btn.data-v-71333222 {
width: 400rpx;
height: 88rpx;
background: #CCCCCC;
border-radius: 44rpx;
text-align: center;
line-height: 88rpx;
color: white;
font-size: 30rpx;
margin: 17rpx auto;
}
.realName-authentication .footer .btn.active.data-v-71333222 {
background-color: #E84134;
color: white;
}