This commit is contained in:
孟帅 2024-03-08 10:32:07 +08:00
parent 0fbc1ad47c
commit f0bf193077
11 changed files with 12 additions and 14 deletions

1
server/.gitignore vendored
View File

@ -36,3 +36,4 @@ main.exe~
!hotgo/
*.lock
/bin/package.sh
internal/packed/packed.go

View File

@ -3,8 +3,8 @@
gfcli:
build:
name: "hotgo" # 编译后的可执行文件名称
# arch: "all" #不填默认当前系统架构可选386,amd64,arm,all
# system: "all" #不填默认当前系统平台可选linux,darwin,windows,all
arch: "amd64" # 不填默认当前系统架构可选386,amd64,arm,all
system: "linux" # 不填默认当前系统平台可选linux,darwin,windows,all
mod: "none"
cgo: 0
packSrc: "resource" # 将resource目录打包进可执行文件静态资源无需单独部署

View File

@ -12,7 +12,6 @@ import (
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/util/gmeta"
"hotgo/internal/consts"
"hotgo/internal/library/contexts"
"hotgo/internal/library/response"
"hotgo/utility/charset"
"hotgo/utility/simple"
@ -34,7 +33,7 @@ func (s *sMiddleware) ResponseHandler(r *ghttp.Request) {
contentType := getContentType(r)
// 已存在响应
if contentType != consts.HTTPContentTypeStream && r.Response.BufferLength() > 0 && contexts.Get(r.Context()).Response != nil {
if contentType != consts.HTTPContentTypeStream && r.Response.BufferLength() > 0 { // && contexts.Get(r.Context()).Response != nil
return
}

View File

@ -76,7 +76,7 @@
//
function finish({ event: Event }) {
const res = eval('(' + Event.target.response + ')');
const res = JSON.parse(Event.target.response);
const infoField = componentSetting.upload.apiSetting.infoField;
const { code } = res;
const msg = res.msg || res.message || '上传失败';

View File

@ -106,6 +106,9 @@
const message = useMessage();
const dialog = useDialog();
const uploadTitle = ref(props.fileType === 'image' ? '上传图片' : '上传附件');
const maxNumber = computed(() => {
return props.maxNumber;
});
const fileAvatarCSS = computed(() => {
return {
'--n-merged-size': `var(--n-avatar-size-override, ${props.width * 0.8}px)`,
@ -245,7 +248,7 @@
//
function finish({ event: Event }) {
const res = eval('(' + Event.target.response + ')');
const res = JSON.parse(Event.target.response);
const infoField = componentSetting.upload.apiSetting.infoField;
const imgField = componentSetting.upload.apiSetting.imgField;
const { code } = res;
@ -289,6 +292,7 @@
getFileExt,
Preview,
previewRef,
maxNumber,
};
},
});

View File

@ -175,7 +175,6 @@
negativeText: '取消',
onPositiveClick: () => {
Delete(record).then((_res) => {
console.log('_res:' + JSON.stringify(_res));
message.success('操作成功');
reloadTable();
});

View File

@ -29,7 +29,7 @@
v-for="panel in slavePanels"
:key="panel"
:name="panel"
v-show="slavePanels.length > 0 && slavePanels !== []"
v-show="slavePanels.length > 0"
>
<EditSlaveCell
v-model:value="genInfo"

View File

@ -342,7 +342,6 @@
negativeText: '取消',
onPositiveClick: () => {
Delete(record).then((_res) => {
console.log('_res:' + JSON.stringify(_res));
message.success('操作成功');
reloadTable();
});

View File

@ -228,7 +228,6 @@
onPositiveClick: () => {
Delete(record)
.then((_res) => {
console.log('_res:' + JSON.stringify(_res));
message.success('操作成功');
reloadTable();
})
@ -251,7 +250,6 @@
onPositiveClick: () => {
Delete({ id: checkedIds.value })
.then((_res) => {
console.log('_res:' + JSON.stringify(_res));
message.success('操作成功');
reloadTable();
})

View File

@ -37,7 +37,7 @@
@media (min-width: 768px) {
.view-account {
background-image: url('~@/assets/images/login.svg');
background-image: url('@/assets/images/login.svg');
background-repeat: no-repeat;
background-position: 50%;
background-size: 100%;

View File

@ -200,10 +200,8 @@
positiveText: '确定',
negativeText: '取消',
onPositiveClick: () => {
console.log('DeleteMenu formParams:' + JSON.stringify(formParams));
DeleteDict({ ...formParams })
.then(async (_res) => {
console.log('_res:' + JSON.stringify(_res));
message.success('操作成功');
// handleReset();
await loadData();