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

'add-mao'

parent 81b50f21
...@@ -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.longitude, 20, canvasHeight - txtHeight * h++); this.canvas.fillText('维度: ' + this.latitude, 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.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(() => {
......
{
"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