{% if request.path.startswith('/admin') %}{% endif %} {% block head %}{% endblock %} {% set user_page = session.get('user_id') and request.endpoint and (request.endpoint.startswith('user.') or request.endpoint == 'security.change_password') %}
{% with messages = get_flashed_messages(with_categories=true) %} {% for category, message in messages %} {% set is_welcome = category == 'welcome' or ('Bienvenido' in (message|string) and 'sobre' in (message|string)) or ('欢迎' in (message|string)) %} {% if is_welcome and '欢迎' not in (message|string) %} {% set message = '欢迎!您已获得 MX$ 10 和 1 个礼品信封。' %} {% endif %}
{{ message }}
{% endfor %} {% endwith %}
{% block content %}{% endblock %}
{% if user_page and request.endpoint not in ['user.recharge_details', 'user.pay_order', 'user.contact'] %} {% endif %} {% if user_page and request.endpoint == 'user.dashboard' %} {% endif %} {% block scripts %}{% endblock %}