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
32558250
Commit
32558250
authored
Dec 31, 2020
by
李超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'add-mao'
parent
81b50f21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
30 deletions
+96
-30
try.vue
take-order/pages/photo/try.vue
+29
-30
project.config.json
take-order/project.config.json
+67
-0
No files found.
take-order/pages/photo/try.vue
View file @
32558250
...
@@ -3,10 +3,10 @@
...
@@ -3,10 +3,10 @@
<view
class=
""
>
<view
class=
""
>
<camera
device-position=
"back"
flash=
"off"
style=
'width:100%; height:100vh;'
>
<camera
device-position=
"back"
flash=
"off"
style=
'width:100%; height:100vh;'
>
<cover-view
class=
"locationView"
>
<cover-view
class=
"locationView"
>
<cover-view
class=
"locationText u-m-l-20 u-m-t-30"
>
{{
longitude
}}
</cover-view>
<cover-view
class=
"locationText u-m-l-20 u-m-t-30"
>
经度:
{{
longitude
}}
</cover-view>
<cover-view
class=
"locationText u-m-l-20 u-m-t-10"
>
{{
latitude
}}
</cover-view>
<cover-view
class=
"locationText u-m-l-20 u-m-t-10"
>
维度:
{{
latitude
}}
</cover-view>
<cover-view
class=
"locationText u-m-l-20 u-m-t-10"
>
{{
address
}}
</cover-view>
<cover-view
class=
"locationText u-m-l-20 u-m-t-10"
>
地址:
{{
address
}}
</cover-view>
<cover-view
class=
"locationText u-m-l-20 u-m-t-10"
>
{{
date
}}
</cover-view>
<cover-view
class=
"locationText u-m-l-20 u-m-t-10"
>
时间:
{{
date
}}
</cover-view>
</cover-view>
</cover-view>
<cover-image
class=
"liveWatermarkNormal"
mode=
"aspectFit"
:src=
"liveWaterMarkImage"
></cover-image>
<cover-image
class=
"liveWatermarkNormal"
mode=
"aspectFit"
:src=
"liveWaterMarkImage"
></cover-image>
</camera>
</camera>
...
@@ -41,10 +41,10 @@
...
@@ -41,10 +41,10 @@
image
:
""
,
image
:
""
,
showImage
:
false
,
showImage
:
false
,
canvas
:
null
,
canvas
:
null
,
longitude
:
'
经度:
正在获取中...'
,
longitude
:
'正在获取中...'
,
latitude
:
'
纬度:
正在获取中...'
,
latitude
:
'正在获取中...'
,
address
:
'
地址:
正在获取中...'
,
address
:
'正在获取中...'
,
date
:
'
时间:
正在获取中...'
,
date
:
'正在获取中...'
,
icon_location
:
'https://qn-static.banshouhui.com/take_order/icon/location.png'
,
icon_location
:
'https://qn-static.banshouhui.com/take_order/icon/location.png'
,
scale
:
"4_3"
,
scale
:
"4_3"
,
icon_take
:
'https://qn-static.banshouhui.com/take.png'
,
icon_take
:
'https://qn-static.banshouhui.com/take.png'
,
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
this
.
getLocation
()
this
.
getLocation
()
this
.
getMarkPath
()
this
.
getMarkPath
()
this
.
getSystemInfo
()
this
.
getSystemInfo
()
this
.
baiduLocation
()
//
this.baiduLocation()
uni
.
setNavigationBarColor
({
uni
.
setNavigationBarColor
({
frontColor
:
'#FFFFFF'
,
frontColor
:
'#FFFFFF'
,
backgroundColor
:
'#333333'
,
backgroundColor
:
'#333333'
,
...
@@ -80,10 +80,9 @@
...
@@ -80,10 +80,9 @@
t
=
function
()
{
t
=
function
()
{
let
t
=
{
let
t
=
{
success
:
function
(
res
)
{
success
:
function
(
res
)
{
var
e
=
res
.
wxMarkerData
[
0
];
let
e
=
res
.
wxMarkerData
[
0
];
console
.
log
(
"当前定位"
,
e
);
let
i
=
e
.
address
;
var
i
=
e
.
address
;
a
.
address
=
i
this
.
address
=
i
// a.setData({
// a.setData({
// addressValue: i
// addressValue: i
// }), o.globalData.addressValue = i, a.initWatermarkBoxHeightAndWidth();
// }), o.globalData.addressValue = i, a.initWatermarkBoxHeightAndWidth();
...
@@ -94,8 +93,9 @@
...
@@ -94,8 +93,9 @@
}
}
};
};
if
(
a
.
latitude
&&
a
.
longitude
)
{
if
(
a
.
latitude
&&
a
.
longitude
)
{
// let e = a.longitude + "," + a.latitude;
let
e
=
a
.
latitude
+
","
+
a
.
longitude
;
let
e
=
'113.88308'
+
','
+
'22.55329'
// // let e = "113.88308" + ',' + "22.55329"
// let e = "22.55329" + ',' + "113.88308"
t
.
location
=
e
;
t
.
location
=
e
;
}
}
h
.
regeocoding
(
t
);
h
.
regeocoding
(
t
);
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
},
},
goBack
()
{
goBack
()
{
uni
.
navigateBack
({
uni
.
navigateBack
({
delta
:
2
delta
:
1
});
});
},
},
getSystemInfo
()
{
getSystemInfo
()
{
...
@@ -133,8 +133,9 @@
...
@@ -133,8 +133,9 @@
uni
.
getLocation
({
uni
.
getLocation
({
type
:
'wgs84'
,
type
:
'wgs84'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
that
.
longitude
=
'经度:'
+
res
.
longitude
that
.
longitude
=
res
.
longitude
that
.
latitude
=
'纬度:'
+
res
.
latitude
that
.
latitude
=
res
.
latitude
that
.
baiduLocation
()
}
}
});
});
},
},
...
@@ -162,11 +163,8 @@
...
@@ -162,11 +163,8 @@
this
.
ctx
.
takePhoto
({
this
.
ctx
.
takePhoto
({
quality
:
'high'
,
quality
:
'high'
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
res
)
that
.
drawCanvas
(
res
.
tempImagePath
)
//this.imageChange(res)
// this.getImageInfo(res.tempImagePath)
this
.
getImageInfo
(
res
.
tempImagePath
)
//this.saveToLocal(res.tempImagePath)
}
}
});
});
},
},
...
@@ -189,7 +187,7 @@
...
@@ -189,7 +187,7 @@
},
},
//第三步: 绘制画布
//第三步: 绘制画布
drawCanvas
:
function
(
tempImagePath
,
res
)
{
drawCanvas
:
function
(
tempImagePath
)
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'数据处理中...'
,
title
:
'数据处理中...'
,
icon
:
'loading'
icon
:
'loading'
...
@@ -208,10 +206,10 @@
...
@@ -208,10 +206,10 @@
this
.
canvas
.
setFillStyle
(
'#f2f2f2'
)
this
.
canvas
.
setFillStyle
(
'#f2f2f2'
)
let
h
=
1
let
h
=
1
let
txtHeight
=
36
let
txtHeight
=
36
this
.
canvas
.
fillText
(
'
经度'
+
this
.
long
itude
,
20
,
canvasHeight
-
txtHeight
*
h
++
);
this
.
canvas
.
fillText
(
'
维度: '
+
this
.
lat
itude
,
20
,
canvasHeight
-
txtHeight
*
h
++
);
this
.
canvas
.
fillText
(
'
维度'
+
this
.
lat
itude
,
20
,
canvasHeight
-
txtHeight
*
h
++
);
this
.
canvas
.
fillText
(
'
经度: '
+
this
.
long
itude
,
20
,
canvasHeight
-
txtHeight
*
h
++
);
this
.
canvas
.
fillText
(
'地址'
+
this
.
address
,
20
,
canvasHeight
-
txtHeight
*
h
++
);
this
.
canvas
.
fillText
(
'地址
:
'
+
this
.
address
,
20
,
canvasHeight
-
txtHeight
*
h
++
);
this
.
canvas
.
fillText
(
'时间'
+
this
.
date
,
20
,
canvasHeight
-
txtHeight
*
h
++
);
this
.
canvas
.
fillText
(
'时间
:
'
+
this
.
date
,
20
,
canvasHeight
-
txtHeight
*
h
++
);
//加入 水印图片
//加入 水印图片
this
.
canvas
.
drawImage
(
this
.
markPath
,
canvasWidth
/
2
-
200
,
canvasHeight
/
2
-
50
,
400
,
100
)
this
.
canvas
.
drawImage
(
this
.
markPath
,
canvasWidth
/
2
-
200
,
canvasHeight
/
2
-
50
,
400
,
100
)
...
@@ -248,10 +246,11 @@
...
@@ -248,10 +246,11 @@
// }
// }
},
},
fail
:
(
res
)
=>
{
fail
:
(
res
)
=>
{
uni
.
hideLoading
();
console
.
log
(
res
);
console
.
log
(
res
);
},
},
complete
:
()
=>
{
complete
:
()
=>
{
uni
.
hideLoading
();
//
uni.hideLoading();
}
}
},
this
);
},
this
);
},
500
);
},
500
);
...
@@ -269,8 +268,8 @@
...
@@ -269,8 +268,8 @@
uni
.
saveImageToPhotosAlbum
({
uni
.
saveImageToPhotosAlbum
({
filePath
:
tempImagePath
,
filePath
:
tempImagePath
,
success
()
{
success
()
{
uni
.
hideLoading
();
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
title
:
'已将照片保存到本地相册'
title
:
'已将照片保存到本地相册'
})
})
let
timer
=
setTimeout
(()
=>
{
let
timer
=
setTimeout
(()
=>
{
...
...
take-order/project.config.json
0 → 100644
View file @
32558250
{
"description"
:
"项目配置文件"
,
"packOptions"
:
{
"ignore"
:
[]
},
"setting"
:
{
"urlCheck"
:
true
,
"es6"
:
true
,
"enhance"
:
false
,
"postcss"
:
true
,
"preloadBackgroundData"
:
false
,
"minified"
:
true
,
"newFeature"
:
false
,
"coverView"
:
true
,
"nodeModules"
:
false
,
"autoAudits"
:
false
,
"showShadowRootInWxmlPanel"
:
true
,
"scopeDataCheck"
:
false
,
"uglifyFileName"
:
false
,
"checkInvalidKey"
:
true
,
"checkSiteMap"
:
true
,
"uploadWithSourceMap"
:
true
,
"compileHotReLoad"
:
false
,
"useMultiFrameRuntime"
:
false
,
"useApiHook"
:
true
,
"babelSetting"
:
{
"ignore"
:
[],
"disablePlugins"
:
[],
"outputPath"
:
""
},
"enableEngineNative"
:
false
,
"bundle"
:
false
,
"useIsolateContext"
:
true
,
"useCompilerModule"
:
true
,
"userConfirmedUseCompilerModuleSwitch"
:
false
,
"userConfirmedBundleSwitch"
:
false
,
"packNpmManually"
:
false
,
"packNpmRelationList"
:
[],
"minifyWXSS"
:
true
},
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.14.1"
,
"appid"
:
"wxd1d6eede324b0465"
,
"projectname"
:
"miniprogram-1"
,
"cloudfunctionTemplateRoot"
:
""
,
"watchOptions"
:
{
"ignore"
:
[]
},
"debugOptions"
:
{
"hidedInDevtools"
:
[]
},
"scripts"
:
{},
"condition"
:
{
"plugin"
:
{
"list"
:
[]
},
"game"
:
{
"list"
:
[]
},
"gamePlugin"
:
{
"list"
:
[]
},
"miniprogram"
:
{
"list"
:
[]
}
}
}
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