Commit 733b1ddb authored by 和慭琛's avatar 和慭琛

BUG修改

parent 32558250
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
//https://system.dev.banshouhui.com //https://system.dev.banshouhui.com
//正式环境 //正式环境
domain_Name: 'https://system.banshouhui.com', //domain_Name: 'https://system.banshouhui.com',
//测试环境 //测试环境
//domain_Name: 'https://system.dev.banshouhui.com', domain_Name: 'https://system.dev.banshouhui.com',
//http://192.168.0.208:8192 //http://192.168.0.208:8192
//小青本地环境 //小青本地环境
......
...@@ -6,7 +6,16 @@ ...@@ -6,7 +6,16 @@
*/ */
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "下单"
}
},
{ {
"path": "pages/photo/product", "path": "pages/photo/product",
"style": { "style": {
...@@ -50,13 +59,7 @@ ...@@ -50,13 +59,7 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "下单"
}
},
{ {
...@@ -123,6 +126,13 @@ ...@@ -123,6 +126,13 @@
"navigationBarTitleText": "下载APP" "navigationBarTitleText": "下载APP"
} }
},
{
"path": "pages/take/index",
"style": {
"navigationBarTitleText": "接单"
}
}, },
{ {
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
images:[], images:[],
icon_gotake:'https://qn-static.banshouhui.com/gotake.png', icon_gotake:'https://qn-static.banshouhui.com/gotake.png',
icon_arrow_down:'https://qn-static.banshouhui.com/arrow_down.png', icon_arrow_down:'https://qn-static.banshouhui.com/arrow_down.png',
ifFirst:true,
last_done_count:0,
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -31,7 +33,11 @@ ...@@ -31,7 +33,11 @@
}, },
onShow(){ onShow(){
this.checkDoneCount()
if(this.isFirst == false){
this.checkDoneCount()
}
}, },
methods: { methods: {
...@@ -68,8 +74,12 @@ ...@@ -68,8 +74,12 @@
//检查已拍照数量 //检查已拍照数量
checkDoneCount: function (){ checkDoneCount: function (){
let pages = getCurrentPages(); let pages = getCurrentPages();
let currPage = pages[pages.length-1]; let currPage = pages[pages.length-1];
this.done_count = currPage.data.done_count
console.log('是否清除:') console.log('是否清除:')
//console.log(currPage.data.isClean) //console.log(currPage.data.isClean)
if (currPage.data.done_count == this.image_count){ if (currPage.data.done_count == this.image_count){
...@@ -87,9 +97,19 @@ ...@@ -87,9 +97,19 @@
}else{ }else{
console.log('没有拍完 所有数量照片')
this.current_count = currPage.data.done_count if(this.done_count != this.last_done_count ){
this.current_image = this.images[currPage.data.done_count] this.last_done_count = this.done_count
console.log('没有拍完 所有数量照片')
this.current_count = currPage.data.done_count + 1
this.current_image = this.images[currPage.data.done_count + 1]
uni.setNavigationBarTitle({
title: '走线照片 (' + this.current_count + '/'+ this.image_count + ')'
})
}
} }
}, },
...@@ -103,6 +123,7 @@ ...@@ -103,6 +123,7 @@
//拍照 点击 //拍照 点击
takeClick: function () { takeClick: function () {
this.isFirst = false
uni.navigateTo({ uni.navigateTo({
url:'/pages/photo/try' url:'/pages/photo/try'
}) })
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</view> </view>
</view> </view>
<view class="rightView"> <view class="rightView">
<view class="rightItemView" @click="rightItemClick(item,ikey)" v-for="(item,ikey) in rightList":key="ikey"> <view :class=" item.isClicked == true ? 'rightItemView FAbackColor' : 'rightItemView' " @click="rightItemClick(item,ikey)" v-for="(item,ikey) in rightList":key="ikey">
<view :class=" item.images ? 'rightContentView width_50' : 'rightContentView width_100' "> <view :class=" item.images ? 'rightContentView width_50' : 'rightContentView width_100' ">
<text class="rightTitle u-m-t-30 u-m-l-30">{{item.name}} ({{item.image_count}}张)</text> <text class="rightTitle u-m-t-30 u-m-l-30">{{item.name}} ({{item.image_count}}张)</text>
<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>
...@@ -64,6 +64,12 @@ ...@@ -64,6 +64,12 @@
}, },
onShow() {
console.log('onShow 里的rightList:')
console.log(this.rightList)
},
methods: { methods: {
getListData: function (){ getListData: function (){
...@@ -85,7 +91,20 @@ ...@@ -85,7 +91,20 @@
}, },
handleData: function (res){ handleData: function (res){
this.dataList = res.result this.dataList = res.result
this.dataList.forEach(item => {
item.list.forEach(subItem => {
subItem.isClicked = false
})
})
console.log('添加 新字段 后的数组:')
console.log(this.dataList)
var item = res.result[0] var item = res.result[0]
this.rightList = item.list this.rightList = item.list
}, },
...@@ -98,8 +117,20 @@ ...@@ -98,8 +117,20 @@
//右侧点击 //右侧点击
rightItemClick: function (item,ikey) { rightItemClick: function (item,ikey) {
var current_image = item.images[ikey]
var current_count = ikey + 1 // for (let i = 0; i < this.rightList.length; i++) {
// var subItem = this.rightList[i]
// if(i == ikey){
// subItem.isClicked = true
// }
// }
item.isClicked = true
console.log('点击事件 里的rightList:')
console.log(this.rightList)
var current_image = item.images[0]
var current_count = 1
uni.navigateTo({ uni.navigateTo({
url:'/pages/photo/detail' url:'/pages/photo/detail'
+'?current_image=' + current_image +'?current_image=' + current_image
...@@ -180,6 +211,14 @@ ...@@ -180,6 +211,14 @@
border-left: 2rpx solid #F3F3F3; border-left: 2rpx solid #F3F3F3;
} }
.rightActiveContentView{
background-color: #4CD964;
display: flex;
flex-direction: column;
border-left: 2rpx solid #F3F3F3;
}
.width_50{ .width_50{
width: 480rpx; width: 480rpx;
} }
...@@ -200,7 +239,6 @@ ...@@ -200,7 +239,6 @@
} }
.rightImageView{ .rightImageView{
background-color: #FFFFFF;
width: 300rpx; width: 300rpx;
height: 320rpx; height: 320rpx;
display: flex; display: flex;
...@@ -253,6 +291,9 @@ ...@@ -253,6 +291,9 @@
padding-left: 30rpx; padding-left: 30rpx;
} }
.greenBackColor{
background-color: #4CD964;
}
......
...@@ -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>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<cover-image class="backIcon" :src="icon_arrow_down" mode="" @click="goBack"></cover-image> <cover-image class="backIcon" :src="icon_arrow_down" mode="" @click="goBack"></cover-image>
<!--cover-image class='switchIcon' :src='icon_switch_white' @click="switchClick()"> </cover-image--> <!--cover-image class='switchIcon' :src='icon_switch_white' @click="switchClick()"> </cover-image-->
<cover-image class='takeIcon' :src='icon_take' @click="takePhoto()"> </cover-image> <cover-image class='takeIcon' :src='icon_take' @click="takePhoto()"> </cover-image>
<!--cover-image class='flashIcon' :src='icon_light_on_white' @click="flashClick()"> </cover-image--> <!--cover-image class='flashIcon' :src='icon_light_on_white' @click="flashClick()"> </cover-image-->
</cover-view> </cover-view>
<canvas v-show='showImage' canvas-id="canvas" :style="{'width':canvasWidth+'px','height': canvasHeight + 'px'}"></canvas> <canvas v-show='showImage' canvas-id="canvas" :style="{'width':canvasWidth+'px','height': canvasHeight + 'px'}"></canvas>
...@@ -26,13 +26,7 @@ ...@@ -26,13 +26,7 @@
</template> </template>
<script> <script>
let r = require("../../libs/bmap-wx.min.js");
let h = new r.BMapWX({
// ak: "rpVq5d3yxaRCoKzVwmFMo0o4iC524CAG",
ak:"lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI"
});
export default { export default {
data() { data() {
return { return {
title: '', title: '',
...@@ -41,10 +35,10 @@ ...@@ -41,10 +35,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',
...@@ -56,9 +50,9 @@ ...@@ -56,9 +50,9 @@
width: '', width: '',
height: '', height: '',
markPath: '', markPath: '',
canvasWidth: 0, canvasWidth:0,
canvasHeight: 0, canvasHeight:0,
restuleImage: '', restuleImage:'',
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -67,7 +61,6 @@ ...@@ -67,7 +61,6 @@
this.getLocation() this.getLocation()
this.getMarkPath() this.getMarkPath()
this.getSystemInfo() this.getSystemInfo()
// this.baiduLocation()
uni.setNavigationBarColor({ uni.setNavigationBarColor({
frontColor: '#FFFFFF', frontColor: '#FFFFFF',
backgroundColor: '#333333', backgroundColor: '#333333',
...@@ -75,47 +68,25 @@ ...@@ -75,47 +68,25 @@
//this.address = '' //this.address = ''
}, },
methods: { methods: {
baiduLocation() { goPage(){
let a = this,
t = function() {
let t = {
success: function(res) {
let e = res.wxMarkerData[0];
let i = e.address;
a.address = i
// a.setData({
// addressValue: i
// }), o.globalData.addressValue = i, a.initWatermarkBoxHeightAndWidth();
},
fail: function(a) {
console.log(a,'a')
// n.error(a), console.log(a);
}
};
if (a.latitude && a.longitude) {
let e = a.latitude + "," + a.longitude;
// // let e = "113.88308" + ',' + "22.55329"
// let e = "22.55329" + ',' + "113.88308"
t.location = e;
}
h.regeocoding(t);
};
t()
},
goPage() {
// 进入图片预览页 // 进入图片预览页
}, },
goBack() { goBack(){
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2]; //上一个页面
prevPage.$vm.done_count ++;
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 2
}); });
}, },
getSystemInfo() { getSystemInfo() {
// 获取设备信息 // 获取设备信息
try { try {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
this.canvasWidth = res.windowWidth * 2 this.canvasWidth = res.windowWidth*2
this.canvasHeight = res.windowHeight * 2 this.canvasHeight = res.windowHeight*2
} catch (e) { } catch (e) {
// error // error
} }
...@@ -133,9 +104,8 @@ ...@@ -133,9 +104,8 @@
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()
} }
}); });
}, },
...@@ -163,8 +133,11 @@ ...@@ -163,8 +133,11 @@
this.ctx.takePhoto({ this.ctx.takePhoto({
quality: 'high', quality: 'high',
success: (res) => { success: (res) => {
that.drawCanvas(res.tempImagePath) console.log(res)
// this.getImageInfo(res.tempImagePath) //this.imageChange(res)
this.getImageInfo(res.tempImagePath)
//this.saveToLocal(res.tempImagePath)
} }
}); });
}, },
...@@ -187,7 +160,7 @@ ...@@ -187,7 +160,7 @@
}, },
//第三步: 绘制画布 //第三步: 绘制画布
drawCanvas: function(tempImagePath) { drawCanvas: function(tempImagePath, res) {
uni.showLoading({ uni.showLoading({
title: '数据处理中...', title: '数据处理中...',
icon: 'loading' icon: 'loading'
...@@ -205,13 +178,13 @@ ...@@ -205,13 +178,13 @@
this.canvas.setFontSize(28) this.canvas.setFontSize(28)
this.canvas.setFillStyle('#f2f2f2') this.canvas.setFillStyle('#f2f2f2')
let h = 1 let h = 1
let txtHeight = 36 let txtHeight=36
this.canvas.fillText('维度: ' + this.latitude, 20, canvasHeight - txtHeight * h++); this.canvas.fillText('经度' + this.longitude, 20, canvasHeight - txtHeight * h++);
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.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)
this.canvasImage() this.canvasImage()
// this.canvas.draw() // this.canvas.draw()
...@@ -238,19 +211,18 @@ ...@@ -238,19 +211,18 @@
canvasId: 'canvas', canvasId: 'canvas',
success: (res) => { success: (res) => {
self.saveToLocal(res.tempFilePath) self.saveToLocal(res.tempFilePath)
// this.$emit('canvasImage', res.tempFilePath); // this.$emit('canvasImage', res.tempFilePath);
// if (this.showPreview) { // if (this.showPreview) {
// this.restultImage = res.tempFilePath // this.restultImage = res.tempFilePath
// self.showPreviewFn(res.tempFilePath); // self.showPreviewFn(res.tempFilePath);
// } // }
}, },
fail: (res) => { fail: (res) => {
uni.hideLoading();
console.log(res); console.log(res);
}, },
complete: () => { complete: () => {
// uni.hideLoading(); uni.hideLoading();
} }
}, this); }, this);
}, 500); }, 500);
...@@ -264,24 +236,24 @@ ...@@ -264,24 +236,24 @@
}, },
//第五步: 保存到本地相册 //第五步: 保存到本地相册
saveToLocal(tempImagePath) { saveToLocal(tempImagePath) {
let that = this let that = this
uni.saveImageToPhotosAlbum({ uni.saveImageToPhotosAlbum({
filePath: tempImagePath, filePath: tempImagePath,
success() { success() {
uni.hideLoading();
uni.showToast({ uni.showToast({
title: '已将照片保存到本地相册' icon:'none',
title:'已将照片保存到本地相册'
}) })
let timer = setTimeout(() => { let timer = setTimeout(()=>{
that.goBack() that.goBack()
}, 0) },0)
}, },
fail() { fail() {
// console.log('保存本地相册 失败') // console.log('保存本地相册 失败')
uni.showToast({ uni.showToast({
icon: 'none', icon:'none',
title: '保存本地相册失败' title:'保存本地相册失败'
}) })
} }
}) })
...@@ -386,7 +358,7 @@ ...@@ -386,7 +358,7 @@
position: fixed; position: fixed;
left: 60rpx; left: 60rpx;
bottom: 50rpx; bottom: 50rpx;
border: 2rpx solid #aaa; border:2rpx solid #aaa;
} }
.showCanvas { .showCanvas {
......
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