leiyun 2 месяцев назад
Родитель
Сommit
edaf5526a3
5 измененных файлов: 107 добавлений и 1 удалений
  1. +1
    -0
      index.html
  2. +87
    -0
      nginx.conf
  3. +1
    -1
      pages.json
  4. +18
    -0
      pages/index/index.vue
  5. Двоичные данные
     

+ 1
- 0
index.html Просмотреть файл

@@ -10,6 +10,7 @@
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<link rel="icon" href="/static/favicon.ico" />
<!--preload-links-->
<!--app-context-->
</head>


+ 87
- 0
nginx.conf Просмотреть файл

@@ -0,0 +1,87 @@
# HTTP -> HTTPS 强制跳转
server {
listen 80;
server_name m.cytx.csybhelp.com;

# ACME HTTP-01 验证路径放行
location /.well-known/acme-challenge/ {
root /home/acme-challenge;
}

# HTTP 跳转 HTTPS
location / {
rewrite ^(.*)$ https://$server_name$1 permanent;
}
}

# HTTPS
server {
listen 443 ssl;
http2 on;
server_name m.cytx.csybhelp.com;

access_log /home/wwwlogs/m_cytx_csybhelp_com_access.log;
error_log /home/wwwlogs/m_cytx_csybhelp_com_error.log;

ssl_certificate cert/m_cytx_csybhelp_com_fullchain.pem;
ssl_certificate_key cert/m_cytx_csybhelp_com_privkey.pem;

# Gzip
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml+rss application/json application/javascript;

# H5 前端(history 模式)
location / {
root /home/www/cytx_h5_html/;
index index.html index.htm;
try_files $uri $uri/ /index.html;

client_max_body_size 100m;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;

add_header Cache-Control no-cache;
add_header Access-Control-Allow-Credentials true;
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Headers $http_access_control_request_headers;
}

# H5 API 代理(/pro-api -> Node,去掉前缀)
location /pro-api/ {
rewrite ^/pro-api/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:8361;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

# API 直接代理(/api -> Node)
location /api/ {
proxy_pass http://127.0.0.1:8361;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

# Nginx 状态
location /nginx_status {
stub_status on;
access_log off;
}

# 隐藏文件
location ~ /\. {
#deny all;
}
}

+ 1
- 1
pages.json Просмотреть файл

@@ -11,7 +11,7 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "肠愈同行"
"navigationBarTitleText": "肠愈同行患者关爱"
}
},
{


+ 18
- 0
pages/index/index.vue Просмотреть файл

@@ -24,6 +24,24 @@
</view>
</template>

<script>
export default {
onShareAppMessage() {
return {
title: '肠愈同行 · 患者关爱',
path: '/pages/index/index',
imageUrl: 'https://cdn.csybhelp.com/images/cytx/cytx_share_banner.jpg'
}
},
onShareTimeline() {
return {
title: '肠愈同行 · 患者关爱',
imageUrl: 'https://cdn.csybhelp.com/images/cytx/cytx_share_banner.jpg'
}
}
}
</script>

<script setup>
import { ref, computed } from 'vue'
import { onShow } from '@dcloudio/uni-app'


Двоичные данные
Просмотреть файл


Загрузка…
Отмена
Сохранить