From 9cd7f4d5b86fd9a706870c196cb5a6916afefacd Mon Sep 17 00:00:00 2001 From: tian <“184391138@qq.com”> Date: Sun, 25 Feb 2024 21:15:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- server/api/v1/enter.go | 2 + server/api/v1/goods/enter.go | 5 + server/api/v1/goods/goods_show.go | 151 +++++++ server/common/consts/consts.go | 1 + server/initialize/gorm.go | 4 +- server/initialize/router.go | 4 + server/model/goods/goods_show.go | 25 ++ server/model/goods/request/goods_show.go | 15 + server/model/system/sys_user.go | 23 +- server/router/enter.go | 2 + server/router/goods/enter.go | 5 + server/router/goods/goods_show.go | 27 ++ server/service/enter.go | 2 + server/service/goods/enter.go | 5 + server/service/goods/goods_show.go | 79 ++++ web/src/api/goodsShow.js | 97 +++++ web/src/view/goodsShow/goodsShow.vue | 485 +++++++++++++++++++++++ web/src/view/goodsShow/goodsShowForm.vue | 142 +++++++ 19 files changed, 1061 insertions(+), 16 deletions(-) create mode 100644 server/api/v1/goods/enter.go create mode 100644 server/api/v1/goods/goods_show.go create mode 100644 server/common/consts/consts.go create mode 100644 server/model/goods/goods_show.go create mode 100644 server/model/goods/request/goods_show.go create mode 100644 server/router/goods/enter.go create mode 100644 server/router/goods/goods_show.go create mode 100644 server/service/goods/enter.go create mode 100644 server/service/goods/goods_show.go create mode 100644 web/src/api/goodsShow.js create mode 100644 web/src/view/goodsShow/goodsShow.vue create mode 100644 web/src/view/goodsShow/goodsShowForm.vue diff --git a/.gitignore b/.gitignore index f27c08c..b712423 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .idea/ /web/node_modules /web/dist +/server/log .DS_Store @@ -21,5 +22,5 @@ yarn-error.log* *.njsproj *.sln *.sw? - +.log *.iml diff --git a/server/api/v1/enter.go b/server/api/v1/enter.go index 94cb8b4..dd77ee3 100644 --- a/server/api/v1/enter.go +++ b/server/api/v1/enter.go @@ -2,12 +2,14 @@ package v1 import ( "pychr/api/v1/example" + "pychr/api/v1/goods" "pychr/api/v1/system" ) type ApiGroup struct { SystemApiGroup system.ApiGroup ExampleApiGroup example.ApiGroup + GoodsApiGroup goods.ApiGroup } var ApiGroupApp = new(ApiGroup) diff --git a/server/api/v1/goods/enter.go b/server/api/v1/goods/enter.go new file mode 100644 index 0000000..9930077 --- /dev/null +++ b/server/api/v1/goods/enter.go @@ -0,0 +1,5 @@ +package goods + +type ApiGroup struct { + GoodsShowApi +} diff --git a/server/api/v1/goods/goods_show.go b/server/api/v1/goods/goods_show.go new file mode 100644 index 0000000..1b24291 --- /dev/null +++ b/server/api/v1/goods/goods_show.go @@ -0,0 +1,151 @@ +package goods + +import ( + "github.com/gin-gonic/gin" + "go.uber.org/zap" + "pychr/global" + "pychr/model/common/response" + "pychr/model/goods" + goodsReq "pychr/model/goods/request" + "pychr/service" +) + +type GoodsShowApi struct { +} + +var goodsShowService = service.ServiceGroupApp.GoodsServiceGroup.GoodsShowService + +// CreateGoodsShow 创建商品 +// @Tags GoodsShow +// @Summary 创建商品 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body goods.GoodsShow true "创建商品" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}" +// @Router /goodsShow/createGoodsShow [post] +func (goodsShowApi *GoodsShowApi) CreateGoodsShow(c *gin.Context) { + var goodsShow goods.GoodsShow + err := c.ShouldBindJSON(&goodsShow) + if err != nil { + response.FailWithMessage(err.Error(), c) + return + } + + if err := goodsShowService.CreateGoodsShow(&goodsShow); err != nil { + global.GVA_LOG.Error("创建失败!", zap.Error(err)) + response.FailWithMessage("创建失败", c) + } else { + response.OkWithMessage("创建成功", c) + } +} + +// DeleteGoodsShow 删除商品 +// @Tags GoodsShow +// @Summary 删除商品 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body goods.GoodsShow true "删除商品" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" +// @Router /goodsShow/deleteGoodsShow [delete] +func (goodsShowApi *GoodsShowApi) DeleteGoodsShow(c *gin.Context) { + ID := c.Query("ID") + if err := goodsShowService.DeleteGoodsShow(ID); err != nil { + global.GVA_LOG.Error("删除失败!", zap.Error(err)) + response.FailWithMessage("删除失败", c) + } else { + response.OkWithMessage("删除成功", c) + } +} + +// DeleteGoodsShowByIds 批量删除商品 +// @Tags GoodsShow +// @Summary 批量删除商品 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Success 200 {string} string "{"success":true,"data":{},"msg":"批量删除成功"}" +// @Router /goodsShow/deleteGoodsShowByIds [delete] +func (goodsShowApi *GoodsShowApi) DeleteGoodsShowByIds(c *gin.Context) { + IDs := c.QueryArray("IDs[]") + if err := goodsShowService.DeleteGoodsShowByIds(IDs); err != nil { + global.GVA_LOG.Error("批量删除失败!", zap.Error(err)) + response.FailWithMessage("批量删除失败", c) + } else { + response.OkWithMessage("批量删除成功", c) + } +} + +// UpdateGoodsShow 更新商品 +// @Tags GoodsShow +// @Summary 更新商品 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body goods.GoodsShow true "更新商品" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}" +// @Router /goodsShow/updateGoodsShow [put] +func (goodsShowApi *GoodsShowApi) UpdateGoodsShow(c *gin.Context) { + var goodsShow goods.GoodsShow + err := c.ShouldBindJSON(&goodsShow) + if err != nil { + response.FailWithMessage(err.Error(), c) + return + } + + if err := goodsShowService.UpdateGoodsShow(goodsShow); err != nil { + global.GVA_LOG.Error("更新失败!", zap.Error(err)) + response.FailWithMessage("更新失败", c) + } else { + response.OkWithMessage("更新成功", c) + } +} + +// FindGoodsShow 用id查询商品 +// @Tags GoodsShow +// @Summary 用id查询商品 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data query goods.GoodsShow true "用id查询商品" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}" +// @Router /goodsShow/findGoodsShow [get] +func (goodsShowApi *GoodsShowApi) FindGoodsShow(c *gin.Context) { + ID := c.Query("ID") + if regoodsShow, err := goodsShowService.GetGoodsShow(ID); err != nil { + global.GVA_LOG.Error("查询失败!", zap.Error(err)) + response.FailWithMessage("查询失败", c) + } else { + response.OkWithData(gin.H{"regoodsShow": regoodsShow}, c) + } +} + +// GetGoodsShowList 分页获取商品列表 +// @Tags GoodsShow +// @Summary 分页获取商品列表 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data query goodsReq.GoodsShowSearch true "分页获取商品列表" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" +// @Router /goodsShow/getGoodsShowList [get] +func (goodsShowApi *GoodsShowApi) GetGoodsShowList(c *gin.Context) { + var pageInfo goodsReq.GoodsShowSearch + err := c.ShouldBindQuery(&pageInfo) + if err != nil { + response.FailWithMessage(err.Error(), c) + return + } + if list, total, err := goodsShowService.GetGoodsShowInfoList(pageInfo); err != nil { + global.GVA_LOG.Error("获取失败!", zap.Error(err)) + response.FailWithMessage("获取失败", c) + } else { + response.OkWithDetailed(response.PageResult{ + List: list, + Total: total, + Page: pageInfo.Page, + PageSize: pageInfo.PageSize, + }, "获取成功", c) + } +} diff --git a/server/common/consts/consts.go b/server/common/consts/consts.go new file mode 100644 index 0000000..805d0c7 --- /dev/null +++ b/server/common/consts/consts.go @@ -0,0 +1 @@ +package common diff --git a/server/initialize/gorm.go b/server/initialize/gorm.go index 43d95e1..3bf9034 100644 --- a/server/initialize/gorm.go +++ b/server/initialize/gorm.go @@ -9,6 +9,7 @@ import ( "go.uber.org/zap" "gorm.io/gorm" + "pychr/model/goods" ) func Gorm() *gorm.DB { @@ -46,11 +47,12 @@ func RegisterTables() { system.SysAuthorityBtn{}, system.SysAutoCode{}, system.SysExportTemplate{}, + system.GoodsShow{}, example.ExaFile{}, example.ExaCustomer{}, example.ExaFileChunk{}, - example.ExaFileUploadAndDownload{}, + example.ExaFileUploadAndDownload{}, goods.GoodsShow{}, ) if err != nil { global.GVA_LOG.Error("register table failed", zap.Error(err)) diff --git a/server/initialize/router.go b/server/initialize/router.go index f24f638..f1a1d6b 100644 --- a/server/initialize/router.go +++ b/server/initialize/router.go @@ -98,6 +98,10 @@ func Routers() *gin.Engine { exampleRouter.InitFileUploadAndDownloadRouter(PrivateGroup) // 文件上传下载功能路由 } + { + goodsRouter := router.RouterGroupApp.Goods + goodsRouter.InitGoodsShowRouter(PrivateGroup) + } global.GVA_LOG.Info("router register success") return Router diff --git a/server/model/goods/goods_show.go b/server/model/goods/goods_show.go new file mode 100644 index 0000000..33d9280 --- /dev/null +++ b/server/model/goods/goods_show.go @@ -0,0 +1,25 @@ +// 自动生成模板GoodsShow +package goods + +import ( + "pychr/global" +) + +// 商品 结构体 GoodsShow +type GoodsShow struct { + global.GVA_MODEL + LangType int `json:"langType" form:"langType" gorm:"column:lang_type;comment:语言类型 1中文 2英文;size:10;" binding:"required"` // 语言类型 1中文 2英文 + GoodsMainPic string `json:"goodsMainPic" form:"goodsMainPic" gorm:"column:goods_main_pic;comment:商品主图;size:191;"` // 商品主图 + Name string `json:"name" form:"name" gorm:"column:name;comment:商品名称;size:191;" binding:"required"` // 商品名称 + BriefIntroduction string `json:"briefIntroduction" form:"briefIntroduction" gorm:"column:brief_introduction;comment:简介;size:191;"` // 简介 + Type int `json:"type" form:"type" gorm:"column:type;comment:类型;size:10;" binding:"required"` // 类型 + MainIntroduction string `json:"mainIntroduction" form:"mainIntroduction" gorm:"column:main_introduction;comment:主介绍;size:191;"` // 主介绍 + GoodsAssistantPic string `json:"goodsAssistantPic" form:"goodsAssistantPic" gorm:"column:goods_assistantPic;comment:商品副图;size:191;"` // 商品副图 + SecondIntroductionTitle string `json:"secondIntroductionTitle" form:"secondIntroductionTitle" gorm:"column:second_introduction_title;comment:副介绍标题;size:191;"` // 副介绍标题 + SecondIntroduction string `json:"secondIntroduction" form:"secondIntroduction" gorm:"column:second_introduction;comment:副介绍,逗号拼接;size:191;"` // 副介绍,逗号拼接 +} + +// TableName 商品 GoodsShow自定义表名 goods_show +func (GoodsShow) TableName() string { + return "goods_show" +} diff --git a/server/model/goods/request/goods_show.go b/server/model/goods/request/goods_show.go new file mode 100644 index 0000000..4a53584 --- /dev/null +++ b/server/model/goods/request/goods_show.go @@ -0,0 +1,15 @@ +package request + +import ( + "pychr/model/common/request" + "time" +) + +type GoodsShowSearch struct { + StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"` + EndCreatedAt *time.Time `json:"endCreatedAt" form:"endCreatedAt"` + LangType int `json:"langType" form:"langType" ` + Name string `json:"name" form:"name" ` + Type int `json:"type" form:"type" ` + request.PageInfo +} diff --git a/server/model/system/sys_user.go b/server/model/system/sys_user.go index 665cfaa..050a566 100644 --- a/server/model/system/sys_user.go +++ b/server/model/system/sys_user.go @@ -29,20 +29,15 @@ func (SysUser) TableName() string { type GoodsShow struct { global.GVA_MODEL - UUID uuid.UUID `json:"uuid" gorm:"index;comment:用户UUID"` // 用户UUID - Name string `json:"name" gorm:"index;comment:用户登录名"` // 用户登录名 - Password string `json:"-" gorm:"comment:用户登录密码"` // 用户登录密码 - NickName string `json:"nickName" gorm:"default:系统用户;comment:用户昵称"` // 用户昵称 - SideMode string `json:"sideMode" gorm:"default:dark;comment:用户侧边主题"` // 用户侧边主题 - HeaderImg string `json:"headerImg" gorm:"default:'';comment:用户头像"` // 用户头像 - BaseColor string `json:"baseColor" gorm:"default:#fff;comment:基础颜色"` // 基础颜色 - ActiveColor string `json:"activeColor" gorm:"default:#1890ff;comment:活跃颜色"` // 活跃颜色 - AuthorityId uint64 `json:"authorityId" gorm:"default:888;comment:用户角色ID"` // 用户角色ID - Authority SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:用户角色"` - Authorities []SysAuthority `json:"authorities" gorm:"many2many:sys_user_authority;"` - Phone string `json:"phone" gorm:"comment:用户手机号"` // 用户手机号 - Email string `json:"email" gorm:"comment:用户邮箱"` // 用户邮箱 - Enable int `json:"enable" gorm:"default:1;comment:用户是否被冻结 1正常 2冻结"` // 用户是否被冻结 1正常 2冻结 + LangType int `json:"langType" gorm:"default:1;comment:语言类型 1中文 2英文"` // 语言类型 1中文 2英文 + GoodsMainPic string `json:"goodsMainPic" gorm:"comment:商品主图"` // 商品主图 + Name string `json:"name" gorm:"index;comment:商品名称"` // 商品名称 + BriefIntroduction string `json:"briefIntroduction" gorm:"comment:简介"` // 简介 + Type int `json:"type" gorm:"default:1;comment:类型"` // 类型 + MainIntroduction string `json:"mainIntroduction" gorm:"default:dark;comment:主介绍"` // 主介绍 + GoodsAssistantPic string `json:"goodsAssistantPic" gorm:"default:'';comment:商品副图"` // 商品副图 + SecondIntroductionTitle string `json:"secondIntroductionTitle" gorm:"default:'';comment:副介绍标题"` // 副介绍标题 + SecondIntroduction string `json:"secondIntroduction" gorm:"comment:副介绍"` // 副介绍,逗号拼接 } func (GoodsShow) TableName() string { diff --git a/server/router/enter.go b/server/router/enter.go index 7a3f517..123ab6e 100644 --- a/server/router/enter.go +++ b/server/router/enter.go @@ -2,12 +2,14 @@ package router import ( "pychr/router/example" + "pychr/router/goods" "pychr/router/system" ) type RouterGroup struct { System system.RouterGroup Example example.RouterGroup + Goods goods.RouterGroup } var RouterGroupApp = new(RouterGroup) diff --git a/server/router/goods/enter.go b/server/router/goods/enter.go new file mode 100644 index 0000000..9c5ca66 --- /dev/null +++ b/server/router/goods/enter.go @@ -0,0 +1,5 @@ +package goods + +type RouterGroup struct { + GoodsShowRouter +} diff --git a/server/router/goods/goods_show.go b/server/router/goods/goods_show.go new file mode 100644 index 0000000..c15444f --- /dev/null +++ b/server/router/goods/goods_show.go @@ -0,0 +1,27 @@ +package goods + +import ( + "github.com/gin-gonic/gin" + "pychr/api/v1" + "pychr/middleware" +) + +type GoodsShowRouter struct { +} + +// InitGoodsShowRouter 初始化 商品 路由信息 +func (s *GoodsShowRouter) InitGoodsShowRouter(Router *gin.RouterGroup) { + goodsShowRouter := Router.Group("goodsShow").Use(middleware.OperationRecord()) + goodsShowRouterWithoutRecord := Router.Group("goodsShow") + var goodsShowApi = v1.ApiGroupApp.GoodsApiGroup.GoodsShowApi + { + goodsShowRouter.POST("createGoodsShow", goodsShowApi.CreateGoodsShow) // 新建商品 + goodsShowRouter.DELETE("deleteGoodsShow", goodsShowApi.DeleteGoodsShow) // 删除商品 + goodsShowRouter.DELETE("deleteGoodsShowByIds", goodsShowApi.DeleteGoodsShowByIds) // 批量删除商品 + goodsShowRouter.PUT("updateGoodsShow", goodsShowApi.UpdateGoodsShow) // 更新商品 + } + { + goodsShowRouterWithoutRecord.GET("findGoodsShow", goodsShowApi.FindGoodsShow) // 根据ID获取商品 + goodsShowRouterWithoutRecord.GET("getGoodsShowList", goodsShowApi.GetGoodsShowList) // 获取商品列表 + } +} diff --git a/server/service/enter.go b/server/service/enter.go index b340a91..a9b7e59 100644 --- a/server/service/enter.go +++ b/server/service/enter.go @@ -2,12 +2,14 @@ package service import ( "pychr/service/example" + "pychr/service/goods" "pychr/service/system" ) type ServiceGroup struct { SystemServiceGroup system.ServiceGroup ExampleServiceGroup example.ServiceGroup + GoodsServiceGroup goods.ServiceGroup } var ServiceGroupApp = new(ServiceGroup) diff --git a/server/service/goods/enter.go b/server/service/goods/enter.go new file mode 100644 index 0000000..c12b879 --- /dev/null +++ b/server/service/goods/enter.go @@ -0,0 +1,5 @@ +package goods + +type ServiceGroup struct { + GoodsShowService +} diff --git a/server/service/goods/goods_show.go b/server/service/goods/goods_show.go new file mode 100644 index 0000000..b34c642 --- /dev/null +++ b/server/service/goods/goods_show.go @@ -0,0 +1,79 @@ +package goods + +import ( + "pychr/global" + "pychr/model/goods" + goodsReq "pychr/model/goods/request" +) + +type GoodsShowService struct { +} + +// CreateGoodsShow 创建商品记录 +// Author [piexlmax](https://github.com/piexlmax) +func (goodsShowService *GoodsShowService) CreateGoodsShow(goodsShow *goods.GoodsShow) (err error) { + err = global.GVA_DB.Create(goodsShow).Error + return err +} + +// DeleteGoodsShow 删除商品记录 +// Author [piexlmax](https://github.com/piexlmax) +func (goodsShowService *GoodsShowService) DeleteGoodsShow(ID string) (err error) { + err = global.GVA_DB.Delete(&goods.GoodsShow{}, "id = ?", ID).Error + return err +} + +// DeleteGoodsShowByIds 批量删除商品记录 +// Author [piexlmax](https://github.com/piexlmax) +func (goodsShowService *GoodsShowService) DeleteGoodsShowByIds(IDs []string) (err error) { + err = global.GVA_DB.Delete(&[]goods.GoodsShow{}, "id in ?", IDs).Error + return err +} + +// UpdateGoodsShow 更新商品记录 +// Author [piexlmax](https://github.com/piexlmax) +func (goodsShowService *GoodsShowService) UpdateGoodsShow(goodsShow goods.GoodsShow) (err error) { + err = global.GVA_DB.Save(&goodsShow).Error + return err +} + +// GetGoodsShow 根据ID获取商品记录 +// Author [piexlmax](https://github.com/piexlmax) +func (goodsShowService *GoodsShowService) GetGoodsShow(ID string) (goodsShow goods.GoodsShow, err error) { + err = global.GVA_DB.Where("id = ?", ID).First(&goodsShow).Error + return +} + +// GetGoodsShowInfoList 分页获取商品记录 +// Author [piexlmax](https://github.com/piexlmax) +func (goodsShowService *GoodsShowService) GetGoodsShowInfoList(info goodsReq.GoodsShowSearch) (list []goods.GoodsShow, total int64, err error) { + limit := info.PageSize + offset := info.PageSize * (info.Page - 1) + // 创建db + db := global.GVA_DB.Model(&goods.GoodsShow{}) + var goodsShows []goods.GoodsShow + // 如果有条件搜索 下方会自动创建搜索语句 + if info.StartCreatedAt != nil && info.EndCreatedAt != nil { + db = db.Where("created_at BETWEEN ? AND ?", info.StartCreatedAt, info.EndCreatedAt) + } + if info.LangType != 0 { + db = db.Where("lang_type = ?", info.LangType) + } + if info.Name != "" { + db = db.Where("name LIKE ?", "%"+info.Name+"%") + } + if info.Type != 0 { + db = db.Where("type = ?", info.Type) + } + err = db.Count(&total).Error + if err != nil { + return + } + + if limit != 0 { + db = db.Limit(limit).Offset(offset) + } + + err = db.Find(&goodsShows).Error + return goodsShows, total, err +} diff --git a/web/src/api/goodsShow.js b/web/src/api/goodsShow.js new file mode 100644 index 0000000..581820d --- /dev/null +++ b/web/src/api/goodsShow.js @@ -0,0 +1,97 @@ +import service from '@/utils/request' + +// @Tags GoodsShow +// @Summary 创建商品 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body model.GoodsShow true "创建商品" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}" +// @Router /goodsShow/createGoodsShow [post] +export const createGoodsShow = (data) => { + return service({ + url: '/goodsShow/createGoodsShow', + method: 'post', + data + }) +} + +// @Tags GoodsShow +// @Summary 删除商品 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body model.GoodsShow true "删除商品" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" +// @Router /goodsShow/deleteGoodsShow [delete] +export const deleteGoodsShow = (params) => { + return service({ + url: '/goodsShow/deleteGoodsShow', + method: 'delete', + params + }) +} + +// @Tags GoodsShow +// @Summary 批量删除商品 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body request.IdsReq true "批量删除商品" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" +// @Router /goodsShow/deleteGoodsShow [delete] +export const deleteGoodsShowByIds = (params) => { + return service({ + url: '/goodsShow/deleteGoodsShowByIds', + method: 'delete', + params + }) +} + +// @Tags GoodsShow +// @Summary 更新商品 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data body model.GoodsShow true "更新商品" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}" +// @Router /goodsShow/updateGoodsShow [put] +export const updateGoodsShow = (data) => { + return service({ + url: '/goodsShow/updateGoodsShow', + method: 'put', + data + }) +} + +// @Tags GoodsShow +// @Summary 用id查询商品 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data query model.GoodsShow true "用id查询商品" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}" +// @Router /goodsShow/findGoodsShow [get] +export const findGoodsShow = (params) => { + return service({ + url: '/goodsShow/findGoodsShow', + method: 'get', + params + }) +} + +// @Tags GoodsShow +// @Summary 分页获取商品列表 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param data query request.PageInfo true "分页获取商品列表" +// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" +// @Router /goodsShow/getGoodsShowList [get] +export const getGoodsShowList = (params) => { + return service({ + url: '/goodsShow/getGoodsShowList', + method: 'get', + params + }) +} diff --git a/web/src/view/goodsShow/goodsShow.vue b/web/src/view/goodsShow/goodsShow.vue new file mode 100644 index 0000000..49afc4c --- /dev/null +++ b/web/src/view/goodsShow/goodsShow.vue @@ -0,0 +1,485 @@ + + + + + diff --git a/web/src/view/goodsShow/goodsShowForm.vue b/web/src/view/goodsShow/goodsShowForm.vue new file mode 100644 index 0000000..0cd724f --- /dev/null +++ b/web/src/view/goodsShow/goodsShowForm.vue @@ -0,0 +1,142 @@ + + + + +