This commit is contained in:
Sliverber 2024-05-15 18:02:17 +08:00
parent 3841324307
commit b9f702e309
7 changed files with 263 additions and 51 deletions

View File

@ -20,9 +20,9 @@ const install = (Vue, vm) => {
// }, // },
// }); // });
Vue.prototype.$u.http.setConfig({ Vue.prototype.$u.http.setConfig({
baseUrl: 'http://61.174.243.28:15861', // baseUrl: 'http://61.174.243.28:15861',
// baseUrl: 'http://192.168.2.6:8080', // baseUrl: 'http://192.168.2.6:8080',
// baseUrl: 'https://dianche.chuantewulian.cn/prod-api', baseUrl: 'https://dianche.chuantewulian.cn/prod-api',
loadingText: '努力加载中~', loadingText: '努力加载中~',
loadingTime: 800, loadingTime: 800,
// 设置自定义头部content-type // 设置自定义头部content-type

View File

@ -39,7 +39,7 @@
<view class="btn " v-if="false"> <view class="btn " v-if="false">
充值 充值
</view> </view>
<view class="btn"> <view class="btn" @click="show=true">
提现 提现
</view> </view>
</view> </view>
@ -54,25 +54,46 @@
</view> </view>
</view> </view>
<view class="cardcont"> <view class="cardcont">
<view class="cont_li" v-for="(item,index) in orderList" :key="index" > <view v-for="(item,index) in orderList" :key="index" style="display: flex;flex-wrap: wrap;">
<view class="cont_li_left"> <view class="cont_li" >
<view class="txt"> <view class="cont_li_left">
押金提现 <view class="txt">
押金充值
</view>
<view class="data">
{{item.payTime}}
</view>
</view> </view>
<view class="data"> <view class="cont_li_right">
2024-04-02 10:14:41 <view class="cont_price">
+{{item.totalFee}}
</view>
<view class="cont_data">
充值成功
</view>
</view> </view>
</view> </view>
<view class="cont_li_right"> <view class="cont_li" v-if="item.etRefund!=null&&item.etRefund.refundResult=='SUEECSS'">
<view class="cont_price"> <view class="cont_li_left">
-99 <view class="txt">
押金提现
</view>
<view class="data">
{{item.etRefund.createTime}}
</view>
</view> </view>
<view class="cont_data"> <view class="cont_li_right">
提现成功 <view class="cont_price">
-{{item.etRefund.amount}}
</view>
<view class="cont_data">
提现成功
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -90,7 +111,7 @@
<view class="bot_left" @click="show=false"> <view class="bot_left" @click="show=false">
取消 取消
</view> </view>
<view class="bot_right"> <view class="bot_right" @click="tixian()">
继续提现 继续提现
</view> </view>
</view> </view>
@ -105,7 +126,7 @@
bgc: { bgc: {
backgroundColor: "#7bb2ec", backgroundColor: "#7bb2ec",
}, },
show: true, show: false,
bindDeviceNum: null, bindDeviceNum: null,
userinfo: {}, userinfo: {},
orderList:[], orderList:[],
@ -156,6 +177,22 @@
}, },
}, },
methods: { methods: {
tixian(){
this.$u.post("/appVerify/order/withdraw").then((res) => {
if (res.code == 200) {
this.getinfo()
this.getlist()
this.show=false
} else {
uni.showToast({
title:res.msg,
icon: 'none',
duration: 2000
});
}
});
},
getlist() { getlist() {
this.$u.get("/appVerify/order/list?type=2&userId="+this.userId).then((res) => { this.$u.get("/appVerify/order/list?type=2&userId="+this.userId).then((res) => {
@ -163,7 +200,11 @@
this.orderList=res.rows this.orderList=res.rows
this.total=res.total this.total=res.total
} else { } else {
uni.showToast({
title:res.msg,
icon: 'none',
duration: 2000
});
} }
}); });
}, },

View File

@ -458,7 +458,7 @@
}, },
fail: function(error) { fail: function(error) {
that.getmarks()
// //
} }
@ -553,6 +553,58 @@
const timePassed = currentTime - createTimeTimestamp; const timePassed = currentTime - createTimeTimestamp;
const secondsPassed = Math.floor(timePassed / 1000); const secondsPassed = Math.floor(timePassed / 1000);
//
const hours = Math.floor(secondsPassed / 3600);
const minutes = Math.floor((secondsPassed % 3600) / 60);
const seconds = secondsPassed % 60;
const timeString = `${hours < 10 ? '0' : ''}${hours}:${minutes < 10 ? '0' : ''}${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
const tenMinuteIntervals = Math.floor((hours * 60 + minutes) / 10)+1 ; // 1
this.timeString=timeString
// console.log("" + timeString);
this.showdevice = true
this.deviceIndex=3
}else if(this.orderinfo.status==2&&this.orderinfo.ruleId==null){
// this.topay()
this.showdevice = true
this.deviceIndex=2
const createTimeTimestamp = new Date(this.orderinfo.createTime).getTime();
//
this.timer = setInterval(() => {
const currentTime = Date.now();
const timePassed = currentTime - createTimeTimestamp;
const secondsPassed = Math.floor(timePassed / 1000);
//
const hours = Math.floor(secondsPassed / 3600);
const minutes = Math.floor((secondsPassed % 3600) / 60);
const seconds = secondsPassed % 60;
const timeString = `${hours < 10 ? '0' : ''}${hours}:${minutes < 10 ? '0' : ''}${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
const tenMinuteIntervals = Math.floor((hours * 60 + minutes) / 10)+1 ; // 1
let money =0
// 10
this.money = this.appointmentServiceFee* tenMinuteIntervals;
// console.log("" + timeString);
// console.log("" +money+ "");
//
if (minutes % 10 === 0 && seconds === 0) {
}
this.timeString=timeString
// console.log("" + timeString);
}, 1000);
}else if(this.orderinfo.status==3&&this.orderinfo.ruleId==null){
// this.topay()
const createTimeTimestamp = new Date(this.orderinfo.createTime).getTime();
//
const currentTime = Date.now();
const timePassed = currentTime - createTimeTimestamp;
const secondsPassed = Math.floor(timePassed / 1000);
// //
const hours = Math.floor(secondsPassed / 3600); const hours = Math.floor(secondsPassed / 3600);
const minutes = Math.floor((secondsPassed % 3600) / 60); const minutes = Math.floor((secondsPassed % 3600) / 60);

View File

@ -78,6 +78,30 @@
</view> </view>
<view class="iconfont icon-xiangyou1" > <view class="iconfont icon-xiangyou1" >
</view>
</view>
<view class="card_li" @click="topage(8)" v-if="info.role==3||info.role==2">
<view class="card_left">
<image src="https://lxnapi.ccttiot.com/bike/img/static/unIGXFEhvTgtXVcfPH33" mode=""></image>
<view class="text">
维护入口
</view>
</view>
<view class="iconfont icon-xiangyou1" >
</view>
</view>
<view class="card_li" @click="topage(9)" v-if="info.role==3">
<view class="card_left">
<image src="https://lxnapi.ccttiot.com/bike/img/static/unIGXFEhvTgtXVcfPH33" mode=""></image>
<view class="text">
管理入口
</view>
</view>
<view class="iconfont icon-xiangyou1" >
</view> </view>
</view> </view>
</view> </view>
@ -107,7 +131,7 @@
</view> </view>
</view> </view>
<view class="card_li" style="border-bottom:2rpx solid #fff ;" @click="topage(7)"> <view class="card_li" style="border-bottom:2rpx solid #fff ;" @click="topage(7)" >
<view class="card_left"> <view class="card_left">
<image src="https://api.ccttiot.com/smartmeter/img/static/uJ1TRgb6xURsKZo5GUj8" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uJ1TRgb6xURsKZo5GUj8" mode=""></image>
<view class="text"> <view class="text">
@ -119,6 +143,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -169,16 +194,16 @@
uni.navigateTo({ uni.navigateTo({
url:'/page_user/jfgz' url:'/page_user/jfgz'
}) })
}else if(num==8){
uni.navigateTo({
url:'/page_fix/fix_index'
})
}else if(num=9){
uni.navigateTo({
url:'/pages_admin/admin_index'
})
} }
// else if(num==6){
// uni.navigateTo({
// url:'/pages/my'
// })
// }else if(num==7){
// uni.navigateTo({
// url:'/page_user/gzsb?mac='+this.mac
// })
// }
}, },
getuserInfo(){ getuserInfo(){
this.$u.get("/getAppInfo").then((res) => { this.$u.get("/getAppInfo").then((res) => {

View File

@ -33,12 +33,12 @@
用户管理 用户管理
</view> </view>
</view> </view>
<!-- <view class="cont"> <view class="cont" @click="topage(4)">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uM4rBBaXc7b3TmsqQTvz" mode=""></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/uM4rBBaXc7b3TmsqQTvz" mode=""></image>
<view class="text"> <view class="text">
运营区域 用户页面
</view> </view>
</view> --> </view>
</view> </view>
</view> </view>
@ -86,6 +86,10 @@
uni.navigateTo({ uni.navigateTo({
url:'/pages_admin/worke/worke_user' url:'/pages_admin/worke/worke_user'
}) })
}else if(num==4){
uni.navigateTo({
url:'/pages/index/index'
})
} }
} }
} }

