|
@@ -15,8 +15,8 @@ const _sfc_main = {
|
|
|
const name = common_vendor.ref(common_vendor.index.getStorageSync("form_name") || "");
|
|
const name = common_vendor.ref(common_vendor.index.getStorageSync("form_name") || "");
|
|
|
const phone = common_vendor.ref(common_vendor.index.getStorageSync("form_phone") || "");
|
|
const phone = common_vendor.ref(common_vendor.index.getStorageSync("form_phone") || "");
|
|
|
const company = common_vendor.ref(common_vendor.index.getStorageSync("form_company") || "");
|
|
const company = common_vendor.ref(common_vendor.index.getStorageSync("form_company") || "");
|
|
|
- const content = common_vendor.ref("");
|
|
|
|
|
- const wxPhone = common_vendor.ref(9876);
|
|
|
|
|
|
|
+ const content = common_vendor.ref(common_vendor.index.getStorageSync("form_content") || "");
|
|
|
|
|
+ const wxPhone = common_vendor.ref(common_vendor.index.getStorageSync("wxPhone") || "");
|
|
|
const handleSubmit = () => {
|
|
const handleSubmit = () => {
|
|
|
const reName = /^[\u4e00-\u9fa5]{2,4}$/;
|
|
const reName = /^[\u4e00-\u9fa5]{2,4}$/;
|
|
|
const rePhone = /^[1][3,4,5,7,8,9][0-9]{9}$/;
|
|
const rePhone = /^[1][3,4,5,7,8,9][0-9]{9}$/;
|
|
@@ -62,6 +62,28 @@ const _sfc_main = {
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ common_vendor.index.setStorageSync("form_name", name.value);
|
|
|
|
|
+ common_vendor.index.setStorageSync("form_phone", phone.value);
|
|
|
|
|
+ common_vendor.index.setStorageSync("form_company", company.value);
|
|
|
|
|
+ common_vendor.index.setStorageSync("form_content", content.value);
|
|
|
|
|
+ if (!wxPhone.value) {
|
|
|
|
|
+ common_vendor.index.showModal({
|
|
|
|
|
+ title: "提示",
|
|
|
|
|
+ content: "本次操作需要获取您的手机号码",
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ common_vendor.index.navigateTo({
|
|
|
|
|
+ url: "/pages/authorization/authorization"
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (res.cancel)
|
|
|
|
|
+ ;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ submit();
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ const submit = () => {
|
|
|
common_vendor.index.showModal({
|
|
common_vendor.index.showModal({
|
|
|
title: "提示",
|
|
title: "提示",
|
|
|
content: "确认提交吗",
|
|
content: "确认提交吗",
|
|
@@ -83,10 +105,8 @@ const _sfc_main = {
|
|
|
title: "提交成功",
|
|
title: "提交成功",
|
|
|
duration: 3e3
|
|
duration: 3e3
|
|
|
});
|
|
});
|
|
|
- common_vendor.index.setStorageSync("form_name", name.value);
|
|
|
|
|
- common_vendor.index.setStorageSync("form_phone", phone.value);
|
|
|
|
|
- common_vendor.index.setStorageSync("form_company", company.value);
|
|
|
|
|
content.value = "";
|
|
content.value = "";
|
|
|
|
|
+ common_vendor.index.setStorageSync("form_content", "");
|
|
|
} else {
|
|
} else {
|
|
|
common_vendor.index.showToast({
|
|
common_vendor.index.showToast({
|
|
|
title: res2.message,
|
|
title: res2.message,
|