first commit
This commit is contained in:
137
unpackage/dist/dev/mp-alipay/pages/login/getBackAccout.js
vendored
Normal file
137
unpackage/dist/dev/mp-alipay/pages/login/getBackAccout.js
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
"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: "getBackAccout",
|
||||
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({
|
||||
phone: "",
|
||||
smsCode: ""
|
||||
});
|
||||
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.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" });
|
||||
let _res = await api_api.forgotUserName(dataFrom);
|
||||
if (_res.userNames.length == 0) {
|
||||
common_vendor.index.showModal({
|
||||
title: "提示",
|
||||
content: "该手机号还未注册",
|
||||
showCancel: false,
|
||||
confirmText: "我知道了"
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.showModal({
|
||||
title: "已找回的用户名",
|
||||
content: _res.userNames.join(","),
|
||||
showCancel: false,
|
||||
confirmText: "确认",
|
||||
success: () => {
|
||||
common_vendor.index.setClipboardData({
|
||||
data: _res.userNames.join(","),
|
||||
//要被复制的内容
|
||||
success: () => {
|
||||
common_vendor.index.showToast({
|
||||
//提示
|
||||
title: "已复制用户名"
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack();
|
||||
}, 1500);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
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$2,
|
||||
e: common_assets._imports_1$1,
|
||||
f: common_vendor.o(($event) => common_vendor.unref(dataFrom).phone = $event),
|
||||
g: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入您的手机号",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).phone
|
||||
}),
|
||||
h: common_vendor.o(($event) => common_vendor.unref(dataFrom).smsCode = $event),
|
||||
i: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入验证码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).smsCode
|
||||
}),
|
||||
j: () => ({
|
||||
r: uCode,
|
||||
k: "uCode"
|
||||
}),
|
||||
k: common_vendor.o(common_vendor.unref(codeChange2)),
|
||||
l: common_vendor.p({
|
||||
["keep-running"]: true,
|
||||
["start-text"]: "点我获取验证码"
|
||||
}),
|
||||
m: common_vendor.t(common_vendor.unref(tips)),
|
||||
n: common_vendor.o((...args) => common_vendor.unref(getCode2) && common_vendor.unref(getCode2)(...args)),
|
||||
o: common_vendor.unref(tips),
|
||||
p: 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-07a163b6"]]);
|
||||
my.createPage(MiniProgramPage);
|
||||
Reference in New Issue
Block a user