update file path

This commit is contained in:
2025-08-28 23:59:13 +08:00
parent f8976ee045
commit 682355231a
17 changed files with 3799 additions and 232 deletions

136
app.py
View File

@@ -3,13 +3,11 @@ from flask import Flask, render_template, request, redirect, url_for, jsonify, s
from datetime import datetime
import os
import logging
import requests
from config import COMPANY_INFO, DATA_DIR, LOG_DIR
from languages import LANGUAGES, TRANSLATIONS, DEFAULT_LANGUAGE
from futu import *
import pandas as pd
app = Flask(__name__, template_folder='pages')
app = Flask(__name__, template_folder='templates')
app.secret_key = os.urandom(24) # 设置会话密钥
# 配置日志
@@ -164,123 +162,27 @@ def serve_download_file(filename):
# 实时市场数据API端点
@app.route('/api/market-data')
def market_data():
# try:
# quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
# market_data_list = []
# ret_sub, err_message = quote_ctx.subscribe(['HK.00700'], [SubType.QUOTE], subscribe_push=False)
# # 先订阅 K 线类型。订阅成功后 OpenD 将持续收到服务器的推送False 代表暂时不需要推送给脚本
# if ret_sub == RET_OK: # 订阅成功
# ret, data = quote_ctx.get_stock_quote(['HK.00700']) # 获取订阅股票报价的实时数据
# if ret == RET_OK:
# # market_data_list.append({
# # 'symbol': data['name'], # 使用中文名称
# # 'price': float(data['last_price']),
# # 'change': float(data['last_price']),
# # 'change_percent': 0
# # })
# pass
# else:
# print('error:', data)
# else:
# print('subscription failed', err_message)
# quote_ctx.close() # 关闭当条连接OpenD 会在1分钟后自动取消相应股票相应类型的订阅
# return jsonify({
# 'status': 'success',
# 'data': market_data_list,
# 'timestamp': datetime.now().isoformat()
# })
import random
base_prices = {'上证指数': 3000, '深证成指': 10000, '中国平安': 50, '五粮液': 200}
# except ImportError:
# pass
try:
# 尝试使用akshare获取真实市场数据
import akshare as ak
import pandas as pd
market_data = []
for symbol, base_price in base_prices.items():
change_percent = random.uniform(-0.01, 0.01)
current_price = round(base_price * (1 + change_percent), 2)
change_value = round(current_price - base_price, 2)
# 获取指数实时数据
index_data = ak.stock_zh_index_spot()
index_codes = ['sh000001', 'sz399001'] # 上证指数和深证成指
index_df = index_data[index_data['code'].isin(index_codes)]
# 获取股票实时数据
stock_data = ak.stock_zh_a_spot()
stock_codes = ['sh601318', 'sz000858'] # 中国平安和五粮液
stock_df = stock_data[stock_data['code'].isin(stock_codes)]
# 合并数据
combined_data = pd.concat([index_df, stock_df], ignore_index=True)
market_data_list = []
for index, row in combined_data.iterrows():
# 处理价格字段指数使用latest股票使用price
price = row['latest'] if 'latest' in row else row['price']
change = row['change']
change_percent = row['change_percent']
market_data_list.append({
'symbol': row['name'], # 使用中文名称
'price': float(price),
'change': float(change),
'change_percent': float(change_percent)
})
return jsonify({
'status': 'success',
'data': market_data_list,
'timestamp': datetime.now().isoformat()
market_data.append({
'symbol': symbol,
'price': current_price,
'change': change_value,
'change_percent': round(change_percent * 100, 2)
})
return jsonify({
'status': 'success',
'data': market_data,
'timestamp': datetime.now().isoformat()
})
except ImportError:
# akshare未安装使用模拟数据
logging.error("akshare未安装使用模拟数据")
import random
base_prices = {'上证指数': 3000, '深证成指': 10000, '中国平安': 50, '五粮液': 200}
market_data = []
for symbol, base_price in base_prices.items():
change_percent = random.uniform(-0.01, 0.01)
current_price = round(base_price * (1 + change_percent), 2)
change_value = round(current_price - base_price, 2)
market_data.append({
'symbol': symbol,
'price': current_price,
'change': change_value,
'change_percent': round(change_percent * 100, 2)
})
return jsonify({
'status': 'success',
'data': market_data,
'timestamp': datetime.now().isoformat()
})
except Exception as e:
logging.error(f"获取市场数据时发生错误: {str(e)}")
# 出错时使用模拟数据
import random
base_prices = {'上证指数': 3000, '深证成指': 10000, '中国平安': 50, '五粮液': 200}
market_data = []
for symbol, base_price in base_prices.items():
change_percent = random.uniform(-0.01, 0.01)
current_price = round(base_price * (1 + change_percent), 2)
change_value = round(current_price - base_price, 2)
market_data.append({
'symbol': symbol,
'price': current_price,
'change': change_value,
'change_percent': round(change_percent * 100, 2)
})
return jsonify({
'status': 'success',
'data': market_data,
'timestamp': datetime.now().isoformat()
})
if __name__ == '__main__':
serve(app, host='0.0.0.0', port=778)

View File

@@ -15,8 +15,11 @@ TRANSLATIONS = {
'zh-CN': {
'home': '首页',
'about': '关于',
'online':'在线交易',
'quick_links':'快速链接',
'services': '服务',
'contact': '联系',
'contact_description':'富泽国际,竭诚为您服务!',
'language': '语言',
'all_rights_reserved': '保留所有权利',
'privacy_policy': '隐私政策',
@@ -80,13 +83,13 @@ TRANSLATIONS = {
'why_choose_us': '为什么选择我们',
'features_subtitle': '专业、安全、便捷的投资体验',
'global_markets': '全球市场',
'global_markets_desc': '港股、美股、A股、加密货币等多市场交易',
'global_markets_desc': '专注港股、美股',
'secure_trading': '安全交易',
'secure_trading_desc': '银行级安全防护,资金隔离保障',
'smart_investing': '智能投资',
'smart_investing_desc': 'AI投顾、智能选股、量化策略',
'low_fees': '低手续费',
'low_fees_desc': '佣金交易,透明收费标准',
'low_fees_desc': '佣金方案,透明收费标准',
'trading_tools': '专业交易工具',
'trading_tools_subtitle': '丰富的分析工具,助力投资决策',
'realtime_charts': '实时图表',
@@ -169,7 +172,7 @@ TRANSLATIONS = {
'minimum_fee': '最低收费',
'additional_fees': '其他费用',
'commission_note': '以上费率仅供参考,实际费用可能因市场情况而变化。详细费用请参考最新费率表。',
'stocks': '股票、ETF和权证',
'stocks': '股票',
'options': '期权',
'futures': '期货',
'funds': '基金',
@@ -178,6 +181,8 @@ TRANSLATIONS = {
'zh-TW': {
'home': '首頁',
'about': '關於',
'online':'在線交易',
'quick_links':'快速鏈接',
'services': '服務',
'contact': '聯繫',
'language': '語言',
@@ -327,15 +332,17 @@ TRANSLATIONS = {
'minimum_fee': '最低收極狐費',
'additional_fees': '其他費用',
'commission_note': '以上費率僅供參考,實際費用可能因市場情況而變化。詳細費用請參考最新費率表。',
'stocks': '股票、ETF和權證',
'stocks': '股票',
'options': '期權',
'futures': '期貨',
'funds': '基金',
'other_products': '其他產品'
'other_products': '其他產品',
},
'en': {
'home': 'Home',
'about': 'About',
'online': 'Online',
'quick_links':'Quick Links',
'services': 'Services',
'contact': 'Contact',
'language': 'Language',
@@ -490,7 +497,7 @@ TRANSLATIONS = {
'minimum_fee': 'Minimum Fee',
'additional_fees': 'Additional Fees',
'commission_note': 'The above rates are for reference only. Actual fees may vary depending on market conditions. Please refer to the latest fee schedule for detailed fees.',
'stocks': 'Stocks,ETFs & Warrants',
'stocks': 'Stocks',
'options': 'Options',
'futures': 'Futures',
'funds': 'Funds',

BIN
logo_hk.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 KiB

BIN
logo_hk.psd Normal file

Binary file not shown.

View File

@@ -1,87 +0,0 @@
{% extends "base.html" %}
{% block title %}{{ t('help') if t('help') else '帮助' }}{% endblock %}
{% block content %}
<section class="hero">
<div class="container">
<h2>{{ t('help') if t('help') else '帮助中心' }}</h2>
<p>{{ t('help_description') if t('help_description') else '获取使用指南和常见问题解答' }}</p>
</div>
</section>
<section class="services">
<div class="container">
<div class="section-title">
<h2>{{ t('frequently_asked_questions') if t('frequently_asked_questions') else '常见问题' }}</h2>
<p>{{ t('faq_subtitle') if t('faq_subtitle') else '找到您需要的答案' }}</p>
</div>
<div class="feature-grid">
<div class="feature">
<h3>{{ t('faq1_question') if t('faq1_question') else '如何注册账户?' }}</h3>
<p>{{ t('faq1_answer') if t('faq1_answer') else '访问注册页面,填写基本信息并完成身份验证即可创建账户。' }}</p>
</div>
<div class="feature">
<h3>{{ t('faq2_question') if t('faq2_question') else '如何下载客户端?' }}</h3>
<p>{{ t('faq2_answer') if t('faq2_answer') else '在下载页面选择适合您设备的版本,点击下载按钮即可获取安装文件。' }}</p>
</div>
<div class="feature">
<h3>{{ t('faq3_question') if t('faq3_question') else '交易费用如何计算?' }}</h3>
<p>{{ t('faq3_answer') if t('faq3_answer') else '交易费用根据您的套餐类型和交易量计算,具体标准请参考收费页面。' }}</p>
</div>
<div class="feature">
<h3>{{ t('faq4_question') if t('faq4_question') else '如何联系客服?' }}</h3>
<p>{{ t('faq4_answer') if t('faq4_answer') else '您可以通过联系页面提交问题,或直接拨打客服电话获取帮助。' }}</p>
</div>
<div class="feature">
<h3>{{ t('faq5_question') if t('faq5_question') else '支持哪些支付方式?' }}</h3>
<p>{{ t('faq5_answer') if t('faq5_answer') else '我们支持银行转账、信用卡、支付宝和微信支付等多种支付方式。' }}</p>
</div>
<div class="feature">
<h3>{{ t('faq6_question') if t('faq6_question') else '如何查看交易记录?' }}</h3>
<p>{{ t('faq6_answer') if t('faq6_answer') else '登录账户后,在交易记录页面可以查看所有的历史交易明细。' }}</p>
</div>
</div>
</div>
</section>
<section class="features">
<div class="container">
<div class="section-title">
<h2>{{ t('contact_support') if t('contact_support') else '联系支持' }}</h2>
<p>{{ t('support_description') if t('support_description') else '如果您的问题未在常见问题中找到答案,请联系我们的支持团队' }}</p>
</div>
<div class="feature-grid">
<div class="feature">
<div class="feature-icon">📧</div>
<h3>{{ t('email_support') if t('email_support') else '邮件支持' }}</h3>
<p>{{ t('email_support_desc') if t('email_support_desc') else '发送邮件至 Sec.Info@fuzsec.com我们将在24小时内回复' }}
</p>
<a href="mailto:support@fuzsec.com" class="btn">{{ t('send_email') if t('send_email') else '发送邮件' }}</a>
</div>
<div class="feature">
<div class="feature-icon">📞</div>
<h3>{{ t('phone_support') if t('phone_support') else '电话支持' }}</h3>
<p>{{ t('phone_support_desc') if t('phone_support_desc') else '拨打客服热线 +852 35856298工作日9:00-18:00' }}
</p>
<a href="tel:+85235856298" class="btn">{{ t('call_now') if t('call_now') else '立即拨打' }}</a>
</div>
<div class="feature">
<div class="feature-icon">💬</div>
<h3>{{ t('live_chat') if t('live_chat') else '在线聊天' }}</h3>
<p>{{ t('live_chat_desc') if t('live_chat_desc') else '通过网站右下角的聊天窗口与客服实时沟通' }}</p>
<a href="{{ url_for('contact') }}" class="btn">{{ t('start_chat') if t('start_chat') else '开始聊天' }}</a>
</div>
</div>
</div>
</section>
{% endblock %}

View File

@@ -12,6 +12,15 @@ body {
background-color: #ffffff;
}
li::marker {
unicode-bidi: isolate;
font-variant-numeric: tabular-nums;
text-transform: none;
text-indent: 0px !important;
text-align: start !important;
text-align-last: auto !important;
}
.container {
width: 90%;
max-width: 1400px;
@@ -548,7 +557,7 @@ footer .container {
.footer-brand h3 {
font-size: 1.8rem;
margin-bottom: 15px;
background: linear-gradient(135deg, #0077ff, #00aaff);
background: linear-gradient(135deg, #ccc, #ccc);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
@@ -990,6 +999,7 @@ footer .container {
}
}
/* 联系页面样式 */
.contact {
padding: 40px 0;
@@ -1381,4 +1391,42 @@ footer .container {
font-size: 0.9rem;
margin: 10px 0;
}
}
/* 帮助页面样式 */
.nav-item {
position: relative;
list-style: none;
}
.subnav {
display: none;
/* 默认隐藏 */
position: absolute;
top: 100%;
left: 0;
background: #fff;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
padding: 0;
margin: 0;
}
.subnav li {
padding: 0;
}
.subnav a {
display: block;
padding: 10px;
color: #333;
text-decoration: none;
}
.subnav a:hover {
background: #f0f0f0;
}
/* 当有active类时显示下拉菜单 */
.subnav.active {
display: block;
}

View File

@@ -0,0 +1,64 @@
// Help page navigation functionality
document.addEventListener('DOMContentLoaded', function() {
// Get all navigation links
const navLinks = document.querySelectorAll('.help-nav a');
const contentSections = document.querySelectorAll('.content-section');
// Hide all sections except the first one
contentSections.forEach((section, index) => {
if (index > 0) {
section.style.display = 'none';
}
});
// Add click event listeners to navigation links
navLinks.forEach(link => {
link.addEventListener('click', function(e) {
e.preventDefault();
const targetId = this.getAttribute('data-target');
const targetSection = document.getElementById(targetId);
if (targetSection) {
// Hide all sections
contentSections.forEach(section => {
section.style.display = 'none';
});
// Show the target section
targetSection.style.display = 'block';
// Scroll to the section
targetSection.scrollIntoView({ behavior: 'smooth' });
// Update active state in navigation
updateActiveNav(this);
}
});
});
// Function to update active navigation state
function updateActiveNav(activeLink) {
// Remove active class from all links
navLinks.forEach(link => {
link.classList.remove('active');
});
// Add active class to clicked link
activeLink.classList.add('active');
// If it's a sub-link, also activate the parent
if (activeLink.parentElement.parentElement.classList.contains('nav-sub')) {
const parentLink = activeLink.closest('li').previousElementSibling.querySelector('.nav-main');
if (parentLink) {
parentLink.classList.add('active');
}
}
}
// Initialize active state for the first link
const firstNavLink = document.querySelector('.help-nav a');
if (firstNavLink) {
firstNavLink.classList.add('active');
}
});

View File

@@ -34,6 +34,7 @@
<li><a href="{{ url_for('help') }}">{{ t('help') if t('help') else '帮助' }}</a></li>
<li><a href="{{ url_for('contact') }}">{{ t('contact') }}</a></li>
<li><a href="{{ url_for('about') }}">{{ t('about') }}</a></li>
<li><a href="https://bayizhinengjf.vip.cpolar.cn/" target="_blank">{{ t('online') }}</a></li>
</ul>
<div class="language-switcher">
<select id="language-dropdown" onchange="changeLanguage(this.value)">
@@ -65,6 +66,7 @@
<li><a href="{{ url_for('about') }}">{{ t('about') }}</a></li>
<li><a href="{{ url_for('services') }}">{{ t('services') }}</a></li>
<li><a href="{{ url_for('contact') }}">{{ t('contact') }}</a></li>
<li><a href="https://bayizhinengjf.vip.cpolar.cn/" target="_blank">{{ t('online') }}</a></li>
</ul>
</div>
<div class="footer-links">
@@ -85,7 +87,7 @@
</ul>
</div>
<div class="footer-bottom">
<p>&copy; 2024 {{ company.name }}. {{ t('all_rights_reserved') }}</p>
<p>&copy; 2025 {{ company.name }}. {{ t('all_rights_reserved') }}</p>
<div class="footer-links">
<a href="#">{{ t('privacy_policy') }}</a>
<a href="#">{{ t('terms_of_use') }}</a>
@@ -97,6 +99,7 @@
<script src="{{ url_for('static', filename='js/mobile-menu.js') }}"></script>
<script src="{{ url_for('static', filename='js/tabs.js') }}"></script>
<script src="{{ url_for('static', filename='js/market-ticker.js') }}"></script>
<script src="{{ url_for('static', filename='js/help-navigation.js') }}"></script>
</body>
</html>

View File

@@ -1,14 +1,17 @@
{% extends "base.html" %}
{% block title %}联系我们{% endblock %}
{% block title %}{{ t('pricing') if t('pricing') else '收费' }}{% endblock %}
{% block content %}
<section class="hero">
<div class="container">
<h2>{{ t('contact_us') if t('contact_us') else '联系我们' }}</h2>
<p>{{ t('contact_description') if t('contact_description') else '富泽国际,竭诚为您服务!' }}</p>
</div>
</section>
<section class="contact">
<div class="container">
<h2>联系我们</h2>
{% if success %}
<div class="success-message">
<p>感谢您的留言!我们会尽快与您联系。</p>

View File

@@ -18,7 +18,7 @@
</div>
<div class="feature-grid">
<div class="feature">
<!-- <div class="feature">
<div class="feature-icon">💻</div>
<h3>{{ t('pc_client') if t('pc_client') else '电脑客户端' }}</h3>
<p>{{ t('pc_client_desc') if t('pc_client_desc') else '适用于Windows系统的桌面客户端提供完整功能体验' }}</p>
@@ -30,7 +30,7 @@
<p><strong>{{ t('system_requirements') if t('system_requirements') else '系统要求' }}:</strong> Windows
10+</p>
</div>
</div>
</div> -->
<div class="feature">
<div class="feature-icon">📱</div>

1292
templates/help.html Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -62,7 +62,7 @@
<div class="feature-card">
<div class="feature-icon">📈</div>
<h3>{{ t('global_markets') if t('global_markets') else '全球市场' }}</h3>
<p>{{ t('global_markets_desc') if t('global_markets_desc') else '港股、美股、A股、加密货币等多市场交易' }}</p>
<p>{{ t('global_markets_desc') if t('global_markets_desc') else '专注港股、美股' }}</p>
</div>
<div class="feature-card">
<div class="feature-icon">🔒</div>
@@ -77,7 +77,7 @@
<div class="feature-card">
<div class="feature-icon">💰</div>
<h3>{{ t('low_fees') if t('low_fees') else '低手续费' }}</h3>
<p>{{ t('low_fees_desc') if t('low_fees_desc') else '零佣金交易,透明收费标准' }}</p>
<p>{{ t('low_fees_desc') if t('low_fees_desc') else '灵活佣金方案,透明收费标准' }}</p>
</div>
</div>
</div>
@@ -118,10 +118,10 @@
<span class="icon">📱</span>
{{ t('mobile_app') if t('mobile_app') else '手机客户端' }}
</a>
<a href="{{ url_for('download') }}" class="btn btn-outline">
<!-- <a href="{{ url_for('download') }}" class="btn btn-outline">
<span class="icon">💻</span>
{{ t('desktop_app') if t('desktop_app') else '电脑客户端' }}
</a>
</a> -->
</div>
</div>
</div>

View File

@@ -21,9 +21,9 @@
<div class="tabs">
<button class="tab-button active" data-tab="stocks">{{ t('stocks') if t('stocks') else '股票、ETF和权证'
}}</button>
<button class="tab-button" data-tab="options">{{ t('options') if t('options') else '期权' }}</button>
<!-- <button class="tab-button" data-tab="options">{{ t('options') if t('options') else '期权' }}</button>
<button class="tab-button" data-tab="futures">{{ t('futures') if t('futures') else '期货' }}</button>
<button class="tab-button" data-tab="funds">{{ t('funds') if t('funds') else '基金' }}</button>
<button class="tab-button" data-tab="funds">{{ t('funds') if t('funds') else '基金' }}</button> -->
<button class="tab-button" data-tab="other">{{ t('other_products') if t('other_products') else '其他产品'
}}</button>
</div>
@@ -57,7 +57,7 @@
<td>US$ 1.00</td>
<td>SEC Fee: 0.0000229%<br>FINRA TAF: US$ 0.000145/股</td>
</tr>
<tr>
<!-- <tr>
<td>A股</td>
<td>股票交易</td>
<td>0.03%</td>
@@ -70,7 +70,7 @@
<td>0.20%</td>
<td>¥ 100</td>
<td>交易所费: 0.003%</td>
</tr>
</tr> -->
</tbody>
</table>
</div>
@@ -273,7 +273,7 @@
</tr>
</thead>
<tbody>
<tr>
<!-- <tr>
<td>加密货币</td>
<td>现货交易</td>
<td>0.10%</td>
@@ -286,7 +286,7 @@
<td>0.08%</td>
<td>US$ 10.00</td>
<td>隔夜利息: 可变</td>
</tr>
</tr> -->
<tr>
<td>结构性产品</td>
<td>牛熊证</td>

View File

@@ -3,11 +3,15 @@
{% block title %}我们的服务{% endblock %}
{% block content %}
<section class="hero">
<div class="container">
<h2>{{ t('services') if t('services') else '服务' }}</h2>
<p>{{ t('services_subtitle') if t('services_subtitle') else '透明合理的收费结构,助力您的投资成功' }}</p>
</div>
</section>
<section class="services">
<div class="container">
<h2>我们的服务</h2>
<p class="subtitle">我们提供全方位的数字技术解决方案,助力您的业务增长</p>
<div class="services-grid">
{% for service in company.services %}
<div class="service">

2331
新建文本文档.html Normal file

File diff suppressed because it is too large Load Diff