diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 117cf88..fcb718c 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -21,8 +21,9 @@ const install = (Vue, vm) => { // }); Vue.prototype.$u.http.setConfig({ // baseUrl: 'http://61.174.243.28:15861', - baseUrl: 'http://192.168.2.6:8080', - // baseUrl: 'https://dche.ccttiot.com/prod-api', + // baseUrl: 'http://192.168.2.6:8080', + // baseUrl: 'http://124.221.246.124:2289', + baseUrl: 'https://dche.ccttiot.com/prod-api', loadingText: '努力加载中~', loadingTime: 800, // 设置自定义头部content-type @@ -128,7 +129,13 @@ const install = (Vue, vm) => { }) - } else { + }else if(res.code == 501){ + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + }else { // console.log("老用户登录",res.data) uni.redirectTo({ url:'/pages/login/login' diff --git a/page_user/ckmx.vue b/page_user/ckmx.vue index f91f699..1453346 100644 --- a/page_user/ckmx.vue +++ b/page_user/ckmx.vue @@ -1,115 +1,116 @@ <template> <view class="page"> - <u-navbar title="查看明细" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36' - height='36'></u-navbar> - <view class="tit"> - <view class="left">电单车</view> - <view class="right">查看计费规则 ></view> + <u-navbar title="费用明细" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36' height='36'></u-navbar> + <view class="tit"> + <view class="left">电单车</view> + <!-- <view class="right">查看计费规则 ></view> --> + </view> + <view class="data"> + {{info.createTime}} + </view> + <view class="card"> + <view class="card_tit"> + 账单信息 </view> - <view class="data"> - 2023-12-31 - </view> - <view class="card"> - <view class="card_tit"> - 账单信息 + <view class="cont"> + <view class="cont_box"> + <view class="cont_left"> + 预约费 + </view> + <view class="cont_right"> + {{info.appointmentFee}}元 + </view> </view> - <view class="cont"> - <view class="cont_box"> - <view class="cont_left"> - 起步价(15分钟) - </view> - <view class="cont_right"> - 2.00元 - </view> + <view class="cont_box" style="margin-top: 20rpx;"> + <view class="cont_left"> + 骑行费 </view> - <view class="cont_box" style="margin-top: 20rpx;"> - <view class="cont_left"> - 时长费(16分钟) - </view> - <view class="cont_right"> - 2.00元 - </view> + <view class="cont_right"> + {{info.ridingFee}}元 </view> - <view class="tip"> - 已骑行30分9秒 - </view> - </view> - <view class="price"> - <view class="zhanwei"> - + <view class="cont_box" style="margin-top: 20rpx;"> + <view class="cont_left"> + 管理费 </view> - <view class="prices"> - 实付 <span style="font-size:48rpx ;">4.00</span>元 + <view class="cont_right"> + {{info.manageFee}}元 </view> </view> + <view class="cont_box" style="margin-top: 20rpx;"> + <view class="cont_left"> + 调度费 + </view> + <view class="cont_right"> + {{info.dispatchFee}}元 + </view> + </view> + <view class="tip"> + 已骑行{{ rideDuration }} + </view> </view> - <view class="card"> - <view class="card_tit"> - 账单信息 + <view class="price"> + <view class="zhanwei"></view> + <view class="prices"> + 共计<span style="font-size:48rpx ;">{{info.totalFee}}</span>元 </view> - <view class="cont"> - <view class="cont_box"> - <view class="cont_left"> - 起步价(15分钟) - </view> - <view class="cont_right"> - 2.00元 - </view> + </view> + </view> + <view class="card" v-if="false"> + <view class="card_tit"> + 账单信息 + </view> + <view class="cont"> + <view class="cont_box"> + <view class="cont_left"> + 起步价(15分钟) </view> - - <view class="tip"> - 已骑行30分9秒 - </view> - - </view> - <view class="price"> - <view class="zhanwei"> - - </view> - <view class="prices"> - 实付 <span style="font-size:48rpx ;">4.00</span>元 - </view> - </view> - <view class="price" style="margin-top: 0;"> - <view class="zhanwei"> - - </view> - <view class="showmore"> - 查看支付方式 - <view class="iconfont icon-xiangxia1"> - - </view> - <!-- <view class="iconfont icon-xiangshang1"> - - </view> --> - </view> - </view> - <view class="info_cont"> - <view class="info_left"> - 微信支付 - </view> - <view class="info_right"> + <view class="cont_right"> 2.00元 </view> </view> - <view class="info_cont"> - <view class="info_left"> - 支付时间 - </view> - <view class="info_right"> - 2023-12-31 19:23:59 - </view> - </view> - <view class="info_cont"> - <view class="info_left"> - 订单号 - </view> - <view class="info_right"> - 3915479812278489 - </view> + <view class="tip"> + 已骑行30分9秒 </view> </view> + <view class="price"> + <view class="zhanwei"></view> + <view class="prices"> + 实付 <span style="font-size:48rpx ;">4.00</span>元 + </view> + </view> + <view class="price" style="margin-top: 0;"> + <view class="zhanwei"></view> + <view class="showmore"> + 查看支付方式 + <view class="iconfont icon-xiangxia1"></view> + </view> + </view> + <view class="info_cont"> + <view class="info_left"> + 微信支付 + </view> + <view class="info_right"> + 2.00元 + </view> + </view> + <view class="info_cont"> + <view class="info_left"> + 支付时间 + </view> + <view class="info_right"> + 2023-12-31 19:23:59 + </view> + </view> + <view class="info_cont"> + <view class="info_left"> + 订单号 + </view> + <view class="info_right"> + 3915479812278489 + </view> + </view> + </view> </view> </template> @@ -120,150 +121,42 @@ bgc: { backgroundColor: "", }, - - + id: 0, + info: {}, + rideDuration: '' // 新增属性用于存储骑行时间 } }, - methods: { + onLoad(e) { + this.id = e.orderId + if(this.id){ + this.orderInfo() + } + }, + methods: { + orderInfo() { + this.$u.get("/appVerify/order/" + this.id).then((res) => { + if (res.code == 200) { + this.info = res.data + this.calculateRideDuration(); // 计算骑行时间 + } + }); + }, + calculateRideDuration() { + const createTime = new Date(this.info.createTime); + const returnTime = new Date(this.info.returnTime); + const duration = (returnTime - createTime) / 1000; // 时间差,单位秒 + + const hours = Math.floor(duration / 3600); + const minutes = Math.floor((duration % 3600) / 60); + const seconds = Math.floor(duration % 60); + + if (hours > 0) { + this.rideDuration = `${hours}小时${minutes}分${seconds}秒`; + } else { + this.rideDuration = `${minutes}分${seconds}秒`; + } + } } } </script> - -<style lang="scss" > -page{ - background-color: #F7FAFE; -} -.page{ - // width: 750rpx; - width: 750rpx; - // height: 530rpx; - background: linear-gradient( 180deg, #4C97E7 0.1%, rgba(255,255,255,0) 40%), #FFFFFF; - border-radius: 0rpx 0rpx 0rpx 0rpx; - .tit{ - margin-left: 86rpx; - margin-right: 86rpx; - margin-top: 30rpx; - display: flex; - flex-wrap: nowrap; - justify-content: space-between; - align-items: center; - .left{ - font-weight: 700; - font-size: 40rpx; - color: #3D3D3D; - } - .right{ - - font-weight: 400; - font-size: 24rpx; - color: #3D3D3D; - } - } - .data{ - margin-left: 86rpx; - font-weight: 400; - font-size: 24rpx; - color: #808080; - } - .card{ - padding:34rpx 44rpx ; - margin: 68rpx auto; - width: 672rpx; - // height: 458rpx; - background: #FFFFFF; - box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08); - border-radius: 32rpx 32rpx 32rpx 32rpx; - .card_tit{ - width: 112rpx; - height: 38rpx; - font-family: AlibabaPuHuiTi, AlibabaPuHuiTi; - font-weight: 400; - font-size: 28rpx; - color: #3D3D3D; - - background: linear-gradient( 0deg, #B1C3FF 0.1%, rgba(255,255,255,0) 40%), #FFFFFF; - } - .cont{ - padding: 32rpx 28rpx; - margin-top: 26rpx; - width: 586rpx; - // height: 228rpx; - background: #F3F3F3; - border-radius: 26rpx 26rpx 26rpx 26rpx; - .cont_box{ - display: flex; - flex-wrap: nowrap; - justify-content: space-between; - .cont_left{ - font-weight: 400; - font-size: 28rpx; - color: #3D3D3D; - } - .cont_right{ - font-weight: 400; - font-size: 28rpx; - color: #3D3D3D; - } - } - .tip{ - margin-top: 32rpx; - font-weight: 400; - font-size: 24rpx; - color: #808080; - } - - - } - .price{ - margin-top: 28rpx; - display: flex; - flex-wrap: nowrap; - .prices{ - margin-left: auto; - font-weight: 400; - font-size: 24rpx; - color: #3D3D3D; - span{ - margin-left: 2rpx; - margin-right: 2rpx; - } - } - .showmore{ - margin-left: auto; - display: flex; - flex-wrap: nowrap; - align-items: center; - font-weight: 400; - font-size: 20rpx; - color: #3D3D3D; - .icon-xiangshang1{ - font-size: 20rpx; - color: #3D3D3D; - } - .icon-xiangxia1{ - font-size: 20rpx; - color: #3D3D3D; - } - } - } - .info_cont{ - margin-top: 12rpx; - display: flex; - flex-wrap: nowrap; - align-items: center; - justify-content: space-between; - .cont_left{ - font-weight: 400; - font-size: 24rpx; - color: #3D3D3D; - } - .cont_right{ - font-weight: 400; - font-size: 24rpx; - color: #3D3D3D; - } - } - } -} -</style> diff --git a/page_user/gzsb.vue b/page_user/gzsb.vue index 1ba8a3e..a3bf960 100644 --- a/page_user/gzsb.vue +++ b/page_user/gzsb.vue @@ -261,8 +261,21 @@ onlyFromCamera: true, scanType: ['qrCode'], success: res => { - console.log('扫描结果:', res); - this.sn = res.sn + + let sn = null; + let queryParams = res.result.split('?')[1]; + if (queryParams) { + let params = queryParams.split('&'); + params.forEach(param => { + let [key, value] = param.split('='); + if (key === 'sn') { + sn = value; + } + }); + } + + this.sn = sn + }, fail: err => { diff --git a/page_user/jfgz.vue b/page_user/jfgz.vue index 398cd38..3af3651 100644 --- a/page_user/jfgz.vue +++ b/page_user/jfgz.vue @@ -3,39 +3,144 @@ <u-navbar title="计费规则" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='36'></u-navbar> <view class="cont" style="margin-top: 50rpx;"> - <view class="tit"> + <view class="tit" style="margin-top: 50rpx;"> 骑行服务费 </view> <view class="card"> <view class="li"> <view class="left"> - 起步价 + 预约服务费 </view> <view class="right"> - {{startingPrice}}元(含{{startingHowManyMinutes}}分钟) + {{areaInfo. appointmentServiceFee}}元/10分钟 </view> </view> + <view class="li" style="margin-top: 38rpx;"> <view class="left"> - 时长费 + 押金 </view> <view class="right"> - {{timeFee}}元/{{timeMinutes}}分钟 + {{areaInfo.vehicleManagementFee}}元 </view> </view> - <view class="tip"> - 超出起步价包含时长后收取 - </view> - </view> - <view class="tips"> - <view class="yuan"> - - </view> - <view class="txt"> - 骑行服务费以开始服务时刻所对应的计费规则为准,时长 费不足1个计费周时,按1个计费周期计算费用 - </view> </view> + <view class="tips" style="margin-top: 10rpx;margin-left: 5rpx;"> + <view class="yuan"> + </view> + <view class="txt"> + 预约服务费是在使用预约服务时,预约时段内的收费标准 + </view> + + </view> + <view class="tips" style="margin-top: 10rpx;margin-left: 5rpx"> + <view class="yuan"></view> + <view class="txt"> + 押金是在使用车辆前的收费标准,归还设备后可退 + </view> + + </view> + <view class="tit" style="margin-top: 50rpx;"> + 免费时长 + </view> + <view class="card"> + <view class="li"> + <view class="left"> + 免费时长 + </view> + <view class="right"> + {{freeInfo.freeRideTime}}分钟 + </view> + </view> + + + + </view> + + <view > + <view v-if="freeInfo.ridingRule==1"> + <view class="tit" style="margin-top: 50rpx;"> + {{freeInfo.name}} + </view> + <view class="card"> + <view class="li"> + <view class="left"> + 起步价 + </view> + <view class="right"> + {{freeInfo.ridingRuleJson.startingPrice}}元(含{{freeInfo.ridingRuleJson.startingTime}}<span + v-if="freeInfo.rentalUnit=='minutes'">分钟</span><span + v-if="freeInfo.rentalUnit=='hours'">小时</span><span + v-if="freeInfo.rentalUnit=='day'">天</span>) + </view> + </view> + <view class="li" style="margin-top: 38rpx;"> + <view class="left"> + 时长费 + </view> + <view class="right"> + {{freeInfo.ridingRuleJson.timeoutPrice}}元/{{ freeInfo.ridingRuleJson.timeoutTime}}<span + v-if="freeInfo.rentalUnit=='minutes'">分钟</span><span + v-if="freeInfo.rentalUnit=='hours'">小时</span><span + v-if="freeInfo.rentalUnit=='day'">天</span> + </view> + </view> + + </view> + + </view> + <view v-if="freeInfo.ridingRule==2"> + <view class="tit" style="margin-top: 50rpx;"> + {{freeInfo.name}} + </view> + <view class="card"> + + <view class="li" style="margin-top: 10rpx;" v-for="(items,index) in freeInfo.ridingRuleJson.rule" + v-if="index!=freeInfo.ridingRuleJson.rule.length-1"> + <view class="left" v-if="index==0"> + 区间计费 + </view> + <view class="left" v-if="index!=0"> + + </view> + <view class="right"> + {{items.start}}-{{items.end}}<span v-if="freeInfo.rentalUnit=='minutes'">分钟</span> + <span v-if="freeInfo.rentalUnit=='hours'">小时</span> + <span v-if="freeInfo.rentalUnit=='day'">天</span>, + 每{{items.eachUnit}}<span v-if="freeInfo.rentalUnit=='minutes'">分钟</span> + <span v-if="freeInfo.rentalUnit=='hours'">小时</span> + <span v-if="freeInfo.rentalUnit=='day'">天</span>/{{items.fee}}元 + </view> + </view> + <view class="li" style="margin-top: 10rpx;" v-for="(items,index) in freeInfo.ridingRuleJson.rule" + v-if="index==freeInfo.ridingRuleJson.rule.length-1"> + <view class="left"> + + </view> + <view class="right"> + >{{items.start}}<span v-if="freeInfo.rentalUnit=='minutes'">分钟</span> + <span v-if="freeInfo.rentalUnit=='hours'">小时</span> + <span v-if="freeInfo.rentalUnit=='day'">天</span>, + 每{{items.eachUnit}}<span v-if="freeInfo.rentalUnit=='minutes'">分钟</span> + <span v-if="freeInfo.rentalUnit=='hours'">小时</span> + <span v-if="freeInfo.rentalUnit=='day'">天</span>/{{items.fee}}元 + </view> + </view> + </view> + <view class="tips"> + <view class="yuan"> + + </view> + <view class="txt"> + 区间计费是在使用车辆时时,不同时段内的收费标准 + </view> + + </view> + </view> + + </view> + <view class="tit" style="margin-top: 50rpx;"> 违规停车管理费 @@ -46,7 +151,7 @@ 调度费(非停车点) </view> <view class="right"> - {{dispatchFee}}元 + {{areaInfo. dispatchFee}}元 </view> </view> <view class="tip" style="width: 440rpx;"> @@ -57,7 +162,7 @@ 管理费费 </view> <view class="right"> - {{vehicleManagementFee}}元 + {{areaInfo.vehicleManagementFee}}元 </view> </view> <view class="tip"> @@ -85,35 +190,47 @@ bgc: { backgroundColor: "#fff", }, + areaInfo:{}, + freeInfo:{} } }, computed: { - appointmentServiceFee() { - return this.$store.getters.appointmentServiceFee; - }, - dispatchFee() { - return this.$store.getters.dispatchFee; - }, - vehicleManagementFee() { - return this.$store.getters.vehicleManagementFee; - }, - startingPrice() { - return this.$store.getters.startingPrice; - }, - timeFee() { - return this.$store.getters.timeFee; - }, - timeMinutes() { - return this.$store.getters.timeMinutes; - }, - startingHowManyMinutes() { - return this.$store.getters.startingHowManyMinutes; - }, + userId() { return this.$store.getters.userId; }, + }, + onLoad(options) { + + try { + if (options.item) { + this.freeInfo = JSON.parse(decodeURIComponent(options.item)); + console.log( this.freeInfo,' this.freeInfo'); + } + } catch (error) { + console.error('Error parsing item:', error); + } + }, + onShow() { + this.getarea() }, methods: { + getarea() { + let id = uni.getStorageSync('areaId'); + this.$u.get("/app/area/"+id).then((res) => { + + if (res.code == 200) { + this.areaInfo=res.data + // this.getlist() + } else { + uni.showToast({ + title:res.msg, + icon: 'none', + duration: 2000 + }); + } + }); + }, } } @@ -130,6 +247,7 @@ page{ // justify-content: center; .cont{ margin: 0 58rpx; + padding-bottom: 100rpx; .tit{ margin-left: 32rpx; font-weight: 700; diff --git a/page_user/yj.vue b/page_user/yj.vue index f6d3fd3..0f9a83a 100644 --- a/page_user/yj.vue +++ b/page_user/yj.vue @@ -11,7 +11,7 @@ </view> <view class="tit" style="margin-top: 18rpx;font-weight: 700;font-size: 92rpx;color: #3D3D3D;line-height: 72rpx;"><span - style="font-size: 52rpx;">¥</span>{{deposit}}</view> + style="font-size: 52rpx;">¥</span>{{areaInfo.deposit}}</view> </view> <view class="card1"> <view class="cont"> @@ -131,6 +131,7 @@ userinfo: {}, orderList:[], total:0, + areaInfo:"" } @@ -141,7 +142,7 @@ // // 执行其他操作... // }); this.getinfo() - + this.getarea() }, watch: { userId(newValue, oldValue) { @@ -151,32 +152,28 @@ } }, computed: { - appointmentServiceFee() { - return this.$store.getters.appointmentServiceFee; - }, - dispatchFee() { - return this.$store.getters.dispatchFee; - }, - vehicleManagementFee() { - return this.$store.getters.vehicleManagementFee; - }, - startingPrice() { - return this.$store.getters.startingPrice; - }, - timeFee() { - return this.$store.getters.timeFee; - }, - timeMinutes() { - return this.$store.getters.timeMinutes; - }, - deposit() { - return this.$store.getters.deposit; - }, + userId() { return this.$store.getters.userId; }, }, methods: { + getlist() { + this.$u.get("/appVerify/order/list?type=2&userId="+this.userId).then((res) => { + + if (res.code == 200) { + this.orderList=res.rows + this.total=res.total + } else { + uni.showToast({ + title:res.msg, + icon: 'none', + duration: 2000 + }); + } + }); + }, + tixian(){ this.$u.post("/appVerify/order/withdraw").then((res) => { @@ -193,12 +190,12 @@ } }); }, - getlist() { - this.$u.get("/appVerify/order/list?type=2&userId="+this.userId).then((res) => { + getarea() { + let id = uni.getStorageSync('areaId'); + this.$u.get("/app/area/"+id).then((res) => { if (res.code == 200) { - this.orderList=res.rows - this.total=res.total + this.areaInfo=res.data } else { uni.showToast({ title:res.msg, @@ -228,7 +225,7 @@ userId: this.userId, // ruleId: this.freeInfo.ruleId, - money: this.deposit, + money: this.areaInfo.deposit, mark: "押金充值", type: '4' diff --git a/pages/index/index.vue b/pages/index/index.vue index d78c899..1a85cf1 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -90,7 +90,7 @@ </view> </view> </view> - <view class="center"> + <view class="center" > <!-- <view class="card" :class="freeListIndex==0?'act1':''" @click="freeListIndex=0" v-if="orderinfo.ruleId==null"> <image src="https://api.ccttiot.com/smartmeter/img/static/uYg1WNJJH1VK7RdldKE1" mode="" v-if="freeListIndex==0"></image> @@ -126,15 +126,16 @@ <view class="tit"> {{item.name}} </view> + <view style="padding: 18rpx;"> <view class="nmtxt"> <view class="left"> 起步价 </view> <view class="right"> - {{item.ridingRuleJson.startingPrice}}元(含{{item.ridingRuleJson.startingTime}}<span + {{item.ridingRuleJson.startingPrice}}元(含{{item.ridingRuleJson.startingTime}}<span v-if="item.rentalUnit=='minutes'">分钟</span><span v-if="item.rentalUnit=='hours'">小时</span><span - v-if="item.rentalUnit=='day'">天</span>) + v-if="item.rentalUnit=='day'">天</span>) </view> </view> <view class="nmtxt"> @@ -148,10 +149,10 @@ v-if="item.rentalUnit=='day'">天</span> </view> </view> - - <view class="tips" @click.stop='feedetail(item,index+1)'> - 查看详情 <view class="iconfont icon-chakanxiangqing"></view> </view> + <!-- <view class="tips" @click.stop='feedetail(item,index+1)'> + 查看详情 <view class="iconfont icon-chakanxiangqing"></view> + </view> --> </view> <view v-if="item.ridingRule==2"> @@ -159,29 +160,24 @@ {{item.name}} </view> - <view class="nmtxt text-ellipsis" v-for="(items, indexs) in item.ridingRuleJson.rule" - :key="indexs" style="margin-top: 10rpx;" v-if="indexs<3"> - <view class="left"></view> - <view class="right " style="font-size: 20rpx;"> - {{items.start}}-{{items.end}}<span v-if="item.rentalUnit=='minutes'">分钟</span> - <span v-if="item.rentalUnit=='hours'">小时</span> - <span v-if="item.rentalUnit=='day'">天</span>, - 每{{items.eachUnit}}<span v-if="item.rentalUnit=='minutes'">分钟</span> - <span v-if="item.rentalUnit=='hours'">小时</span> - <span v-if="item.rentalUnit=='day'">天</span>/{{items.fee}}元 - </view> - </view> - - <view class="nmtxt text-ellipsis" style="margin-top: 10rpx;"> - <view class="left"> - <view class="tips" @click.stop='feedetail(item,index+1)'> - 查看详情 <view class="iconfont icon-chakanxiangqing"></view> + <view style="padding: 18rpx;"> + <view class="nmtxt text-ellipsis" v-for="(items, indexs) in item.ridingRuleJson.rule" + :key="indexs" style="margin-top: 10rpx;" v-if="indexs<2"> + <view class="left"></view> + <view class="right " style="font-size: 28rpx;"> + {{items.start}}-{{items.end}}<span v-if="item.rentalUnit=='minutes'">分钟</span> + <span v-if="item.rentalUnit=='hours'">小时</span> + <span v-if="item.rentalUnit=='day'">天</span>, + 每{{items.eachUnit}}<span v-if="item.rentalUnit=='minutes'">分钟</span> + <span v-if="item.rentalUnit=='hours'">小时</span> + <span v-if="item.rentalUnit=='day'">天</span>/{{items.fee}}元 + <span v-if="indexs==1">...</span> </view> </view> - <view class="right " v-if="item.ridingRuleJson.rule.length>3"> - .... - </view> </view> + + + <!-- <view class="nmtxt"> <view class="left"> @@ -195,7 +191,9 @@ 超出起步价包含时长后收取 </view> --> </view> - + <view class="tips_btn" @click.stop='feedetail(item,index+1)'> + 查看详情 + </view> </view> </view> <view class="bot" style="margin-top: 20rpx;"> @@ -208,13 +206,13 @@ <view class="btn" @click="sub2()" v-if="type==1&&freeListIndex!=0"> 确认套餐 </view> --> - <view class="btn" @click="sub3()" v-if="type==2&&freeListIndex==0&&orderinfo.ruleId==null"> + <!-- <view class="btn" @click="sub3()" v-if="type==2&&freeListIndex==0&&orderinfo.ruleId==null"> 确认预约 - </view> - <view class="btn" @click="sub5()" v-if="type==2&&orderinfo.ruleId!=null"> + </view> --> + <!-- <view class="btn" @click="sub5()" v-if="type==2&&orderinfo.ruleId!=null"> 确认预约 - </view> - <view class="btn" @click="sub3()" v-if="type==2&&freeListIndex!=0"> + </view> --> + <view class="btn" @click="sub3()" v-if="type==2"> 确认预约 </view> </view> @@ -305,7 +303,7 @@ <view class="price"> {{orderinfo.totalFee}}<span>元</span> </view> - <view class="toinfo"> + <view class="toinfo" @click="tofeeDetail()"> 查看骑行费明细 > </view> <view class="btn" @click="topay()" v-if="orderinfo.status==1"> @@ -318,9 +316,9 @@ </view> </view> <view class="botmbox" v-if="showindex==0"> - <view class="top_btn"> + <view class="top_btn" @click="qecodelock()"> <image src="https://api.ccttiot.com/smartmeter/img/static/un6Wi8CefEjy04qzvn67" mode="" - @click="topage(0)"></image> + ></image> 扫码开锁 </view> @@ -361,8 +359,8 @@ </view> </view> </view> - <view class="tipss" v-if="showtc" @click="showtcs=true"> - 您有正在进行中的套餐 <view class="iconfont icon-xiangyou1"> + <view class="tipss" v-if="orderinfo.status" @click="starTime"> + 您有正在进行中的订单 <view class="iconfont icon-xiangyou1"> </view> </view> @@ -535,14 +533,14 @@ P点外归还设备将收取调度费 </view> </view> - <view class="cont"> + <!-- <view class="cont"> <view class="left"> 支付订单后 </view> <view class="right" style="color:#3D3D3D ;"> 自动退押金 </view> - </view> + </view> --> </view> <view class="feeCard" v-html='freeInfo.instructions'> @@ -556,7 +554,7 @@ <div class="tit"> 更多用车服务 </div> - <div class="contbox"> + <div class="contbox" style="width: 100%;"> <view class="cont_li" @click="topage(1)"> <image src="https://api.ccttiot.com/smartmeter/img/static/uGDkCwxDNH9oFORX2XNU" mode=""></image> <view class="txt"> @@ -613,8 +611,8 @@ }, showindex: 0, show: false, - latitude: '26.940805', - longitude: '120.356157', + latitude: '', + longitude: '', isMap: false, zoomSize: 16, markers: [], @@ -641,7 +639,7 @@ areaInfo: {}, // feeInfo:{}, showfeeDetail: false, - + seeDetail:false // userId:this.$store.getters.userId, } @@ -654,70 +652,106 @@ } }, onLoad(e) { + console.log(e,'eeeeeeeeeeeeeeeeeee'); + if(e.q){ + let qParam = e.q; + + // 第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; + } + }); + } + this.sn = sn + if(this.sn!=''){ + + + setTimeout(() => { + if(!this.orderinfo.status){ + this.deviceInfo() + this.showdevice = true + this.deviceIndex = 1 + this.type = 1 + } + }, 1000) + + + } + + } if (e.sn) { this.sn = e.sn - this.deviceInfo() - setTimeout(() => { - this.showdevice = true - this.deviceIndex = 1 - this.type = 1 - }, 2000) + if(this.sn!=''){ + setTimeout(() => { + if(!this.orderinfo.status){ + this.deviceInfo() + this.showdevice = true + this.deviceIndex = 1 + this.type = 1 + } + }, 1000) + + } } }, onShow() { - if (uni.getStorageSync('token')) { - this.$store.dispatch('userInfo', this.$u).then(() => { - - // 执行其他操作... - - }); - - } - if (uni.getStorageSync('role')) { - let abb = uni.getStorageSync('role') - - } - // this.eventKey = Math.floor(Math.random() * 100000); - console.log(this.userId); - - // setTimeout(() => { - // this.getisInOrder() - - // }, 2000) - // this.role() - - // this.$store.dispatch('fetchFeeRules', this.$u).then(() => { - - // // 执行其他操作... - // }); - // this.fetchFeeRules() - - let that = this - uni.getLocation({ - type: 'wgs84', - success: function(lb) { - - that.gps.latitude = lb.latitude; - that.gps.longitude = lb.longitude; - that.gps.latitude = '26.940805', - that.gps.longitude = '120.356157'; - that.getmarks() - that.getArea() - - // - }, - fail: function(error) { - uni.showToast({ - title: '未获取到定位信息,请点击设置勾选允许位置信息,即可使用全部功能', - icon: 'none', - duration: 2000 + if(this.seeDetail==false){ + if (uni.getStorageSync('token')) { + this.$store.dispatch('userInfo', this.$u).then(() => { + + // 执行其他操作... + }); - // that.getmarks() - // 在这里处理获取位置信息失败的情况 + } - - }) + if (uni.getStorageSync('role')) { + let abb = uni.getStorageSync('role') + + } + + console.log(this.userId); + + + + let that = this + uni.getLocation({ + type: 'wgs84', + success: function(lb) { + + that.gps.latitude = lb.latitude; + that.gps.longitude = lb.longitude; + // that.gps.latitude = '26.940805', + // that.gps.longitude = '120.356157'; + that.latitude= lb.latitude + that.longitude= lb.longitude + // that.getmarks() + that.getArea() + + // + }, + fail: function(error) { + uni.showToast({ + title: '未获取到定位信息,请点击设置勾选允许位置信息,即可使用全部功能', + icon: 'none', + duration: 2000 + }); + // that.getmarks() + // 在这里处理获取位置信息失败的情况 + } + + }) + } + }, @@ -751,9 +785,66 @@ }, }, methods: { + // 查看费用详情 + tofeeDetail(){ + uni.navigateTo({ + url:'/page_user/ckmx?orderId='+this.orderinfo.orderNo + }) + }, + // 扫码开锁 + qecodelock(){ + uni.scanCode({ + onlyFromCamera: true, + scanType: ['qrCode'], + success: res => { + + let sn = null; + let queryParams = res.result.split('?')[1]; + if (queryParams) { + let params = queryParams.split('&'); + params.forEach(param => { + let [key, value] = param.split('='); + if (key === 'sn') { + sn = value; + } + }); + } + + this.sn = sn + if(this.sn!=''){ + setTimeout(() => { + if(!this.orderinfo.status){ + this.deviceInfo() + this.showdevice = true + this.deviceIndex = 1 + this.type = 1 + } + }, 1000) + + } + + }, + fail: err => { + console.error('扫描失败:', err); + uni.showToast({ + title: '扫描失败', + icon: 'none' + }); + } + }); + }, feedetail(item, index) { this.freeInfo = item - this.showfeeDetail = true + this.seeDetail=true + try { + const itemStr = encodeURIComponent(JSON.stringify(item)); + uni.navigateTo({ + url: `/page_user/jfgz?item=${itemStr}` + }); + } catch (error) { + console.error('Error serializing item:', error); + } + // this.showfeeDetail = true this.freeListIndex = index }, // 无套餐取消预约 @@ -801,25 +892,34 @@ }, // 套餐直接开锁 sub6() { - let data = { - userId: this.userId, - sn: this.sn, - - // ruleId: this.freeInfo.ruleId, - // money: this.freeInfo.fee, - mark: "套餐直接开锁", - // type: '1', - ruleId: this.orderinfo.ruleId, - orderNo: this.orderinfo.orderNo - - } - this.$u.post('/appVerify/device/snSwitch', data).then((res) => { - if (res.code === 200) { - this.getisInOrder() - } else { - + if(this.orderinfo.ruleId){ + let data = { + userId: this.userId, + sn: this.sn, + + // ruleId: this.freeInfo.ruleId, + // money: this.freeInfo.fee, + mark: "套餐直接开锁", + // type: '1', + ruleId: this.orderinfo.ruleId, + orderNo: this.orderinfo.orderNo + } - }) + this.$u.post('/appVerify/device/snSwitch', data).then((res) => { + if (res.code === 200) { + this.getisInOrder() + } else { + + } + }) + }else{ + uni.showToast({ + title: '请选择套餐', + icon: 'none', + duration: 2000 + }); + } + }, // 预约解锁骑行 unlockdevice() { @@ -836,7 +936,7 @@ } this.$u.post('/appVerify/device/snSwitch', data).then((res) => { - if (res.code === 200) { + if (res.code == 200) { this.getisInOrder() } else { uni.showToast({ @@ -863,7 +963,11 @@ if (res.code === 200) { this.getisInOrder() } else { - + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); } }) } @@ -891,6 +995,7 @@ }) }, starTime() { + this.seeDetail=false clearInterval(this.timer) this.timer = null this.$u.get('/app/device/info?sn=' + this.orderinfo.sn).then((res) => { @@ -1047,7 +1152,7 @@ } else if (this.orderinfo.status == 1) { // 取消预约 // this.topay() - const createTimeTimestamp = new Date(this.orderinfo.appointmentstartingTime).getTime(); + const createTimeTimestamp = new Date(this.orderinfo.appointmentStartTime).getTime(); // 定义定时器 @@ -1362,206 +1467,257 @@ }); }, sub5() { - this.$u.post('/appVerify/device/appointment?userId=' + this.userId + '&sn=' + this.sn + '&ruleId=' + this - .orderinfo.ruleId + '&type=2' + '&orderNo=' + this.orderinfo.orderNo).then((res) => { - if (res.code === 200) { - uni.showLoading({ - title: '预约中...' - }) - setTimeout(() => { - this.getisInOrder() - uni.hideLoading() - }, 1000) - // this.freList=res.rows - - } else { - uni.showToast({ - title: res.msg, - icon: 'none', - duration: 2000 - }); - } - }) + if( this.orderinfo.ruleId){ + this.$u.post('/appVerify/device/appointment?userId=' + this.userId + '&sn=' + this.sn + '&ruleId=' + this + .orderinfo.ruleId + '&type=2' + '&orderNo=' + this.orderinfo.orderNo).then((res) => { + if (res.code === 200) { + uni.showLoading({ + title: '预约中...' + }) + setTimeout(() => { + this.getisInOrder() + uni.hideLoading() + }, 1000) + // this.freList=res.rows + + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }) + }else{ + uni.showToast({ + title: '请选择套餐', + icon: 'none', + duration: 2000 + }); + } + }, // 确认开锁 sub1() { - - let data = { - userId: this.userId, - sn: this.sn, - ruleId: this.freeInfo.ruleId, - // money: this.freeInfo.fee, - mark: "确认开锁", - type: '1' - - - } - this.$u.post('/appVerify/device/snSwitch', data).then((res) => { - if (res.code === 200) { - this.getisInOrder() - } else { - uni.showToast({ - title: res.msg, - icon: 'none', - duration: 2000 - }); + if(this.freeInfo.ruleId){ + let data = { + userId: this.userId, + sn: this.sn, + ruleId: this.freeInfo.ruleId, + // money: this.freeInfo.fee, + mark: "确认开锁", + type: '1' + + } - }) + this.$u.post('/appVerify/device/snSwitch', data).then((res) => { + this.seeDetail=false + if (res.code === 200) { + this.getisInOrder() + + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }) + }else{ + uni.showToast({ + title: '请选择套餐', + icon: 'none', + duration: 2000 + }); + } + }, // 开锁购买套餐 sub2() { - let data = { - userId: this.userId, - sn: this.sn, - ruleId: this.freeInfo.ruleId, - // money: this.freeInfo.fee, - isAppointment: false, - mark: "套餐开锁", - type: '3' - - - } - this.$u.post('/appVerify/pre/order', data).then((res) => { - if (res.code === 200) { - // this.freList=res.rows - uni.requestPayment({ - provider: 'wxpay', - timeStamp: res.data.timeStamp, - nonceStr: res.data.nonceStr, - package: res.data.packageVal, - signType: res.data.signType, - paySign: res.data.paySign, - success(res) { - // 支付成功逻辑 - this.showdevice = false - this.deviceIndex = 0 - this.mac = '' - this.type = 0 - this.freeInfo = {} - this.freeListIndex = 0 - this.getisInOrder() - }, - fail(err) { - // 支付失败逻辑 - uni.showToast({ - title: '支付失败', - icon: 'none', - duration: 2000 - }); - } - }); - } else { - uni.showToast({ - title: res.msg, - icon: 'none', - duration: 2000 - }); + if(this.freeInfo.ruleId){ + let data = { + userId: this.userId, + sn: this.sn, + ruleId: this.freeInfo.ruleId, + // money: this.freeInfo.fee, + isAppointment: false, + mark: "套餐开锁", + type: '3' + + } - }) + this.$u.post('/appVerify/pre/order', data).then((res) => { + if (res.code === 200) { + // this.freList=res.rows + uni.requestPayment({ + provider: 'wxpay', + timeStamp: res.data.timeStamp, + nonceStr: res.data.nonceStr, + package: res.data.packageVal, + signType: res.data.signType, + paySign: res.data.paySign, + success(res) { + // 支付成功逻辑 + this.showdevice = false + this.deviceIndex = 0 + this.mac = '' + this.type = 0 + this.freeInfo = {} + this.freeListIndex = 0 + this.getisInOrder() + }, + fail(err) { + // 支付失败逻辑 + uni.showToast({ + title: '支付失败', + icon: 'none', + duration: 2000 + }); + } + }); + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }) + }else{ + uni.showToast({ + title: '请选择套餐', + icon: 'none', + duration: 2000 + }); + } + }, // 确认预约 sub3() { - let data = { - userId: this.userId, - sn: this.sn, - ruleId: this.freeInfo.ruleId, - // isAppointment: true, - // money: this.freeInfo.fee, - mark: "预约购买套餐", - type: '2' - - - } - this.$u.post('/appVerify/device/appointment?userId=' + this.userId + '&sn=' + this.sn + '&ruleId=' + this - .freeInfo.ruleId).then((res) => { - if (res.code === 200) { - uni.showLoading({ - title: '预约中...' - }) - setTimeout(() => { - this.getisInOrder() - uni.hideLoading() - }, 1000) - // this.freList=res.rows - - } else { - uni.showToast({ - title: res.msg, - icon: 'none', - duration: 2000 - }); + if(this.freeInfo.ruleId){ + let data = { + userId: this.userId, + sn: this.sn, + ruleId: this.freeInfo.ruleId, + // isAppointment: true, + // money: this.freeInfo.fee, + mark: "预约购买套餐", + type: '2' + + } - }) + this.$u.post('/appVerify/device/appointment?userId=' + this.userId + '&sn=' + this.sn + '&ruleId=' + this + .freeInfo.ruleId).then((res) => { + this.seeDetail=false + if (res.code === 200) { + uni.showLoading({ + title: '预约中...' + }) + setTimeout(() => { + this.getisInOrder() + uni.hideLoading() + }, 1000) + // this.freList=res.rows + + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }) + }else{ + uni.showToast({ + title: '请选择套餐', + icon: 'none', + duration: 2000 + }); + } + + }, // 预约购买套餐 sub4() { - let data = { - userId: this.userId, - sn: this.sn, - ruleId: this.freeInfo.ruleId, - isAppointment: true, - // money: this.freeInfo.fee, - mark: "预约购买套餐", - type: '3' - - - } - console.log('点击了'); - this.$u.post('/appVerify/pre/order', data).then((res) => { - if (res.code === 200) { - // this.freList=res.rows - uni.requestPayment({ - provider: 'wxpay', - timeStamp: res.data.timeStamp, - nonceStr: res.data.nonceStr, - package: res.data.packageVal, - signType: res.data.signType, - paySign: res.data.paySign, - success(res) { - // 支付成功逻辑 - - this.showdevice = false - this.deviceIndex = 0 - this.mac = '' - this.type = 0 - this.freeInfo = {} - this.freeListIndex = 0 - this.getisInOrder() - }, - fail(err) { - // 支付失败逻辑 - uni.showToast({ - title: '支付失败', - icon: 'none', - duration: 2000 - }); - } - }); - } else { - uni.showToast({ - title: res.msg, - icon: 'none', - duration: 2000 - }); + if(this.freeInfo.ruleId){ + let data = { + userId: this.userId, + sn: this.sn, + ruleId: this.freeInfo.ruleId, + isAppointment: true, + // money: this.freeInfo.fee, + mark: "预约购买套餐", + type: '3' + + } - }) + console.log('点击了'); + this.$u.post('/appVerify/pre/order', data).then((res) => { + if (res.code === 200) { + // this.freList=res.rows + uni.requestPayment({ + provider: 'wxpay', + timeStamp: res.data.timeStamp, + nonceStr: res.data.nonceStr, + package: res.data.packageVal, + signType: res.data.signType, + paySign: res.data.paySign, + success(res) { + // 支付成功逻辑 + + this.showdevice = false + this.deviceIndex = 0 + this.mac = '' + this.type = 0 + this.freeInfo = {} + this.freeListIndex = 0 + this.getisInOrder() + }, + fail(err) { + // 支付失败逻辑 + uni.showToast({ + title: '支付失败', + icon: 'none', + duration: 2000 + }); + } + }); + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }) + }else{ + uni.showToast({ + title: '请选择套餐', + icon: 'none', + duration: 2000 + }); + } + }, getisInOrder() { - this.$u.post('/app/user/isInOrder?userId=' + this.userId, ).then((res) => { - if (res.code === 200) { - // this.freList=res.rows - if (res.data != '') { - this.orderinfo = res.data[0] - - this.starTime() + if(this.userId){ + this.$u.post('/app/user/isInOrder?userId=' + this.userId, ).then((res) => { + if (res.code === 200) { + // this.freList=res.rows + if (res.data != '') { + this.orderinfo = res.data[0] + + this.starTime() + } else { + this.showdevice = false + this.deviceIndex = 0 + } } else { - this.showdevice = false - this.deviceIndex = 0 + } - } else { - - } - }) + }) + } + }, changefree(item, index) { this.freeInfo = item @@ -1697,7 +1853,11 @@ // // 这里可以根据需要处理点击地图非标记区域的逻辑 // }, getmarks() { - this.$u.get(`/app/vehicleLocalization`, this.gps).then((res) => { + + let data = { + areaId: this.areaInfo.areaId + } + this.$u.get(`/app/allVehicleByArea`, data).then((res) => { if (res.code === 200) { this.listData = res.data; // const markers = data.map(item => { @@ -1745,9 +1905,14 @@ this.polyline.push(polylines) // console.log(this.areaInfo, 'areaInfoareaInfo'); uni.setStorageSync('areaId', res.data.areaId); + this.getmarks() this.getlist() this.getParking() - this.getisInOrder() + if (uni.getStorageSync('token')) { + this.getisInOrder() + + } + // console.log(this.polyline); } else { uni.showToast({ @@ -1971,7 +2136,7 @@ .map { width: 750rpx; - height: 80vh; + height: 84vh; } .botmbox2 { @@ -2245,124 +2410,111 @@ } .center { - width: 750rpx; - display: flex; - // flex-wrap: nowrap; - padding: 0 32rpx; - height: 228rpx; - overflow-x: auto; - /* 添加水平滚动条 */ - margin-bottom: 200rpx; - - .card { - margin-right: 20rpx; - position: relative; - padding: 16rpx 24rpx; - width: 500rpx !important; - height: 228rpx; - background: #FFFFFF; - box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08); - border-radius: 16rpx 16rpx 16rpx 16rpx; - border: 2rpx solid #fff; - - image { - position: absolute; - top: 0; - right: 0; - width: 82rpx; - height: 50rpx; - } - - .tit { + width: 100%; + display: flex; + flex-wrap: nowrap; + overflow-x: auto; // 添加水平滚动条 + margin-bottom: 200rpx; + white-space: nowrap; // 确保子元素不换行 + + .card { + width: 500rpx !important; // 确保宽度被应用 + height: 288rpx; + margin-right: 20rpx; + position: relative; + background: #FFFFFF; + box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08); + border-radius: 16rpx; + border: 2rpx solid #fff; + + image { + position: absolute; + top: 0; + right: 0; + width: 82rpx; + height: 50rpx; + } + + .tips_btn { display: flex; - flex-wrap: nowrap; align-items: center; - width: 100%; + justify-content: center; + position: absolute; + bottom: 0; + width: 350rpx; + height: 70rpx; + background: #4C97E7; + border-radius: 0rpx 0rpx 16rpx 16rpx; font-weight: 500; - font-size: 32rpx; - color: #3D3D3D; - - } - - .tips { - display: flex; - flex-wrap: nowrap; - align-items: center; - margin-left: auto; - font-size: 30rpx; - color: #3D3D3D; - - .icon-chakanxiangqing { - font-size: 30rpx; - color: #3D3D3D; - font-weight: 600; - } - } - - .nmtxt { - width: 100%; - margin-top: 22rpx; - display: flex; - flex-wrap: nowrap; - align-items: center; - justify-content: space-between; - - .left { - font-weight: 400; - font-size: 24rpx; - color: #3D3D3D; - - .tips { - display: flex; - flex-wrap: nowrap; - align-items: center; - margin-left: auto; - font-size: 30rpx; - color: #3D3D3D; - - .icon-chakanxiangqing { - font-size: 30rpx; - color: #3D3D3D; - font-weight: 600; - } - } - } - - .right { - font-weight: 400; - font-size: 24rpx; - color: #3D3D3D; - } - - // .text-ellipsis { - // display: -webkit-box; - // -webkit-line-clamp: 3; - // -webkit-box-orient: vertical; - // overflow: hidden; - // text-overflow: ellipsis; - // word-break: break-all; - // // height: 72rpx; /* Adjust the height based on font size and line height */ - // } - .red { - font-weight: 400; - font-size: 36rpx; - color: #FF4444; - } - } - - .tip { - margin-top: 14rpx; - font-weight: 400; - font-size: 20rpx; - color: #808080; - } - } - - .act1 { - border: 2rpx solid #4C97E7; - } + font-size: 28rpx; + color: #FFFFFF; + } + + .tit { + padding: 18rpx 0 0 18rpx; + width: 350rpx; + display: flex; + align-items: center; + font-weight: 500; + font-size: 36rpx; + color: #3D3D3D; + } + + .nmtxt { + + width: 100%; + margin-top: 22rpx; + display: flex; + justify-content: space-between; + align-items: center; + + .left { + font-weight: 400; + font-size: 28rpx; + color: #3D3D3D; + } + + .right { + font-weight: 400; + font-size: 28rpx; + color: #3D3D3D; + } + + .red { + font-weight: 400; + font-size: 36rpx; + color: #FF4444; + } + } + + .tip { + margin-top: 14rpx; + font-weight: 400; + font-size: 20rpx; + color: #808080; + } + + .tips { + display: flex; + align-items: center; + margin-left: auto; + font-size: 30rpx; + color: #3D3D3D; + + .icon-chakanxiangqing { + font-size: 30rpx; + color: #3D3D3D; + font-weight: 600; + } + } + } + + .act1 { + border: 2rpx solid #4C97E7; + } } + .bot { display: flex; align-items: center; @@ -2757,7 +2909,7 @@ background: #FFFFFF; box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08); border-radius: 16rpx 16rpx 16rpx 16rpx; - margin-right: 12rpx; + margin-right: 10rpx; image { margin-top: 18rpx; diff --git a/pages/login/login.vue b/pages/login/login.vue index e59f512..e590d0b 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -80,7 +80,13 @@ // uni.switchTab({ // url: '/pages/index/index' // }) - } + }else{ + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } }); }) diff --git a/pages/my.vue b/pages/my.vue index 13f49ce..97ec095 100644 --- a/pages/my.vue +++ b/pages/my.vue @@ -24,7 +24,7 @@ <view class="text"> 押金 </view> - <view class="tip" v-if="info.bindDeviceNum==null"> + <view class="tip" v-if="info.balance==null"> 未充值 </view> </view> @@ -68,7 +68,7 @@ </view> </view> - <view class="card_li" style="border-bottom:2rpx solid #fff ;" @click="topage(5)"> + <!-- <view class="card_li" style="border-bottom:2rpx solid #fff ;" @click="topage(5)"> <view class="card_left"> <image src="https://api.ccttiot.com/smartmeter/img/static/uJFhEFoioikjCQqqWW3c" mode=""></image> <view class="text"> @@ -79,7 +79,7 @@ <view class="iconfont icon-xiangyou1" > </view> - </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> diff --git a/pages_admin/order/order_detail.vue b/pages_admin/order/order_detail.vue index 0a01767..ab3b9fb 100644 --- a/pages_admin/order/order_detail.vue +++ b/pages_admin/order/order_detail.vue @@ -49,7 +49,7 @@ 车辆编号:<span>{{orderInfo.device.areaName}}</span> </view> --> <view class="half_infoli"> - 运营区域:<span>{{orderInfo.device.areaName}}</span> + 运营区域:<span>{{orderInfo.area}}</span> </view> </view> </view> @@ -139,7 +139,7 @@ </view> <view class="lines"></view> - <view class="cont" v-if="orderInfo.etRefund!=''"> + <view class="cont" v-if="orderInfo.etRefund"> <view class="info_li"> @@ -183,8 +183,8 @@ bgc: { backgroundColor: "#F7FAFE", }, - latitude: 39.916527, - longitude: 116.397128, + latitude: 0, + longitude: 0, isMap: false, zoomSize: 15, markers: [], @@ -355,8 +355,8 @@ // 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构 this.orderInfo=res.data this.loading=true - this.latitude= parseFloat(this.orderInfo.device.latitude) - this.longitude= parseFloat(this.orderInfo.device.longitude ) + this.latitude= parseFloat(this.orderInfo.latitude) + this.longitude= parseFloat(this.orderInfo.longitude ) this.polyline[0].points = JSON.parse(res.data.tripRouteStr).map(coord => ({ latitude: coord[1], longitude: coord[0]