first commit
This commit is contained in:
147
unpackage/dist/dev/mp-weixin/pages/login/getBack.js
vendored
Normal file
147
unpackage/dist/dev/mp-weixin/pages/login/getBack.js
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
||||
const _easycom_statusBar2 = common_vendor.resolveComponent("statusBar");
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
const _easycom_up_code2 = common_vendor.resolveComponent("up-code");
|
||||
(_easycom_up_icon2 + _easycom_statusBar2 + _easycom_up_input2 + _easycom_up_code2)();
|
||||
}
|
||||
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
||||
const _easycom_statusBar = () => "../../components/statusBar/statusBar.js";
|
||||
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
||||
const _easycom_up_code = () => "../../uni_modules/uview-plus/components/u-code/u-code.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_icon + _easycom_statusBar + _easycom_up_input + _easycom_up_code)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "getBack",
|
||||
setup(__props) {
|
||||
const statusBarHeight = common_vendor.index.getSystemInfoSync().statusBarHeight + "px";
|
||||
let tips = common_vendor.ref("");
|
||||
let uCode = common_vendor.ref(null);
|
||||
let dataFrom = common_vendor.reactive({
|
||||
userName: "",
|
||||
passwd: "",
|
||||
phone: "",
|
||||
smsCode: "",
|
||||
confirmPasswd: ""
|
||||
});
|
||||
let codeChange2 = (text) => {
|
||||
tips.value = text;
|
||||
};
|
||||
let getCode2 = () => {
|
||||
if (!dataFrom.phone)
|
||||
return common_vendor.index.showToast({ title: "请输入手机号", icon: "none" });
|
||||
if (uCode.value.canGetCode) {
|
||||
common_vendor.index.showLoading({
|
||||
title: "正在获取验证码"
|
||||
});
|
||||
api_api.smsCode({
|
||||
phone: dataFrom.phone
|
||||
}).then((res) => {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.$u.toast("验证码已发送");
|
||||
uCode.value.start();
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.$u.toast("倒计时结束后再发送");
|
||||
}
|
||||
};
|
||||
let submit = async () => {
|
||||
if (!dataFrom.userName)
|
||||
return common_vendor.index.showToast({ title: "请输入用户名", icon: "none" });
|
||||
if (!dataFrom.phone)
|
||||
return common_vendor.index.showToast({ title: "请输入手机号", icon: "none" });
|
||||
if (dataFrom.phone.length != 11)
|
||||
return common_vendor.index.showToast({ title: "请输入正确的手机号", icon: "none" });
|
||||
if (!dataFrom.smsCode)
|
||||
return common_vendor.index.showToast({ title: "请输入验证码", icon: "none" });
|
||||
if (!dataFrom.passwd)
|
||||
return common_vendor.index.showToast({ title: "请输入密码", icon: "none" });
|
||||
if (!dataFrom.confirmPasswd)
|
||||
return common_vendor.index.showToast({ title: "请再次输入密码", icon: "none" });
|
||||
if (dataFrom.passwd != dataFrom.confirmPasswd)
|
||||
return common_vendor.index.showToast({ title: "两次密码输入不一致", icon: "none" });
|
||||
await api_api.forgotPassword(dataFrom);
|
||||
common_vendor.index.showToast({ title: "修改成功", icon: "none" });
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack();
|
||||
}, 200);
|
||||
};
|
||||
let back = () => {
|
||||
common_vendor.index.navigateBack();
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: statusBarHeight,
|
||||
b: common_vendor.o(common_vendor.unref(back)),
|
||||
c: common_vendor.p({
|
||||
name: "arrow-left",
|
||||
bold: true,
|
||||
color: "#000"
|
||||
}),
|
||||
d: common_assets._imports_0$1,
|
||||
e: common_assets._imports_1$1,
|
||||
f: common_vendor.o(($event) => common_vendor.unref(dataFrom).userName = $event),
|
||||
g: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入您的用户名",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).userName
|
||||
}),
|
||||
h: common_vendor.o(($event) => common_vendor.unref(dataFrom).passwd = $event),
|
||||
i: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
type: "password",
|
||||
placeholder: "请输入您的密码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).passwd
|
||||
}),
|
||||
j: common_vendor.o(($event) => common_vendor.unref(dataFrom).confirmPasswd = $event),
|
||||
k: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
type: "password",
|
||||
placeholder: "请再次输入您的密码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).confirmPasswd
|
||||
}),
|
||||
l: common_vendor.o(($event) => common_vendor.unref(dataFrom).phone = $event),
|
||||
m: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入您的手机号",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).phone
|
||||
}),
|
||||
n: common_vendor.o(($event) => common_vendor.unref(dataFrom).smsCode = $event),
|
||||
o: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入验证码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).smsCode
|
||||
}),
|
||||
p: common_vendor.sr(uCode, "d23ab30f-7", {
|
||||
"k": "uCode"
|
||||
}),
|
||||
q: common_vendor.o(common_vendor.unref(codeChange2)),
|
||||
r: common_vendor.p({
|
||||
["keep-running"]: true,
|
||||
["start-text"]: "点我获取验证码"
|
||||
}),
|
||||
s: common_vendor.t(common_vendor.unref(tips)),
|
||||
t: common_vendor.o((...args) => common_vendor.unref(getCode2) && common_vendor.unref(getCode2)(...args)),
|
||||
v: common_vendor.unref(tips),
|
||||
w: common_vendor.o((...args) => common_vendor.unref(submit) && common_vendor.unref(submit)(...args))
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-d23ab30f"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
Reference in New Issue
Block a user