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
40ca5a73
Commit
40ca5a73
authored
Apr 07, 2021
by
李超鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-photo-v2' into dev-photo-v2
# Conflicts: # take-order/pages/photo/list.vue
parents
318d43f5
ef220f8a
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
391 additions
and
184 deletions
+391
-184
base_url.js
take-order/common/base_url.js
+8
-8
standard - 副本.vue
take-order/components/photo/standard - 副本.vue
+212
-0
standard.vue
take-order/components/photo/standard.vue
+126
-147
list.vue
take-order/pages/photo/list.vue
+16
-10
preview.vue
take-order/pages/photo/preview.vue
+3
-3
take.vue
take-order/pages/photo/take.vue
+26
-16
shadow-bg.png
take-order/static/photo/shadow-bg.png
+0
-0
No files found.
take-order/common/base_url.js
View file @
40ca5a73
...
@@ -13,15 +13,15 @@ let systemUrl = {
...
@@ -13,15 +13,15 @@ let systemUrl = {
/* --------------------------- test begin --------------------------- */
/* --------------------------- test begin --------------------------- */
ucenterUrl
=
{
//
ucenterUrl = {
apiUrl
:
'https://rest-u.test.ibanshou.cn'
,
//
apiUrl: 'https://rest-u.test.ibanshou.cn',
xueUrl
:
'https://xue.test.ibanshou.cn'
,
//学院
//
xueUrl:'https://xue.test.ibanshou.cn', //学院
banshou
:
'https://m.test.ibanshou.cn/'
,
//扳手app
//
banshou:'https://m.test.ibanshou.cn/', //扳手app
}
//
}
systemUrl
=
{
//
systemUrl = {
apiUrl
:
'https://system.dev.banshouhui.com'
//
apiUrl:'https://system.dev.banshouhui.com'
}
//
}
/* --------------------------- test end --------------------------- */
/* --------------------------- test end --------------------------- */
...
...
take-order/components/photo/standard - 副本.vue
0 → 100644
View file @
40ca5a73
<!-- 拍照规范弹窗 -->
<
template
>
<view
class=
"standard-box"
>
<swiper
class=
"swiper-box"
:current=
"swiperCurrent"
@
change=
"changeTab"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
>
<swiper-item
class=
"swiper-item"
key=
"swiper1"
>
<view
class=
"title"
>
拍照要求
</view>
<view
class=
"txt-box"
>
<view
class=
"txt"
v-for=
"(txt,index) in currentItem.main_point"
:key=
"index"
>
{{
index
+
1
}}
.
{{
txt
}}
</view>
<view
class=
"txt tips"
>
注意:
{{
currentItem
.
note
}}
</view>
</view>
</swiper-item>
<swiper-item
class=
"swiper-item"
v-for=
"(src, index) in swiperList"
:key=
"index"
>
<image
@
click=
"previewImage(index)"
class=
"icon"
mode=
"aspectFit"
:src=
"src"
></image>
</swiper-item>
</swiper>
<view
class=
"tab-box"
>
<u-tabs-swiper
bg-color=
"transparent"
inactive-color=
"#999"
ref=
"uTabs"
:list=
"tabList"
:current=
"current"
@
change=
"tabsChange"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
</view>
</view>
</
template
>
<
script
>
export
default
{
name
:
"photo-standard"
,
props
:{
currentItem
:{
type
:
Object
,
default
()
{
return
{
images
:
[],
}
}
},
},
data
()
{
return
{
tabList
:
[{
name
:
'十年'
},
{
name
:
'青春'
},
{
name
:
'之约'
}],
swiperList
:[],
// 因为内部的滑动机制限制,请将tabs组件和swiper组件的current用不同变量赋值
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
swiperCurrent
:
0
,
// swiper组件的current值,表示当前那个swiper-item是活动的
height
:
0
,
}
},
watch
:{
"currentItem.images"
(
val
){
if
(
val
.
length
>
0
){
this
.
changeList
(
val
)
// let swiperList = JSON.parse(JSON.stringify(val))
// let len = tabs.length
// let tabList = [{name:'拍照要求'}].concat(Array.from({name:'示意图'},len))
// console.log(tabList,'tabList')
}
},
},
created
()
{
// getApp().trackPage('照片预览页')
// console.log(e, 'e')
// if (e.img) {
// this.images = [e.img]
// }
// console.log(this.images, 'this.images')
},
mounted
(){
this
.
changeList
(
this
.
currentItem
.
images
)
this
.
getSwiperHeight
()
},
methods
:
{
changeList
(
list
){
let
swiperList
=
JSON
.
parse
(
JSON
.
stringify
(
list
))
let
len
=
list
.
length
let
tabList
=
[]
for
(
let
i
=
0
;
i
<
len
;
i
++
){
let
item
=
{
name
:
'示意图'
+
(
i
+
1
)
}
tabList
.
push
(
item
)
}
tabList
=
[{
name
:
'拍照要求'
}].
concat
(
tabList
)
this
.
swiperList
=
swiperList
this
.
tabList
=
tabList
},
getSwiperHeight
(){
const
globalData
=
getApp
().
globalData
this
.
height
=
globalData
.
screenHeight
*
2
-
globalData
.
navHeight
-
200
},
previewImage
(
index
){
uni
.
previewImage
({
current
:
index
,
urls
:
this
.
swiperList
,
})
},
// 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);
},
changeTab
(){
this
.
current
=
this
.
swiperCurrent
},
// 由于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); */
z-index
:
100
;
bottom
:
240rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
color
:
#fff
;
}
.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
;
}
&
>
image
{
width
:
630rpx
;
min-height
:
630rpx
;
}
.txt-box
{
max-height
:
560rpx
;
overflow
:
auto
;
}
.txt
{
white-space
:
normal
;
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/components/photo/standard.vue
View file @
40ca5a73
<!-- 拍照规范弹窗 -->
<
template
>
<
template
>
<view
class=
"standard-box"
>
<view>
<swiper
class=
"swiper-box"
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
>
<view
class=
"wrap"
>
<swiper-item
class=
"swiper-item"
key=
"swiper1"
>
<swiper
class=
"swiper-box"
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
>
<swiper-item
class=
"swiper-item"
>
<view
class=
"inner txt-inner"
:style=
"
{'background-image':'url(/static/photo/shadow-bg.png)'}">
<view
class=
"title"
>
<view
class=
"title"
>
拍照要求
拍照要求
</view>
</view>
...
@@ -10,29 +12,31 @@
...
@@ -10,29 +12,31 @@
<view
class=
"txt"
v-for=
"(txt,index) in currentItem.main_point"
:key=
"index"
>
<view
class=
"txt"
v-for=
"(txt,index) in currentItem.main_point"
:key=
"index"
>
{{
index
+
1
}}
.
{{
txt
}}
{{
index
+
1
}}
.
{{
txt
}}
</view>
</view>
<view
class=
"txt tips
"
>
<view
class=
"txt tips"
v-if=
"currentItem.note
"
>
注意:
{{
currentItem
.
note
}}
注意:
{{
currentItem
.
note
}}
</view>
</view>
</view>
</view>
</view>
</swiper-item>
</swiper-item>
<swiper-item
class=
"swiper-item"
v-for=
"(src, index) in swiperList"
:key=
"index"
>
<swiper-item
class=
"swiper-item"
v-for=
"(src, index) in swiperList"
:key=
"index"
>
<view
class=
"inner pic"
>
<image
@
click=
"previewImage(index)"
class=
"icon"
mode=
"aspectFit"
:src=
"src"
></image>
<image
@
click=
"previewImage(index)"
class=
"icon"
mode=
"aspectFit"
:src=
"src"
></image>
</view>
</swiper-item>
</swiper-item>
</swiper>
</swiper>
<view
class=
"tab-box"
>
<view
class=
"u-tabs-box"
>
<u-tabs-swiper
bg-color=
"transparent"
inactive-color=
"#999"
<u-tabs-swiper
bg-color=
"transparent"
inactive-color=
"#999"
activeColor=
"#2272FF"
ref=
"tabs"
ref=
"uTabs"
:list=
"tabList"
:current=
"current"
:list=
"tabList"
:current=
"current"
@
change=
"change"
:is-scroll=
"false"
swiperWidth=
"750"
>
@
change=
"tabsChange"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
</u-tabs-swiper>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"photo-standard"
,
props
:
{
props
:{
currentItem
:
{
currentItem
:{
type
:
Object
,
type
:
Object
,
default
()
{
default
()
{
return
{
return
{
...
@@ -43,167 +47,142 @@
...
@@ -43,167 +47,142 @@
},
},
data
()
{
data
()
{
return
{
return
{
tabList
:
[{
current
:
0
,
name
:
'十年'
swiperCurrent
:
0
,
},
{
dx
:
0
,
name
:
'青春'
};
},
{
name
:
'之约'
}],
swiperList
:[],
// 因为内部的滑动机制限制,请将tabs组件和swiper组件的current用不同变量赋值
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
swiperCurrent
:
0
,
// swiper组件的current值,表示当前那个swiper-item是活动的
height
:
0
,
}
},
watch
:{
"currentItem.images"
(
val
){
if
(
val
.
length
>
0
){
this
.
changeList
(
val
)
// let swiperList = JSON.parse(JSON.stringify(val))
// let len = tabs.length
// let tabList = [{name:'拍照要求'}].concat(Array.from({name:'示意图'},len))
// console.log(tabList,'tabList')
}
},
},
created
()
{
// getApp().trackPage('照片预览页')
// console.log(e, 'e')
// if (e.img) {
// this.images = [e.img]
// }
// console.log(this.images, 'this.images')
},
},
mounted
(){
onLoad
()
{},
this
.
changeList
(
this
.
currentItem
.
images
)
computed
:
{
this
.
getSwiperHeight
()
swiperList
()
{
let
list
=
this
.
currentItem
.
images
||
[]
return
list
},
},
methods
:
{
tabList
()
{
changeList
(
list
){
let
list
=
this
.
currentItem
.
images
||
[]
let
swiperList
=
JSON
.
parse
(
JSON
.
stringify
(
list
))
let
swiperList
=
JSON
.
parse
(
JSON
.
stringify
(
list
))
let
len
=
list
.
length
let
len
=
list
.
length
let
tabList
=
[]
let
tabList
=
[]
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
let
item
=
{
let
item
=
{
name
:
'示意图'
+
(
i
+
1
)
name
:
'示意图'
+
(
i
+
1
)
}
}
tabList
.
push
(
item
)
tabList
.
push
(
item
)
}
}
tabList
=
[{
name
:
'拍照要求'
}].
concat
(
tabList
)
tabList
=
[{
this
.
swiperList
=
swiperList
name
:
'拍照要求'
this
.
tabList
=
tabList
}].
concat
(
tabList
)
return
tabList
},
},
getSwiperHeight
(){
const
globalData
=
getApp
().
globalData
this
.
height
=
globalData
.
screenHeight
*
2
-
globalData
.
navHeight
-
200
},
},
methods
:
{
previewImage
(
index
){
previewImage
(
index
){
uni
.
previewImage
({
uni
.
previewImage
({
current
:
index
,
current
:
index
,
urls
:
this
.
swiperList
,
urls
:
this
.
swiperList
,
})
})
},
},
// tab
s通知swiper
切换
// tab
栏
切换
tabsC
hange
(
index
)
{
c
hange
(
index
)
{
this
.
swiperCurrent
=
index
;
this
.
swiperCurrent
=
index
;
// this.getOrderList(index);
},
},
// swiper-item左右移动,通知tabs的滑块跟随移动
transition
({
transition
(
e
)
{
detail
:
{
// console.log(e.detail,'e.detail-transition')
dx
let
dx
=
e
.
detail
.
dx
;
}
this
.
$refs
.
uTabs
.
setDx
(
dx
);
})
{
this
.
$refs
.
tabs
.
setDx
(
dx
);
},
},
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
animationfinish
({
// swiper滑动结束,分别设置tabs和swiper的状态
detail
:
{
animationfinish
(
e
)
{
current
// console.log(e.detail,'e.detail-animationfinish')
}
let
current
=
e
.
detail
.
current
;
})
{
this
.
$refs
.
uT
abs
.
setFinishCurrent
(
current
);
this
.
$refs
.
t
abs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
this
.
current
=
current
;
},
}
// scroll-view到底部加载更多
}
onreachBottom
()
{
};
</
script
>
<
style
>
/* #ifndef H5 */
page
{
height
:
100%
;
background-color
:
#f2f2f2
;
}
}
/* #endif */
</
style
>
<
style
lang=
"scss"
scoped
>
.wrap
{
display
:
flex
;
flex-direction
:
column
;
height
:
calc
(
100vh
-
var
(
--
window-top
)
-
200rpx
);
padding-top
:
100rpx
;
width
:
100%
;
}
}
.swiper-box
{
flex
:
1
;
}
}
</
script
>
<
style
lang=
"scss"
>
.swiper-item
{
.standard-box
{
position
:
absolute
;
left
:
0
;
right
:
0
;
/* height: calc(100vh - 240rpx); */
z-index
:
100
;
bottom
:
240rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
color
:
#fff
;
height
:
100%
;
padding
:
0
30rpx
;
box-sizing
:
border-box
;
}
}
.swiper-box
{
width
:
690rpx
;
.swiper-item
.inner
{
min-height
:
690rpx
;
padding
:
30rpx
;
margin-bottom
:
150rpx
;
border-radius
:
12rpx
;
background-color
:
#fff
;
background-color
:
#fff
;
}
width
:
690rpx
;
.tab-box
{
height
:
690rpx
;
position
:
absolute
;
overflow
:
hidden
;
bottom
:
0
;
&
.txt-inner
{
left
:
30rpx
;
background-position
:
bottom
right
;
right
:
30rpx
;
background-size
:
340rpx
380rpx
;
}
background-repeat
:
no-repeat
;
.swiper-item
{
}
box-sizing
:
border-box
;
.title
{
// width:690rpx;
margin-top
:
20rpx
;
padding
:
30rpx
;
.title
{
margin-top
:
20rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
line-height
:
50rpx
;
line-height
:
50rpx
;
color
:
#333
;
color
:
#333
;
font-size
:
36rpx
;
font-size
:
36rpx
;
}
}
&
>
image
{
&
.pic
{
width
:
630rpx
;
padding
:
0
;
min-height
:
630rpx
;
background-color
:
transparent
;
}
&
>
image
{
width
:
690rpx
;
min-height
:
690rpx
;
}
}
.txt-box
{
max-height
:
560rpx
;
.txt-box
{
// max-height: 560rpx;
overflow
:
auto
;
overflow
:
auto
;
width
:
100%
;
height
:
560rpx
;
}
}
.txt
{
.txt
{
white-space
:
normal
;
white-space
:
normal
;
padding-top
:
26rpx
;
padding-top
:
26rpx
;
line-height
:
34rpx
;
line-height
:
34rpx
;
color
:
#666
;
color
:
#666
;
font-size
:
28rpx
;
font-size
:
28rpx
;
&
.tips
{
padding-bottom
:
26rpx
;
&
.tips
{
color
:
#D73400
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
>
</
style
>
take-order/pages/photo/list.vue
View file @
40ca5a73
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
<view
class=
"backView"
>
<view
class=
"backView"
>
<u-loading
style=
"position: fixed;top: 50%;"
:show=
"loading"
size=
"36"
mode=
"flower"
></u-loading>
<u-loading
style=
"position: fixed;top: 50%;"
:show=
"loading"
size=
"36"
mode=
"flower"
></u-loading>
<view
class=
"topView"
>
<view
class=
"topView"
>
<view
:class=
"['topItemView',
{'active':activeTop===ikey}]" @click="handleTopItemChange(ikey,item)"
v-for="(item,ikey) in dataList" :key="ikey">
<view
:class=
"['topItemView',
{'active':activeTop===ikey}]" @click="handleTopItemChange(ikey,item)"
<text
v-for="(item,ikey) in dataList" :key="ikey">
:class=
"['ph-lst-top-index',
{'active':activeTop===ikey}]">
{{
ikey
+
1
}}
</text>
<text
:class=
"['ph-lst-top-index',
{'active':activeTop===ikey}]">
{{
ikey
+
1
}}
</text>
<text
class=
"topItemTitle"
>
{{
item
.
type
}}
</text>
<text
class=
"topItemTitle"
>
{{
item
.
type
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
<!--
<text
class=
"rightContent u-m-t-14 u-m-l-30 u-p-b-30"
>
{{
item
.
describe
}}
</text>
-->
<!--
<text
class=
"rightContent u-m-t-14 u-m-l-30 u-p-b-30"
>
{{
item
.
describe
}}
</text>
-->
</view>
</view>
<view
class=
"rightImageView"
v-if=
"item.imageList.length > 0"
>
<view
class=
"rightImageView"
v-if=
"item.imageList.length > 0"
>
<image
class=
"rightImage"
v-for=
"(image, index) in item.imageList.slice(0 , 10)"
:src=
"image"
:key=
"index"
<image
class=
"rightImage"
v-for=
"(image, index) in item.imageList.slice(0 , 10)"
:src=
"image"
@
click
.
stop=
"handleClickImage(item, index)"
mode=
"aspectFill"
></image>
:key=
"index"
@
click
.
stop=
"handleClickImage(item, index)"
mode=
"aspectFill"
></image>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -121,7 +121,7 @@
...
@@ -121,7 +121,7 @@
handleClickImage
(
item
,
index
)
{
handleClickImage
(
item
,
index
)
{
uni
.
previewImage
({
uni
.
previewImage
({
urls
:
item
.
imageList
,
urls
:
item
.
imageList
,
current
:
index
current
:
index
})
})
},
},
...
@@ -131,7 +131,7 @@
...
@@ -131,7 +131,7 @@
photo
.
currentItem
=
item
photo
.
currentItem
=
item
photo
.
itemIndex
=
ikey
photo
.
itemIndex
=
ikey
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/photo/take'
url
:
'/pages/photo/take'
})
})
},
},
...
@@ -201,19 +201,19 @@
...
@@ -201,19 +201,19 @@
/* justify-content: space-between; */
/* justify-content: space-between; */
/* border-bottom: 20rpx solid #F3F3F3; */
/* border-bottom: 20rpx solid #F3F3F3; */
margin
:
0
rpx
30
rpx
20
rpx
30
rpx
;
margin
:
0
rpx
30
rpx
20
rpx
30
rpx
;
padding
:
36
rpx
30
rpx
18
rpx
30
rpx
;
padding
:
36
rpx
30
rpx
30
rpx
30
rpx
;
border-radius
:
12
rpx
;
border-radius
:
12
rpx
;
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
min-height
:
108
rpx
;
min-height
:
108
rpx
;
}
}
.ph-lst-item-index
{
.ph-lst-item-index
{
font-size
:
2
8
rpx
;
font-size
:
2
4
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
border-radius
:
4
rpx
;
border-radius
:
4
rpx
;
width
:
34
rpx
;
width
:
34
rpx
;
height
:
34
rpx
;
height
:
34
rpx
;
line-height
:
3
0
rpx
;
line-height
:
3
2
rpx
;
text-align
:
center
;
text-align
:
center
;
border-width
:
1px
;
border-width
:
1px
;
border-style
:
solid
;
border-style
:
solid
;
...
@@ -230,6 +230,7 @@
...
@@ -230,6 +230,7 @@
/* flex-direction: column; */
/* flex-direction: column; */
/* border-left: 2rpx solid #F3F3F3; */
/* border-left: 2rpx solid #F3F3F3; */
}
}
.rightContentView.active
{
.rightContentView.active
{
color
:
#666666
;
color
:
#666666
;
border-color
:
#666666
;
border-color
:
#666666
;
...
@@ -263,6 +264,10 @@
...
@@ -263,6 +264,10 @@
width
:
116
rpx
;
width
:
116
rpx
;
height
:
116
rpx
;
height
:
116
rpx
;
margin
:
0
rpx
12
rpx
12
rpx
0
rpx
;
margin
:
0
rpx
12
rpx
12
rpx
0
rpx
;
}
.rightImage
:nth-child
(
5n
)
{
margin-right
:
0
;
}
}
...
@@ -287,6 +292,7 @@
...
@@ -287,6 +292,7 @@
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
color
:
#999999
;
color
:
#999999
;
}
}
.topItemView.active
{
.topItemView.active
{
color
:
#2272FF
;
color
:
#2272FF
;
}
}
...
...
take-order/pages/photo/preview.vue
View file @
40ca5a73
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
<image
class=
"pic"
:src=
"files[0]"
mode=
"aspectFit"
@
click=
"showPreviewFn"
></image>
<image
class=
"pic"
:src=
"files[0]"
mode=
"aspectFit"
@
click=
"showPreviewFn"
></image>
</view>
</view>
<view
class=
"bottomView"
>
<view
class=
"bottomView"
>
<image
class=
"btn"
:src=
"btn_remake"
@
click=
"
remakePhoto
"
></image>
<image
class=
"btn"
:src=
"btn_remake"
@
click=
"
$u.debounce(remakePhoto, 500)
"
></image>
<image
class=
"btn"
:src=
"btn_continue"
@
click=
"
continuePhoto
"
></image>
<image
class=
"btn"
:src=
"btn_continue"
@
click=
"
$u.debounce(continuePhoto, 500)
"
></image>
</view>
</view>
<image
class=
"btn finish"
src=
"/static/photo/finish.png"
@
click=
"
finishPhoto
"
></image>
<image
class=
"btn finish"
src=
"/static/photo/finish.png"
@
click=
"
$u.debounce(finishPhoto, 500)
"
></image>
</view>
</view>
</
template
>
</
template
>
...
...
take-order/pages/photo/take.vue
View file @
40ca5a73
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</camera>
</camera>
<cover-view
class=
"bottom-box"
v-if=
"!standardShow"
>
<cover-view
class=
"bottom-box"
v-if=
"!standardShow"
>
<cover-image
class=
"icon"
src=
'/static/photo/icon-back.png'
mode=
""
@
click=
"goBack"
></cover-image>
<cover-image
class=
"icon"
src=
'/static/photo/icon-back.png'
mode=
""
@
click=
"goBack"
></cover-image>
<cover-image
class=
'icon-take icon'
src=
'/static/photo/icon-take.png'
@
click=
"
takePhoto
"
>
</cover-image>
<cover-image
class=
'icon-take icon'
src=
'/static/photo/icon-take.png'
@
click=
"
$u.debounce(takePhoto, 500)
"
>
</cover-image>
<cover-image
class=
'icon'
src=
'/static/photo/icon-standard.png'
@
click=
"standardShow = true"
>
</cover-image>
<cover-image
class=
'icon'
src=
'/static/photo/icon-standard.png'
@
click=
"standardShow = true"
>
</cover-image>
</cover-view>
</cover-view>
<canvas
canvas-id=
"canvas"
id=
"photoCanvas"
class=
"canvas"
<canvas
canvas-id=
"canvas"
id=
"photoCanvas"
class=
"canvas"
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
let
arr
=
[]
let
arr
=
[]
// 包含经纬度
// 包含经纬度
const
waterInfo
=
this
.
waterInfo
const
waterInfo
=
this
.
waterInfo
arr
=
[
'经度:
'
+
waterInfo
.
longitude
,
'纬度: '
+
waterInfo
.
latitude
,
'地址: '
+
waterInfo
.
address
,
'时间:
'
+
arr
=
[
'经度:
'
+
waterInfo
.
longitude
,
'纬度:'
+
waterInfo
.
latitude
,
'地址:'
+
waterInfo
.
address
,
'时间:
'
+
waterInfo
.
date
waterInfo
.
date
]
]
let
settingTxtArr
=
[]
let
settingTxtArr
=
[]
...
@@ -131,7 +131,7 @@
...
@@ -131,7 +131,7 @@
if
(
idx
>
-
1
)
{
if
(
idx
>
-
1
)
{
settingTxtArr
.
push
(
arr
[
idx
])
settingTxtArr
.
push
(
arr
[
idx
])
}
else
{
}
else
{
settingTxtArr
.
push
(
item
.
watemark_text
+
':
'
+
item
.
watemark_value
)
settingTxtArr
.
push
(
item
.
watemark_text
+
':'
+
item
.
watemark_value
)
}
}
}
}
})
})
...
@@ -145,8 +145,12 @@
...
@@ -145,8 +145,12 @@
const
photo
=
getApp
().
globalData
.
photo
const
photo
=
getApp
().
globalData
.
photo
this
.
waterSetting
=
photo
.
waterSetting
this
.
waterSetting
=
photo
.
waterSetting
this
.
standardShow
=
this
.
shadowInitShow
this
.
standardShow
=
this
.
shadowInitShow
this
.
cameraChange
=
true
// this.initData()
// this.initData()
},
},
onHide
(){
this
.
cameraChange
=
false
},
methods
:
{
methods
:
{
closeShadow
()
{
closeShadow
()
{
this
.
shadowInitShow
=
false
this
.
shadowInitShow
=
false
...
@@ -194,12 +198,11 @@
...
@@ -194,12 +198,11 @@
const
globalData
=
getApp
().
globalData
const
globalData
=
getApp
().
globalData
this
.
navHeight
=
globalData
.
navHeight
this
.
navHeight
=
globalData
.
navHeight
this
.
cameraHeight
=
parseInt
(
globalData
.
safeHeight
*
2
-
globalData
.
navHeight
-
200
)
;
this
.
cameraHeight
=
parseInt
(
globalData
.
safeHeight
*
2
-
globalData
.
navHeight
-
200
)
;
console
.
log
(
globalData
.
safeHeight
,
'globalData.safeHeight'
)
//
console.log(globalData.safeHeight,'globalData.safeHeight')
console
.
log
(
this
.
cameraHeight
,
'this.cameraHeight'
)
//
console.log(this.cameraHeight,'this.cameraHeight')
console
.
log
(
globalData
.
navHeight
,
'globalData.navHeight'
)
//
console.log(globalData.navHeight,'globalData.navHeight')
this
.
ratio
=
globalData
.
screenHeight
/
globalData
.
rpxScreenHeight
this
.
ratio
=
globalData
.
screenHeight
/
globalData
.
rpxScreenHeight
console
.
log
(
globalData
.
screenHeight
,
globalData
.
rpxScreenHeight
,
this
.
ratio
)
// console.log(globalData.screenHeight,globalData.rpxScreenHeight,this.ratio)
this
.
cameraChange
=
true
this
.
waterSetting
=
globalData
.
photo
.
waterSetting
this
.
waterSetting
=
globalData
.
photo
.
waterSetting
// this.cameraHeight = globalData.rpxScreenHeight
// this.cameraHeight = globalData.rpxScreenHeight
},
},
...
@@ -362,13 +365,16 @@
...
@@ -362,13 +365,16 @@
canvas
.
setFontSize
(
16
)
canvas
.
setFontSize
(
16
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
let
txt
=
settingTxtArr
[
i
]
let
txt
=
settingTxtArr
[
i
]
// if(txt.length>14){
if
(
txt
.
indexOf
(
'时间'
)
>=
0
){
// canvas.fillText(txt.substr(14,18), 10, canvasHeight - txtHeight * h++);
canvas
.
fillText
(
txt
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
// canvas.fillText(txt.substr(0,18), 10, canvasHeight - txtHeight * h++);
}
else
{
// }else{
if
(
txt
.
length
>
20
){
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
canvas
.
fillText
(
txt
.
substr
(
18
,
20
),
10
,
canvasHeight
-
txtHeight
*
h
++
);
// }
canvas
.
fillText
(
txt
.
substr
(
0
,
20
),
10
,
canvasHeight
-
txtHeight
*
h
++
);
}
else
{
canvas
.
fillText
(
txt
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
canvas
.
fillText
(
txt
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
}
}
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
}
}
const
title
=
this
.
titleTxt
const
title
=
this
.
titleTxt
...
@@ -506,6 +512,9 @@
...
@@ -506,6 +512,9 @@
padding
:
20rpx
;
padding
:
20rpx
;
.txt
{
.txt
{
max-width
:
500rpx
;
max-height
:
80rpx
;
overflow
:
hidden
;
margin-top
:
5rpx
;
margin-top
:
5rpx
;
line-height
:
40rpx
;
line-height
:
40rpx
;
white-space
:
normal
;
white-space
:
normal
;
...
@@ -539,6 +548,7 @@
...
@@ -539,6 +548,7 @@
background-color
:
black
;
background-color
:
black
;
.txt
{
.txt
{
white-space
:
nowrap
;
line-height
:
60rpx
;
line-height
:
60rpx
;
color
:
#fff
;
color
:
#fff
;
}
}
...
@@ -570,7 +580,7 @@
...
@@ -570,7 +580,7 @@
z-index
:
1000
;
z-index
:
1000
;
width
:
750rpx
;
width
:
750rpx
;
height
:
100vh
;
height
:
100vh
;
padding
:
0
30rpx
;
//
padding: 0 30rpx;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.8
);
background-color
:
rgba
(
0
,
0
,
0
,
0
.8
);
...
...
take-order/static/photo/shadow-bg.png
0 → 100644
View file @
40ca5a73
13 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