1.18整合
This commit is contained in:
152
unpackage/dist/dev/mp-weixin/pages/login/enterprise.js
vendored
Normal file
152
unpackage/dist/dev/mp-weixin/pages/login/enterprise.js
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
const _easycom_up_form_item2 = common_vendor.resolveComponent("up-form-item");
|
||||
const _easycom_up_form2 = common_vendor.resolveComponent("up-form");
|
||||
const _component_lsl_protocol_popup = common_vendor.resolveComponent("lsl-protocol-popup");
|
||||
(_easycom_up_input2 + _easycom_up_form_item2 + _easycom_up_form2 + _component_lsl_protocol_popup)();
|
||||
}
|
||||
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
||||
const _easycom_up_form_item = () => "../../uni_modules/uview-plus/components/u-form-item/u-form-item.js";
|
||||
const _easycom_up_form = () => "../../uni_modules/uview-plus/components/u-form/u-form.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_input + _easycom_up_form_item + _easycom_up_form)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "enterprise",
|
||||
setup(__props) {
|
||||
const state = common_vendor.reactive({
|
||||
showSex: false,
|
||||
isAgreed: false,
|
||||
// 用户是否同意协议
|
||||
showProtocolPopup: false,
|
||||
// 是否显示协议弹窗
|
||||
model1: {
|
||||
userInfo: {
|
||||
name: "uview-plus UI",
|
||||
sex: ""
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
"userInfo.name": {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请填写姓名",
|
||||
trigger: ["blur", "change"]
|
||||
}
|
||||
}
|
||||
});
|
||||
const toggleAgreement = () => {
|
||||
state.isAgreed = !state.isAgreed;
|
||||
};
|
||||
const showProtocol = (type) => {
|
||||
if (type === "user") {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/login/agreement"
|
||||
});
|
||||
} else if (type === "privacy") {
|
||||
state.showProtocolPopup = true;
|
||||
}
|
||||
};
|
||||
const handleRegister = () => {
|
||||
if (!state.isAgreed) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请先阅读并同意用户协议和隐私政策",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
return;
|
||||
}
|
||||
console.log("开始注册流程");
|
||||
};
|
||||
const handleAgreeProtocol = () => {
|
||||
state.isAgreed = true;
|
||||
state.showProtocolPopup = false;
|
||||
common_vendor.index.showToast({
|
||||
title: "已同意协议条款",
|
||||
icon: "success",
|
||||
duration: 1500
|
||||
});
|
||||
};
|
||||
const closeProtocolPopup = () => {
|
||||
state.showProtocolPopup = false;
|
||||
};
|
||||
const other = [
|
||||
[
|
||||
{
|
||||
tit: "《服务协议》",
|
||||
type: "page",
|
||||
// doc自行下载打开文档 page跳转页面
|
||||
content: "/pages/login/agreement"
|
||||
// 文档地址/页面跳转地址
|
||||
},
|
||||
{
|
||||
tit: "《隐私政策》",
|
||||
type: "page",
|
||||
// doc自行下载打开文档 page跳转页面
|
||||
content: "/pages/login/privacy"
|
||||
// 文档地址/页面跳转地址
|
||||
}
|
||||
]
|
||||
];
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
border: "none",
|
||||
placeholder: "请填写营业执照上的企业名称",
|
||||
inputAlign: "right"
|
||||
}),
|
||||
b: common_vendor.sr("item1", "280ea37d-1,280ea37d-0"),
|
||||
c: common_vendor.p({
|
||||
required: true,
|
||||
label: "企业名称",
|
||||
prop: "userInfo.name",
|
||||
borderBottom: true,
|
||||
["label-width"]: "90"
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
border: "none",
|
||||
placeholder: "请输入管理员姓名",
|
||||
inputAlign: "right"
|
||||
}),
|
||||
e: common_vendor.sr("item1", "280ea37d-3,280ea37d-0"),
|
||||
f: common_vendor.p({
|
||||
required: true,
|
||||
label: "管理员姓名",
|
||||
prop: "userInfo.name",
|
||||
borderBottom: true,
|
||||
["label-width"]: "120"
|
||||
}),
|
||||
g: common_vendor.sr("form1", "280ea37d-0"),
|
||||
h: common_vendor.p({
|
||||
labelPosition: "left",
|
||||
model: state.model1,
|
||||
rules: state.rules
|
||||
}),
|
||||
i: common_vendor.n(state.isAgreed ? "bg-blue" : "bg-gray"),
|
||||
j: !state.isAgreed,
|
||||
k: common_vendor.o(handleRegister),
|
||||
l: state.isAgreed
|
||||
}, state.isAgreed ? {} : {}, {
|
||||
m: state.isAgreed ? 1 : "",
|
||||
n: common_vendor.o(($event) => showProtocol("user")),
|
||||
o: common_vendor.o(($event) => showProtocol("privacy")),
|
||||
p: common_vendor.o(toggleAgreement),
|
||||
q: common_vendor.o(handleAgreeProtocol),
|
||||
r: common_vendor.o(closeProtocolPopup),
|
||||
s: common_vendor.p({
|
||||
title: "用户协议和隐私政策",
|
||||
predesc: "为了更好地保护您的个人信息和合法权益,在使用我们的服务前,请您务必仔细阅读并充分理解以下协议条款。",
|
||||
subdesc: '请您详细阅读各条款内容,特别是免除或限制责任的条款。如您同意以下协议条款,请点击"同意并继续"开始使用我们的服务。',
|
||||
color: "#007AFF",
|
||||
onNeed: state.showProtocolPopup,
|
||||
other,
|
||||
open_type: "getPhoneNumber|agreePrivacyAuthorization"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-280ea37d"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
Reference in New Issue
Block a user