Commit de24a8d6 by huahua

提交

parent aa2ffcc4
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
v-model="phone" /> v-model="phone" />
</view> </view>
</view> </view>
<!-- 自定义高度 --> <!-- 自定义高度 -->
<view style="display: flex;align-items: center; margin-left: 20upx; margin-top: 20upx;"> <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; <view style="width: calc(100% - 70upx); height: 66upx; background: #282932; border-radius: 30upx;
...@@ -58,7 +57,6 @@ ...@@ -58,7 +57,6 @@
@click="showUpdateRule(2)"> </image> @click="showUpdateRule(2)"> </image>
</view> </view>
</view> </view>
<view style="position: relative;"> <view style="position: relative;">
<!-- 自定义高度 --> <!-- 自定义高度 -->
<view style="display: flex; align-items: center; margin-left: 20upx; margin-top: 20upx;"> <view style="display: flex; align-items: center; margin-left: 20upx; margin-top: 20upx;">
...@@ -74,7 +72,6 @@ ...@@ -74,7 +72,6 @@
</view> </view>
<!-- 自定义高度 --> <!-- 自定义高度 -->
<view style="display: flex; align-items: center; margin-left: 20upx; margin-top: 20upx;"> <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; <view style="width: calc(100% - 70upx);height: 66upx; background: #282932; border-radius: 30upx;
display: flex; align-items: center;"> display: flex; align-items: center;">
<input type="digit" placeholder="请输入宽度" @input="changeHeight" :value="printHeight" <input type="digit" placeholder="请输入宽度" @input="changeHeight" :value="printHeight"
...@@ -86,10 +83,8 @@ ...@@ -86,10 +83,8 @@
@click="showUpdateRule(4)"> </image> @click="showUpdateRule(4)"> </image>
</view> </view>
</view> </view>
<view style="position: relative;"> <view style="position: relative;">
<view style="display: flex; align-items: center; margin-left: 27upx; margin-top: 25upx;"> <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; <view style="width: calc(100% - 70upx); height: 66upx;
display: flex; align-items: center; margin-top: 5upx;"> display: flex; align-items: center; margin-top: 5upx;">
<!-- 滑块封装 --> <!-- 滑块封装 -->
...@@ -587,7 +582,6 @@ ...@@ -587,7 +582,6 @@
}, },
onShow() { onShow() {
setTimeout(function() { setTimeout(function() {
this.$refs['NumSlider'].init(); this.$refs['NumSlider'].init();
......
...@@ -137,11 +137,13 @@ ...@@ -137,11 +137,13 @@
style="position: absolute;z-index: 13;top: 0px; bottom: 0; left: 0px; right: 0;margin: auto" 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'}"> :style="{width: (data.editorWidth + 1) +'px',height: (data.editorHeight +1 ) +'px'}">
</image> </image>
</view> </view>
<!-- 操作列表 ,top: editory +'px' v-if="editory" front_image_long--> <!-- 操作列表 ,top: editory +'px' v-if="editory" front_image_long-->
<view v-if="front_image_long" :class="['operate-list', { 'list-active': data.listActive == true }]" <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"> <block v-for="(item,idx) in data.itemList" :key="idx">
<view class='item-box' <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'}"> :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 @@ ...@@ -768,7 +770,9 @@
tuya, tuya,
isShowPop: false isShowPop: false
}, },
computed: {}, computed: {
},
data() { data() {
return { return {
collection_currentId: 0, //点赞选中Id collection_currentId: 0, //点赞选中Id
...@@ -968,7 +972,8 @@ ...@@ -968,7 +972,8 @@
}; };
}, },
created() { //设备信息 created() {
//设备信息
let app = uni.getSystemInfoSync(); //设备信息 let app = uni.getSystemInfoSync(); //设备信息
let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); //胶囊信息 let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); //胶囊信息
this.menuButtonInfoTop = menuButtonInfo.top; this.menuButtonInfoTop = menuButtonInfo.top;
...@@ -1390,7 +1395,8 @@ ...@@ -1390,7 +1395,8 @@
under_color: '', under_color: '',
content: e, // 图片地址 content: e, // 图片地址
top: this.editor_top - this.data.editorHeight / 2, // 初始图片Y坐标,根据画布高/2-图片高/2 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之后又宽高和初始的图片位置得出 x: this.data.editorWidth / 2, // 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
y: this.editor_top, y: this.editor_top,
scale: 1, // 缩放比例 1为不缩放 scale: 1, // 缩放比例 1为不缩放
...@@ -1689,17 +1695,26 @@ ...@@ -1689,17 +1695,26 @@
.dir + time + .dir + time +
'.jpg' '.jpg'
} }
item.type = 0 //0为图片,1为文字,2为素材 item.type =
if (item.works_id != undefined) { 0 //0为图片,1为文字,2为素材
if (item.works_id > 0) { if (item.works_id !=
_this.data.works_idlenght-- undefined) {
item.material_id = 0 if (item.works_id >
item.original_id = 0 0) {
item.works_id = 0 _this.data
.works_idlenght--
item.material_id =
0
item.original_id =
0
item.works_id =
0
} }
} else { } else {
item.original_id = 0 item.original_id =
item.material_id = 0 0
item.material_id =
0
} }
} }
}); });
...@@ -1785,7 +1800,7 @@ ...@@ -1785,7 +1800,7 @@
formatImage != "bmp" && formatImage != "bmp" &&
formatImage != "tiff" && formatImage != "tiff" &&
formatImage != "tif" && formatImage != "tif" &&
formatImage != "heic" ) { formatImage != "heic") {
return uni.showToast({ return uni.showToast({
title: '只能上传.png、.jpg、.jpep、.webp、.gif、. bmp、. tiff、. tif、.heic格式', title: '只能上传.png、.jpg、.jpep、.webp、.gif、. bmp、. tiff、. tif、.heic格式',
icon: 'none', icon: 'none',
...@@ -1903,7 +1918,8 @@ ...@@ -1903,7 +1918,8 @@
let user_id = userService.getUserInfo().id || 0 let user_id = userService.getUserInfo().id || 0
var _this = this var _this = this
wx.request({ 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', method: 'GET',
data: '', data: '',
header: { header: {
...@@ -4413,6 +4429,7 @@ ...@@ -4413,6 +4429,7 @@
s: 'Product.detail', s: 'Product.detail',
id: this.data.goods_id id: this.data.goods_id
}).then(result => { }).then(result => {
console.log(result);
this.queryPage.goods_category_id = result.goods_category_id //星形接口列表增加,产品分类参数 this.queryPage.goods_category_id = result.goods_category_id //星形接口列表增加,产品分类参数
//读取背景图 //读取背景图
uni.getImageInfo({ uni.getImageInfo({
...@@ -4449,6 +4466,10 @@ ...@@ -4449,6 +4466,10 @@
this.design_heightrate = result.design_height / result.print_height // 设计区放大高度比率 this.design_heightrate = result.design_height / result.print_height // 设计区放大高度比率
this.data.editorWidth = this.design_width * this.data.pixelRate // 设计宽度 this.data.editorWidth = this.design_width * this.data.pixelRate // 设计宽度
this.data.editorHeight = this.design_height * 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.center_scale = result.center_scale // 设计区中心点比率
this.location_scale = result.location_scale // 辅助线比率 this.location_scale = result.location_scale // 辅助线比率
this.editor_top = this.data.editorHeight * Number(this.location_scale) //辅助线距离 this.editor_top = this.data.editorHeight * Number(this.location_scale) //辅助线距离
...@@ -5085,52 +5106,36 @@ ...@@ -5085,52 +5106,36 @@
} }
items.push({ items.push({
support_zoom: item support_zoom: item.support_zoom, // 0是不支持缩放,为1时支持缩放
.support_zoom, // 0是不支持缩放,为1时支持缩放 support_drag: item.support_drag, // 0是不支持拖动,为1时支持拖动
support_drag: item is_under: item.is_under ? item.is_under : 0, //贴图是否为背景图
.support_drag, // 0是不支持拖动,为1时支持拖动
is_under: item.is_under ? item
.is_under : 0, //贴图是否为背景图
is_discount: item.is_discount, //贴图是否用卷 is_discount: item.is_discount, //贴图是否用卷
idone: item.id, idone: item.id,
id: i + 1, id: i + 1,
type: item.type.value, type: item.type.value,
material_id: item.material_id, material_id: item.material_id,
works_id: item.works_id ? item works_id: item.works_id ? item.works_id : null,
.works_id : null,
original_id: item.original_id, original_id: item.original_id,
index: item.index, index: item.index,
font_family: item.font_family.replace( font_family: item.font_family.replace('.ttf', ''),
'.ttf', ''),
font_dict_id: item.font_dict_id, font_dict_id: item.font_dict_id,
font_style: item.font_style, font_style: item.font_style,
font_size: item.font_size * pixelRate * font_size: item.font_size * pixelRate *that.design_widthrate,
that.design_widthrate,
font_color: item.font_color, font_color: item.font_color,
under_color: item.under_color, under_color: item.under_color,
content: item.content, // 图片地址 content: item.content, // 图片地址
top: top * pixelRate * that top: top * pixelRate * that.design_heightrate,
.design_heightrate, left: left * pixelRate * that.design_widthrate,
left: left * pixelRate * that x: item.center_x * pixelRate * that.design_widthrate,
.design_widthrate, y: item.center_y * pixelRate * that.design_heightrate,
x: item.center_x * pixelRate * that
.design_widthrate,
y: item.center_y * pixelRate * that
.design_heightrate,
scale: 1, // 缩放比例 1为不缩放 scale: 1, // 缩放比例 1为不缩放
lastScale: 1, // 上一次的绽放比例 lastScale: 1, // 上一次的绽放比例
oScale: 1, // 缩放比例 1为不缩放 oScale: 1, // 缩放比例 1为不缩放
angle: parseFloat(item angle: parseFloat(item.rotate), // 旋转角度
.rotate), // 旋转角度 rotate: parseFloat(item.rotate), // 旋转值
rotate: parseFloat(item
.rotate), // 旋转值
active: false, // 判定点击状态 active: false, // 判定点击状态
width: item.width * width: item.width *pixelRate * that.design_widthrate, // 预设生成图片的宽度
pixelRate * that height: item.height * pixelRate * that.design_heightrate, // 预设生成图片的高度
.design_widthrate, // 预设生成图片的宽度
height: item.height *
pixelRate * that
.design_heightrate, // 预设生成图片的高度
rScale: 1, // 图片原始缩放比例 rScale: 1, // 图片原始缩放比例
// 新添加属性 // 新添加属性
activeguide: false, // 开启辅助线 activeguide: false, // 开启辅助线
...@@ -5141,20 +5146,12 @@ ...@@ -5141,20 +5146,12 @@
initialscaling: 1, // 图片初始时缩放比例 initialscaling: 1, // 图片初始时缩放比例
initialScalex: 1, // 图片宽缩放比例 initialScalex: 1, // 图片宽缩放比例
initialScaley: 1, // 图片高缩放比例 initialScaley: 1, // 图片高缩放比例
initialWidth: item.image_width * initialWidth: item.image_width * pixelRate * that.design_widthrate, // 图片原始宽度
pixelRate * that initialHeight: item.image_height * pixelRate * that.design_heightrate, // 图片原始高度
.design_widthrate, // 图片原始宽度
initialHeight: item.image_height *
pixelRate * that
.design_heightrate, // 图片原始高度
frame_left: null, // 裁剪窗口x frame_left: null, // 裁剪窗口x
image_left: (item.image_left - left) * image_left: (item.image_left - left) * pixelRate * that.design_widthrate, // 图片x
pixelRate * that
.design_widthrate, // 图片x
frame_top: null, // 裁剪窗口y frame_top: null, // 裁剪窗口y
image_top: (item.image_top - top) * image_top: (item.image_top - top) * pixelRate * that.design_heightrate, // 图片y
pixelRate * that
.design_heightrate, // 图片y
}); });
} }
} }
......
...@@ -5,8 +5,8 @@ if(!accountInfo.miniProgram.envVersion){ ...@@ -5,8 +5,8 @@ if(!accountInfo.miniProgram.envVersion){
const baseApi = { const baseApi = {
//开发版 //开发版
//develop: "https://kxz.refinecolor.com", develop: "https://kxz.refinecolor.com",
develop: "https://print.kexiaozhan.cn", //develop: "https://print.kexiaozhan.cn",
//体验版 //体验版
trial: "https://kxz.refinecolor.com", 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