修改用户登陆认证流程
This commit is contained in:
@@ -27,6 +27,7 @@ import { withAuth, RefundPopup, GeneralNavbar } from "@/components";
|
||||
import img from "@/config/images";
|
||||
import CustomerIcon from "@/static/order/customer.svg";
|
||||
import { handleCustomerService } from "@/services/userService";
|
||||
import { requireLoginWithPhone } from "@/utils/helper";
|
||||
import { DECLAIMER } from "./config";
|
||||
import styles from "./index.module.scss";
|
||||
|
||||
@@ -583,6 +584,11 @@ const OrderCheck = () => {
|
||||
}
|
||||
|
||||
async function getPaymentParams() {
|
||||
// 检查登录状态和手机号(创建订单前检查)
|
||||
if (!requireLoginWithPhone()) {
|
||||
throw new Error("请先绑定手机号");
|
||||
}
|
||||
|
||||
const unPaidRes = await orderService.getUnpaidOrder(detail.id);
|
||||
if (unPaidRes.code === 0 && unPaidRes.data.has_unpaid_order) {
|
||||
return unPaidRes.data.payment_params;
|
||||
@@ -596,6 +602,10 @@ const OrderCheck = () => {
|
||||
|
||||
//TODO: get order msg from id
|
||||
const handlePay = async () => {
|
||||
// 检查登录状态和手机号
|
||||
if (!requireLoginWithPhone()) {
|
||||
return; // 未登录或未绑定手机号,已跳转到登录页
|
||||
}
|
||||
setPaying(true);
|
||||
Taro.showLoading({
|
||||
title: "支付中...",
|
||||
|
||||
Reference in New Issue
Block a user