feat: 客服接入 订单问题修改
This commit is contained in:
@@ -27,9 +27,7 @@
|
||||
border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
|
||||
padding: 8px 12px;
|
||||
color: #000;
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
@@ -46,9 +44,7 @@
|
||||
align-items: flex-start;
|
||||
|
||||
color: rgba(60, 60, 67, 0.6);
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
@@ -136,9 +132,7 @@
|
||||
|
||||
.date {
|
||||
color: #000;
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
@@ -148,9 +142,7 @@
|
||||
|
||||
.venueTime {
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
@@ -177,9 +169,7 @@
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
@@ -223,9 +213,7 @@
|
||||
gap: 4px;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
@@ -241,9 +229,7 @@
|
||||
&Address {
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
text-align: center;
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
@@ -255,6 +241,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
.customer {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 4px;
|
||||
color: var(--Labels-Secondary, rgba(60, 60, 67, 0.6));
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
line-height: 16px;
|
||||
|
||||
.customerIcon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.gameInfoActions {
|
||||
min-height: 12px;
|
||||
padding: 0 12px;
|
||||
@@ -298,9 +304,7 @@
|
||||
align-items: center;
|
||||
align-self: stretch;
|
||||
color: #000;
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
@@ -326,9 +330,7 @@
|
||||
width: 120px;
|
||||
display: inline-block;
|
||||
color: rgba(60, 60, 67, 0.6);
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
@@ -338,9 +340,7 @@
|
||||
|
||||
.content {
|
||||
color: #000;
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
@@ -362,7 +362,7 @@
|
||||
gap: 8px;
|
||||
|
||||
.copy {
|
||||
color: #007AFF;
|
||||
color: #007aff;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -378,9 +378,7 @@
|
||||
align-items: center;
|
||||
align-self: stretch;
|
||||
color: #000;
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
@@ -401,9 +399,7 @@
|
||||
align-items: center;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
@@ -414,9 +410,7 @@
|
||||
&:nth-child(1) {
|
||||
color: #000;
|
||||
text-align: center;
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
@@ -451,9 +445,7 @@
|
||||
align-items: center;
|
||||
align-self: stretch;
|
||||
color: #000;
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
@@ -489,9 +481,7 @@
|
||||
background: #000;
|
||||
box-shadow: 0 8px 64px 0 rgba(0, 0, 0, 0.1);
|
||||
backdrop-filter: blur(16px);
|
||||
font-feature-settings:
|
||||
"liga" off,
|
||||
"clig" off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
@@ -516,7 +506,8 @@
|
||||
border-bottom-right-radius: 16px;
|
||||
overflow: hidden;
|
||||
|
||||
& > .cancel, & > .confirm {
|
||||
& > .cancel,
|
||||
& > .confirm {
|
||||
padding: 12px 10px;
|
||||
height: 44px;
|
||||
width: 50%;
|
||||
@@ -545,9 +536,9 @@
|
||||
|
||||
.cancelTip {
|
||||
padding: 12px 15px;
|
||||
color: rgba(60, 60, 67, 0.60);
|
||||
color: rgba(60, 60, 67, 0.6);
|
||||
text-align: center;
|
||||
font-feature-settings: 'liga' off, 'clig' off;
|
||||
font-feature-settings: "liga" off, "clig" off;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
|
||||
@@ -19,9 +19,12 @@ import {
|
||||
getOrderStatus,
|
||||
generateOrderActions,
|
||||
} from "@/utils";
|
||||
import { getStorage, setStorage } from "@/store/storage";
|
||||
import detailService, { GameData } from "@/services/detailService";
|
||||
import { withAuth, RefundPopup } from "@/components";
|
||||
import img from "@/config/images";
|
||||
import CustomerIcon from "@/static/order/customer.svg";
|
||||
import { handleCustomerService } from "@/services/userService";
|
||||
import { DECLAIMER } from "./config";
|
||||
import styles from "./index.module.scss";
|
||||
|
||||
@@ -65,8 +68,15 @@ function genGameNotice(order_status, start_time) {
|
||||
function GameInfo(props) {
|
||||
const { detail, currentLocation, orderDetail, init } = props;
|
||||
const { order_status, refund_status, amount } = orderDetail;
|
||||
const { latitude, longitude, location, location_name, start_time, end_time, weather } =
|
||||
detail || {};
|
||||
const {
|
||||
latitude,
|
||||
longitude,
|
||||
location,
|
||||
location_name,
|
||||
start_time,
|
||||
end_time,
|
||||
weather,
|
||||
} = detail || {};
|
||||
|
||||
const [{ iconDay, tempMax, tempMin }] = weather || [{}];
|
||||
|
||||
@@ -306,8 +316,9 @@ function GameInfo(props) {
|
||||
</View>
|
||||
{/* Action bar */}
|
||||
<View className={styles.gameInfoActions}>
|
||||
{orderDetail.order_id
|
||||
? generateOrderActions(
|
||||
{orderDetail.order_id ? (
|
||||
<>
|
||||
{generateOrderActions(
|
||||
orderDetail,
|
||||
{
|
||||
handleDeleteOrder,
|
||||
@@ -324,8 +335,15 @@ function GameInfo(props) {
|
||||
>
|
||||
{obj.text}
|
||||
</Button>
|
||||
))
|
||||
: ""}
|
||||
))}
|
||||
<View className={styles.customer} onClick={handleCustomerService}>
|
||||
<Image className={styles.customerIcon} src={CustomerIcon} />
|
||||
<Text>客服</Text>
|
||||
</View>
|
||||
</>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</View>
|
||||
<Dialog id="detailCancelOrder" />
|
||||
<RefundPopup ref={refundRef} />
|
||||
@@ -353,10 +371,7 @@ function OrderMsg(props) {
|
||||
const { order_info: { registrant_phone } = {} } = checkOrderInfo;
|
||||
const startTime = dayjs(start_time);
|
||||
const endTime = dayjs(end_time);
|
||||
const startYear = startTime.format("YYYY");
|
||||
const startMonth = startTime.format("M");
|
||||
const startDay = startTime.format("D");
|
||||
const startDate = `${startYear}年${startMonth}月${startDay}日`;
|
||||
const startDate = startTime.format("YYYY年M月D日");
|
||||
const gameRange = `${startTime.format("HH:mm")} - ${endTime.format("HH:mm")}`;
|
||||
const summary = [
|
||||
{
|
||||
@@ -485,9 +500,10 @@ const OrderCheck = () => {
|
||||
const [location, setLocation] = useState<number[]>([0, 0]);
|
||||
const [checkOrderInfo, setCheckOrderInfo] = useState<GameOrderRes | {}>({});
|
||||
const [orderDetail, setOrderDetail] = useState({});
|
||||
const [paying, setPaying] = useState(false);
|
||||
|
||||
useDidShow(() => {
|
||||
init()
|
||||
init();
|
||||
});
|
||||
|
||||
async function init() {
|
||||
@@ -535,20 +551,32 @@ const OrderCheck = () => {
|
||||
|
||||
//TODO: get order msg from id
|
||||
const handlePay = async () => {
|
||||
setPaying(true);
|
||||
Taro.showLoading({
|
||||
title: "支付中...",
|
||||
mask: true,
|
||||
});
|
||||
|
||||
let payment_params = {}
|
||||
let payment_params = {};
|
||||
try {
|
||||
payment_params = await getPaymentParams();
|
||||
if (!id) {
|
||||
setStorage("backFlag", "1");
|
||||
Taro.redirectTo({
|
||||
url: `/order_pages/orderDetail/index?id=${payment_params.order_id}`,
|
||||
});
|
||||
}
|
||||
await payOrder(payment_params);
|
||||
Taro.hideLoading();
|
||||
Taro.showToast({
|
||||
title: "支付成功",
|
||||
icon: "success",
|
||||
});
|
||||
const backFlag = getStorage("backFlag");
|
||||
if (backFlag === "1") {
|
||||
setStorage("backFlag", "0");
|
||||
Taro.navigateBack();
|
||||
}
|
||||
// Taro.navigateBack({
|
||||
// delta: 1,
|
||||
// });
|
||||
@@ -559,14 +587,9 @@ const OrderCheck = () => {
|
||||
icon: "none",
|
||||
});
|
||||
} finally {
|
||||
await delay(1000);
|
||||
if (!id) {
|
||||
Taro.redirectTo({
|
||||
url: `/order_pages/orderDetail/index?id=${payment_params.order_id}`,
|
||||
});
|
||||
} else {
|
||||
init()
|
||||
}
|
||||
setStorage("backFlag", "0");
|
||||
init();
|
||||
setPaying(false);
|
||||
}
|
||||
};
|
||||
if (!id && !gameId) {
|
||||
@@ -609,7 +632,11 @@ const OrderCheck = () => {
|
||||
{(!id ||
|
||||
(order_status === OrderStatus.PENDING &&
|
||||
cancel_type === CancelType.NONE)) && (
|
||||
<Button className={styles.payButton} onClick={handlePay}>
|
||||
<Button
|
||||
className={styles.payButton}
|
||||
disabled={paying}
|
||||
onClick={handlePay}
|
||||
>
|
||||
{order_status === OrderStatus.PENDING ? "继续" : "确认"}
|
||||
支付
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user