Commit de24a8d6 by huahua

提交

parent aa2ffcc4
......@@ -32,7 +32,6 @@
v-model="phone" />
</view>
</view>
<!-- 自定义高度 -->
<view style="display: flex;align-items: center; margin-left: 20upx; margin-top: 20upx;">
<view style="width: calc(100% - 70upx); height: 66upx; background: #282932; border-radius: 30upx;
......@@ -58,7 +57,6 @@
@click="showUpdateRule(2)"> </image>
</view>
</view>
<view style="position: relative;">
<!-- 自定义高度 -->
<view style="display: flex; align-items: center; margin-left: 20upx; margin-top: 20upx;">
......@@ -74,7 +72,6 @@
</view>
<!-- 自定义高度 -->
<view style="display: flex; align-items: center; margin-left: 20upx; margin-top: 20upx;">
<!-- <view style="font-size: 28upx; font-weight: 400; color: #FFFFFF;width: 155upx;">高度:</view> -->
<view style="width: calc(100% - 70upx);height: 66upx; background: #282932; border-radius: 30upx;
display: flex; align-items: center;">
<input type="digit" placeholder="请输入宽度" @input="changeHeight" :value="printHeight"
......@@ -86,10 +83,8 @@
@click="showUpdateRule(4)"> </image>
</view>
</view>
<view style="position: relative;">
<view style="display: flex; align-items: center; margin-left: 27upx; margin-top: 25upx;">
<!-- <view style="font-size: 28upx; font-weight: 400; color: #FFFFFF;width: 155upx;">圆角:</view> -->
<view style="width: calc(100% - 70upx); height: 66upx;
display: flex; align-items: center; margin-top: 5upx;">
<!-- 滑块封装 -->
......@@ -586,7 +581,6 @@
}
},
onShow() {
setTimeout(function() {
......
......@@ -110,12 +110,12 @@
</image>
<!-- 旧——手机壳图 -->
<image :animation="translateHide "
<image :animation="translateHide "
:src="data.bgImage + '?x-oss-process=image/resize,lfit,w_400'" mode="" @load="loadbgImage"
@error="loadbgImageError" v-if="!isCustomize"
style="position: absolute;z-index: 10;top: 0px; bottom: 0; left: 0px; right: 0;margin: auto"
:style="{width: (data.editorWidth + 1 ) +'px',height: (data.editorHeight +1) +'px'}">
</image>
</image>
<image :animation="translateHide "
:src="data.bgImage + '?x-oss-process=image/resize,lfit,w_400'" mode="" @load="loadbgImage"
......@@ -136,12 +136,14 @@
@error="loadbgImageError" v-if="!isCustomize"
style="position: absolute;z-index: 13;top: 0px; bottom: 0; left: 0px; right: 0;margin: auto"
:style="{width: (data.editorWidth + 1) +'px',height: (data.editorHeight +1 ) +'px'}">
</image>
</image>
</view>
<!-- 操作列表 ,top: editory +'px' v-if="editory" front_image_long-->
<view v-if="front_image_long" :class="['operate-list', { 'list-active': data.listActive == true }]"
style="z-index: 10;" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px'}">
style="z-index: 10;"
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px'}">
<block v-for="(item,idx) in data.itemList" :key="idx">
<view class='item-box'
:style="{'z-index':item.active == true ? 999:(item.index + 10), transform: 'scale(' + item.scale + ')',top: item.top + 'px',left: item.left + 'px'}">
......@@ -652,7 +654,7 @@
<view
style="position: absolute; bottom: 0upx; left: 116upx; height: 100%; width: 100%;z-index: 8; overflow: hidden; ">
<view style="width: calc(100% - 150upx); height: calc(100% - 180upx); position: relative; overflow: hidden;
border: 5upx solid #61D119; margin-top: 140upx; margin-right: 10upx;">
border: 5upx solid #61D119; margin-top: 140upx; margin-right: 10upx;">
<veiw>
<scroll-view scroll-y
style="width:100%; margin: auto; height:calc(100% - 50upx); overflow: hidden; margin-top: 10upx;">
......@@ -768,7 +770,9 @@
tuya,
isShowPop: false
},
computed: {},
computed: {
},
data() {
return {
collection_currentId: 0, //点赞选中Id
......@@ -968,7 +972,8 @@
};
},
created() { //设备信息
created() {
//设备信息
let app = uni.getSystemInfoSync(); //设备信息
let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); //胶囊信息
this.menuButtonInfoTop = menuButtonInfo.top;
......@@ -1390,33 +1395,34 @@
under_color: '',
content: e, // 图片地址
top: this.editor_top - this.data.editorHeight / 2, // 初始图片Y坐标,根据画布高/2-图片高/2
left: this.data.editorWidth / 2 - this.data.editorWidth / 2, // 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
x: this.data.editorWidth / 2, // 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
left: this.data.editorWidth / 2 - this.data.editorWidth /
2, // 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
x: this.data.editorWidth / 2, // 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
y: this.editor_top,
scale: 1, // 缩放比例 1为不缩放
lastScale: 1, // 上一次的绽放比例
oScale: 1, // 缩放比例 1为不缩放
angle: 0, // 旋转角度
rotate: 0, // 旋转值
scale: 1, // 缩放比例 1为不缩放
lastScale: 1, // 上一次的绽放比例
oScale: 1, // 缩放比例 1为不缩放
angle: 0, // 旋转角度
rotate: 0, // 旋转值
active: false, // 判定点击状态
width: this.data.editorWidth, // 预设生成图片的宽度
width: this.data.editorWidth, // 预设生成图片的宽度
height: this.data.editorHeight, // 预设生成图片的高度
rScale: 1, // 图片原始缩放比例
// 新增加默认属性
activeguide: false, // 开启辅助线
activescale: false, // 开启旋转状态
activehorn: false, // 开启角状态
activeedge: false, // 开启边状态
initialScale: 1, // 图片缩放比例
initialscaling: 1, // 图片初始时缩放比例
initialScalex: 1, // 图片宽缩放比例
initialScaley: 1, // 图片高缩放比例
initialWidth: this.data.editorWidth, // 图片原始宽度
activehorn: false, // 开启角状态
activeedge: false, // 开启边状态
initialScale: 1, // 图片缩放比例
initialscaling: 1, // 图片初始时缩放比例
initialScalex: 1, // 图片宽缩放比例
initialScaley: 1, // 图片高缩放比例
initialWidth: this.data.editorWidth, // 图片原始宽度
initialHeight: this.data.editorHeight, // 图片原始高度
frame_left: null, // 裁剪窗口x
image_left: null, // 图片x
frame_top: null, // 裁剪窗口y
image_top: null, // 图片y
frame_top: null, // 裁剪窗口y
image_top: null, // 图片y
})
this.data.itemList = items
this.saveSnapshot();
......@@ -1500,9 +1506,9 @@
content: result.url, // 贴图地址
top: that.editor_top - height / 2, // 初始图片Y坐标,根据画布高/2-图片高/2
left: that.data.editorWidth / 2 - width /
2, // 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
2, // 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
x: that.data.editorWidth /
2, // 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
2, // 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
y: that.editor_top,
scale: 1, // 缩放比例 1为不缩放
lastScale: 1, // 上一次的绽放比例
......@@ -1681,7 +1687,7 @@
(H1 / H2 *
image
.width - W1
) / 2
) / 2
} else {
item.content =
atter.host +
......@@ -1689,17 +1695,26 @@
.dir + time +
'.jpg'
}
item.type = 0 //0为图片,1为文字,2为素材
if (item.works_id != undefined) {
if (item.works_id > 0) {
_this.data.works_idlenght--
item.material_id = 0
item.original_id = 0
item.works_id = 0
item.type =
0 //0为图片,1为文字,2为素材
if (item.works_id !=
undefined) {
if (item.works_id >
0) {
_this.data
.works_idlenght--
item.material_id =
0
item.original_id =
0
item.works_id =
0
}
} else {
item.original_id = 0
item.material_id = 0
item.original_id =
0
item.material_id =
0
}
}
});
......@@ -1760,7 +1775,7 @@
}
})
},
/* 上传图片拍照 */
addItemFromCamera: async function(e) {
this.showone = false
......@@ -1777,15 +1792,15 @@
var size = res.tempFiles[0].size;
var path = res.tempFiles[0].path;
var formatImage = path.split(".")[(path.split(".")).length - 1];
if (formatImage != "png" &&
formatImage != "jpg" &&
if (formatImage != "png" &&
formatImage != "jpg" &&
formatImage != "jpeg" &&
formatImage != "webp" &&
formatImage != "gif" &&
formatImage != "bmp" &&
formatImage != "gif" &&
formatImage != "bmp" &&
formatImage != "tiff" &&
formatImage != "tif" &&
formatImage != "heic" ) {
formatImage != "tif" &&
formatImage != "heic") {
return uni.showToast({
title: '只能上传.png、.jpg、.jpep、.webp、.gif、. bmp、. tiff、. tif、.heic格式',
icon: 'none',
......@@ -1801,7 +1816,7 @@
}
})
},
/*上传图片从相册 */
addItemFromAlbum: async function(e) {
this.isUpLoadImage = true;
......@@ -1824,7 +1839,7 @@
formatImage != "gif" &&
formatImage != "bmp" &&
formatImage != "tiff" &&
formatImage != "tif" &&
formatImage != "tif" &&
formatImage != "heic"
) {
return uni.showToast({
......@@ -1861,7 +1876,7 @@
formatImage != "gif" &&
formatImage != "bmp" &&
formatImage != "tiff" &&
formatImage != "tif" &&
formatImage != "tif" &&
formatImage != "heic"
) {
return uni.showToast({
......@@ -1903,7 +1918,8 @@
let user_id = userService.getUserInfo().id || 0
var _this = this
wx.request({
url: Env.getDevBaseURL() + '/api/AliossSign/getSign?machine_id=' + machine_id + '&user_id=' + user_id,
url: Env.getDevBaseURL() + '/api/AliossSign/getSign?machine_id=' + machine_id + '&user_id=' +
user_id,
method: 'GET',
data: '',
header: {
......@@ -2184,7 +2200,7 @@
title: weixinres.msg,
icon: 'none'
})
}
}
});
}
}
......@@ -2807,9 +2823,9 @@
content: urlData, // 贴图地址
top: this.editor_top - height / 2, // 初始图片Y坐标,根据画布高/2-图片高/2
left: this.data.editorWidth / 2 - width /
2, // 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
2, // 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
x: this.data.editorWidth /
2, // 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
2, // 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
y: this.editor_top,
scale: 1, // 缩放比例 1为不缩放
lastScale: 1, // 上一次的绽放比例
......@@ -4413,6 +4429,7 @@
s: 'Product.detail',
id: this.data.goods_id
}).then(result => {
console.log(result);
this.queryPage.goods_category_id = result.goods_category_id //星形接口列表增加,产品分类参数
//读取背景图
uni.getImageInfo({
......@@ -4449,6 +4466,10 @@
this.design_heightrate = result.design_height / result.print_height // 设计区放大高度比率
this.data.editorWidth = this.design_width * this.data.pixelRate // 设计宽度
this.data.editorHeight = this.design_height * this.data.pixelRate // 设计高度
console.log("this.data.editorWidth=" + this.data.editorWidth + "&this.data.editorHeight=" +
this.data.editorHeight)
this.center_scale = result.center_scale // 设计区中心点比率
this.location_scale = result.location_scale // 辅助线比率
this.editor_top = this.data.editorHeight * Number(this.location_scale) //辅助线距离
......@@ -5085,52 +5106,36 @@
}
items.push({
support_zoom: item
.support_zoom, // 0是不支持缩放,为1时支持缩放
support_drag: item
.support_drag, // 0是不支持拖动,为1时支持拖动
is_under: item.is_under ? item
.is_under : 0, //贴图是否为背景图
support_zoom: item.support_zoom, // 0是不支持缩放,为1时支持缩放
support_drag: item.support_drag, // 0是不支持拖动,为1时支持拖动
is_under: item.is_under ? item.is_under : 0, //贴图是否为背景图
is_discount: item.is_discount, //贴图是否用卷
idone: item.id,
id: i + 1,
type: item.type.value,
material_id: item.material_id,
works_id: item.works_id ? item
.works_id : null,
works_id: item.works_id ? item.works_id : null,
original_id: item.original_id,
index: item.index,
font_family: item.font_family.replace(
'.ttf', ''),
font_family: item.font_family.replace('.ttf', ''),
font_dict_id: item.font_dict_id,
font_style: item.font_style,
font_size: item.font_size * pixelRate *
that.design_widthrate,
font_size: item.font_size * pixelRate *that.design_widthrate,
font_color: item.font_color,
under_color: item.under_color,
content: item.content, // 图片地址
top: top * pixelRate * that
.design_heightrate,
left: left * pixelRate * that
.design_widthrate,
x: item.center_x * pixelRate * that
.design_widthrate,
y: item.center_y * pixelRate * that
.design_heightrate,
top: top * pixelRate * that.design_heightrate,
left: left * pixelRate * that.design_widthrate,
x: item.center_x * pixelRate * that.design_widthrate,
y: item.center_y * pixelRate * that.design_heightrate,
scale: 1, // 缩放比例 1为不缩放
lastScale: 1, // 上一次的绽放比例
oScale: 1, // 缩放比例 1为不缩放
angle: parseFloat(item
.rotate), // 旋转角度
rotate: parseFloat(item
.rotate), // 旋转值
angle: parseFloat(item.rotate), // 旋转角度
rotate: parseFloat(item.rotate), // 旋转值
active: false, // 判定点击状态
width: item.width *
pixelRate * that
.design_widthrate, // 预设生成图片的宽度
height: item.height *
pixelRate * that
.design_heightrate, // 预设生成图片的高度
width: item.width *pixelRate * that.design_widthrate, // 预设生成图片的宽度
height: item.height * pixelRate * that.design_heightrate, // 预设生成图片的高度
rScale: 1, // 图片原始缩放比例
// 新添加属性
activeguide: false, // 开启辅助线
......@@ -5141,20 +5146,12 @@
initialscaling: 1, // 图片初始时缩放比例
initialScalex: 1, // 图片宽缩放比例
initialScaley: 1, // 图片高缩放比例
initialWidth: item.image_width *
pixelRate * that
.design_widthrate, // 图片原始宽度
initialHeight: item.image_height *
pixelRate * that
.design_heightrate, // 图片原始高度
initialWidth: item.image_width * pixelRate * that.design_widthrate, // 图片原始宽度
initialHeight: item.image_height * pixelRate * that.design_heightrate, // 图片原始高度
frame_left: null, // 裁剪窗口x
image_left: (item.image_left - left) *
pixelRate * that
.design_widthrate, // 图片x
image_left: (item.image_left - left) * pixelRate * that.design_widthrate, // 图片x
frame_top: null, // 裁剪窗口y
image_top: (item.image_top - top) *
pixelRate * that
.design_heightrate, // 图片y
image_top: (item.image_top - top) * pixelRate * that.design_heightrate, // 图片y
});
}
}
......
......@@ -5,8 +5,8 @@ if(!accountInfo.miniProgram.envVersion){
const baseApi = {
//开发版
//develop: "https://kxz.refinecolor.com",
develop: "https://print.kexiaozhan.cn",
develop: "https://kxz.refinecolor.com",
//develop: "https://print.kexiaozhan.cn",
//体验版
trial: "https://kxz.refinecolor.com",
//正式版
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment