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
4a5a743a
Commit
4a5a743a
authored
Apr 26, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
相机组件传参修改
parent
1a086996
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
17 deletions
+27
-17
App.vue
src/App.vue
+1
-0
preview.vue
src/components/photo/preview.vue
+10
-10
setting.vue
src/components/photo/setting.vue
+1
-1
index.vue
src/components/take/index.vue
+15
-6
No files found.
src/App.vue
View file @
4a5a743a
...
@@ -67,6 +67,7 @@ export default {
...
@@ -67,6 +67,7 @@ export default {
currentItem
:
null
,
// 选择的某一项
currentItem
:
null
,
// 选择的某一项
setting
:
null
,
//自定义设置
setting
:
null
,
//自定义设置
waterSetting
:
null
,
// 水印设置
waterSetting
:
null
,
// 水印设置
allImages
:
[],
tempPath
:
{
tempPath
:
{
origin
:
''
,
// 缓存拍照图片
origin
:
''
,
// 缓存拍照图片
mixWater
:
''
// 缓存水印拍照图片
mixWater
:
''
// 缓存水印拍照图片
...
...
src/components/photo/preview.vue
View file @
4a5a743a
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
keys
:
[],
keys
:
[],
token
:
''
,
token
:
''
,
product
:
''
,
product
:
''
,
allImages
:
[]
}
}
},
},
created
(
e
)
{
created
(
e
)
{
...
@@ -37,10 +38,10 @@
...
@@ -37,10 +38,10 @@
console
.
log
(
getApp
().
globalData
.
photo
.
currentItem
)
console
.
log
(
getApp
().
globalData
.
photo
.
currentItem
)
const
product
=
app
.
globalData
.
photo
.
product
const
product
=
app
.
globalData
.
photo
.
product
this
.
product
=
`?brandId=
${
product
.
brandId
}
&brand=
${
product
.
brandName
}
&classifyId=
${
product
.
classifyId
}
&systemId=
${
product
.
systemId
}
`
this
.
product
=
`?brandId=
${
product
.
brandId
}
&brand=
${
product
.
brandName
}
&classifyId=
${
product
.
classifyId
}
&systemId=
${
product
.
systemId
}
`
//
if(app.globalData.photo.currentItem) {
if
(
app
.
globalData
.
photo
.
currentItem
)
{
//
// 获取规格Id
// 获取规格Id
//
this.standardId = app.globalData.photo.currentItem._id
this
.
standardId
=
app
.
globalData
.
photo
.
currentItem
.
_id
//
}
}
getApp
().
trackPage
(
'照片预览页'
)
getApp
().
trackPage
(
'照片预览页'
)
const
globalTempPath
=
getApp
().
globalData
.
photo
.
tempPath
const
globalTempPath
=
getApp
().
globalData
.
photo
.
tempPath
...
@@ -50,7 +51,6 @@
...
@@ -50,7 +51,6 @@
// if(e.standardId) {
// if(e.standardId) {
// this.standardId = e.standardId
// this.standardId = e.standardId
// }
// }
console
.
log
(
this
.
files
)
this
.
token
=
getApp
().
globalData
.
token
this
.
token
=
getApp
().
globalData
.
token
},
},
methods
:
{
methods
:
{
...
@@ -74,6 +74,7 @@
...
@@ -74,6 +74,7 @@
})
})
}
}
}
}
photo
.
allImages
.
unshift
(
photo
.
tempPath
.
mixWater
)
if
(
photo
.
currentItem
){
if
(
photo
.
currentItem
){
photo
.
currentItem
.
imageList
.
unshift
(
photo
.
tempPath
.
mixWater
)
photo
.
currentItem
.
imageList
.
unshift
(
photo
.
tempPath
.
mixWater
)
}
}
...
@@ -139,7 +140,6 @@
...
@@ -139,7 +140,6 @@
},
},
submitFile
()
{
submitFile
()
{
let
self
=
this
let
self
=
this
if
(
self
.
keys
.
length
)
{
if
(
self
.
keys
.
length
)
{
for
(
let
s
of
self
.
keys
)
{
for
(
let
s
of
self
.
keys
)
{
self
.
$u
.
api
.
saveImage
({
self
.
$u
.
api
.
saveImage
({
...
...
src/components/photo/setting.vue
View file @
4a5a743a
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
getApp
().
trackPage
(
'水印设置页'
)
getApp
().
trackPage
(
'水印设置页'
)
const
globalData
=
getApp
().
globalData
const
globalData
=
getApp
().
globalData
this
.
icon_close_new
=
globalData
.
icon_close_new
this
.
icon_close_new
=
globalData
.
icon_close_new
this
.
systemId
=
globalData
.
photo
.
product
.
systemId
this
.
systemId
=
globalData
.
photo
.
currentItem
.
systemId
this
.
getItemList
()
this
.
getItemList
()
},
},
methods
:
{
methods
:
{
...
...
src/components/take/index.vue
View file @
4a5a743a
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<photo-preview
v-if=
"showType === 2"
@
changeType=
"changeType"
@
finish=
"
goBack
"
/>
<photo-preview
v-if=
"showType === 2"
@
changeType=
"changeType"
@
finish=
"
finish
"
/>
<photo-setting
v-if=
"showType === 3"
@
changeType=
"changeType"
/>
<photo-setting
v-if=
"showType === 3"
@
changeType=
"changeType"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -57,16 +57,20 @@
...
@@ -57,16 +57,20 @@
import
setting
from
'@/components/photo/setting.vue'
import
setting
from
'@/components/photo/setting.vue'
export
default
{
export
default
{
props
:
{
props
:
{
currentItem
:
{
//
拍照要求,示意图,system_id, standardId
currentItem
:
{
//
对应的规范item
type
:
Object
,
type
:
Object
,
default
()
{
default
()
{
return
{
return
{
images
:
[
_id
:
''
,
// 规格ID
system_id
:
''
,
// 系统ID
brand_id
:
''
,
// 品牌ID
classify_id
:
''
,
// 分类ID
images
:
[
// 拍照要求示意图
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
'https://qn-static.banshouhui.com/live_mark.png'
],
],
main_point
:
[]
main_point
:
[]
// 要点
}
}
}
}
}
}
...
@@ -118,7 +122,7 @@
...
@@ -118,7 +122,7 @@
this
.
getMarkPath
()
this
.
getMarkPath
()
this
.
initData
()
this
.
initData
()
//this.currentItem = photo
.currentItem
photo
.
currentItem
=
this
.
currentItem
},
},
computed
:
{
computed
:
{
titleTxt
()
{
titleTxt
()
{
...
@@ -179,6 +183,11 @@
...
@@ -179,6 +183,11 @@
uni
.
showTabBar
()
uni
.
showTabBar
()
this
.
$emit
(
'close'
)
this
.
$emit
(
'close'
)
},
},
finish
()
{
uni
.
showTabBar
()
const
photo
=
getApp
().
globalData
.
photo
this
.
$emit
(
'close'
,
photo
.
allImages
)
},
changeType
(
type
)
{
changeType
(
type
)
{
this
.
showType
=
type
this
.
showType
=
type
},
},
...
...
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