调整就餐报名

This commit is contained in:
ywyonui 2025-09-26 19:58:38 +08:00
parent 8e5a894267
commit f18b049326
10 changed files with 706 additions and 287 deletions

View File

@ -3,29 +3,15 @@ import { get, post } from "@/utils/request";
/** /**
* *
*/ */
export const checkXsJcApi = async (params: any) => { export const checkXsJcBmApi = async (params: any) => {
return await get("/mobile/jz/jc/checkXsJc", params); return await get("/mobile/jz/jc/checkXsJcBm", params);
};
/**
*
*/
export const jcGetJcBzListApi = async (params: any) => {
return await get("/mobile/jz/jc/getJcBzList", params);
};
/**
*
*/
export const jcGetJcBzDetailApi = async (params: any) => {
return await get("/mobile/jz/jc/getJcBzDetail", params);
}; };
/** /**
* *
*/ */
export const jcBmJcBzApi = async (params: any) => { export const jcXsBmJcApi = async (params: any) => {
return await post("/mobile/jz/jc/bmJcBz", params); return await post("/mobile/jz/jc/xsBmJc", params);
}; };
/** /**

View File

@ -358,6 +358,13 @@
"navigationBarTitleText": "支付失败", "navigationBarTitleText": "支付失败",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path": "pages/base/jc/pay/qrcode",
"style": {
"navigationBarTitleText": "收款码",
"enablePullDownRefresh": false
}
} }
], ],
"globalStyle": { "globalStyle": {

View File

@ -49,8 +49,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch, onMounted } from "vue"; import { ref, watch, onMounted } from "vue";
import { useDataStore } from "@/store/modules/data"; import { useDataStore } from "@/store/modules/data";
import { jcGetJcBzListApi } from "@/api/base/jcApi"; const { getJc, setJcBz } = useDataStore();
const { setJcBzData } = useDataStore();
// //
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
@ -72,15 +71,9 @@ const jcBzList = ref<any>([]);
// //
const getJcBzList = async () => { const getJcBzList = async () => {
try { try {
const res = await jcGetJcBzListApi({ jcBzList.value = getJc.jcBzList || [];
xsId: props.xsId //
}); initSelectedStatus();
if (res.resultCode === 1) {
// jcBzList
jcBzList.value = res.result?.jcBzList || [];
//
initSelectedStatus();
}
} catch (error) { } catch (error) {
console.error('获取就餐标准列表失败:', error); console.error('获取就餐标准列表失败:', error);
} }
@ -88,18 +81,7 @@ const getJcBzList = async () => {
// //
const initSelectedStatus = () => { const initSelectedStatus = () => {
// ID
let selectedJcBzIds = uni.getStorageSync("selectedJcBzIds") || [];
jcBzList.value.forEach((jcBz: any) => {
jcBz.isSelected = selectedJcBzIds.includes(jcBz.id);
});
//
const selectedData = jcBzList.value.filter((item: any) =>
selectedJcBzIds.includes(item.id)
);
emit("selectedData", selectedData);
}; };
// //
@ -148,7 +130,7 @@ const toggleSelection = (jcBz: any) => {
} }
const goToDetail = (jcBz: any) => { const goToDetail = (jcBz: any) => {
setJcBzData(jcBz); setJcBz(jcBz);
uni.navigateTo({ uni.navigateTo({
url: `/pages/base/jc/index`, url: `/pages/base/jc/index`,
}); });

View File

@ -72,7 +72,9 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, watch, onMounted } from "vue"; import { ref, computed, watch, onMounted } from "vue";
import { jcGetJcBzListApi } from "@/api/base/jcApi"; import { useDataStore } from "@/store/modules/data";
const { getJc } = useDataStore();
interface JcBzData { interface JcBzData {
id: string; id: string;
@ -139,24 +141,13 @@ const isSelected = (jcBz: JcBzData) => {
// //
const getJcBzList = async () => { const getJcBzList = async () => {
try { try {
const res = await jcGetJcBzListApi({ jcBzList.value = getJc.jcBzList || [];
xsId: props.xsId //
}); if (jcBzList.value.length === 1) {
if (res.resultCode === 1) { const singleJcBz = jcBzList.value[0];
// selectedIds.value = [singleJcBz.id];
const result = res.result; emit('change', singleJcBz.id);
if (result && result.jcBzList) { emit('update:value', singleJcBz.id);
jcBzList.value = result.jcBzList || [];
//
if (jcBzList.value.length === 1) {
const singleJcBz = jcBzList.value[0];
selectedIds.value = [singleJcBz.id];
emit('change', singleJcBz.id);
emit('update:value', singleJcBz.id);
}
} else {
jcBzList.value = [];
}
} }
} catch (error) { } catch (error) {
console.error('获取就餐标准列表失败:', error); console.error('获取就餐标准列表失败:', error);

View File

@ -74,7 +74,7 @@ async function submit() {
switch (lxId.value) { switch (lxId.value) {
case "JC": { case "JC": {
uni.reLaunch({ uni.reLaunch({
url: "/pages/base/jc/bm", url: "/pages/base/jc/pay/qrcode",
}); });
} break; } break;
default: { default: {

View File

@ -1,202 +1,258 @@
<template> <template>
<view class="jc-bm-page"> <BasicLayout>
<!-- 报名信息头部 - 固定部分 --> <view class="jc-bm-page">
<view class="selection-header"> <!-- 报名信息头部 - 固定部分 -->
<view class="header-content"> <view class="selection-header">
<!-- 学生选择部分 --> <view class="header-content">
<XsPicker :is-bar="true" /> <!-- 学生选择部分 -->
<XsPicker :is-bar="true" />
</view>
</view>
<!-- 可滚动的内容区域 -->
<view class="scrollable-content">
<!-- 就餐标准列表 -->
<view class="jc-bz-list" v-if="jcBzList.length > 0">
<view
v-for="(jcBz, index) in jcBzList"
:key="jcBz.id || index"
class="jc-bz-item"
:class="{
'jc-bz-item-disabled': jcBz.paidStatus === 'paid'
}"
@click="handleJcBzClick(jcBz)"
>
<view class="jc-bz-info">
<view class="jc-bz-content">
<view class="jc-bz-name">{{ jcBz.bzMc || '暂无标准名称' }}</view>
<view class="jc-bz-price">
价格<text class="price-value">¥{{ jcBz.bzJe || 0 }}</text>
</view>
<view class="jc-bz-desc">{{ jcBz.bzSm || '暂无描述' }}</view>
<view class="jc-bz-capacity">
容量<text class="capacity-value">{{ jcBz.hasNum || 0 }}/{{ jcBz.maxNum || 0 }}</text>
</view>
<!-- 缴费状态标识 -->
<view v-if="jcBz.paidStatus" class="paid-status" :class="`status-${jcBz.paidStatus}`">
<text v-if="jcBz.paidStatus === 'paid'">已缴费</text>
<text v-else-if="jcBz.paidStatus === 'unpaid'">已报名待确认</text>
<text v-else-if="jcBz.paidStatus === 'notApplied'">未报名</text>
</view>
<!-- 显示更多详细信息 -->
<view class="jc-bz-details">
<view class="detail-item" v-if="jcBz.jfKsSj">
<text class="detail-label">缴费开始</text>
<text class="detail-value">{{ jcBz.jfKsSj }}</text>
</view>
<view class="detail-item" v-if="jcBz.jfJsSj">
<text class="detail-label">缴费结束</text>
<text class="detail-value">{{ jcBz.jfJsSj }}</text>
</view>
<view class="detail-item">
<text class="detail-label">缴费状态</text>
<text class="detail-value">{{ jcBz.sfJf === '1' ? '需要缴费' : '免费' }}</text>
</view>
<view class="detail-item">
<text class="detail-label">发布状态</text>
<text class="detail-value">{{ jcBz.sfFb === '1' ? '已发布' : '待发布' }}</text>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 暂无数据 -->
<view v-else class="no-data">
<text>暂无就餐标准</text>
</view>
<BasicSign ref="signCompRef" title="签名"></BasicSign>
</view> </view>
</view> </view>
<!-- 可滚动的内容区域 --> <template #bottom>
<view class="scrollable-content"> <view class="bottom-action">
<!-- 就餐标准选择器 --> <view class="cancel-btn" @click="goHome">返回首页</view>
<view class="form-section" v-if="jcBzList.length > 0">
<JcBzPicker
:xs-id="curXs.id"
label="就餐标准"
placeholder="请选择就餐标准"
:multiple="false"
:required="true"
v-model="selectedJcBzId"
@change="onJcBzChange"
/>
</view> </view>
</template>
<!-- 选中标准的详情展示 --> </BasicLayout>
<JcBzDetailCard
v-if="selectedJcBz"
:jc-bz-list="[selectedJcBz]"
title="已选择的就餐标准"
:show-detail-btn="false"
:show-summary="false"
/>
</view>
<!-- 底部操作区域 -->
<view class="bottom-action">
<view class="selected-info">
<text class="total-price">缴费金额¥{{ totalPrice }}</text>
</view>
<view class="action-buttons">
<view class="cancel-btn" @click="goBack">取消</view>
<view class="confirm-btn" @click="confirmBm" :class="{ disabled: !selectedJcBzId }">确认报名</view>
</view>
</view>
</view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import XsPicker from "@/pages/base/components/XsPicker/index.vue" import XsPicker from "@/pages/base/components/XsPicker/index.vue"
import JcBzPicker from "@/pages/base/components/JcBzPicker/index.vue" import BasicSign from "@/components/BasicSign/Sign.vue"
import JcBzDetailCard from "@/pages/base/components/JcBzDetailCard/index.vue"
import { useUserStore } from "@/store/modules/user"; import { useUserStore } from "@/store/modules/user";
import { useDataStore } from "@/store/modules/data"; import { useDataStore } from "@/store/modules/data";
import { jcBmJcBzApi, jcGetJcBzListApi } from "@/api/base/jcApi"; import { checkXsJcBmApi, jcXsBmJcApi } from "@/api/base/jcApi";
const signCompRef = ref<any>(null);
const { getCurXs, getUser } = useUserStore(); const { getCurXs, getUser } = useUserStore();
const { getData, setData } = useDataStore(); const { getJc, setJc, setJcBz, setData } = useDataStore();
const curXs = computed(() => getCurXs); const curXs = computed(() => getCurXs);
// ID
const selectedJcBzId = ref<string>('');
//
const selectedJcBz = ref<any>(null);
// //
const jcBzList = ref<any[]>([]); const jcBzList = ref<any[]>([]);
//
const totalPrice = computed(() => {
return selectedJcBz.value?.bzJe || 0;
});
// //
const getJcBzList = async () => { const getJcBzList = async () => {
try { try {
const res = await jcGetJcBzListApi({ const res = await checkXsJcBmApi({
xsId: curXs.value.id xsId: getCurXs.id
}); });
if (res.resultCode === 1) { const result = res.result || {};
const result = res.result; setJc(result);
jcBzList.value = result && result.jcBzList ? result.jcBzList : [];
// //
if (jcBzList.value.length === 1) { const rawJcBzList = result.jcBzList || [];
const singleJcBz = jcBzList.value[0]; const jcQdList = result.jcQdList || [];
selectedJcBzId.value = singleJcBz.id;
selectedJcBz.value = singleJcBz; //
jcBzList.value = rawJcBzList.map((jcBz: any) => {
//
const matchedQd = jcQdList.find((qd: any) => qd.bzId === jcBz.id);
if (matchedQd) {
//
if (matchedQd.jfZt === 'B') {
//
return {
...jcBz,
paidStatus: 'paid',
qdInfo: matchedQd
};
} else if (matchedQd.jfZt === 'A') {
//
return {
...jcBz,
paidStatus: 'unpaid',
qdInfo: matchedQd
};
} else if (matchedQd.jfZt === 'C') {
// 退
return {
...jcBz,
paidStatus: 'notApplied'
};
}
} }
} //
return {
...jcBz,
paidStatus: 'notApplied'
};
});
} catch (error) { } catch (error) {
console.error('获取就餐标准列表失败:', error); console.error('获取就餐标准列表失败:', error);
} }
}; };
// //
const onJcBzChange = (id: string) => { const handleJcBzClick = (jcBz: any) => {
selectedJcBzId.value = id; //
// ID if (jcBz.paidStatus === 'paid') {
updateSelectedJcBz(id);
};
//
const updateSelectedJcBz = async (id: string) => {
if (!id) {
selectedJcBz.value = null;
return;
}
//
selectedJcBz.value = jcBzList.value.find((jcBz: any) =>
jcBz.id === id
) || null;
};
//
const goBack = () => {
uni.navigateBack();
};
//
const confirmBm = async () => {
if (!selectedJcBzId.value) {
uni.showToast({ uni.showToast({
title: "请选择就餐标准", title: '该标准已缴费,无法重复选择',
icon: "none", icon: 'none'
}); });
return; return;
} }
//
if (jcBz.paidStatus === 'unpaid') {
//
navigateToPayment(jcBz);
} else if (jcBz.paidStatus === 'notApplied') {
goToQrCode(jcBz);
}
};
//
const navigateToPayment = (jcBz: any) => {
// store
setJcBz(jcBz);
//
uni.navigateTo({
url: "/pages/base/jc/pay/qrcode",
});
};
//
const goToQrCode = async (jcBz: any) => {
//
const data = await signCompRef.value.getSyncSignature();
if (!data) {
console.log("没有签名,或者取消了");
return;
}
uni.showLoading({
title: '报名中...'
});
try { try {
const params = { const params = {
xsId: curXs.value.id, xsId: curXs.value.id,
bzId: selectedJcBzId.value, xqId: curXs.value.xqId,
jzId: getUser.jzId,
bjId: curXs.value.bjId,
bjmc: curXs.value.bjmc,
njId: curXs.value.njId, njId: curXs.value.njId,
njmcId: curXs.value.njmcId, njmcId: curXs.value.njmcId,
njmc: curXs.value.njmc, njmc: curXs.value.njmc,
njbc: curXs.value.njbc, bc: curXs.value.njbc,
xm: curXs.value.xm, xm: curXs.value.xm,
} bzId: jcBz.id,
const res = await jcBmJcBzApi(params); jzId: getUser.jzId,
qmFile: data.base64 || '', //
bjId: curXs.value.bjId,
bjmc: curXs.value.bjmc
};
const res = await jcXsBmJcApi(params);
if (res.resultCode === 1) { if (res.resultCode === 1) {
uni.showToast({ uni.hideLoading();
title: "报名成功", setTimeout(() => {
icon: "success", uni.showToast({
}); title: '报名成功,请进行支付',
icon: 'success'
// store });
setData({ }, 500);
...params, //
xsId: curXs.value.id, jcBz.paidStatus = 'unpaid';
bzId: selectedJcBzId.value, // store
jcBz: selectedJcBz.value, setJcBz(jcBz);
totalJe: totalPrice.value, //
}); uni.navigateTo({
url: '/pages/base/jc/pay/qrcode'
//
uni.redirectTo({
url: '/pages/base/jc/pay/index'
}); });
} else { } else {
// uni.hideLoading();
if (res.result?.message && res.result.message.includes('已报名')) { setTimeout(() => {
uni.showModal({
title: '提示',
content: '您已经报名了该就餐标准,是否查看报名详情?',
success: (modalRes) => {
if (modalRes.confirm) {
//
uni.redirectTo({
url: '/pages/base/jc/index'
});
} else {
//
uni.navigateBack();
}
}
});
} else {
uni.showToast({ uni.showToast({
title: res.result?.message || "报名失败", title: res.result?.message || '报名失败',
icon: "none", icon: 'none'
}); });
} }, 500);
} }
} catch (error) { } catch (error) {
console.error('报名失败:', error); console.error('报名失败:', error);
uni.showToast({ uni.hideLoading();
title: "报名失败,请重试", setTimeout(() => {
icon: "none", uni.showToast({
}); title: '报名失败,请重试',
icon: 'none'
});
}, 500);
} }
}; };
//
const goHome = () => {
uni.reLaunch({
url: '/pages/base/home/index'
});
};
// //
onBeforeUnmount(() => { onBeforeUnmount(() => {
}); });
@ -241,6 +297,140 @@ onMounted(() => {
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; // iOS -webkit-overflow-scrolling: touch; // iOS
padding: 15px;
}
.jc-bz-list {
.jc-bz-item {
background-color: #fff;
border-radius: 8px;
padding: 15px;
margin-bottom: 15px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
&.jc-bz-item-selected {
border: 2px solid #2879ff;
}
&.jc-bz-item-disabled {
opacity: 0.6;
}
.jc-bz-info {
display: flex;
.jc-bz-content {
flex: 1;
.jc-bz-name {
font-size: 16px;
font-weight: bold;
color: #333;
margin-bottom: 8px;
line-height: 1.3;
}
.jc-bz-price {
font-size: 14px;
color: #666;
margin-bottom: 6px;
.price-value {
color: #ff6b00;
font-weight: bold;
}
}
.jc-bz-desc {
font-size: 13px;
color: #999;
margin-bottom: 6px;
line-height: 1.4;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.jc-bz-capacity {
font-size: 12px;
color: #999;
margin-bottom: 10px;
.capacity-value {
color: #2879ff;
font-weight: 500;
}
}
.paid-status {
display: inline-block;
padding: 2px 8px;
border-radius: 12px;
font-size: 12px;
margin-bottom: 10px;
&.status-paid {
background-color: #f0f9ff;
color: #3fbf72;
}
&.status-unpaid {
background-color: #fff7e6;
color: #ff8c00;
}
&.status-notApplied {
background-color: #f5f5f5;
color: #999;
}
}
.jc-bz-details {
margin-top: 10px;
padding-top: 10px;
border-top: 1px dashed #eee;
.detail-item {
display: flex;
margin-bottom: 5px;
font-size: 12px;
&:last-child {
margin-bottom: 0;
}
.detail-label {
color: #666;
margin-right: 5px;
min-width: 60px;
}
.detail-value {
color: #333;
font-weight: 500;
flex: 1;
}
}
}
}
.selection-indicator {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
margin-left: 10px;
}
}
}
}
.no-data {
text-align: center;
padding: 30px;
color: #999;
} }
.form-section { .form-section {
@ -256,50 +446,16 @@ onMounted(() => {
padding: 15px; padding: 15px;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05); box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
.selected-info { .cancel-btn {
display: flex; height: 44px;
justify-content: center; line-height: 44px;
align-items: center; text-align: center;
margin-bottom: 15px; border-radius: 22px;
font-size: 14px; font-size: 16px;
color: #666; background-color: #fff;
color: #333;
.total-price { border: 1px solid #ddd;
color: #ff6b00;
font-weight: bold;
font-size: 18px;
}
}
.action-buttons {
display: flex;
justify-content: space-between;
.cancel-btn,
.confirm-btn {
width: 48%;
height: 44px;
line-height: 44px;
text-align: center;
border-radius: 22px;
font-size: 16px;
}
.cancel-btn {
background-color: #fff;
color: #333;
border: 1px solid #ddd;
}
.confirm-btn {
background-color: #2879ff;
color: #fff;
&.disabled {
background-color: #ccc;
color: #999;
}
}
} }
} }
</style> </style>

View File

@ -54,9 +54,9 @@
<script setup lang="ts"> <script setup lang="ts">
import { useUserStore } from "@/store/modules/user"; import { useUserStore } from "@/store/modules/user";
import { useDataStore } from "@/store/modules/data"; import { useDataStore } from "@/store/modules/data";
import { jcCancelBmJcBzApi, jcFqJcBzJfjApi, jcGetBmExpiredTimeApi, jcGetJcBzListApi } from "@/api/base/jcApi"; import { jcCancelBmJcBzApi, jcFqJcBzJfjApi, jcGetBmExpiredTimeApi } from "@/api/base/jcApi";
const { getCurXs, getUser } = useUserStore(); const { getCurXs, getUser } = useUserStore();
const { getData, setData } = useDataStore(); const { getJc, getData, setData } = useDataStore();
// //
const curXs = computed(() => getCurXs); const curXs = computed(() => getCurXs);
@ -172,29 +172,23 @@ onMounted(async() => {
// store // store
if (!getData.jcBz || !getData.bzId) { if (!getData.jcBz || !getData.bzId) {
try { try {
const res = await jcGetJcBzListApi({ const data = getJc || {};
xsId: getCurXs.id if (data.type === 2 && data.jcqdList && data.jcqdList.length > 0) {
}); // store
const jcqd = data.jcqdList[0];
const jcBz = {
id: jcqd.bzId,
bzMc: jcqd.bzMc,
bzJe: jcqd.bzJe,
bzSm: jcqd.bzSm,
};
if (res.resultCode === 1 && res.result) { setData({
const data = res.result; xsId: getCurXs.id,
if (data.type === 2 && data.jcqdList && data.jcqdList.length > 0) { bzId: jcqd.bzId,
// store jcBz: jcBz,
const jcqd = data.jcqdList[0]; totalJe: jcqd.bzJe,
const jcBz = { });
id: jcqd.bzId,
bzMc: jcqd.bzMc,
bzJe: jcqd.bzJe,
bzSm: jcqd.bzSm,
};
setData({
xsId: getCurXs.id,
bzId: jcqd.bzId,
jcBz: jcBz,
totalJe: jcqd.bzJe,
});
}
} }
} catch (error) { } catch (error) {
console.error('获取就餐数据失败:', error); console.error('获取就餐数据失败:', error);

View File

@ -0,0 +1,279 @@
<template>
<BasicLayout>
<view class="qrcode-page">
<!-- 内容区域 -->
<view class="content-container">
<!-- 二维码区域 -->
<view class="qr-section">
<view class="qr-container">
<!-- 这里应该显示从接口获取的收款码 -->
<image
:src="qrcodeImage"
class="qr-code"
mode="aspectFit"
@click="previewImage"
></image>
</view>
<text class="qr-tip">请长按二维码保存并识别支付</text>
</view>
<!-- 状态提示 -->
<view class="status-section">
<view class="status-icon">
<uni-icons type="info" size="24" color="#ff8c00"></uni-icons>
</view>
<view class="status-text">
<text class="status-title">支付提醒</text>
<text class="status-desc">您已完成报名现在可以进行支付支付完成后请耐心等待系统将在报名截止后统一处理</text>
</view>
</view>
<!-- 支付信息 -->
<view class="payment-info-section">
<view class="section-title">
<text class="title-text">支付信息</text>
</view>
<view class="info-list">
<view class="info-item">
<text class="info-label">学生姓名</text>
<text class="info-value">{{ curXs.xm }}</text>
</view>
<view class="info-item">
<text class="info-label">年级</text>
<text class="info-value">{{ curXs.njmc }}({{ curXs.njbc }})</text>
</view>
<view class="info-item">
<text class="info-label">班级</text>
<text class="info-value">{{ curXs.bjmc }}</text>
</view>
<view class="info-item">
<text class="info-label">就餐标准</text>
<text class="info-value">{{ jcBz.bzMc }}</text>
</view>
<view class="info-item">
<text class="info-label">支付金额</text>
<text class="info-value amount">¥{{ jcBz.bzJe }}</text>
</view>
</view>
</view>
</view>
</view>
<template #bottom>
<view class="bottom-action">
<view class="cancel-btn" @click="goHome">返回首页</view>
</view>
</template>
</BasicLayout>
</template>
<script setup lang="ts">
import { ref, computed } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import { useUserStore } from "@/store/modules/user";
import { useDataStore } from "@/store/modules/data";
import { imagUrl } from "@/utils";
const { getCurXs, getUser } = useUserStore();
const { getJcBz, setJcBz, getFile } = useDataStore();
// isSubmitting useDebounce
const curXs = computed(() => getCurXs);
const jcBz = computed(() => getJcBz);
const { sign_file } = getFile;
//
const qrcodeImage:any = computed(() => {
const ret = jcBz.value && jcBz.value.id && jcBz.value.skmTp ?
imagUrl(jcBz.value.skmTp)
: "/static/base/home/rdcode.jpg";
return ret;
});
//
const previewImage = () => {
uni.previewImage({
urls: [qrcodeImage.value]
});
};
//
const goHome = () => {
uni.reLaunch({
url: '/pages/base/home/index'
});
};
onLoad(() => {
//
// 使
});
</script>
<style lang="scss" scoped>
.qrcode-page {
min-height: 100vh;
background: linear-gradient(135deg, #f4f5f7 0%, #e8f0ff 100%);
display: flex;
flex-direction: column;
padding: 40rpx 0;
}
.content-container {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 40rpx;
}
.qr-section {
background: white;
border-radius: 24rpx;
padding: 60rpx 40rpx;
text-align: center;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 600rpx;
}
.qr-container {
margin-bottom: 30rpx;
}
.qr-code {
width: 400rpx;
height: 400rpx;
border-radius: 16rpx;
box-shadow: 0 12rpx 36rpx rgba(0, 0, 0, 0.15);
}
.qr-tip {
font-size: 32rpx;
color: #333;
line-height: 1.5;
font-weight: 500;
}
.payment-info-section {
background: white;
border-radius: 24rpx;
padding: 40rpx 30rpx;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 600rpx;
}
.section-title {
margin-bottom: 40rpx;
text-align: center;
}
.title-text {
font-size: 36rpx;
font-weight: 600;
color: #333;
position: relative;
padding-left: 24rpx;
&::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 8rpx;
height: 32rpx;
background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
border-radius: 4rpx;
}
}
.info-list {
display: flex;
flex-direction: column;
gap: 24rpx;
}
.info-item {
display: flex;
justify-content: space-between;
align-items: center;
}
.info-label {
font-size: 30rpx;
color: #666;
}
.info-value {
font-size: 30rpx;
color: #333;
font-weight: 500;
&.amount {
color: #ff6b00;
font-size: 36rpx;
font-weight: bold;
}
}
.status-section {
background: white;
border-radius: 24rpx;
padding: 30rpx;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 600rpx;
display: flex;
align-items: flex-start;
gap: 20rpx;
}
.status-icon {
margin-top: 4rpx;
}
.status-text {
display: flex;
flex-direction: column;
gap: 10rpx;
}
.status-title {
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.status-desc {
font-size: 28rpx;
color: #666;
line-height: 1.5;
}
.bottom-action {
background-color: #fff;
padding: 15px;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
.cancel-btn {
height: 44px;
line-height: 44px;
text-align: center;
border-radius: 22px;
font-size: 16px;
background-color: #fff;
color: #333;
border: 1px solid #ddd;
}
}
</style>

View File

@ -5,13 +5,14 @@ export const useDataStore = defineStore({
state: () => ({ state: () => ({
data: {}, data: {},
kcData: {}, kcData: {},
jcBzData: {},
global: {}, global: {},
file: {}, file: {},
params: {}, params: {},
appCode: "JZ", appCode: "JZ",
qk: {}, qk: {},
tf: {}, tf: {},
jc: {}, // 学生就餐校验信息
jcBz: {}, // 查看标准详情信息
lcgl: {} lcgl: {}
}), }),
getters: { getters: {
@ -27,9 +28,6 @@ export const useDataStore = defineStore({
getKcData(): any { getKcData(): any {
return this.kcData; return this.kcData;
}, },
getJcBzData(): any {
return this.jcBzData;
},
getParams(): any { getParams(): any {
return this.params; return this.params;
}, },
@ -42,6 +40,12 @@ export const useDataStore = defineStore({
getTf(): any { getTf(): any {
return this.tf; return this.tf;
}, },
getJc(): any {
return this.jc;
},
getJcBz(): any {
return this.jcBz;
},
getLcgl(): any { getLcgl(): any {
return this.lcgl; return this.lcgl;
}, },
@ -50,12 +54,14 @@ export const useDataStore = defineStore({
cleanData() { cleanData() {
this.data = {}; this.data = {};
this.kcData = {}; this.kcData = {};
this.jcBzData = {};
this.global = {}; this.global = {};
this.file = {}; this.file = {};
this.params = {}; this.params = {};
this.qk = {}; this.qk = {};
this.tf = {}; this.tf = {};
this.jc = {};
this.jcBz = {};
this.lcgl = {};
}, },
setData(data: any) { setData(data: any) {
this.data = data; this.data = data;
@ -69,9 +75,6 @@ export const useDataStore = defineStore({
setKcData(data: any) { setKcData(data: any) {
this.kcData = data; this.kcData = data;
}, },
setJcBzData(data: any) {
this.jcBzData = data;
},
setParams(data: any) { setParams(data: any) {
this.params = data; this.params = data;
}, },
@ -81,6 +84,12 @@ export const useDataStore = defineStore({
setTf(data: any) { setTf(data: any) {
this.tf = data; this.tf = data;
}, },
setJc(data: any) {
this.jc = data;
},
setJcBz(data: any) {
this.jcBz = data;
},
setLcgl(data: any) { setLcgl(data: any) {
this.lcgl = data; this.lcgl = data;
}, },

View File

@ -1,5 +1,4 @@
import { checkXsXkApi, checkXkTfApi } from "@/api/base/xkApi"; import { checkXsXkApi, checkXkTfApi } from "@/api/base/xkApi";
import { checkXsJcApi } from "@/api/base/jcApi";
import { useUserStore } from "@/store/modules/user"; import { useUserStore } from "@/store/modules/user";
import { useDataStore } from "@/store/modules/data"; import { useDataStore } from "@/store/modules/data";
const userStore = useUserStore(); const userStore = useUserStore();
@ -55,7 +54,11 @@ export const PageUtils = {
switch (lxId) { switch (lxId) {
// 就餐逻辑单独处理 // 就餐逻辑单独处理
case "JC": { case "JC": {
if (action === "jf") {
await this.checkJcLogic();
} else if (action === "tf") {
await this.checkJcTfLogic();
}
} break; } break;
// 默认当作 选课的选课类型IDxkLxId处理 // 默认当作 选课的选课类型IDxkLxId处理
default: { default: {
@ -163,5 +166,17 @@ export const PageUtils = {
} }
}, },
// 判断就餐逻辑
async checkJcLogic() {
uni.reLaunch({
url: "/pages/base/jc/bm",
});
},
// 判断就餐退费逻辑
async checkJcTfLogic() {
},
} }