diff --git a/.env b/.env index c2c1ffa..879c8e3 100755 --- a/.env +++ b/.env @@ -3,7 +3,7 @@ VITE_TOKEN_KEY=tokenKey VITE_URL_PREFIX=/api # VITE_BASE_APP_ID='wx0fd5e237dba24ff4' -VITE_BASE_APP_ID='wxbad2e8a91c62a734' +# VITE_BASE_APP_ID='wxbad2e8a91c62a734' # VITE_BASE_APP_SECRET='14f1027251416b49734c36bf58d6a741' -VITE_BASE_APP_SECRET='e1b7fc425ca9cca05dd83609a6dc9c00' +# VITE_BASE_APP_SECRET='e1b7fc425ca9cca05dd83609a6dc9c00' diff --git a/.env.development b/.env.development index 975fccb..cf4b60d 100755 --- a/.env.development +++ b/.env.development @@ -6,4 +6,8 @@ VITE_USE_COMPRESS=false VITE_USE_REPORT=false -VITE_BASE_API_URL='http://139.224.10.234:8088' \ No newline at end of file +VITE_BASE_API_URL='http://139.224.10.234:8088' + +VITE_BASE_APP_ID='wxbad2e8a91c62a734' + +VITE_BASE_APP_SECRET='e1b7fc425ca9cca05dd83609a6dc9c00' \ No newline at end of file diff --git a/.env.production b/.env.production index 2372286..e562ca3 100755 --- a/.env.production +++ b/.env.production @@ -6,4 +6,8 @@ VITE_USE_COMPRESS=true VITE_USE_REPORT=false -VITE_BASE_API_URL='/' \ No newline at end of file +VITE_BASE_API_URL='/' + +VITE_BASE_APP_ID='wx292995002b9476f3' + +VITE_BASE_APP_SECRET='896202811f43b146123f8d3f9ad3c153' \ No newline at end of file diff --git a/admin.conf b/admin.conf index 046fad5..0bdcb11 100755 --- a/admin.conf +++ b/admin.conf @@ -1,7 +1,29 @@ server { - listen 4399; + listen 80; + listen [::]:80; server_name admin.swfc.store; + # 配置HTTP到HTTPS的重定向(可选) + return 301 https://admin.swfc.store$request_uri; +} + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name admin.swfc.store; + + ssl_certificate /etc/nginx/ssl/admin.swfc.store/admin.swfc.store.pem; + ssl_certificate_key /etc/nginx/ssl/admin.swfc.store/admin.swfc.store.key; + # 配置SSL参数 + ssl_protocols TLSv1.2 TLSv1.3; # 指定支持的SSL/TLS协议版本 + ssl_prefer_server_ciphers on; # 使用服务器端加密套件顺序 + ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; # 指定加密套件 + + # 配置其他SSL选项 + ssl_session_timeout 1d; # SSL会话过期时间 + ssl_session_cache shared:SSL:10m; # SSL会话缓存大小 + ssl_session_tickets off; # 禁用SSL会话票据 + gzip on; # 定义要压缩的文件类型 gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; @@ -21,13 +43,9 @@ server { gzip_static on; root /usr/share/nginx/html/admin/dist; + index index.html index.htm; location / { - index index.html index.htm; - # try_files $uri $uri/ @router; - } - - location @router { - rewrite ^.*$ /index.html break; + try_files $uri $uri/ /index.html; } location /api{ diff --git a/h5.conf b/h5.conf index d803216..87754a4 100755 --- a/h5.conf +++ b/h5.conf @@ -1,13 +1,28 @@ +# server{ +# listen 80; +# listen [::]:80; +# server_name www.swfc.store swfc.store; +# # 重定向到 HTTPS +# # return 301 https://swfc.store$request_uri; +# # return 301 https://$host$request_uri; + +# # 配置HTTP到HTTPS的重定向(可选) +# # if ($scheme != "https") { +# # return 301 https://swfc.store; +# # } +# } + server { - listen 80; + listen 80; listen [::]:80; - server_name swfc.flameby.com; + server_name www.swfc.store swfc.store; - listen 443 ssl; - server_name swfc.flameby.com; + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name www.swfc.store swfc.store; - ssl_certificate /etc/nginx/ssl/swfc.flameby.com/swfc.flameby.com.pem; - ssl_certificate_key /etc/nginx/ssl/swfc.flameby.com/swfc.flameby.com.key; + ssl_certificate /etc/nginx/ssl/swfc.store/swfc.store.pem; + ssl_certificate_key /etc/nginx/ssl/swfc.store/swfc.store.key; # 配置SSL参数 ssl_protocols TLSv1.2 TLSv1.3; # 指定支持的SSL/TLS协议版本 ssl_prefer_server_ciphers on; # 使用服务器端加密套件顺序 @@ -18,11 +33,6 @@ server { ssl_session_cache shared:SSL:10m; # SSL会话缓存大小 ssl_session_tickets off; # 禁用SSL会话票据 - # 配置HTTP到HTTPS的重定向(可选) - if ($scheme != "https") { - return 301 https://swfc.flameby.com; - } - gzip on; # 定义要压缩的文件类型 gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; @@ -42,13 +52,10 @@ server { gzip_static on; root /usr/share/nginx/html/h5/dist; + index index.html index.htm; location / { - index index.html index.htm; - try_files $uri $uri/ @router; - } - - location @router { - rewrite ^.*$ /index.html break; + # try_files $uri $uri/ @router; + try_files $uri $uri/ /index.html; } location /api{ @@ -62,4 +69,13 @@ server { rewrite ^/api(.*)$ $1 break; proxy_pass http://localhost:8088; } + + location /mp/ { + alias /usr/share/nginx/html/mp/; + try_files $uri $uri/ =404; + } + + location ~* \.txt$ { + allow all; + } } diff --git a/src/utils/wxH5Share.ts b/src/utils/wxH5Share.ts index 4658059..5077d26 100755 --- a/src/utils/wxH5Share.ts +++ b/src/utils/wxH5Share.ts @@ -41,7 +41,8 @@ const share = async (title: string, desc: string, link: string, imgUrl: string) const shareData = { title, desc, - link: link.replace(/\?time=\d+(#)/gi, '$1'), + // link: link.replace(/\?time=\d+(#)/gi, '$1'), + link, imgUrl, success: function (res: any) { console.log('wx success', res); @@ -82,7 +83,8 @@ const share = async (title: string, desc: string, link: string, imgUrl: string) const shareData = { title, desc, - link: link.replace(/\?time=\d+(#)/gi, '$1'), + // link: link.replace(/\?time=\d+(#)/gi, '$1'), + link, imgUrl, success: function (res: any) { console.log('wx share success', res); diff --git a/src/views/recommend/details/index.vue b/src/views/recommend/details/index.vue index 7d0ae07..a8011a1 100755 --- a/src/views/recommend/details/index.vue +++ b/src/views/recommend/details/index.vue @@ -102,7 +102,9 @@ v-for="(l, i) in lang" :key="l.key" > + {{ l.lang }} +