feat:更新
This commit is contained in:
1 parent
4d4dbe4cd9
commit
fb09018f1e
7 files changed
+30
-16
No files matched your search
+4
-3
@@ -7,6 +7,7 @@ import { getQueryString } from "@/lib/util";
|
||||
|
||||
const payStore = pay(pinia);
|
||||
const locateObj = getQueryString();
|
||||
// console.log("locateObj", locateObj);
|
||||
const { openId, data, channel } = locateObj;
|
||||
|
||||
const searchKeyword = ref<string>("");
|
||||
@@ -36,11 +37,12 @@ const selectHandler = (index: number) => {
|
||||
};
|
||||
|
||||
|
||||
const regUser = /^\d{7}$/;
|
||||
const regUser = /^[0-9]*$/;
|
||||
const regPhone = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
|
||||
|
||||
const searchHandler = () => {
|
||||
const keyword = searchKeyword.value;
|
||||
if(!keyword) return;
|
||||
// console.log(keyword, regUser.test(keyword), regPhone.test(keyword));
|
||||
if (regUser.test(keyword) || regPhone.test(keyword)) {
|
||||
payStore.getChargeUser(keyword);
|
||||
@@ -95,9 +97,8 @@ const payHandler = () => {
|
||||
const confirmHandler = () => {
|
||||
const data:any = {};
|
||||
const isPhone = regPhone.test(searchKeyword.value);
|
||||
const isUserId = regUser.test(searchKeyword.value);
|
||||
if(isPhone) data.phone = searchKeyword.value;
|
||||
if(isUserId) data.erban_no = searchKeyword.value;
|
||||
else data.erban_no = userInfoErbanNo.value;
|
||||
payStore.payRequest(data);
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user