Kaynağa Gözat

1、二宫格出血

huangmp 2 yıl önce
ebeveyn
işleme
4f61dff05f

+ 5 - 2
src/components/canvas-preview/index.vue

@@ -28,6 +28,8 @@
       </div>
       <div v-if="prodType === '手幅'" class="previewClass" :style="{width: previewWidth + 'px', height: previewHeight + 'px', borderWidth: previewWidth * 0.0255 + 'px'}">
       </div>
+      <div v-if="prodType === '二宫格'" class="previewClass" :style="{width: previewWidth + 'px', height: previewHeight + 'px', borderWidth: previewWidth * 0.02325 + 'px'}">
+      </div>
       <el-image ref="previewImageRef" :src="previewPicUrl" alt="" @load="previewLoad" style="width: 100%; height: 100%"/>
     </div>
     <!--<div class="parent">
@@ -45,8 +47,9 @@
 <script>
   const statusConfig = {IDLE:0, DRAG_START:1, DRAGGING:2};
   const prodSize = {'小卡': {width: 709, height: 1087, clientScale:0.5, bloodRadio: 0.0242}, '方卡':{width: 1252, height: 1252, clientScale:0.5}, '拍立得':{width: 709, height: 1087, clientScale:0.5, bloodRadio: 0.0242},
-                    '直拍封面':{width: 709, height: 1217, clientScale:0.5, bloodRadio: 0.02325}, '书签': {width: 638, height: 1819, clientScale:0.4, bloodRadio: 0.0264},'明信片':{width: 1252, height: 1819, clientScale:0.4, bloodRadio: 0.0261},
-                    '徽章':{width: 839, height: 839, clientScale:0.5, bloodRadio: 0.0813, bloodRadius:100},'票根':{width: 709, height: 1489, clientScale:0.5, bloodRadio: 0.0465},'手幅':{width: 1252, height: 3614, clientScale:0.25, bloodRadio: 0.0255}}
+                    '直拍封面':{width: 732, height: 1252, clientScale:0.5, bloodRadio: 0.02325}, '书签': {width: 638, height: 1819, clientScale:0.4, bloodRadio: 0.0264},'明信片':{width: 1252, height: 1819, clientScale:0.4, bloodRadio: 0.0261},
+                    '徽章':{width: 839, height: 839, clientScale:0.5, bloodRadio: 0.0813, bloodRadius:100},'票根':{width: 709, height: 1489, clientScale:0.5, bloodRadio: 0.0465},
+                    '手幅':{width: 1252, height: 3614, clientScale:0.25, bloodRadio: 0.0255},'二宫格':{width: 1252, height: 732, clientScale:0.25, bloodRadio: 0.05}}
   export default {
     name: "CanvasPreview",
     data() {

+ 7 - 2
src/components/order-card-item/index.vue

@@ -135,8 +135,11 @@
             width = 780;
             height = 1489;
           }else if(prodName.indexOf("直拍封面") !== -1){
-            width = 697;
-            height = 1217;
+            width = 732;
+            height = 1252;
+          }else if(prodName.indexOf("二宫格") !== -1){
+            width = 1252;
+            height = 732;
           }else if(prodName.indexOf("明信片") !== -1){
             width = 1229;
             height = 1796;
@@ -315,6 +318,8 @@
           this.prodType = '长方形贴纸';
         }else if(prodName.indexOf('方形贴纸') != -1){
           this.prodType = '方形贴纸';
+        }else if(prodName.indexOf('二宫格') != -1){
+          this.prodType = '二宫格';
         }
         this.$nextTick(() =>{
           this.$refs.canvasPreviewRef.init(cardItem, this.resourcesUrl + picUrl, this.prodType, side)