From 88b39cea1cc55301f4c6d829c970da2c4814f8d4 Mon Sep 17 00:00:00 2001 From: Sliverber <2622874537@qq.com> Date: Mon, 22 Jul 2024 17:47:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E7=BD=91=E7=BB=9C=20=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E8=AF=A6=E6=83=85=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- page_user/vadio_back.vue | 44 ++-- page_user/yj.vue | 24 ++- pages/index/index.vue | 311 +++++++++++++++++++++-------- pages/my.vue | 2 +- pages_admin/admin_worke.vue | 2 +- pages_admin/order/order_detail.vue | 250 ++++++++++++++++++++++- 6 files changed, 520 insertions(+), 113 deletions(-) diff --git a/page_user/vadio_back.vue b/page_user/vadio_back.vue index 0496e5d..6d59a0b 100644 --- a/page_user/vadio_back.vue +++ b/page_user/vadio_back.vue @@ -27,7 +27,7 @@ - 提交 + 下一步 @@ -60,20 +60,36 @@ }, methods: { sub(){ - let data={ - orderNo:this.orderinfo.orderNo, - videoUrl:this.videoUrl - } - this.$u.put('/appVerify/order/saveVideoUrl',data ).then((res) => { - // uni.hideLoading() - if (res.code === 200) { - uni.navigateBack({ - delta: 1 // delta值为1时表示返回的页面层数 - }); - } else { - + if(this.videoUrl!=''){ + let data={ + orderNo:this.orderinfo.orderNo, + videoUrl:this.videoUrl } - }) + this.$u.put('/appVerify/order/saveVideoUrl',data ).then((res) => { + // uni.hideLoading() + if (res.code === 200) { + uni.redirectTo({ + url:'/pages/index/index?isupload=true' + }) + // uni.navigateBack({ + // delta: 1 // delta值为1时表示返回的页面层数 + // }); + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }) + }else{ + uni.showToast({ + title:'请上传录像', + icon: 'none', + duration: 2000 + }); + } + }, getisInOrder() { // uni.showLoading({ diff --git a/page_user/yj.vue b/page_user/yj.vue index 389aa50..b23fef7 100644 --- a/page_user/yj.vue +++ b/page_user/yj.vue @@ -2,7 +2,7 @@ - + 充值押金 还车后随时可退 @@ -31,17 +31,21 @@ 立即充值 - + + + 押金余额 + {{userinfo.balance}} - - 充值 - - + + 提现 + + 充值押金 + @@ -200,7 +204,8 @@ showBack:false, loadingmask:false, ispaid:false, - showtxtip:false + showtxtip:false, + showList:false } @@ -224,6 +229,9 @@ } + if(e.showList){ + this.showList=true + } }, @@ -676,7 +684,7 @@ } .btn { - margin-top: 100rpx; + margin-top: 40rpx; display: flex; align-items: center; justify-content: center; diff --git a/pages/index/index.vue b/pages/index/index.vue index 47ede83..85ae765 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -42,6 +42,18 @@ + + + + + 当前网络不可用,请检查你的网络设置 + + + + + + @@ -284,11 +296,11 @@ - + 换车骑行 - + @@ -308,8 +320,8 @@ - + 临时锁车 + + + {{parkinfo.parkingName}} + + + 请根据手机引导将车辆有序停入停车点 + + + + + 导航去这里 + + @@ -893,6 +919,7 @@ export default { data() { return { + bgc: { backgroundColor: "#F7FAFE", }, @@ -1021,7 +1048,11 @@ showordertxt: true, orderwidth: 688, - isCollapsed: false + isCollapsed: false, + isupload: false, + showparkinfo: false, + parkinfo: {}, + netonlines:false } }, watch: { @@ -1069,6 +1100,12 @@ this.qParam = e.qParam + } + if (e.isupload) { + this.isupload = true + setTimeout(() => { + this.taploadmask(4) + }, 1000) } if (this.gps.deptId == 101) { if (this.showagre) { @@ -1140,82 +1177,102 @@ }); if (this.seeDetail == false) { - - - let that = this - uni.getLocation({ - type: 'gcj02', - success: function(lb) { - // that.latitude = 23.440359 - // that.longitude = 117.074552 - // that.gps.latitude = 23.440359 - // that.gps.longitude = 117.074552; - - - - that.gps.latitude = lb.latitude; - that.gps.longitude = lb.longitude; - - that.latitude = lb.latitude; - that.longitude = lb.longitude; - - - console.log(that.areaInfo, 'that.areaInfo'); - that.getArea() - if (that.qParam != 'null' && that.showagre == false) { - let qParam = that.qParam - console.log(qParam, 'qParamqParamqParam'); - // 第2步: URL解码q参数 - let decodedUrl = decodeURIComponent(qParam); - - // 第3步: 使用正则表达式解析解码后的URL并提取查询参数 - let sn = null; - let queryParams = decodedUrl.split('?')[1]; - if (queryParams) { - let params = queryParams.split('&'); - params.forEach(param => { - let [key, value] = param.split('='); - if (key === 'sn') { - sn = value; + let that = this + uni.getNetworkType({ + success: function(res) { + console.log(res.networkType); // 输出网络类型,如 "wifi", "4g", "3g", "2g", "none" + if (res.networkType == 'none') { + that.netonlines = false + + + } else { + that.netonlines = true + uni.getLocation({ + type: 'gcj02', + success: function(lb) { + // that.latitude = 23.440359 + // that.longitude = 117.074552 + // that.gps.latitude = 23.440359 + // that.gps.longitude = 117.074552; + + + + that.gps.latitude = lb.latitude; + that.gps.longitude = lb.longitude; + + that.latitude = lb.latitude; + that.longitude = lb.longitude; + + + console.log(that.areaInfo, 'that.areaInfo'); + that.getArea() + if (that.qParam != 'null' && that.showagre == false) { + let qParam = that.qParam + console.log(qParam, 'qParamqParamqParam'); + // 第2步: URL解码q参数 + let decodedUrl = decodeURIComponent(qParam); + + // 第3步: 使用正则表达式解析解码后的URL并提取查询参数 + let sn = null; + let queryParams = decodedUrl.split('?')[1]; + if (queryParams) { + let params = queryParams.split('&'); + params.forEach(param => { + let [key, value] = param.split('='); + if (key === 'sn') { + sn = value; + } + }); + } + that.sn = sn + if (that.sn != '') { + + + setTimeout(() => { + + if (!that.orderinfo.status) { + that.deviceInfo(1) + that.qParam = null + // this.showdevice = true + // this.deviceIndex = 1 + // this.type = 1 + } else { + // this.showtcs=true + } + }, 700) + + + } } - }); - } - that.sn = sn - if (that.sn != '') { - - - setTimeout(() => { - - if (!that.orderinfo.status) { - that.deviceInfo(1) - that.qParam = null - // this.showdevice = true - // this.deviceIndex = 1 - // this.type = 1 - } else { - // this.showtcs=true - } - }, 700) - - - } + // that.getmarks() + + + // + }, + fail: function(error) { + uni.showToast({ + title: '未获取到定位信息,请点击设置勾选允许位置信息,即可使用全部功能', + icon: 'none', + duration: 2000 + }); + // that.getmarks() + // 在这里处理获取位置信息失败的情况 + } + + }) + + + + + // console.log('有网络连接');\ + } - // that.getmarks() - - - // - }, - fail: function(error) { - uni.showToast({ - title: '未获取到定位信息,请点击设置勾选允许位置信息,即可使用全部功能', - icon: 'none', - duration: 2000 - }); - // that.getmarks() - // 在这里处理获取位置信息失败的情况 } + }); + + + - }) } else { this.getinfo() } @@ -1274,7 +1331,18 @@ }, }, methods: { - tochange(){ + mapFun() { + console.log('点击了'); + uni.openLocation({ + latitude: parseFloat(this.parkinfo.latitude), + //纬度 - 目的地/坐标点 + longitude: parseFloat(this.parkinfo.longitude), + //经度 - 目的地/坐标点 + // name: "荆门市", + address: this.parkinfo.parkingName + }); + }, + tochange() { uni.navigateTo({ url: '/page_user/changeCar' }) @@ -1402,6 +1470,7 @@ closemaske() { this.maskloading = false this.backfalse = 0 + this.isupload = false }, onMapTap(event) { @@ -1412,6 +1481,8 @@ this.freeInfo = {} this.freeListIndex = 0 this.mappolyline = [] + // this.showparkinfo=false + // this.parkinfo={} // this.lastClickedMarkerId=null // const { // latitude, @@ -1473,9 +1544,18 @@ this.type = 0; this.freeInfo = {}; this.freeListIndex = 0; - + this.parkinfo = {} + this.showparkinfo = false if (e.type === 'markertap') { console.log('Clicked marker:', e.markerId); + let parkmark = this.parkingList.some(item => item.parkingId == e.markerId); + if (parkmark) { + const matchingItem = this.parkingList.find(item => item.parkingId == e.markerId); + this.showparkinfo = true + this.parkinfo = matchingItem + console.log(matchingItem, 'parkmarkparkmark'); + e.stopPropagation(); + } const markerExists = this.listData.some(item => item.sn == e.markerId); @@ -1860,11 +1940,11 @@ this.maskepage = 0 this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/uRxPPoVoqmnmng6wKlij' if (num == 1) { - + if (!this.checkBeforeUnlock()) { return; } - + if (this.showxy) { this.maskloading = true; let percentage = 0; @@ -1925,11 +2005,14 @@ }, 2100); } else if (num == 4) { - if (this.areaInfo.returnVerify == 1 && !this.orderinfo.videoUrl) { + + + if (this.areaInfo.returnVerify == 1 && this.isupload == false) { this.maskloading = true this.maskepage = 8 } else { - //还车校验 + this.isupload = false + // 还车校验 this.maskloading = true; let percentage = 0; const interval = setInterval(() => { @@ -1950,6 +2033,7 @@ } }, + Binddevice() { uni.getBluetoothAdapterState({ success: function(res) { @@ -4936,6 +5020,63 @@ .page { width: 750rpx; + .bottom_park { + padding: 40rpx 42rpx; + position: fixed; + bottom: 0; + left: 0; + z-index: 100; + width: 750rpx; + // height: 674rpx; + background: #FFFFFF; + border-radius: 40rpx 40rpx 0 0; + box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08); + + .gobtn { + margin-top: 30rpx; + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 80rpx; + font-weight: 500; + font-size: 40rpx; + color: #FFFFFF; + background: #64B6A7; + border-radius: 30rpx; + + } + + .tit { + width: 100%; + font-weight: 600; + font-size: 36rpx; + color: #3D3D3D; + } + + .tip { + margin-top: 12rpx; + width: 100%; + font-weight: 500; + font-size: 28rpx; + color: #808080; + } + + .parkimg { + margin-top: 40rpx; + width: 672rpx; + height: 388rpx; + } + + .close { + position: absolute; + right: 34rpx; + top: 50rpx; + width: 32rpx; + height: 32rpx; + } + } + .fixdivce { padding: 12rpx 22rpx 12rpx 22rpx; position: fixed; @@ -6024,7 +6165,8 @@ font-size: 36rpx; color: #3D3D3D; } - .changebiketip{ + + .changebiketip { bottom: 20rpx; left: 280rpx; position: absolute; @@ -6035,6 +6177,7 @@ font-size: 28rpx; color: #3D3D3D; } + .cont { margin-top: 30rpx; display: flex; diff --git a/pages/my.vue b/pages/my.vue index 7dd319f..a6521b7 100644 --- a/pages/my.vue +++ b/pages/my.vue @@ -310,7 +310,7 @@ // }) } else if (num == 1) { uni.navigateTo({ - url: '/page_user/yj' + url: '/page_user/yj?showList=true' }) } else if (num == 2) { uni.navigateTo({ diff --git a/pages_admin/admin_worke.vue b/pages_admin/admin_worke.vue index 37da141..e6805b0 100644 --- a/pages_admin/admin_worke.vue +++ b/pages_admin/admin_worke.vue @@ -48,7 +48,7 @@ 车辆绑定 - + 账户明细 diff --git a/pages_admin/order/order_detail.vue b/pages_admin/order/order_detail.vue index c3a40c9..87e4a00 100644 --- a/pages_admin/order/order_detail.vue +++ b/pages_admin/order/order_detail.vue @@ -119,7 +119,7 @@ - + 视频审核 待审核 @@ -134,7 +134,7 @@ 待官方审核 - + @@ -251,10 +251,18 @@ 退款 --> + - + 退款 + + 辅助还车 + + + 改价 + + 审核通过 @@ -274,6 +282,83 @@ + + + + + + 改价 + + + + + 运营区外调度费 + + + + 元 + + + + + 停车点外调度费 + + + + 元 + + + + + 骑行费 + + + + 元 + + + + + 预约费 + + + + 元 + + + + + + 取消 + + + 确定 + + + + + + + 提示 + + + + 确定要辅助还车吗? + + + + + 取消 + + + 确定 + + + @@ -404,7 +489,8 @@ money: '', areaNum: 1, showload:false, - + showfzhc:false, + showgj:false } }, @@ -456,6 +542,57 @@ }, methods: { + // 改价 + changeMoney() { + let data = { + orderNo: this.orderInfo.orderNo, + dispatchFee: this.orderInfo.dispatchFee, + manageFee: this.orderInfo.manageFee, + ridingFee: this.orderInfo.ridingFee, + appointmentFee: this.orderInfo.appointmentFee, + } + + this.$u.put('/appVerify/order/editPrice', data).then((res) => { + if (res.code === 200) { + // 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构 + + this.showgj = false + this.getOrderDetail() + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }).catch(error => { + console.error("Error fetching area data:", error); + }); + }, + closefz() { + // this.show = false + this.showfzhc = false + // this.orderInfo = {} + }, + backDevice() { + this.$u.post('/appVerify/device/return?orderNo=' + this.orderInfo.orderNo + '&returnType=2').then(( + res) => { + if (res.code === 200) { + // 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构 + // this.show = false + this.showfzhc = false + this.getOrderDetail() + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }).catch(error => { + console.error("Error fetching area data:", error); + }); + }, ckmoney() { uni.showLoading({ title:'加载中...' @@ -970,7 +1107,110 @@ color: #3D3D3D; } } - + .tip_box1 { + position: fixed; + left: 72rpx; + top: 628rpx; + width: 610rpx; + // height: 282rpx; + background: #FFFFFF; + border-radius: 30rpx 30rpx 30rpx 30rpx; + z-index: 110; + padding-bottom: 100rpx; + + .top1 { + padding: 52rpx 38rpx 42rpx 36rpx; + + .ipt_box { + margin-top: 22rpx; + display: flex; + flex-wrap: nowrap; + align-items: center; + + .text { + width: 350rpx; + font-weight: 400; + font-size: 32rpx; + color: #3D3D3D; + } + + .ipt { + padding: 10rpx 18rpx; + display: flex; + align-items: center; + justify-content: space-between; + margin-left: 26rpx; + width: 420rpx; + height: 64rpx; + border-radius: 0rpx 0rpx 0rpx 0rpx; + border: 2rpx solid #979797; + + .input { + width: 80%; + } + } + } + + .tip { + width: 100%; + text-align: center; + font-weight: 700; + font-size: 32rpx; + color: #3D3D3D; + } + + .txt { + margin-top: 32rpx; + width: 100%; + text-align: center; + font-weight: 500; + font-size: 32rpx; + color: #3D3D3D; + } + } + + .bot1 { + position: absolute; + + width: 610rpx; + // border-top: 2rpx solid #D8D8D8; + display: flex; + flex-wrap: nowrap; + // height: 100%; + bottom: -20rpx; + + .bot_left { + border-radius: 0rpx 0rpx 0rpx 30rpx; + width: 50%; + height: 86rpx; + display: flex; + align-items: center; + justify-content: center; + font-weight: 500; + font-size: 32rpx; + color: #3D3D3D; + background: #EEEEEE; + } + + .bot_right { + border-radius: 0rpx 0rpx 30rpx 0rpx; + width: 50%; + height: 86rpx; + background: #4C97E7; + display: flex; + align-items: center; + justify-content: center; + color: #FFFFFF; + // border-left: 2rpx solid #D8D8D8; + font-weight: 500; + font-size: 32rpx; + // color: #4C97E7; + + } + + } + } + .tip_box { position: fixed; left: 72rpx;