Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kxz-app-phone
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huahua
kxz-app-phone
Commits
de24a8d6
Commit
de24a8d6
authored
Apr 30, 2025
by
huahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
aa2ffcc4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
100 deletions
+91
-100
pages/index/custom-size.vue
+0
-6
pages/index/index.vue
+89
-92
util/Env.js
+2
-2
No files found.
pages/index/custom-size.vue
View file @
de24a8d6
...
@@ -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;"
>
<!-- 滑块封装 -->
<!-- 滑块封装 -->
...
@@ -586,7 +581,6 @@
...
@@ -586,7 +581,6 @@
}
}
},
},
onShow
()
{
onShow
()
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
...
...
pages/index/index.vue
View file @
de24a8d6
...
@@ -110,12 +110,12 @@
...
@@ -110,12 +110,12 @@
</image>
</image>
<!-- 旧——手机壳图 -->
<!-- 旧——手机壳图 -->
<image
:animation=
"translateHide "
<image
:animation=
"translateHide "
:src=
"data.bgImage + '?x-oss-process=image/resize,lfit,w_400'"
mode=
""
@
load=
"loadbgImage"
:src=
"data.bgImage + '?x-oss-process=image/resize,lfit,w_400'"
mode=
""
@
load=
"loadbgImage"
@
error=
"loadbgImageError"
v-if=
"!isCustomize"
@
error=
"loadbgImageError"
v-if=
"!isCustomize"
style=
"position: absolute;z-index: 10;top: 0px; bottom: 0; left: 0px; right: 0;margin: auto"
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'}">
:style=
"
{width: (data.editorWidth + 1 ) +'px',height: (data.editorHeight +1) +'px'}">
</image>
</image>
<image
:animation=
"translateHide "
<image
:animation=
"translateHide "
:src=
"data.bgImage + '?x-oss-process=image/resize,lfit,w_400'"
mode=
""
@
load=
"loadbgImage"
:src=
"data.bgImage + '?x-oss-process=image/resize,lfit,w_400'"
mode=
""
@
load=
"loadbgImage"
...
@@ -136,12 +136,14 @@
...
@@ -136,12 +136,14 @@
@
error=
"loadbgImageError"
v-if=
"!isCustomize"
@
error=
"loadbgImageError"
v-if=
"!isCustomize"
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'}">
...
@@ -652,7 +654,7 @@
...
@@ -652,7 +654,7 @@
<view
<view
style=
"position: absolute; bottom: 0upx; left: 116upx; height: 100%; width: 100%;z-index: 8; overflow: hidden; "
>
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;
<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>
<veiw>
<scroll-view
scroll-y
<scroll-view
scroll-y
style=
"width:100%; margin: auto; height:calc(100% - 50upx); overflow: hidden; margin-top: 10upx;"
>
style=
"width:100%; margin: auto; height:calc(100% - 50upx); overflow: hidden; margin-top: 10upx;"
>
...
@@ -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,33 +1395,34 @@
...
@@ -1390,33 +1395,34 @@
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
/
x
:
this
.
data
.
editorWidth
/
2
,
// 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
2
,
// 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
x
:
this
.
data
.
editorWidth
/
2
,
// 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
y
:
this
.
editor_top
,
y
:
this
.
editor_top
,
scale
:
1
,
// 缩放比例 1为不缩放
scale
:
1
,
// 缩放比例 1为不缩放
lastScale
:
1
,
// 上一次的绽放比例
lastScale
:
1
,
// 上一次的绽放比例
oScale
:
1
,
// 缩放比例 1为不缩放
oScale
:
1
,
// 缩放比例 1为不缩放
angle
:
0
,
// 旋转角度
angle
:
0
,
// 旋转角度
rotate
:
0
,
// 旋转值
rotate
:
0
,
// 旋转值
active
:
false
,
// 判定点击状态
active
:
false
,
// 判定点击状态
width
:
this
.
data
.
editorWidth
,
// 预设生成图片的宽度
width
:
this
.
data
.
editorWidth
,
// 预设生成图片的宽度
height
:
this
.
data
.
editorHeight
,
// 预设生成图片的高度
height
:
this
.
data
.
editorHeight
,
// 预设生成图片的高度
rScale
:
1
,
// 图片原始缩放比例
rScale
:
1
,
// 图片原始缩放比例
// 新增加默认属性
// 新增加默认属性
activeguide
:
false
,
// 开启辅助线
activeguide
:
false
,
// 开启辅助线
activescale
:
false
,
// 开启旋转状态
activescale
:
false
,
// 开启旋转状态
activehorn
:
false
,
// 开启角状态
activehorn
:
false
,
// 开启角状态
activeedge
:
false
,
// 开启边状态
activeedge
:
false
,
// 开启边状态
initialScale
:
1
,
// 图片缩放比例
initialScale
:
1
,
// 图片缩放比例
initialscaling
:
1
,
// 图片初始时缩放比例
initialscaling
:
1
,
// 图片初始时缩放比例
initialScalex
:
1
,
// 图片宽缩放比例
initialScalex
:
1
,
// 图片宽缩放比例
initialScaley
:
1
,
// 图片高缩放比例
initialScaley
:
1
,
// 图片高缩放比例
initialWidth
:
this
.
data
.
editorWidth
,
// 图片原始宽度
initialWidth
:
this
.
data
.
editorWidth
,
// 图片原始宽度
initialHeight
:
this
.
data
.
editorHeight
,
// 图片原始高度
initialHeight
:
this
.
data
.
editorHeight
,
// 图片原始高度
frame_left
:
null
,
// 裁剪窗口x
frame_left
:
null
,
// 裁剪窗口x
image_left
:
null
,
// 图片x
image_left
:
null
,
// 图片x
frame_top
:
null
,
// 裁剪窗口y
frame_top
:
null
,
// 裁剪窗口y
image_top
:
null
,
// 图片y
image_top
:
null
,
// 图片y
})
})
this
.
data
.
itemList
=
items
this
.
data
.
itemList
=
items
this
.
saveSnapshot
();
this
.
saveSnapshot
();
...
@@ -1500,9 +1506,9 @@
...
@@ -1500,9 +1506,9 @@
content
:
result
.
url
,
// 贴图地址
content
:
result
.
url
,
// 贴图地址
top
:
that
.
editor_top
-
height
/
2
,
// 初始图片Y坐标,根据画布高/2-图片高/2
top
:
that
.
editor_top
-
height
/
2
,
// 初始图片Y坐标,根据画布高/2-图片高/2
left
:
that
.
data
.
editorWidth
/
2
-
width
/
left
:
that
.
data
.
editorWidth
/
2
-
width
/
2
,
// 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
2
,
// 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
x
:
that
.
data
.
editorWidth
/
x
:
that
.
data
.
editorWidth
/
2
,
// 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
2
,
// 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
y
:
that
.
editor_top
,
y
:
that
.
editor_top
,
scale
:
1
,
// 缩放比例 1为不缩放
scale
:
1
,
// 缩放比例 1为不缩放
lastScale
:
1
,
// 上一次的绽放比例
lastScale
:
1
,
// 上一次的绽放比例
...
@@ -1681,7 +1687,7 @@
...
@@ -1681,7 +1687,7 @@
(
H1
/
H2
*
(
H1
/
H2
*
image
image
.
width
-
W1
.
width
-
W1
)
/
2
)
/
2
}
else
{
}
else
{
item
.
content
=
item
.
content
=
atter
.
host
+
atter
.
host
+
...
@@ -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
}
}
}
}
});
});
...
@@ -1760,7 +1775,7 @@
...
@@ -1760,7 +1775,7 @@
}
}
})
})
},
},
/* 上传图片拍照 */
/* 上传图片拍照 */
addItemFromCamera
:
async
function
(
e
)
{
addItemFromCamera
:
async
function
(
e
)
{
this
.
showone
=
false
this
.
showone
=
false
...
@@ -1777,15 +1792,15 @@
...
@@ -1777,15 +1792,15 @@
var
size
=
res
.
tempFiles
[
0
].
size
;
var
size
=
res
.
tempFiles
[
0
].
size
;
var
path
=
res
.
tempFiles
[
0
].
path
;
var
path
=
res
.
tempFiles
[
0
].
path
;
var
formatImage
=
path
.
split
(
"."
)[(
path
.
split
(
"."
)).
length
-
1
];
var
formatImage
=
path
.
split
(
"."
)[(
path
.
split
(
"."
)).
length
-
1
];
if
(
formatImage
!=
"png"
&&
if
(
formatImage
!=
"png"
&&
formatImage
!=
"jpg"
&&
formatImage
!=
"jpg"
&&
formatImage
!=
"jpeg"
&&
formatImage
!=
"jpeg"
&&
formatImage
!=
"webp"
&&
formatImage
!=
"webp"
&&
formatImage
!=
"gif"
&&
formatImage
!=
"gif"
&&
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'
,
...
@@ -1801,7 +1816,7 @@
...
@@ -1801,7 +1816,7 @@
}
}
})
})
},
},
/*上传图片从相册 */
/*上传图片从相册 */
addItemFromAlbum
:
async
function
(
e
)
{
addItemFromAlbum
:
async
function
(
e
)
{
this
.
isUpLoadImage
=
true
;
this
.
isUpLoadImage
=
true
;
...
@@ -1824,7 +1839,7 @@
...
@@ -1824,7 +1839,7 @@
formatImage
!=
"gif"
&&
formatImage
!=
"gif"
&&
formatImage
!=
"bmp"
&&
formatImage
!=
"bmp"
&&
formatImage
!=
"tiff"
&&
formatImage
!=
"tiff"
&&
formatImage
!=
"tif"
&&
formatImage
!=
"tif"
&&
formatImage
!=
"heic"
formatImage
!=
"heic"
)
{
)
{
return
uni
.
showToast
({
return
uni
.
showToast
({
...
@@ -1861,7 +1876,7 @@
...
@@ -1861,7 +1876,7 @@
formatImage
!=
"gif"
&&
formatImage
!=
"gif"
&&
formatImage
!=
"bmp"
&&
formatImage
!=
"bmp"
&&
formatImage
!=
"tiff"
&&
formatImage
!=
"tiff"
&&
formatImage
!=
"tif"
&&
formatImage
!=
"tif"
&&
formatImage
!=
"heic"
formatImage
!=
"heic"
)
{
)
{
return
uni
.
showToast
({
return
uni
.
showToast
({
...
@@ -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
:
{
...
@@ -2184,7 +2200,7 @@
...
@@ -2184,7 +2200,7 @@
title
:
weixinres
.
msg
,
title
:
weixinres
.
msg
,
icon
:
'none'
icon
:
'none'
})
})
}
}
});
});
}
}
}
}
...
@@ -2807,9 +2823,9 @@
...
@@ -2807,9 +2823,9 @@
content
:
urlData
,
// 贴图地址
content
:
urlData
,
// 贴图地址
top
:
this
.
editor_top
-
height
/
2
,
// 初始图片Y坐标,根据画布高/2-图片高/2
top
:
this
.
editor_top
-
height
/
2
,
// 初始图片Y坐标,根据画布高/2-图片高/2
left
:
this
.
data
.
editorWidth
/
2
-
width
/
left
:
this
.
data
.
editorWidth
/
2
-
width
/
2
,
// 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
2
,
// 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
x
:
this
.
data
.
editorWidth
/
x
:
this
.
data
.
editorWidth
/
2
,
// 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
2
,
// 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
y
:
this
.
editor_top
,
y
:
this
.
editor_top
,
scale
:
1
,
// 缩放比例 1为不缩放
scale
:
1
,
// 缩放比例 1为不缩放
lastScale
:
1
,
// 上一次的绽放比例
lastScale
:
1
,
// 上一次的绽放比例
...
@@ -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
});
});
}
}
}
}
...
...
util/Env.js
View file @
de24a8d6
...
@@ -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"
,
//正式版
//正式版
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment