new
This commit is contained in:
@@ -6,7 +6,7 @@ from .utils import get_current_wechat_user
|
||||
class ActivitySerializer(serializers.ModelSerializer):
|
||||
display_banner_url = serializers.ReadOnlyField()
|
||||
signup_form_config = serializers.SerializerMethodField()
|
||||
current_signups = serializers.ReadOnlyField()
|
||||
current_signups = serializers.IntegerField(read_only=True)
|
||||
has_signed_up = serializers.SerializerMethodField()
|
||||
|
||||
class Meta:
|
||||
|
||||
23
backend/shop/migrations/0028_fix_goodsid_schema.py
Normal file
23
backend/shop/migrations/0028_fix_goodsid_schema.py
Normal 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;"
|
||||
),
|
||||
]
|
||||
@@ -173,7 +173,7 @@ const CreateTopicModal = ({ visible, onClose, onSuccess, initialValues, isEditMo
|
||||
open={visible}
|
||||
onCancel={onClose}
|
||||
footer={null}
|
||||
destroyOnClose
|
||||
destroyOnHidden
|
||||
width={1000}
|
||||
centered
|
||||
maskClosable={false}
|
||||
|
||||
@@ -64,7 +64,7 @@ const LoginModal = ({ visible, onClose, onLoginSuccess }) => {
|
||||
open={visible}
|
||||
onCancel={onClose}
|
||||
footer={null}
|
||||
destroyOnClose
|
||||
destroyOnHidden
|
||||
centered
|
||||
>
|
||||
<Form
|
||||
|
||||
@@ -36,7 +36,8 @@ const AIServices = () => {
|
||||
if (loading) {
|
||||
return (
|
||||
<div style={{ textAlign: 'center', padding: '100px 0' }}>
|
||||
<Spin size="large" tip="Loading services..." />
|
||||
<Spin size="large" />
|
||||
<div style={{ marginTop: 20 }}>Loading services...</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
return (
|
||||
@@ -180,8 +180,9 @@ const Payment = () => {
|
||||
<p style={{ color: '#666', fontSize: 14 }}>支付完成后将自动跳转</p>
|
||||
</>
|
||||
) : (
|
||||
<div style={{ padding: '40px 0' }}>
|
||||
<Spin tip="正在生成支付二维码..." />
|
||||
<div style={{ padding: '40px 0', textAlign: 'center' }}>
|
||||
<Spin />
|
||||
<div style={{ marginTop: 10 }}>正在生成支付二维码...</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -64,7 +64,8 @@ const ServiceDetail = () => {
|
||||
if (loading) {
|
||||
return (
|
||||
<div style={{ textAlign: 'center', padding: '100px 0' }}>
|
||||
<Spin size="large" tip="Loading..." />
|
||||
<Spin size="large" />
|
||||
<div style={{ marginTop: 20 }}>Loading...</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,8 @@ const VCCourseDetail = () => {
|
||||
if (loading) {
|
||||
return (
|
||||
<div style={{ textAlign: 'center', padding: '100px 0' }}>
|
||||
<Spin size="large" tip="Loading..." />
|
||||
<Spin size="large" />
|
||||
<div style={{ marginTop: 20 }}>Loading...</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user