Commit 32558250 authored by 李超鹏's avatar 李超鹏

'add-mao'

parent 81b50f21
......@@ -3,10 +3,10 @@
<view class="">
<camera device-position="back" flash="off" style='width:100%; height:100vh;'>
<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-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">{{date}}</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">地址:{{address}}</cover-view>
<cover-view class="locationText u-m-l-20 u-m-t-10">时间:{{date}}</cover-view>
</cover-view>
<cover-image class="liveWatermarkNormal" mode="aspectFit" :src="liveWaterMarkImage"></cover-image>
</camera>
......@@ -41,10 +41,10 @@
image: "",
showImage: false,
canvas: null,
longitude: '经度:正在获取中...',
latitude: '纬度:正在获取中...',
address: '地址:正在获取中...',
date: '时间:正在获取中...',
longitude: '正在获取中...',
latitude: '正在获取中...',
address: '正在获取中...',
date: '正在获取中...',
icon_location: 'https://qn-static.banshouhui.com/take_order/icon/location.png',
scale: "4_3",
icon_take: 'https://qn-static.banshouhui.com/take.png',
......@@ -67,7 +67,7 @@
this.getLocation()
this.getMarkPath()
this.getSystemInfo()
this.baiduLocation()
// this.baiduLocation()
uni.setNavigationBarColor({
frontColor: '#FFFFFF',
backgroundColor: '#333333',
......@@ -80,10 +80,9 @@
t = function() {
let t = {
success: function(res) {
var e = res.wxMarkerData[0];
console.log("当前定位", e);
var i = e.address;
this.address = i
let e = res.wxMarkerData[0];
let i = e.address;
a.address = i
// a.setData({
// addressValue: i
// }), o.globalData.addressValue = i, a.initWatermarkBoxHeightAndWidth();
......@@ -94,8 +93,9 @@
}
};
if (a.latitude && a.longitude) {
// let e = a.longitude + "," + a.latitude;
let e = '113.88308' + ',' + '22.55329'
let e = a.latitude + "," + a.longitude;
// // let e = "113.88308" + ',' + "22.55329"
// let e = "22.55329" + ',' + "113.88308"
t.location = e;
}
h.regeocoding(t);
......@@ -107,7 +107,7 @@
},
goBack() {
uni.navigateBack({
delta: 2
delta: 1
});
},
getSystemInfo() {
......@@ -133,8 +133,9 @@
uni.getLocation({
type: 'wgs84',
success: function(res) {
that.longitude = '经度:' + res.longitude
that.latitude = '纬度:' + res.latitude
that.longitude = res.longitude
that.latitude = res.latitude
that.baiduLocation()
}
});
},
......@@ -162,11 +163,8 @@
this.ctx.takePhoto({
quality: 'high',
success: (res) => {
console.log(res)
//this.imageChange(res)
this.getImageInfo(res.tempImagePath)
//this.saveToLocal(res.tempImagePath)
that.drawCanvas(res.tempImagePath)
// this.getImageInfo(res.tempImagePath)
}
});
},
......@@ -189,7 +187,7 @@
},
//第三步: 绘制画布
drawCanvas: function(tempImagePath, res) {
drawCanvas: function(tempImagePath) {
uni.showLoading({
title: '数据处理中...',
icon: 'loading'
......@@ -208,10 +206,10 @@
this.canvas.setFillStyle('#f2f2f2')
let h = 1
let txtHeight = 36
this.canvas.fillText('经度' + this.longitude, 20, canvasHeight - txtHeight * h++);
this.canvas.fillText('维度' + this.latitude, 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.latitude, 20, canvasHeight - txtHeight * h++);
this.canvas.fillText('经度: ' + this.longitude, 20, canvasHeight - txtHeight * h++);
this.canvas.fillText('地址: ' + this.address, 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)
......@@ -248,10 +246,11 @@
// }
},
fail: (res) => {
uni.hideLoading();
console.log(res);
},
complete: () => {
uni.hideLoading();
// uni.hideLoading();
}
}, this);
}, 500);
......@@ -269,8 +268,8 @@
uni.saveImageToPhotosAlbum({
filePath: tempImagePath,
success() {
uni.hideLoading();
uni.showToast({
icon: 'none',
title: '已将照片保存到本地相册'
})
let timer = setTimeout(() => {
......
{
"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": []
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment