sync:问题修改 42c75bb61a
parent
b532985e84
commit
b62f2ccd21
|
@ -505,7 +505,6 @@
|
|||
import { PromotionActivityTypeEnum } from '@/sheep/util/const';
|
||||
|
||||
// 数据
|
||||
const state = reactive({});
|
||||
let defaultImgWidth = ref(0);
|
||||
|
||||
// 接收参数
|
||||
|
@ -605,10 +604,6 @@
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
imgHeight: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
// 优惠文案
|
||||
|
@ -692,10 +687,8 @@
|
|||
totalHeight =
|
||||
(goodsPriceCard.width / props.data.image_wh.w) * props.data.image_wh.h +
|
||||
goodsPriceCard.height;
|
||||
console.log(totalHeight, 'totalHeight');
|
||||
} else {
|
||||
totalHeight = goodsPriceCard.width + goodsPriceCard.height;
|
||||
console.log(totalHeight, 'totalHeight2');
|
||||
}
|
||||
emits('getHeight', totalHeight);
|
||||
});
|
||||
|
|
|
@ -71,7 +71,8 @@ function append_thumbnail_params(url, params) {
|
|||
if (!gravity && gravity != 'center') {
|
||||
// 指定了裁剪区域
|
||||
mode = 'mfit';
|
||||
crop_str = '/crop,g_' + gravityFormatMap('aliyun', gravity) + ',w_' + width + ',h_' + height;
|
||||
crop_str =
|
||||
'/crop,g_' + gravityFormatter('aliyun', gravity) + ',w_' + width + ',h_' + height;
|
||||
}
|
||||
|
||||
// 质量压缩
|
||||
|
@ -91,7 +92,7 @@ function append_thumbnail_params(url, params) {
|
|||
// 指定了裁剪区域
|
||||
mode_str = 'crop';
|
||||
mode = 'fill';
|
||||
crop_str = '/gravity/' + gravityFormatMap('qcloud', gravity);
|
||||
crop_str = '/gravity/' + gravityFormatter('qcloud', gravity);
|
||||
}
|
||||
|
||||
// 质量压缩
|
||||
|
@ -121,7 +122,7 @@ function append_thumbnail_params(url, params) {
|
|||
if (mode == 'fill' || (!gravity && gravity != 'center')) {
|
||||
// 指定了裁剪区域,全部转为 mfit
|
||||
mode = 'mfit';
|
||||
crop_str = '/gravity/' + gravityFormatMap('qiniu', gravity) + '/crop/' + size;
|
||||
crop_str = '/gravity/' + gravityFormatter('qiniu', gravity) + '/crop/' + size;
|
||||
}
|
||||
// 质量压缩
|
||||
if (quality > 0 && quality < 100) {
|
||||
|
@ -158,8 +159,8 @@ function append_thumbnail_params(url, params) {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
function gravityFormatMap(type, gravity) {
|
||||
let gravityFormat = {
|
||||
function gravityFormatter(type, gravity) {
|
||||
let gravityFormatMap = {
|
||||
aliyun: {
|
||||
north_west: 'nw', // 左上
|
||||
north: 'north', // 中上
|
||||
|
@ -195,5 +196,5 @@ function gravityFormatMap(type, gravity) {
|
|||
},
|
||||
};
|
||||
|
||||
return gravityFormat[type][gravity];
|
||||
return gravityFormatMap[type][gravity];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue