change api

This commit is contained in:
sdaduanbilei-d1581 2025-11-13 17:18:25 +08:00
parent b3493b5e27
commit d697dcc0f0
3 changed files with 8 additions and 6 deletions

View File

@ -8,7 +8,7 @@
<a-table class="mt-20" :columns="columns" :data="list" :pagination="page" @pageChange="change">
<template #name="{record}">
<div class="flex flex-center flex-justify-start">
<a-image v-if="record.oss" width="60" height="60" :src="record.oss.url" :alt="record.id"/>
<a-image v-if="record.imgList.length > 0" width="60" height="60" :src="record.imgList[0].url" :alt="record.id"/>
<div class="ml-10">{{record.name}}</div>
</div>
</template>
@ -96,10 +96,12 @@ export default {
})
},
upload(item,file){
const data = {libraryId:item.id,ossId:file.id}
const data = {id:item.id,ossIds:[file.id]}
this.$api.flower.setImg(data).then(res => {
if(res.code === 200){
this.fetchList()
} else {
this.$message.error(res.msg)
}
})
}

View File

@ -59,9 +59,10 @@ export default {
},
index: 0,
columns: [
{ title: '账户', dataIndex: 'account' },
{ title: '账户', dataIndex: 'name' },
{ title: '电话', dataIndex: 'phone' },
{ title: '角色', dataIndex: 'roles' },
{ title: '添加时间', dataIndex: 'createdAt' },
{ title: '操作', slotName: 'menu', width: 260 }
]
}

View File

@ -46,9 +46,8 @@ export default defineConfig({
proxy: {
'/api': {
// 正式环境地址
// target: 'https://prod.wutongshucloud.com/api',
target: 'http://129.28.103.17:3411/api',
// target: 'http://127.0.0.1:3000',
target: 'https://prod.sundynix.cn/api',
// target: 'http://129.28.103.17:3411/api',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '')
}