View File

@ -3,7 +3,7 @@
<u-navbar title="订单详情" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' <u-navbar title="订单详情" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
height='36'></u-navbar> height='36'></u-navbar>
<map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude" <map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude"
:show-location='true' :markers="markers" :polygons="polyline"> </map> :show-location='true' :markers="markers" :polygons="polygons" :polyline="polyline"> </map>
<view class="info_card"> <view class="info_card">
<view class="info_tit"> <view class="info_tit">
基本信息 基本信息
@ -61,13 +61,31 @@
</view> </view>
<view class="lines"></view> <view class="lines"></view>
<view class="cont"> <view class="cont">
<view v-for="(item,index) in orderInfo.tripLogs" :key="index">
<view class="info_li"> <view class="info_lis" v-if="item.type==1">
开锁时间<span>{{orderInfo.unlock_time}}</span> 开锁时间<view class="text">{{item.createTime}}</view>
</view> </view>
<view class="info_li"> <view class="info_lis" v-if="item.type==1">
开锁地点<span>{{orderInfo.unlock_time}}</span> 开锁地点<view class="text"> {{item.address}}</view>
</view>
<view class="info_lis" v-if="item.type==2">
临时锁车时间<view class="text">{{item.createTime}}</view>
</view>
<view class="info_lis" v-if="item.type==2">
临时锁车地点<view class="text">{{item.address}}</view>
</view>
<view class="info_lis" v-if="item.type==3">
解除时间<view class="text">{{item.createTime}}</view>
</view>
<view class="info_lis" v-if="item.type==4">
关锁时间<view class="text">{{item.createTime}}</view>
</view>
<view class="info_lis" v-if="item.type==4">
关锁地点<view class="text">{{item.address}}</view>
</view>
</view> </view>
<!-- <view class="info_li"> <!-- <view class="info_li">
锁车时间<span>120.5618927.12379</span> 锁车时间<span>120.5618927.12379</span>
</view> </view>
@ -77,12 +95,7 @@
<!-- <view class="info_li"> <!-- <view class="info_li">
解除时间<span>120.5618927.12379</span> 解除时间<span>120.5618927.12379</span>
</view> --> </view> -->
<view class="info_li">
关锁时间<span>{{}}</span>
</view>
<view class="info_li">
关锁地点<span>120.5618927.12379</span>
</view>
</view> </view>
</view> </view>
<view class="info_card" style="margin-top: 20rpx;"> <view class="info_card" style="margin-top: 20rpx;">
@ -175,7 +188,15 @@
isMap: false, isMap: false,
zoomSize: 15, zoomSize: 15,
markers: [], markers: [],
polyline: [], polyline: [{
points: [],
width:8,
arrowLine:true,
color:'#00AF99'
// strokeWidth: 2,
// strokeColor: '#00AF99',
// fillColor: '#00AF99'
}, ],
polygons: [], polygons: [],
cardId: '001区域', cardId: '001区域',
@ -214,6 +235,23 @@
return polyline; return polyline;
}, },
convertBoundaryToPolyliness(boundary) {
if (!boundary) return null;
const points = JSON.parse(boundary).map(coord => ({
latitude: coord[1],
longitude: coord[0]
}));
const polyline = {
points: points,
width:8,
arrowLine:true,
color:'#00AF99'
};
return polyline;
},
convertBoundaryToPolylines(boundaries) { convertBoundaryToPolylines(boundaries) {
return boundaries.map(boundary => { return boundaries.map(boundary => {
if (!boundary) return null; if (!boundary) return null;
@ -233,7 +271,7 @@
longitude: coord[0] longitude: coord[0]
})); }));
return { return {
points: points, points: points,
fillColor: "#55888840", // fillColor: "#55888840", //
strokeColor: "#558888", // strokeColor: "#558888", //
strokeWidth: 2, // strokeWidth: 2, //
@ -249,9 +287,10 @@
const validBoundaries = res.rows.map(row => row.boundaryStr).filter(boundary => const validBoundaries = res.rows.map(row => row.boundaryStr).filter(boundary =>
typeof boundary === 'string' && boundary.trim() !== ''); typeof boundary === 'string' && boundary.trim() !== '');
const polylines = this.convertBoundaryToPolylines(validBoundaries); const polylines = this.convertBoundaryToPolylines(validBoundaries);
// this.polyline // this.polyline
this.polyline = this.polyline.concat(polylines); this.polygons = this.polygons.concat(polylines);
// console.log(this.polyline); // console.log(this.polyline);
res.rows.forEach(item => { res.rows.forEach(item => {
this.markers.push({ this.markers.push({
@ -287,7 +326,7 @@
.filter(area => area.boundaryStr) // boundary .filter(area => area.boundaryStr) // boundary
.map(area => this.convertBoundaryToPolyline(area.boundaryStr)); .map(area => this.convertBoundaryToPolyline(area.boundaryStr));
// 线 // 线
this.polyline = polylines; this.polygons = polylines;
// console.log(this.polyline); // console.log(this.polyline);
} }
}).catch(error => { }).catch(error => {
@ -318,7 +357,14 @@
this.loading=true this.loading=true
this.latitude= parseFloat(this.orderInfo.device.latitude) this.latitude= parseFloat(this.orderInfo.device.latitude)
this.longitude= parseFloat(this.orderInfo.device.longitude ) this.longitude= parseFloat(this.orderInfo.device.longitude )
this.polyline[0].points = JSON.parse(res.data.tripRouteStr).map(coord => ({
latitude: coord[1],
longitude: coord[0]
}));
} }
// console.log(points,'');
// this.polyline[0].points=points
}).catch(error => { }).catch(error => {
console.error("Error fetching area data:", error); console.error("Error fetching area data:", error);
}); });
@ -329,6 +375,7 @@
<style lang="scss"> <style lang="scss">
page { page {
overflow-x: hidden;
background-color: #F3F3F3; background-color: #F3F3F3;
} }
@ -369,14 +416,23 @@
padding: 26rpx 28rpx; padding: 26rpx 28rpx;
.info_li { .info_li {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #808080; color: #808080;
.text{
width: 70%;
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
}
span { span {
color: #3D3D3D; color: #3D3D3D;
} }
line-height: 48rpx; line-height: 48rpx;
@ -387,6 +443,40 @@
font-size: 28rpx; font-size: 28rpx;
color: #808080; color: #808080;
span {
color: #3D3D3D;
}
}
}
.info_lis {
display: inline-block;
// flex-wrap: nowrap;
font-weight: 400;
font-size: 28rpx;
color: #808080;
.text{
display: inline;
// width: 70%;
// white-space: nowrap;
// /* */
// overflow: hidden;
// /* */
// text-overflow: ellipsis;
}
span {
color: #3D3D3D;
}
line-height: 48rpx;
.half_infoli {
width: 50%;
font-weight: 400;
font-size: 28rpx;
color: #808080;
span { span {
color: #3D3D3D; color: #3D3D3D;
} }

View File

@ -56,7 +56,7 @@
<view class="lines"></view> <view class="lines"></view>
<view class="cont"> <view class="cont">
<view class="info_li"> <view class="info_li">
支付时间<span >>{{item.createTime}}</span> 支付时间<span >{{item.createTime}}</span>
</view> </view>