Browse Source

更新图片尺寸

lex 2 years ago
parent
commit
60be20b83b

+ 1 - 1
src/components/col-cropper/cropper.tsx

@@ -177,7 +177,7 @@ export default defineComponent({
         appendToBody
         title={this.options.title}
         closeOnClickModal={false}
-        width={'800px'}
+        width={'900px'}
         v-slots={{
           footer: () => (
             <span class="dialog-footer !text-center block">

+ 5 - 5
src/components/col-cropper/index.module.less

@@ -1,6 +1,6 @@
 .uploadSection {
-  width: 156px;
-  height: 106px;
+  width: 150px;
+  height: 85px;
   background: #f8faf9;
   border-radius: 4px;
   border: 1px solid rgba(45, 199, 170, 0.26);
@@ -10,13 +10,13 @@
 }
 
 .uploadClass {
-  height: 106px;
+  height: 85px;
   width: 100%;
 
   :global {
     .el-loading-spinner {
-      margin-top: -43px;
-      height: 106px;
+      margin-top: -33px;
+      height: 85px;
     }
   }
 }

+ 3 - 3
src/components/col-cropper/index.tsx

@@ -98,7 +98,7 @@ export default defineComponent({
       //   ElMessage.error('你上传图片格式不正确!')
       //   this.isStopRun = true
       // }
-      console.log(this.size)
+      // console.log(this.size)
       const size = this.size || 0
       const isLtSize = file.size < size * 1024 * 1024
       if (!isLtSize) {
@@ -118,7 +118,7 @@ export default defineComponent({
     handleCropperSuccess(data: any) {
       //将返回的数据回显
       this.loading = false
-      console.log(data, 'success')
+      // console.log(data, 'success')
       this.$emit('update:modelValue', data)
       this.cropUploadSuccess(data)
       // this.$emit('cropUploadSuccess', data)
@@ -151,7 +151,7 @@ export default defineComponent({
           <div
             ref="uploadDom"
             class={[styles.uploadClass, 'w-full']}
-            style={{ height: '106px' }}
+            style={{ height: '85px' }}
           >
             {this.modelValue ? (
               <ElImage

+ 5 - 5
src/components/col-upload-video/index.module.less

@@ -1,6 +1,6 @@
 .uploadSection {
-  width: 156px;
-  height: 106px;
+  width: 150px;
+  height: 85px;
   background: #f8faf9;
   border-radius: 4px;
   border: 1px solid rgba(45, 199, 170, 0.26);
@@ -60,13 +60,13 @@
 }
 
 .uploadClass {
-  height: 106px;
+  height: 85px;
   width: 100%;
 
   :global {
     .el-loading-spinner {
-      margin-top: -43px;
-      height: 106px;
+      margin-top: -33px;
+      height: 85px;
     }
   }
 }

+ 2 - 1
src/components/col-upload-video/index.tsx

@@ -213,11 +213,12 @@ export default defineComponent({
             this.multiple && styles.fileUpload,
             this.disabled && styles.disabled
           ]}
+          style={{ lineHeight: '0' }}
         >
           <div
             ref="uploadDom"
             class={[styles.uploadClass, 'w-full']}
-            style={{ height: this.multiple ? '40px' : '106px' }}
+            style={{ height: this.multiple ? '40px' : '85px' }}
           >
             {this.modelValue ? (
               <video

+ 5 - 5
src/components/col-upload/index.module.less

@@ -1,6 +1,6 @@
 .uploadSection {
-  width: 156px;
-  height: 106px;
+  width: 150px;
+  height: 85px;
   background: #f8faf9;
   border-radius: 4px;
   border: 1px solid rgba(45, 199, 170, 0.26);
@@ -48,13 +48,13 @@
 }
 
 .uploadClass {
-  height: 106px;
+  height: 85px;
   width: 100%;
 
   :global {
     .el-loading-spinner {
-      margin-top: -43px;
-      height: 106px;
+      margin-top: -33px;
+      height: 85px;
     }
   }
 }

+ 1 - 1
src/components/col-upload/index.tsx

@@ -172,7 +172,7 @@ export default defineComponent({
           <div
             ref="uploadDom"
             class={[styles.uploadClass, 'w-full']}
-            style={{ height: this.uploadType === 'image' ? '106px' : '38px' }}
+            style={{ height: this.uploadType === 'image' ? '85px' : '38px' }}
           >
             {this.modelValue ? (
               this.uploadType === 'image' ? (

+ 15 - 6
src/views/user-info/live-operation/course-class/index.tsx

@@ -232,7 +232,7 @@ export default defineComponent({
                   {createState.templateList.map((item: any) => (
                     <ElCol span={10} class="mb-3 cursor-pointer">
                       <div
-                        class="w-40 relative rounded-xl overflow-hidden border"
+                        class="w-[152px] relative rounded-xl overflow-hidden border"
                         onClick={() => {
                           this.selectImg(item)
                         }}
@@ -271,9 +271,13 @@ export default defineComponent({
                   createState.live.backgroundPicTemplate = ''
                 }}
                 options={{
-                  fixedNumber: [3, 2],
-                  autoCropWidth: 300,
-                  autoCropHeight: 200
+                  title: '课程封面',
+                  fixedNumber: [3.34, 2],
+                  autoCropWidth: 375,
+                  autoCropHeight: 212
+                  // fixedNumber: [3, 2],
+                  // autoCropWidth: 300,
+                  // autoCropHeight: 200
                 }}
               />
             </ElFormItem>
@@ -283,7 +287,13 @@ export default defineComponent({
           <ElButton
             class="!w-40 !h-[38px]"
             onClick={() => {
-              console.log(true)
+              // console.log(true)
+              createState.active = 2
+              createState.live.salesStartDate = ''
+              createState.live.salesEndDate = ''
+              createState.live.backgroundPic = ''
+              createState.live.backgroundPicTemplate = ''
+              createState.live.mixStudentNum = null
             }}
           >
             上一步
@@ -297,7 +307,6 @@ export default defineComponent({
                 console.log(_)
                 if (_) {
                   this.show = true
-                } else {
                 }
               })
             }}

+ 4 - 4
src/views/user-info/live-operation/createState.ts

@@ -15,10 +15,10 @@ const original = () => {
     minutes: [] as any,
     tabIndex: 1,
     templateList: [
-      'https://daya.ks3-cn-beijing.ksyun.com/202204/T3unJdc.png',
-      'https://daya.ks3-cn-beijing.ksyun.com/202204/T3unJdl.png',
-      'https://daya.ks3-cn-beijing.ksyun.com/202204/T3unJdK.png',
-      'https://daya.ks3-cn-beijing.ksyun.com/202204/T3unJeA.png'
+      'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853010619green.png',
+      'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853051064gray.png',
+      'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853062314yellow.png',
+      'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853076136linear.png'
     ], // 模板列表
     selectCourseList: [] as any, // 选择课程列表
     coursePlanStatus: false, // 是否有锁课程

+ 5 - 0
src/views/user-info/video-operation/course-info/index.module.less

@@ -5,3 +5,8 @@
     }
   }
 }
+
+.imgCover {
+  width: 150px;
+  height: 85px;
+}

+ 9 - 4
src/views/user-info/video-operation/course-info/index.tsx

@@ -222,7 +222,7 @@ export default defineComponent({
                   {createState.templateList.map((item: any) => (
                     <ElCol span={10} class="mb-3 cursor-pointer">
                       <div
-                        class="w-40 relative rounded-xl overflow-hidden border"
+                        class="w-[152px] relative rounded-xl overflow-hidden border"
                         onClick={() => {
                           this.selectImg(item)
                         }}
@@ -261,15 +261,20 @@ export default defineComponent({
               /> */}
               <ColCropper
                 modelValue={createState.lessonGroup.lessonCoverUrl}
+                class={styles.imgCover}
                 bucket="video-course"
                 cropUploadSuccess={(data: any) => {
                   createState.lessonGroup.lessonCoverUrl = data
                   createState.lessonGroup.lessonCoverTemplateUrl = ''
                 }}
                 options={{
-                  fixedNumber: [3, 2],
-                  autoCropWidth: 300,
-                  autoCropHeight: 200
+                  // fixedNumber: [3, 2],
+                  // autoCropWidth: 300,
+                  // autoCropHeight: 200
+                  title: '课程封面',
+                  fixedNumber: [3.34, 2],
+                  autoCropWidth: 375,
+                  autoCropHeight: 212
                 }}
               />
             </ElFormItem>

+ 4 - 4
src/views/user-info/video-operation/createState.tsx

@@ -9,10 +9,10 @@ const original = () => {
     rate: 0, // 手续费
     subjectList: [], // 声部列表
     templateList: [
-      'https://daya.ks3-cn-beijing.ksyun.com/202204/T3unJdc.png',
-      'https://daya.ks3-cn-beijing.ksyun.com/202204/T3unJdl.png',
-      'https://daya.ks3-cn-beijing.ksyun.com/202204/T3unJdK.png',
-      'https://daya.ks3-cn-beijing.ksyun.com/202204/T3unJeA.png'
+      'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853010619green.png',
+      'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853051064gray.png',
+      'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853062314yellow.png',
+      'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853076136linear.png'
     ], // 模板列表
     lessonGroup: {
       id: null,