Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
41b4fb7c
Commit
41b4fb7c
authored
Mar 24, 2021
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-photo-v2' of
https://git.banshouhui.com/heyinchen/take_order
into dev-photo-v2
parents
a2d58854
02fbc1f4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
390 additions
and
41 deletions
+390
-41
standard.vue
take-order/components/photo/standard.vue
+181
-0
pages.json
take-order/pages.json
+10
-10
standard.vue
take-order/pages/photo/standard.vue
+160
-30
take.vue
take-order/pages/photo/take.vue
+39
-1
icon-close.png
take-order/static/photo/icon-close.png
+0
-0
No files found.
take-order/components/photo/standard.vue
0 → 100644
View file @
41b4fb7c
<
template
>
<view
class=
"standard-box"
>
<swiper
class=
"swiper-box"
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
>
<swiper-item
class=
"swiper-item"
key=
"swiper1"
>
<view
class=
"title"
>
拍照要求
</view>
<view
class=
"txt-box"
>
<view
class=
"txt"
>
1.充电桩必须通电,可看到电源指示灯亮
</view>
<view
class=
"txt tips"
>
注意:人桩合影必须上传至少两张相片,一张
</view>
</view>
</swiper-item>
<swiper-item
class=
"swiper-item"
v-for=
"(item, index) in tabs"
:key=
"index"
>
{{
item
.
title
}}
<cover-image
bindtap=
"previewImage(item,index)"
class=
"icon"
mode=
"aspectFit"
:src=
"src"
></cover-image>
</swiper-item>
</swiper>
<view
class=
"tab-box"
>
<u-tabs-swiper
bg-color=
"transparent"
inactive-color=
"#999"
ref=
"uTabs"
:list=
"list"
:current=
"current"
@
change=
"tabsChange"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:{
item
:{
type
:
'Object'
,
detault
:()
=>
{
return
null
}
}
},
data
()
{
return
{
list
:
[{
name
:
'十年'
},
{
name
:
'青春'
},
{
name
:
'之约'
}],
tabs
:[{
title
:
'记录的距离大家零点九零杰拉德杰拉德建立的连接就111111111111'
,
},{
title
:
'记录的距离大家零点九零杰拉德杰拉德建立的连接就222222'
,
},{
title
:
'记录的距离大家零点九零杰拉德杰拉德建立的连接就333333'
,
},],
// 因为内部的滑动机制限制,请将tabs组件和swiper组件的current用不同变量赋值
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
swiperCurrent
:
0
,
// swiper组件的current值,表示当前那个swiper-item是活动的
height
:
0
,
}
},
onLoad
(
e
)
{
// getApp().trackPage('照片预览页')
// console.log(e, 'e')
// if (e.img) {
// this.images = [e.img]
// }
// console.log(this.images, 'this.images')
},
mounted
(){
this
.
getSwiperHeight
()
},
methods
:
{
getSwiperHeight
(){
const
globalData
=
getApp
().
globalData
this
.
height
=
globalData
.
screenHeight
*
2
-
globalData
.
navHeight
-
200
console
.
log
(
this
.
height
,
'height'
)
console
.
log
(
globalData
.
screenHeight
,
'globalData.screenHeight'
)
},
previewImage
(
index
){
uni
.
previewImage
({
current
:
index
,
urls
:[],
})
},
// tabs通知swiper切换
tabsChange
(
index
)
{
this
.
swiperCurrent
=
index
;
},
// swiper-item左右移动,通知tabs的滑块跟随移动
transition
(
e
)
{
console
.
log
(
e
.
detail
,
'e.detail-transition'
)
let
dx
=
e
.
detail
.
dx
;
this
.
$refs
.
uTabs
.
setDx
(
dx
);
},
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
// swiper滑动结束,分别设置tabs和swiper的状态
animationfinish
(
e
)
{
console
.
log
(
e
.
detail
,
'e.detail-animationfinish'
)
let
current
=
e
.
detail
.
current
;
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
},
// scroll-view到底部加载更多
onreachBottom
()
{
}
}
}
</
script
>
<
style
lang=
"scss"
>
.standard-box
{
position
:
absolute
;
left
:
0
;
right
:
0
;
/* height: calc(100vh - 240rpx); */
bottom
:
240rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.swiper-box
{
width
:
690rpx
;
min-height
:
690rpx
;
margin-bottom
:
150rpx
;
border-radius
:
12rpx
;
background-color
:
#fff
;
}
.tab-box
{
position
:
absolute
;
bottom
:
0
;
left
:
30rpx
;
right
:
30rpx
;
}
.swiper-item
{
box-sizing
:
border-box
;
// width:690rpx;
padding
:
30rpx
;
.title
{
margin-top
:
20rpx
;
font-weight
:
bold
;
line-height
:
50rpx
;
color
:
#333
;
font-size
:
36rpx
;
}
.txt-box
{
max-height
:
560rpx
;
overflow
:
auto
;
}
.txt
{
padding-top
:
26rpx
;
line-height
:
34rpx
;
color
:
#666
;
font-size
:
28rpx
;
&
.tips
{
padding-bottom
:
26rpx
;
color
:
#D73400
}
}
}
/* .pic {
display: block;
width: 100%;
height: auto;
}
.scroll-view_H {
white-space: nowrap;
width: 750rpx;
height: 300rpx;
}
.view-content {
display: flex;
} */
</
style
>
take-order/pages.json
View file @
41b4fb7c
...
@@ -140,14 +140,14 @@
...
@@ -140,14 +140,14 @@
"navigationBarTextStyle"
:
"#FFFFFF"
,
"navigationBarTextStyle"
:
"#FFFFFF"
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},{
//
},{
"path"
:
"pages/photo/standard"
,
//
"path"
:
"pages/photo/standard"
,
"style"
:
{
//
"style"
:
{
"navigationBarTitleText"
:
"拍照规范"
,
//
"navigationBarTitleText"
:
"拍照规范"
,
"navigationBarBackgroundColor"
:
"#333333"
,
//
"navigationBarBackgroundColor"
:
"#333333"
,
"navigationBarTextStyle"
:
"#FFFFFF"
,
//
"navigationBarTextStyle"
:
"#FFFFFF"
,
"disableScroll"
:
true
//
"disableScroll"
:
true
}
//
}
},
},
{
{
...
@@ -287,8 +287,8 @@
...
@@ -287,8 +287,8 @@
"path"
:
"pages/settle/index"
,
//启动页面,必选
"path"
:
"pages/settle/index"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},{
},{
"name"
:
"拍照
小工具
"
,
//模式名称
"name"
:
"拍照
-规范
"
,
//模式名称
"path"
:
"pages/photo/
standard
"
,
//启动页面,必选
"path"
:
"pages/photo/
take
"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},{
},{
"name"
:
"基本信息"
,
//模式名称
"name"
:
"基本信息"
,
//模式名称
...
...
take-order/pages/photo/standard.vue
View file @
41b4fb7c
<
template
>
<
template
>
<scroll-view
class=
"scroll-view_H"
scroll-x=
"true"
@
scroll=
"scroll"
scroll-left=
"120"
>
<view
class=
"standard-box"
>
<view
id=
"demo1"
class=
"scroll-view-item_H uni-bg-red"
>
A
</view>
<swiper
class=
"swiper-box"
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
>
<view
id=
"demo2"
class=
"scroll-view-item_H uni-bg-green"
>
B
</view>
<swiper-item
class=
"swiper-item"
key=
"swiper1"
>
<view
id=
"demo3"
class=
"scroll-view-item_H uni-bg-blue"
>
C
</view>
<view
class=
"title"
>
</scroll-view>
拍照要求
</view>
<view
class=
"txt-box"
>
<view
class=
"txt"
>
1.充电桩必须通电,可看到电源指示灯亮
</view>
<view
class=
"txt tips"
>
注意:人桩合影必须上传至少两张相片,一张
</view>
</view>
</swiper-item>
<swiper-item
class=
"swiper-item"
v-for=
"(item, index) in tabs"
:key=
"index"
>
{{
item
.
title
}}
<cover-image
bindtap=
"previewImage(item,index)"
class=
"icon"
mode=
"aspectFit"
:src=
"src"
></cover-image>
</swiper-item>
</swiper>
<view
class=
"tab-box"
>
<u-tabs-swiper
bg-color=
"transparent"
inactive-color=
"#999"
ref=
"uTabs"
:list=
"list"
:current=
"current"
@
change=
"tabsChange"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'photo-standard'
props
:{
item
:{
type
:
'Object'
,
detault
:()
=>
{
return
null
}
}
},
data
()
{
data
()
{
return
{
return
{
protocolContent
:
''
,
list
:
[{
images
:[]
name
:
'十年'
},
{
name
:
'青春'
},
{
name
:
'之约'
}],
tabs
:[{
title
:
'记录的距离大家零点九零杰拉德杰拉德建立的连接就111111111111'
,
},{
title
:
'记录的距离大家零点九零杰拉德杰拉德建立的连接就222222'
,
},{
title
:
'记录的距离大家零点九零杰拉德杰拉德建立的连接就333333'
,
},],
// 因为内部的滑动机制限制,请将tabs组件和swiper组件的current用不同变量赋值
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
swiperCurrent
:
0
,
// swiper组件的current值,表示当前那个swiper-item是活动的
height
:
0
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
getApp
().
trackPage
(
'照片预览页'
)
// getApp().trackPage('照片预览页')
console
.
log
(
e
,
'e'
)
// console.log(e, 'e')
if
(
e
.
img
){
// if (e.img) {
this
.
images
=
[
e
.
img
]
// this.images = [e.img]
}
// }
console
.
log
(
this
.
images
,
'this.images'
)
// console.log(this.images, 'this.images')
},
mounted
(){
this
.
getSwiperHeight
()
},
},
methods
:
{
methods
:
{
getSwiperHeight
(){
showPreviewFn
(
img
)
{
const
globalData
=
getApp
().
globalData
this
.
height
=
globalData
.
screenHeight
*
2
-
globalData
.
navHeight
-
200
console
.
log
(
this
.
height
,
'height'
)
console
.
log
(
globalData
.
screenHeight
,
'globalData.screenHeight'
)
},
previewImage
(
index
){
uni
.
previewImage
({
uni
.
previewImage
({
current
:
0
,
current
:
index
,
urls
:
this
.
images
urls
:[],
});
})
},
// tabs通知swiper切换
tabsChange
(
index
)
{
this
.
swiperCurrent
=
index
;
},
},
//
拨打客服 点击
//
swiper-item左右移动,通知tabs的滑块跟随移动
phoneCallClick
:
function
(
phon
e
)
{
transition
(
e
)
{
uni
.
makePhoneCall
({
console
.
log
(
e
.
detail
,
'e.detail-transition'
)
phoneNumber
:
phone
let
dx
=
e
.
detail
.
dx
;
}
);
this
.
$refs
.
uTabs
.
setDx
(
dx
);
},
},
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
// swiper滑动结束,分别设置tabs和swiper的状态
animationfinish
(
e
)
{
console
.
log
(
e
.
detail
,
'e.detail-animationfinish'
)
let
current
=
e
.
detail
.
current
;
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
},
// scroll-view到底部加载更多
onreachBottom
()
{
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
lang=
"scss"
>
.pic
{
.standard-box
{
position
:
absolute
;
left
:
0
;
right
:
0
;
/* height: calc(100vh - 240rpx); */
bottom
:
240rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.swiper-box
{
width
:
690rpx
;
min-height
:
690rpx
;
margin-bottom
:
150rpx
;
border-radius
:
12rpx
;
background-color
:
#fff
;
}
.tab-box
{
position
:
absolute
;
bottom
:
0
;
left
:
30rpx
;
right
:
30rpx
;
}
.swiper-item
{
box-sizing
:
border-box
;
// width:690rpx;
padding
:
30rpx
;
.title
{
margin-top
:
20rpx
;
font-weight
:
bold
;
line-height
:
50rpx
;
color
:
#333
;
font-size
:
36rpx
;
}
.txt-box
{
max-height
:
560rpx
;
overflow
:
auto
;
}
.txt
{
padding-top
:
26rpx
;
line-height
:
34rpx
;
color
:
#666
;
font-size
:
28rpx
;
&
.tips
{
padding-bottom
:
26rpx
;
color
:
#D73400
}
}
}
/* .pic {
display: block;
display: block;
width
:
100%
;
width:
100%;
height
:
auto
;
height:
auto;
}
}
.scroll-view_H {
white-space: nowrap;
width: 750rpx;
height: 300rpx;
}
.view-content {
display: flex;
} */
</
style
>
</
style
>
take-order/pages/photo/take.vue
View file @
41b4fb7c
...
@@ -24,6 +24,12 @@
...
@@ -24,6 +24,12 @@
<cover-image
class=
'icon'
src=
'/static/photo/icon-standard.png'
@
click=
"showStandard"
>
</cover-image>
<cover-image
class=
'icon'
src=
'/static/photo/icon-standard.png'
@
click=
"showStandard"
>
</cover-image>
</cover-view>
</cover-view>
<canvas
canvas-id=
"canvas"
class=
"canvas"
:style=
"
{'width':750 + 'rpx','height': cameraHeight + 'rpx'}">
</canvas>
<canvas
canvas-id=
"canvas"
class=
"canvas"
:style=
"
{'width':750 + 'rpx','height': cameraHeight + 'rpx'}">
</canvas>
<page-container
class=
"page-mask"
v-show=
"standardShow"
>
<standard
:item=
"currentItem"
></standard>
<cover-view
class=
"btn-close"
>
<cover-image
class=
"icon icon-close"
mode=
"aspectFit"
src=
"/static/photo/icon-close.png"
></cover-image>
</cover-view>
</page-container>
</view>
</view>
</
template
>
</
template
>
...
@@ -33,7 +39,11 @@
...
@@ -33,7 +39,11 @@
// ak: "rpVq5d3yxaRCoKzVwmFMo0o4iC524CAG",
// ak: "rpVq5d3yxaRCoKzVwmFMo0o4iC524CAG",
ak
:
"lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI"
ak
:
"lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI"
});
});
import
standard
from
'@/components/photo/standard.vue'
export
default
{
export
default
{
components
:{
standard
:
standard
,
},
data
()
{
data
()
{
return
{
return
{
// title: '',
// title: '',
...
@@ -53,7 +63,10 @@
...
@@ -53,7 +63,10 @@
// canvasWidth: 0,
// canvasWidth: 0,
// canvasHeight: 0,
// canvasHeight: 0,
// restuleImage: '',
// restuleImage: '',
currentItem
:{
images
:[
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
]
},
standardShow
:
true
,
waterInfo
:
{
waterInfo
:
{
longitude
:
''
,
// 经度
longitude
:
''
,
// 经度
latitude
:
''
,
// 维度
latitude
:
''
,
// 维度
...
@@ -465,4 +478,29 @@
...
@@ -465,4 +478,29 @@
left
:
-750rpx
;
left
:
-750rpx
;
top
:
0
;
top
:
0
;
}
}
// 拍照规范
.page-mask
{
position
:
fixed
;
bottom
:
0
;
z-index
:
100
;
width
:
750rpx
;
height
:
100vh
;
padding
:
0
30rpx
;
box-sizing
:
border-box
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.8
);
.icon
{
width
:
92rpx
;
height
:
92rpx
;
}
.btn-close
{
position
:
absolute
;
bottom
:
0
;
left
:
0
;
right
:
0
;
height
:
200rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
}
</
style
>
</
style
>
take-order/static/photo/icon-close.png
0 → 100644
View file @
41b4fb7c
2.54 KB
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