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;">
<!-- 滑块封装 -->
......@@ -587,7 +582,6 @@
},
onShow() {
setTimeout(function() {
this.$refs['NumSlider'].init();
......
......@@ -137,11 +137,13 @@
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>
</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'}">
......@@ -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,7 +1395,8 @@
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是相对定位,所以计算是要多减一次移动的距离
left: this.data.editorWidth / 2 - this.data.editorWidth /
2, // 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
x: this.data.editorWidth / 2, // 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
y: this.editor_top,
scale: 1, // 缩放比例 1为不缩放
......@@ -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
}
}
});
......@@ -1785,7 +1800,7 @@
formatImage != "bmp" &&
formatImage != "tiff" &&
formatImage != "tif" &&
formatImage != "heic" ) {
formatImage != "heic") {
return uni.showToast({
title: '只能上传.png、.jpg、.jpep、.webp、.gif、. bmp、. tiff、. tif、.heic格式',
icon: 'none',
......@@ -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: {
......@@ -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