260 lines
7.8 KiB
JavaScript
260 lines
7.8 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const _sfc_main = {
|
|
data() {
|
|
return {
|
|
form: {
|
|
mobile: null,
|
|
code: null,
|
|
// 验证码
|
|
loginPassword: null,
|
|
loginPassword2: null,
|
|
transactionCode: null,
|
|
// 交易密码
|
|
referralCode: null
|
|
// 推荐码
|
|
},
|
|
inputCss: {
|
|
"height": "80rpx",
|
|
"background": "#F3F3F3FF",
|
|
"border-radius": "30rpx",
|
|
"border": "0rpx",
|
|
"padding-left": "16px"
|
|
},
|
|
countdown: false,
|
|
// 清空倒计时
|
|
loginPasswordIsShow: false,
|
|
loginPassword2IsShow: false,
|
|
transactionCodeIsShow: false,
|
|
// 交易密码
|
|
isPolicy: false
|
|
};
|
|
},
|
|
methods: {
|
|
registerFun() {
|
|
const params = {
|
|
...this.form
|
|
};
|
|
common_vendor.index.__f__("log", "at pages/register/register.vue:139", "params", params);
|
|
if (!params.mobile) {
|
|
this.$refs.uToastRef.show({
|
|
type: "error",
|
|
message: "请输入手机号"
|
|
});
|
|
return;
|
|
}
|
|
if (!params.code) {
|
|
this.$refs.uToastRef.show({
|
|
type: "error",
|
|
message: "请输入验证码"
|
|
});
|
|
return;
|
|
}
|
|
if (!params.loginPassword) {
|
|
this.$refs.uToastRef.show({
|
|
type: "error",
|
|
message: "请输入登录密码"
|
|
});
|
|
return;
|
|
}
|
|
if (!params.loginPassword2) {
|
|
this.$refs.uToastRef.show({
|
|
type: "error",
|
|
message: "请输入二次确认密码"
|
|
});
|
|
return;
|
|
}
|
|
if (params.loginPassword !== params.loginPassword2) {
|
|
this.$refs.uToastRef.show({
|
|
type: "error",
|
|
message: "两次输入的登录密码不一致"
|
|
});
|
|
return;
|
|
}
|
|
if (!params.referralCode) {
|
|
this.$refs.uToastRef.show({
|
|
type: "error",
|
|
message: "请输入推荐码"
|
|
});
|
|
return;
|
|
}
|
|
if (!this.isPolicy) {
|
|
this.$refs.uToastRef.show({
|
|
type: "error",
|
|
message: "请阅读完相关协议以及政策,并且勾选同意选项"
|
|
});
|
|
return;
|
|
}
|
|
common_vendor.index.__f__("log", "at pages/register/register.vue:189", "params", params);
|
|
common_vendor.index.switchTab({
|
|
url: "/pages/home/home"
|
|
});
|
|
},
|
|
/**
|
|
* 获取手机验证码
|
|
*/
|
|
getMobileCode() {
|
|
this.countdown = true;
|
|
},
|
|
getCode(val) {
|
|
this.countdown = false;
|
|
}
|
|
}
|
|
};
|
|
if (!Array) {
|
|
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
|
const _easycom_up_count_down2 = common_vendor.resolveComponent("up-count-down");
|
|
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
|
const _easycom_up_checkbox2 = common_vendor.resolveComponent("up-checkbox");
|
|
const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast");
|
|
(_easycom_up_input2 + _easycom_up_count_down2 + _easycom_up_image2 + _easycom_up_checkbox2 + _easycom_up_toast2)();
|
|
}
|
|
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
|
const _easycom_up_count_down = () => "../../uni_modules/uview-plus/components/u-count-down/u-count-down.js";
|
|
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
|
const _easycom_up_checkbox = () => "../../uni_modules/uview-plus/components/u-checkbox/u-checkbox.js";
|
|
const _easycom_up_toast = () => "../../uni_modules/uview-plus/components/u-toast/u-toast.js";
|
|
if (!Math) {
|
|
(_easycom_up_input + _easycom_up_count_down + _easycom_up_image + _easycom_up_checkbox + _easycom_up_toast)();
|
|
}
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return common_vendor.e({
|
|
a: common_vendor.o(($event) => $data.form.mobile = $event),
|
|
b: common_vendor.p({
|
|
placeholder: "请输入手机号",
|
|
border: "surround",
|
|
customStyle: $data.inputCss,
|
|
modelValue: $data.form.mobile
|
|
}),
|
|
c: $data.countdown
|
|
}, $data.countdown ? {
|
|
d: common_vendor.o(($event) => $options.getCode(false)),
|
|
e: common_vendor.p({
|
|
time: 60 * 1e3,
|
|
format: "ss"
|
|
})
|
|
} : {
|
|
f: common_vendor.o((...args) => $options.getMobileCode && $options.getMobileCode(...args))
|
|
}, {
|
|
g: common_vendor.o(($event) => $data.form.code = $event),
|
|
h: common_vendor.p({
|
|
placeholder: "请输入验证码",
|
|
border: "surround",
|
|
customStyle: $data.inputCss,
|
|
modelValue: $data.form.code
|
|
}),
|
|
i: $data.loginPasswordIsShow
|
|
}, $data.loginPasswordIsShow ? {
|
|
j: common_vendor.o(($event) => {
|
|
$data.loginPasswordIsShow = false;
|
|
}),
|
|
k: common_vendor.p({
|
|
src: "/static/login/show.png",
|
|
width: "20",
|
|
height: "20",
|
|
bgColor: "#f1f6ff00"
|
|
})
|
|
} : {
|
|
l: common_vendor.o(($event) => {
|
|
$data.loginPasswordIsShow = true;
|
|
}),
|
|
m: common_vendor.p({
|
|
src: "/static/login/hidden.png",
|
|
width: "20",
|
|
height: "20",
|
|
bgColor: "#f1f6ff00"
|
|
})
|
|
}, {
|
|
n: common_vendor.o(($event) => $data.form.loginPassword = $event),
|
|
o: common_vendor.p({
|
|
placeholder: "请输入登录密码",
|
|
border: "surround",
|
|
customStyle: $data.inputCss,
|
|
type: $data.loginPasswordIsShow ? "text" : "password",
|
|
modelValue: $data.form.loginPassword
|
|
}),
|
|
p: $data.loginPassword2IsShow
|
|
}, $data.loginPassword2IsShow ? {
|
|
q: common_vendor.o(($event) => {
|
|
$data.loginPassword2IsShow = false;
|
|
}),
|
|
r: common_vendor.p({
|
|
src: "/static/login/show.png",
|
|
width: "20",
|
|
height: "20",
|
|
bgColor: "#f1f6ff00"
|
|
})
|
|
} : {
|
|
s: common_vendor.o(($event) => {
|
|
$data.loginPassword2IsShow = true;
|
|
}),
|
|
t: common_vendor.p({
|
|
src: "/static/login/hidden.png",
|
|
width: "20",
|
|
height: "20",
|
|
bgColor: "#f1f6ff00"
|
|
})
|
|
}, {
|
|
v: common_vendor.o(($event) => $data.form.loginPassword2 = $event),
|
|
w: common_vendor.p({
|
|
placeholder: "再次输入登录密码",
|
|
border: "surround",
|
|
customStyle: $data.inputCss,
|
|
type: $data.loginPassword2IsShow ? "text" : "password",
|
|
modelValue: $data.form.loginPassword2
|
|
}),
|
|
x: $data.transactionCodeIsShow
|
|
}, $data.transactionCodeIsShow ? {
|
|
y: common_vendor.o(($event) => {
|
|
$data.transactionCodeIsShow = false;
|
|
}),
|
|
z: common_vendor.p({
|
|
src: "/static/login/show.png",
|
|
width: "20",
|
|
height: "20",
|
|
bgColor: "#f1f6ff00"
|
|
})
|
|
} : {
|
|
A: common_vendor.o(($event) => {
|
|
$data.transactionCodeIsShow = true;
|
|
}),
|
|
B: common_vendor.p({
|
|
src: "/static/login/hidden.png",
|
|
width: "20",
|
|
height: "20",
|
|
bgColor: "#f1f6ff00"
|
|
})
|
|
}, {
|
|
C: common_vendor.o(($event) => $data.form.transactionCode = $event),
|
|
D: common_vendor.p({
|
|
placeholder: "请输入交易密码",
|
|
border: "surround",
|
|
customStyle: $data.inputCss,
|
|
type: $data.transactionCodeIsShow ? "text" : "password",
|
|
modelValue: $data.form.transactionCode
|
|
}),
|
|
E: common_vendor.o(($event) => $data.form.referralCode = $event),
|
|
F: common_vendor.p({
|
|
placeholder: "推荐码",
|
|
border: "surround",
|
|
customStyle: $data.inputCss,
|
|
modelValue: $data.form.referralCode
|
|
}),
|
|
G: common_vendor.o((...args) => $options.registerFun && $options.registerFun(...args)),
|
|
H: common_vendor.o(($event) => $data.isPolicy = $event),
|
|
I: common_vendor.p({
|
|
name: "isCheck",
|
|
usedAlone: true,
|
|
shape: "circle",
|
|
activeColor: "#FF7C41",
|
|
size: "19",
|
|
iconSize: "18",
|
|
checked: $data.isPolicy
|
|
}),
|
|
J: common_vendor.sr("uToastRef", "60fa605e-14")
|
|
});
|
|
}
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/register/register.js.map
|