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
5ca35981
Commit
5ca35981
authored
Jan 02, 2023
by
huahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改banner显示不全
parent
ccb579bb
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
283 additions
and
497 deletions
+283
-497
pages/index/head/head.vue
+1
-1
pages/index/index.vue
+155
-227
pages/index/js/drag.js
+3
-23
pages/index/machineDetail.vue
+1
-5
pages/index/scrollView.vue
+3
-3
pages/index/switchGoods.vue
+2
-2
pages/index/textsettings.vue
+1
-37
pages/index/tuya.vue
+11
-92
pages/mall/lineUp.vue
+3
-4
pages/mall/size.vue
+103
-102
util/wx-touch-event.js
+0
-1
No files found.
pages/index/head/head.vue
View file @
5ca35981
<
template
>
<
template
>
<view
:style=
"
{ height: height + 'px', background:background}" style="position: fixed; z-index:
888
;">
<view
:style=
"
{ height: height + 'px', background:background}" style="position: fixed; z-index:
9999
;">
<view
class=
"head"
:style=
"
{ height: height + 'px', background:background}">
<view
class=
"head"
:style=
"
{ height: height + 'px', background:background}">
<view
class=
"back"
@
click=
"back"
v-if=
"backShow"
:style=
"
{ top: top + 'px', color:color }">
<view
class=
"back"
@
click=
"back"
v-if=
"backShow"
:style=
"
{ top: top + 'px', color:color }">
<image
src=
"../../../static/recommend/icon_back_black.png"
mode=
"aspectFit"
<image
src=
"../../../static/recommend/icon_back_black.png"
mode=
"aspectFit"
...
...
pages/index/index.vue
View file @
5ca35981
<
template
>
<
template
>
<view
class=
"full-width full-height"
style=
"background: #FFFFFF; "
>
<view
class=
"full-width full-height"
style=
"background: #FFFFFF; "
>
<!-- 自定义头部 -->
<!-- 自定义头部 -->
<!--
<myhead
:worksid=
"works_id"
:title=
"titlename"
:color=
"'#fff'"
:titleShow=
"true"
:backShow=
"true"
:background=
"'none'"
></myhead>
-->
<myhead
:worksid=
"works_id"
:title=
"titlename"
:color=
"'#131319'"
:titleShow=
"true"
:backShow=
"true"
<myhead
:worksid=
"works_id"
:title=
"titlename"
:color=
"'#131319'"
:titleShow=
"true"
:backShow=
"true"
:background=
"'#fff'"
></myhead>
:background=
"'#fff'"
></myhead>
<!-- 登录弹框 -->
<!-- 登录弹框 -->
<Signin
ref=
"Signin"
></Signin>
<Signin
ref=
"Signin"
></Signin>
...
@@ -14,37 +12,28 @@
...
@@ -14,37 +12,28 @@
</view>
</view>
<!-- 设计区域 -->
<!-- 设计区域 -->
<view
v-show=
"!state"
class=
"full-width content-color full-height"
:style=
"
{background: design_color }"
<view
v-show=
"!state"
class=
"full-width content-color full-height"
:style=
"
{background: design_color }">
style=" ">
<!-- margin-top: 170upx; -->
<!-- 取消选中 -->
<!-- 取消选中 -->
<view
class=
"full-width full-height"
style=
"position: absolute; top: 0; left: 0;"
@
click
.
stop=
"itemCancel"
>
<view
class=
"full-width full-height"
style=
"position: absolute; top: 0; left: 0;"
@
click
.
stop=
"itemCancel"
>
</view>
</view>
<view
class=
"container"
@
click=
'itemCancel'
@
touchmove
.
stop=
"touchMove"
@
touchend
.
stop=
"touchEnd"
>
<view
class=
"container"
@
click=
'itemCancel'
@
touchmove
.
stop=
"touchMove"
@
touchend
.
stop=
"touchEnd"
>
<view
:style=
"
{width: data.bgWidth +'px',height: data.bgHeight +'px'}" style="position: relative; ">
<view
:style=
"
{width: data.bgWidth +'px',height: data.bgHeight +'px'}" style="position: relative; ">
<!--
<image
:src=
"data.bgImage_old"
mode=
"widthFix"
:style=
"
{width: (data.bgWidth - 30) +'px',height: data.bgWidth +'px' ,left: '15px'}"
style="position: absolute; z-index: 0; top: 0; bottom: 0; margin: auto;">
</image>
-->
<!-- 底色 -->
<!-- 底色 -->
<view
<view
:style=
"
{width: data.editorWidth + 'px',height: data.editorHeight +'px',
:style=
"
{width: data.editorWidth + 'px',height: data.editorHeight +'px',
background:background_color ? background_color : '#F5F5F5' ,borderRadius: isShowCircular ? '50%' : defalutFillet + 'px' }"
background:background_color ? background_color : '#F5F5F5' ,borderRadius: isShowCircular ? '50%' : defalutFillet + 'px' }"
style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;margin: auto;z-index: 1;
;
">
style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;margin: auto;z-index: 1;">
</view>
</view>
<!-- 遮罩图 -->
<!--
<image
:src=
"data.bgImage"
mode=
"widthFix"
:style=
"
{width: (data.bgWidth - 30 ) +'px',height: data.bgWidth +'px',left: '15px'}"
style="position: absolute; z-index: 2; top: 0; bottom: 0; margin: auto;">
</image>
-->
<!-- 辅助线 -->
<!-- 辅助线 -->
<view
v-if=
"guide_left"
<view
v-if=
"guide_left"
style=
"border-left: 1px dashed #
43cf7c
;position: absolute; height: 100%; z-index: 999;"
style=
"border-left: 1px dashed #
F29F3D
;position: absolute; height: 100%; z-index: 999;"
:style=
"
{left: ((data.bgWidth / 2) - 0.5) +'px'}">
</view>
:style=
"
{left: ((data.bgWidth / 2) - 0.5) +'px'}">
</view>
<view
v-if=
"guide_top"
<view
v-if=
"guide_top"
style=
"width: 100%; border-top: 1px dashed #
43cf7c
;position: absolute; z-index: 999;"
style=
"width: 100%; border-top: 1px dashed #
F29F3D
;position: absolute; z-index: 999;"
:style=
"
{top: (editory + (data.editorHeight * location_scale - 0.5)) +'px'}">
</view>
:style=
"
{top: (editory + (data.editorHeight * location_scale - 0.5)) +'px'}">
</view>
<!-- 主干 -->
<!-- 主干 -->
<view
:class=
"['item-list',
{ 'list-active': data.listActive == true }]"
<view
:class=
"['item-list',
{ 'list-active': data.listActive == true }]"
...
@@ -79,7 +68,7 @@
...
@@ -79,7 +68,7 @@
'margin-top': item.image_top +'px','margin-left': item.image_left +'px'}">
</image>
'margin-top': item.image_top +'px','margin-left': item.image_left +'px'}">
</image>
<!--图片 @load="loadImage"-->
<!--图片 @load="loadImage"-->
<image
v-else-if=
"item.type == 0"
mode=
'aspectFill'
<image
v-else-if=
"item.type == 0"
mode=
'aspectFill'
style=
"min-height: 5
0px;min-width: 50
px;"
style=
"min-height: 5
px;min-width: 5zlzl
px;"
:src=
"item.content + '?x-oss-process=image/resize,lfit,w_1500'"
:src=
"item.content + '?x-oss-process=image/resize,lfit,w_1500'"
:data-id=
"item.id"
:style=
"
{width: item.initialWidth * item.initialScale + 'px',
:data-id=
"item.id"
:style=
"
{width: item.initialWidth * item.initialScale + 'px',
height: item.initialHeight * item.initialScale +'px',
height: item.initialHeight * item.initialScale +'px',
...
@@ -406,18 +395,7 @@
...
@@ -406,18 +395,7 @@
</view>
</view>
</view>
</view>
<!-- 替换选项 -->
<!-- 替换选项 -->
<!--
<uni-popup
ref=
"replacebottom"
type=
"bottom"
@
change=
"change"
>
<view
class=
"uni-share"
style=
"width: 90%; margin: auto;"
>
<view
style=
"background: #FFFFFF; border-radius: 20upx;"
>
<view
style=
"font-size: 30upx; font-weight: 400; height: 100upx; line-height: 100upx; text-align: center; width: 100%;"
@
click=
"replaceimage()"
>
更换其他照片
</view>
</view>
<view
style=
"height: 90rpx; line-height: 90rpx; font-size: 14px; text-align: center; color: #666; background: #FFFFFF; border-radius: 20upx; margin: 20upx 0;"
@
click=
"cancel_replace()"
>
取消
</view>
</view>
</uni-popup>
-->
<!-- 字体 -->
<!-- 字体 -->
<uni-popup
ref=
"textsettingsshare"
type=
"bottom"
@
change=
"change"
style=
"position: fixed; z-index: 9999;"
>
<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;"
<view
class=
"uni-share"
style=
"width: 100%; height: 600upx;background: #292933;"
...
@@ -431,7 +409,7 @@
...
@@ -431,7 +409,7 @@
<!-- 文本,贴图,相框 1模板 2贴图 3字体 4编辑 22添加相框 -->
<!-- 文本,贴图,相框 1模板 2贴图 3字体 4编辑 22添加相框 -->
<uni-popup
ref=
"showshare"
:type=
"type"
@
change=
"change"
<uni-popup
ref=
"showshare"
:type=
"type"
@
change=
"change"
style=
"position: relative; z-index: 999
8
; width: 100%;"
:style=
"
{height: data.windowHeight +'px'}">
style=
"position: relative; z-index: 999
9
; 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'}"
v-if="e_active == 3 || e_active == 4">
v-if="e_active == 3 || e_active == 4">
...
@@ -445,8 +423,10 @@
...
@@ -445,8 +423,10 @@
</textsettings>
</textsettings>
</view>
</view>
</view>
</view>
<!-- 贴图/模板形状 -->
<!-- 贴图/模板形状 -->
<view
v-else
class=
"uni-share full-width"
:style=
"
{height: data.windowHeight +'px'}">
<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'}">
<!-- 遮罩 -->
<!-- 遮罩 -->
<view
class=
"full-width"
<view
class=
"full-width"
style=
"position: absolute; bottom: 0; left: 0; height: 100%; z-index: 997; opacity: 0.8;"
style=
"position: absolute; bottom: 0; left: 0; height: 100%; z-index: 997; opacity: 0.8;"
...
@@ -455,17 +435,7 @@
...
@@ -455,17 +435,7 @@
<view
<view
style=
"position: absolute; bottom: 0upx; left: 0; height: 100%; width: 120upx; z-index: 999; background: #1A1D33; overflow: hidden;"
>
style=
"position: absolute; bottom: 0upx; left: 0; height: 100%; width: 120upx; z-index: 999; background: #1A1D33; overflow: hidden;"
>
<view
style=
"width: 120upx; height: 188upx;"
>
<view
style=
"width: 120upx; height: 188upx;"
>
<!--
<view
style=
"position: relative;width: 120upx; height: 188upx;"
v-if=
"e_active == 2 || e_active == 23"
@
click=
"bgColorClick()"
>
<image
v-if=
"backgroundColor"
src=
"../../static/dise.png"
mode=
""
style=
"width: 66upx; height: 398upx; margin: auto; display: block;
position: absolute; top: -210upx; left: 0; right: 0;"
></image>
<view
v-if=
"backgroundColor"
style=
"text-align: center; position: absolute; left: 0; right: 0; bottom: 10upx; color: #FFFFFF;"
>
底
<br/>
色
</view>
<image
v-if=
"!backgroundColor"
src=
"../../static/bizhi.png"
mode=
""
style=
"width: 66upx; height: 231upx; margin: auto; display: block;
position: absolute; top: -40upx; left: 0; right: 0;"
></image>
<view
v-if=
"!backgroundColor"
style=
"text-align: center; position: absolute; left: 0; right: 0; bottom: 10upx; color: #000;"
>
贴
<br/>
图
</view>
</view>
-->
</view>
</view>
<view
style=
"width: 120upx;"
:style=
"
{height: (data.windowHeight - 188 * data.pixelRate) +'px'}"
<view
style=
"width: 120upx;"
:style=
"
{height: (data.windowHeight - 188 * data.pixelRate) +'px'}"
v-if="e_active == 2 || e_active == 23 || e_active == 99 ">
v-if="e_active == 2 || e_active == 23 || e_active == 99 ">
...
@@ -483,12 +453,12 @@
...
@@ -483,12 +453,12 @@
</view>
</view>
</view>
</view>
<view
style=
"position: absolute; bottom: 0upx; left: 120upx; height: 100%; width: calc(100% - 240upx);
<view
style=
"position: absolute; bottom: 0upx; left: 120upx; height: 100%; width: calc(100% - 240upx);
z-index: 999; overflow: hidden; background: #282932;"
>
z-index: 999; overflow: hidden; background: #282932;
"
>
<!-- 轮播图 -->
<!-- 轮播图 -->
<view
style=
"position: relative; width: calc(100% - 40upx); z-index: 99; margin:30upx auto;"
>
<view
style=
"position: relative; width: calc(100% - 40upx); z-index: 99; margin:30upx auto;
"
>
<swiper
:autoplay=
"true"
:interval=
"3000"
:duration=
"1000"
:indicator-dots=
"true"
<swiper
:autoplay=
"true"
:interval=
"3000"
:duration=
"1000"
:indicator-dots=
"true"
:indicator-active-color=
"'#ffffff'"
:indicator-active-color=
"'#ffffff'"
style=
"height: 15
0upx; width: 100%; border-radius: 10upx; overflow: hidden; margin:auto
;"
>
style=
"height: 15
5upx; width: 100%; border-radius: 10upx; overflow: hidden; margin:auto; margin-top:55upx
;"
>
<swiper-item
v-for=
"(item, index) in Adlists"
:key=
"index"
class=
"full-width"
>
<swiper-item
v-for=
"(item, index) in Adlists"
:key=
"index"
class=
"full-width"
>
<image
:src=
"item.content + '?x-oss-process=image/resize,lfit,w_375'"
<image
:src=
"item.content + '?x-oss-process=image/resize,lfit,w_375'"
mode=
"aspectFill"
class=
"full-width full-height"
mode=
"aspectFill"
class=
"full-width full-height"
...
@@ -496,8 +466,7 @@
...
@@ -496,8 +466,7 @@
</swiper-item>
</swiper-item>
</swiper>
</swiper>
</view>
</view>
<!-- material_series_list 二级分类 -->
<!--
<view
style=
"font-size: 40upx;color: #007AFF;"
>
11111
{{
material_series_list
.
length
}}
<view>
-->
<view
id=
"classification"
v-if=
"e_active == 2 || e_active == 23 || e_active == 99"
<view
id=
"classification"
v-if=
"e_active == 2 || e_active == 23 || e_active == 99"
style=
"width: 100%; position: relative; z-index: 99; "
>
style=
"width: 100%; position: relative; z-index: 99; "
>
<view
style=
"overflow: hidden;"
v-if=
"material_series_list.length > 0"
>
<view
style=
"overflow: hidden;"
v-if=
"material_series_list.length > 0"
>
...
@@ -509,9 +478,7 @@
...
@@ -509,9 +478,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 特效添加相框 -->
<!--
<shapeScrollView
v-if=
"e_active == 22"
ref=
"shapeScrollView"
@
Worksdetail=
"Worksdetail"
:windowHeight=
"(data.windowHeight * 0.8 - 160 * data.pixelRate)"
></shapeScrollView>
-->
<!-- 贴图 -->
<!-- 贴图 -->
<scrollList
v-if=
" e_active == 2 || e_active == 23 || e_active == 99 "
ref=
"scrollList"
<scrollList
v-if=
" e_active == 2 || e_active == 23 || e_active == 99 "
ref=
"scrollList"
@
Worksdetail=
"Worksdetail"
:classificationHeight=
"classificationHeight"
@
Worksdetail=
"Worksdetail"
:classificationHeight=
"classificationHeight"
...
@@ -521,11 +488,11 @@
...
@@ -521,11 +488,11 @@
@
bgColorAssembly=
"bgColorAssembly"
:classificationHeight=
"classificationHeight"
@
bgColorAssembly=
"bgColorAssembly"
:classificationHeight=
"classificationHeight"
:windowHeight=
"(data.windowHeight)"
>
:windowHeight=
"(data.windowHeight)"
>
</bgColor>
</bgColor>
</view>
</view>
</view>
</view>
<view
v-else
style=
"width: 100%; width: 100%; opacity: 1;"
></view>
<view
v-if=
"e_active == 0"
style=
"width: 100%; height:100%; opacity: 1;"
></view>
</uni-popup>
</uni-popup>
<uni-popup
ref=
"showpicture"
type=
"bottom"
@
change=
"change"
style=
"position: fixed; z-index: 9999;"
>
<uni-popup
ref=
"showpicture"
type=
"bottom"
@
change=
"change"
style=
"position: fixed; z-index: 9999;"
>
...
@@ -764,13 +731,14 @@
...
@@ -764,13 +731,14 @@
isCustomize
:
false
,
//是否自定义
isCustomize
:
false
,
//是否自定义
options
:
{},
options
:
{},
defalutFillet
:
0
,
//默认圆角
defalutFillet
:
0
,
//默认圆角
pixelScale
:
0.
55
,
pixelScale
:
0.
6
,
customize_size_id
:
""
,
//自定义尺寸Id
customize_size_id
:
""
,
//自定义尺寸Id
isUpLoadImage
:
false
,
//是否上传图片
isUpLoadImage
:
false
,
//是否上传图片
design_widthrate
:
1
,
//宽度比率
design_widthrate
:
1
,
//宽度比率
design_heightrate
:
1
,
//高度比率
design_heightrate
:
1
,
//高度比率
design_bgwidthrate
:
1
,
//背景宽度比率
design_bgwidthrate
:
1
,
//背景宽度比率
design_bgheightrate
:
1
,
//背景高度比率
design_bgheightrate
:
1
,
//背景高度比率
pixel_scale
:
1
,
};
};
},
},
...
@@ -825,8 +793,8 @@
...
@@ -825,8 +793,8 @@
//添加涂鸦
//添加涂鸦
tuyaimg
(
e
)
{
tuyaimg
(
e
)
{
console
.
log
(
e
)
let
index
=
items
.
length
;
let
index
=
items
.
length
;
items
.
push
({
items
.
push
({
support_zoom
:
1
,
// 0是不支持缩放,为1时支持缩放
support_zoom
:
1
,
// 0是不支持缩放,为1时支持缩放
support_drag
:
1
,
// 0是不支持拖动,为1时支持拖动
support_drag
:
1
,
// 0是不支持拖动,为1时支持拖动
...
@@ -889,7 +857,7 @@
...
@@ -889,7 +857,7 @@
this
.
data
.
goods_id
=
item
.
id
;
this
.
data
.
goods_id
=
item
.
id
;
snapshot
=
[];
// 操作历史记录清空
snapshot
=
[];
// 操作历史记录清空
snapshotIndex
=
-
1
;
snapshotIndex
=
-
1
;
//
获取产品详情数据
//获取产品详情数据
this
.
goodslist
()
this
.
goodslist
()
},
},
...
@@ -1005,6 +973,7 @@
...
@@ -1005,6 +973,7 @@
});
});
});
});
},
},
drawImg
(
e
,
res
)
{
drawImg
(
e
,
res
)
{
this
.
showtwo
=
true
this
.
showtwo
=
true
},
},
...
@@ -1019,7 +988,6 @@
...
@@ -1019,7 +988,6 @@
sourceType
:
[
'camera'
,
'album'
],
//从相册选择
sourceType
:
[
'camera'
,
'album'
],
//从相册选择
count
:
1
,
count
:
1
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
//console.log(res)
let
tempFilePaths
=
res
.
tempFilePaths
;
let
tempFilePaths
=
res
.
tempFilePaths
;
var
size
=
res
.
tempFiles
[
0
].
size
;
var
size
=
res
.
tempFiles
[
0
].
size
;
var
path
=
res
.
tempFiles
[
0
].
path
;
var
path
=
res
.
tempFiles
[
0
].
path
;
...
@@ -1049,7 +1017,6 @@
...
@@ -1049,7 +1017,6 @@
count
:
1
,
count
:
1
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
this
.
$refs
[
'showpicture'
].
close
();
this
.
$refs
[
'showpicture'
].
close
();
//console.log(res.tempFilePaths)
let
tempFilePaths
=
res
.
tempFilePaths
;
let
tempFilePaths
=
res
.
tempFilePaths
;
// let tempFilePaths = 'http://ws.colorpark.cn/static/alioss/images/icon_picture.png';
// let tempFilePaths = 'http://ws.colorpark.cn/static/alioss/images/icon_picture.png';
var
size
=
res
.
tempFiles
[
0
].
size
;
var
size
=
res
.
tempFiles
[
0
].
size
;
...
@@ -1079,7 +1046,6 @@
...
@@ -1079,7 +1046,6 @@
count
:
1
,
count
:
1
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
this
.
$refs
[
'showpicture'
].
close
();
this
.
$refs
[
'showpicture'
].
close
();
//console.log(res.tempFilePaths)
let
tempFilePaths
=
res
.
tempFilePaths
;
let
tempFilePaths
=
res
.
tempFilePaths
;
// let tempFilePaths = 'http://ws.colorpark.cn/static/alioss/images/icon_picture.png';
// let tempFilePaths = 'http://ws.colorpark.cn/static/alioss/images/icon_picture.png';
var
size
=
res
.
tempFiles
[
0
].
size
;
var
size
=
res
.
tempFiles
[
0
].
size
;
...
@@ -1112,9 +1078,6 @@
...
@@ -1112,9 +1078,6 @@
var
size
=
res
.
tempFiles
[
0
].
size
;
var
size
=
res
.
tempFiles
[
0
].
size
;
var
path
=
res
.
tempFiles
[
0
].
path
;
var
path
=
res
.
tempFiles
[
0
].
path
;
tempFilePaths
[
0
]
=
path
;
tempFilePaths
[
0
]
=
path
;
//let tempFilePaths =res.tempFiles.path;
//var size = res.tempFiles.size;
//console.log("微信上传图片" + tempFilePaths + size + path)
var
formatImage
=
path
.
split
(
"."
)[(
path
.
split
(
"."
)).
length
-
1
];
var
formatImage
=
path
.
split
(
"."
)[(
path
.
split
(
"."
)).
length
-
1
];
if
(
formatImage
!=
"png"
&&
formatImage
!=
"jpg"
&&
formatImage
!=
"jpeg"
)
{
if
(
formatImage
!=
"png"
&&
formatImage
!=
"jpg"
&&
formatImage
!=
"jpeg"
)
{
return
wx
.
showToast
({
return
wx
.
showToast
({
...
@@ -1129,18 +1092,20 @@
...
@@ -1129,18 +1092,20 @@
}
}
})
})
},
},
//选择微信相片跟本地相册弹框
//选择微信相片跟本地相册弹框
selectPicturePop
()
{
selectPicturePop
()
{
this
.
delete_wrap_state
=
false
this
.
delete_wrap_state
=
false
this
.
showone
=
false
this
.
showone
=
false
this
.
$refs
[
'showpicture'
].
open
()
this
.
$refs
[
'showpicture'
].
open
()
},
},
//选择微信相片跟本地相册弹框取消
//选择微信相片跟本地相册弹框取消
selectPicturePopColse
()
{
selectPicturePopColse
()
{
//this.delete_wrap_state = false
this
.
showone
=
false
this
.
showone
=
false
this
.
$refs
[
'showpicture'
].
close
();
this
.
$refs
[
'showpicture'
].
close
();
},
},
/* 函数描述:作为上传文件时递归上传的函数体体;
/* 函数描述:作为上传文件时递归上传的函数体体;
* 参数描述:
* 参数描述:
* filePaths是文件路径数组
* filePaths是文件路径数组
...
@@ -1148,7 +1113,6 @@
...
@@ -1148,7 +1113,6 @@
* failUp是上传失败的个数->0
* failUp是上传失败的个数->0
* i是文件路径数组的指标->0
* i是文件路径数组的指标->0
* length是文件路径数组的长度
* length是文件路径数组的长度
* machine_id=user_id=
*/
*/
uploadDIY
(
tempFilePaths
,
successUp
,
failUp
,
i
,
length
)
{
uploadDIY
(
tempFilePaths
,
successUp
,
failUp
,
i
,
length
)
{
let
machine_id
=
this
.
machine_id
||
0
let
machine_id
=
this
.
machine_id
||
0
...
@@ -1183,7 +1147,6 @@
...
@@ -1183,7 +1147,6 @@
success
:
function
(
res
)
{
success
:
function
(
res
)
{
successUp
++
;
successUp
++
;
if
(
res
.
statusCode
!=
200
)
{
if
(
res
.
statusCode
!=
200
)
{
// console.log({errCode: '599', msg:'其他错误'})
return
;
return
;
}
}
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
statusCode
==
200
)
{
...
@@ -1192,7 +1155,7 @@
...
@@ -1192,7 +1155,7 @@
title
:
'上传成功'
,
title
:
'上传成功'
,
icon
:
'none'
,
icon
:
'none'
,
duration
:
3000
duration
:
3000
})
})
;
uni
.
getImageInfo
({
uni
.
getImageInfo
({
src
:
tempFilePaths
[
i
],
src
:
tempFilePaths
[
i
],
success
:
(
image
)
=>
{
success
:
(
image
)
=>
{
...
@@ -1209,7 +1172,6 @@
...
@@ -1209,7 +1172,6 @@
width
=
_this
.
data
.
editorWidth
*
_this
width
=
_this
.
data
.
editorWidth
*
_this
.
mix_scale
.
mix_scale
height
=
image
.
height
*
ratiowidth
height
=
image
.
height
*
ratiowidth
_this
.
isShowGif
=
true
;
_this
.
isShowGif
=
true
;
let
index
=
items
.
length
;
let
index
=
items
.
length
;
items
.
push
({
items
.
push
({
...
@@ -1259,18 +1221,17 @@
...
@@ -1259,18 +1221,17 @@
initialScaley
:
1
,
// 图片高缩放比例
initialScaley
:
1
,
// 图片高缩放比例
initialWidth
:
width
,
// 图片原始宽度
initialWidth
:
width
,
// 图片原始宽度
initialHeight
:
height
,
// 图片原始高度
initialHeight
:
height
,
// 图片原始高度
frame_left
:
null
,
// 裁剪窗口x
frame_left
:
0
,
// 裁剪窗口x
image_left
:
null
,
// 图片x
image_left
:
0
,
// 图片x
frame_top
:
null
,
// 裁剪窗口y
frame_top
:
0
,
// 裁剪窗口y
image_top
:
null
,
// 图片y
image_top
:
0
,
// 图片y
})
})
_this
.
isUpLoadImage
=
false
;
_this
.
isUpLoadImage
=
false
;
_this
.
data
.
itemList
=
items
_this
.
data
.
itemList
=
items
;
_this
.
saveSnapshot
();
_this
.
saveSnapshot
();
}
}
});
});
}
}
// console.log(atter.host + '/' + atter.dir + time + '.jpg')
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
_this
.
isUpLoadImage
=
false
;
_this
.
isUpLoadImage
=
false
;
...
@@ -1282,17 +1243,17 @@
...
@@ -1282,17 +1243,17 @@
})
})
},
},
complete
:
function
(
err
)
{
complete
:
function
(
err
)
{
//
console.log('总共' + successUp + '张上传成功,' + failUp + '张上传失败!');
//console.log('总共' + successUp + '张上传成功,' + failUp + '张上传失败!');
}
}
})
})
uploadTask
.
onProgressUpdate
((
res
)
=>
{
uploadTask
.
onProgressUpdate
((
res
)
=>
{
//
console.log('上传进度', res.progress + " " + new Date())// console.log('已经上传的数据长度', res.totalBytesSent)// console.log('预期需要上传的数据总长度', res.totalBytesExpectedToSend)
//console.log('上传进度', res.progress + " " + new Date())// console.log('已经上传的数据长度', res.totalBytesSent)// console.log('预期需要上传的数据总长度', res.totalBytesExpectedToSend)
_this
.
percent
=
res
.
progress
-
1
_this
.
percent
=
res
.
progress
-
1
})
})
}
}
})
})
},
},
//
移除遮罩形状
//移除遮罩形状
empty
()
{
empty
()
{
if
(
this
.
shape_image
!=
''
)
{
if
(
this
.
shape_image
!=
''
)
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -1357,12 +1318,6 @@
...
@@ -1357,12 +1318,6 @@
})
})
}
}
});
});
// }).catch(err => {
// uni.showToast({
// title: '当前打印站正在维护',
// icon: 'none'
// });
// });
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'啊嘞,色彩定制站必须扫码才能使用'
,
title
:
'啊嘞,色彩定制站必须扫码才能使用'
,
...
@@ -1389,9 +1344,7 @@
...
@@ -1389,9 +1344,7 @@
item
.
rotate
=
item
.
angle
item
.
rotate
=
item
.
angle
width
=
(
item
.
width
*
item
.
scale
);
width
=
(
item
.
width
*
item
.
scale
);
height
=
(
item
.
height
*
item
.
scale
);
height
=
(
item
.
height
*
item
.
scale
);
scalePos
=
this
.
calNoScalePos
(
item
.
left
,
item
.
top
,
item
.
width
,
item
.
height
);
scalePos
=
this
.
calNoScalePos
(
item
.
left
,
item
.
top
,
item
.
width
,
item
.
height
);
left
=
item
.
left
;
left
=
item
.
left
;
top
=
item
.
top
;
top
=
item
.
top
;
...
@@ -1413,21 +1366,12 @@
...
@@ -1413,21 +1366,12 @@
let
widScale
=
1
;
let
widScale
=
1
;
let
heiScale
=
1
;
let
heiScale
=
1
;
//console.log(this.isCustomize)
if
(
!
this
.
isCustomize
)
{
if
(
!
this
.
isCustomize
)
{
widScale
=
pixelRate
*
this
.
design_widthrate
/
(
this
.
real_width
/
150
);
//宽度比例
widScale
=
pixelRate
*
this
.
design_widthrate
/
(
this
.
real_width
/
150
);
//宽度比例
heiScale
=
pixelRate
*
this
.
design_heightrate
/
(
this
.
real_width
/
150
);
//高度比例
heiScale
=
pixelRate
*
this
.
design_heightrate
/
(
this
.
real_width
/
150
);
//高度比例
}
else
{
}
else
{
//this.data.editorWidth / this.options.real_width
//this.data.editorHeight / this.options.real_height
widScale
=
this
.
data
.
editorWidth
/
this
.
options
.
real_width
//宽度比例
widScale
=
this
.
data
.
editorWidth
/
this
.
options
.
real_width
//宽度比例
heiScale
=
this
.
data
.
editorHeight
/
this
.
options
.
real_height
//高度比例
heiScale
=
this
.
data
.
editorHeight
/
this
.
options
.
real_height
//高度比例
// console.log("this.data.editorWidth="+this.data.editorWidth+
// "this.options.real_width ="+this.options.real_width +
// "this.data.editorHeight="+this.data.editorHeight+
// "this.data.real_height="+this.options.real_height
// )
}
}
var
comlist
=
{
var
comlist
=
{
...
@@ -1504,9 +1448,7 @@
...
@@ -1504,9 +1448,7 @@
})
})
var
data
;
var
data
;
if
(
this
.
isCustomize
)
{
if
(
this
.
isCustomize
)
{
data
=
{
data
=
{
s
:
'Works.save'
,
s
:
'Works.save'
,
components
:
components
,
components
:
components
,
...
@@ -1649,8 +1591,11 @@
...
@@ -1649,8 +1591,11 @@
},
},
touchEnd
(
ev
)
{
touchEnd
(
ev
)
{
// 获取当前选中的部件
// 获取当前选中的部件
var
item
=
items
[
index
];
var
item
=
items
[
index
];
if
(
item
!=
undefined
)
{
if
(
item
!=
undefined
&&
item
!=
null
)
{
item
.
typetext
=
null
item
.
typetext
=
null
}
}
},
},
...
@@ -2025,7 +1970,6 @@
...
@@ -2025,7 +1970,6 @@
})
})
},
},
handleScroll
(
index
,
item
)
{
//选中
handleScroll
(
index
,
item
)
{
//选中
this
.
queryPage
.
material_series_id
=
0
this
.
queryPage
.
material_series_id
=
0
this
.
material_series_currentId
=
0
this
.
material_series_currentId
=
0
...
@@ -2139,7 +2083,6 @@
...
@@ -2139,7 +2083,6 @@
//this.currentIndex = this.currentIndex;
//this.currentIndex = this.currentIndex;
this
.
collection_currentId
=
this
.
currentId
;
this
.
collection_currentId
=
this
.
currentId
;
this
.
collection_currentIndex
=
this
.
currentIndex
;
this
.
collection_currentIndex
=
this
.
currentIndex
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
this
.
$refs
[
'scrollList'
].
open
({
this
.
$refs
[
'scrollList'
].
open
({
...
@@ -2154,7 +2097,6 @@
...
@@ -2154,7 +2097,6 @@
}
}
},
},
MaterialseriesList
()
{
//查询分类下二级分类
MaterialseriesList
()
{
//查询分类下二级分类
this
.
material_series_list
=
[]
this
.
material_series_list
=
[]
homeservice
.
queryList
({
homeservice
.
queryList
({
...
@@ -2207,7 +2149,6 @@
...
@@ -2207,7 +2149,6 @@
});
});
},
},
//打开弹框 1模板 2贴图 3字体 4编辑 22添加相框 23壁纸
//打开弹框 1模板 2贴图 3字体 4编辑 22添加相框 23壁纸
showPopup
(
e
)
{
showPopup
(
e
)
{
this
.
isShowGif
=
false
;
this
.
isShowGif
=
false
;
...
@@ -2223,39 +2164,11 @@
...
@@ -2223,39 +2164,11 @@
if
(
e
==
1
)
{
//模板
if
(
e
==
1
)
{
//模板
}
else
if
(
e
==
2
)
{
//贴图
}
else
if
(
e
==
2
)
{
//贴图
this
.
Adlists
=
this
.
diy_bannerList
this
.
queryPage
.
goods_id
=
this
.
data
.
goods_id
this
.
brands
=
this
.
Material_category
this
.
category
(
2
);
this
.
currentId
=
this
.
currentId_Material
;
this
.
currentIndex
=
this
.
currentIndex_Material
;
this
.
queryPage
.
s
=
'Material.list'
this
.
queryPage
.
works_category_id
=
null
this
.
queryPage
.
material_category_id
=
null
if
(
this
.
brands
[
this
.
currentId
].
title
==
'热门'
)
{
this
.
queryPage
.
is_hot
=
'1'
this
.
queryPage
.
is_new
=
null
}
else
if
(
this
.
brands
[
this
.
currentId
].
title
==
'最新'
)
{
this
.
queryPage
.
is_new
=
'1'
this
.
queryPage
.
is_hot
=
null
}
else
{
this
.
queryPage
.
is_hot
=
null
this
.
queryPage
.
is_new
=
null
this
.
queryPage
.
material_category_id
=
this
.
Material_category
[
0
].
id
if
(
this
.
Material_category_id
)
{
this
.
queryPage
.
material_category_id
=
this
.
Material_category_id
}
}
if
(
this
.
mapping_material_series_currentId
!=
0
)
{
this
.
queryPage
.
material_series_id
=
this
.
mapping_material_series_currentId
this
.
material_series_currentId
=
this
.
mapping_material_series_currentId
}
this
.
MaterialseriesList
()
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'scrollList'
].
open
({
e
:
e
,
queryPage
:
this
.
queryPage
,
})
})
}
else
if
(
e
==
3
)
{
//文本
}
else
if
(
e
==
3
)
{
//文本
index
=
null
index
=
null
this
.
addtext
=
true
this
.
addtext
=
true
...
@@ -2277,40 +2190,10 @@
...
@@ -2277,40 +2190,10 @@
}
else
if
(
e
==
22
)
{
//形状
}
else
if
(
e
==
22
)
{
//形状
}
else
if
(
e
==
23
)
{
//壁纸
}
else
if
(
e
==
23
)
{
//壁纸
this
.
Adlists
=
this
.
diy_backList
this
.
queryPage
.
goods_id
=
this
.
data
.
goods_id
this
.
category
(
23
);
this
.
brands
=
this
.
wallpaper_category
//壁纸分类
this
.
currentId
=
this
.
currentId_wallpaper
;
/* 控制被选中 */
this
.
currentIndex
=
this
.
currentIndex_wallpaper
;
/* 控制位置 */
this
.
queryPage
.
s
=
'Material.list'
this
.
queryPage
.
works_category_id
=
null
//作品选中分类id
this
.
queryPage
.
material_category_id
=
null
//贴图选中分类
if
(
this
.
wallpaper_material_series_currentId
!=
0
)
{
this
.
queryPage
.
material_series_id
=
this
.
wallpaper_material_series_currentId
this
.
material_series_currentId
=
this
.
wallpaper_material_series_currentId
}
//console.log("brands="+this.currentId); /* this.brands.length */
if
(
this
.
brands
[
this
.
currentId
].
title
==
'热门'
)
{
this
.
queryPage
.
is_hot
=
'1'
this
.
queryPage
.
is_new
=
null
}
else
if
(
this
.
brands
[
this
.
currentId
].
title
==
'最新'
)
{
this
.
queryPage
.
is_new
=
'1'
this
.
queryPage
.
is_hot
=
null
}
else
{
this
.
queryPage
.
is_hot
=
null
this
.
queryPage
.
is_new
=
null
this
.
queryPage
.
material_category_id
=
this
.
wallpaper_category
[
0
].
id
if
(
this
.
wallpaper_category_id
)
{
this
.
queryPage
.
material_category_id
=
this
.
wallpaper_category_id
}
}
this
.
MaterialseriesList
()
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'scrollList'
].
open
({
e
:
e
,
queryPage
:
this
.
queryPage
,
})
})
}
else
if
(
e
==
24
)
{
}
else
if
(
e
==
24
)
{
this
.
Adlists
=
this
.
diy_bannerList
this
.
Adlists
=
this
.
diy_bannerList
this
.
backgroundColor
=
true
;
this
.
backgroundColor
=
true
;
...
@@ -2347,7 +2230,6 @@
...
@@ -2347,7 +2230,6 @@
this
.
currentId
=
0
;
this
.
currentId
=
0
;
this
.
currentIndex
=
0
;
/* 控制位置 */
this
.
currentIndex
=
0
;
/* 控制位置 */
}
}
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'scrollList'
].
open
({
this
.
$refs
[
'scrollList'
].
open
({
e
:
e
,
e
:
e
,
...
@@ -2361,6 +2243,7 @@
...
@@ -2361,6 +2243,7 @@
},
},
cancel
(
type
)
{
//关闭弹框
cancel
(
type
)
{
//关闭弹框
console
.
log
(
"关闭弹框"
)
this
.
e_active
=
0
this
.
e_active
=
0
this
.
isShowGif
=
false
;
this
.
isShowGif
=
false
;
try
{
try
{
...
@@ -2368,6 +2251,7 @@
...
@@ -2368,6 +2251,7 @@
}
catch
(
e
)
{
}
catch
(
e
)
{
}
}
this
.
$refs
[
'showshare'
].
close
()
this
.
isUpLoadImage
=
false
;
this
.
isUpLoadImage
=
false
;
this
.
addtext
=
false
this
.
addtext
=
false
if
(
wx
.
pageScrollTo
)
{
if
(
wx
.
pageScrollTo
)
{
...
@@ -2761,7 +2645,15 @@
...
@@ -2761,7 +2645,15 @@
items
[
index
].
activehorn
=
true
// 角状态
items
[
index
].
activehorn
=
true
// 角状态
items
[
index
].
activeedge
=
true
// 边状态
items
[
index
].
activeedge
=
true
// 边状态
}
}
//记录中心位置
items
[
i
].
centerPos
=
{
x
:
items
[
i
].
left
+
items
[
i
].
width
/
2
,
y
:
items
[
i
].
top
+
items
[
i
].
height
/
2
}
items
[
i
].
x
=
items
[
i
].
centerPos
.
x
;
items
[
i
].
y
=
items
[
i
].
centerPos
.
y
;
}
}
this
.
active
=
true
this
.
active
=
true
this
.
data
.
listActive
=
true
this
.
data
.
listActive
=
true
this
.
data
.
cidx
=
index
this
.
data
.
cidx
=
index
...
@@ -3378,65 +3270,47 @@
...
@@ -3378,65 +3270,47 @@
s
:
'Product.detail'
,
s
:
'Product.detail'
,
id
:
this
.
data
.
goods_id
id
:
this
.
data
.
goods_id
}).
then
(
result
=>
{
}).
then
(
result
=>
{
this
.
titlename
=
result
.
name
+
" "
+
this
.
titlename
//修改头部名称
let
pixel_scale
=
1
if
(
this
.
options
.
WidthIndex
>
(
this
.
data
.
windowWidth
*
this
.
pixelScale
))
{
if
(
this
.
options
.
WidthIndex
>
(
this
.
data
.
windowWidth
*
this
.
pixelScale
))
{
pixel_scale
=
(
this
.
data
.
windowWidth
*
this
.
pixelScale
)
/
this
.
options
.
WidthIndex
this
.
pixel_scale
=
(
this
.
data
.
windowWidth
*
this
.
pixelScale
)
/
this
.
options
.
WidthIndex
}
else
{
}
else
{
if
(
this
.
options
.
WidthIndex
<
(
this
.
data
.
windowWidth
*
this
.
pixelScale
)
&&
this
.
options
if
(
this
.
options
.
WidthIndex
<
(
this
.
data
.
windowWidth
*
this
.
pixelScale
)
&&
this
.
options
.
HeightIndex
<
(
this
.
data
.
windowHeight
*
this
.
pixelScale
))
{
.
HeightIndex
<
(
this
.
data
.
windowHeight
*
this
.
pixelScale
))
{
pixel_scale
=
1
this
.
pixel_scale
=
1
}
}
}
}
if
(
this
.
options
.
HeightIndex
>
(
this
.
data
.
windowHeight
*
this
.
pixelScale
))
{
if
(
this
.
options
.
HeightIndex
>
(
this
.
data
.
windowHeight
*
this
.
pixelScale
))
{
if
((
this
.
data
.
windowHeight
*
this
.
pixelScale
)
/
this
.
options
.
HeightIndex
<
this
if
((
this
.
data
.
windowHeight
*
this
.
pixelScale
)
/
this
.
options
.
HeightIndex
<
this
.
pixel_scale
)
{
.
pixel_scale
)
{
pixel_scale
=
(
this
.
data
.
windowHeight
*
this
.
pixelScale
)
/
this
.
options
.
HeightIndex
this
.
pixel_scale
=
(
this
.
data
.
windowHeight
*
this
.
pixelScale
)
/
this
.
options
.
HeightIndex
}
}
}
else
{
}
else
{
if
(
this
.
options
.
WidthIndex
<
(
this
.
data
.
windowWidth
*
this
.
pixelScale
)
&&
this
.
options
if
(
this
.
options
.
WidthIndex
<
(
this
.
data
.
windowWidth
*
this
.
pixelScale
)
&&
this
.
options
.
HeightIndex
<
(
this
.
data
.
windowHeight
*
this
.
pixelScale
))
{
.
HeightIndex
<
(
this
.
data
.
windowHeight
*
this
.
pixelScale
))
{
pixel_scale
=
1
this
.
pixel_scale
=
1
}
}
}
}
this
.
design_width
=
(
this
.
options
.
WidthIndex
*
this
.
pixel_scale
)
/
this
.
data
.
pixelRate
// 设计宽度
// if (this.options.WidthIndex > (this.data.windowWidth * this.data.pixelRate)) {
this
.
design_height
=
(
this
.
options
.
HeightIndex
*
this
.
pixel_scale
)
/
this
.
data
// pixel_scale = (this.data.windowWidth * this.data.pixelRate) / this.options.WidthIndex
.
pixelRate
// 设计高度
// } else {
// if (this.options.WidthIndex
<
(
this
.
data
.
windowWidth
*
this
.
data
.
pixelRate
)
&&
this
.
options
// .HeightIndex
<
(
this
.
data
.
windowHeight
*
this
.
data
.
pixelRate
))
{
// pixel_scale = 1
// }
// }
// if (this.options.HeightIndex > (this.data.windowHeight * this.data.pixelRate)) {
// if ((this.data.windowHeight * this.data.pixelRate) / this.options.HeightIndex
<
// pixel_scale) {
// pixel_scale = (this.data.windowHeight * this.data.pixelRate) / this.options.HeightIndex
// }
// } else {
// if (this.options.WidthIndex
<
(
this
.
data
.
windowWidth
*
this
.
data
.
pixelRate
)
&&
this
.
options
// .HeightIndex
<
(
this
.
data
.
windowHeight
*
this
.
data
.
pixelRate
))
{
// pixel_scale = 1
// }
//}
this
.
design_width
=
(
this
.
options
.
WidthIndex
*
pixel_scale
)
/
this
.
data
.
pixelRate
// 设计宽度
this
.
design_height
=
(
this
.
options
.
HeightIndex
*
pixel_scale
)
/
this
.
data
.
pixelRate
// 设计高度
uni
.
getImageInfo
({
uni
.
getImageInfo
({
src
:
result
.
front_image_old
,
src
:
result
.
front_image_old
,
success
:
(
front_image
)
=>
{
success
:
(
front_image
)
=>
{
this
.
data
.
bgHeight
=
this
.
data
.
bgHeight
// 画布高度
this
.
data
.
bgHeight
=
this
.
data
.
bgHeight
// 画布高度
this
.
front_image_long
=
true
this
.
front_image_long
=
true
},
fail
:
err
=>
{
this
.
front_image_long
=
true
}
}
})
})
//this.front_image_long = true
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
// 设计高度
this
.
editory
=
(
this
.
data
.
windowHeight
-
this
.
data
.
editorHeight
)
/
2
;
//辅助线距离
this
.
editory
=
(
this
.
data
.
windowHeight
-
this
.
data
.
editorHeight
)
/
2
;
//辅助线距离
//console.log(this.options)
this
.
design_widthrate
=
(
this
.
design_width
/
result
.
print_width
)
// 设计区放大宽度比率
this
.
design_widthrate
=
(
this
.
design_width
/
result
.
print_width
)
// 设计区放大宽度比率
this
.
design_heightrate
=
(
this
.
design_height
/
result
.
print_height
)
// 设计区放大高度比率
this
.
design_heightrate
=
(
this
.
design_height
/
result
.
print_height
)
// 设计区放大高度比率
if
(
this
.
options
.
defalutFillet
!=
"0"
&&
this
.
options
.
defalutFillet
>=
0
)
{
if
(
this
.
options
.
defalutFillet
!=
"0"
&&
this
.
options
.
defalutFillet
>=
0
)
{
...
@@ -3446,14 +3320,6 @@
...
@@ -3446,14 +3320,6 @@
this
.
defalutFillet
=
0
;
this
.
defalutFillet
=
0
;
}
}
//this.design_bgwidthrate = this.options.WidthIndex / result.print_width // 设计区放大宽度比率
//this.design_bgheightrate = this.options.HeightIndex / result.print_height // 设计区放大高度比率
//this.design_widthrate = this.design_width / result.print_width // 设计区放大宽度比率
//this.design_heightrate = this.design_height / result.print_height // 设计区放大高度比率
this
.
data
.
bgImage
=
result
.
front_image
// 背景图
this
.
data
.
bgImage
=
result
.
front_image
// 背景图
this
.
data
.
bgImage_old
=
result
.
front_image_old
// 旧背景图
this
.
data
.
bgImage_old
=
result
.
front_image_old
// 旧背景图
this
.
data
.
bgImage_thumbnail
=
result
.
thumbnail
// 介绍图片(主图遮罩)
this
.
data
.
bgImage_thumbnail
=
result
.
thumbnail
// 介绍图片(主图遮罩)
...
@@ -3491,11 +3357,9 @@
...
@@ -3491,11 +3357,9 @@
uni
.
getImageInfo
({
uni
.
getImageInfo
({
src
:
result
.
front_image_old
,
src
:
result
.
front_image_old
,
success
:
(
front_image
)
=>
{
success
:
(
front_image
)
=>
{
// this.data.bgHeight = (front_image.height + 600) * (this.data.bgWidth / front_image.width) // 画布高度
this
.
data
.
bgHeight
=
this
.
data
.
bgHeight
// 画布高度
this
.
data
.
bgHeight
=
this
.
data
.
bgHeight
// 画布高度
this
.
editory
=
(
this
.
data
.
bgHeight
-
(
result
.
design_height
*
this
this
.
editory
=
(
this
.
data
.
bgHeight
-
(
result
.
design_height
*
this
.
data
.
data
.
pixelRate
))
/
2
;
//辅助线距离
.
pixelRate
))
/
2
;
//辅助线距离
this
.
data
.
editorWidth
=
result
.
design_width
*
this
.
data
this
.
data
.
editorWidth
=
result
.
design_width
*
this
.
data
.
pixelRate
// 设计宽度
.
pixelRate
// 设计宽度
this
.
data
.
editorHeight
=
result
.
design_height
*
this
.
data
this
.
data
.
editorHeight
=
result
.
design_height
*
this
.
data
...
@@ -3510,13 +3374,10 @@
...
@@ -3510,13 +3374,10 @@
}
}
})
})
this
.
data
.
bgImage
=
result
.
front_image
// 背景图
this
.
data
.
bgImage
=
result
.
front_image
// 背景图
this
.
data
.
bgImage_old
=
result
.
front_image_old
// 旧背景图
this
.
data
.
bgImage_old
=
result
.
front_image_old
// 旧背景图
this
.
data
.
bgImage_thumbnail
=
result
.
thumbnail
// 介绍图片(主图遮罩)
this
.
data
.
bgImage_thumbnail
=
result
.
thumbnail
// 介绍图片(主图遮罩)
this
.
design_color
=
result
.
design_color
// 背景颜色
this
.
design_color
=
result
.
design_color
// 背景颜色
this
.
mix_scale
=
result
.
mix_scale
//上传图片比率
this
.
mix_scale
=
result
.
mix_scale
//上传图片比率
this
.
design_height
=
result
.
design_height
// 设计高度
this
.
design_height
=
result
.
design_height
// 设计高度
this
.
design_width
=
result
.
design_width
// 设计宽度
this
.
design_width
=
result
.
design_width
// 设计宽度
...
@@ -3524,6 +3385,7 @@
...
@@ -3524,6 +3385,7 @@
this
.
print_width
=
result
.
print_width
// 设计基础高度
this
.
print_width
=
result
.
print_width
// 设计基础高度
this
.
center_scale
=
result
.
center_scale
//设计器中心点位置对应底图高度占比(居中=0.5)
this
.
center_scale
=
result
.
center_scale
//设计器中心点位置对应底图高度占比(居中=0.5)
this
.
location_scale
=
result
.
location_scale
//参考线中心点对应设计器高度占比(居中=0.5)
this
.
location_scale
=
result
.
location_scale
//参考线中心点对应设计器高度占比(居中=0.5)
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
err
.
msg
,
title
:
err
.
msg
,
...
@@ -3531,8 +3393,10 @@
...
@@ -3531,8 +3393,10 @@
});
});
});
});
},
},
category
()
{
category
(
type
)
{
if
(
type
==
2
)
{
//查询贴图分类 key=0贴图
//查询贴图分类 key=0贴图
homeservice
.
queryList
({
homeservice
.
queryList
({
s
:
'Material.category'
,
s
:
'Material.category'
,
...
@@ -3545,20 +3409,57 @@
...
@@ -3545,20 +3409,57 @@
icon_click
:
"../../static/image/icon_new_pressed.png"
,
icon_click
:
"../../static/image/icon_new_pressed.png"
,
title
:
"最新"
title
:
"最新"
},
)
},
)
this
.
Adlists
=
this
.
diy_bannerList
//console.log(this.Adlists)
this
.
queryPage
.
goods_id
=
this
.
data
.
goods_id
this
.
brands
=
this
.
Material_category
this
.
currentId
=
this
.
currentId_Material
;
this
.
currentIndex
=
this
.
currentIndex_Material
;
this
.
queryPage
.
s
=
'Material.list'
this
.
queryPage
.
works_category_id
=
null
this
.
queryPage
.
material_category_id
=
null
if
(
this
.
brands
[
this
.
currentId
].
title
==
'热门'
)
{
this
.
queryPage
.
is_hot
=
'1'
this
.
queryPage
.
is_new
=
null
}
else
if
(
this
.
brands
[
this
.
currentId
].
title
==
'最新'
)
{
this
.
queryPage
.
is_new
=
'1'
this
.
queryPage
.
is_hot
=
null
}
else
{
this
.
queryPage
.
is_hot
=
null
this
.
queryPage
.
is_new
=
null
this
.
queryPage
.
material_category_id
=
this
.
Material_category
[
0
].
id
if
(
this
.
Material_category_id
)
{
this
.
queryPage
.
material_category_id
=
this
.
Material_category_id
}
}
if
(
this
.
mapping_material_series_currentId
!=
0
)
{
this
.
queryPage
.
material_series_id
=
this
.
mapping_material_series_currentId
this
.
material_series_currentId
=
this
.
mapping_material_series_currentId
}
this
.
MaterialseriesList
()
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'scrollList'
].
open
({
e
:
2
,
queryPage
:
this
.
queryPage
,
})
})
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
err
.
msg
,
title
:
err
.
msg
,
icon
:
'none'
icon
:
'none'
})
})
});
});
}
if
(
type
==
23
)
{
//查询壁纸分类 key=1壁纸
//查询壁纸分类 key=1壁纸
homeservice
.
queryList
({
homeservice
.
queryList
({
s
:
'Material.category'
,
s
:
'Material.category'
,
machine_id
:
this
.
machine_id
,
machine_id
:
this
.
machine_id
,
key
:
1
,
key
:
1
,
}).
then
(
result
=>
{
}).
then
(
result
=>
{
console
.
log
(
"壁纸"
)
this
.
wallpaper_category
=
result
this
.
wallpaper_category
=
result
this
.
wallpaper_category
.
unshift
({
this
.
wallpaper_category
.
unshift
({
icon
:
"../../static/image/icon_new_default.png"
,
icon
:
"../../static/image/icon_new_default.png"
,
...
@@ -3566,23 +3467,51 @@
...
@@ -3566,23 +3467,51 @@
title
:
"最新"
title
:
"最新"
},
)
},
)
this
.
Adlists
=
this
.
diy_backList
this
.
queryPage
.
goods_id
=
this
.
data
.
goods_id
this
.
brands
=
this
.
wallpaper_category
//壁纸分类
this
.
currentId
=
this
.
currentId_wallpaper
;
/* 控制被选中 */
this
.
currentIndex
=
this
.
currentIndex_wallpaper
;
/* 控制位置 */
this
.
queryPage
.
s
=
'Material.list'
this
.
queryPage
.
works_category_id
=
null
//作品选中分类id
this
.
queryPage
.
material_category_id
=
null
//贴图选中分类
if
(
this
.
wallpaper_material_series_currentId
!=
0
)
{
this
.
queryPage
.
material_series_id
=
this
.
wallpaper_material_series_currentId
this
.
material_series_currentId
=
this
.
wallpaper_material_series_currentId
}
if
(
this
.
brands
[
this
.
currentId
].
title
==
'热门'
)
{
this
.
queryPage
.
is_hot
=
'1'
this
.
queryPage
.
is_new
=
null
}
else
if
(
this
.
brands
[
this
.
currentId
].
title
==
'最新'
)
{
this
.
queryPage
.
is_new
=
'1'
this
.
queryPage
.
is_hot
=
null
}
else
{
this
.
queryPage
.
is_hot
=
null
this
.
queryPage
.
is_new
=
null
this
.
queryPage
.
material_category_id
=
this
.
wallpaper_category
[
0
].
id
if
(
this
.
wallpaper_category_id
)
{
this
.
queryPage
.
material_category_id
=
this
.
wallpaper_category_id
}
}
this
.
MaterialseriesList
()
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'scrollList'
].
open
({
e
:
23
,
queryPage
:
this
.
queryPage
,
})
})
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
err
.
msg
,
title
:
err
.
msg
,
icon
:
'none'
icon
:
'none'
});
});
});
});
}
},
},
itemlongtap
(
e
)
{
//长按事件
itemlongtap
(
e
)
{
//长按事件
var
item
=
items
[
index
];
// 获取当前选中的部件
var
item
=
items
[
index
];
// 获取当前选中的部件
// if(!this.isRotate && this.system_config.golf_diy.value == 1){
// if (item.type != 1) {
// this.$nextTick(() => {
// this.$refs['replacebottom'].open()
// })
// }
// }
},
},
itemTouchStart
:
infoListTouchEvent
.
start
.
bind
(
infoListTouchEvent
),
itemTouchStart
:
infoListTouchEvent
.
start
.
bind
(
infoListTouchEvent
),
itemTouchMove
:
infoListTouchEvent
.
move
.
bind
(
infoListTouchEvent
),
itemTouchMove
:
infoListTouchEvent
.
move
.
bind
(
infoListTouchEvent
),
...
@@ -3619,7 +3548,7 @@
...
@@ -3619,7 +3548,7 @@
this
.
infoListTouchEvent
=
infoListTouchEvent
;
this
.
infoListTouchEvent
=
infoListTouchEvent
;
this
.
infoListTouchEvent
.
bind
({
this
.
infoListTouchEvent
.
bind
({
doubleTap
:
function
(
e
)
{
doubleTap
:
function
(
e
)
{
th
is
.
isShowGif
=
false
;
th
at
.
isShowGif
=
false
;
if
(
items
[
index
].
type
==
0
)
{
if
(
items
[
index
].
type
==
0
)
{
that
.
state
=
true
that
.
state
=
true
that
.
$refs
.
index
.
init
();
that
.
$refs
.
index
.
init
();
...
@@ -3661,7 +3590,7 @@
...
@@ -3661,7 +3590,7 @@
touchEnd
:
function
(
e
)
{
touchEnd
:
function
(
e
)
{
that
.
dragEnd
(
e
)
that
.
dragEnd
(
e
)
let
item
=
items
[
index
];
let
item
=
items
[
index
];
if
(
item
.
scale
!=
1
)
{
if
(
item
!=
null
&&
item
.
scale
!=
1
)
{
//初始化的位置
//初始化的位置
drag
.
initPosscale
(
item
)
drag
.
initPosscale
(
item
)
drag
.
getTransferPositionangle
(
item
.
left
,
item
.
top
,
item
.
width
,
item
.
height
,
item
.
angle
,
drag
.
getTransferPositionangle
(
item
.
left
,
item
.
top
,
item
.
width
,
item
.
height
,
item
.
angle
,
...
@@ -3678,7 +3607,6 @@
...
@@ -3678,7 +3607,6 @@
animationData
:
that
.
animation
.
export
()
animationData
:
that
.
animation
.
export
()
})
})
if
(
that
.
deleteWrap
==
true
)
{
if
(
that
.
deleteWrap
==
true
)
{
//that.deleteItem()
that
.
removedeleteItem
();
that
.
removedeleteItem
();
that
.
deleteWrap
=
false
that
.
deleteWrap
=
false
}
}
...
@@ -3765,7 +3693,7 @@
...
@@ -3765,7 +3693,7 @@
}
else
{
}
else
{
that
.
goodslist
()
// 获取产品详情数据
that
.
goodslist
()
// 获取产品详情数据
}
}
that
.
category
()
// 作品分类 贴图分类
//
that.category() // 作品分类 贴图分类
}
}
})
})
},
},
...
...
pages/index/js/drag.js
View file @
5ca35981
...
@@ -3,7 +3,6 @@ const drag = {
...
@@ -3,7 +3,6 @@ const drag = {
* 部件缩放中事件四角缩放
* 部件缩放中事件四角缩放
*/
*/
scaleMove
(
e
,
item
,
data
,
allLineListData
,
designWidth
,
designHeight
)
{
scaleMove
(
e
,
item
,
data
,
allLineListData
,
designWidth
,
designHeight
)
{
console
.
log
(
item
)
item
.
isShowLineV
=
false
;
//初始化默认不显示
item
.
isShowLineV
=
false
;
//初始化默认不显示
item
.
isShowLineH
=
false
;
//初始化默认不显示
item
.
isShowLineH
=
false
;
//初始化默认不显示
var
minwwidth
=
20
var
minwwidth
=
20
...
@@ -169,7 +168,6 @@ const drag = {
...
@@ -169,7 +168,6 @@ const drag = {
}
}
},
},
/**
/**
* @description: 记录按下数据
* @description: 记录按下数据
*/
*/
...
@@ -216,7 +214,6 @@ const drag = {
...
@@ -216,7 +214,6 @@ const drag = {
y
:
'top'
y
:
'top'
}
}
}
}
//记录对应坐标点坐标
//记录对应坐标点坐标
if
(
fixed
!=
null
)
{
if
(
fixed
!=
null
)
{
//初始化盒子上下左右位置
//初始化盒子上下左右位置
...
@@ -232,7 +229,6 @@ const drag = {
...
@@ -232,7 +229,6 @@ const drag = {
}
}
},
},
//计算旋转后坐标点
//计算旋转后坐标点
rotatedPoint
(
rect
,
rotate
,
point
)
{
rotatedPoint
(
rect
,
rotate
,
point
)
{
let
{
let
{
...
@@ -259,7 +255,6 @@ const drag = {
...
@@ -259,7 +255,6 @@ const drag = {
//四边伸缩
//四边伸缩
edgeMove
(
e
,
item
,
data
,
allLineListData
,
designWidth
,
designHeight
)
{
edgeMove
(
e
,
item
,
data
,
allLineListData
,
designWidth
,
designHeight
)
{
//修改属性状态
//修改属性状态
item
.
active
=
true
//辅助线
item
.
active
=
true
//辅助线
item
.
activeguide
=
false
//辅助线
item
.
activeguide
=
false
//辅助线
...
@@ -327,7 +322,6 @@ const drag = {
...
@@ -327,7 +322,6 @@ const drag = {
let
newScale
=
1
;
let
newScale
=
1
;
if
(
item
.
typetext
==
"right"
)
{
if
(
item
.
typetext
==
"right"
)
{
let
right
=
designWidth
-
(
item
.
left
+
item
.
width
);
let
right
=
designWidth
-
(
item
.
left
+
item
.
width
);
item
.
left
=
item
.
elmX
;
//重新赋值左上角x位置
item
.
left
=
item
.
elmX
;
//重新赋值左上角x位置
item
.
width
=
item
.
elmW
//重新设置宽度
item
.
width
=
item
.
elmW
//重新设置宽度
...
@@ -339,7 +333,6 @@ const drag = {
...
@@ -339,7 +333,6 @@ const drag = {
}
}
}
else
if
(
item
.
typetext
==
"left"
)
{
}
else
if
(
item
.
typetext
==
"left"
)
{
newScale
=
item
.
elmW
/
item
.
lastElmW
//计算新比例
newScale
=
item
.
elmW
/
item
.
lastElmW
//计算新比例
let
distanceLeft
=
0
let
distanceLeft
=
0
if
(
item
.
lastImageLeft
>
0
)
{
if
(
item
.
lastImageLeft
>
0
)
{
...
@@ -357,7 +350,6 @@ const drag = {
...
@@ -357,7 +350,6 @@ const drag = {
}
}
}
else
if
(
item
.
typetext
==
"top"
)
{
}
else
if
(
item
.
typetext
==
"top"
)
{
newScale
=
item
.
elmH
/
item
.
lastElmH
//计算新比例
newScale
=
item
.
elmH
/
item
.
lastElmH
//计算新比例
let
distanceTop
=
0
let
distanceTop
=
0
if
(
item
.
lastImageTop
>
0
)
{
if
(
item
.
lastImageTop
>
0
)
{
...
@@ -365,7 +357,6 @@ const drag = {
...
@@ -365,7 +357,6 @@ const drag = {
}
else
{
}
else
{
distanceTop
=
item
.
lastImageTop
+
(
item
.
elmH
-
item
.
lastElmH
);
distanceTop
=
item
.
lastImageTop
+
(
item
.
elmH
-
item
.
lastElmH
);
}
}
if
(
distanceTop
<
0
)
{
if
(
distanceTop
<
0
)
{
item
.
image_top
=
distanceTop
;
item
.
image_top
=
distanceTop
;
}
else
{
}
else
{
...
@@ -376,7 +367,6 @@ const drag = {
...
@@ -376,7 +367,6 @@ const drag = {
}
}
}
else
if
(
item
.
typetext
==
"bottom"
)
{
}
else
if
(
item
.
typetext
==
"bottom"
)
{
let
buttom
=
designHeight
-
(
item
.
top
+
item
.
height
);
let
buttom
=
designHeight
-
(
item
.
top
+
item
.
height
);
newScale
=
item
.
elmH
/
item
.
lastElmH
//计算新比例
newScale
=
item
.
elmH
/
item
.
lastElmH
//计算新比例
if
(
newScale
>
1
)
{
//开始放大处理
if
(
newScale
>
1
)
{
//开始放大处理
...
@@ -427,13 +417,10 @@ const drag = {
...
@@ -427,13 +417,10 @@ const drag = {
* @description: 计算移动前坐标值
* @description: 计算移动前坐标值
*/
*/
getRotatedPoint
(
curPos
,
centerPos
,
angle
)
{
getRotatedPoint
(
curPos
,
centerPos
,
angle
)
{
let
radian
=
Math
.
PI
/
180
*
angle
;
let
radian
=
Math
.
PI
/
180
*
angle
;
return
{
return
{
x
:
Math
.
floor
((
curPos
.
x
-
centerPos
.
x
)
*
Math
.
cos
(
radian
)
-
(
curPos
.
y
-
centerPos
.
y
)
*
Math
.
sin
(
x
:
Math
.
floor
((
curPos
.
x
-
centerPos
.
x
)
*
Math
.
cos
(
radian
)
-
(
curPos
.
y
-
centerPos
.
y
)
*
Math
.
sin
(
radian
)
+
centerPos
.
x
),
radian
)
+
centerPos
.
x
),
y
:
Math
.
floor
((
curPos
.
y
-
centerPos
.
y
)
*
Math
.
cos
(
radian
)
+
(
curPos
.
x
-
centerPos
.
x
)
*
Math
.
sin
(
radian
)
+
centerPos
.
y
)
y
:
Math
.
floor
((
curPos
.
y
-
centerPos
.
y
)
*
Math
.
cos
(
radian
)
+
(
curPos
.
x
-
centerPos
.
x
)
*
Math
.
sin
(
radian
)
+
centerPos
.
y
)
}
}
},
},
...
@@ -491,7 +478,7 @@ const drag = {
...
@@ -491,7 +478,7 @@ const drag = {
* @description: 计算变换后的方框四个角的位置
* @description: 计算变换后的方框四个角的位置
*/
*/
getTransferPositionangle
(
left
,
top
,
width
,
height
,
angle
,
center
,
item
)
{
getTransferPositionangle
(
left
,
top
,
width
,
height
,
angle
,
center
,
item
)
{
// 计算变换后的方框四个角的位置
},
},
/**
/**
...
@@ -581,13 +568,10 @@ const drag = {
...
@@ -581,13 +568,10 @@ const drag = {
},
},
/**
/**
* 图片拖动中事件
* 图片拖动中事件
*/
*/
dragMove
(
e
,
item
,
data
,
editor_top
)
{
dragMove
(
e
,
item
,
data
,
editor_top
)
{
item
.
isShowLineV
=
false
;
item
.
isShowLineV
=
false
;
item
.
isShowLineH
=
false
;
item
.
isShowLineH
=
false
;
let
mouseX
=
e
.
touches
[
0
].
clientX
;
let
mouseX
=
e
.
touches
[
0
].
clientX
;
...
@@ -600,13 +584,10 @@ const drag = {
...
@@ -600,13 +584,10 @@ const drag = {
let
diffY
=
mouseY
-
item
.
startY
let
diffY
=
mouseY
-
item
.
startY
let
dX
=
diffX
let
dX
=
diffX
let
dY
=
diffY
let
dY
=
diffY
item
.
elmX
+=
diffX
item
.
elmX
+=
diffX
item
.
elmY
+=
diffY
item
.
elmY
+=
diffY
item
.
left
=
item
.
elmX
item
.
left
=
item
.
elmX
item
.
top
=
item
.
elmY
item
.
top
=
item
.
elmY
if
(
item
.
newRotate
==
0
)
{
if
(
item
.
newRotate
==
0
)
{
if
(
item
.
left
>
(
data
.
editorWidth
/
2
-
5
)
&&
item
.
left
<
(
data
.
editorWidth
/
2
+
5
))
{
if
(
item
.
left
>
(
data
.
editorWidth
/
2
-
5
)
&&
item
.
left
<
(
data
.
editorWidth
/
2
+
5
))
{
/* 辅助线左侧磁性吸附 */
/* 辅助线左侧磁性吸附 */
...
@@ -659,7 +640,6 @@ const drag = {
...
@@ -659,7 +640,6 @@ const drag = {
//添加所有参考线x轴y轴
//添加所有参考线x轴y轴
addallLineListDataXAndY
(
item
)
{
addallLineListDataXAndY
(
item
)
{
if
(
item
.
angle
!=
0
)
{
if
(
item
.
angle
!=
0
)
{
var
center
=
{
var
center
=
{
x
:
item
.
left
+
(
item
.
width
)
/
2
,
x
:
item
.
left
+
(
item
.
width
)
/
2
,
...
...
pages/index/machineDetail.vue
View file @
5ca35981
...
@@ -30,8 +30,7 @@
...
@@ -30,8 +30,7 @@
background: linear-gradient(92deg, #E6B01A, #F29F3D);
background: linear-gradient(92deg, #E6B01A, #F29F3D);
box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35);
box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35);
border-radius: 40px;"
>
border-radius: 40px;"
>
<view
<view
style=
" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;"
>
style=
" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;"
>
立即定制
</view>
立即定制
</view>
</view>
</view>
</view>
</view>
...
@@ -115,11 +114,8 @@
...
@@ -115,11 +114,8 @@
toCustomSize
()
{
toCustomSize
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'../mall/size?machine_id='
+
this
.
machine_id
+
url
:
'../mall/size?machine_id='
+
this
.
machine_id
+
// + "&title=" + item.title + "&real_width=" + item.key +
"&isFirstPage=true"
+
"&isFirstPage=true"
+
"&machineDetail="
+
JSON
.
stringify
(
this
.
list
)
"&machineDetail="
+
JSON
.
stringify
(
this
.
list
)
// url: '../index/size?machine_id=' + this.machine_id +
// '&key=' + this.key;
})
})
},
},
...
...
pages/index/scrollView.vue
View file @
5ca35981
<
template
>
<
template
>
<!-- 贴图 -->
<!-- 贴图 -->
<view
class=
"content"
style=
"width: 100%; height: 100%; position: relative;"
<view
class=
"content"
style=
"width: 100%; height: 100%; position: relative;
z-index: 999999;
"
:style=
"
{height: (windowHeight
- classificationHeight
) +'px'}">
:style=
"
{height: (windowHeight
+ 80
) +'px'}">
<refresh
@
interrupt=
"interrupt"
@
pushToInterrupt=
"pushToInterrupt"
@
finished=
"finished"
@
scrolltolower=
"g"
<refresh
@
interrupt=
"interrupt"
@
pushToInterrupt=
"pushToInterrupt"
@
finished=
"finished"
@
scrolltolower=
"g"
:scrollHeight=
"(windowHeight
- classificationHeight
)"
:scrollTop=
"scrollViewTop"
@
scroll=
"scroll"
>
:scrollHeight=
"(windowHeight
+ 80
)"
:scrollTop=
"scrollViewTop"
@
scroll=
"scroll"
>
<template
slot=
"top"
>
<template
slot=
"top"
>
<view
style=
"color: #FFFFFF;position: absolute; top: 0;width: 100%; text-align: center;"
<view
style=
"color: #FFFFFF;position: absolute; top: 0;width: 100%; text-align: center;"
:style=
"'height:' + 40 + 'px; line-height:' + 40 + 'px;'"
>
{{
tip
}}
</view>
:style=
"'height:' + 40 + 'px; line-height:' + 40 + 'px;'"
>
{{
tip
}}
</view>
...
...
pages/index/switchGoods.vue
View file @
5ca35981
<
template
>
<
template
>
<view
v-if=
"isShow"
style=
" width: 100%;
height: 100%;
"
>
<view
v-if=
"isShow"
style=
" width: 100%; "
>
<view
<view
style=
"position: absolute; top: 0; width: 100%; height: 100%; background: #999999; z-index:997; opacity: 0.5; "
style=
"position: absolute; top: 0; width: 100%; height: 100%; background: #999999; z-index:997; opacity: 0.5; "
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
margin: 0 auto;
margin: 0 auto;
line-height: 84upx;
line-height: 84upx;
margin-top:20upx;
margin-top:20upx;
text-align: center;"
>
自定义
</view>
text-align: center;"
>
自定义
尺寸
</view>
</view>
</view>
</view>
</view>
...
...
pages/index/textsettings.vue
View file @
5ca35981
...
@@ -763,9 +763,7 @@
...
@@ -763,9 +763,7 @@
this
.
inputBottom
=
0
this
.
inputBottom
=
0
},
},
typefaceClick
(
e
,
index
)
{
typefaceClick
(
e
,
index
)
{
console
.
log
(
this
.
typefacedata
.
length
)
// console.log(index + 1)
console
.
log
(
index
+
1
)
if
((
index
+
1
)
==
this
.
typefacedata
.
length
){
if
((
index
+
1
)
==
this
.
typefacedata
.
length
){
if
(
e
.
textlong
==
true
){
if
(
e
.
textlong
==
true
){
this
.
$emit
(
'typefaceClick'
,
e
)
this
.
$emit
(
'typefaceClick'
,
e
)
...
@@ -779,16 +777,6 @@
...
@@ -779,16 +777,6 @@
}
else
{
}
else
{
this
.
$emit
(
'typefaceClick'
,
e
)
this
.
$emit
(
'typefaceClick'
,
e
)
}
}
// if(e.textlong == true){
// this.$emit('typefaceClick', e)
// }else{
// if(e.remark != ''){
// this.loadFont(e)
// }else{
// this.$emit('typefaceClick', e)
// }
// }
},
},
loadFont
(
textlist
)
{
loadFont
(
textlist
)
{
let
that
=
this
;
let
that
=
this
;
...
@@ -811,7 +799,6 @@
...
@@ -811,7 +799,6 @@
},
},
complete
(
res
)
{
complete
(
res
)
{
uni
.
hideLoading
();
uni
.
hideLoading
();
// wx.showToast({title: '字体下载完成',icon: 'success',duration: 2000});
textlist
.
long
=
true
textlist
.
long
=
true
that
.
setData
({
typefacedata
:
that
.
typefacedata
});
that
.
setData
({
typefacedata
:
that
.
typefacedata
});
that
.
$emit
(
'typefaceClick'
,
textlist
)
that
.
$emit
(
'typefaceClick'
,
textlist
)
...
@@ -875,32 +862,9 @@
...
@@ -875,32 +862,9 @@
this
.
typeface
(
'typeface'
)
this
.
typeface
(
'typeface'
)
this
.
inputBottom
=
'none'
this
.
inputBottom
=
'none'
}
}
// 字体列表
// homeservice.queryList({
// s: 'Material.fontFamilyList'
// }).then(result => {
// result.forEach(item=>{
// item.long = false
// item.textlong = null
// })
// result.unshift({
// id: 0,
// key: "",
// remark: "",
// title: "思源黑体",
// textlong:true,
// long:true
// })
// this.typefacedata = result
// }).catch(err => {
// });
if
(
this
.
$base
.
typefacedata
.
length
>
0
){
if
(
this
.
$base
.
typefacedata
.
length
>
0
){
this
.
typefacedata
=
this
.
$base
.
typefacedata
this
.
typefacedata
=
this
.
$base
.
typefacedata
console
.
log
(
this
.
$base
.
typefacedata
)
}
}
}
}
}
}
}
}
...
...
pages/index/tuya.vue
View file @
5ca35981
...
@@ -52,38 +52,17 @@
...
@@ -52,38 +52,17 @@
begin
:
false
,
begin
:
false
,
bgColor
:
'rgba(255, 255, 255, 0)'
,
bgColor
:
'rgba(255, 255, 255, 0)'
,
toolArr
:
[
toolArr
:
[
// {
// title: '清空',
// icon: '../../static/png/tool_clear.png',
// selectIcon: '../../static/png/tool_clear_s.png',
// select: false,
// url: 'clear'
// },
{
{
title
:
'撤销'
,
title
:
'撤销'
,
icon
:
'
../../static/png/tool_eraser.png'
,
icon
:
'
'
,
//../../static/png/tool_eraser.png
selectIcon
:
'.
./../static/png/tool_eraser.png'
,
selectIcon
:
'.
'
,
//../../static/png/tool_eraser.png
select
:
false
,
select
:
false
,
url
:
'eraser'
url
:
'eraser'
},
},
// {
// title: '画笔',
// icon: '../../static/png/tool_pen.png',
// selectIcon: '../../static/png/tool_pen_s.png',
// select: true,
// url: 'pen'
// },
// {
// title: '颜色',
// icon: '../../static/png/tool_color.png',
// selectIcon: '../../static/png/tool_color_s.png',
// select: false,
// url: 'color'
// },
{
{
title
:
'确认'
,
title
:
'确认'
,
icon
:
'
../../static/png/icon_confirm.png'
,
icon
:
'
'
,
//../../static/png/icon_confirm.png
selectIcon
:
'
../../static/png/icon_confirm.png'
,
selectIcon
:
'
'
,
//../../static/png/icon_confirm.png
select
:
false
,
select
:
false
,
url
:
'save'
url
:
'save'
}
}
...
@@ -96,7 +75,6 @@
...
@@ -96,7 +75,6 @@
hollowCircleMode
:
false
,
hollowCircleMode
:
false
,
lastHollowRect
:
{},
lastHollowRect
:
{},
lastHollowCircle
:
{},
lastHollowCircle
:
{},
MobilePhoneHeight
:
0
,
MobilePhoneHeight
:
0
,
MobilePhoneWidth
:
0
,
MobilePhoneWidth
:
0
,
pixelRate
:
1
,
pixelRate
:
1
,
...
@@ -152,11 +130,11 @@
...
@@ -152,11 +130,11 @@
icon
:
'none'
,
icon
:
'none'
,
duration
:
3000
duration
:
3000
})
})
// console.log(atter.host + '/' + atter.dir + time + '.png')
let
url
=
atter
.
host
+
'/'
+
atter
.
dir
+
time
+
'.png'
let
url
=
atter
.
host
+
'/'
+
atter
.
dir
+
time
+
'.png'
_this
.
$emit
(
'tuyaimg'
,
url
)
_this
.
$refs
[
'brandscenter'
].
close
()
_this
.
$refs
[
'brandscenter'
].
close
()
_this
.
openState
=
false
_this
.
openState
=
false
_this
.
$emit
(
'tuyaimg'
,
url
)
}
}
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
...
@@ -167,7 +145,7 @@
...
@@ -167,7 +145,7 @@
})
})
},
},
complete
:
function
(
err
)
{
complete
:
function
(
err
)
{
// console.log('总共' + successUp + '张上传成功,' + failUp + '张上传失败!');
}
}
})
})
}
}
...
@@ -204,7 +182,6 @@
...
@@ -204,7 +182,6 @@
})
})
},
},
colorPickTapHandler
(
obj
)
{
colorPickTapHandler
(
obj
)
{
// console.log('我点击的颜色:' + JSON.stringify(obj));
this
.
colorPanelShow
=
false
;
this
.
colorPanelShow
=
false
;
this
.
toolArr
.
forEach
(
item
=>
{
this
.
toolArr
.
forEach
(
item
=>
{
item
.
select
=
false
;
item
.
select
=
false
;
...
@@ -221,7 +198,6 @@
...
@@ -221,7 +198,6 @@
this
.
drawContext
.
strokeStyle
=
obj
.
color
;
this
.
drawContext
.
strokeStyle
=
obj
.
color
;
},
},
penWidthChangeHandler
(
width
)
{
penWidthChangeHandler
(
width
)
{
// console.log('画笔宽度:' + width);
this
.
lineWidth
=
width
;
this
.
lineWidth
=
width
;
this
.
drawContext
.
setLineWidth
(
width
);
this
.
drawContext
.
setLineWidth
(
width
);
this
.
drawContext
.
setLineCap
(
'round'
)
// 让线条圆润
this
.
drawContext
.
setLineCap
(
'round'
)
// 让线条圆润
...
@@ -235,7 +211,6 @@
...
@@ -235,7 +211,6 @@
break
;
break
;
case
'eraser'
:
case
'eraser'
:
this
.
canvas_restore
()
this
.
canvas_restore
()
// this.drawContext.strokeStyle = 'rgba(255, 255, 255, 0)';
this
.
colorPanelShow
=
false
;
this
.
colorPanelShow
=
false
;
break
;
break
;
case
'pen'
:
case
'pen'
:
...
@@ -249,7 +224,6 @@
...
@@ -249,7 +224,6 @@
break
;
break
;
case
'color'
:
case
'color'
:
this
.
colorPanelShow
=
!
this
.
colorPanelShow
;
this
.
colorPanelShow
=
!
this
.
colorPanelShow
;
// this.drawMode = this.colorPanelShow ? false : true;
break
;
break
;
case
'save'
:
case
'save'
:
if
(
that
.
canvas_neto
.
length
<
1
)
{
if
(
that
.
canvas_neto
.
length
<
1
)
{
...
@@ -259,23 +233,7 @@
...
@@ -259,23 +233,7 @@
uni
.
canvasToTempFilePath
({
uni
.
canvasToTempFilePath
({
canvasId
:
'drawCanvas'
,
canvasId
:
'drawCanvas'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
// console.log('回调参数:' + JSON.stringify(res))
that
.
uploadDIY
(
res
.
tempFilePath
);
that
.
uploadDIY
(
res
.
tempFilePath
);
// console.log('回调参数:' + JSON.stringify(res));
// 在H5平台下,tempFilePath 为 base64
// uni.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// success: function(res) {
// console.log('回调参数:' + JSON.stringify(res))
// // console.log('成功回调参数:' + JSON.stringify(res));
// // that.$api.msgSuccess('保存成功');
// },
// fail: function(res) {
// console.log('回调参数:' + JSON.stringify(res))
// // console.log('失败回调参数:' + JSON.stringify(res));
// // that.$api.msgSuccess('保存成功');
// }
// });
},
},
fail
:
function
(
res
)
{
fail
:
function
(
res
)
{
console
.
log
(
'fail'
+
JSON
.
stringify
(
res
));
console
.
log
(
'fail'
+
JSON
.
stringify
(
res
));
...
@@ -285,43 +243,6 @@
...
@@ -285,43 +243,6 @@
case
'close'
:
case
'close'
:
this
.
cancelBrand
();
this
.
cancelBrand
();
break
;
break
;
// case 'hollowRect':
// this.hollowRectMode = true;
// this.rectMode = false;
// this.circleMode = false;
// this.hollowCircleMode = false;
// this.penMode = false;
// this.colorPanelShow = false;
// this.drawContext.strokeStyle = this.currentColor;
// // this.drawContext.restore();
// break;
// case 'hollowCircle':
// this.hollowRectMode = false;
// this.rectMode = false;
// this.circleMode = false;
// this.hollowCircleMode = true;
// this.penMode = false;
// this.colorPanelShow = false;
// this.drawContext.strokeStyle = this.currentColor;
// break;
// case 'rect':
// this.hollowRectMode = false;
// this.rectMode = true;
// this.circleMode = false;
// this.hollowCircleMode = false;
// this.penMode = false;
// this.colorPanelShow = false;
// this.drawContext.strokeStyle = this.currentColor;
// break;
// case 'circle':
// this.hollowRectMode = false;
// this.rectMode = false;
// this.circleMode = true;
// this.hollowCircleMode = false;
// this.penMode = false;
// this.colorPanelShow = false;
// this.drawContext.strokeStyle = this.currentColor;
// break;
default
:
default
:
break
;
break
;
}
}
...
@@ -348,7 +269,6 @@
...
@@ -348,7 +269,6 @@
touchStart
(
e
)
{
touchStart
(
e
)
{
this
.
initBoard
();
this
.
initBoard
();
if
(
this
.
penMode
)
{
if
(
this
.
penMode
)
{
// console.log('我能够进行绘制--touchStart---x' + e.touches[0].x + '----y----' + e.touches[0].y);
this
.
lineBegin
(
e
.
touches
[
0
].
x
,
e
.
touches
[
0
].
y
)
this
.
lineBegin
(
e
.
touches
[
0
].
x
,
e
.
touches
[
0
].
y
)
this
.
canvas_neto
.
push
({
this
.
canvas_neto
.
push
({
point_x
:
e
.
touches
[
0
].
x
,
point_x
:
e
.
touches
[
0
].
x
,
...
@@ -359,13 +279,13 @@
...
@@ -359,13 +279,13 @@
})
})
this
.
draw
(
true
);
this
.
draw
(
true
);
}
else
if
(
this
.
rectMode
)
{
}
else
if
(
this
.
rectMode
)
{
// this.rectBegin(e.touches[0].x, e.touches[0].y)
}
else
if
(
this
.
hollowRectMode
)
{
}
else
if
(
this
.
hollowRectMode
)
{
// this.hollowRectBegin(e.touches[0].x, e.touches[0].y)
}
else
if
(
this
.
hollowCircleMode
)
{
}
else
if
(
this
.
hollowCircleMode
)
{
// this.hollowCircleBegin(e.touches[0].x, e.touches[0].y)
}
else
if
(
this
.
circleMode
)
{
}
else
if
(
this
.
circleMode
)
{
// this.circleBegin(e.touches[0].x, e.touches[0].y)
}
}
this
.
curDrawArr
.
push
({
this
.
curDrawArr
.
push
({
x
:
e
.
touches
[
0
].
x
,
x
:
e
.
touches
[
0
].
x
,
...
@@ -375,7 +295,6 @@
...
@@ -375,7 +295,6 @@
touchMove
(
e
)
{
touchMove
(
e
)
{
if
(
this
.
begin
)
{
if
(
this
.
begin
)
{
if
(
this
.
penMode
)
{
if
(
this
.
penMode
)
{
// console.log('我能够进行绘制--touchMove----x' + e.touches[0].x + '----y----' + e.touches[0].y);
this
.
lineAddPoint
(
e
.
touches
[
0
].
x
,
e
.
touches
[
0
].
y
);
this
.
lineAddPoint
(
e
.
touches
[
0
].
x
,
e
.
touches
[
0
].
y
);
this
.
draw
(
true
);
this
.
draw
(
true
);
this
.
canvas_neto
[
this
.
canvas_neto
.
length
-
1
].
list
.
push
({
this
.
canvas_neto
[
this
.
canvas_neto
.
length
-
1
].
list
.
push
({
...
...
pages/mall/lineUp.vue
View file @
5ca35981
...
@@ -20,14 +20,14 @@
...
@@ -20,14 +20,14 @@
:style=
"
{background: designer.status.value == 1 ? '#ffffff' :'#EEEEEE;'}">
:style=
"
{background: designer.status.value == 1 ? '#ffffff' :'#EEEEEE;'}">
<view
style=
" display: flex; align-items: center;"
>
<view
style=
" display: flex; align-items: center;"
>
<view
v-if=
"designer.user_id != userId"
<view
v-if=
"designer.user_id != userId"
style=
"margin:20upx 20upx;width: 3
4
0upx; height: 140upx; position: relative; overflow: hidden; opacity: 0.3; "
>
style=
"margin:20upx 20upx;width: 3
8
0upx; height: 140upx; position: relative; overflow: hidden; opacity: 0.3; "
>
<view
style=
"width: 140upx; height: 140upx;border-radius: 20upx; background: #FFFFFF;"
>
<view
style=
"width: 140upx; height: 140upx;border-radius: 20upx; background: #FFFFFF;"
>
</view>
</view>
<image
style=
"width: 90upx; height: 90upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
<image
style=
"width: 90upx; height: 90upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
margin: auto; z-index:2;"
:src=
"designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode=
"aspectFit"
></image>
margin: auto; z-index:2;"
:src=
"designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode=
"aspectFit"
></image>
</view>
</view>
<view
v-if=
"designer.user_id == userId"
<view
v-if=
"designer.user_id == userId"
style=
"margin:20upx 20upx;width: 3
4
0upx; height: 140upx; position: relative; overflow: hidden; "
>
style=
"margin:20upx 20upx;width: 3
8
0upx; height: 140upx; position: relative; overflow: hidden; "
>
<view
style=
"width: 140upx; height: 140upx;border-radius: 20upx; background: #FFFFFF;"
></view>
<view
style=
"width: 140upx; height: 140upx;border-radius: 20upx; background: #FFFFFF;"
></view>
<image
style=
"width: 90upx; height: 90upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
<image
style=
"width: 90upx; height: 90upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
margin: auto; z-index:2;"
:src=
"designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode=
"aspectFit"
></image>
margin: auto; z-index:2;"
:src=
"designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode=
"aspectFit"
></image>
...
@@ -66,8 +66,7 @@
...
@@ -66,8 +66,7 @@
<view
style=
"width: 558upx;position: absolute; top: 40upx "
>
<view
style=
"width: 558upx;position: absolute; top: 40upx "
>
<view
style=
"display: flex; align-items: center; justify-content: center;
<view
style=
"display: flex; align-items: center; justify-content: center;
width: 100%; height: 200upx; margin: auto;"
>
width: 100%; height: 200upx; margin: auto;"
>
<image
:src=
"designer.works_image + '?x-oss-process=image/resize,lfit,w_120'"
<image
:src=
"designer.works_image + '?x-oss-process=image/resize,lfit,w_120'"
mode=
"aspectFit"
style=
" margin: auto; width: 120upx; max-height: 200upx; "
></image>
mode=
"aspectFit"
style=
" margin: auto; width: 120upx; max-height: 200upx; "
></image>
</view>
</view>
<!-- 作品排队中 -->
<!-- 作品排队中 -->
<view
style=
"text-align: center; font-size: 34upx; margin-top: 50upx;"
>
{{
lineStatusText
}}
</view>
<view
style=
"text-align: center; font-size: 34upx; margin-top: 50upx;"
>
{{
lineStatusText
}}
</view>
...
...
pages/mall/size.vue
View file @
5ca35981
<
template
>
<
template
>
<view
class=
"edit-address full-height full-width"
>
<view
class=
"edit-address full-height full-width"
>
<!--
<myhead
:title=
"'自定义尺寸'"
:color=
"'#131319'"
:titleShow=
"true"
:backShow=
"true"
:background=
"'#fff'"
></myhead>
-->
<view
class=
"form full-width"
>
<view
class=
"form full-width"
>
<view
style=
"width: 100%; height: 70upx; display: flex;align-items: center; justify-content: center; "
>
<view
style=
"width: 100%; height: 85upx; display: flex;align-items: center; justify-content: center; "
>
<view
style=
"display: flex;font-size: 30upx; margin:auto;
<view
style=
"display: flex;font-size: 30upx; margin:auto;
width: 300upx; height: 70upx; background: #282932; border-radius: 50upx; color: #FFFFFF;"
>
width: 300upx; height: 70upx; background: #282932; border-radius: 50upx; color: #FFFFFF;"
>
<view
:class=
"
{'previewAxtiveLeft':!preview}" @click=" onclickTitle(false) "
<view
:class=
"
{'previewAxtiveLeft':!preview}" @click=" onclickTitle(false) "
...
@@ -20,11 +17,10 @@
...
@@ -20,11 +17,10 @@
</view>
</view>
<!-- 宽
{{
pixel_Width
}}
高:
{{
pixel_Height
}}
比例
{{
pixel_scale
}}
-->
<!-- 宽
{{
pixel_Width
}}
高:
{{
pixel_Height
}}
比例
{{
pixel_scale
}}
-->
<!--
{{
pixel_scale
}}{{
pixel_Width
}}
-->
<view
v-if=
"!preview"
class=
"full-width"
scroll-y
style=
"height: calc(100% - 160upx);overflow: scroll;"
>
<view
v-if=
"!preview"
class=
"full-width"
scroll-y
style=
"height: calc(100% - 160upx);overflow: scroll;"
>
<view
style=
"
max-height: 630upx; height: 63
0upx; overflow: scroll;
<view
style=
"
height: 70
0upx; overflow: scroll;
overflow: hidden;
overflow: hidden;
margin:0
auto 47upx;display: fle
x;
margin:0
upx auto 40upx;display: flex; margin-top: 10up
x;
justify-content: center; align-items: center; "
justify-content: center; align-items: center; "
:style=
"
{width: (pixel_Width * pixel_scale) +'px', borderRadius: defalutFillet + 'px'}">
:style=
"
{width: (pixel_Width * pixel_scale) +'px', borderRadius: defalutFillet + 'px'}">
<view
<view
...
@@ -34,7 +30,7 @@
...
@@ -34,7 +30,7 @@
</view>
</view>
<view
style=
"position: relative;"
>
<view
style=
"position: relative;"
>
<!-- 自定义高度 -->
<!-- 自定义高度 -->
<view
style=
"display: flex; align-items: center; justify-content: center; margin-top:
10
upx;"
>
<view
style=
"display: flex; align-items: center; justify-content: center; margin-top:
5
upx;"
>
<view
style=
"font-size: 30upx; font-weight: 400; color: #FFFFFF; width: 180upx;"
>
物料宽度:
</view>
<view
style=
"font-size: 30upx; font-weight: 400; color: #FFFFFF; width: 180upx;"
>
物料宽度:
</view>
<view
style=
"width: 282upx; height: 66upx; background: #282932; border-radius: 30upx;
<view
style=
"width: 282upx; height: 66upx; background: #282932; border-radius: 30upx;
display: flex; align-items: center;"
>
display: flex; align-items: center;"
>
...
@@ -53,7 +49,6 @@
...
@@ -53,7 +49,6 @@
<view
style=
"color: #898989; font-size: 26upx; width: 82upx;"
>
{{
companyValue
}}
</view>
<view
style=
"color: #898989; font-size: 26upx; width: 82upx;"
>
{{
companyValue
}}
</view>
</view>
</view>
</view>
</view>
<view
style=
"display: flex; align-items: center;justify-content: center; margin-top: 25upx;"
>
<view
style=
"display: flex; align-items: center;justify-content: center; margin-top: 25upx;"
>
<view
style=
"font-size: 30upx; font-weight: 400; color: #FFFFFF; width: 180upx;"
>
圆角半径:
</view>
<view
style=
"font-size: 30upx; font-weight: 400; color: #FFFFFF; width: 180upx;"
>
圆角半径:
</view>
<view
style=
"width: 282upx; height: 66upx;
<view
style=
"width: 282upx; height: 66upx;
...
@@ -64,7 +59,6 @@
...
@@ -64,7 +59,6 @@
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 预置 -->
<!-- 预置 -->
<view
v-if=
"preview"
class=
"full-width"
>
<view
v-if=
"preview"
class=
"full-width"
>
...
@@ -207,21 +201,19 @@
...
@@ -207,21 +201,19 @@
queryPage
:
{},
queryPage
:
{},
good_id
:
"217"
,
//产品Id
good_id
:
"217"
,
//产品Id
isFirstPage
:
true
,
isFirstPage
:
true
,
machineDetail
:
null
//设备对象
machineDetail
:
null
,
//设备对象
pixelScale
:
0.6
,
//比例
}
}
},
},
methods
:
{
methods
:
{
onclickTitle
(
preview
)
{
onclickTitle
(
preview
)
{
this
.
preview
=
preview
this
.
preview
=
preview
if
(
this
.
preview
)
{
if
(
this
.
preview
)
{
this
.
defalutFillet
=
0
this
.
defalutFillet
=
0
this
.
newDefalutFilletData
=
0
;
this
.
newDefalutFilletData
=
0
;
if
(
!
this
.
Specifications
)
{
if
(
!
this
.
Specifications
)
{
this
.
dataLoadState
=
{
this
.
dataLoadState
=
{
pullDownRefresh
:
false
,
pullDownRefresh
:
false
,
...
@@ -234,8 +226,6 @@
...
@@ -234,8 +226,6 @@
this
.
queryPage
.
s
=
'CanvasSize.list'
this
.
queryPage
.
s
=
'CanvasSize.list'
this
.
loadGoodsList
(
Enums
.
DATA_DIRECTION
.
UP
);
this
.
loadGoodsList
(
Enums
.
DATA_DIRECTION
.
UP
);
}
}
}
}
},
},
...
@@ -262,7 +252,6 @@
...
@@ -262,7 +252,6 @@
.
inputWidth
))
.
inputWidth
))
},
},
//显示商品弹框
//显示商品弹框
showManyGoodPop
()
{
showManyGoodPop
()
{
this
.
$refs
[
'showManyGood'
].
open
();
this
.
$refs
[
'showManyGood'
].
open
();
...
@@ -274,31 +263,23 @@
...
@@ -274,31 +263,23 @@
},
},
refundNumorder
(
item
)
{
refundNumorder
(
item
)
{
let
real_radius
=
Number
(
item
.
real_radius
);
let
real_radius
=
Number
(
item
.
real_radius
);
let
real_height
=
Number
(
item
.
real_height
);
let
real_height
=
Number
(
item
.
real_height
);
let
real_width
=
Number
(
item
.
real_width
);
let
real_width
=
Number
(
item
.
real_width
);
//判断是否超过对应宽高比
//判断是否超过对应宽高比
let
minWidthAanHeight
=
0
;
let
minWidthAanHeight
=
0
;
if
(
real_height
>
real_width
)
{
if
(
real_height
>
real_width
)
{
minWidthAanHeight
=
real_width
minWidthAanHeight
=
real_width
}
else
{
}
else
{
minWidthAanHeight
=
real_height
minWidthAanHeight
=
real_height
}
}
if
(
real_radius
>
minWidthAanHeight
/
2
)
{
if
(
real_radius
>
minWidthAanHeight
/
2
)
{
real_radius
=
Math
.
floor
(
minWidthAanHeight
/
2
)
real_radius
=
Math
.
floor
(
minWidthAanHeight
/
2
)
}
}
let
WidthIndex
=
item
.
real_width
*
this
.
OldConvert_rate
let
WidthIndex
=
item
.
real_width
*
this
.
OldConvert_rate
let
HeightIndex
=
item
.
real_height
*
this
.
OldConvert_rate
let
HeightIndex
=
item
.
real_height
*
this
.
OldConvert_rate
let
nameStr
=
item
.
name
let
nameStr
=
item
.
name
let
unit
=
item
.
unit
;
let
unit
=
item
.
unit
;
let
customize_size_id
=
item
.
id
let
customize_size_id
=
item
.
id
//console.log(item)
//console.log(item)
if
(
this
.
isFirstPage
&&
this
.
isFirstPage
==
"true"
)
{
if
(
this
.
isFirstPage
&&
this
.
isFirstPage
==
"true"
)
{
...
@@ -355,7 +336,6 @@
...
@@ -355,7 +336,6 @@
});
});
return
;
return
;
}
}
let
unit
=
null
let
unit
=
null
let
real_width
=
null
let
real_width
=
null
let
real_height
=
null
let
real_height
=
null
...
@@ -406,7 +386,6 @@
...
@@ -406,7 +386,6 @@
title
:
'创建成功!'
,
title
:
'创建成功!'
,
duration
:
2000
duration
:
2000
});
});
//console.log(result)
if
(
this
.
isFirstPage
&&
this
.
isFirstPage
==
"true"
)
{
if
(
this
.
isFirstPage
&&
this
.
isFirstPage
==
"true"
)
{
uni
.
redirectTo
({
uni
.
redirectTo
({
url
:
'../index/index?machine_id='
+
this
.
parameter
.
machine_id
+
url
:
'../index/index?machine_id='
+
this
.
parameter
.
machine_id
+
...
@@ -422,7 +401,6 @@
...
@@ -422,7 +401,6 @@
"&customize_size_id="
+
result
.
id
"&customize_size_id="
+
result
.
id
})
})
}
else
{
}
else
{
//console.log("defalutFilletData=" + defalutFilletData)
let
pages
=
getCurrentPages
();
let
pages
=
getCurrentPages
();
var
prevPage
=
pages
[
pages
.
length
-
2
];
//上一个页面
var
prevPage
=
pages
[
pages
.
length
-
2
];
//上一个页面
//let machineDetail = encodeURIComponent(JSON.stringify(this.machineDetail));
//let machineDetail = encodeURIComponent(JSON.stringify(this.machineDetail));
...
@@ -450,7 +428,6 @@
...
@@ -450,7 +428,6 @@
icon
:
'none'
icon
:
'none'
});
});
});
});
},
},
touchstart
(
item
,
index
)
{
touchstart
(
item
,
index
)
{
...
@@ -490,9 +467,11 @@
...
@@ -490,9 +467,11 @@
});
});
}.
bind
(
this
),
500
);
}.
bind
(
this
),
500
);
},
},
touchend
()
{
touchend
()
{
clearInterval
(
this
.
Loop
);
clearInterval
(
this
.
Loop
);
},
},
OnclickSpecifications
(
e
)
{
OnclickSpecifications
(
e
)
{
this
.
dataLoadState
=
{
this
.
dataLoadState
=
{
pullDownRefresh
:
false
,
pullDownRefresh
:
false
,
...
@@ -510,6 +489,7 @@
...
@@ -510,6 +489,7 @@
}
}
this
.
loadGoodsList
(
Enums
.
DATA_DIRECTION
.
UP
);
this
.
loadGoodsList
(
Enums
.
DATA_DIRECTION
.
UP
);
},
},
direction
()
{
//横屏竖屏
direction
()
{
//横屏竖屏
this
.
directionState
=
!
this
.
directionState
this
.
directionState
=
!
this
.
directionState
// 赋值
// 赋值
...
@@ -517,24 +497,21 @@
...
@@ -517,24 +497,21 @@
let
h
=
this
.
pixel_Height
let
h
=
this
.
pixel_Height
this
.
pixel_Width
=
h
this
.
pixel_Width
=
h
this
.
pixel_Height
=
w
this
.
pixel_Height
=
w
// if(this.companyValue == '毫米'){
// this.inputWidth = h / this.convert_rate
// this.inputHeight = w / this.convert_rate
// }else if(this.companyValue == '厘米'){
this
.
inputWidth
=
h
/
this
.
convert_rate
this
.
inputWidth
=
h
/
this
.
convert_rate
this
.
inputHeight
=
w
/
this
.
convert_rate
this
.
inputHeight
=
w
/
this
.
convert_rate
// }
//固定比率
//固定比率
this
.
wValue
=
h
this
.
wValue
=
h
this
.
hValue
=
w
this
.
hValue
=
w
},
},
equalRatio
()
{
//固定比率
equalRatio
()
{
//固定比率
this
.
equalRatioState
=
!
this
.
equalRatioState
this
.
equalRatioState
=
!
this
.
equalRatioState
//固定比率
//固定比率
this
.
wValue
=
this
.
pixel_Width
this
.
wValue
=
this
.
pixel_Width
this
.
hValue
=
this
.
pixel_Height
this
.
hValue
=
this
.
pixel_Height
},
},
// 确定 e.value[0]
//确定 e.value[0]
onConfirm
(
e
)
{
onConfirm
(
e
)
{
if
(
this
.
companyValue
==
e
.
label
)
{
if
(
this
.
companyValue
==
e
.
label
)
{
return
return
...
@@ -590,31 +567,32 @@
...
@@ -590,31 +567,32 @@
inputHeight
:
Height
inputHeight
:
Height
});
//文本
});
//文本
}
}
this
.
previewWidth
=
this
.
inputWidth
*
this
.
convert_rate
this
.
previewWidth
=
this
.
inputWidth
*
this
.
convert_rate
this
.
previewHeight
=
this
.
inputHeight
*
this
.
convert_rate
this
.
previewHeight
=
this
.
inputHeight
*
this
.
convert_rate
this
.
pixel_Width
=
this
.
previewWidth
this
.
pixel_Width
=
this
.
previewWidth
this
.
pixel_Height
=
this
.
previewHeight
this
.
pixel_Height
=
this
.
previewHeight
if
(
this
.
pixel_Width
>
(
this
.
data
.
windowWidth
*
0.5
))
{
this
.
pixel_scale
=
(
this
.
data
.
windowWidth
*
0.5
)
/
this
.
pixel_Width
this
.
getWindowScale
();
}
else
{
if
(
this
.
pixel_Width
<
(
this
.
data
.
windowWidth
*
0.5
)
&&
this
.
pixel_Height
<
(
this
.
data
// if (this.pixel_Width > (this.data.windowWidth * this.pixelScale)) {
.
windowHeight
*
0.5
))
{
// this.pixel_scale = (this.data.windowWidth * this.pixelScale) / this.pixel_Width
this
.
pixel_scale
=
1
// } else {
}
// if (this.pixel_Width
<
(
this
.
data
.
windowWidth
*
this
.
pixelScale
)
&&
this
.
pixel_Height
<
(
this
.
data
}
// .windowHeight * this.pixelScale)) {
if
(
this
.
pixel_Height
>
(
this
.
data
.
windowHeight
*
0.5
))
{
// this.pixel_scale = 1
if
((
this
.
data
.
windowHeight
*
0.5
)
/
this
.
pixel_Height
<
this
// }
.
pixel_scale
)
{
// }
this
.
pixel_scale
=
(
this
.
data
.
windowHeight
*
0.5
)
/
this
.
pixel_Height
// if (this.pixel_Height > (this.data.windowHeight * this.pixelScale)) {
}
// if ((this.data.windowHeight * this.pixelScale) / this.pixel_Height
<
this
.
pixel_scale
)
{
}
else
{
// this.pixel_scale = (this.data.windowHeight * this.pixelScale) / this.pixel_Height
if
(
this
.
pixel_Width
<
(
this
.
data
.
windowWidth
*
0.5
)
&&
this
.
pixel_Height
<
(
this
.
data
// }
.
windowHeight
*
this
.
pixelScale
))
{
// } else {
this
.
pixel_scale
=
1
// if (this.pixel_Width
<
(
this
.
data
.
windowWidth
*
this
.
pixelScale
)
&&
this
.
pixel_Height
<
(
this
.
data
.
windowHeight
*
this
.
pixelScale
))
{
}
// this.pixel_scale = 1
}
// }
// }
//console.log("pixel_scale="+this.pixel_scale+"pixel_Width="+this.pixel_Width)
let
real_width
=
Number
(
this
.
inputWidth
);
let
real_width
=
Number
(
this
.
inputWidth
);
let
real_height
=
Number
(
this
.
inputHeight
);
let
real_height
=
Number
(
this
.
inputHeight
);
...
@@ -623,12 +601,10 @@
...
@@ -623,12 +601,10 @@
}
else
{
}
else
{
this
.
filletScale
=
real_height
/
100
;
this
.
filletScale
=
real_height
/
100
;
}
}
let
defalutFilletValue
=
Math
.
floor
(
this
.
newDefalutFilletData
*
this
.
filletScale
)
let
defalutFilletValue
=
Math
.
floor
(
this
.
newDefalutFilletData
*
this
.
filletScale
)
this
.
defalutFillet
=
Math
.
floor
(
defalutFilletValue
*
(
this
.
pixel_Width
*
this
.
pixel_scale
/
this
this
.
defalutFillet
=
Math
.
floor
(
defalutFilletValue
*
(
this
.
pixel_Width
*
this
.
pixel_scale
/
this
.
inputWidth
));
.
inputWidth
));
this
.
$refs
[
'NumSlider'
].
initFilletRadius
(
this
.
newDefalutFilletData
,
this
.
filletScale
);
this
.
$refs
[
'NumSlider'
].
initFilletRadius
(
this
.
newDefalutFilletData
,
this
.
filletScale
);
return
Width
return
Width
},
},
...
@@ -665,31 +641,32 @@
...
@@ -665,31 +641,32 @@
duration
:
2000
duration
:
2000
});
});
}
}
this
.
previewWidth
=
this
.
inputWidth
*
this
.
convert_rate
this
.
previewWidth
=
this
.
inputWidth
*
this
.
convert_rate
this
.
previewHeight
=
this
.
inputHeight
*
this
.
convert_rate
this
.
previewHeight
=
this
.
inputHeight
*
this
.
convert_rate
this
.
pixel_Width
=
this
.
previewWidth
this
.
pixel_Width
=
this
.
previewWidth
this
.
pixel_Height
=
this
.
previewHeight
this
.
pixel_Height
=
this
.
previewHeight
if
(
this
.
pixel_Width
>
(
this
.
data
.
windowWidth
*
0.5
))
{
this
.
getWindowScale
();
this
.
pixel_scale
=
(
this
.
data
.
windowWidth
*
0.5
)
/
this
.
pixel_Width
}
else
{
// if (this.pixel_Width > (this.data.windowWidth * 0.5)) {
if
(
this
.
pixel_Width
<
(
this
.
data
.
windowWidth
*
0.5
)
&&
this
.
pixel_Height
<
(
this
.
data
// this.pixel_scale = (this.data.windowWidth * 0.5) / this.pixel_Width
.
windowHeight
*
0.5
))
{
// } else {
this
.
pixel_scale
=
1
// if (this.pixel_Width
<
(
this
.
data
.
windowWidth
*
0.5
)
&&
this
.
pixel_Height
<
(
this
.
data
}
// .windowHeight * 0.5)) {
}
// this.pixel_scale = 1
if
(
this
.
pixel_Height
>
(
this
.
data
.
windowHeight
*
0.5
))
{
// }
if
((
this
.
data
.
windowHeight
*
0.5
)
/
this
.
pixel_Height
<
this
// }
.
pixel_scale
)
{
// if (this.pixel_Height > (this.data.windowHeight * 0.5)) {
this
.
pixel_scale
=
(
this
.
data
.
windowHeight
*
0.5
)
/
this
.
pixel_Height
// if ((this.data.windowHeight * 0.5) / this.pixel_Height
<
this
}
// .pixel_scale) {
}
else
{
// this.pixel_scale = (this.data.windowHeight * 0.5) / this.pixel_Height
if
(
this
.
pixel_Width
<
(
this
.
data
.
windowWidth
*
0.5
)
&&
this
.
pixel_Height
<
(
this
.
data
// }
.
windowHeight
*
this
.
pixelScale
))
{
// } else {
this
.
pixel_scale
=
1
// if (this.pixel_Width
<
(
this
.
data
.
windowWidth
*
0.5
)
&&
this
.
pixel_Height
<
(
this
.
data
}
// .windowHeight * this.pixelScale)) {
}
// this.pixel_scale = 1
// }
// }
let
real_width
=
Number
(
this
.
inputWidth
);
let
real_width
=
Number
(
this
.
inputWidth
);
let
real_height
=
Number
(
this
.
inputHeight
);
let
real_height
=
Number
(
this
.
inputHeight
);
if
(
real_width
>
real_height
)
{
if
(
real_width
>
real_height
)
{
...
@@ -704,6 +681,33 @@
...
@@ -704,6 +681,33 @@
return
Height
return
Height
},
},
//获取屏幕比例
getWindowScale
()
{
if
(
this
.
pixel_Width
>
(
this
.
data
.
windowWidth
*
this
.
pixelScale
))
{
this
.
pixel_scale
=
(
this
.
data
.
windowWidth
*
this
.
pixelScale
)
/
this
.
pixel_Width
}
else
{
if
(
this
.
pixel_Width
<
(
this
.
data
.
windowWidth
*
this
.
pixelScale
)
&&
this
.
pixel_Height
<
(
this
.
data
.
windowHeight
*
this
.
pixelScale
))
{
this
.
pixel_scale
=
1
}
}
if
(
this
.
pixel_Height
>
(
this
.
data
.
windowHeight
*
this
.
pixelScale
))
{
if
((
this
.
data
.
windowHeight
*
this
.
pixelScale
)
/
this
.
pixel_Height
<
this
.
pixel_scale
)
{
this
.
pixel_scale
=
(
this
.
data
.
windowHeight
*
this
.
pixelScale
)
/
this
.
pixel_Height
}
}
else
{
if
(
this
.
pixel_Width
<
(
this
.
data
.
windowWidth
*
this
.
pixelScale
)
&&
this
.
pixel_Height
<
(
this
.
data
.
windowHeight
*
this
.
pixelScale
))
{
this
.
pixel_scale
=
1
}
}
},
setData
(
obj
)
{
setData
(
obj
)
{
let
that
=
this
;
let
that
=
this
;
let
keys
=
[];
let
keys
=
[];
...
@@ -801,7 +805,6 @@
...
@@ -801,7 +805,6 @@
//做滚动加载使用
//做滚动加载使用
loadMore
()
{
loadMore
()
{
//this.queryPage.page = this.queryPage.page + 1;
//this.queryPage.page = this.queryPage.page + 1;
//this.loadGoodsList(Enums.DATA_DIRECTION.DOWN);
//this.loadGoodsList(Enums.DATA_DIRECTION.DOWN);
},
},
...
@@ -813,13 +816,10 @@
...
@@ -813,13 +816,10 @@
machine_id
:
this
.
queryPage
.
machine_id
machine_id
:
this
.
queryPage
.
machine_id
};
};
homeservice
.
queryList
(
data
).
then
(
res
=>
{
homeservice
.
queryList
(
data
).
then
(
res
=>
{
let
width
=
this
.
render_cove_width
/
this
.
OldConvert_rate
let
width
=
this
.
render_cove_width
/
this
.
OldConvert_rate
let
height
=
this
.
render_cove_height
/
this
.
OldConvert_rate
let
height
=
this
.
render_cove_height
/
this
.
OldConvert_rate
//this.render_cove_width = this.machineDetail.size.width * this.OldConvert_rate //最大宽度
//this.render_cove_width = this.machineDetail.size.width * this.OldConvert_rate //最大宽度
//this.render_cove_height = this.machineDetail.size.height * this.OldConvert_rate //最大高度
//this.render_cove_height = this.machineDetail.size.height * this.OldConvert_rate //最大高度
this
.
good_id
=
res
.
id
this
.
good_id
=
res
.
id
this
.
good
=
res
this
.
good
=
res
this
.
wValue
=
width
*
this
.
OldConvert_rate
//固定宽高比率计算(像素)
this
.
wValue
=
width
*
this
.
OldConvert_rate
//固定宽高比率计算(像素)
...
@@ -831,24 +831,26 @@
...
@@ -831,24 +831,26 @@
this
.
pixel_Width
=
width
*
this
.
OldConvert_rate
//实际(像素)
this
.
pixel_Width
=
width
*
this
.
OldConvert_rate
//实际(像素)
this
.
pixel_Height
=
height
*
this
.
OldConvert_rate
//实际(像素)
this
.
pixel_Height
=
height
*
this
.
OldConvert_rate
//实际(像素)
if
(
this
.
pixel_Width
>
(
this
.
data
.
windowWidth
*
0.5
))
{
this
.
getWindowScale
();
this
.
pixel_scale
=
(
this
.
data
.
windowWidth
*
0.5
)
/
this
.
pixel_Width
}
else
{
// if (this.pixel_Width > (this.data.windowWidth * 0.5)) {
if
(
this
.
pixel_Width
<
(
this
.
data
.
windowWidth
*
0.5
)
&&
// this.pixel_scale = (this.data.windowWidth * 0.5) / this.pixel_Width
this
.
pixel_Height
<
(
this
.
data
.
windowHeight
*
0.5
))
{
// } else {
this
.
pixel_scale
=
1
// if (this.pixel_Width
<
(
this
.
data
.
windowWidth
*
0.5
)
&&
}
// this.pixel_Height
<
(
this
.
data
.
windowHeight
*
0.5
))
{
}
// this.pixel_scale = 1
if
(
this
.
pixel_Height
>
(
this
.
data
.
windowHeight
*
0.5
))
{
// }
if
((
this
.
data
.
windowHeight
*
0.5
)
/
this
.
pixel_Height
<
1
)
{
// }
this
.
pixel_scale
=
(
this
.
data
.
windowHeight
*
0.5
)
/
this
.
pixel_Height
// if (this.pixel_Height > (this.data.windowHeight * 0.5)) {
}
// if ((this.data.windowHeight * 0.5) / this.pixel_Height
<
1
)
{
}
else
{
// this.pixel_scale = (this.data.windowHeight * 0.5) / this.pixel_Height
if
(
this
.
pixel_Width
<
(
this
.
data
.
windowWidth
*
0.5
)
&&
this
.
pixel_Height
<
(
this
.
data
// }
.
windowHeight
*
this
.
pixelScale
))
{
// } else {
this
.
pixel_scale
=
1
// if (this.pixel_Width
<
(
this
.
data
.
windowWidth
*
0.5
)
&&
this
.
pixel_Height
<
(
this
.
data
}
// .windowHeight * this.pixelScale)) {
}
// this.pixel_scale = 1
// }
// }
let
real_width
=
Number
(
this
.
inputWidth
);
let
real_width
=
Number
(
this
.
inputWidth
);
let
real_height
=
Number
(
this
.
inputHeight
);
let
real_height
=
Number
(
this
.
inputHeight
);
...
@@ -867,8 +869,7 @@
...
@@ -867,8 +869,7 @@
//查设备明细
//查设备明细
getDetailMachine
()
{
getDetailMachine
()
{
this
.
OldConvert_rate
=
10
//this.OldConvert_rate = 10
this
.
getCustomSizeInfo
();
this
.
getCustomSizeInfo
();
// homeservice.WorksList({
// homeservice.WorksList({
// machine_id: this.queryPage.machine_id,
// machine_id: this.queryPage.machine_id,
...
...
util/wx-touch-event.js
View file @
5ca35981
...
@@ -133,7 +133,6 @@ class WxTouchEvent {
...
@@ -133,7 +133,6 @@ class WxTouchEvent {
},
0
)
},
0
)
}
else
{
}
else
{
this
.
tapTimeout
=
setTimeout
(
function
()
{
this
.
tapTimeout
=
setTimeout
(
function
()
{
console
.
info
(
"tap"
);
evt
.
type
=
"tap"
;
evt
.
type
=
"tap"
;
self
.
tap
.
dispatch
(
evt
);
self
.
tap
.
dispatch
(
evt
);
// trigger double tap immediately
// trigger double tap immediately
...
...
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