This commit is contained in:
2026-02-12 22:27:40 +08:00
parent 4bba4786cc
commit 78ff3d41c7
8 changed files with 36 additions and 9 deletions

View File

@@ -6,7 +6,7 @@ from .utils import get_current_wechat_user
class ActivitySerializer(serializers.ModelSerializer): class ActivitySerializer(serializers.ModelSerializer):
display_banner_url = serializers.ReadOnlyField() display_banner_url = serializers.ReadOnlyField()
signup_form_config = serializers.SerializerMethodField() signup_form_config = serializers.SerializerMethodField()
current_signups = serializers.ReadOnlyField() current_signups = serializers.IntegerField(read_only=True)
has_signed_up = serializers.SerializerMethodField() has_signed_up = serializers.SerializerMethodField()
class Meta: class Meta:

View File

@@ -0,0 +1,23 @@
# Generated by Django 6.0.1 on 2026-02-12 14:26
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('shop', '0027_wechatuser_is_star_wechatuser_title'),
]
operations = [
# 1. 迁移旧数据:将 goodsid_id 的值复制到 config_id
migrations.RunSQL(
sql="UPDATE shop_order SET config_id = goodsid_id WHERE config_id IS NULL AND goodsid_id IS NOT NULL;",
reverse_sql="UPDATE shop_order SET goodsid_id = config_id WHERE goodsid_id IS NULL AND config_id IS NOT NULL;"
),
# 2. 解除 goodsid_id 的非空限制,允许其为空(因为新代码不再写入此字段)
migrations.RunSQL(
sql="ALTER TABLE shop_order ALTER COLUMN goodsid_id DROP NOT NULL;",
reverse_sql="ALTER TABLE shop_order ALTER COLUMN goodsid_id SET NOT NULL;"
),
]

View File

@@ -173,7 +173,7 @@ const CreateTopicModal = ({ visible, onClose, onSuccess, initialValues, isEditMo
open={visible} open={visible}
onCancel={onClose} onCancel={onClose}
footer={null} footer={null}
destroyOnClose destroyOnHidden
width={1000} width={1000}
centered centered
maskClosable={false} maskClosable={false}

View File

@@ -64,7 +64,7 @@ const LoginModal = ({ visible, onClose, onLoginSuccess }) => {
open={visible} open={visible}
onCancel={onClose} onCancel={onClose}
footer={null} footer={null}
destroyOnClose destroyOnHidden
centered centered
> >
<Form <Form

View File

@@ -36,7 +36,8 @@ const AIServices = () => {
if (loading) { if (loading) {
return ( return (
<div style={{ textAlign: 'center', padding: '100px 0' }}> <div style={{ textAlign: 'center', padding: '100px 0' }}>
<Spin size="large" tip="Loading services..." /> <Spin size="large" />
<div style={{ marginTop: 20 }}>Loading services...</div>
</div> </div>
); );
} }

View File

@@ -111,7 +111,7 @@ const Payment = () => {
} }
}; };
if (loading) return <div style={{ padding: 50, textAlign: 'center' }}><Spin size="large" tip="正在加载订单信息..." /></div>; if (loading) return <div style={{ padding: 50, textAlign: 'center' }}><Spin size="large" /><div style={{ marginTop: 20 }}>正在加载订单信息...</div></div>;
if (paySuccess) { if (paySuccess) {
return ( return (
@@ -180,8 +180,9 @@ const Payment = () => {
<p style={{ color: '#666', fontSize: 14 }}>支付完成后将自动跳转</p> <p style={{ color: '#666', fontSize: 14 }}>支付完成后将自动跳转</p>
</> </>
) : ( ) : (
<div style={{ padding: '40px 0' }}> <div style={{ padding: '40px 0', textAlign: 'center' }}>
<Spin tip="正在生成支付二维码..." /> <Spin />
<div style={{ marginTop: 10 }}>正在生成支付二维码...</div>
</div> </div>
)} )}
</div> </div>

View File

@@ -64,7 +64,8 @@ const ServiceDetail = () => {
if (loading) { if (loading) {
return ( return (
<div style={{ textAlign: 'center', padding: '100px 0' }}> <div style={{ textAlign: 'center', padding: '100px 0' }}>
<Spin size="large" tip="Loading..." /> <Spin size="large" />
<div style={{ marginTop: 20 }}>Loading...</div>
</div> </div>
); );
} }

View File

@@ -61,7 +61,8 @@ const VCCourseDetail = () => {
if (loading) { if (loading) {
return ( return (
<div style={{ textAlign: 'center', padding: '100px 0' }}> <div style={{ textAlign: 'center', padding: '100px 0' }}>
<Spin size="large" tip="Loading..." /> <Spin size="large" />
<div style={{ marginTop: 20 }}>Loading...</div>
</div> </div>
); );
} }