first commit
This commit is contained in:
115
unpackage/dist/dev/mp-alipay/pages/mine/transferBalance.js
vendored
Normal file
115
unpackage/dist/dev/mp-alipay/pages/mine/transferBalance.js
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
const _easycom_up_code2 = common_vendor.resolveComponent("up-code");
|
||||
const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
|
||||
(_easycom_up_input2 + _easycom_up_code2 + _easycom_up_button2)();
|
||||
}
|
||||
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";
|
||||
const _easycom_up_button = () => "../../uni_modules/uview-plus/components/u-button/u-button.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_input + _easycom_up_code + _easycom_up_button)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "transferBalance",
|
||||
setup(__props) {
|
||||
common_vendor.ref();
|
||||
let getInfo = common_vendor.ref({});
|
||||
let appConfig = common_vendor.ref([]);
|
||||
let tips = common_vendor.ref("");
|
||||
let uCode = common_vendor.ref(null);
|
||||
let dataFrom = common_vendor.reactive({
|
||||
rechargeMoney: "",
|
||||
smsCode: ""
|
||||
});
|
||||
common_vendor.ref();
|
||||
common_vendor.onLoad(async () => {
|
||||
let _res = await api_api.userInfo();
|
||||
getInfo.value = _res;
|
||||
const { configValue } = await api_api.getAppConfig({ configKey: "DEPOSIT" });
|
||||
appConfig.value = JSON.parse(configValue);
|
||||
});
|
||||
let codeChange2 = (text) => {
|
||||
tips.value = text;
|
||||
};
|
||||
let getCode = () => {
|
||||
if (!getInfo.value.phone)
|
||||
return common_vendor.index.showToast({ title: "请输入手机号", icon: "none" });
|
||||
if (uCode.value.canGetCode) {
|
||||
common_vendor.index.showLoading({
|
||||
title: "正在获取验证码"
|
||||
});
|
||||
api_api.smsCode({
|
||||
phone: getInfo.value.phone
|
||||
}).then((res) => {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.$u.toast("验证码已发送");
|
||||
uCode.value.start();
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.$u.toast("倒计时结束后再发送");
|
||||
}
|
||||
};
|
||||
let payOrder = async () => {
|
||||
if (!dataFrom.rechargeMoney)
|
||||
return common_vendor.index.showToast({ title: "请输入金额", icon: "none" });
|
||||
if (!dataFrom.smsCode)
|
||||
return common_vendor.index.showToast({ title: "请输入验证码", icon: "none" });
|
||||
await api_api.userPointRecharge(dataFrom);
|
||||
common_vendor.index.showModal({
|
||||
title: "提示",
|
||||
content: "提交成功",
|
||||
showCancel: false,
|
||||
success() {
|
||||
common_vendor.index.navigateBack();
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.t(common_vendor.unref(getInfo).points2),
|
||||
b: common_vendor.t(common_vendor.unref(getInfo).points1),
|
||||
c: common_vendor.o(($event) => common_vendor.unref(dataFrom).rechargeMoney = $event),
|
||||
d: common_vendor.p({
|
||||
fontSize: "36rpx",
|
||||
placeholder: "请输入转换金额",
|
||||
border: false,
|
||||
modelValue: common_vendor.unref(dataFrom).rechargeMoney
|
||||
}),
|
||||
e: common_vendor.o(($event) => common_vendor.unref(dataFrom).rechargeMoney = common_vendor.unref(getInfo).points1),
|
||||
f: common_vendor.o(($event) => common_vendor.unref(getInfo).phone = $event),
|
||||
g: common_vendor.p({
|
||||
border: false,
|
||||
disabled: true,
|
||||
modelValue: common_vendor.unref(getInfo).phone
|
||||
}),
|
||||
h: common_vendor.o(($event) => common_vendor.unref(dataFrom).smsCode = $event),
|
||||
i: common_vendor.p({
|
||||
placeholder: "请输入验证码",
|
||||
border: false,
|
||||
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(common_vendor.unref(getCode)),
|
||||
o: common_vendor.p({
|
||||
color: "#4874e5"
|
||||
}),
|
||||
p: common_vendor.o((...args) => common_vendor.unref(payOrder) && common_vendor.unref(payOrder)(...args))
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-55c70154"]]);
|
||||
my.createPage(MiniProgramPage);
|
||||
Reference in New Issue
Block a user