调整就餐报名
This commit is contained in:
parent
8e5a894267
commit
f18b049326
@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -358,6 +358,13 @@
|
|||||||
"navigationBarTitleText": "支付失败",
|
"navigationBarTitleText": "支付失败",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/base/jc/pay/qrcode",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "收款码",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
@ -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
|
|
||||||
});
|
|
||||||
if (res.resultCode === 1) {
|
|
||||||
// 根据新的接口结构,就餐标准列表在 jcBzList 字段中
|
|
||||||
jcBzList.value = res.result?.jcBzList || [];
|
|
||||||
// 初始化选中状态
|
// 初始化选中状态
|
||||||
initSelectedStatus();
|
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`,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -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,14 +141,7 @@ const isSelected = (jcBz: JcBzData) => {
|
|||||||
// 获取就餐标准列表
|
// 获取就餐标准列表
|
||||||
const getJcBzList = async () => {
|
const getJcBzList = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await jcGetJcBzListApi({
|
jcBzList.value = getJc.jcBzList || [];
|
||||||
xsId: props.xsId
|
|
||||||
});
|
|
||||||
if (res.resultCode === 1) {
|
|
||||||
// 处理返回的数据结构
|
|
||||||
const result = res.result;
|
|
||||||
if (result && result.jcBzList) {
|
|
||||||
jcBzList.value = result.jcBzList || [];
|
|
||||||
// 如果只有一个标准,自动选中
|
// 如果只有一个标准,自动选中
|
||||||
if (jcBzList.value.length === 1) {
|
if (jcBzList.value.length === 1) {
|
||||||
const singleJcBz = jcBzList.value[0];
|
const singleJcBz = jcBzList.value[0];
|
||||||
@ -154,10 +149,6 @@ const getJcBzList = async () => {
|
|||||||
emit('change', singleJcBz.id);
|
emit('change', singleJcBz.id);
|
||||||
emit('update:value', singleJcBz.id);
|
emit('update:value', singleJcBz.id);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
jcBzList.value = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取就餐标准列表失败:', error);
|
console.error('获取就餐标准列表失败:', error);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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: {
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<BasicLayout>
|
||||||
<view class="jc-bm-page">
|
<view class="jc-bm-page">
|
||||||
<!-- 报名信息头部 - 固定部分 -->
|
<!-- 报名信息头部 - 固定部分 -->
|
||||||
<view class="selection-header">
|
<view class="selection-header">
|
||||||
@ -10,193 +11,248 @@
|
|||||||
|
|
||||||
<!-- 可滚动的内容区域 -->
|
<!-- 可滚动的内容区域 -->
|
||||||
<view class="scrollable-content">
|
<view class="scrollable-content">
|
||||||
<!-- 就餐标准选择器 -->
|
<!-- 就餐标准列表 -->
|
||||||
<view class="form-section" v-if="jcBzList.length > 0">
|
<view class="jc-bz-list" v-if="jcBzList.length > 0">
|
||||||
<JcBzPicker
|
<view
|
||||||
:xs-id="curXs.id"
|
v-for="(jcBz, index) in jcBzList"
|
||||||
label="就餐标准"
|
:key="jcBz.id || index"
|
||||||
placeholder="请选择就餐标准"
|
class="jc-bz-item"
|
||||||
:multiple="false"
|
:class="{
|
||||||
:required="true"
|
'jc-bz-item-disabled': jcBz.paidStatus === 'paid'
|
||||||
v-model="selectedJcBzId"
|
}"
|
||||||
@change="onJcBzChange"
|
@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>
|
||||||
|
|
||||||
<!-- 选中标准的详情展示 -->
|
<!-- 缴费状态标识 -->
|
||||||
<JcBzDetailCard
|
<view v-if="jcBz.paidStatus" class="paid-status" :class="`status-${jcBz.paidStatus}`">
|
||||||
v-if="selectedJcBz"
|
<text v-if="jcBz.paidStatus === 'paid'">已缴费</text>
|
||||||
:jc-bz-list="[selectedJcBz]"
|
<text v-else-if="jcBz.paidStatus === 'unpaid'">已报名,待确认</text>
|
||||||
title="已选择的就餐标准"
|
<text v-else-if="jcBz.paidStatus === 'notApplied'">未报名</text>
|
||||||
:show-detail-btn="false"
|
|
||||||
:show-summary="false"
|
|
||||||
/>
|
|
||||||
</view>
|
</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>
|
||||||
|
|
||||||
|
<template #bottom>
|
||||||
<view class="bottom-action">
|
<view class="bottom-action">
|
||||||
<view class="selected-info">
|
<view class="cancel-btn" @click="goHome">返回首页</view>
|
||||||
<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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
</BasicLayout>
|
||||||
|
</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.hideLoading();
|
||||||
|
setTimeout(() => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "报名成功",
|
title: '报名成功,请进行支付',
|
||||||
icon: "success",
|
icon: 'success'
|
||||||
});
|
});
|
||||||
|
}, 500);
|
||||||
// 保存报名数据到store
|
// 更新状态为未支付
|
||||||
setData({
|
jcBz.paidStatus = 'unpaid';
|
||||||
...params,
|
// 保存当前选中的标准到store
|
||||||
xsId: curXs.value.id,
|
setJcBz(jcBz);
|
||||||
bzId: selectedJcBzId.value,
|
// 跳转到告知书页面
|
||||||
jcBz: selectedJcBz.value,
|
uni.navigateTo({
|
||||||
totalJe: totalPrice.value,
|
url: '/pages/base/jc/pay/qrcode'
|
||||||
});
|
|
||||||
|
|
||||||
// 跳转到支付页面
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/base/jc/pay/index'
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// 检查是否已经报名
|
|
||||||
if (res.result?.message && res.result.message.includes('已报名')) {
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '您已经报名了该就餐标准,是否查看报名详情?',
|
|
||||||
success: (modalRes) => {
|
|
||||||
if (modalRes.confirm) {
|
|
||||||
// 跳转到已选择页面
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/base/jc/index'
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// 返回上一页
|
|
||||||
uni.navigateBack();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
uni.hideLoading();
|
||||||
|
setTimeout(() => {
|
||||||
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.hideLoading();
|
||||||
|
setTimeout(() => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "报名失败,请重试",
|
title: '报名失败,请重试',
|
||||||
icon: "none",
|
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;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #666;
|
|
||||||
|
|
||||||
.total-price {
|
|
||||||
color: #ff6b00;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.action-buttons {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.cancel-btn,
|
|
||||||
.confirm-btn {
|
|
||||||
width: 48%;
|
|
||||||
height: 44px;
|
height: 44px;
|
||||||
line-height: 44px;
|
line-height: 44px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: 22px;
|
border-radius: 22px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
|
||||||
|
|
||||||
.cancel-btn {
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #333;
|
color: #333;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.confirm-btn {
|
|
||||||
background-color: #2879ff;
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
&.disabled {
|
|
||||||
background-color: #ccc;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@ -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,12 +172,7 @@ 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 (res.resultCode === 1 && res.result) {
|
|
||||||
const data = res.result;
|
|
||||||
if (data.type === 2 && data.jcqdList && data.jcqdList.length > 0) {
|
if (data.type === 2 && data.jcqdList && data.jcqdList.length > 0) {
|
||||||
// 待支付状态,设置数据到store
|
// 待支付状态,设置数据到store
|
||||||
const jcqd = data.jcqdList[0];
|
const jcqd = data.jcqdList[0];
|
||||||
@ -195,7 +190,6 @@ onMounted(async() => {
|
|||||||
totalJe: jcqd.bzJe,
|
totalJe: jcqd.bzJe,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取就餐数据失败:', error);
|
console.error('获取就餐数据失败:', error);
|
||||||
}
|
}
|
||||||
|
|||||||
279
src/pages/base/jc/pay/qrcode.vue
Normal file
279
src/pages/base/jc/pay/qrcode.vue
Normal 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>
|
||||||
@ -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;
|
||||||
},
|
},
|
||||||
|
|||||||
@ -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;
|
||||||
// 默认当作 选课的选课类型ID(xkLxId)处理
|
// 默认当作 选课的选课类型ID(xkLxId)处理
|
||||||
default: {
|
default: {
|
||||||
@ -163,5 +166,17 @@ export const PageUtils = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 判断就餐逻辑
|
||||||
|
async checkJcLogic() {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: "/pages/base/jc/bm",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 判断就餐退费逻辑
|
||||||
|
async checkJcTfLogic() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user