This commit is contained in:
Sliverber 2024-07-01 20:57:18 +08:00
parent e166cdcbfe
commit a65b8312e1
9 changed files with 667 additions and 387 deletions

View File

@ -19,13 +19,13 @@ const install = (Vue, vm) => {
// },
// });
uni.setStorageSync('deptId', 100);
uni.setStorageSync('deptId', 101);
Vue.prototype.$u.http.setConfig({
// baseUrl: 'http://61.174.243.28:15861',
// baseUrl: 'http://192.168.2.14:8080',
// baseUrl: 'http://124.221.246.124:2289',
// baseUrl: 'https://dianche.chuantewulian.cn/prod-api',
baseUrl: 'https://dche.ccttiot.com/prod-api',
baseUrl: 'https://dianche.chuantewulian.cn/prod-api',
// baseUrl: 'https://dche.ccttiot.com/prod-api',
loadingText: '努力加载中~',
// loadingTime: 2000,
// 设置自定义头部content-type

View File

@ -51,7 +51,7 @@
/* */
"mp-weixin" : {
"libVersion" : "latest",
"appid" : "wx3428c498d5061192",
"appid" : "wx4d178f8c80348214",
"setting" : {
"urlCheck" : false
},

View File

@ -24,11 +24,52 @@
<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
<view class="btn" @click="callPhone">
<view class="btn" @click="isbackcar=true">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uEM1RpP3J0K51qTjtnA5" mode=""></image>
电话咨询{{areaInfo.servicePhone}}
电话咨询
</view>
<u-mask :show="isbackcar" :z-index='100' duration='0' @click="isbackcar = false" />
<view class="pops" v-if="isbackcar">
<view class="tits" style="font-weight: 600;text-align: center;display: flex;justify-content: center;">
联系电话
</view>
<view class="cont_box" >
<view class="pohone_li" v-if="areaInfo.serviceName1!=''&&areaInfo.serviceName1&&areaInfo.servicePhone1!=''&&areaInfo.servicePhone1" @click="callPhone(areaInfo.servicePhone1)">
<view class="name">
{{areaInfo.serviceName1}}
</view>
<view class="pohone">
{{areaInfo.servicePhone1}}
</view>
</view>
<view class="pohone_li" v-if="areaInfo.serviceName2!=''&&areaInfo.serviceName2&&areaInfo.servicePhone2!=''&&areaInfo.servicePhone2" @click="callPhone(areaInfo.servicePhone2)">
<view class="name">
{{areaInfo.serviceName2}}
</view>
<view class="pohone">
{{areaInfo.servicePhone2}}
</view>
</view>
<view class="pohone_li" v-if="areaInfo.serviceName3!=''&&areaInfo.serviceName3&&areaInfo.servicePhone3!=''&&areaInfo.servicePhone3" @click="callPhone(areaInfo.servicePhone3)">
<view class="name">
{{areaInfo.serviceName3}}
</view>
<view class="pohone">
{{areaInfo.servicePhone3}}
</view>
</view>
</view>
<view class="btn_box">
<view class="btn1" @click="isbackcar = false">
取消
</view>
<!-- <view class="btn2" @click="backDevice()">
确定
</view> -->
</view>
</view>
</view>
</template>
@ -42,7 +83,8 @@
areaInfo: {},
tabindex:0,
classlist:[],
wordlist:[]
wordlist:[],
isbackcar:false
}
},
onShow() {
@ -121,7 +163,8 @@
if (res.code == 200) {
this.areaInfo = res.data
// this.areaInfo.serviceName1=''
// this.areaInfo.servicePhone1='17795402553'
} else {
// uni.showToast({
// title: res.msg,
@ -177,9 +220,10 @@
}
});
},
callPhone(){
callPhone(phone){
this.isbackcar=false
uni.makePhoneCall({
phoneNumber:this.areaInfo.servicePhone
phoneNumber:phone
})
}
}
@ -193,6 +237,190 @@
.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;
}
}
.loading_box {
width: 100%;
// height: 200rpx;
display: flex;
align-items: center;
justify-content: center;
image {
width: 336rpx;
height: 154rpx;
}
// .loader {
// width: 120rpx;
// aspect-ratio: 1;
// border-radius: 50%;
// clip-path: inset(-360rpx); /* 4 */
// box-shadow: -240rpx 60rpx, -240rpx 60rpx, -240rpx 60rpx; /* 4 */
// transform: translateY(-60rpx); /* 4 */
// animation: l19 1s infinite linear;
// }
// @keyframes l19 {
// 16.67% {box-shadow:-240rpx 60rpx,-240rpx 60rpx, 76rpx 60rpx} /* 4 */
// 33.33% {box-shadow:-240rpx 60rpx, 0px 60rpx, 76rpx 60rpx} /* 4 */
// 40%,60%{box-shadow: -76rpx 60rpx, 0px 60rpx, 76rpx 60rpx} /* 4 */
// 66.67% {box-shadow: -76rpx 60rpx, 0px 60rpx, 240rpx 60rpx} /* 4 */
// 83.33% {box-shadow: -76rpx 60rpx, 240rpx 60rpx,240rpx 60rpx} /* 4 */
// 100% {box-shadow: 240rpx 60rpx, 240rpx 60rpx,240rpx 60rpx} /* 4 */
// }
}
.btn_box {
margin-top: 80rpx;
display: flex;
align-items: center;
justify-content: center;
.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: 500rpx;
overflow-x: hidden;
overflow-y: auto;
}
.tits {
// 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: wrap;
align-items: center;
justify-content: center;
.pohone_li{
margin-top: 10rpx;
display: flex;
flex-wrap: nowrap;
.name{
font-weight: 500;
font-size: 36rpx;
color: #3D3D3D;
margin-bottom: 54rpx;
}
.pohone{
margin-left: 20rpx;
font-weight: 500;
font-size: 36rpx;
color: #3D3D3D;
margin-bottom: 54rpx;
}
}
}
.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;
}
.act1 {
background-color: #ccc;
}
}
.backimg{
position: fixed;
width: 750rpx;

View File

@ -61,7 +61,7 @@
content = content.replace(/<img([^>]*)>/g, (match, group1) => {
//
let cleanedGroup = group1.replace(/\s*\/$/, '');
return `<img ${cleanedGroup} style="width: 350rpx; height: auto;" />`;
return `<img style="width: 85vw ; height: auto;" ${cleanedGroup} />`;
});
return content;

View File

@ -2,36 +2,8 @@
<view class="page">
<u-navbar title="用车指南" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='45'></u-navbar>
<view class="cont">
<view class="tit">
请在运营区内骑行否则将断电
</view>
<view class="txt">
地图上 <span style="color: #4C97E7;">蓝色区域</span>即为运营区
</view>
<view class="txt">
1.在运营区外骑行时车辆可能断电
</view>
<view class="txt">
2.在运营区外还车时车辆无法及时维修将额外收
取调度费
</view>
<view class="img">
<image src="https://api.ccttiot.com/smartmeter/img/static/unYY6S6EsKRM0AMI2AER" mode=""></image>
</view>
<view class="tit" style="margin-top: 58rpx;">
提前确认目的地是否有还车P点
</view>
<view class="txt">
地图上 <span style="color: #34C24D ;">绿色区域</span>标有P即为还车P点
</view>
<view class="txt">
请在P点内关锁还车否则将在骑行费用以外额外 收取调度费
</view>
<view class="img">
<image src="https://api.ccttiot.com/smartmeter/img/static/udVueXhudGgkoyD3tszY" mode=""></image>
</view>
</view>
<view class="cont" v-html="content"></view>
</view>
</template>
@ -43,10 +15,61 @@
bgc: {
backgroundColor: "#fff",
},
content: ''
}
},
onLoad() {
this.getword()
},
methods: {
// getclass() {
// this.$u.get("/app/classify/list?&parentId=111?&classifyId=114" ).then((res) => {
// if (res.code == 200) {
// this.classlist = res.data
// let id =this.classlist[0].classifyId
// this.getword(id)
// } else {
// // uni.showToast({
// // title: res.msg,
// // icon: 'none',
// // duration: 2000
// // });
// }
// });
// },
getword() {
this.$u.get("/app/article/list?classifyId=" + 100).then((res) => {
if (res.code == 200) {
let abb = res.rows.find(item => item.articleId == 19);
this.content = abb.content
this.content = this.replaceImgWithImage(this.content)
} else {
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
}
});
},
replaceImgWithImage(content) {
// &nbsp; \u00A0
content = content.replace(/&nbsp;/g, '\u00A0');
// <img>
content = content.replace(/<img([^>]*)>/g, (match, group1) => {
//
let cleanedGroup = group1.replace(/\s*\/$/, '');
return `<img style="width: 85vw ; height: auto;" ${cleanedGroup} />`;
});
return content;
}
}
}
</script>
@ -55,44 +78,17 @@
page {
background-color: #fff;
}
.page {
width: 750rpx;
padding-bottom: 100rpx;
.cont {
margin-top: 34rpx;
margin: 0 auto;
width: 634rpx;
.tit{
margin-bottom: 32rpx;
width: 610rpx;
height: 88rpx;
display: flex;
align-items: center;
// justify-content: center;
padding-left: 30rpx;
background: linear-gradient( 90deg, #91C4FA 0%, rgba(243,243,243,0) 100%);
border-radius: 12rpx 12rpx 12rpx 12rpx;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 500;
font-size: 32rpx;
color: #3D3D3D;
line-height: 44rpx;
}
.txt{
margin-top: 16rpx;
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
line-height: 38rpx;
}
.img{
margin-top: 38rpx;
width: 634rpx;
height: 348rpx;
image{
width: 634rpx;
height: 348rpx;
}
}
}
}
</style>

View File

@ -364,6 +364,15 @@
"enablePullDownRefresh" : false,
"navigationStyle": "custom"
}
},
{
"path" : "bulelink",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false,
"navigationStyle": "custom"
}
}
// userpages ...

