Commit f4cbc0e5 by yang

提交

parent 7723e50f
......@@ -59,12 +59,6 @@ export default {
font-weight: 700;
}
.text-wrapper_11 {
width: 16.25vw;
}
.text_44 {
width: 9.8vw;
height: 0.84vw;
......
......@@ -296,7 +296,7 @@ export default {
}
.nav-link {
font-size: 14px;
font-size: 12px;
}
.dropdown-menu {
......
......@@ -1187,140 +1187,4 @@ export default {
white-space: nowrap;
line-height: 1.57vw;
}
.group_12 {
position: absolute;
left: 0;
top: 342.92vw;
width: 100vw;
height: 18.23vw;
background: url(@/assets/case/bg_2.png) 100% no-repeat;
background-size: 100% 100%;
justify-content: flex-center;
}
.box_11 {
width: 34.85vw;
height: 8.91vw;
margin: 4.68vw 0 0 13.48vw;
}
.text_34 {
width: 6.88vw;
height: 1.15vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 1.14vw;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
margin-left: 0.06vw;
}
.text_35 {
width: 30.11vw;
height: 0.84vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 0.83vw;
font-family: MicrosoftYaHei-Semibold;
font-weight: 600;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
margin-top: 1.15vw;
}
.text-wrapper_16 {
width: 16.25vw;
height: 1.15vw;
margin: 2.65vw 0 0 0.1vw;
}
.text_36 {
width: 4.54vw;
height: 1.15vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 1.14vw;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
}
.text_37 {
width: 2.3vw;
height: 1.15vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 1.14vw;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
}
.text-wrapper_17 {
width: 34.8vw;
height: 0.84vw;
margin: 1.14vw 0 0 0.05vw;
}
.text_38 {
width: 9.8vw;
height: 0.84vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 0.83vw;
font-family: MicrosoftYaHei-Semibold;
font-weight: 600;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
}
.text_39 {
width: 20.84vw;
height: 0.84vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 0.83vw;
font-family: MicrosoftYaHei-Semibold;
font-weight: 600;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
}
.paragraph_7 {
width: 7.5vw;
height: 2.19vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 0.93vw;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: right;
line-height: 1.25vw;
margin: 8.02vw 0 0 20.41vw;
}
.image_24 {
width: 8.86vw;
height: 8.86vw;
margin: 4.68vw 13.54vw 0 1.35vw;
}
.image_25 {
position: absolute;
left: 79.43vw;
top: -2.6vw;
width: 5.21vw;
height: 5.21vw;
}
</style>
\ No newline at end of file
......@@ -221,111 +221,6 @@ export default {
overflow: hidden;
}
.box_1 {
position: relative;
width: 100vw;
height: 51.05vw;
background: url(@/assets/serve/merge_bg.png) 100% no-repeat;
background-size: 100% 100%;
}
.image_1 {
width: 6.25vw;
height: 4.95vw;
margin: 0.93vw 0 0 2.6vw;
}
.section_1 {
width: 40.11vw;
height: 30.53vw;
margin: 2.86vw 0 0 4.68vw;
}
.text_1 {
width: 40.11vw;
height: 1.05vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 1.04vw;
font-family: OPPOSans-M;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 3.75vw;
}
.text-group_1 {
width: 19.02vw;
height: 6.57vw;
margin: 18.22vw 0 0 0.1vw;
}
.text_2 {
width: 19.02vw;
height: 3.03vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 4.16vw;
font-family: Gilroy-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 3.75vw;
}
.text_3 {
width: 5.32vw;
height: 1.83vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 1.87vw;
font-family: OPPOSans-R;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 2.19vw;
margin-top: 1.72vw;
}
.image_2 {
width: 0.27vw;
height: 3.08vw;
margin-top: 1.62vw;
}
.section_2 {
height: 51.05vw;
background: url(@/assets/serve/bg_6.png) 100% no-repeat;
background-size: 100% 100%;
margin-left: 2.61vw;
width: 43.75vw;
position: relative;
}
.label_1 {
width: 1.67vw;
height: 1.67vw;
margin: 2.6vw 0 0 39.47vw;
}
.image_3 {
position: absolute;
left: -7.7vw;
top: 25.89vw;
width: 51.46vw;
height: 15.32vw;
}
.image_5 {
position: absolute;
left: 45.06vw;
top: 16.15vw;
width: 50.99vw;
height: 23.03vw;
}
.box_3 {
width: 100vw;
height: 184.07vw;
......@@ -1241,140 +1136,4 @@ export default {
font-weight: 700;
white-space: nowrap;
}
.box_15 {
position: absolute;
left: 0;
top: 235.06vw;
width: 100vw;
height: 18.23vw;
background: url(@/assets/serve/bg_12.png) 100% no-repeat;
background-size: 100% 100%;
justify-content: flex-center;
}
.box_16 {
width: 34.85vw;
height: 8.91vw;
margin: 4.68vw 0 0 13.48vw;
}
.text_32 {
width: 6.88vw;
height: 1.15vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 1.14vw;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
margin-left: 0.06vw;
}
.text_33 {
width: 30.11vw;
height: 0.84vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 0.83vw;
font-family: MicrosoftYaHei-Semibold;
font-weight: 600;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
margin-top: 1.15vw;
}
.text-wrapper_17 {
width: 16.25vw;
height: 1.15vw;
margin: 2.65vw 0 0 0.1vw;
}
.text_34 {
width: 4.54vw;
height: 1.15vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 1.14vw;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
}
.text_35 {
width: 2.3vw;
height: 1.15vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 1.14vw;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
}
.text-wrapper_18 {
width: 34.8vw;
height: 0.84vw;
margin: 1.14vw 0 0 0.05vw;
}
.text_36 {
width: 9.8vw;
height: 0.84vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 0.83vw;
font-family: MicrosoftYaHei-Semibold;
font-weight: 600;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
}
.text_37 {
width: 20.84vw;
height: 0.84vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 0.83vw;
font-family: MicrosoftYaHei-Semibold;
font-weight: 600;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
}
.paragraph_17 {
width: 7.5vw;
height: 2.19vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 0.93vw;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: right;
line-height: 1.25vw;
margin: 8.02vw 0 0 20.41vw;
}
.image_23 {
width: 8.86vw;
height: 8.86vw;
margin: 4.68vw 13.54vw 0 1.35vw;
}
.image_24 {
position: absolute;
left: 79.43vw;
top: -2.6vw;
width: 5.21vw;
height: 5.21vw;
}
</style>
\ No newline at end of file
......@@ -63,15 +63,15 @@
<span class="text_20">提交您的合作意向,我们将尽快与您联系。</span>
</div>
<div class="block_7 flex-row justify-between">
<el-input class="box_10" v-model="form.title" placeholder="您的姓名"/>
<el-input class="box_10" v-model="form.phone" placeholder="联系电话"/>
<el-input class="box_10" v-model="form.title" placeholder="* 您的姓名"/>
<el-input class="box_10" v-model="form.contactNumber" placeholder="* 联系电话"/>
</div>
<div class="block_8 flex-row justify-between">
<el-input class="box_10" v-model="form.email" placeholder="电子邮箱"/>
<el-input class="box_10" v-model="form.address" placeholder="您所在的城市"/>
<div class="block_7 flex-row justify-between">
<el-input class="box_10" v-model="form.email" placeholder="* 电子邮箱"/>
<el-input class="box_10" v-model="form.address" placeholder="* 您所在的城市"/>
</div>
<div class="block_9 flex-row justify-between">
<el-select v-model="form.job" placeholder="主营业务/现有资源" class="box_10">
<div class="block_7 flex-row justify-between">
<el-select v-model="form.mainBusiness" placeholder="* 主营业务/现有资源" class="box_10">
<el-option
v-for="item in jobList"
:key="item.value"
......@@ -79,7 +79,7 @@
:value="item.value"
/>
</el-select>
<el-select v-model="form.type" placeholder="意向合作模式" class="box_10">
<el-select v-model="form.intentionCooperation" placeholder="* 意向合作模式" class="box_10">
<el-option
v-for="item in typeList"
:key="item.value"
......@@ -88,10 +88,11 @@
/>
</el-select>
</div>
<el-input class="block_12" type="textarea" :rows="7" placeholder="请输入您要咨询的问题"/>
<el-input class="block_12" type="textarea" :rows="7" v-model="form.question" placeholder="请输入您要咨询的问题"/>
<div class="block_13 flex-row">
<div class="text-wrapper_11 align-center justify-center flex-col" @click="save">
<span class="text_34">立即提交,开启财富之旅</span>
<div class="text-wrapper_11 align-center justify-center flex-col" @click="save" :class="{ 'loading': loading }">
<span class="text_34" v-if="!loading">立即提交,开启财富之旅</span>
<span class="text_34" v-else>提交中...</span>
</div>
</div>
</div>
......@@ -120,7 +121,7 @@
<div class="dialog_box_4 flex-row">
<div class="dialog_text-wrapper_1 justify-center align-center">
<span class="dialog_text_3">直接联系信息:</span>
<span class="dialog_text_4">13641398000(雷女士</span>
<span class="dialog_text_4">{{ submit.phton }}{{ submit.name }}</span>
</div>
</div>
</div>
......@@ -131,58 +132,178 @@
<script setup>
import SecondHeader from '../components/second_header.vue'
import {ref} from "vue";
import {ElMessage} from 'element-plus'
const dialogVisible = ref(false)
const save = () => {
dialogVisible.value = true
}
const loading = ref(false)
// 表单数据
const form = ref({
title: '',
phone: '',
contactNumber: '',
email: '',
address: '',
job: '',
type: '',
desc: ''
mainBusiness: '',
intentionCooperation: '',
question: ''
})
const submit = ref({
title: '',
phton: ''
})
// 表单验证规则
const validateForm = () => {
if (!form.value.title.trim()) {
ElMessage.error('请输入您的姓名')
return false
}
if (!form.value.contactNumber.trim()) {
ElMessage.error('请输入联系电话')
return false
}
// 简单的手机号验证
const phoneRegex = /^1[3-9]\d{9}$/
if (!phoneRegex.test(form.value.contactNumber)) {
ElMessage.error('请输入正确的手机号码')
return false
}
if (!form.value.email.trim()) {
ElMessage.error('请输入电子邮箱')
return false
}
// 简单的邮箱验证
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
if (!emailRegex.test(form.value.email)) {
ElMessage.error('请输入正确的邮箱地址')
return false
}
if (!form.value.address.trim()) {
ElMessage.error('请输入您所在的城市')
return false
}
if (!form.value.mainBusiness) {
ElMessage.error('请选择主营业务/现有资源')
return false
}
if (!form.value.intentionCooperation) {
ElMessage.error('请选择意向合作模式')
return false
}
return true
}
// 提交表单
const save = async () => {
// 表单验证
if (!validateForm()) {
return
}
loading.value = true
try {
// 准备提交的数据
const submitData = {
name: form.value.title,
contactNumber: form.value.contactNumber,
email: form.value.email,
city: form.value.address,
mainBusiness: form.value.mainBusiness,
intentionCooperation: form.value.intentionCooperation,
question: form.value.question,
submit_time: new Date().toISOString()
}
// 使用代理路径,避免跨域问题
const API_URL = '/api/admin-api/system/officialwebsite/cooperation-consultation/submit-cooperation-consultation' // 通过Vite代理转发请求
const response = await fetch(API_URL, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(submitData)
})
if (response.ok) {
const result = await response.json()
console.log('提交成功:', result)
// 显示成功对话框
dialogVisible.value = true
submit.value.name = form.value.title
submit.value.phton = form.value.contactNumber
// 重置表单
resetForm()
ElMessage.success('提交成功!我们将在24小时内与您联系')
} else {
throw new Error(`HTTP error! status: ${response.status}`)
}
} catch (error) {
console.error('提交失败:', error)
ElMessage.error('提交失败,请稍后重试或直接联系客服:13641398000')
} finally {
loading.value = false
}
}
// 重置表单
const resetForm = () => {
form.value = {
title: '',
contactNumber: '',
email: '',
address: '',
mainBusiness: '',
intentionCooperation: '',
question: ''
}
}
// 合作模式选项
const typeList = ref([{
value: '1',
value: '设备购买 - 直接采购设备,用于自身业务场景',
label: '设备购买 - 直接采购设备,用于自身业务场景'
}, {
value: '2',
value: '渠道代理 - 获得区域/行业授权,进行市场销售与运营',
label: '渠道代理 - 获得区域/行业授权,进行市场销售与运营'
}, {
value: '3',
value: '设备租赁 - 短期或长期租赁设备,满足灵活使用需求',
label: '设备租赁 - 短期或长期租赁设备,满足灵活使用需求'
}, {
value: '4',
value: '项目合作 - 共同开发定制化健康解决方案',
label: '项目合作 - 共同开发定制化健康解决方案'
}, {
value: '5',
value: '其他模式',
label: '其他模式'
}])
// 主营业务选项
const jobList = ref([{
value: '1',
value: '医疗/健康管理机构',
label: '医疗/健康管理机构'
}, {
value: '2',
value: '康养/度假基地',
label: '康养/度假基地'
}, {
value: '3',
value: '高端酒店/会所',
label: '高端酒店/会所'
}, {
value: '4',
value: '企业行政福利/员工健康项目',
label: '企业行政福利/员工健康项目'
}, {
value: '5',
value: '社区/社群健康服务资源',
label: '社区/社群健康服务资源'
}, {
value: '6',
value: '健康科技产品代理经验',
label: '健康科技产品代理经验'
}, {
value: '7',
value: '其他',
label: '其他'
}])
</script>
......@@ -191,14 +312,11 @@ const jobList = ref([{
.page {
position: relative;
width: 100vw;
height: 145vw;
overflow: hidden;
}
.box_3 {
width: 100vw;
height: 96.1vw;
margin-bottom: 18.18vw;
padding-bottom: 15vw;
}
.block_1 {
......@@ -562,43 +680,150 @@ const jobList = ref([{
.block_7 {
width: 72.92vw;
height: 3.13vw;
margin: 2.76vw 0 0 13.54vw;
margin: 20px 0 0 13.54vw;
display: flex;
gap: 1vw;
}
.box_10 {
background-color: rgba(255, 255, 255, 1);
border-radius: 7px;
height: 3.13vw;
width: 35.94vw;
height: 50px;
width: 35.5vw;
flex: 1;
}
.box_10 >>> .el-select__wrapper {
height: 3.13vw;
height: 50px;
width: 100% !important;
}
.block_8 {
width: 72.92vw;
height: 3.13vw;
margin: 1.04vw 0 0 13.54vw;
.box_10 >>> .el-input__wrapper {
height: 50px;
width: 100% !important;
}
.block_9 {
width: 72.92vw;
height: 3.13vw;
margin: 1.04vw 0 0 13.54vw;
/* 只优化表单部分的移动端适配 */
@media (max-width: 768px) {
.block_7 {
width: 85vw;
margin: 15px auto 0;
flex-direction: column;
gap: 15px;
padding: 0 5vw;
box-sizing: border-box;
}
.box_10 {
width: 100%;
height: 45px;
max-width: 100%;
}
.box_10 >>> .el-select__wrapper {
height: 45px;
width: 100% !important;
max-width: 100%;
}
.box_10 >>> .el-input__wrapper {
height: 45px;
width: 100% !important;
max-width: 100%;
}
.block_12 {
width: 85vw !important;
margin: 15px auto 0 !important;
padding: 0 5vw;
box-sizing: border-box;
}
.block_13 {
width: 85vw !important;
margin: 15px auto 0 !important;
padding: 0 5vw;
box-sizing: border-box;
}
.text-wrapper_11 {
width: 100% !important;
max-width: 100%;
height: 45px !important;
}
.text_34 {
font-size: 3.8vw !important;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
@media (max-width: 480px) {
.block_7 {
width: 90vw;
margin: 10px auto 0;
gap: 10px;
padding: 0 5vw;
box-sizing: border-box;
}
.box_10 {
height: 40px;
width: 100%;
max-width: 100%;
}
.box_10 >>> .el-select__wrapper {
height: 40px;
width: 100% !important;
max-width: 100%;
}
.box_10 >>> .el-input__wrapper {
height: 40px;
width: 100% !important;
max-width: 100%;
}
.block_12 {
width: 90vw !important;
margin: 10px auto 0 !important;
padding: 0 5vw;
box-sizing: border-box;
}
.block_13 {
width: 90vw !important;
margin: 15px auto 0;
padding: 0 5vw;
box-sizing: border-box;
}
.text-wrapper_11 {
width: 100% !important;
max-width: 100%;
height: 40px !important;
}
.text_34 {
font-size: 3.5vw !important;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.block_12 {
width: 72.87vw;
height: 10.42vw;
margin: 1.04vw 0 0 13.54vw;
margin: 1.04vw 0 5vw 13.54vw;
}
.block_13 {
width: 16.1vw;
height: 3.13vw;
margin: 2.08vw 0 13.07vw 70.36vw;
margin: 0 0 0 70.36vw;
}
.text-wrapper_11 {
......@@ -606,6 +831,24 @@ const jobList = ref([{
border-radius: 7px;
height: 3.13vw;
width: 16.1vw;
cursor: pointer;
transition: all 0.3s ease;
}
.text-wrapper_11:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 82, 217, 0.3);
}
.text-wrapper_11.loading {
opacity: 0.7;
cursor: not-allowed;
transform: none;
}
.text-wrapper_11.loading:hover {
transform: none;
box-shadow: none;
}
.text_34 {
......
......@@ -480,156 +480,4 @@ export default {
white-space: nowrap;
line-height: 1.67vw;
}
.section_6 {
position: absolute;
left: 0;
top: 175.84vw;
width: 100vw;
height: 18.23vw;
background: url(@/assets/lease/bg_8.png) 100% no-repeat;
background-size: 100% 100%;
justify-content: flex-center;
}
.box_4 {
width: 34.85vw;
height: 8.91vw;
margin: 4.68vw 0 0 13.48vw;
}
.text_14 {
width: 6.88vw;
height: 1.15vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 1.14vw;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
margin-left: 0.06vw;
}
.text_15 {
width: 30.11vw;
height: 0.84vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 0.83vw;
font-family: MicrosoftYaHei-Semibold;
font-weight: 600;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
margin-top: 1.15vw;
}
.text-wrapper_3 {
width: 16.25vw;
height: 1.15vw;
margin: 2.65vw 0 0 0.1vw;
}
.text_16 {
width: 4.54vw;
height: 1.15vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 1.14vw;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
}
.text_17 {
width: 2.3vw;
height: 1.15vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 1.14vw;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
}
.text-wrapper_4 {
width: 34.8vw;
height: 0.84vw;
margin: 1.14vw 0 0 0.05vw;
}
.text_18 {
width: 9.8vw;
height: 0.84vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 0.83vw;
font-family: MicrosoftYaHei-Semibold;
font-weight: 600;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
}
.text_19 {
width: 20.84vw;
height: 0.84vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 0.83vw;
font-family: MicrosoftYaHei-Semibold;
font-weight: 600;
text-align: left;
white-space: nowrap;
line-height: 1.25vw;
}
.paragraph_3 {
width: 7.5vw;
height: 2.19vw;
overflow-wrap: break-word;
color: rgba(255, 255, 255, 1);
font-size: 0.93vw;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: right;
line-height: 1.25vw;
margin: 8.02vw 0 0 20.41vw;
}
.image-wrapper_3 {
background-color: rgba(255, 255, 255, 1);
border-radius: 30px;
height: 8.86vw;
width: 8.86vw;
margin: 4.68vw 13.54vw 0 1.35vw;
}
.image_16 {
width: 6.25vw;
height: 6.15vw;
margin: 1.35vw 0 0 1.3vw;
}
.image-wrapper_4 {
height: 5.21vw;
background: url(@/assets/lease/bg_9.png) 100% no-repeat;
background-size: 100% 100%;
width: 5.21vw;
position: absolute;
left: 79.43vw;
top: -2.6vw;
}
.image_17 {
width: 1.36vw;
height: 0.73vw;
margin: 2.23vw 0 0 1.92vw;
}
</style>
\ No newline at end of file
......@@ -19,6 +19,15 @@ export default defineConfig({
hmr: {
host: 'localhost',
protocol: 'ws'
},
// 代理配置解决跨域问题
proxy: {
'/api': {
target: 'https://service.wanyouziyu.com/', // 替换为您的实际API域名
changeOrigin: true,
secure: true, // 如果是https接口,需要配置这个参数
rewrite: (path) => path.replace(/^\/api/, '') // 可选:重写路径
}
}
}
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment