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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
26 additions
and
169 deletions
+26
-169
pages/index/head/head.vue
+1
-1
pages/index/index.vue
+0
-0
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
+12
-93
pages/mall/lineUp.vue
+3
-4
pages/mall/size.vue
+0
-0
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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