diff --git a/.env.development b/.env.development index 32f1e1f..361bff0 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ ENV = 'development' VUE_APP_BASE_API = '/prod-api' # VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/test-api' -VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999' +VUE_APP_BASE_TARGET = 'http://192.168.0.230:9999' # VUE_APP_BASE_TARGET = 'http://192.168.0.129:9999' # VUE_APP_BASE_TARGET = 'http://172.16.36.180:9999' diff --git a/.env.production b/.env.production index 89a177a..c91c4a9 100644 --- a/.env.production +++ b/.env.production @@ -6,7 +6,7 @@ VUE_APP_BASE_API = '/prod-api' # VUE_APP_BASE_API = '/test-api' # VUE_APP_BASE_TARGET = 'https://www.keyitest.cn/prod-api' -VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999' +VUE_APP_BASE_TARGET = 'http://192.168.0.230:9999' # VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/test-api' # VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/prod-api' # VUE_APP_BASE_TARGET = 'http://www.keyitest.cn/prod-api' diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..b57c417 Binary files /dev/null and b/dist.zip differ diff --git a/src/api/trainService/index.js b/src/api/trainService/index.js index d552d27..34c2cb1 100644 --- a/src/api/trainService/index.js +++ b/src/api/trainService/index.js @@ -203,4 +203,39 @@ export function exportExcelF(id) { method: 'get', responseType: 'blob', }) +} + + +// 获取所有轮播图 +export function getSwiperInfo() { + return request({ + url: '/train/admin/banner/list', + method: 'get', + }) +} + +// 提交轮播图 +export function addSwiperInfo(data) { + return request({ + url: 'train/admin/banner/add', + method: 'post', + data + }) +} + +// 获取轮播图班级类型 +export function getSwiperClass() { + return request({ + url: '/train/admin/bannerTrainClasses', + method: 'get', + }) +} + +// 删除轮播图 +export function delteSwiper(id) { + console.log(id); + return request({ + url: '/train/admin/banner/'+id, + method: 'delete', + }) } \ No newline at end of file diff --git a/src/components/ImgUpload/index.vue b/src/components/ImgUpload/index.vue index 8170d90..4270524 100644 --- a/src/components/ImgUpload/index.vue +++ b/src/components/ImgUpload/index.vue @@ -65,6 +65,7 @@ export default { data() { return { fileList: [], + upfileName:'', filePath: '', imageVisible: false, dialogImageUrl: '', @@ -133,6 +134,7 @@ export default { this.$message.error('文件大小不能小于' + this.minSizeTip) return false } + this.upfileName = file.name.substring(0,file.name.lastIndexOf(".")) return isRightSize && isAccept }, // 文件上传时 @@ -147,6 +149,7 @@ export default { // 删除时方法 handelDelete(file, fileList) { console.log('删除接口', this.filePath, file, fileList) + this.$emit('fileChange','') this.filePath = '' }, clearImages() { @@ -157,6 +160,7 @@ export default { // 上传成功 handleSuccess(response, file) { this.value.push(response.fileName) + this.$emit('fileChange',this.upfileName) // this.filePath='' // this.handelDelete() }, @@ -168,7 +172,9 @@ export default { handleExceed() { this.$message.error('最多只能上传' + this.limit + '个文件') }, - handleChange() {}, + handleChange() { + + }, //通过父组件传过来的value更新子组件 setFileList(string) { @@ -222,4 +228,9 @@ export default { .uploadpic >>> .upLoadHide .el-upload { display: none; } +.widthFix >>> .el-upload-list--picture-card .el-upload-list__item { + width: 90%; + height: 148px; + /* line-height: 146px; */ +} diff --git a/src/views/trainService/swiperManager.vue b/src/views/trainService/swiperManager.vue index 36f12e8..55db130 100644 --- a/src/views/trainService/swiperManager.vue +++ b/src/views/trainService/swiperManager.vue @@ -8,16 +8,29 @@ - - + + + + + + + @@ -26,16 +39,34 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> - -
- - - -
+
+ +
+ + +
+ +
+
+ + + + -
- -
+ + + + + + + + + + + + - +