Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
785ac3e0
Commit
785ac3e0
authored
Apr 24, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Plain Diff
fix
parents
8d4d9c7f
136574b7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
170 additions
and
104 deletions
+170
-104
app.json
app.json
+1
-0
imagecomment.js
business/pages/commenteditor/imagecomment.js
+2
-2
index.js
business/pages/commenteditor/index.js
+17
-14
taggedpicture.js
business/pages/commenteditor/taggedpicture.js
+115
-79
taggedpicture.wxml
business/pages/commenteditor/taggedpicture.wxml
+31
-5
constants.js
constants/constants.js
+4
-4
No files found.
app.json
View file @
785ac3e0
{
{
"requiredBackgroundModes"
:
[
"audio"
],
"pages"
:
[
"pages"
:
[
"ucenter/index"
,
"ucenter/index"
,
"business/pages/webview/index"
"business/pages/webview/index"
...
...
business/pages/commenteditor/imagecomment.js
View file @
785ac3e0
...
@@ -498,9 +498,9 @@ Page({
...
@@ -498,9 +498,9 @@ Page({
if
(
this
.
data
.
audioStatus
.
playStatus
==
'no'
)
{
if
(
this
.
data
.
audioStatus
.
playStatus
==
'no'
)
{
this
.
recorderManager
.
start
({
this
.
recorderManager
.
start
({
duration
:
600000
,
duration
:
600000
,
sampleRate
:
8
000
,
sampleRate
:
16
000
,
numberOfChannels
:
1
,
numberOfChannels
:
1
,
encodeBitRate
:
20
000
,
encodeBitRate
:
48
000
,
format
:
'aac'
,
format
:
'aac'
,
// frameSize: 50
// frameSize: 50
})
})
...
...
business/pages/commenteditor/index.js
View file @
785ac3e0
...
@@ -1442,6 +1442,9 @@ Page({
...
@@ -1442,6 +1442,9 @@ Page({
this
.
setData
({
this
.
setData
({
imageUploaded
:
true
imageUploaded
:
true
})
})
if
(
this
.
data
.
tempFilesImgs
.
length
>
0
)
{
this
.
data
.
tempFilesImgs
=
[];
}
return
;
return
;
}
}
imageBox
[
this
.
data
.
currentIndex
].
status
=
'resolving'
;
imageBox
[
this
.
data
.
currentIndex
].
status
=
'resolving'
;
...
@@ -1683,27 +1686,27 @@ Page({
...
@@ -1683,27 +1686,27 @@ Page({
const
that
=
this
;
const
that
=
this
;
const
imgUrls
=
filterImage
.
map
((
item
)
=>
{
return
item
.
src
})
const
imgUrls
=
filterImage
.
map
((
item
)
=>
{
return
item
.
src
})
this
.
data
.
imgInfoList
=
new
Array
(
imgUrls
.
length
);
this
.
data
.
imgInfoList
=
new
Array
(
imgUrls
.
length
);
const
maxImgHeight
=
this
.
data
.
windowHeight
-
180
;
//
const maxImgHeight = this.data.windowHeight - 180;
for
(
let
i
=
0
;
i
<
imgUrls
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
imgUrls
.
length
;
i
++
){
// const url = imagify(imgUrls[i], 'image/resize,w_800/format,jpg/quality,q_50');
// const url = imagify(imgUrls[i], 'image/resize,w_800/format,jpg/quality,q_50');
const
url
=
imagify
(
imgUrls
[
i
]);
const
url
=
imagify
(
imgUrls
[
i
]);
wxGetImageInfo
({
src
:
url
}).
then
((
res
)
=>
{
wxGetImageInfo
({
src
:
url
}).
then
((
res
)
=>
{
let
imageWidth
=
''
;
// let imageWidth ='';
let
imageHeight
=
''
;
// let imageHeight = '';
if
(
res
.
width
>
res
.
height
){
// if(res.width > res.height){
imageWidth
=
this
.
data
.
windowWidth
;
// imageWidth = this.data.windowWidth;
imageHeight
=
imageWidth
*
(
res
.
height
/
res
.
width
);
// imageHeight = imageWidth * (res.height/res.width);
}
else
{
// }else{
imageHeight
=
res
.
height
>
maxImgHeight
?
maxImgHeight
:
res
.
height
;
// imageHeight = res.height>maxImgHeight ? maxImgHeight : res.height;
imageWidth
=
imageHeight
*
(
res
.
width
/
res
.
height
);
// imageWidth = imageHeight * (res.width/res.height);
}
// }
that
.
data
.
imgInfoList
[
i
]
=
{
that
.
data
.
imgInfoList
[
i
]
=
{
imageHeight
,
imageHeight
:
res
.
height
,
imageWidth
,
imageWidth
:
res
.
width
,
orientation
:
res
.
orientation
,
actTemPath
:
res
.
path
,
actTemPath
:
res
.
path
,
src
:
url
}
}
}).
catch
(()
=>
{
}).
catch
(()
=>
{
})
})
}
}
...
...
business/pages/commenteditor/taggedpicture.js
View file @
785ac3e0
...
@@ -48,14 +48,16 @@ Page({
...
@@ -48,14 +48,16 @@ Page({
shortCanvas
:
false
,
shortCanvas
:
false
,
imgInfoList
:
[],
imgInfoList
:
[],
initImgInfoList
:
[],
initImgInfoList
:
[],
maxCanvasToTemp
:
0
maxCanvasToTemp
:
0
,
paintBoxWidth
:
0
,
paintBoxHeight
:
0
,
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
ctx
=
wx
.
createCanvasContext
(
'myCanvas'
);
const
{
const
{
sid
,
sid
,
imgString
,
imgString
,
...
@@ -63,12 +65,16 @@ Page({
...
@@ -63,12 +65,16 @@ Page({
}
=
options
;
}
=
options
;
const
thisImgs
=
imgString
?
JSON
.
parse
(
imgString
)
:
[];
const
thisImgs
=
imgString
?
JSON
.
parse
(
imgString
)
:
[];
const
thisImgInfoList
=
imgInfoList
?
JSON
.
parse
(
imgInfoList
)
:
new
Array
(
thisImgs
.
length
);
const
thisImgInfoList
=
imgInfoList
?
JSON
.
parse
(
imgInfoList
)
:
new
Array
(
thisImgs
.
length
);
thisImgInfoList
.
forEach
((
ele
)
=>
{
ele
.
copyactTemPath
=
ele
.
actTemPath
;
})
this
.
setData
({
this
.
setData
({
sid
,
sid
,
imgArr
:
thisImgs
,
imgArr
:
thisImgs
,
imgInfoList
:
thisImgInfoList
imgInfoList
:
thisImgInfoList
,
paintBoxWidth
:
this
.
data
.
windowWidth
,
paintBoxHeight
:
this
.
data
.
windowHeight
-
180
,
})
})
console
.
log
(
this
.
data
.
imgInfoList
,
'imgInfoList'
);
this
.
data
.
initImgArr
=
JSON
.
parse
(
JSON
.
stringify
(
thisImgs
));
this
.
data
.
initImgArr
=
JSON
.
parse
(
JSON
.
stringify
(
thisImgs
));
this
.
data
.
initImgInfoList
=
JSON
.
parse
(
JSON
.
stringify
(
thisImgInfoList
));
this
.
data
.
initImgInfoList
=
JSON
.
parse
(
JSON
.
stringify
(
thisImgInfoList
));
this
.
getImgInfo
();
this
.
getImgInfo
();
...
@@ -78,7 +84,7 @@ Page({
...
@@ -78,7 +84,7 @@ Page({
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
:
function
()
{
onReady
:
function
()
{
this
.
ctx
=
wx
.
createCanvasContext
(
'myCanvas'
);
},
},
/**
/**
...
@@ -128,11 +134,10 @@ Page({
...
@@ -128,11 +134,10 @@ Page({
if
(
this
.
data
.
AcSubIndex
==
index
){
if
(
this
.
data
.
AcSubIndex
==
index
){
return
;
return
;
}
}
this
.
saveImg
(
e
,
index
);
// this.setData({
// this.setData({
// AcSubIndex: index
// AcSubIndex: index
// })
// })
this
.
getImgInfo
(
);
this
.
saveImg
(
e
,
index
);
},
},
addLine
(){
addLine
(){
this
.
setData
({
this
.
setData
({
...
@@ -237,51 +242,65 @@ Page({
...
@@ -237,51 +242,65 @@ Page({
const
that
=
this
;
const
that
=
this
;
// let url = imagify(imgArr[AcSubIndex], 'image/resize,w_400/format,jpg/quality,q_50');
// let url = imagify(imgArr[AcSubIndex], 'image/resize,w_400/format,jpg/quality,q_50');
let
url
=
imagify
(
imgArr
[
AcSubIndex
]);
let
url
=
imagify
(
imgArr
[
AcSubIndex
]);
const
maxImgHeight
=
this
.
data
.
windowHeight
-
180
;
const
paintBoxRate
=
this
.
data
.
paintBoxWidth
/
this
.
data
.
paintBoxHeight
;
// let url = imgArr[AcSubIndex];
const
currentImgRate
=
imgInfoList
[
AcSubIndex
].
imageWidth
/
imgInfoList
[
AcSubIndex
].
imageHeight
;
console
.
log
(
this
.
data
.
imgInfoList
,
'imgInfoList'
);
if
(
currentImgRate
>
paintBoxRate
)
{
imgInfoList
[
AcSubIndex
].
width
=
this
.
data
.
paintBoxWidth
;
imgInfoList
[
AcSubIndex
].
height
=
imgInfoList
[
AcSubIndex
].
width
/
currentImgRate
;
this
.
setData
({
[
`imgInfoList[
${
AcSubIndex
}
].width`
]:
imgInfoList
[
AcSubIndex
].
width
,
[
`imgInfoList[
${
AcSubIndex
}
].height`
]:
imgInfoList
[
AcSubIndex
].
height
,
})
}
else
{
imgInfoList
[
AcSubIndex
].
width
=
this
.
data
.
paintBoxWidth
;
imgInfoList
[
AcSubIndex
].
height
=
imgInfoList
[
AcSubIndex
].
width
/
currentImgRate
;
this
.
setData
({
[
`imgInfoList[
${
AcSubIndex
}
].width`
]:
imgInfoList
[
AcSubIndex
].
width
,
[
`imgInfoList[
${
AcSubIndex
}
].height`
]:
imgInfoList
[
AcSubIndex
].
height
,
})
}
if
(
imgInfoList
[
AcSubIndex
]
&&
imgInfoList
[
AcSubIndex
].
actTemPath
)
{
if
(
imgInfoList
[
AcSubIndex
]
&&
imgInfoList
[
AcSubIndex
].
actTemPath
)
{
return
;
return
;
}
}
wxGetImageInfo
({
src
:
url
}).
then
((
res
)
=>
{
//
wxGetImageInfo({src:url}).then((res)=>{
let
imageWidth
=
''
;
//
let imageWidth ='';
let
imageHeight
=
''
;
//
let imageHeight = '';
if
(
res
.
width
>
res
.
height
){
//
if(res.width > res.height){
imageWidth
=
this
.
data
.
windowWidth
;
//
imageWidth = this.data.windowWidth;
imageHeight
=
imageWidth
*
(
res
.
height
/
res
.
width
);
//
imageHeight = imageWidth * (res.height/res.width);
}
else
{
//
}else{
imageHeight
=
res
.
height
>
maxImgHeight
?
maxImgHeight
:
res
.
height
;
//
imageHeight = res.height>maxImgHeight ? maxImgHeight : res.height;
imageWidth
=
imageHeight
*
(
res
.
width
/
res
.
height
);
//
imageWidth = imageHeight * (res.width/res.height);
}
//
}
that
.
setData
({
//
that.setData({
[
`imgInfoList[
${
AcSubIndex
}
]`
]:
{
//
[`imgInfoList[${AcSubIndex}]`]: {
imageHeight
:
imageHeight
,
//
imageHeight: imageHeight,
imageWidth
:
imageWidth
,
//
imageWidth: imageWidth,
actTemPath
:
res
.
path
,
//
actTemPath: res.path,
},
//
},
[
`initImgInfoList[
${
AcSubIndex
}
]`
]:
{
//
[`initImgInfoList[${AcSubIndex}]`]: {
imageHeight
:
imageHeight
,
//
imageHeight: imageHeight,
imageWidth
:
imageWidth
,
//
imageWidth: imageWidth,
actTemPath
:
res
.
path
,
//
actTemPath: res.path,
},
//
},
},
()
=>
{
//
}, ()=>{
// wx.createSelectorQuery().select('.img-wrapper').boundingClientRect(function(rect){
//
// wx.createSelectorQuery().select('.img-wrapper').boundingClientRect(function(rect){
// rect.height;
//
// rect.height;
// }).exec(function(res){
//
// }).exec(function(res){
// that.data.imgwrapperHeight = res[0].height;
//
// that.data.imgwrapperHeight = res[0].height;
// })
//
// })
})
//
})
}).
catch
(()
=>
{
//
}).catch(()=>{
that
.
setData
({
//
that.setData({
imageHeight
:
that
.
data
.
windowWidth
//
imageHeight: that.data.windowWidth
},()
=>
{
//
},()=>{
// wx.createSelectorQuery().select('.img-wrapper').boundingClientRect(function(rect){
//
// wx.createSelectorQuery().select('.img-wrapper').boundingClientRect(function(rect){
// rect.height; // 节点高度
//
// rect.height; // 节点高度
// }).exec(function(res){
//
// }).exec(function(res){
// that.data.imgwrapperHeight = res[0].height;
//
// that.data.imgwrapperHeight = res[0].height;
// })
//
// })
})
//
})
})
//
})
},
},
textInput
(
e
){
textInput
(
e
){
const
{
value
}
=
e
.
detail
;
const
{
value
}
=
e
.
detail
;
...
@@ -296,7 +315,6 @@ Page({
...
@@ -296,7 +315,6 @@ Page({
[
`textArr[
${
actTextIndex
}
]`
]:
textArr
[
actTextIndex
]
[
`textArr[
${
actTextIndex
}
]`
]:
textArr
[
actTextIndex
]
})
})
}
}
},
},
showInputBox
(
e
){
showInputBox
(
e
){
const
{
flag
}
=
e
.
currentTarget
.
dataset
;
const
{
flag
}
=
e
.
currentTarget
.
dataset
;
...
@@ -313,20 +331,44 @@ Page({
...
@@ -313,20 +331,44 @@ Page({
})
})
return
return
}
}
var
ctx
=
wx
.
createCanvasContext
(
'myCanvas'
);
// ctx.clearRect(0,0,750, imgInfoList[AcSubIndex].imageHeight);
// ctx.clearRect(0,0,imgInfoList[AcSubIndex].width, imgInfoList[AcSubIndex].height);
// ctx.drawImage(imgInfoList[AcSubIndex].actTemPath, 0, 0, imgInfoList[AcSubIndex].width, imgInfoList[AcSubIndex].height);
// // ctx.drawImage(imgInfoList[AcSubIndex].actTemPath, 0, 0, imgInfoList[AcSubIndex].imageWidth, imgInfoList[AcSubIndex].imageHeight);
// ctx.draw(true);
// // 线条
// for (var i = 0; i < sourceArr.length; i++) {
// this.phArr(sourceArr[i], ctx,4)
// }
// // 文字
// for (var i = 0; i < textArr.length; i++) {
// this.textWrap({
// x: textArr[i].data.left*4,
// y: textArr[i].data.top*4,
// width: 200 * 4,
// height: 14*4,
// line: 10,
// color: '#FA5251',
// size: 14*4,
// align: 'left',
// baseline: 'top',
// text: textArr[i].value,
// bold: false
// },ctx)
// }
// this.ctx.clearRect(0,0,imgInfoList[AcSubIndex].width, imgInfoList[AcSubIndex].height);
// this.ctx.drawImage(imgInfoList[AcSubIndex].actTemPath, 0, 0, imgInfoList[AcSubIndex].width, imgInfoList[AcSubIndex].height);
// this.ctx.draw(true);
wx
.
canvasToTempFilePath
({
wx
.
canvasToTempFilePath
({
x
:
0
,
x
:
0
,
y
:
0
,
y
:
0
,
// width: imgInfoList[AcSubIndex].imageWidth,
width
:
imgInfoList
[
AcSubIndex
].
width
,
// height: imgInfoList[AcSubIndex].imageHeight,
height
:
imgInfoList
[
AcSubIndex
].
height
,
// destWidth: imgInfoList[AcSubIndex].imageWidth,
destWidth
:
imgInfoList
[
AcSubIndex
].
width
,
// destHeight: imgInfoList[AcSubIndex].imageHeight,
destHeight
:
imgInfoList
[
AcSubIndex
].
height
,
// canvasId: 'myCanvas',
width
:
imgInfoList
[
AcSubIndex
].
imageWidth
,
height
:
imgInfoList
[
AcSubIndex
].
imageHeight
,
destWidth
:
imgInfoList
[
AcSubIndex
].
imageWidth
,
destHeight
:
imgInfoList
[
AcSubIndex
].
imageHeight
,
canvasId
:
'myCanvas'
,
canvasId
:
'myCanvas'
,
fileType
:
'
jp
g'
,
fileType
:
'
pn
g'
,
quality
:
1
,
quality
:
1
,
success
(
res
)
{
success
(
res
)
{
const
tempFilePath
=
res
.
tempFilePath
;
const
tempFilePath
=
res
.
tempFilePath
;
...
@@ -342,7 +384,6 @@ Page({
...
@@ -342,7 +384,6 @@ Page({
fail
(
res
){
fail
(
res
){
}
}
})
})
},
},
sureTextInput
(){
sureTextInput
(){
const
{
inputFlag
,
addInputValue
,
textArr
,
actTextIndex
}
=
this
.
data
;
const
{
inputFlag
,
addInputValue
,
textArr
,
actTextIndex
}
=
this
.
data
;
...
@@ -435,8 +476,8 @@ Page({
...
@@ -435,8 +476,8 @@ Page({
}
}
var
ctx
=
wx
.
createCanvasContext
(
'tempCanvas'
);
var
ctx
=
wx
.
createCanvasContext
(
'tempCanvas'
);
// ctx.clearRect(0,0,750, imgInfoList[AcSubIndex].imageHeight);
// ctx.clearRect(0,0,750, imgInfoList[AcSubIndex].imageHeight);
ctx
.
clearRect
(
0
,
0
,
imgInfoList
[
AcSubIndex
].
imageWidth
*
4
,
imgInfoList
[
AcSubIndex
].
imageH
eight
*
4
);
ctx
.
clearRect
(
0
,
0
,
imgInfoList
[
AcSubIndex
].
width
*
4
,
imgInfoList
[
AcSubIndex
].
h
eight
*
4
);
ctx
.
drawImage
(
imgInfoList
[
AcSubIndex
].
actTemPath
,
0
,
0
,
imgInfoList
[
AcSubIndex
].
imageWidth
*
4
,
imgInfoList
[
AcSubIndex
].
imageH
eight
*
4
);
ctx
.
drawImage
(
imgInfoList
[
AcSubIndex
].
actTemPath
,
0
,
0
,
imgInfoList
[
AcSubIndex
].
width
*
4
,
imgInfoList
[
AcSubIndex
].
h
eight
*
4
);
// ctx.drawImage(imgInfoList[AcSubIndex].actTemPath, 0, 0, imgInfoList[AcSubIndex].imageWidth, imgInfoList[AcSubIndex].imageHeight);
// ctx.drawImage(imgInfoList[AcSubIndex].actTemPath, 0, 0, imgInfoList[AcSubIndex].imageWidth, imgInfoList[AcSubIndex].imageHeight);
ctx
.
draw
(
true
);
ctx
.
draw
(
true
);
// 线条
// 线条
...
@@ -495,12 +536,8 @@ Page({
...
@@ -495,12 +536,8 @@ Page({
if
(
imgInfoList
[
AcSubIndex
].
isDraw
){
if
(
imgInfoList
[
AcSubIndex
].
isDraw
){
this
.
setData
({
this
.
setData
({
[
`imgArr[
${
AcSubIndex
}
]`
]:
initImgArr
[
AcSubIndex
],
[
`imgArr[
${
AcSubIndex
}
]`
]:
initImgArr
[
AcSubIndex
],
[
`imgInfoList[
${
AcSubIndex
}
]`
]:
{
[
`imgInfoList[
${
AcSubIndex
}
].actTemPath`
]:
imgInfoList
[
AcSubIndex
].
copyactTemPath
,
imageWidth
:
imgInfoList
[
AcSubIndex
].
imageWidth
,
[
`imgInfoList[
${
AcSubIndex
}
].isDraw`
]:
false
imageHeight
:
imgInfoList
[
AcSubIndex
].
imageHeight
,
actTemPath
:
initImgInfoList
[
AcSubIndex
].
actTemPath
,
isDraw
:
false
},
})
})
}
}
this
.
setData
({
this
.
setData
({
...
@@ -574,14 +611,10 @@ Page({
...
@@ -574,14 +611,10 @@ Page({
wx
.
canvasToTempFilePath
({
wx
.
canvasToTempFilePath
({
x
:
0
,
x
:
0
,
y
:
0
,
y
:
0
,
width
:
imgInfoList
[
AcSubIndex
].
imageWidth
*
4
,
width
:
imgInfoList
[
AcSubIndex
].
width
*
4
,
height
:
imgInfoList
[
AcSubIndex
].
imageHeight
*
4
,
height
:
imgInfoList
[
AcSubIndex
].
height
*
4
,
destWidth
:
imgInfoList
[
AcSubIndex
].
imageWidth
*
4
,
destWidth
:
imgInfoList
[
AcSubIndex
].
width
*
4
,
destHeight
:
imgInfoList
[
AcSubIndex
].
imageHeight
*
4
,
destHeight
:
imgInfoList
[
AcSubIndex
].
height
*
4
,
// width: imgInfoList[AcSubIndex].imageWidth,
// height: imgInfoList[AcSubIndex].imageHeight,
// destWidth: imgInfoList[AcSubIndex].imageWidth,
// destHeight: imgInfoList[AcSubIndex].imageHeight,
canvasId
:
'tempCanvas'
,
canvasId
:
'tempCanvas'
,
fileType
:
'jpg'
,
fileType
:
'jpg'
,
quality
:
1
,
quality
:
1
,
...
@@ -594,7 +627,10 @@ Page({
...
@@ -594,7 +627,10 @@ Page({
[
`imgInfoList[
${
AcSubIndex
}
]`
]:
{
[
`imgInfoList[
${
AcSubIndex
}
]`
]:
{
imageWidth
:
imgInfoList
[
AcSubIndex
].
imageWidth
,
imageWidth
:
imgInfoList
[
AcSubIndex
].
imageWidth
,
imageHeight
:
imgInfoList
[
AcSubIndex
].
imageHeight
,
imageHeight
:
imgInfoList
[
AcSubIndex
].
imageHeight
,
width
:
imgInfoList
[
AcSubIndex
].
width
,
height
:
imgInfoList
[
AcSubIndex
].
height
,
actTemPath
:
tempFilePath
,
actTemPath
:
tempFilePath
,
copyactTemPath
:
imgInfoList
[
AcSubIndex
].
copyactTemPath
,
isDraw
:
true
isDraw
:
true
},
},
textArr
:[],
textArr
:[],
...
@@ -604,8 +640,8 @@ Page({
...
@@ -604,8 +640,8 @@ Page({
})
})
if
(
type
==
"next"
||
index
||
index
==
0
){
if
(
type
==
"next"
||
index
||
index
==
0
){
that
.
setData
({
that
.
setData
({
AcSubIndex
:(
index
||
index
==
0
)
?
index
:
that
.
data
.
AcSubIndex
+=
1
,
AcSubIndex
:
(
index
||
index
==
0
)
?
index
:
that
.
data
.
AcSubIndex
+=
1
,
shortCanvas
:
false
,
shortCanvas
:
false
,
})
})
that
.
getImgInfo
();
that
.
getImgInfo
();
}
else
if
(
type
==
"back"
){
}
else
if
(
type
==
"back"
){
...
...
business/pages/commenteditor/taggedpicture.wxml
View file @
785ac3e0
...
@@ -19,10 +19,36 @@
...
@@ -19,10 +19,36 @@
</view>
</view>
</view>
</view>
<view class="content-box">
<view class="content-box">
<view class="img-wrapper" style="width: {{imgInfoList[AcSubIndex].imageWidth}}px; height:{{imgInfoList[AcSubIndex].imageHeight}}px">
<view class="img-wrapper" style="width: {{imgInfoList[AcSubIndex].width}}px; height:{{imgInfoList[AcSubIndex].height}}px">
<image class="myimg" src="{{myimg}}" wx:if="{{shortCanvas && myimg}}" style="height:{{imgInfoList[AcSubIndex].imageHeight}}px" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
<image
<image class="cur-img" src="{{imgInfoList[AcSubIndex].isDraw ? imgArr[AcSubIndex] : filter.imagify(imgArr[AcSubIndex], 'image/resize,w_750/format,jpg')}}" style="height:{{imgInfoList[AcSubIndex].imageHeight}}px" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
class="myimg"
<canvas class="myCanvas {{shortCanvas? 'shortCanvas': ''}}" canvas-id="myCanvas" disable-scroll="true" bindtouchstart="doodleStart" bindtouchend="doodleEnd" bindtouchmove="doodleMove" style="width: {{imgInfoList[AcSubIndex].imageWidth}}px; height:{{imgInfoList[AcSubIndex].imageHeight}}px"></canvas>
src="{{myimg}}"
wx:if="{{shortCanvas && myimg}}"
style="width: {{imgInfoList[AcSubIndex].width}}px; height:{{imgInfoList[AcSubIndex].height}}px"
mode="aspectFit|aspectFill|widthFix"
lazy-load="false"
binderror=""
bindload=""
/>
<image
class="cur-img"
src="{{imgInfoList[AcSubIndex].isDraw ? imgArr[AcSubIndex] : filter.imagify(imgArr[AcSubIndex], 'image/resize,w_750/format,jpg')}}"
style="width: {{imgInfoList[AcSubIndex].width}}px; height:{{imgInfoList[AcSubIndex].height}}px"
mode="aspectFit|aspectFill|widthFix"
lazy-load="false"
binderror=""
bindload=""
/>
<canvas
class="myCanvas {{shortCanvas? 'shortCanvas': ''}}"
canvas-id="myCanvas"
disable-scroll="true"
bindtouchstart="doodleStart"
bindtouchend="doodleEnd"
bindtouchmove="doodleMove"
style="width: {{imgInfoList[AcSubIndex].width}}px; height:{{imgInfoList[AcSubIndex].height}}px"
>
</canvas>
<block wx:if="{{textArr.length>0}}">
<block wx:if="{{textArr.length>0}}">
<view class="text-box" animation="{{animationData}}" bindtouchstart="textMoveStart" bindtouchmove="textMove" bindtouchend="textMoveEnd" wx:for="{{textArr}}" data-index="{{index}}" wx:key="index" style="left: {{item.data.left}}px; top: {{item.data.top}}px"><view class="close" bindtap="deleteText"><image class="" src="{{imageRoot}}2b/comment/icon_cancal.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" /></view>{{item.value}}</view>
<view class="text-box" animation="{{animationData}}" bindtouchstart="textMoveStart" bindtouchmove="textMove" bindtouchend="textMoveEnd" wx:for="{{textArr}}" data-index="{{index}}" wx:key="index" style="left: {{item.data.left}}px; top: {{item.data.top}}px"><view class="close" bindtap="deleteText"><image class="" src="{{imageRoot}}2b/comment/icon_cancal.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" /></view>{{item.value}}</view>
</block>
</block>
...
@@ -48,5 +74,5 @@
...
@@ -48,5 +74,5 @@
</view>
</view>
<!-- <canvas canvas-id="tempCanvas" disable-scroll="true" style="width:200%; height:{{imgInfoList[AcSubIndex].imageHeight*2}}px; position:absolute;left:-999999px"></canvas> -->
<!-- <canvas canvas-id="tempCanvas" disable-scroll="true" style="width:200%; height:{{imgInfoList[AcSubIndex].imageHeight*2}}px; position:absolute;left:-999999px"></canvas> -->
<canvas canvas-id="tempCanvas" disable-scroll="true" style="width: {{imgInfoList[AcSubIndex].
imageWidth * 4}}px; height:{{imgInfoList[AcSubIndex].imageH
eight * 4}}px; position:absolute;left:-999999px"></canvas>
<canvas canvas-id="tempCanvas" disable-scroll="true" style="width: {{imgInfoList[AcSubIndex].
width * 4}}px; height:{{imgInfoList[AcSubIndex].h
eight * 4}}px; position:absolute;left:-999999px"></canvas>
<!-- style="width: {{imgInfoList[AcSubIndex].imageWidth}}px; height:{{imgInfoList[AcSubIndex].imageHeight}}px" -->
<!-- style="width: {{imgInfoList[AcSubIndex].imageWidth}}px; height:{{imgInfoList[AcSubIndex].imageHeight}}px" -->
\ No newline at end of file
constants/constants.js
View file @
785ac3e0
export
default
{
export
default
{
imageRoot
:
'https://cdn.img.shangjiadao.cn/qingxiao/dakav2/images/'
,
imageRoot
:
'https://cdn.img.shangjiadao.cn/qingxiao/dakav2/images/'
,
host
:
'https://qxapi.qingxiao.online/daka'
,
//
host: 'https://qxapi.qingxiao.online/daka',
host2
:
'https://wx.m.shangjiadao.cn'
,
//
host2: 'https://wx.m.shangjiadao.cn',
storageVersion
:
'5.0'
,
storageVersion
:
'5.0'
,
imageVersion
:
'20200420'
,
imageVersion
:
'20200420'
,
//
host: 'https://clock.wp53.cn',
host
:
'https://clock.wp53.cn'
,
//
host2: 'https://test.wp53.cn',
host2
:
'https://test.wp53.cn'
,
appId
:
'wxc1246ea029394785'
,
appId
:
'wxc1246ea029394785'
,
miniProgram
:
{
miniProgram
:
{
clock
:
'wxdeee20e52a1fd7ee'
clock
:
'wxdeee20e52a1fd7ee'
...
...
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