Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wechat_baking
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
wechat_baking
Commits
eb4ebd13
Commit
eb4ebd13
authored
Jan 23, 2025
by
huahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
15df9d8e
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
209 additions
and
145 deletions
+209
-145
App.vue
+2
-2
pages/index/index.vue
+49
-20
pages/index/index_diy.vue
+36
-60
pages/index/machineDetail.vue
+80
-8
pages/index/shapeScrollView.vue
+1
-1
pages/index/textsettings.vue
+27
-24
pages/mall/lineUp.vue
+1
-25
util/Env.js
+5
-5
util/script.js
+8
-0
No files found.
App.vue
View file @
eb4ebd13
...
...
@@ -8,7 +8,7 @@
},
onLaunch
:
function
()
{
//字体列表
homeservice
.
queryList
({
/*
homeservice.queryList({
s: 'Material.fontFamilyList'
}).then(result => {
result.forEach(item=>{
...
...
@@ -58,7 +58,7 @@
})
}).catch(err => {
});
});
*/
},
onShow
:
function
()
{
//调用监听网络状态的方法
...
...
pages/index/index.vue
View file @
eb4ebd13
...
...
@@ -45,7 +45,7 @@
<view
class=
'item-box-in'
style=
"text-align: center;"
:style=
"
{transform: 'rotate(' + item.angle + 'deg)', width: item.width + 'px',height: item.height + 'px',
'line-height': item.height + 'px', 'background-color': item.under_color}">
<view
:id=
"'item-text-' + idx "
class=
"item-text"
style=
"margin:auto;white-space:
nowrap
;display:table;"
style=
"margin:auto;white-space:
pre
;display:table;"
:style=
"
{'font-family': item.font_family,'font-weight': item.font_style,'font-size': item.font_size + 'px', color:item.font_color,'background-color': item.under_color}">
{{
item
.
content
}}
</view>
...
...
@@ -205,7 +205,7 @@
<view
id=
"item-text"
class=
"item-text"
:style=
"
{'font-weight': data.itemList[data.cidx].font_style ,
'font-size': data.itemList[data.cidx].font_size+ 'px',color:data.itemList[data.cidx].font_color,
'background-color': data.itemList[data.cidx].under_color,'font-family': data.itemList[data.cidx].font_family }"
style="margin:auto;white-space:
nowrap
;display:table;">
{{
data
.
itemList
[
data
.
cidx
].
content
}}
style="margin:auto;white-space:
pre
;display:table;">
{{
data
.
itemList
[
data
.
cidx
].
content
}}
</view>
</view>
<image
:src=
"upLoadImageUrl"
mode=
"scaleToFill"
@
load=
"upLoadIImageLoad"
@
error=
"upLoadIImageLoadErr"
></image>
...
...
@@ -292,9 +292,9 @@
<image
class=
"tool_li_img"
src=
"../../static/icon_make_diy_uplaod_image.png"
mode=
""
></image>
<view
class=
"tool_li_text"
>
背景底色
</view>
</view>
<view
class=
"tool_li"
@
click=
"showone = !showone"
v-if=
" is_photo == 1"
>
<view
class=
"tool_li"
@
click=
"showone = !showone"
v-if=
" is_photo == 1"
style=
"margin-bottom: 20upx;"
>
<image
@
click=
"cancel('share')"
class=
"tool_li_img"
src=
"../../static/icon_make_diy_back_color.png"
mode=
""
></image>
src=
"../../static/icon_make_diy_back_color.png"
mode=
""
style=
"width: 74upx; height: 70upx;"
></image>
<view
@
click=
"cancel()"
class=
"tool_li_text"
>
上传相片
</view>
</view>
<view
class=
"tool_li"
@
click=
"showPopup(3)"
v-if=
"is_photo == 1"
>
...
...
@@ -395,7 +395,7 @@
</view>
<!-- 替换选项 -->
<!-- 字体 -->
<uni-popup
ref=
"textsettingsshare"
type=
"bottom"
@
change=
"change"
style=
"position: fixed; z-index: 9999;"
>
<view
class=
"uni-share"
style=
"width: 100%; height: 600upx;background: #292933;"
v-if=
"e_active == 3 || e_active == 4"
>
...
...
@@ -408,14 +408,14 @@
<!-- 文本,贴图,相框 1模板 2贴图 3字体 4编辑 22添加相框 -->
<uni-popup
ref=
"showshare"
:type=
"type"
@
change=
"change"
style=
"position: relative; z-index: 999
9
; width: 100%;"
:style=
"
{height: data.windowHeight +'px'}">
style=
"position: relative; z-index: 999
8
; width: 100%;"
:style=
"
{height: data.windowHeight +'px'}">
<!-- 文本 -->
<view
class=
"uni-share full-width"
:style=
"
{height: data.windowHeight +'px'}"
<view
class=
"uni-share full-width"
:style=
"
{height: data.windowHeight +'px'}"
style="z-index: 9999;"
v-if="e_active == 3 || e_active == 4">
<view
style=
"position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 99
95
; opacity: 0.8;"
style=
"position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 99
7
; opacity: 0.8;"
@
click=
"cancel('share')"
></view>
<view
style=
"position: fixed; bottom: 0; left: 0; width: 100%; height: 2
5%; z-index: 9996
;"
>
<view
style=
"position: fixed; bottom: 0; left: 0; width: 100%; height: 2
0%; z-index: 999
;"
>
<textsettings
@
textInput=
'textInput'
@
cancel=
"cancel"
@
workcolor=
"workcolor"
@
workweight=
"workweight"
@
bgtextcolor=
"bgtextcolor"
@
typefaceClick=
"typefaceClick"
@
typefaceshow=
"typefaceshow"
ref=
"textsettings"
>
...
...
@@ -423,6 +423,7 @@
</view>
</view>
<!-- 贴图/模板形状 -->
<view
v-if=
"e_active == 2 || e_active == 23 || e_active == 99 || e_active == 24"
class=
"uni-share full-width"
:style=
"
{height: data.windowHeight +'px'}">
...
...
@@ -523,7 +524,7 @@
<!-- Ai转换 -->
<uni-popup
ref=
"showAiChange"
type=
"center"
style=
"position: fixed; z-index: 9999; "
>
<view
style=
"height: 95
0upx;border-radius:20upx; background: #fff;width: 600upx;"
>
<view
style=
"height: 100
0upx;border-radius:20upx; background: #fff;width: 600upx;"
>
<image
src=
"../../static/img/icon_close_image.png"
style=
"width: 30upx;
padding: 30upx;
position: absolute;
...
...
@@ -531,7 +532,7 @@
top:0;
z-index: 999;"
mode=
"widthFix"
@
click=
"showAiChangeClose()"
>
</image>
<view
style=
"height: 36
0upx; padding-top: 80upx;width: 100%;
<view
style=
"height: 24
0upx; padding-top: 80upx;width: 100%;
align-items: center;
display: flex;
flex-direction: row;
...
...
@@ -539,17 +540,17 @@
<view
style=
"align-items: center;"
>
<image
style=
"width:160upx;height:160upx;"
src=
"../../static/icon_diy_anime_style.png"
@
click=
"showAiChangeType(1)"
></image>
<view
style=
"width:160upx;height:160upx;text-align: center;line-height: 16
0upx;"
>
动漫风格
<view
style=
"width:160upx;height:130upx;text-align: center;line-height: 13
0upx;"
>
动漫风格
</view>
</view>
<view
style=
"align-items: center;margin-left: 100upx;"
>
<image
style=
"width:160upx;height:160upx; "
src=
"../../static/icon_diy_sketch_style.png"
@
click=
"showAiChangeType(2)"
></image>
<view
style=
"width:160upx;height:160upx;text-align: center;line-height: 16
0upx;"
>
素描风格
<view
style=
"width:160upx;height:130upx;text-align: center;line-height: 13
0upx;"
>
素描风格
</view>
</view>
</view>
<view
style=
"height: 36
0upx; padding-top: 40upx;width: 100%;
<view
style=
"height: 24
0upx; padding-top: 40upx;width: 100%;
align-items: center;
display: flex;
flex-direction: row;
...
...
@@ -557,15 +558,30 @@
<view
style=
"align-items: center;margin-left: 20upx;"
>
<image
style=
"width:160upx;height:160upx; "
src=
"../../static/icon_diy_matting_style.png"
@
click=
"showAiChangeType(3)"
></image>
<view
style=
"width:160upx;height:160upx;text-align: center;line-height: 16
0upx;"
>
人像抠图
</view>
<view
style=
"width:160upx;height:130upx;text-align: center;line-height: 13
0upx;"
>
人像抠图
</view>
</view>
<view
style=
"align-items: center;margin-left: 100upx;"
>
<image
style=
"width:160upx;height:160upx; "
src=
"../../static/icon_diy_enhance_style.png"
@
click=
"showAiChangeType(4)"
></image>
<view
style=
"width:160upx;height:160upx;text-align: center;line-height: 16
0upx;"
>
色彩增强
</view>
<view
style=
"width:160upx;height:130upx;text-align: center;line-height: 13
0upx;"
>
色彩增强
</view>
</view>
</view>
<view
style=
"font-size: 30upx;color:#333; width:100%;text-align: center;margin: auto;"
>
选中的图片必须带有清晰人物头像
</view>
<view
style=
"height: 240upx; padding-top: 40upx;width: 100%;
align-items: center;
display: flex;
flex-direction: row;
justify-content: center;"
>
<view
style=
"align-items: center;margin-left: 20upx; width: 50%;"
>
<image
style=
"width:160upx;height:160upx; margin: auto;"
src=
"../../static/icon_diy_matting_style.png"
@
click=
"showAiChangeType(5)"
></image>
<view
style=
"height:130upx;text-align: center;line-height: 130upx;"
>
色彩超分
</view>
</view>
<view
style=
"align-items: center;margin-left: 20upx; width: 50%;"
>
</view>
</view>
<view
style=
"font-size: 30upx;color:#333; width:100%;text-align: center;margin: auto;"
>
选中的图片必须带有清晰人物头像
</view>
</view>
</uni-popup>
...
...
@@ -1170,7 +1186,15 @@
});
}
else
{
if
(
result
.
Data
)
{
let
imageURL
=
result
.
Data
.
ImageURL
;
//let imageURL = result.Data.ImageURL;
let
imageURL
;
if
(
that
.
selectChangeType
==
5
)
{
imageURL
=
result
.
Data
.
Url
;
}
else
{
imageURL
=
result
.
Data
.
ImageURL
;
}
imageURL
=
imageURL
.
replace
(
"http:"
,
"https:"
)
if
(
!
item
.
isChangeAi
)
{
...
...
@@ -2374,7 +2398,7 @@
src
:
urlData
,
success
:
(
image
)
=>
{
if
(
this
.
e_active
==
23
)
{
//
清空历史记录
//清空历史记录
items
=
[];
// 当前显示的图片列表
index
=
0
;
// 所点击的图片的索引
snapshot
=
[];
// 操作历史记录清空
...
...
@@ -2725,6 +2749,8 @@
}
else
if
(
e
==
2
)
{
//贴图
this
.
category
(
2
);
}
else
if
(
e
==
3
)
{
//文本
index
=
null
this
.
addtext
=
true
...
...
@@ -2865,6 +2891,9 @@
bgtextcolor
()
{
this
.
bg_text_color
=
!
this
.
bg_text_color
console
.
log
(
this
.
data
)
console
.
log
(
this
.
bg_text_color
)
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'textsettings'
].
open
({
data
:
this
.
data
,
...
...
@@ -2878,7 +2907,7 @@
// 获取当前选中的部件
var
item
=
items
[
index
];
if
(
item
!=
undefined
&&
item
.
type
==
1
)
{
item
.
font_family
=
typeface
.
key
item
.
font_family
=
typeface
.
title
item
.
font_dict_id
=
typeface
.
id
this
.
data
.
itemList
=
items
await
this
.
setData
({
...
...
pages/index/index_diy.vue
View file @
eb4ebd13
...
...
@@ -584,6 +584,7 @@
</textsettings>
</view>
</view>
<!-- 贴图、模板形状 -->
<view
v-else-if=
"e_active == 2 || e_active == 23 || e_active == 99 || e_active == 24 "
class=
"uni-share full-width"
:style=
"
{height: data.windowHeight +'px'}">
...
...
@@ -4291,6 +4292,8 @@
},
bgtextcolor
()
{
this
.
bg_text_color
=
!
this
.
bg_text_color
console
.
log
(
this
.
data
)
console
.
log
(
this
.
bg_text_color
)
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'textsettings'
].
open
({
data
:
this
.
data
,
...
...
@@ -4303,7 +4306,7 @@
// 获取当前选中的部件
var
item
=
items
[
index
];
if
(
item
!=
undefined
&&
item
.
type
==
1
)
{
item
.
font_family
=
typeface
.
key
item
.
font_family
=
typeface
.
title
item
.
font_dict_id
=
typeface
.
id
// 字体行高变化
if
(
typeface
.
title
==
'思源黑体'
)
{
...
...
@@ -4828,38 +4831,32 @@
this
.
saveSnapshot
();
},
//
部件缩放开始事件
//部件缩放开始事件
scaleStart
(
e
,
type
)
{
this
.
itemClick
(
e
);
// 点击选中部件
var
item
=
items
[
index
];
// 获取当前选中的部件
if
(
item
.
support_zoom
==
0
)
return
;
// 0不支持缩放,1时支持缩放
item
.
typetext
=
type
//获取作为移动前角度的坐标
item
.
touchX
=
e
.
touches
[
0
].
clientX
;
item
.
touchY
=
e
.
touches
[
0
].
clientY
;
item
.
edgestartX
=
e
.
touches
[
0
].
clientX
;
// 获取鼠标按下时光标x的值
item
.
edgestartY
=
e
.
touches
[
0
].
clientY
;
// 获取鼠标按下时光标Y的值
//获取图片半径
item
.
r
=
this
.
computeDistance
(
item
.
x
,
item
.
y
,
item
.
left
,
item
.
top
);
//
记录坐标
//记录坐标
item
.
scaleone
=
item
.
width
/
item
.
height
item
.
initCenterPos
=
item
.
centerPos
//
获取编辑框的左边距和上边距
//获取编辑框的左边距和上边距
var
mLeft
=
this
.
getLeft
();
var
mTop
=
this
.
getTop
();
item
.
mLeft
=
mLeft
item
.
mTop
=
mTop
drag
.
recordPressDownData
(
item
);
//赋值
this
.
data
.
listActive
=
true
},
//记录旋转后坐标点
rotatedPoint
(
rect
,
rotate
,
point
)
{
const
{
...
...
@@ -4878,10 +4875,8 @@
x
-=
originX
y
-=
originY
return
{
x
:
Math
.
floor
((
x
*
cos
-
y
*
sin
+
originX
)
*
10000
)
/
10000
,
y
:
Math
.
floor
((
x
*
sin
+
y
*
cos
+
originY
)
*
10000
)
/
10000
,
x
:
Math
.
floor
((
x
*
cos
-
y
*
sin
+
originX
)
*
10000
)
/
10000
,
y
:
Math
.
floor
((
x
*
sin
+
y
*
cos
+
originY
)
*
10000
)
/
10000
,
}
},
...
...
@@ -4889,7 +4884,7 @@
rotateStart
(
e
)
{
//点击选中部件
this
.
itemClick
(
e
);
//
获取当前选中的部件
//获取当前选中的部件
var
item
=
items
[
index
];
item
.
typetext
=
'rotate'
;
//记录中心位置
...
...
@@ -4902,24 +4897,22 @@
//获取作为移动前角度的坐标
item
.
touchX
=
e
.
touches
[
0
].
clientX
;
item
.
touchY
=
e
.
touches
[
0
].
clientY
;
//
获取编辑框的左边距和上边距
//获取编辑框的左边距和上边距
var
mLeft
=
this
.
getLeft
();
var
mTop
=
this
.
getTop
();
//移动前的角度
item
.
anglePre
=
this
.
computeAngle
(
item
.
x
,
item
.
y
,
item
.
touchX
-
mLeft
,
item
.
touchY
-
mTop
);
item
.
anglePre
=
this
.
computeAngle
(
item
.
x
,
item
.
y
,
item
.
touchX
-
mLeft
,
item
.
touchY
-
mTop
);
//获取图片半径
item
.
r
=
this
.
computeDistance
(
item
.
x
,
item
.
y
,
item
.
left
,
item
.
top
);
item
.
r
=
this
.
computeDistance
(
item
.
x
,
item
.
y
,
item
.
left
,
item
.
top
);
//赋值
this
.
data
.
listActive
=
true
},
//部件缩放中事件
scaleMove
(
e
)
{
//
获取当前选中的部件
//获取当前选中的部件
var
item
=
items
[
index
];
if
(
item
.
support_zoom
==
0
)
return
;
//
0不支持缩放,1时支持缩放
if
(
item
.
support_zoom
==
0
)
return
;
//
0不支持缩放,1时支持缩放
//记录移动后的位置
item
.
touchMoveX
=
e
.
touches
[
0
].
clientX
;
item
.
touchMoveY
=
e
.
touches
[
0
].
clientY
;
...
...
@@ -4929,13 +4922,11 @@
item
.
activescale
=
false
// 旋转状态
item
.
activehorn
=
true
// 角状态
item
.
activeedge
=
false
// 边状态
//
获取编辑框的左边距和上边距
//获取编辑框的左边距和上边距
var
mLeft
=
this
.
getLeft
();
var
mTop
=
this
.
getTop
();
//移动的点到圆心的距离
item
.
disPtoO
=
this
.
computeDistance
(
item
.
x
,
item
.
y
,
item
.
touchMoveX
-
mLeft
,
item
.
touchMoveY
-
mTop
)
item
.
disPtoO
=
this
.
computeDistance
(
item
.
x
,
item
.
y
,
item
.
touchMoveX
-
mLeft
,
item
.
touchMoveY
-
mTop
)
//手指滑动的点到圆心的距离与半径的比值作为图片的放大比例
item
.
scale
=
item
.
disPtoO
/
item
.
r
;
//设置最大缩放为10倍
...
...
@@ -4953,23 +4944,19 @@
this
.
data
.
itemList
=
items
},
//
部件旋转中事件
//部件旋转中事件
rotateMove
(
e
)
{
var
item
=
items
[
index
];
// 获取当前选中的部件
//记录移动后的位置
item
.
touchMoveX
=
e
.
touches
[
0
].
clientX
;
item
.
touchMoveY
=
e
.
touches
[
0
].
clientY
;
//
获取编辑框的左边距和上边距
//获取编辑框的左边距和上边距
var
mLeft
=
this
.
getLeft
();
var
mTop
=
this
.
getTop
();
//移动的点到圆心的距离
item
.
disPtoO
=
this
.
computeDistance
(
item
.
x
,
item
.
y
,
item
.
touchMoveX
-
mLeft
,
item
.
touchMoveY
-
mTop
);
item
.
disPtoO
=
this
.
computeDistance
(
item
.
x
,
item
.
y
,
item
.
touchMoveX
-
mLeft
,
item
.
touchMoveY
-
mTop
);
//移动后位置的角度
item
.
angleNext
=
this
.
computeAngle
(
item
.
x
,
item
.
y
,
item
.
touchMoveX
-
mLeft
,
item
.
touchMoveY
-
mTop
);
item
.
angleNext
=
this
.
computeAngle
(
item
.
x
,
item
.
y
,
item
.
touchMoveX
-
mLeft
,
item
.
touchMoveY
-
mTop
);
//角度差
item
.
new_rotate
=
item
.
angleNext
-
item
.
anglePre
;
//叠加的角度差
...
...
@@ -4978,15 +4965,14 @@
//用过移动后的坐标赋值为移动前坐标
item
.
touchX
=
e
.
touches
[
0
].
clientX
;
item
.
touchY
=
e
.
touches
[
0
].
clientY
;
item
.
anglePre
=
this
.
computeAngle
(
item
.
x
,
item
.
y
,
item
.
touchX
-
mLeft
,
item
.
touchY
-
mTop
);
item
.
anglePre
=
this
.
computeAngle
(
item
.
x
,
item
.
y
,
item
.
touchX
-
mLeft
,
item
.
touchY
-
mTop
);
//属性
item
.
active
=
false
//辅助线
item
.
activeguide
=
true
//开启辅助线
item
.
activescale
=
true
// 旋转状态
item
.
activehorn
=
false
// 角状态
item
.
activeedge
=
false
// 边状态
//
角度计算
//角度计算
let
roat
=
Math
.
abs
(
item
.
angle
)
%
360
if
(
item
.
angle
<
0
)
{
let
multiple
=
Math
.
ceil
(
Math
.
abs
(
item
.
angle
)
/
360
)
...
...
@@ -4996,42 +4982,42 @@
if
(
roat
<=
5
||
roat
>=
355
)
{
item
.
angle
=
0.00
if
(
item
.
angle
==
0
)
{
wx
.
vibrateShort
();
//
使手机振动15ms
wx
.
vibrateShort
();
//使手机振动15ms
}
}
else
if
(
roat
<=
50
&&
roat
>=
40
)
{
item
.
angle
=
45
if
(
item
.
angle
==
45
)
{
wx
.
vibrateShort
();
//
使手机振动15ms
wx
.
vibrateShort
();
//使手机振动15ms
}
}
else
if
(
roat
<=
95
&&
roat
>=
85
)
{
item
.
angle
=
90
if
(
item
.
angle
==
90
)
{
wx
.
vibrateShort
();
//
使手机振动15ms
wx
.
vibrateShort
();
//使手机振动15ms
}
}
else
if
(
roat
<=
140
&&
roat
>=
130
)
{
item
.
angle
=
135
if
(
item
.
angle
==
135
)
{
wx
.
vibrateShort
();
//
使手机振动15ms
wx
.
vibrateShort
();
//使手机振动15ms
}
}
else
if
(
roat
<=
185
&&
roat
>=
175
)
{
item
.
angle
=
180
if
(
item
.
angle
==
180
)
{
wx
.
vibrateShort
();
//
使手机振动15ms
wx
.
vibrateShort
();
//使手机振动15ms
}
}
else
if
(
roat
<=
230
&&
roat
>=
220
)
{
item
.
angle
=
225
if
(
item
.
angle
==
225
)
{
wx
.
vibrateShort
();
//
使手机振动15ms
wx
.
vibrateShort
();
//使手机振动15ms
}
}
else
if
(
roat
<=
275
&&
roat
>=
265
)
{
item
.
angle
=
270
if
(
item
.
angle
==
270
)
{
wx
.
vibrateShort
();
//
使手机振动15ms
wx
.
vibrateShort
();
//使手机振动15ms
}
}
else
if
(
roat
<=
320
&&
roat
>=
310
)
{
item
.
angle
=
315
if
(
item
.
angle
==
315
)
{
wx
.
vibrateShort
();
//
使手机振动15ms
wx
.
vibrateShort
();
//使手机振动15ms
}
}
//赋值setData渲染
...
...
@@ -5040,27 +5026,19 @@
//部件缩放结束事件
scaleEnd
(
e
)
{
var
item
=
items
[
index
];
// 获取当前选中的部件
//console.log("item.typetext="+item.typetext);
if
(
item
.
support_zoom
==
0
)
return
;
// 0不支持缩放,1时支持缩放
//console.log("抬起11")
var
item
=
items
[
index
];
//获取当前选中的部件
if
(
item
.
support_zoom
==
0
)
return
;
//0不支持缩放,1时支持缩放
item
.
typetext
=
null
;
//关闭点击属性
item
.
active
=
true
//辅助线
item
.
activeguide
=
false
// 辅助线状态
item
.
activescale
=
true
// 旋转状态
item
.
activehorn
=
true
// 角状态
item
.
activeedge
=
true
// 边状态
item
.
isShowLineV
=
false
;
//竖参考线不显示
item
.
isShowLineH
=
false
;
//横参考线不显示
//赋值
// this.data.listActive = false
drag
.
getTransferPosition
(
item
.
left
,
item
.
top
,
item
.
width
,
item
.
height
,
item
.
angle
,
item
.
centerPos
,
item
)
this
.
data
.
itemList
=
items
this
.
$set
(
this
.
data
.
itemList
,
index
,
item
);
this
.
saveSnapshot
();
...
...
@@ -5069,7 +5047,6 @@
// 部件旋转结束事件
rotateEnd
(
e
)
{
var
item
=
items
[
index
];
// 获取当前选中的部件
item
.
typetext
=
null
;
//关闭点击属性
item
.
active
=
true
//辅助线
...
...
@@ -5077,10 +5054,8 @@
item
.
activescale
=
true
// 旋转状态
item
.
activehorn
=
true
// 角状态
item
.
activeedge
=
true
// 边状态
this
.
data
.
itemList
=
items
this
.
$set
(
this
.
data
.
itemList
,
index
,
item
);
this
.
saveSnapshot
();
},
...
...
@@ -5131,9 +5106,9 @@
}
let
zIndex
=
items
[
index
].
index
;
let
zid
=
items
[
index
].
id
;
//
删除指定的部件
//删除指定的部件
items
.
splice
(
index
,
1
);
//
后面的部件index需要减1
//后面的部件index需要减1
for
(
var
item
of
items
)
{
if
(
item
.
index
>
zIndex
)
{
item
.
index
=
item
.
index
-
1
;
...
...
@@ -6163,6 +6138,7 @@
that
.
machine_item
=
res
that
.
diy_upload_menu
=
that
.
machine_item
.
diy_upload_menu
that
.
is_public
=
that
.
machine_item
.
is_public
}).
catch
(
err
=>
{
});
...
...
pages/index/machineDetail.vue
View file @
eb4ebd13
...
...
@@ -41,13 +41,14 @@
<view
v-if=
"statusloading == 2"
style=
"min-height: 100%;background: #131319 !important;"
>
<view
class=
"start"
style=
"padding-bottom: 100upx; padding-top: 200upx;"
>
<image
src=
"../../static/icon_guaqi.png"
mode=
"aspectFill"
class=
"start_img"
></image>
<view
class=
"start_text"
style=
"margin-top: -80upx;font-size: 31upx;"
>
{{
machine_id
||
''
}}
</view>
<view
class=
"start_text"
>
{{
msg
||
''
}}
</view>
<view
@
click=
"tomakePhoneCall"
>
<view
@
click=
"tomakePhoneCall"
v-if=
"phone"
>
<view
class=
"start_text"
>
联系客服
</view>
<view
class=
"start_text"
style=
"display: flex; justify-content: center; align-items: center;"
>
<image
src=
"../../static/phone.png"
mode=
""
style=
"width: 32upx; height: 32upx; margin-right: 5upx;"
></image>
{{
phone
||
'
18938664545
'
}}
{{
phone
||
''
}}
</view>
</view>
</view>
...
...
@@ -69,7 +70,7 @@
<image
src=
"../../static/liebiao.png"
mode=
""
style=
"width: 243upx; height: 123upx;"
></image>
</view>
<view
@
click=
"toProxyApplet()"
v-if=
"list.is_open_manage == 1"
style=
"position: fixed; z-index: 99; right: 0; bottom: 300upx; display: flex;align-items: center;justify-content: center;
<view
@
click=
"toProxyApplet()"
v-if=
"list.is_open_manage == 1
&& statusloading == 1
"
style=
"position: fixed; z-index: 99; right: 0; bottom: 300upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: #F29F3D; border-radius: 44upx 0px 0px 44upx;"
>
<view
style=
"font-size: 24upx; font-weight: 800; color: #FFFFFF;"
>
<view>
运营
</view>
...
...
@@ -109,12 +110,16 @@
msg
:
null
,
worksid
:
1
,
statusloading
:
null
,
//加载状态
phone
:
'
18938664545
'
,
phone
:
''
,
goods
:
[],
//商品列表
currentIndex
:
0
,
selectItem
:
null
,
//选择对象
name
:
""
,
show_admin_login
:
0
show_admin_login
:
0
,
globalData
:
{
typefacedata
:
[],
num
:
0
},
};
},
...
...
@@ -209,7 +214,7 @@
mask
:
true
})
uni
.
makePhoneCall
({
phoneNumber
:
this
.
phone
||
'
18938664545
'
,
//仅为示例
phoneNumber
:
this
.
phone
||
''
,
//仅为示例
success
(
res
)
{
uni
.
hideLoading
();
},
...
...
@@ -281,7 +286,17 @@
}
else
{
this
.
worksid
=
100211
}
console
.
log
(
"worksid="
+
this
.
worksid
)
if
(
this
.
list
.
wx_flag
==
1
){
this
.
msg
=
"稍等片刻,我很快恢复"
this
.
myheadtext
=
'歇一歇'
//头部标题栏
this
.
statusloading
=
2
this
.
phone
=
this
.
list
.
shop
.
tel
uni
.
stopPullDownRefresh
();
uni
.
hideLoading
();
return
;
}
this
.
toFirstCheck
();
this
.
myheadtext
=
this
.
machine_id
//头部标题栏
}
...
...
@@ -351,7 +366,64 @@
this
.
$base
.
machine_id
=
this
.
machine_id
this
.
statusloading
=
1
;
this
.
Adlist
()
//轮播图
let
url
=
"/api/material/mchineFontFamilyList"
;
let
queryParam
=
{
machine_id
:
this
.
machine_id
}
var
that
=
this
;
this
.
$http
.
post
(
url
,
queryParam
).
then
(
result
=>
{
var
dataList
=
result
.
data
;
dataList
.
forEach
(
item
=>
{
item
.
long
=
false
item
.
textlong
=
null
})
dataList
.
unshift
({
id
:
0
,
key
:
"SourceHanSansCN-Normal"
,
remark
:
""
,
title
:
"思源黑体"
,
textlong
:
true
,
long
:
true
})
this
.
globalData
.
typefacedata
=
dataList
this
.
$base
.
typefacedata
=
this
.
globalData
.
typefacedata
let
t1
=
new
Date
().
getTime
();
let
that
=
this
this
.
globalData
.
typefacedata
.
forEach
(
textlist
=>
{
uni
.
loadFontFace
({
global
:
true
,
family
:
textlist
.
title
,
source
:
'url('
+
textlist
.
remark
+
')'
,
desc
:
{
weight
:
100
},
success
:
function
(
success
)
{
textlist
.
textlong
=
true
},
fail
:
function
(
fail
)
{
textlist
.
textlong
=
false
},
complete
(
res
)
{
//console.log("完成")
textlist
.
long
=
true
that
.
globalData
.
typefacedata
.
forEach
(
item
=>
{
if
(
item
.
long
==
true
)
{
that
.
globalData
.
num
++
}
})
that
.
$base
.
typefacedata
=
that
.
globalData
.
typefacedata
if
(
that
.
globalData
.
num
==
that
.
globalData
.
typefacedata
.
length
)
{
}
that
.
globalData
.
num
=
0
}
})
})
}).
catch
(
err
=>
{
//uni.hideLoading();
});
},
onShow
()
{
...
...
pages/index/shapeScrollView.vue
View file @
eb4ebd13
<
template
>
<view
class=
"content"
style=
"width: 100%; height: 100%; position: relative;
margin-top: 100upx;
"
>
<view
class=
"content"
style=
"width: 100%; height: 100%; position: relative;"
>
<refresh
@
interrupt=
"interrupt"
@
pushToInterrupt=
"pushToInterrupt"
@
finished=
"finished"
@
scrolltolower=
"g"
:scrollHeight=
"windowHeight"
>
<template
slot=
"top"
>
<view
style=
"color: #FFFFFF;position: absolute; top: 0;width: 100%; text-align: center;"
...
...
pages/index/textsettings.vue
View file @
eb4ebd13
...
...
@@ -4,6 +4,8 @@
<view
style=
"position: fixed;width: 100%;"
:style=
"
{bottom: inputBottom+'px'}">
<view
v-if=
"show && text != 'typeface'"
style=
"width: 100%; height: 100upx; display: flex; flex-direction: row; "
>
<!--
<view>
{{
show
}}{{
text
}}
</view>
-->
<view
style=
"width: 260upx; height: 100%; background: #292933; border-top-right-radius: 60upx;display: flex; flex-direction: row; "
>
<image
v-if=
"bg_text_color"
style=
"width: 47upx; height: 47upx; display: block;margin-top: 45upx; margin-left:45upx;"
src=
"../../static/img/icon_qiehuan_on.png"
...
...
@@ -24,13 +26,14 @@
height: 98upx;"
>
<view
style=
"width: 601upx; height: 57upx; background: rgb(255,255,255,0.1); margin: 21upx 41upx 21upx 21upx; border-radius: 10upx;"
>
<input
:fixed=
"true"
:auto-height=
"true"
:show-confirm-bar=
"false"
:cursor-spacing=
"73"
:adjust-position=
"false"
type=
"text"
maxlength=
"
20
"
@
input=
"textInput"
v-model=
"data.currentText"
@
focus=
"focusTextarea"
@
blur=
"blurTextarea"
type=
"text"
maxlength=
"
35
"
@
input=
"textInput"
v-model=
"data.currentText"
@
focus=
"focusTextarea"
@
blur=
"blurTextarea"
placeholder=
"请输入文字内容..."
style=
"font-size: 34upx; font-weight: 400; height: 57upx; line-height: 57upx; padding: 0upx 0 0upx 20upx; color: #FFFFFF;"
/>
</view>
<view
style=
"width: 1px; height: 28upx; background: #FFFFFF;"
></view>
<image
style=
"width: 43upx; height: 30upx; display: block;margin: auto;"
src=
"../../static/icon/icon_determine.png"
mode=
"aspectFill"
@
click=
"cancel('share')"
></image>
</view>
<view
v-if=
"text == 'typeface'"
style=
"border-bottom: 2upx solid #000000;"
>
<scroll-view
style=
"width: calc(100% - 40upx); margin: auto; height:598upx; overflow: hidden;"
scroll-y
scroll-with-animation
>
<view
v-for=
"(item, index) in typefacedata"
...
...
@@ -61,24 +64,7 @@
</scroll-view>
</view>
<view
v-if=
"show && text != 'typeface'"
style=
"display: flex; height: 90upx; padding: 38upx 0 41upx; align-items: center;"
>
<!-- 背景 -->
<!--
<view
style=
"width: calc(100% / 7);"
@
click=
"bgtextcolor"
>
<image
style=
"width: 69upx; height: 69upx; display: block;margin: auto;"
:src=
"bg_text_color ? '../../static/icon/icon_qiehuan_one.png' : '../../static/icon/icon_qiehuan.png'"
mode=
"aspectFill"
></image>
</view>
-->
<!-- 颜色 开始-->
<!--
<scroll-view
style=
"box-sizing: border-box; white-space: nowrap; margin: 10upx 0; "
scroll-x
scroll-with-animation
>
<view
style=
"text-align: center; display: inline-block; padding-left: 20upx;"
v-for=
"(item,index) in colorList"
:key=
"index"
@
click
.
stop=
"workcolor(item.color)"
>
<view
v-if=
"data.itemList[data.cidx]"
>
<view
v-if=
"data.itemList[data.cidx].font_color == item.color && !bg_text_color"
style=
"width: 60upx; height: 60upx; background: #000000; border: 4upx solid #EF6262; border-radius: 50%;"
:style=
"
{background:item.color}">
</view>
<view
v-else-if=
"data.itemList[data.cidx].under_color == item.color && bg_text_color"
style=
"width: 60upx; height: 60upx; background: #000000; border: 4upx solid #EF6262; border-radius: 50%;"
:style=
"
{background:item.color}" >
</view>
<view
v-else
style=
"width: 68upx; height: 68upx; border-radius: 50%;"
:style=
"
{background:item.color}" >
</view>
</view>
<view
v-else
style=
"width: 68upx; height: 68upx; border-radius: 50%;"
:style=
"
{background:item.color}">
</view>
</view>
</scroll-view>
-->
<!-- 颜色 结束-->
<!-- 颜色 开始-->
<scroll-view
style=
"box-sizing: border-box; white-space: nowrap;
margin-left: 35upx; margin-right: 35upx;margin-bottom: 30upx; margin-top: 40upx; width: calc(100% - 70upx);"
scroll-x
scroll-with-animation
>
...
...
@@ -721,7 +707,6 @@
index
:
'WG9'
}
],
show
:
true
,
data
:
null
,
bg_text_color
:
null
,
...
...
@@ -735,7 +720,8 @@
{
text
:
'站酷庆科黄油体'
,
url
:
'url("https://tprint.refinecolor.com/text/ZhankuQingkeButterBody.ttf")'
,
fontname
:
'站酷庆科黄油体'
,
lineheight
:
1.18
,
long
:
false
,
textlong
:
null
},
{
text
:
'字体视界法棍体'
,
url
:
'url("https://tprint.refinecolor.com/text/Font_horizon_method_stick_body.ttf")'
,
fontname
:
'字体视界法棍体'
,
lineheight
:
1.14
,
long
:
false
,
textlong
:
null
},
],
typefacedata
:
null
typefacedata
:
null
,
countNum
:
0
};
},
onShow
()
{
...
...
@@ -761,10 +747,20 @@
return
textStr
;
},
//过滤字符串
/* filterTextInput(textStr) {
let content = textStr.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5\.\,\?\<\>\。\,\-\——\=\;\@\!\!\+\$\%\*\(\)\#\&\*]/g, '');
let that = this;
setTimeout(function() {
that.data.currentText = content;
that.$emit('textInput', content)
}, 0);
}, */
//过滤字符串
filterTextInput
(
textStr
)
{
let
content
=
textStr
.
replace
(
/
[^\a
-
\z\A
-
\Z
0-9
\u
4E00-
\u
9FA5
\.\,\?
\<
\>\。\,\-\—
—
\=\;\@\!\!\+\$\%\*\(\)\#\&\*]
/g
,
''
);
textStr
=
textStr
.
replace
(
/
\u
D83C
[\u
DF00-
\u
DFFF
]
|
\u
D83D
[\u
DC00-
\u
DE4F
]
/g
,
""
);
let
content
=
textStr
let
that
=
this
;
setTimeout
(
function
()
{
that
.
data
.
currentText
=
content
;
...
...
@@ -772,18 +768,23 @@
},
0
);
},
typefaceshow
(
e
){
this
.
$emit
(
'typefaceshow'
,
e
)
},
keyboard
(
e
)
{
this
.
inputBottom
=
0
},
typeface
(
e
)
{
this
.
text
=
e
this
.
inputBottom
=
0
let
that
=
this
;
//console.log("text="+this.text+"&show="+this.show+"&this.countNum="+this.countNum)
},
typefaceClick
(
e
,
index
)
{
// console.log(index + 1)
if
((
index
+
1
)
==
this
.
typefacedata
.
length
){
if
(
e
.
textlong
==
true
){
this
.
$emit
(
'typefaceClick'
,
e
)
...
...
@@ -798,6 +799,7 @@
this
.
$emit
(
'typefaceClick'
,
e
)
}
},
loadFont
(
textlist
)
{
let
that
=
this
;
uni
.
showLoading
({
...
...
@@ -825,6 +827,7 @@
}
})
},
setData
(
obj
)
{
let
that
=
this
;
let
keys
=
[];
...
...
@@ -861,7 +864,6 @@
},
textInput
(
e
)
{
this
.
filterTextInput
(
e
.
detail
.
value
)
//this.$emit('textInput', e)
},
cancel
(
e
)
{
this
.
$emit
(
'cancel'
,
e
)
...
...
@@ -879,6 +881,7 @@
this
.
data
=
data
.
data
this
.
bg_text_color
=
data
.
bg_text_color
this
.
text
=
data
.
text
console
.
log
(
"text="
+
this
.
text
)
if
(
this
.
text
==
'typeface'
){
this
.
typeface
(
'typeface'
)
this
.
inputBottom
=
'none'
...
...
pages/mall/lineUp.vue
View file @
eb4ebd13
...
...
@@ -61,19 +61,6 @@
</view>
</view>
<!--
<view
v-if=
"designer.status.value == 1"
>
<view
style=
"text-align: left; font-size: 29upx; color: #F29F3D ; line-height: 80upx;font-weight: 600;"
>
打印中
</view>
</view>
<view
v-else
>
<view
style=
"text-align: left; font-size: 30upx; color: #333; line-height: 80upx;font-weight: 600; margin-top: 20upx;"
>
排队中
</view>
</view>
<view
style=
"width: 90%;font-size: 28upx; margin-top: 70upx; font-weight: 550; text-align: right; font-size: 36upx; color: #333; margin-right: 30upx;"
>
{{
designer
.
id
||
''
}}
</view>
-->
<!-- 提示 -->
<view
v-if=
"sighstate && designer != null"
>
<view
...
...
@@ -88,8 +75,6 @@
style=
"width: 26upx; height: 26upx; padding: 12upx 22upx;"
></image>
</view>
<view
style=
"width: 558upx;position: absolute; top: 40upx "
>
<view
style=
"display: flex; align-items: center; justify-content: center;
width: 500upx;
height: 350upx;
...
...
@@ -105,15 +90,6 @@
</view>
</view>
<!--
<view
style=
"width: 400upx; height: 300upx; display: flex; border: 1px solid #F6BE36;
box-shadow: 0 0 20px #ccc; border-radius: 10upx;"
>
<view
style=
"display: flex; align-items: center; justify-content: center;
width: 100%; height: 200upx; margin: auto;"
>
<image
:src=
"designer.works_image + '?x-oss-process=image/resize,lfit,w_120'"
mode=
"aspectFit"
style=
" margin: auto; width: 120upx; max-height: 200upx; "
></image>
</view>
</view>
-->
<!-- 作品排队中 -->
<view
v-if=
"designer.status.value == 1"
style=
"text-align: center; font-size: 36upx; margin-top: 50upx;"
>
作品打印中
</view>
<view
v-if=
"designer.status.value != 1"
style=
"text-align: center; font-size: 36upx; margin-top: 50upx;"
>
作品排队中
</view>
...
...
@@ -164,7 +140,7 @@
key
:
2
,
//1直营配送站 2 万能通用版 3色彩自助站
sighstate
:
false
,
statetime
:
null
,
animMaind_time
:
10
000
,
//动画时间----刷子上下动画时间
animMaind_time
:
5
000
,
//动画时间----刷子上下动画时间
designer
:
null
,
userId
:
null
,
//用户信息
headheight
:
0
,
//头部高度
...
...
util/Env.js
View file @
eb4ebd13
...
...
@@ -3,13 +3,13 @@ if(!accountInfo.miniProgram.envVersion){
//console.error("获取运行环境失败!");
}
const
baseApi
=
{
//
开发版
//开发版
develop
:
"https://tprint.refinecolor.com"
,
//develop: "https://tprint.colorpark.cn",
//
体验版
trial
:
"https://tprint.refinecolor.com"
,
//
trial: "https://tprint.colorpark.cn",
//
正式版
//体验版
//
trial: "https://tprint.refinecolor.com",
trial
:
"https://tprint.colorpark.cn"
,
//正式版
release
:
"https://tprint.colorpark.cn"
,
};
const
baseURL
=
baseApi
[
accountInfo
.
miniProgram
.
envVersion
]
...
...
util/script.js
View file @
eb4ebd13
...
...
@@ -37,6 +37,14 @@ function callRecognizeBankCard(imageURL, miniProgramType, type, callback) {
request_
[
"ImageURL"
]
=
imageURL
;
request_
[
"Mode"
]
=
"ln17_256"
;
request_
[
"OutputFormat"
]
=
"png"
;
}
else
if
(
type
==
5
)
{
//图像超分
request_
[
"Url"
]
=
imageURL
;
Action
=
"MakeSuperResolutionImage"
;
endpoint
=
"imageenhan.cn-shanghai.aliyuncs.com"
;
API_VERSION
=
"2019-09-30"
;
request_
[
"Mode"
]
=
"enhancement"
;
request_
[
"UpscaleFactor"
]
=
"4"
;
request_
[
"OutputQuality"
]
=
"100"
;
}
else
{
request_
[
"AlgoType"
]
=
"handdrawn"
;
}
...
...
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