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
Expand all
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"
:
[
"ucenter/index"
,
"business/pages/webview/index"
...
...
business/pages/commenteditor/imagecomment.js
View file @
785ac3e0
...
...
@@ -498,9 +498,9 @@ Page({
if
(
this
.
data
.
audioStatus
.
playStatus
==
'no'
)
{
this
.
recorderManager
.
start
({
duration
:
600000
,
sampleRate
:
8
000
,
sampleRate
:
16
000
,
numberOfChannels
:
1
,
encodeBitRate
:
20
000
,
encodeBitRate
:
48
000
,
format
:
'aac'
,
// frameSize: 50
})
...
...
business/pages/commenteditor/index.js
View file @
785ac3e0
...
...
@@ -1442,6 +1442,9 @@ Page({
this
.
setData
({
imageUploaded
:
true
})
if
(
this
.
data
.
tempFilesImgs
.
length
>
0
)
{
this
.
data
.
tempFilesImgs
=
[];
}
return
;
}
imageBox
[
this
.
data
.
currentIndex
].
status
=
'resolving'
;
...
...
@@ -1683,27 +1686,27 @@ Page({
const
that
=
this
;
const
imgUrls
=
filterImage
.
map
((
item
)
=>
{
return
item
.
src
})
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
++
){
// const url = imagify(imgUrls[i], 'image/resize,w_800/format,jpg/quality,q_50');
const
url
=
imagify
(
imgUrls
[
i
]);
wxGetImageInfo
({
src
:
url
}).
then
((
res
)
=>
{
let
imageWidth
=
''
;
let
imageHeight
=
''
;
if
(
res
.
width
>
res
.
height
){
imageWidth
=
this
.
data
.
windowWidth
;
imageHeight
=
imageWidth
*
(
res
.
height
/
res
.
width
);
}
else
{
imageHeight
=
res
.
height
>
maxImgHeight
?
maxImgHeight
:
res
.
height
;
imageWidth
=
imageHeight
*
(
res
.
width
/
res
.
height
);
}
// let imageWidth ='';
// let imageHeight = '';
// if(res.width > res.height){
// imageWidth = this.data.windowWidth;
// imageHeight = imageWidth * (res.height/res.width);
// }else{
// imageHeight = res.height>maxImgHeight ? maxImgHeight : res.height;
// imageWidth = imageHeight * (res.width/res.height);
// }
that
.
data
.
imgInfoList
[
i
]
=
{
imageHeight
,
imageWidth
,
imageHeight
:
res
.
height
,
imageWidth
:
res
.
width
,
orientation
:
res
.
orientation
,
actTemPath
:
res
.
path
,
src
:
url
}
}).
catch
(()
=>
{
})
}
...
...
business/pages/commenteditor/taggedpicture.js
View file @
785ac3e0
This diff is collapsed.
Click to expand it.
business/pages/commenteditor/taggedpicture.wxml
View file @
785ac3e0
...
...
@@ -19,10 +19,36 @@
</view>
</view>
<view class="content-box">
<view class="img-wrapper" style="width: {{imgInfoList[AcSubIndex].imageWidth}}px; height:{{imgInfoList[AcSubIndex].imageHeight}}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 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="" />
<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>
<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="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}}">
<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>
...
...
@@ -48,5 +74,5 @@
</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: {{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" -->
\ No newline at end of file
constants/constants.js
View file @
785ac3e0
export
default
{
imageRoot
:
'https://cdn.img.shangjiadao.cn/qingxiao/dakav2/images/'
,
host
:
'https://qxapi.qingxiao.online/daka'
,
host2
:
'https://wx.m.shangjiadao.cn'
,
//
host: 'https://qxapi.qingxiao.online/daka',
//
host2: 'https://wx.m.shangjiadao.cn',
storageVersion
:
'5.0'
,
imageVersion
:
'20200420'
,
//
host: 'https://clock.wp53.cn',
//
host2: 'https://test.wp53.cn',
host
:
'https://clock.wp53.cn'
,
host2
:
'https://test.wp53.cn'
,
appId
:
'wxc1246ea029394785'
,
miniProgram
:
{
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