diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 90dddfc..f001cb1 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -23,10 +23,10 @@ const install = (Vue, vm) => { // baseUrl: 'http://61.174.243.28:15861', // baseUrl: 'http://192.168.2.6:8080', // baseUrl: 'http://124.221.246.124:2289', - baseUrl: 'https://dche.ccttiot.com/prod-api', // baseUrl: 'https://dianche.chuantewulian.cn/prod-api', + baseUrl: 'https://dche.ccttiot.com/prod-api', loadingText: '努力加载中~', - loadingTime: 800, + // loadingTime: 2000, // 设置自定义头部content-type header: { 'content-type': 'application/json;charset=UTF-8', diff --git a/page_fix/back/back_index.vue b/page_fix/back/back_index.vue index 350b22c..a9f9e06 100644 --- a/page_fix/back/back_index.vue +++ b/page_fix/back/back_index.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="换电工单" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <view class="top"> <view class="search_box"> diff --git a/page_fix/battery/battery_index.vue b/page_fix/battery/battery_index.vue index 350b22c..a9f9e06 100644 --- a/page_fix/battery/battery_index.vue +++ b/page_fix/battery/battery_index.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="换电工单" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <view class="top"> <view class="search_box"> diff --git a/page_fix/dispatch/dispatch_index.vue b/page_fix/dispatch/dispatch_index.vue index 5a3ab59..acf9b91 100644 --- a/page_fix/dispatch/dispatch_index.vue +++ b/page_fix/dispatch/dispatch_index.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="换电工单" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <view class="top"> <view class="search_box"> diff --git a/page_fix/fix_index.vue b/page_fix/fix_index.vue index 9f42ba2..705221f 100644 --- a/page_fix/fix_index.vue +++ b/page_fix/fix_index.vue @@ -3,7 +3,7 @@ <template> <view class="page"> <u-navbar title="地图" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude" :show-location="true" :markers="markers" :polygons="polyline" @markertap="onMarkerTap"> </map> diff --git a/page_fix/repair/repair_detail.vue b/page_fix/repair/repair_detail.vue index c894611..1a475db 100644 --- a/page_fix/repair/repair_detail.vue +++ b/page_fix/repair/repair_detail.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="工单详情" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <view class="top"> <view class="tap"> diff --git a/page_fix/repair/repair_index.vue b/page_fix/repair/repair_index.vue index 2e951fb..69fb93d 100644 --- a/page_fix/repair/repair_index.vue +++ b/page_fix/repair/repair_index.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="报修单" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <view class="top"> <view class="search_box"> <view class="search_center"> diff --git a/page_user/bhks.vue b/page_user/bhks.vue index ae249e2..4c0b3fd 100644 --- a/page_user/bhks.vue +++ b/page_user/bhks.vue @@ -1,6 +1,6 @@ <template> <view class="page"> - <u-navbar title="编号开锁" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'height='40'></u-navbar> + <u-navbar title="编号开锁" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='45'></u-navbar> <view class="cont"> <view class="tit"> 输入编号开锁 diff --git a/page_user/ckmx.vue b/page_user/ckmx.vue index a4f6dc3..4befb71 100644 --- a/page_user/ckmx.vue +++ b/page_user/ckmx.vue @@ -1,6 +1,6 @@ <template> <view class="page"> - <u-navbar title="费用明细" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36' height='40'></u-navbar> + <u-navbar title="费用明细" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36' height='45'></u-navbar> <view class="tit"> <view class="left">电单车</view> <!-- <view class="right">查看计费规则 ></view> --> @@ -127,6 +127,7 @@ } }, onLoad(e) { + console.log(e,';eeeeeeeeeeeeeeeeee'); this.id = e.orderId if(this.id){ this.orderInfo() diff --git a/page_user/cktcd.vue b/page_user/cktcd.vue index 578ee13..1367223 100644 --- a/page_user/cktcd.vue +++ b/page_user/cktcd.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="查看停车点" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' - height='40'></u-navbar> + height='45'></u-navbar> <map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude" :show-location='true' :polygons='polygons' :markers="markers" :polyline="polyline"></map> <view class="bottom_box"> diff --git a/page_user/good_list.vue b/page_user/good_list.vue index 0aaf32e..bf29aca 100644 --- a/page_user/good_list.vue +++ b/page_user/good_list.vue @@ -1,175 +1,193 @@ <template> - <view class="page"> - <u-navbar title="我的订单" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='40'></u-navbar> - <view class="card" v-for="(item, index) in computedList" :key="index"> - <view class="top_li"> - <view class="left"> - <image src="https://api.ccttiot.com/smartmeter/img/static/upPr9QBpmeFzYN2kXEJj" mode=""></image> 电单车 - </view> - <view class="right"> - 已完成 <view class="iconfont icon-xiangyou1"></view> - </view> - </view> - <view class="info"> - 时间:{{ item.createTime }} - </view> - <view class="info"> - 时长:{{ item.duration }} - </view> - <view class="info"> - 距离:2.1公里 - </view> - <view class="price"> - {{item.totalFee}}元 - </view> - </view> - </view> + <view class="page" > + <u-navbar title="我的订单" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' + height='45'></u-navbar> + <view class="card" v-for="(item, index) in computedList" :key="index" @click="topage(item)"> + <view class="top_li"> + <view class="left"> + <image src="https://api.ccttiot.com/smartmeter/img/static/upPr9QBpmeFzYN2kXEJj" mode=""></image> 电单车 + </view> + <view class="right" v-if="item.status==4&&item.paid==1"> + 已完成 <view class="iconfont icon-xiangyou1"></view> + </view> + <view class="right" v-if="item.status==4&&item.paid==0" style="color: red;"> + 待支付 <view class="iconfont icon-xiangyou1"></view> + </view> + </view> + <view class="info"> + 时间:{{ item.createTime }} + </view> + <view class="info"> + 时长:{{ item.duration }} + </view> + <view class="info"> + 距离:2.1公里 + </view> + <view class="price"> + {{item.totalFee}}元 + </view> + </view> + </view> </template> <script> -export default { - data() { - return { - bgc: { - backgroundColor: "#fff", - }, - list: [] - }; - }, - computed: { - computedList() { - return this.list.map(item => { - const createTime = new Date(item.createTime); - const payTime = new Date(item.payTime); - const timeDifference = Math.abs(createTime - payTime); - - const hours = Math.floor(timeDifference / (1000 * 60 * 60)); - const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60)); - const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000); - - return { - ...item, - duration: `${minutes}分钟${seconds}秒` - }; - }); - } - }, - methods: { - getuserInfo() { - this.$u.get("/getAppInfo").then((res) => { - if (res.code === 200) { - this.userid = res.user.userId; - this.getlist(); - } else { - uni.showToast({ - title: '未登录,请登录后尝试', - icon: 'none', - duration: 2000 - }); - } - }); - }, - getlist() { - let data = { - userId: this.userid, - type: '1' - }; - this.$u.get("/appVerify/order/list?", data).then((res) => { - if (res.code === 200) { - this.list = res.rows; - } else { - uni.showToast({ - title: '未登录,请登录后尝试', - icon: 'none', - duration: 2000 - }); - } - }); - } - }, - onShow() { - this.getuserInfo(); - } -}; + export default { + data() { + return { + bgc: { + backgroundColor: "#fff", + }, + list: [] + }; + }, + computed: { + computedList() { + return this.list.map(item => { + const createTime = new Date(item.createTime); + const payTime = new Date(item.payTime); + const timeDifference = Math.abs(createTime - payTime); + + const hours = Math.floor(timeDifference / (1000 * 60 * 60)); + const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60)); + const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000); + + return { + ...item, + duration: `${minutes}分钟${seconds}秒` + }; + }); + } + }, + methods: { + getuserInfo() { + this.$u.get("/getAppInfo").then((res) => { + if (res.code === 200) { + this.userid = res.user.userId; + this.getlist(); + } else { + uni.showToast({ + title: '未登录,请登录后尝试', + icon: 'none', + duration: 2000 + }); + } + }); + }, + topage(item){ + if(item.status==4&&item.paid==1){ + uni.navigateTo({ + url:'/page_user/xcjs?id='+item.orderNo + }) + }else if(item.status==4&&item.paid==0){ + uni.showToast({ + title: '请支付订单后再查看详情', + icon: 'none', + duration: 2000 + }); + } + + }, + getlist() { + let data = { + userId: this.userid, + type: '1' + }; + this.$u.get("/appVerify/order/list?", data).then((res) => { + if (res.code === 200) { + this.list = res.rows; + } else { + uni.showToast({ + title: '未登录,请登录后尝试', + icon: 'none', + duration: 2000 + }); + } + }); + } + }, + onShow() { + this.getuserInfo(); + } + }; </script> <style lang="scss"> -.page { - background-color: #fff; -} + .page { + background-color: #fff; + padding-bottom: 50rpx; + } -.page .card { - position: relative; - width: 680rpx; - background: #ffffff; - box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08); - border-radius: 20rpx 20rpx 20rpx 20rpx; - padding: 22rpx 28rpx; - margin: 30rpx auto; -} + .page .card { + position: relative; + width: 680rpx; + background: #ffffff; + box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08); + border-radius: 20rpx 20rpx 20rpx 20rpx; + padding: 22rpx 28rpx; + margin: 30rpx auto; + } -.page .card .price { - position: absolute; - right: 32rpx; - top: 110rpx; - font-weight: 500; - font-size: 28rpx; - color: #3d3d3d; -} + .page .card .price { + position: absolute; + right: 32rpx; + top: 110rpx; + font-weight: 500; + font-size: 28rpx; + color: #3d3d3d; + } -.page .card .top_li { - margin-bottom: 16rpx; - display: flex; - align-items: center; - justify-content: space-between; -} + .page .card .top_li { + margin-bottom: 16rpx; + display: flex; + align-items: center; + justify-content: space-between; + } -.page .card .top_li .left { - display: flex; - flex-wrap: nowrap; - align-items: center; -} + .page .card .top_li .left { + display: flex; + flex-wrap: nowrap; + align-items: center; + } -.page .card .top_li .left image { - margin-right: 18rpx; - width: 42rpx; - height: 42rpx; -} + .page .card .top_li .left image { + margin-right: 18rpx; + width: 42rpx; + height: 42rpx; + } -.page .card .top_li .left { - font-weight: 700; - font-size: 32rpx; - color: #3d3d3d; -} + .page .card .top_li .left { + font-weight: 700; + font-size: 32rpx; + color: #3d3d3d; + } -.page .card .top_li .right { - display: flex; - flex-wrap: nowrap; - align-items: center; - font-weight: 400; - font-size: 24rpx; - color: #808080; -} + .page .card .top_li .right { + display: flex; + flex-wrap: nowrap; + align-items: center; + font-weight: 400; + font-size: 24rpx; + color: #808080; + } -.page .card .top_li .right .iconfont { - font-size: 20rpx; -} + .page .card .top_li .right .iconfont { + font-size: 20rpx; + } -.page .card .info { - margin-bottom: 12rpx; - font-weight: 400; - font-size: 24rpx; - color: #808080; -} + .page .card .info { + margin-bottom: 12rpx; + font-weight: 400; + font-size: 24rpx; + color: #808080; + } -.page .tip { - margin-top: 52rpx; - width: 100%; - text-align: center; - font-weight: 400; - font-size: 28rpx; - color: #808080; - line-height: 38rpx; -} -</style> + .page .tip { + margin-top: 52rpx; + width: 100%; + text-align: center; + font-weight: 400; + font-size: 28rpx; + color: #808080; + line-height: 38rpx; + } +</style> \ No newline at end of file diff --git a/page_user/gzsb.vue b/page_user/gzsb.vue index 28c5254..6c78b41 100644 --- a/page_user/gzsb.vue +++ b/page_user/gzsb.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="故障上报" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='40'></u-navbar> + height='45'></u-navbar> <view class="cardbox"> <view class="tip"> <view class="ipnt">*</view>故障车编号 diff --git a/page_user/idcard_test.vue b/page_user/idcard_test.vue index e456d7f..58622d8 100644 --- a/page_user/idcard_test.vue +++ b/page_user/idcard_test.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="认证" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='40'></u-navbar> + height='45'></u-navbar> <view class="tit"> 为了防范身份信息被冒用,需进行身份认证以确保 是本人操作 </view> diff --git a/page_user/jfgz.vue b/page_user/jfgz.vue index ad8c943..4186abe 100644 --- a/page_user/jfgz.vue +++ b/page_user/jfgz.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="计费规则" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='40'></u-navbar> + height='45'></u-navbar> <view class="cont" style="margin-top: 50rpx;"> <view class="tit" style="margin-top: 50rpx;"> 骑行服务费 diff --git a/page_user/ks.vue b/page_user/ks.vue index ff6de2c..748b39c 100644 --- a/page_user/ks.vue +++ b/page_user/ks.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="开锁" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' - height='40'></u-navbar> + height='45'></u-navbar> <map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude" :show-location='true' :polygons='polygons' :markers="markers" :polyline="polyline"></map> <view class="bot_btn"> diff --git a/page_user/qrks.vue b/page_user/qrks.vue index 59fc7e5..cb91176 100644 --- a/page_user/qrks.vue +++ b/page_user/qrks.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="确认开锁" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' - height='40'></u-navbar> + height='45'></u-navbar> <map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude" :show-location='true' :polygons='polygons' :markers="markers" :polyline="polyline"></map> <view class="bot_btn"> diff --git a/page_user/qsdetail.vue b/page_user/qsdetail.vue index c5885ce..6f6fc77 100644 --- a/page_user/qsdetail.vue +++ b/page_user/qsdetail.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="问题上报详情" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='40'></u-navbar> + height='45'></u-navbar> <view class="cont"> <view class="cont_top"> <view class="tit"> diff --git a/page_user/qsrecord.vue b/page_user/qsrecord.vue index 3a2f864..54538e3 100644 --- a/page_user/qsrecord.vue +++ b/page_user/qsrecord.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="问题上报记录" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='40'></u-navbar> + height='45'></u-navbar> <view class="card" v-for="(item,index) in list" :key="index" @click="topage(item)" v-if="list.length>=0"> <view class="top_li"> <view class="left"> diff --git a/page_user/xcjs.vue b/page_user/xcjs.vue index a2c64f4..3df4a3f 100644 --- a/page_user/xcjs.vue +++ b/page_user/xcjs.vue @@ -1,68 +1,68 @@ <template> <view class="page"> <u-navbar title="行程结束" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' - height='40'></u-navbar> - <map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude" - :show-location='true' :polygons='polygons' :markers="markers" :polyline="polyline"></map> - <view class="bot_btn" v-if="false"> - <view class="time"> - 骑行时间30分钟9秒 - </view> - <view class="price"> - 4.00<span>元</span> - </view> - <view class="toinfo"> - 查看骑行费明细 > - </view> - <view class="btn"> - 去支付 - </view> + height='45'></u-navbar> + <map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude" + :show-location='true' :markers="markers" :polygons="polygons" :polyline="polyline"> </map> + <view class="bot_btn" v-if="false"> + <view class="time"> + 骑行时间30分钟9秒 </view> - <view class="bot"> - <view class="card"> - <view class="top"> - <view class="topcont"> - <view class="left"> - 3.0<span style="font-size: 24rpx;">元</span> - </view> - <view class="right"> - 费用明细 > - </view> + <view class="price"> + 4.00<span>元</span> + </view> + <view class="toinfo"> + 查看骑行费明细 > + </view> + <view class="btn"> + 去支付 + </view> + </view> + <view class="bot" v-if="loading"> + <view class="card"> + <view class="top"> + <view class="topcont"> + <view class="left"> + {{orderInfo.totalFee}}<span style="font-size: 24rpx;">元</span> </view> - <view class="info"> - <view class="type"> - 电单车 - </view> - <view class="data"> - 2023-12-31 19:17:44 - </view> - </view> - <view class="topcont" style="margin-top: 32rpx;"> - <view class="left" style="font-size:20rpx ;"> - 订单时长 - </view> - <view class="right" style="font-size:20rpx ;"> - 6分5秒 - </view> - </view> - <view class="topcont" style="margin-top: 14rpx;"> - <view class="left" style="font-size:20rpx ;"> - 骑行距离 - </view> - <view class="right" style="font-size:20rpx ;"> - 1.3公里 - </view> + <view class="right" @click="topage(2)" style="display: flex;flex-wrap: nowrap;align-items: center;"> + 费用明细<view class="iconfont icon-xiangyou1" style="font-size: 24rpx;"></view> </view> </view> - <view class="bottom"> - <view class="text"> - 故障上报 > + <view class="info"> + <view class="type"> + 电单车 + </view> + <view class="data" style="font-size: 26rpx;"> + {{orderInfo.createTime}} + </view> + </view> + <view class="topcont" style="margin-top: 32rpx;"> + <view class="left" style="font-size:26rpx ;"> + 订单时长 + </view> + <view class="right" style="font-size:26rpx ;"> + {{computedList(orderInfo)}} + </view> + </view> + <view class="topcont" style="margin-top: 14rpx;"> + <view class="left" style="font-size:26rpx ;"> + 骑行距离 + </view> + <view class="right" style="font-size:26rpx ;"> + 1.3公里 </view> </view> </view> + <view class="bottom" @click="topage(1)" > + <view class="text" style="display: flex;flex-wrap: nowrap;align-items: center;"> + 故障上报 <view class="iconfont icon-xiangyou1" style="font-size: 26rpx;"></view> + </view> + </view> </view> - <u-mask :show="show" @click="show = false" :z-index='100'/> - + </view> + <u-mask :show="show" @click="show = false" :z-index='100' /> + </view> </template> @@ -70,219 +70,432 @@ export default { data() { return { - show: false, bgc: { backgroundColor: "#F7FAFE", }, - latitude: '39.916527', - longitude: ' 116.397128', + latitude: 0, + longitude: 0, isMap: false, - zoomSize: 15, - markers: [{ - id: 1, - latitude: 39.90469, - longitude: 116.40717, - title: 'Marker1' - }, { - id: 2, - latitude: 39.90969, - longitude: 116.41217, - title: 'Marker2' - }], + zoomSize: 18, + markers: [], polyline: [{ - points: [{ - latitude: 39.916527, - longitude: 116.397128 - }, { - latitude: 39.926527, - longitude: 116.397128 - }, { - latitude: 39.926527, - longitude: 116.407128 - }, { - latitude: 39.916527, - longitude: 116.407128 - }], - width:8, - arrowLine:true, - color:'#00AF99' + points: [], + width: 8, + arrowLine: true, + color: '#00AF99' // strokeWidth: 2, // strokeColor: '#00AF99', // fillColor: '#00AF99' }, ], - polygons:[ - { - points: [ - { latitude: 39.918527, longitude: 116.400128 }, - { latitude: 39.922527, longitude: 116.400128 }, - { latitude: 39.924527, longitude: 116.405128 }, - { latitude: 39.912527, longitude: 116.402128 } - ], - strokeColor: '#00FF00DD', // 使用不同的颜色来区分第二个区域 - strokeWidth: 2, - fillColor: '#00FF00DD' - } - ] - + polygons: [], + + cardId: '001区域', + orderId: '', + orderInfo: {}, + loading: false, + } }, - onShow() { - console.log(this.$u.config.v); + onLoad(e) { + this.orderId = e.id + this.getOrderDetail() + + }, + components: { + }, methods: { - sub(){ - uni.showToast({ - title: '骑行前,请先到个人中心支付押金,否 则将无法使用电单车!', - icon: 'none', - duration: 2000 - }) - } + topage(num){ + if(num ==1){ + uni.navigateTo({ + url:'/page_user/gzsb?sn='+this.orderInfo.sn + }) + }else if(num==2){ + uni.navigateTo({ + url:'/page_user/ckmx?orderId='+this.orderInfo.orderNo + }) + } + }, + computedList(info) { + const createTime = new Date(info.createTime); + const payTime = new Date(info.returnTime); + const timeDifference = Math.abs(createTime - payTime); + + const hours = Math.floor(timeDifference / (1000 * 60 * 60)); + const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60)); + const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000); + + return `${minutes}分钟${seconds}秒` + }, + convertBoundaryToPolyline(boundary) { + if (!boundary) return null; + + const points = JSON.parse(boundary).map(coord => ({ + latitude: coord[1], + longitude: coord[0] + })); + + const polyline = { + points: points, + fillColor: "#55888840", //填充颜色 + strokeColor: "#22FF00", //描边颜色 + strokeWidth: 2, //描边宽度 + zIndex: 1, //层级 + }; + + 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) { + return boundaries.map(boundary => { + if (!boundary) return null; + let coords; + try { + coords = JSON.parse(boundary); + } catch (error) { + console.error("Error parsing boundary JSON:", error); + return null; + } + if (!Array.isArray(coords)) { + console.error("Parsed boundary is not an array:", coords); + return null; + } + const points = coords.map(coord => ({ + latitude: coord[1], + longitude: coord[0] + })); + return { + points: points, + fillColor: "#55888840", //填充颜色 + strokeColor: "#558888", //描边颜色 + strokeWidth: 2, //描边宽度 + zIndex: 1, //层级 + }; + }).filter(polyline => polyline !== null); // 过滤掉无效的折线数据 + }, + getParking() { + // 发送请求获取数据 + this.$u.get('/app/parking/list').then((res) => { + if (res.code === 200) { + // 处理接口返回的数据 + const validBoundaries = res.rows.map(row => row.boundaryStr).filter(boundary => + typeof boundary === 'string' && boundary.trim() !== ''); + const polylines = this.convertBoundaryToPolylines(validBoundaries); + + // 将处理后的数据添加到 this.polyline 中 + this.polygons = this.polygons.concat(polylines); + + // console.log(this.polyline); + res.rows.forEach(item => { + this.markers.push({ + id: parseFloat(item.parkingId), + latitude: parseFloat(item.latitude), + longitude: parseFloat(item.longitude), + // title: item.deviceName, + width: 20, + height: 40, + iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u9yz0bKCWKyev0JYpTne', + callout: { + content: item.parkingName, // 修改为你想要显示的文字内容 + color: '#ffffff', // 修改为文字颜色 + fontSize: 14, // 修改为文字大小 + borderRadius: 10, // 修改为气泡圆角大小 + bgColor: '#000000', // 修改为气泡背景颜色 + padding: 6, // 修改为气泡内边距 + display: 'ALWAYS', // 修改为气泡的显示策略 + } + }) + }) + } + }).catch(error => { + console.error("Error fetching parking data:", error); + }); + }, + getArea() { + + this.$u.get("/app/area/" + this.orderInfo.areaId).then((res) => { + + if (res.code == 200) { + this.areaInfo = res.data + const polylines = this.convertBoundaryToPolyline(res.data.boundaryStr) + + // 更新折线数据 + this.polygons.push(polylines) + console.log(this.polygons, 'polylinespolylines'); + } else { + // uni.showToast({ + // title: res.msg, + // icon: 'none', + // duration: 2000 + // }); + } + }); + // 发送请求获取数据 + + }, + status() { + if (this.orderInfo != '') { + if (this.orderInfo.status == 0) { + return '预约中' + } else if (this.orderInfo.status == 1) { + return '取消预约' + } else if (this.orderInfo.status == 2) { + return '开始骑行' + } else if (this.orderInfo.status == 3) { + return '骑行结束' + } else if (this.orderInfo.status == 4) { + return '订单完成' + } + } + + }, + getOrderDetail() { + uni.showLoading({ + + }) + this.$u.get('/appVerify/order/' + this.orderId).then((res) => { + if (res.code === 200) { + // Handle API response and transform data as needed + this.orderInfo = res.data; + this.loading = true; + + this.getArea(); + this.getParking(); + + let abb; + try { + abb = JSON.parse(res.data.tripRouteStr); + console.log(abb, 'Parsed tripRouteStr'); + } catch (error) { + console.error("Error parsing tripRouteStr:", error); + return; + } + if(abb.length>2){ + const validCoords = abb.every(coord => + coord[0] >= -180 && coord[0] <= 180 && + coord[1] >= -90 && coord[1] <= 90 + ); + + if (!validCoords) { + console.error("Invalid coordinates found in tripRouteStr:", abb); + return; + } + this.latitude = parseFloat(abb[0][1],); + this.longitude = parseFloat(abb[0][0]); + // Transform coordinates for polyline + this.polyline[0].points = abb.map(coord => ({ + latitude: coord[1], + longitude: coord[0] + })); + + // Add markers with validation + this.markers.push({ + id: 0, + latitude: abb[0][1], + longitude: abb[0][0], + width: 25, + height: 38, + iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u06paUGiHLvL08Pw7BGr' + }, { + id: 1, + latitude: abb[abb.length-1][1], + longitude: abb[abb.length-1][0], + width: 25, + height: 38, + iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/uwpAj9vYtPRmhtTOtflx' + }); + } + uni.hideLoading() + // Verify if all coordinates are within valid ranges + + } + }).catch(error => { + console.error("Error fetching area data:", error); + }); + } } } </script> -<style lang="scss" > -page{ - background-color: #F7FAFE; -} -.page{ - width: 750rpx; - .map{ - width: 750rpx; - height:100vh ; + +<style lang="scss"> + page { + background-color: #F7FAFE; } - .bot{ - display: flex; - justify-content: center; - padding: 26rpx 34rpx 48rpx 34rpx; - position: fixed; - bottom: 0; + + .page { width: 750rpx; - height: 420rpx; - background: #F7F7F7; - border-radius: 30rpx; - .card{ - width: 708rpx; - height: 320rpx; - background: #FFFFFF; - border-radius: 32rpx 32rpx 32rpx 32rpx; - .top{ - padding: 26rpx 38rpx; - .topcont{ - display: flex; - flex-wrap: nowrap; - justify-content: center; - justify-content: space-between; - .left{ - font-weight: 500; - font-size: 36rpx; - color: #3D3D3D; + + .map { + width: 750rpx; + height: 100vh; + } + + .bot { + display: flex; + justify-content: center; + padding: 26rpx 34rpx 48rpx 34rpx; + position: fixed; + bottom: 0; + width: 750rpx; + // height: 420rpx; + background: #F7F7F7; + border-radius: 30rpx; + + .card { + width: 708rpx; + // height: 320rpx; + background: #FFFFFF; + border-radius: 32rpx 32rpx 32rpx 32rpx; + + .top { + padding: 26rpx 38rpx; + + .topcont { + display: flex; + flex-wrap: nowrap; + justify-content: center; + justify-content: space-between; + + .left { + font-weight: 500; + font-size: 36rpx; + color: #3D3D3D; + } + + .right { + font-weight: 400; + font-size: 26rpx; + color: #808080; + } } - .right{ - font-weight: 400; - font-size: 24rpx; - color: #808080; + + .info { + margin-top: 16rpx; + display: flex; + flex-wrap: nowrap; + align-items: center; + + .type { + display: flex; + align-items: center; + justify-content: center; + width: 112rpx; + height: 42rpx; + background: linear-gradient(90deg, #4C97E7 0%, rgba(158, 205, 255, 0.58) 100%); + border-radius: 8rpx 8rpx 8rpx 8rpx; + + font-weight: 500; + font-size: 24rpx; + color: #FFFFFF; + } + + .data { + margin-left: 15rpx; + font-weight: 400; + font-size: 20rpx; + color: #3D3D3D; + } } } - .info{ - margin-top: 16rpx; + + .bottom { + // padding-top: 10rpx; display: flex; - flex-wrap: nowrap; align-items: center; - .type{ - display: flex; - align-items: center; - justify-content: center; - width: 112rpx; - height: 42rpx; - background: linear-gradient( 90deg, #4C97E7 0%, rgba(158,205,255,0.58) 100%); - border-radius: 8rpx 8rpx 8rpx 8rpx; - - font-weight: 500; - font-size: 24rpx; - color: #FFFFFF; - } - .data{ - margin-left: 15rpx; + justify-content: center; + border-top: 2rpx solid #EFEFEF; + width: 100%; + height: 80rpx; + + .text { font-weight: 400; - font-size: 20rpx; + font-size: 24rpx; color: #3D3D3D; } + + } } - .bottom{ + } + + .bot_btn { + padding: 26rpx 34rpx 48rpx 34rpx; + position: fixed; + // display: flex; + // flex-wrap: wrap; + // justify-content: center; + bottom: 0; + width: 750rpx; + height: 420rpx; + background: #FFFFFF; + box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08); + border-radius: 30rpx; + + .time { + // height: 88rpx; + width: 100%; + text-align: center; + padding-bottom: 24rpx; + font-weight: 400; + font-size: 28rpx; + color: #3D3D3D; + border-bottom: 2rpx solid #EFEFEF; + } + + .price { + margin-top: 22rpx; + width: 100%; + text-align: center; + font-weight: 500; + font-size: 72rpx; + color: #3D3D3D; + + span { + font-size: 28rpx; + font-weight: 500; + } + } + + .toinfo { + // margin-top: 12rpx; + width: 100%; + text-align: center; + font-weight: 400; + font-size: 24rpx; + color: #3D3D3D; + } + + .btn { + margin-top: 34rpx; display: flex; align-items: center; justify-content: center; - border-top: 2rpx solid #EFEFEF; - width: 100%; - height: 66rpx; - .text{ - font-weight: 400; - font-size: 24rpx; - color: #3D3D3D; - } - - - } - } - } - .bot_btn{ - padding: 26rpx 34rpx 48rpx 34rpx; - position: fixed; - // display: flex; - // flex-wrap: wrap; - // justify-content: center; - bottom: 0; - width: 750rpx; - height: 420rpx; - background: #FFFFFF; - box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08); - border-radius: 30rpx; - .time{ - // height: 88rpx; - width: 100%; - text-align: center; - padding-bottom: 24rpx; - font-weight: 400; - font-size: 28rpx; - color: #3D3D3D; - border-bottom: 2rpx solid #EFEFEF; - } - .price{ - margin-top: 22rpx; - width: 100%; - text-align: center; - font-weight: 500; - font-size: 72rpx; - color: #3D3D3D; - span{ - font-size: 28rpx; + width: 680rpx; + height: 90rpx; + background: #4C97E7; + border-radius: 54rpx 54rpx 54rpx 54rpx; font-weight: 500; + font-size: 40rpx; + color: #FFFFFF; } + } - .toinfo{ - // margin-top: 12rpx; - width: 100%; - text-align: center; - font-weight: 400; - font-size: 24rpx; - color: #3D3D3D; - } - .btn{ - margin-top: 34rpx; - display: flex; - align-items: center; - justify-content: center; - width: 680rpx; - height: 90rpx; - background: #4C97E7; - border-radius: 54rpx 54rpx 54rpx 54rpx; - font-weight: 500; - font-size: 40rpx; - color: #FFFFFF; - } - } -} -</style> +</style> \ No newline at end of file diff --git a/page_user/yczn.vue b/page_user/yczn.vue index a432021..6ea34d5 100644 --- a/page_user/yczn.vue +++ b/page_user/yczn.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="用车指南" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='40'></u-navbar> + height='45'></u-navbar> <view class="cont"> <view class="tit"> 请在运营区内骑行,否则将断电 diff --git a/page_user/yj.vue b/page_user/yj.vue index b2600b8..ef47889 100644 --- a/page_user/yj.vue +++ b/page_user/yj.vue @@ -31,7 +31,7 @@ 立即充值 </view> </view> - <view class="record" v-if="userinfo.balance!=0" > + <view class="record" v-if="userinfo.balance!=0"> <view class="card" style="padding-top: 80rpx;"> <view class="tit" style="margin-top: 18rpx;font-weight: 700;font-size: 92rpx;color: #3D3D3D;line-height: 72rpx;"><span @@ -43,37 +43,21 @@ 提现 </view> </view> - <view class="card2"> + <view class="card2" style="padding-bottom: 30rpx;"> <view class="card_top"> <view class="left"> <image src="https://api.ccttiot.com/smartmeter/img/static/uf9o0xbkFdfs5wRT7aLD" mode=""></image> 押金变动明细 </view> <view class="right"> - 共{{total}}条 + 共{{total*2-1}}条 </view> </view> <view class="cardcont"> - <view v-for="(item,index) in orderList" :key="index" style="display: flex;flex-wrap: wrap;width: 100%;"> - <view class="cont_li" > - <view class="cont_li_left"> - <view class="txt"> - 押金充值 - </view> - <view class="data"> - {{item.payTime}} - </view> - </view> - <view class="cont_li_right"> - <view class="cont_price"> - +{{item.totalFee}} - </view> - <view class="cont_data"> - 充值成功 - </view> - </view> - </view> - <view class="cont_li" v-if="item.etRefund!=null&&item.etRefund.refundResult=='SUEECSS'" style="display: flex;flex-wrap: wrap;width: 100%;"> + <view v-for="(item,index) in orderList" :key="index" + style="display: flex;flex-wrap: wrap;width: 100%;"> + <view class="cont_li" v-if="item.etRefund.amount&&item.etRefund.refundResult=='SUCCESS'" + style="display: flex;flex-wrap: wrap;width: 100%;"> <view class="cont_li_left"> <view class="txt"> 押金提现 @@ -91,9 +75,28 @@ </view> </view> </view> + <view class="cont_li"> + <view class="cont_li_left"> + <view class="txt"> + 押金充值 + </view> + <view class="data"> + {{item.payTime}} + </view> + </view> + <view class="cont_li_right"> + <view class="cont_price"> + +{{item.totalFee}} + </view> + <view class="cont_data"> + 充值成功 + </view> + </view> + </view> + </view> - - + + </view> </view> </view> @@ -115,6 +118,29 @@ 继续提现 </view> </view> + <u-mask :show="showBack" @click="showBack = false" :z-index='100' duration='0' /> + <view class="pops" v-if="showBack"> + <view class="tit" style="font-weight: 600;"> + 充值成功 + </view> + <view class="cont_box" style="text-align: center;color: #808080;justify-content: center;font-size: 36rpx;"> + 押金充值成功是否返回继续骑行? + </view> + + <view class="btn_box"> + <view class="btn1" @click="showBack = false"> + 取消 + </view> + <view class="btn2"@click="topage()"> + 确定 + </view> + </view> + <!-- <view class="btn" @click="showtcs=false" style="margin-bottom: 0rpx;"> + 点击查看 + + </view> --> + + </view> </view> </view> </template> @@ -129,9 +155,11 @@ show: false, bindDeviceNum: null, userinfo: {}, - orderList:[], - total:0, - areaInfo:"" + orderList: [], + total: 0, + areaInfo: "", + isback:false, + showBack:false } @@ -143,83 +171,114 @@ // }); this.getinfo() this.getarea() + }, + onLoad(e) { + console.log(e,'this.isback'); + if(e.isback){ + this.isback=e.isback + + } + + }, watch: { userId(newValue, oldValue) { // 处理userId变化的逻辑 console.log('userId 发生变化', newValue, oldValue); - + } }, computed: { - + userId() { return this.$store.getters.userId; }, }, methods: { + topage(){ + this.showBack=false + uni.redirectTo({ + url:'/pages/index/index' + }) + }, getlist() { - this.$u.get("/appVerify/order/list?type=2&userId="+this.userId).then((res) => { - + uni.showLoading({ + title:'加载中...' + }) + this.$u.get("/appVerify/order/list?type=2&userId=" + this.userId).then((res) => { + uni.hideLoading() if (res.code == 200) { - this.orderList=res.rows - this.total=res.total + this.orderList = res.rows + this.total = res.total } else { - uni.showToast({ - title:res.msg, - icon: 'none', - duration: 2000 - }); + // uni.showToast({ + // title: res.msg, + // icon: 'none', + // duration: 2000 + // }); } }); }, - - tixian(){ + + tixian() { + uni.showLoading({ + title:'加载中...' + }) this.$u.post("/appVerify/order/withdraw").then((res) => { - + if (res.code == 200) { setTimeout(() => { + uni.hideLoading() this.getinfo() this.getlist() - this.show=false + this.show = false }, 2000) - + } else { - uni.showToast({ - title:res.msg, - icon: 'none', - duration: 2000 - }); + // uni.showToast({ + // title: res.msg, + // icon: 'none', + // duration: 2000 + // }); } }); }, getarea() { let id = uni.getStorageSync('areaId'); - this.$u.get("/app/area/"+id).then((res) => { - + this.$u.get("/app/area/" + id).then((res) => { + if (res.code == 200) { - this.areaInfo=res.data + this.areaInfo = res.data } else { - uni.showToast({ - title:res.msg, - icon: 'none', - duration: 2000 - }); + // uni.showToast({ + // title: res.msg, + // icon: 'none', + // duration: 2000 + // }); } }); }, getinfo() { + uni.showLoading({ + title:'加载中' + }) this.$u.get("/getAppInfo").then((res) => { - + if (res.code == 200) { + uni.hideLoading() this.$store.commit('SET_USERID', res.user.userId); this.userinfo = res.user + console.log(res.user.balance,'es.user.balance',this.isback); + if(res.user.balance==parseFloat(this.areaInfo.deposit)&&this.isback==true){ + console.log('进入判断了'); + this.showBack=true + } this.getlist() } else { - // setTimeout(()=>{ - // this.getinfo() - // this.getlist() - // },1000) + setTimeout(()=>{ + this.getinfo() + this.getlist() + },2000) } }); }, @@ -232,14 +291,14 @@ money: this.areaInfo.deposit, mark: "押金充值", type: '4', - areaId:id + areaId: id } this.$u.post('/appVerify/pre/order', data).then((res) => { if (res.code === 200) { // this.freList=res.rows - let that=this + let that = this uni.requestPayment({ provider: 'wxpay', timeStamp: res.data.timeStamp, @@ -250,7 +309,7 @@ success(res) { // 支付成功逻辑 uni.showLoading({ - title:'加载中' + title: '加载中' }) setTimeout(() => { uni.hideLoading() @@ -284,6 +343,175 @@ .page { width: 750rpx; + .pops { + padding: 46rpx 36rpx; + position: fixed; + top: 400rpx; + left: 74rpx; + width: 604rpx; + // height: 606rpx; + background: #fff; + border-radius: 20rpx 20rpx 20rpx 20rpx; + z-index: 110; + + .close { + position: absolute; + left: 266rpx; + bottom: -100rpx; + + image { + width: 80rpx; + height: 80rpx; + } + } + .btn_box{ + margin-top: 80rpx; + display: flex; + align-items: center; + justify-content: space-between; + .btn1{ + display: flex; + align-items: center; + justify-content: center; + width: 216rpx; + height: 90rpx; + background: #989898; + border-radius: 54rpx 54rpx 54rpx 54rpx; + + font-weight: 500; + font-size: 40rpx; + color: #FFFFFF; + } + .btn2{ + display: flex; + align-items: center; + justify-content: center; + width: 268rpx; + height: 90rpx; + background: #4C97E7; + border-radius: 54rpx 54rpx 54rpx 54rpx; + + font-weight: 500; + font-size: 40rpx; + color: #FFFFFF; + } + } + .time { + margin-top: 20rpx; + text-align: center; + font-weight: 500; + font-size: 48rpx; + color: #4C97E7; + } + + .cont { + height: 300rpx; + overflow-x: hidden; + overflow-y: auto; + } + + .tit { + // width: 604rpx; + text-align: center; + font-weight: 500; + font-size: 36rpx; + color: #3D3D3D; + margin-bottom: 54rpx; + } + + .cont_box { + margin-top: 36rpx; + display: flex; + flex-wrap: nowrap; + align-items: center; + justify-content: space-between; + + .left { + display: flex; + flex-wrap: wrap; + font-weight: 600; + font-size: 36rpx; + color: #3D3D3D; + + .km { + font-weight: 400; + font-size: 28rpx; + color: #3D3D3D; + } + + .speed { + margin-top: 18rpx; + width: 226rpx; + height: 22rpx; + background: #ccc; + border-radius: 16rpx 16rpx 16rpx 16rpx; + + .speeds { + // width: 90%; + height: 100%; + background: #77B8FD; + border-radius: 16rpx 16rpx 16rpx 16rpx; + } + } + + .NO { + font-weight: 400; + font-size: 24rpx; + color: #3D3D3D; + } + } + + .right { + font-weight: 600; + font-size: 36rpx; + color: #3D3D3D; + + image { + width: 244rpx; + height: 196rpx; + } + } + } + + .text { + margin-top: 36rpx; + display: flex; + flex-wrap: wrap; + // align-items: center; + + .yuan { + margin-top: 10rpx; + margin-right: 12rpx; + width: 20rpx; + height: 20rpx; + background: #000; + border-radius: 50%; + } + + span { + width: 90%; + font-weight: 400; + font-size: 28rpx; + color: #3D3D3D; + } + } + + .btn { + margin-left: 40rpx; + margin-top: 50rpx; + display: flex; + align-items: center; + justify-content: center; + width: 470rpx; + height: 90rpx; + background: #4C97E7; + border-radius: 54rpx 54rpx 54rpx 54rpx; + font-weight: 500; + font-size: 40rpx; + color: #FFFFFF; + } + } + .card { display: flex; diff --git a/pages/index/index.vue b/pages/index/index.vue index c38e557..3528721 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -435,10 +435,10 @@ </view> - <u-mask :show="showtcs" @click="showtc = false" :z-index='100' /> - <u-mask :show="showTips" @click="showTips = false" :z-index='100' /> + <u-mask :show="showtcs" @click="showtc = false" :z-index='100' duration='0'/> + <u-mask :show="showTips" @click="showTips = false" :z-index='100' duration='0'/> - <u-mask :show="showYjTip" @click="showYjTip = false" :z-index='100' /> + <u-mask :show="showYjTip" @click="showYjTip = false" :z-index='100' duration='0' /> <view class="pops" v-if="showYjTip"> <view class="tit" style="font-weight: 600;"> 您未充值押金 @@ -787,8 +787,8 @@ // console.log('userId 发生变化', newValue, oldValue); this.getisInOrder() }, - sn(newValue, oldValue){ - console.log('sn 发生变化', newValue, oldValue); + showYjTip(newValue, oldValue){ + console.log('showYjTip 发生变化', newValue, oldValue); } }, @@ -1149,7 +1149,11 @@ }) }, backDevice() { + uni.showLoading({ + title:'加载中...' + }) this.$u.post('/appVerify/device/return?returnType=1&orderNo=' + this.orderinfo.orderNo).then((res) => { + uni.hideLoading() if (res.code === 200) { this.getisInOrder() } else { @@ -1194,6 +1198,9 @@ }, // 预约解锁骑行 unlockdevice() { + uni.showLoading({ + title:'加载中...' + }) if (this.orderinfo.ruleId == null) { let data = { userId: this.userId, @@ -1207,6 +1214,7 @@ } this.$u.post('/appVerify/device/snSwitch', data).then((res) => { + uni.hideLoading() if (res.code == 200) { this.getisInOrder() @@ -1233,6 +1241,7 @@ } this.$u.post('/appVerify/device/snSwitch', data).then((res) => { + uni.hideLoading() if (res.code === 200) { this.getisInOrder() } else { @@ -1247,8 +1256,12 @@ }, unloackdevices() { + uni.showLoading({ + title:'加载中...' + }) this.$u.post('/appVerify/device/unlock?sn=' + this.OrderdeviceInfos.sn + '&orderNo=' + this.orderinfo .orderNo).then((res) => { + uni.hideLoading() if (res.code === 200) { this.getisInOrder() } else { @@ -1258,8 +1271,12 @@ }, // ;临时锁车 loackdevice() { + uni.showLoading({ + title:'加载中...' + }) this.$u.post('/appVerify/device/lock?sn=' + this.OrderdeviceInfos.sn + '&orderNo=' + this.orderinfo .orderNo).then((res) => { + uni.hideLoading() if (res.code === 200) { this.getisInOrder() } else { @@ -1549,6 +1566,7 @@ // url:'' // }) } else if (num == 1) { + uni.showLoading({ }) @@ -1566,10 +1584,13 @@ url: "/page_user/idcard_test" }); } else { + this.seeDetail = true; uni.hideLoading() + console.log('跳转1'); uni.navigateTo({ - url: '/page_user/yj' + url: '/page_user/yj?isback='+this.showYjTip }); + this.showYjTip = false } } else { uni.hideLoading() @@ -1581,12 +1602,16 @@ } }); } else { + this.seeDetail = true; uni.hideLoading() + console.log('跳转2'); uni.navigateTo({ - url: '/page_user/yj' + url: '/page_user/yj?isback='+this.showYjTip }); + this.showYjTip = false } - this.showYjTip = false + + } else { let that = this; @@ -1612,14 +1637,18 @@ if (res.user.isAuthentication == 0) { uni.hideLoading() that.seeDetail = true; + uni.navigateTo({ url: "/page_user/idcard_test" }); } else { + that.seeDetail = true; uni.hideLoading() + console.log('跳转3'); uni.navigateTo({ - url: '/page_user/yj' + url: '/page_user/yj?isback='+that.showYjTip }); + that.showYjTip = false } } else { uni.hideLoading() @@ -1631,10 +1660,13 @@ } }); } else { + that.seeDetail = true; uni.hideLoading() + console.log('跳转4'); uni.navigateTo({ - url: '/page_user/yj' + url: '/page_user/yj?isback='+that.showYjTip }); + that.showYjTip = false } } else if (res.code == 501) { uni.hideLoading() @@ -1680,7 +1712,7 @@ }); - + this.showYjTip = false } @@ -1715,6 +1747,10 @@ uni.navigateTo({ url: '/page_user/gzsb?sn=' + this.sn }) + } else if (num == 8) { + uni.navigateTo({ + url: '/page_user/gzsb?sn=' + this.sn + }) } }, createWebSocket() { @@ -1829,14 +1865,16 @@ } else { - uni.showToast({ - title: res.msg, - icon: 'none', - duration: 2000 - }); + if(res.msg=='您还未充值押金,请先充值押金'){ - this.close() + // this.close() this.showYjTip=true + }else{ + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); } } }) @@ -2259,6 +2297,12 @@ }) }, onMarkerTap(e) { + this.showdevice = false + this.deviceIndex = 0 + // this.sn = '' + this.type = 0 + this.freeInfo = {} + this.freeListIndex = 0 if (e.type === 'markertap') { console.log('点击了标记:', e.markerId); // 这里可以根据需要处理点击标记的逻辑 @@ -2369,33 +2413,35 @@ let data = { areaId: this.areaInfo.areaId }; - - this.$u.get(`/app/allVehicleByArea`, data).then((res) => { - if (res.code === 200) { - this.listData = res.data; - - const newMarkers = this.listData.map(item => ({ - id: parseFloat(item.sn), - latitude: parseFloat(item.latitude), - longitude: parseFloat(item.longitude), - width: 40, - height: 28, - iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uF9qLejuAZErNTrRuHq7', - })); - - // 检查新数据和旧数据是否有变化 - if (this.oldMarkers.length === 0 || this.isMarkersChanged(newMarkers)) { - console.log('有变化'); - this.markers = newMarkers; - this.oldMarkers = [...newMarkers]; + if(this.areaInfo.areaId){ + this.$u.get(`/app/allVehicleByArea`, data).then((res) => { + if (res.code === 200) { + this.listData = res.data; + + const newMarkers = this.listData.map(item => ({ + id: parseFloat(item.sn), + latitude: parseFloat(item.latitude), + longitude: parseFloat(item.longitude), + width: 40, + height: 28, + iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uF9qLejuAZErNTrRuHq7', + })); + + // 检查新数据和旧数据是否有变化 + if (this.oldMarkers.length === 0 || this.isMarkersChanged(newMarkers)) { + console.log('有变化'); + this.markers = newMarkers; + this.oldMarkers = [...newMarkers]; + } + + } else { + // 处理接口返回错误的情况 } - - } else { - // 处理接口返回错误的情况 - } - }).catch(error => { - // 处理接口请求失败的情况 - }); + }).catch(error => { + // 处理接口请求失败的情况 + }); + } + }, isMarkersChanged(newMarkers) { if (this.oldMarkers.length !== newMarkers.length) { @@ -2903,7 +2949,7 @@ padding: 40rpx 32rpx; width: 750rpx; // height: 272rpx; - background: #fff; + background: #F7F7F7; border-radius: 50rpx 50rpx 0 0; z-index: 100; @@ -2917,11 +2963,11 @@ .page1 { .top { - margin-top: 20rpx; + // margin-top: 20rpx; display: flex; flex-wrap: nowrap; align-items: center; - + padding-bottom: 28rpx; border-bottom: 2rpx solid #D8D8D8; @@ -3081,13 +3127,13 @@ flex-wrap: nowrap; width: 100%; // height: 284rpx; - + padding-bottom: 30rpx; .left { display: flex; flex-wrap: wrap; justify-content: center; width: 50%; - padding-top: 68rpx; + padding-top: 10rpx; .text { font-weight: 400; @@ -3116,7 +3162,7 @@ .right { width: 50%; - padding-top: 68rpx; + padding-top: 10rpx; display: flex; flex-wrap: wrap; justify-content: center; @@ -3309,14 +3355,15 @@ .bot_btn { width: 750rpx; - height: 648rpx; + height: 618rpx; // background: #fff; // box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08); border-radius: 50rpx 50rpx 0 0; .info { - margin-top: 20rpx; + // margin-top: 20rpx; padding: 0 60rpx; + display: flex; flex-wrap: nowrap; align-items: center; diff --git a/pages/login/login.vue b/pages/login/login.vue index e590d0b..c80d104 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -1,6 +1,6 @@ <template> <view class="page"> - <u-navbar :is-back="false" :title="tittxt" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='36' > + <u-navbar :is-back="false" :title="tittxt" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='45' > </u-navbar> <view class="imgbox"> diff --git a/pages/my.vue b/pages/my.vue index 3e7c191..645e4f5 100644 --- a/pages/my.vue +++ b/pages/my.vue @@ -1,6 +1,6 @@ <template> <view class="page"> - <u-navbar title="个人中心" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36' height='36'></u-navbar> + <u-navbar title="个人中心" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36' height='45'></u-navbar> <view class="topbg"> <view class="topbox"> <view class="info" > diff --git a/pages_admin/admin_index.vue b/pages_admin/admin_index.vue index c4d8080..f457311 100644 --- a/pages_admin/admin_index.vue +++ b/pages_admin/admin_index.vue @@ -3,7 +3,7 @@ <u-navbar title="地图" :is-back='false' :border-bottom="false" :background="bgc" title-color='#2E4975' - title-size='36' height='36'></u-navbar> + title-size='36' height='45'></u-navbar> <view @touchmove.stop.prevent="() => {}"> <view class="slider"> <view class="tit"> diff --git a/pages_admin/admin_order.vue b/pages_admin/admin_order.vue index debbdd3..b6eecca 100644 --- a/pages_admin/admin_order.vue +++ b/pages_admin/admin_order.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar :is-back="false" title="设备管理" :border-bottom="false" :background="bgc" title-color='#2E4975' - title-size='36' height='36'></u-navbar> + title-size='36' height='45'></u-navbar> <view class="top_box"> <view class="left_text"> 时间范围 diff --git a/pages_admin/admin_worke.vue b/pages_admin/admin_worke.vue index cab7448..0c65127 100644 --- a/pages_admin/admin_worke.vue +++ b/pages_admin/admin_worke.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar :is-back='false' title="工作台" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <view class="cont_box"> <view class="top"> diff --git a/pages_admin/order/device_detail.vue b/pages_admin/order/device_detail.vue index fad034f..291debc 100644 --- a/pages_admin/order/device_detail.vue +++ b/pages_admin/order/device_detail.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="设备详情" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude" :show-location="true" :markers="markers" :polygons="polyline" ></map> <view class="info_card"> diff --git a/pages_admin/order/order_detail.vue b/pages_admin/order/order_detail.vue index ab3b9fb..a800377 100644 --- a/pages_admin/order/order_detail.vue +++ b/pages_admin/order/order_detail.vue @@ -1,7 +1,7 @@ <template> <view class="page" v-if="loading"> <u-navbar title="订单详情" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude" :show-location='true' :markers="markers" :polygons="polygons" :polyline="polyline"> </map> <view class="info_card"> diff --git a/pages_admin/order/search_device.vue b/pages_admin/order/search_device.vue index fc48fdd..e7be293 100644 --- a/pages_admin/order/search_device.vue +++ b/pages_admin/order/search_device.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="车辆搜索" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <view class="" style="background: #FFFFFF;width: 750rpx;padding-bottom: 36rpx;"> <view class="top_box" style="margin-top: 20rpx;"> diff --git a/pages_admin/worke/woke_deviceMgmt.vue b/pages_admin/worke/woke_deviceMgmt.vue index b189cbb..41abed8 100644 --- a/pages_admin/worke/woke_deviceMgmt.vue +++ b/pages_admin/worke/woke_deviceMgmt.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="设备管理" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <view class="tap"> <!-- <view class="tap_cont " :class="curtitidx==0?'act1':''" @click="changeidx(0)"> 投放中设备 diff --git a/pages_admin/worke/worke_Operation.vue b/pages_admin/worke/worke_Operation.vue index bce8e1a..43b5881 100644 --- a/pages_admin/worke/worke_Operation.vue +++ b/pages_admin/worke/worke_Operation.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="运营数据" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <view class="top_box"> <view class="left_text"> 时间范围 diff --git a/pages_admin/worke/worke_income.vue b/pages_admin/worke/worke_income.vue index 15f34fd..e98b171 100644 --- a/pages_admin/worke/worke_income.vue +++ b/pages_admin/worke/worke_income.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="收入对账" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <view class="" style="background: #FFFFFF;width: 750rpx;padding-bottom: 36rpx;"> <view class="top_box"> <view class="left_text"> diff --git a/pages_admin/worke/worke_user.vue b/pages_admin/worke/worke_user.vue index e39dc15..e242fb9 100644 --- a/pages_admin/worke/worke_user.vue +++ b/pages_admin/worke/worke_user.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="用户管理" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <view class="" style="background: #FFFFFF;width: 750rpx;padding-bottom: 36rpx;"> <view class="top_box"style="margin-top: 20rpx;"> diff --git a/pages_admin/worke/worke_user_detail.vue b/pages_admin/worke/worke_user_detail.vue index b6256dc..744f604 100644 --- a/pages_admin/worke/worke_user_detail.vue +++ b/pages_admin/worke/worke_user_detail.vue @@ -1,7 +1,7 @@ <template> <view class="page"> <u-navbar title="用户详情" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' - height='36'></u-navbar> + height='45'></u-navbar> <view class="userinfo" style="background: #FFFFFF;width: 750rpx;padding-bottom: 36rpx;"> <view class="userinfo_li">