Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
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
李俊赕
self-support
Commits
d4b00a44
Commit
d4b00a44
authored
May 11, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
照片预览样式修改
parent
e596160f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
preview.vue
src/components/photo/preview.vue
+26
-26
No files found.
src/components/photo/preview.vue
View file @
d4b00a44
...
...
@@ -15,7 +15,7 @@
<
script
>
import
qiniup
from
'@/components/upload/qiniup'
;
const
app
=
getApp
()
export
default
{
export
default
{
props
:
{},
mixins
:
[
qiniup
],
data
()
{
...
...
@@ -28,12 +28,12 @@
files
:
[],
keys
:
[],
token
:
''
,
product
:
''
,
product
:
''
,
allImages
:
[]
}
},
created
(
e
)
{
// 获取照片选项对象
// 获取照片选项对象
console
.
log
(
getApp
().
globalData
.
photo
.
currentItem
)
const
product
=
app
.
globalData
.
photo
.
product
this
.
product
=
`?brandId=
${
product
.
brandId
}
&brand=
${
product
.
brandName
}
&classifyId=
${
product
.
classifyId
}
&systemId=
${
product
.
systemId
}
`
...
...
@@ -61,8 +61,8 @@
if
(
!
photo
.
tempPath
){
return
}
let
path
=
''
if
(
photo
.
tempPath
.
origin
){
let
path
=
''
if
(
photo
.
tempPath
.
origin
){
// 保存原图到本地
path
=
photo
.
tempPath
.
origin
let
result
=
await
this
.
saveLocal
(
path
)
...
...
@@ -72,10 +72,10 @@
title
:
'已将照片原图保存到本地相册'
})
}
}
}
// if(photo.currentItem){
// photo.currentItem.imageList.unshift(photo.tempPath.mixWater)
// }
// }
// if(photo.productList && photo.productList[photo.topIndex]){
// const topArr = photo.productList[photo.topIndex]
...
...
@@ -83,8 +83,8 @@
// topArr[photo.itemIndex].imageList.push(photo.tempPath.mixWater)
// }
// }
// photo.
if
(
photo
.
tempPath
.
mixWater
){
// photo.
if
(
photo
.
tempPath
.
mixWater
){
// 保存水印处理图片到本地
path
=
photo
.
tempPath
.
mixWater
let
result1
=
await
this
.
saveLocal
(
path
)
...
...
@@ -117,37 +117,37 @@
},
// 重拍图片
remakePhoto
()
{
remakePhoto
()
{
this
.
$emit
(
'changeType'
,
1
)
},
finishPhoto
(){
const
photo
=
getApp
().
globalData
.
photo
photo
.
currentItemLength
=
10
this
.
continuePhoto
()
// 完成本项
this
.
continuePhoto
()
// 完成本项
//this.$emit('finish')
},
// 确认图片
continuePhoto
()
{
continuePhoto
()
{
const
photo
=
getApp
().
globalData
.
photo
let
self
=
this
uni
.
showLoading
({
title
:
'图片保存中…'
})
self
.
saveTempToLocal
()
self
.
saveTempToLocal
()
self
.
confirmUpload
(
true
)
},
submitFile
()
{
const
photo
=
getApp
().
globalData
.
photo
if
(
photo
.
currentItemLength
<
10
)
photo
.
currentItemLength
=
photo
.
currentItemLength
+
1
uni
.
hideLoading
()
// 当前项的图片显示
// 拍照项张数目增加 等于10张
photo
.
allImages
.
unshift
(
this
.
fileMaps
[
0
])
if
(
photo
.
currentItemLength
<
10
){
this
.
$emit
(
'changeType'
,
1
)
}
else
{
this
.
$emit
(
'finish'
)
submitFile
()
{
const
photo
=
getApp
().
globalData
.
photo
if
(
photo
.
currentItemLength
<
10
)
photo
.
currentItemLength
=
photo
.
currentItemLength
+
1
uni
.
hideLoading
()
// 当前项的图片显示
// 拍照项张数目增加 等于10张
photo
.
allImages
.
unshift
(
this
.
fileMaps
[
0
])
if
(
photo
.
currentItemLength
<
10
){
this
.
$emit
(
'changeType'
,
1
)
}
else
{
this
.
$emit
(
'finish'
)
}
},
downloadImages
()
{
...
...
@@ -198,7 +198,7 @@
}
.bottomView
{
box-shadow
:
0
0
1rpx
6rpx
rgba
(
255
,
255
,
255
,
0
.05
);
//
box-shadow: 0 0 1rpx 6rpx rgba(255,255,255,0.05);
background-color
:
#333333
;
width
:
100%
;
padding
:
70rpx
0
;
...
...
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