无双渐离: config [code=javascript] server { listen 8083; server_name localhost; location /apc { proxy_pass http://localhost:3000/apc; # proxy_pass http://127.0.0.1:5174; } location / { proxy_pass http://localhost:5174; } } [/code] vue 页面 [code=javascript] import axios from "axios" function fun() { getData() function getData() { ("请求33成功") (" apc/getbook").then(res=> { // ("/apc/maps/contrib/103247527174707148181").then(res=> { ("请求成功",) }).then(err => { ("请求失败") }) } function saveData(result) { axios({ method: 'put', //请求方式,默认是get请求 url: '/add', //地址 data: result }).then(res => { ('poi保存成功') }).catch(err => { (err) }) } } [/code]
正则校验,匹配大于0的正整数,element自定义正则校验pattern
简单易懂,终于搞明白怎么用nginx在vue开发环境中跨域了,详细