216 lines
6.5 KiB
JavaScript
216 lines
6.5 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const api_auth = require("../../api/auth.js");
|
|
const utils_enumUtils = require("../../utils/enumUtils.js");
|
|
const CommonCard = () => "../../components/common_card.js";
|
|
const Header = () => "../../components/header.js";
|
|
const _sfc_main = {
|
|
computed: {
|
|
CERT_OPTION() {
|
|
return utils_enumUtils.CERT_OPTION;
|
|
}
|
|
},
|
|
components: { CommonCard, Header },
|
|
data() {
|
|
return {
|
|
inputCss: {
|
|
"height": "80rpx",
|
|
"border-radius": "30rpx",
|
|
"border": "0rpx"
|
|
},
|
|
form: {
|
|
name: null,
|
|
certType: null,
|
|
// 证状证件类型:1-居民身份证,2-护照
|
|
certName: null,
|
|
certNo: null,
|
|
// 证件号码
|
|
certFimg: null,
|
|
// 证件正面照片
|
|
certBimg: null
|
|
// 证件背面照片
|
|
},
|
|
formList: [
|
|
{
|
|
id: 1,
|
|
title: "真实姓名",
|
|
formName: "name",
|
|
placeholder: "请输入您的真实姓名",
|
|
type: "text"
|
|
},
|
|
{
|
|
id: 3,
|
|
title: "证件号码",
|
|
formName: "certNo",
|
|
placeholder: "请输入证件号码",
|
|
type: "text"
|
|
}
|
|
],
|
|
uploadTemplList: [
|
|
{
|
|
id: 1,
|
|
title: "标准",
|
|
isOk: true,
|
|
url: "/static/common/ID_ok.png"
|
|
},
|
|
{
|
|
id: 2,
|
|
title: "边框缺失",
|
|
isOk: false,
|
|
url: "/static/common/ID_error_1.png"
|
|
},
|
|
{
|
|
id: 3,
|
|
title: "照片模糊",
|
|
isOk: false,
|
|
url: "/static/common/ID_error_2.png"
|
|
},
|
|
{
|
|
id: 4,
|
|
title: "闪光强烈",
|
|
isOk: false,
|
|
url: "/static/common/ID_error_3.png"
|
|
}
|
|
],
|
|
certShow: false,
|
|
certOption: []
|
|
};
|
|
},
|
|
methods: {
|
|
async addAuthentication() {
|
|
const params = {
|
|
...this.form
|
|
};
|
|
if (!params.name) {
|
|
this.$refs.uToastRef.show({
|
|
type: "error",
|
|
message: "请输入您的真实姓名"
|
|
});
|
|
return;
|
|
}
|
|
if (!params.certType) {
|
|
this.$refs.uToastRef.show({
|
|
type: "error",
|
|
message: "请选择证件类型"
|
|
});
|
|
return;
|
|
}
|
|
if (!params.certNo) {
|
|
this.$refs.uToastRef.show({
|
|
type: "error",
|
|
message: "请输入证件号码"
|
|
});
|
|
return;
|
|
}
|
|
if (params.certFimg.length === 0) {
|
|
this.$refs.uToastRef.show({
|
|
type: "error",
|
|
message: "请上传证件正面照片"
|
|
});
|
|
return;
|
|
}
|
|
if (params.certBimg.length === 0) {
|
|
this.$refs.uToastRef.show({
|
|
type: "error",
|
|
message: "请上传证件背面照片"
|
|
});
|
|
return;
|
|
}
|
|
common_vendor.index.__f__("log", "at pages/mine_authentication/mine_authentication.vue:159", "params", params);
|
|
const resp = await api_auth.realNameAuthentication(params);
|
|
if (resp && resp.bizcode === 100) {
|
|
common_vendor.index.navigateTo({
|
|
url: "/pages/mine_authentication_ok/mine_authentication_ok"
|
|
});
|
|
}
|
|
},
|
|
// 提交地址
|
|
certConfirm(e) {
|
|
const {
|
|
columnIndex,
|
|
value,
|
|
values,
|
|
index
|
|
} = e;
|
|
const data = value[0];
|
|
this.form.certType = data.key;
|
|
this.form.certName = data.value;
|
|
this.certShowCheck(false);
|
|
},
|
|
// 选择银行的弹框
|
|
async certShowCheck(status) {
|
|
this.certShow = status;
|
|
},
|
|
getValue(type, value) {
|
|
if (type === "Z") {
|
|
this.form.certFimg = value;
|
|
} else if (type === "F") {
|
|
this.form.certBimg = value;
|
|
}
|
|
}
|
|
}
|
|
};
|
|
if (!Array) {
|
|
const _component_Header = common_vendor.resolveComponent("Header");
|
|
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
|
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
|
const _component_CommonCard = common_vendor.resolveComponent("CommonCard");
|
|
const _easycom_up_picker2 = common_vendor.resolveComponent("up-picker");
|
|
const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast");
|
|
(_component_Header + _easycom_up_input2 + _easycom_up_image2 + _component_CommonCard + _easycom_up_picker2 + _easycom_up_toast2)();
|
|
}
|
|
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
|
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
|
const _easycom_up_picker = () => "../../uni_modules/uview-plus/components/u-picker/u-picker.js";
|
|
const _easycom_up_toast = () => "../../uni_modules/uview-plus/components/u-toast/u-toast.js";
|
|
if (!Math) {
|
|
(_easycom_up_input + _easycom_up_image + _easycom_up_picker + _easycom_up_toast)();
|
|
}
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return {
|
|
a: common_vendor.p({
|
|
leftTitle: _ctx.$t("authentication.title"),
|
|
["left-path-type"]: "switchTab",
|
|
["left-path"]: "/pages/mine/mine"
|
|
}),
|
|
b: common_vendor.f($data.formList, (item, k0, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.title),
|
|
b: "ff62741c-1-" + i0,
|
|
c: common_vendor.o(($event) => $data.form[item.formName] = $event, item.id),
|
|
d: common_vendor.p({
|
|
placeholder: item.placeholder,
|
|
border: "surround",
|
|
customStyle: $data.inputCss,
|
|
type: item.type,
|
|
modelValue: $data.form[item.formName]
|
|
}),
|
|
e: item.id
|
|
};
|
|
}),
|
|
c: common_vendor.t($data.form.certName || "请选择"),
|
|
d: common_vendor.p({
|
|
src: "/static/common/right.png",
|
|
width: "16",
|
|
height: "16",
|
|
bgColor: "#f1f6ff00"
|
|
}),
|
|
e: common_vendor.o(($event) => $options.certShowCheck(true)),
|
|
f: common_vendor.o($options.getValue),
|
|
g: common_vendor.o((...args) => $options.addAuthentication && $options.addAuthentication(...args)),
|
|
h: common_vendor.o($options.certConfirm),
|
|
i: common_vendor.o(($event) => $data.certShow = false),
|
|
j: common_vendor.o(($event) => $data.certShow = false),
|
|
k: common_vendor.p({
|
|
show: $data.certShow,
|
|
columns: [$options.CERT_OPTION],
|
|
keyName: "value",
|
|
itemHeight: "34"
|
|
}),
|
|
l: common_vendor.sr("uToastRef", "ff62741c-5")
|
|
};
|
|
}
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ff62741c"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine_authentication/mine_authentication.js.map
|