|
const __sfc__ = defineComponent({
|
|
data() {
|
|
return {
|
|
username: '',
|
|
password: '',
|
|
agreed: false
|
|
};
|
|
},
|
|
methods: {
|
|
handleAgreementChange(e) {
|
|
this.agreed = e.detail.value.includes('agree');
|
|
},
|
|
handleLogin() {
|
|
if (!this.agreed) {
|
|
uni.showToast({
|
|
title: '请先同意用户协议和隐私政策',
|
|
icon: 'none'
|
|
});
|
|
return;
|
|
}
|
|
// 这里可以添加登录逻辑
|
|
uni.showToast({
|
|
title: '登录成功',
|
|
icon: 'success'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
export default __sfc__;
|
|
function GenPagesIndexIndex1Render(this: InstanceType<typeof __sfc__>): any | null {
|
|
const _ctx = this;
|
|
const _cache = this.$.renderCache;
|
|
const _component_checkbox = resolveComponent("checkbox");
|
|
const _component_label = resolveComponent("label");
|
|
const _component_checkbox_group = resolveComponent("checkbox-group");
|
|
return createElementVNode("view", utsMapOf({ class: "container" }), [
|
|
createElementVNode("view", utsMapOf({ class: "form" }), [
|
|
createElementVNode("input", utsMapOf({
|
|
class: "input",
|
|
type: "text",
|
|
placeholder: "请输入您的账号",
|
|
modelValue: _ctx.username,
|
|
onInput: ($event: InputEvent) => { (_ctx.username) = $event.detail.value; }
|
|
}), null, 40 /* PROPS, NEED_HYDRATION */, ["modelValue", "onInput"]),
|
|
createElementVNode("input", utsMapOf({
|
|
class: "input",
|
|
type: "password",
|
|
placeholder: "请输入您的密码",
|
|
modelValue: _ctx.password,
|
|
onInput: ($event: InputEvent) => { (_ctx.password) = $event.detail.value; }
|
|
}), null, 40 /* PROPS, NEED_HYDRATION */, ["modelValue", "onInput"]),
|
|
createElementVNode("view", utsMapOf({ class: "agreement" }), [
|
|
createVNode(_component_checkbox_group, utsMapOf({ onChange: _ctx.handleAgreementChange }), utsMapOf({
|
|
default: withSlotCtx((): any[] => [
|
|
createVNode(_component_label, null, utsMapOf({
|
|
default: withSlotCtx((): any[] => [
|
|
createVNode(_component_checkbox, utsMapOf({ value: "agree" })),
|
|
" 阅读并同意《用户协议》和《隐私政策》 "
|
|
]),
|
|
_: 1 /* STABLE */
|
|
}))
|
|
]),
|
|
_: 1 /* STABLE */
|
|
}), 8 /* PROPS */, ["onChange"])
|
|
]),
|
|
createElementVNode("button", utsMapOf({
|
|
class: "button",
|
|
onClick: _ctx.handleLogin
|
|
}), "登录", 8 /* PROPS */, ["onClick"])
|
|
])
|
|
]);
|
|
}
|
|
const GenPagesIndexIndex1Styles = [utsMapOf([["container", padStyleMapOf(utsMapOf([["display", "flex"], ["justifyContent", "center"], ["alignItems", "center"], ["backgroundColor", "#f5f5f5"]]))], ["form", padStyleMapOf(utsMapOf([["width", "80%"], ["backgroundColor", "#ffffff"], ["paddingTop", 20], ["paddingRight", 20], ["paddingBottom", 20], ["paddingLeft", 20], ["borderRadius", 8], ["boxShadow", "0 2px 10px rgba(0, 0, 0, 0.1)"]]))], ["input", padStyleMapOf(utsMapOf([["width", "100%"], ["height", 40], ["marginBottom", 15], ["paddingTop", 10], ["paddingRight", 10], ["paddingBottom", 10], ["paddingLeft", 10], ["borderWidth", 1], ["borderStyle", "solid"], ["borderColor", "#cccccc"], ["borderRadius", 4]]))], ["agreement", padStyleMapOf(utsMapOf([["marginBottom", 15]]))], ["button", padStyleMapOf(utsMapOf([["width", "100%"], ["height", 40], ["backgroundColor", "#007aff"], ["color", "#ffffff"], ["borderWidth", "medium"], ["borderStyle", "none"], ["borderColor", "#000000"], ["borderRadius", 4], ["fontSize", 16]]))]])];
|
|
//# sourceMappingURL=index_1.uvue.map
|