请求修改

This commit is contained in:
zoujiandong 2023-09-25 16:25:23 +08:00
parent 1e42268963
commit c641332a17
2 changed files with 4 additions and 4 deletions

View File

@ -19,9 +19,9 @@ service.interceptors.request.use(
// Store 必须在拦截器内部导入,在外部导入会显示 Pinia 未初始化 // Store 必须在拦截器内部导入,在外部导入会显示 Pinia 未初始化
const store = useUserStore(); const store = useUserStore();
// 设置请求头部 Authorization // 设置请求头部 Authorization
if(config.method=="put"){ // if(config.method=="put"){
config.headers['Content-Type'] = 'application/x-www-form-urlencoded' // config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
} // }
if (store.token) { if (store.token) {
config.headers['Authorization'] = 'Bearer ' + store.token; config.headers['Authorization'] = 'Bearer ' + store.token;
//config.headers['Content-Type'] = 'multipart/form-data' //config.headers['Content-Type'] = 'multipart/form-data'

View File

@ -206,7 +206,7 @@
</template> </template>
<a-form :model="okForm" :rules="formRules" ref="okModalFormRef" size="medium" label-align="left" auto-label-width> <a-form :model="okForm" :rules="formRules" ref="okModalFormRef" size="medium" label-align="left" auto-label-width>
<a-form-item field="disable_reason" label="禁用理由" > <a-form-item field="disable_reason" label="禁用理由" >
<a-textarea v-model.trim="okForm.disable_reason" allow-clear placeholder="请输入取消订单理由"></a-textarea> <a-textarea v-model.trim="okForm.disable_reason" allow-clear placeholder="请输入禁用理由"></a-textarea>
</a-form-item> </a-form-item>
<!-- <template #footer> <!-- <template #footer>
<a-button @click="()=>okVisible=false"><template #icon><icon-close /></template>取消</a-button> <a-button @click="()=>okVisible=false"><template #icon><icon-close /></template>取消</a-button>