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
e9c32caa
Commit
e9c32caa
authored
May 15, 2021
by
李超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拍照工具3.1优化
parent
7fa811c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
28 deletions
+30
-28
index.vue
take-order/pages/photo/index.vue
+3
-1
take.vue
take-order/pages/photo/take.vue
+27
-27
No files found.
take-order/pages/photo/index.vue
View file @
e9c32caa
...
...
@@ -2,7 +2,7 @@
<view
class=
"backView"
>
<view
class=
"ph-pr-arr"
v-for=
"(dataItem, index) in list"
:key=
"index"
>
<template
v-if=
"dataItem.data.length > 0"
>
<view
class=
"topTitle"
><text
>
{{
dataItem
.
title
}}
</text></view>
<view
class=
"topTitle"
><text
class=
"topFont"
>
{{
dataItem
.
title
}}
</text><text>
(不同系统对应不同模板)
</text></view>
<view
class=
"ph-pr-content"
>
<view
v-for=
"(item,ikey) in dataItem.data"
:class=
"param[dataItem.type] === item.id ? 'select-item-view' : 'item-view'"
...
...
@@ -189,6 +189,8 @@
.topTitle
{
margin-top
:
50
rpx
;
padding-left
:
30
rpx
;
}
.topFont
{
font-size
:
36
rpx
;
font-weight
:
bold
;
color
:
#333333
;
...
...
take-order/pages/photo/take.vue
View file @
e9c32caa
...
...
@@ -45,7 +45,7 @@
// ak: "rpVq5d3yxaRCoKzVwmFMo0o4iC524CAG",
ak
:
"lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI"
});
import
standard
from
'@/components/photo/standard.vue'
import
standard
from
'@/components/photo/standard.vue'
import
cache
from
'../../common/cache.js'
export
default
{
components
:
{
...
...
@@ -60,7 +60,7 @@
'https://qn-static.banshouhui.com/live_mark.png'
],
},
standardShow
:
tru
e
,
standardShow
:
fals
e
,
cameraInfo
:
{
devicePosition
:
'back'
,
flash
:
'off'
...
...
@@ -87,7 +87,7 @@
ratio
:
0
,
cameraChange
:
false
,
waterSetting
:
null
,
shadowInitShow
:
tru
e
,
// 第一次进入页面需显示弹窗
shadowInitShow
:
fals
e
,
// 第一次进入页面需显示弹窗
}
},
onLoad
(
e
)
{
...
...
@@ -95,17 +95,17 @@
getApp
().
trackPage
(
'拍照页'
)
// this.ctx = uni.createCameraContext();
this
.
updateTime
()
const
locationData
=
cache
.
getCache
(
'locationData'
)
const
validityTime
=
60000
if
(
Date
.
now
()
-
locationData
.
locationTime
<
validityTime
)
{
// 1分钟内不重复请求位置信息
this
.
waterInfo
.
latitude
=
locationData
.
waterInfo
.
latitude
this
.
waterInfo
.
longitude
=
locationData
.
waterInfo
.
longitude
this
.
baiduLocation
()
}
else
{
this
.
getLocation
()
}
const
locationData
=
cache
.
getCache
(
'locationData'
)
const
validityTime
=
60000
if
(
Date
.
now
()
-
locationData
.
locationTime
<
validityTime
)
{
// 1分钟内不重复请求位置信息
this
.
waterInfo
.
latitude
=
locationData
.
waterInfo
.
latitude
this
.
waterInfo
.
longitude
=
locationData
.
waterInfo
.
longitude
this
.
baiduLocation
()
}
else
{
this
.
getLocation
()
}
this
.
getMarkPath
()
this
.
initData
()
...
...
@@ -152,7 +152,7 @@
watch
:
{},
onShow
()
{
// 默认开启弹窗
const
photo
=
getApp
().
globalData
.
photo
const
photo
=
getApp
().
globalData
.
photo
this
.
waterSetting
=
photo
.
waterSetting
this
.
standardShow
=
this
.
shadowInitShow
this
.
cameraChange
=
true
...
...
@@ -222,7 +222,7 @@
// console.log(this.cameraHeight,'this.cameraHeight')
// console.log(globalData.navHeight,'globalData.navHeight')
this
.
ratio
=
globalData
.
screenHeight
/
globalData
.
rpxScreenHeight
// console.log(globalData.screenHeight,globalData.rpxScreenHeight,this.ratio)
// console.log(globalData.screenHeight,globalData.rpxScreenHeight,this.ratio)
this
.
waterSetting
=
globalData
.
photo
.
waterSetting
// this.cameraHeight = globalData.rpxScreenHeight
},
...
...
@@ -266,15 +266,15 @@
type
:
'gcj02'
,
success
:
function
(
res
)
{
waterInfo
.
longitude
=
parseFloat
(
res
.
longitude
).
toFixed
(
4
)
waterInfo
.
latitude
=
parseFloat
(
res
.
latitude
).
toFixed
(
3
)
const
data
=
{
waterInfo
:
{
latitude
:
waterInfo
.
latitude
,
longitude
:
waterInfo
.
longitude
},
locationTime
:
Date
.
now
()
}
waterInfo
.
latitude
=
parseFloat
(
res
.
latitude
).
toFixed
(
3
)
const
data
=
{
waterInfo
:
{
latitude
:
waterInfo
.
latitude
,
longitude
:
waterInfo
.
longitude
},
locationTime
:
Date
.
now
()
}
cache
.
setCache
(
'locationData'
,
data
)
that
.
baiduLocation
()
},
...
...
@@ -420,7 +420,7 @@
canvas
.
fillText
(
title
.
substr
(
14
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
+
20
);
}
canvas
.
fillText
(
title
.
substr
(
0
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
-
titleHeight
/
2
+
10
);
}
}
if
(
this
.
waterSetting
)
{
// if (this.waterSetting && this.waterSetting.mid_text) {
//加入 水印图片
canvas
.
drawImage
(
this
.
tempImgs
.
markImage
,
canvasWidth
/
2
-
100
,
canvasHeight
/
2
-
25
,
200
,
50
)
...
...
@@ -435,7 +435,7 @@
success
:
(
res
)
=>
{
this
.
tempImgs
.
mixWater
=
res
.
tempFilePath
globalTempPath
.
origin
=
this
.
tempImgs
.
origin
globalTempPath
.
mixWater
=
res
.
tempFilePath
globalTempPath
.
mixWater
=
res
.
tempFilePath
this
.
goPage
(
'/pages/photo/preview'
)
let
timer
=
setTimeout
(()
=>
{
this
.
goPage
(
'/pages/photo/preview'
)
...
...
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