View File

@ -1,7 +1,13 @@
<template>
<view class="page">
<view class="tab_top">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uVcMTydm81zCMhHomXl1" mode="" @click="topage(6)">
<!-- 自定义导航栏 -->
<view class="navBarBox">
<!-- 状态栏占位 -->
<view class="statusBar" :style="{ paddingTop:statusBarHeight+'px' }"></view>
<!-- 真正的导航栏内容 -->
<view class="navBar" :style="{ height:navBarHeight+'px' }">
<!-- <view>导航栏标题</view> -->
<image src="https://lxnapi.ccttiot.com/bike/img/static/uVcMTydm81zCMhHomXl1" mode="" @tap="topage(6)">
</image>
<view class="txts" v-if="gps.deptId==100">
创享电动车
@ -11,6 +17,9 @@
嵛你出行
</view>
</view>
</view>
<!-- <u-navbar :is-back="false" title="共享电动车" :border-bottom="false" :background="bgc" title-color='#2E4975'
title-size='36' height='36'></u-navbar> -->
<map class="map" id="map" ref="map" :scale="zoomSize" show-location v-if="showmap" :latitude="latitude"
@ -667,7 +676,9 @@
</view>
</view>
<view class="masktips" style="width: 100%;">
未在停车点需支付管理费 <span style="color: coral;font-size: 42rpx;font-weight: 600;">{{areaInfo.vehicleManagementFee}}</span> <!-- 你可查看最近 停车点 -->
未在停车点需支付管理费 <span
style="color: coral;font-size: 42rpx;font-weight: 600;">{{areaInfo.vehicleManagementFee}}</span>
<!-- 你可查看最近 停车点 -->
</view>
<view class="tipsimg">
<image src="https://lxnapi.ccttiot.com/bike/img/static/ur95KSdL2SBEojQHzyEv" mode=""></image>
@ -902,7 +913,10 @@
buleback: false,
bulepayback: false,
bulebindcar: false,
backfalse:0
backfalse: 0,
statusBarHeight: 0,
//
navBarHeight: 0,
}
},
watch: {
@ -915,8 +929,23 @@
},
onLoad(e) {
//
this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
// #ifdef MP-WEIXIN
// width,height,top,right,left,bottom
const custom = wx.getMenuButtonBoundingClientRect()
// () = + ( - ) * 2
this.navBarHeight = custom.height + (custom.top - this.statusBarHeight) * 2
// #endif
this.gps.deptId = uni.getStorageSync('deptId');
console.log(e, 'eeeeeeeeeeeeeeeeeee');
if (e.q) {
this.qParam = e.q
@ -1177,9 +1206,9 @@
methods: {
totxtpage() {
this.seeDetail = true
// uni.navigateTo({
// url:
// })
uni.navigateTo({
url:'/page_user/bulelink'
})
},
offopencar() {
this.bulebindcar = true
@ -1433,16 +1462,19 @@
if (res.code == 200) {
// let parkingReturn = true
// let isInParkingArea = false
let parkingReturn = res.data.parkingReturn /** 强制停车点还车 true:开启false:关闭*/
let parkingReturn = res.data
.parkingReturn /** 强制停车点还车 true:开启false:关闭*/
let isInParkingArea = res.data.isInParkingArea /** 是否在停车区内*/
if (parkingReturn) {
//
if (isInParkingArea) {
//
if (that.OrderdeviceInfos.onlineStatus == 1&&that.backfalse<1) {
if (that.OrderdeviceInfos.onlineStatus == 1 && that.backfalse <
1) {
// 线
that.backDevice()
} else if(that.OrderdeviceInfos.onlineStatus == 0||that.backfalse>=1) {
} else if (that.OrderdeviceInfos.onlineStatus == 0 || that
.backfalse >= 1) {
if (that.carstause) {
that.$u.post(
@ -1485,10 +1517,12 @@
} else {
if (isInParkingArea) {
//
if (that.OrderdeviceInfos.onlineStatus == 1&&that.backfalse<1) {
if (that.OrderdeviceInfos.onlineStatus == 1 && that.backfalse <
1) {
// 线
that.backDevice()
}else if(that.OrderdeviceInfos.onlineStatus == 0||that.backfalse>=1) {
} else if (that.OrderdeviceInfos.onlineStatus == 0 || that
.backfalse >= 1) {
if (that.carstause) {
that.$u.post(
@ -2556,7 +2590,8 @@
// setTimeout(() => {
// this.maskloading = false
// }, 700)
if(this.buleback==false&&this.buleopen==false&&this.buleclose==false&&this.bulebindcar==false){
if (this.buleback == false && this.buleopen == false && this.buleclose == false && this
.bulebindcar == false) {
if (this.buletxt == '蓝牙连接中') {
this.buletxt = '蓝牙连接成功!'
}
@ -4093,7 +4128,8 @@
width: 20,
height: 29,
iconPath: item.type == 1 ?
'https://lxnapi.ccttiot.com/bike/img/static/up2xXqAgwCX5iER600k3' : item
'https://lxnapi.ccttiot.com/bike/img/static/up2xXqAgwCX5iER600k3' :
item
.type == 2 ?
'https://lxnapi.ccttiot.com/bike/img/static/u53BAQcFIX3vxsCzEZ7t' :
'https://lxnapi.ccttiot.com/bike/img/static/uDNY5Q4zOiZTCBTA2Jdq',
@ -4409,6 +4445,7 @@
url: '/page_user/gzsb'
})
} else if (num == 6) {
console.log('点击了');
uni.navigateTo({
url: '/pages/my'
})
@ -4829,37 +4866,43 @@
}
.tab_top {
.navBarBox {
position: fixed;
top: 0rpx;
left: 0;
width: 750rpx;
height: 250rpx;
z-index: 1;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
z-index: 10;
.navBar {
width: 100vw;
// padding-top: 85rpx;
display: flex;
padding-top: 104rpx;
flex-direction: row;
justify-content: center;
align-items: center;
// align-items: center;
// justify-content: center;
image {
position: absolute;
top: 100rpx;
left: 30rpx;
margin-left: 20rpx;
// position: absolute;
width: 60rpx;
height: 60rpx;
z-index: 11;
}
.txts {
margin-left: -80rpx;
width: 100%;
// position: absolute;
z-index: 10;
text-align: center;
font-weight: 500;
font-size: 36rpx;
color: #3D3D3D;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
}
}
}
.my-location {

View File

@ -113,8 +113,8 @@
confirm(e){
// console.log(e);
uni.setStorageSync('adminAreaid', e[0].value);
this.areaId= e[0].value
this.getArea()
},
getArea() {

View File

@ -610,7 +610,7 @@
'isStart': true
});
}
}, 2000)
}, 5000)
}
@ -743,6 +743,10 @@
if (res.code === 200) {
this.deviceInfos = res.data
this.mac = res.data.mac
// this.deviceInfos.onlineStatus=0
if(this.deviceInfos.onlineStatus==0){
this.Binddevice()
}
this.latitude = parseFloat(this.deviceInfos.latitude)
this.longitude = parseFloat(this.deviceInfos.longitude)
this.getArea()