diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index c8c80c1..ac555e4 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -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
diff --git a/manifest.json b/manifest.json
index cad1f86..8d15cb5 100644
--- a/manifest.json
+++ b/manifest.json
@@ -51,7 +51,7 @@
/* 小程序特有相关 */
"mp-weixin" : {
"libVersion" : "latest",
- "appid" : "wx3428c498d5061192",
+ "appid" : "wx4d178f8c80348214",
"setting" : {
"urlCheck" : false
},
diff --git a/page_user/khfw/khfw.vue b/page_user/khfw/khfw.vue
index 8a88aec..2060ea0 100644
--- a/page_user/khfw/khfw.vue
+++ b/page_user/khfw/khfw.vue
@@ -24,11 +24,52 @@
-
+
- 电话咨询:{{areaInfo.servicePhone}}
+ 电话咨询
+
+
+
+ 联系电话
+
+
+
+
+ {{areaInfo.serviceName1}}
+
+
+ {{areaInfo.servicePhone1}}
+
+
+
+
+ {{areaInfo.serviceName2}}
+
+
+ {{areaInfo.servicePhone2}}
+
+
+
+
+ {{areaInfo.serviceName3}}
+
+
+ {{areaInfo.servicePhone3}}
+
+
+
+
+
+ 取消
+
+
+
+
+
@@ -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;
diff --git a/page_user/word.vue b/page_user/word.vue
index b3f7922..e55ed8e 100644
--- a/page_user/word.vue
+++ b/page_user/word.vue
@@ -61,7 +61,7 @@
content = content.replace(/
]*)>/g, (match, group1) => {
// 查找并移除可能存在的尾部斜杠
let cleanedGroup = group1.replace(/\s*\/$/, '');
- return `
`;
+ return `
`;
});
return content;
@@ -80,7 +80,7 @@
width: 750rpx;
.cont {
- margin-top: 34rpx;
+ margin-top: 34rpx ;
margin: 0 auto;
width: 634rpx;
diff --git a/page_user/yczn.vue b/page_user/yczn.vue
index 6ea34d5..8b4ce6a 100644
--- a/page_user/yczn.vue
+++ b/page_user/yczn.vue
@@ -2,37 +2,9 @@
-
-
- 请在运营区内骑行,否则将断电
-
-
- 地图上 蓝色区域即为运营区
-
-
- 1.在运营区外骑行时,车辆可能断电
-
-
- 2.在运营区外还车时,车辆无法及时维修,将额外收
- 取调度费
-
-
-
-
-
- 提前确认目的地是否有“还车P点”
-
-
- 地图上 绿色区域标有“P”即为还车P点
-
-
- 请在P点内关锁还车,否则将在骑行费用以外,额外 收取调度费
-
-
-
-
-
-
+
+
+
@@ -43,56 +15,80 @@
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) {
+ // 替换所有的 为 \u00A0
+ content = content.replace(/ /g, '\u00A0');
+
+ // 替换
标签的宽度和高度样式
+ content = content.replace(/
]*)>/g, (match, group1) => {
+ // 查找并移除可能存在的尾部斜杠
+ let cleanedGroup = group1.replace(/\s*\/$/, '');
+ return `
`;
+ });
+
+ return content;
+ }
}
}
-
+
+ .page {
+ width: 750rpx;
+ padding-bottom: 100rpx;
+ .cont {
+
+ margin-top: 34rpx;
+ margin: 0 auto;
+ width: 634rpx;
+
+ }
+
+ }
+
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 6071900..8ee8453 100644
--- a/pages.json
+++ b/pages.json
@@ -364,6 +364,15 @@
"enablePullDownRefresh" : false,
"navigationStyle": "custom"
}
+ },
+ {
+ "path" : "bulelink",
+ "style" :
+ {
+ "navigationBarTitleText" : "",
+ "enablePullDownRefresh" : false,
+ "navigationStyle": "custom"
+ }
}
// 其他 userpages 目录下的页面...
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 6daed64..501f62f 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,16 +1,25 @@
-
-
-
-
- 创享电动车
-
-
-
- 嵛你出行
+
+
+
+
+
+
+
+
+
+
+ 创享电动车
+
+
+
+ 嵛你出行
+
+
+
- 未在停车点需支付管理费: {{areaInfo.vehicleManagementFee}}元
+ 未在停车点需支付管理费: {{areaInfo.vehicleManagementFee}}元
+
@@ -692,7 +703,7 @@
需连接蓝牙才可解锁,请确保手机蓝牙打开并且授权小程序使用蓝牙权限
-
点击查看教程
@@ -896,13 +907,16 @@
maskepage: 0,
backgps: {},
buletxt: '',
-
- buleclose:false,
- buleopen:false,
- buleback:false,
- bulepayback:false,
- bulebindcar:false,
- backfalse:0
+
+ buleclose: false,
+ buleopen: false,
+ buleback: false,
+ bulepayback: false,
+ bulebindcar: false,
+ 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
@@ -967,10 +996,10 @@
if (this.OrderdeviceInfos.onlineStatus != res.data.onlineStatus) {
this.OrderdeviceInfos = res.data
// this.OrderdeviceInfos.onlineStatus ='0'
-
+
// if (this.OrderdeviceInfos.onlineStatus == 0 && this.orderinfo.status !=
// 3) {
-
+
// if (this.carstause == false) {
// this.isnoline = true
@@ -991,40 +1020,40 @@
}, 3000); // 每秒执行一次
// 检查蓝牙权限状态
uni.getBluetoothAdapterState({
- success: function (res) {
- if (!res.available) {
- console.log('蓝牙不可用');
- return;
- }
- if (!res.discovering) {
- console.log('蓝牙正在搜索中');
- // 实际业务中可能需要根据需求处理
- }
- if (res.authorized) {
- console.log('已授权');
- // 已授权,可以进行蓝牙操作
- } else if (res.authorizing) {
- console.log('正在授权');
- // 正在请求授权
- } else {
- console.log('未授权');
- // 未授权,需要请求授权
- uni.authorize({
- scope: 'scope.bluetooth',
- success() {
- console.log('授权成功');
- // 授权成功,可以进行蓝牙操作
- },
- fail() {
- console.log('授权失败');
- // 用户拒绝授权或者授权失败
- }
- });
- }
- },
- fail: function (err) {
- console.log('获取蓝牙状态失败', err);
- }
+ success: function(res) {
+ if (!res.available) {
+ console.log('蓝牙不可用');
+ return;
+ }
+ if (!res.discovering) {
+ console.log('蓝牙正在搜索中');
+ // 实际业务中可能需要根据需求处理
+ }
+ if (res.authorized) {
+ console.log('已授权');
+ // 已授权,可以进行蓝牙操作
+ } else if (res.authorizing) {
+ console.log('正在授权');
+ // 正在请求授权
+ } else {
+ console.log('未授权');
+ // 未授权,需要请求授权
+ uni.authorize({
+ scope: 'scope.bluetooth',
+ success() {
+ console.log('授权成功');
+ // 授权成功,可以进行蓝牙操作
+ },
+ fail() {
+ console.log('授权失败');
+ // 用户拒绝授权或者授权失败
+ }
+ });
+ }
+ },
+ fail: function(err) {
+ console.log('获取蓝牙状态失败', err);
+ }
});
if (this.seeDetail == false) {
@@ -1175,32 +1204,32 @@
},
},
methods: {
- totxtpage(){
- this.seeDetail=true
- // uni.navigateTo({
- // url:
- // })
+ totxtpage() {
+ this.seeDetail = true
+ uni.navigateTo({
+ url:'/page_user/bulelink'
+ })
},
- offopencar(){
- this.bulebindcar=true
+ offopencar() {
+ this.bulebindcar = true
this.Binddevice()
},
bluesub1() {
// uni.showLoading({});
-
+
let data = {
userId: this.userId,
sn: this.sn,
ruleId: this.freeInfo.ruleId,
mark: "确认开锁",
type: '1',
- isBluetooth:true,
- lon:this.backgps.longitude,
- lat:this.backgps.latitude
-
+ isBluetooth: true,
+ lon: this.backgps.longitude,
+ lat: this.backgps.latitude
+
};
-
- if(this.carstause){
+
+ if (this.carstause) {
this.$u.post('/appVerify/device/snSwitch', data).then((res) => {
// uni.hideLoading();
this.seeDetail = false;
@@ -1219,9 +1248,9 @@
// this.maskloading = false;
this.maskepage = 6
// this.showYjTip = true;
- } else if(res.msg=='【扫码/编号开锁骑行】发送开锁命令失败'){
- this.maskepage=3
- } else{
+ } else if (res.msg == '【扫码/编号开锁骑行】发送开锁命令失败') {
+ this.maskepage = 3
+ } else {
// uni.showToast({
// title: res.msg,
// icon: 'none',
@@ -1230,16 +1259,16 @@
this.toploadtxt = '开锁失败';
setTimeout(() => {
this.maskloading = false;
-
+
}, 800);
}
}
});
- }else{
- this.bulebindcar=true
+ } else {
+ this.bulebindcar = true
this.Binddevice()
}
-
+
},
taploadmask(num) {
this.maskepage = 0
@@ -1339,7 +1368,7 @@
console.log('获取蓝牙状态失败')
}
})
- this.devicesList=[]
+ this.devicesList = []
this.maskepage = 4
this.buletxt = '蓝牙连接中'
// uni.showLoading({
@@ -1433,16 +1462,19 @@
if (res.code == 200) {
// let parkingReturn = true
// let isInParkingArea = false
- let parkingReturn = res.data.parkingReturn /** 强制停车点还车 true:开启,false:关闭*/
- let isInParkingArea = res.data.isInParkingArea /** 是否在停车区内*/
+ 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(
@@ -1470,13 +1502,13 @@
setTimeout(() => {
that.maskloading = false;
}, 1000);
-
+
}
})
} else {
- that.buleback=true
+ that.buleback = true
that.Binddevice()
-
+
}
}
} else {
@@ -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(
@@ -1521,7 +1555,7 @@
}
})
} else {
- that.buleback=true
+ that.buleback = true
that.Binddevice()
// that.isbackdevice = false
// that.isnoline = true
@@ -1593,8 +1627,8 @@
})
},
payback() {
- console.log(this.OrderdeviceInfos.onlineStatus,'this.OrderdeviceInfosthis.OrderdeviceInfos');
- if (this.OrderdeviceInfos.onlineStatus == 1&&this.backfalse<1) {
+ console.log(this.OrderdeviceInfos.onlineStatus, 'this.OrderdeviceInfosthis.OrderdeviceInfos');
+ if (this.OrderdeviceInfos.onlineStatus == 1 && this.backfalse < 1) {
// 设备未离线
console.log('在线还车');
this.maskepage = 0
@@ -1613,7 +1647,7 @@
this.backDevice()
}, 2100);
- } else if(this.OrderdeviceInfos.onlineStatus == 0||this.backfalse>=1) {
+ } else if (this.OrderdeviceInfos.onlineStatus == 0 || this.backfalse >= 1) {
console.log('离线还车');
this.maskepage = 0
this.maskloading = true;
@@ -1628,7 +1662,7 @@
}
}, 20); // 每40毫秒更新一次,可以调整
setTimeout(() => {
- if (this.carstause==true) {
+ if (this.carstause == true) {
this.$u.post('/appVerify/device/return?returnType=1&orderNo=' + this.orderinfo
.orderNo + '&isBluetooth=true' + '&lon=' + this.backgps.longitude +
@@ -1666,7 +1700,7 @@
}
})
} else {
- this.bulepayback=true
+ this.bulepayback = true
this.Binddevice()
// this.maskepage = 3
// that.isbackdevice = false
@@ -1675,13 +1709,13 @@
}, 1100);
}
-
+
},
backDevice() {
this.$u.post('/appVerify/device/return?returnType=1&orderNo=' + this.orderinfo.orderNo).then((
res) => {
-
+
if (res.code === 200) {
this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
this.toploadtxt = '还车成功!';
@@ -1692,7 +1726,7 @@
}, 800);
} else {
- this.backfalse=this.backfalse+1
+ this.backfalse = this.backfalse + 1
this.toploadtxt = '还车失败';
setTimeout(() => {
this.maskloading = false;
@@ -1892,10 +1926,10 @@
// this.maskloading = false;
this.maskepage = 6
// this.showYjTip = true;
- } else if(res.msg=='【扫码/编号开锁骑行】发送开锁命令失败'){
+ } else if (res.msg == '【扫码/编号开锁骑行】发送开锁命令失败') {
// this.maskepage=3
this.offopencar()
- } else{
+ } else {
// uni.showToast({
// title: res.msg,
// icon: 'none',
@@ -1904,7 +1938,7 @@
this.toploadtxt = '开锁失败';
setTimeout(() => {
this.maskloading = false;
-
+
}, 800);
}
}
@@ -2211,7 +2245,7 @@
});
},
unloackdevices() {
- if (this.OrderdeviceInfos.onlineStatus == 1&&this.backfalse<1) {
+ if (this.OrderdeviceInfos.onlineStatus == 1 && this.backfalse < 1) {
// uni.showLoading({
// title: '加载中...'
// })
@@ -2223,27 +2257,27 @@
this.loadimg =
'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
this.toploadtxt = '开锁成功';
- this.buleopen=false
+ this.buleopen = false
setTimeout(() => {
this.maskloading = false;
this.getisInOrder();
}, 1000);
-
+
} else {
- this.backfalse=this.backfalse+1
+ this.backfalse = this.backfalse + 1
this.toploadtxt = '开锁失败';
setTimeout(() => {
this.maskloading = false;
}, 1000);
// if (res.msg == '10500-----') {
-
+
// uni.showToast({
// title: '系统异常,请重新尝试',
// icon: 'none',
// duration: 2000
// });
// } else {
-
+
// uni.showToast({
// title: res.msg,
// icon: 'none',
@@ -2253,7 +2287,7 @@
}
})
- } else if(this.OrderdeviceInfos.onlineStatus == 0||this.backfalse>=1) {
+ } else if (this.OrderdeviceInfos.onlineStatus == 0 || this.backfalse >= 1) {
if (this.carstause) {
@@ -2275,20 +2309,20 @@
if (res.code === 200) {
that.opencar()
- that.buleopen=false
+ that.buleopen = false
// console.log('发送了离线开锁请求');
// that.getisInOrder()
that.loadimg =
'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
that.buletxt = '解锁成功';
- that.toploadtxt='解锁成功'
+ that.toploadtxt = '解锁成功'
setTimeout(() => {
that.maskloading = false;
that.getisInOrder();
}, 1000);
} else {
-
- that.toploadtxt='开锁失败'
+
+ that.toploadtxt = '开锁失败'
that.buletxt = '开锁失败';
setTimeout(() => {
that.maskloading = false;
@@ -2325,7 +2359,7 @@
} else {
// this.maskepage = 3
- this.buleopen=true
+ this.buleopen = true
this.Binddevice()
}
@@ -2334,7 +2368,7 @@
},
// ;临时锁车
loackdevice() {
- if (this.OrderdeviceInfos.onlineStatus == 1&&this.backfalse<1) {
+ if (this.OrderdeviceInfos.onlineStatus == 1 && this.backfalse < 1) {
// uni.showLoading({
// title: '加载中...'
// })
@@ -2347,18 +2381,18 @@
this.loadimg =
'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
this.toploadtxt = '锁车成功';
- this.buleclose=false
+ this.buleclose = false
setTimeout(() => {
this.maskloading = false;
this.getisInOrder();
}, 1000);
} else {
- this.backfalse=this.backfalse+1
+ this.backfalse = this.backfalse + 1
this.toploadtxt = '锁车失败';
setTimeout(() => {
this.maskloading = false;
}, 1000);
-
+
// if (res.msg == '10500-----') {
// uni.showToast({
// title: '系统异常,请重新尝试',
@@ -2375,7 +2409,7 @@
}
})
- } else if(this.OrderdeviceInfos.onlineStatus == 0||this.backfalse>=1) {
+ } else if (this.OrderdeviceInfos.onlineStatus == 0 || this.backfalse >= 1) {
if (this.carstause) {
@@ -2401,23 +2435,23 @@
that.closecar()
// console.log('发送了离线锁车请求');
// that.getisInOrder()
- that.buleclose=false
+ that.buleclose = false
that.loadimg =
'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
that.buletxt = '锁车成功';
- that.toploadtxt='锁车成功'
+ that.toploadtxt = '锁车成功'
setTimeout(() => {
that.maskloading = false;
that.getisInOrder();
}, 1000);
} else {
- that.toploadtxt='锁车失败'
+ that.toploadtxt = '锁车失败'
that.buletxt = '锁车失败';
setTimeout(() => {
that.maskloading = false;
}, 1000);
-
-
+
+
// if (res.msg == '10500-----') {
// uni.showToast({
// title: '系统异常,请重新尝试',
@@ -2448,7 +2482,7 @@
})
} else {
- this.buleclose=true
+ this.buleclose = true
this.Binddevice()
// this.maskepage = 3
}
@@ -2551,41 +2585,42 @@
if (options.data) {
this.carstause = true
-
+
if (this.maskloading && this.maskepage == 4) {
// setTimeout(() => {
// this.maskloading = false
// }, 700)
- if(this.buleback==false&&this.buleopen==false&&this.buleclose==false&&this.bulebindcar==false){
- if(this.buletxt=='蓝牙连接中'){
- this.buletxt = '蓝牙连接成功!'
+ if (this.buleback == false && this.buleopen == false && this.buleclose == false && this
+ .bulebindcar == false) {
+ if (this.buletxt == '蓝牙连接中') {
+ this.buletxt = '蓝牙连接成功!'
}
-
+
}
- if(this.buleclose){
- this.buleclose=false
+ if (this.buleclose) {
+ this.buleclose = false
this.loackdevice()
}
- if(this.buleopen){
- this.buleopen=false
+ if (this.buleopen) {
+ this.buleopen = false
this.unloackdevices()
}
- if(this.buleback){
- this.buleback=false
+ if (this.buleback) {
+ this.buleback = false
this.cheackgps()
}
- if(this.bulepayback){
- this.bulepayback=false
+ if (this.bulepayback) {
+ this.bulepayback = false
this.payback()
}
- if(this.bulebindcar){
- this.bulebindcar=false
+ if (this.bulebindcar) {
+ this.bulebindcar = false
this.bluesub1()
}
-
+
}
-
-
+
+
@@ -2784,7 +2819,7 @@
// this.OrderdeviceInfos.onlineStatus = '0'
this.mac = this.OrderdeviceInfos.mac
if (this.OrderdeviceInfos.onlineStatus == 0 && this.orderinfo.status != 3) {
-
+
if (this.carstause == false) {
// this.isnoline = true
@@ -3815,41 +3850,41 @@
},
-
+
getmarks() {
- let data = {
- areaId: this.areaInfo.areaId
- };
- if (this.areaInfo.areaId) {
- this.$u.get(`/app/allVehicleByArea`, data).then((res) => {
- if (res.code === 200 && res.data != '') {
- this.listData = res.data
- // this.listData[0].onlineStatus=0
- // this.listData = res.data.filter(item => item.onlineStatus != 0);
- const newDeviceMarkers = 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',
- isDeviceMarker: true // 区分为设备标记
- }));
-
- // 保留停车场标记
- const preservedMarkers = this.markers.filter(marker => marker.isParkingMarker);
-
- // 更新markers数组,避免删除已标识的重要标记
- this.markers = [...newDeviceMarkers, ...preservedMarkers];
- this.$set(this, 'markers', [...this.markers]);
-
- this.oldMarkers = [...this.markers];
- }
- }).catch(error => {
- console.error("Error fetching device data:", error);
- });
- }
+ let data = {
+ areaId: this.areaInfo.areaId
+ };
+ if (this.areaInfo.areaId) {
+ this.$u.get(`/app/allVehicleByArea`, data).then((res) => {
+ if (res.code === 200 && res.data != '') {
+ this.listData = res.data
+ // this.listData[0].onlineStatus=0
+ // this.listData = res.data.filter(item => item.onlineStatus != 0);
+ const newDeviceMarkers = 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',
+ isDeviceMarker: true // 区分为设备标记
+ }));
+
+ // 保留停车场标记
+ const preservedMarkers = this.markers.filter(marker => marker.isParkingMarker);
+
+ // 更新markers数组,避免删除已标识的重要标记
+ this.markers = [...newDeviceMarkers, ...preservedMarkers];
+ this.$set(this, 'markers', [...this.markers]);
+
+ this.oldMarkers = [...this.markers];
+ }
+ }).catch(error => {
+ console.error("Error fetching device data:", error);
+ });
+ }
},
isMarkersChanged(newMarkers) {
if (this.oldMarkers.length !== newMarkers.length) {
@@ -4024,103 +4059,104 @@
});
},
toggleIconAndCallout() {
- this.showIconAndCallout = !this.showIconAndCallout;
- this.markers = this.markers.map(marker => {
- if (this.showIconAndCallout) {
- // 显示气泡
- if (marker.isParkingMarker) {
- marker.callout.display = 'ALWAYS';
- marker.isCalloutVisible = true;
- }
- } else {
- // 隐藏气泡
- if (marker.isParkingMarker) {
- marker.callout.display = 'BYCLICK';
- marker.isCalloutVisible = false;
- }
- }
- return marker;
- });
- // 强制更新markers数组
- this.$set(this, 'markers', [...this.markers]);
+ this.showIconAndCallout = !this.showIconAndCallout;
+ this.markers = this.markers.map(marker => {
+ if (this.showIconAndCallout) {
+ // 显示气泡
+ if (marker.isParkingMarker) {
+ marker.callout.display = 'ALWAYS';
+ marker.isCalloutVisible = true;
+ }
+ } else {
+ // 隐藏气泡
+ if (marker.isParkingMarker) {
+ marker.callout.display = 'BYCLICK';
+ marker.isCalloutVisible = false;
+ }
+ }
+ return marker;
+ });
+ // 强制更新markers数组
+ this.$set(this, 'markers', [...this.markers]);
},
getParking() {
- // 发送请求获取数据
- let data = {
- areaId: this.areaInfo.areaId
- }
- this.$u.get('/app/parking/list?', data).then((res) => {
- if (res.code === 200) {
- // 处理接口返回的数据
- const type1Data = [];
- const type2Data = [];
- const type3Data = [];
-
- res.rows.forEach(row => {
- if (row.type == 1) {
- type1Data.push(row);
- } else if (row.type == 2) {
- type2Data.push(row);
- } else if (row.type == 3) {
- type3Data.push(row);
- }
- });
- const validBoundaries = type1Data.map(row => row.boundaryStr).filter(
- boundary =>
- typeof boundary === 'string' && boundary.trim() !== '');
- const polylines = this.convertBoundaryToPolylines(validBoundaries, 1);
-
- const validBoundaries1 = type2Data.map(row => row.boundaryStr).filter(
- boundary =>
- typeof boundary === 'string' && boundary.trim() !== '');
- const polylines1 = this.convertBoundaryToPolylines(validBoundaries1, 2);
-
- const validBoundaries2 = type3Data.map(row => row.boundaryStr).filter(
- boundary =>
- typeof boundary === 'string' && boundary.trim() !== '');
- const polylines2 = this.convertBoundaryToPolylines(validBoundaries2, 3);
- // 将处理后的数据添加到 this.polyline 中
- this.polyline = this.polyline.concat(polylines2);
- this.polyline = this.polyline.concat(polylines1);
- this.polyline = this.polyline.concat(polylines);
- this.parkingList = res.rows;
-
- // 设置停车场标记并区分
- const newParkingMarkers = res.rows.map(item => ({
- id: parseFloat(item.parkingId),
- latitude: parseFloat(item.latitude),
- longitude: parseFloat(item.longitude),
- width: 20,
- height: 29,
- iconPath: item.type == 1 ?
- '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',
- callout: {
- content: item.parkingName,
- color: '#ffffff',
- fontSize: 14,
- borderRadius: 10,
- bgColor: item.type == 1 ? '#3A7EDB' : item.type == 2 ?
- '#FFC107' : '#FF473E',
- padding: 6,
- display: 'BYCLICK' // 初始时不显示气泡
- },
- isCalloutVisible: false, // 初始时不显示气泡
- isParkingMarker: true // 区分为停车场标记
- }));
-
- // 保留设备标记
- const preservedMarkers = this.markers.filter(marker => marker.isDeviceMarker);
-
- // 合并停车场标记和设备标记
- this.markers = [...newParkingMarkers, ...preservedMarkers];
- this.$set(this, 'markers', [...this.markers]);
- }
- }).catch(error => {
- console.error("Error fetching parking data:", error);
- });
+ // 发送请求获取数据
+ let data = {
+ areaId: this.areaInfo.areaId
+ }
+ this.$u.get('/app/parking/list?', data).then((res) => {
+ if (res.code === 200) {
+ // 处理接口返回的数据
+ const type1Data = [];
+ const type2Data = [];
+ const type3Data = [];
+
+ res.rows.forEach(row => {
+ if (row.type == 1) {
+ type1Data.push(row);
+ } else if (row.type == 2) {
+ type2Data.push(row);
+ } else if (row.type == 3) {
+ type3Data.push(row);
+ }
+ });
+ const validBoundaries = type1Data.map(row => row.boundaryStr).filter(
+ boundary =>
+ typeof boundary === 'string' && boundary.trim() !== '');
+ const polylines = this.convertBoundaryToPolylines(validBoundaries, 1);
+
+ const validBoundaries1 = type2Data.map(row => row.boundaryStr).filter(
+ boundary =>
+ typeof boundary === 'string' && boundary.trim() !== '');
+ const polylines1 = this.convertBoundaryToPolylines(validBoundaries1, 2);
+
+ const validBoundaries2 = type3Data.map(row => row.boundaryStr).filter(
+ boundary =>
+ typeof boundary === 'string' && boundary.trim() !== '');
+ const polylines2 = this.convertBoundaryToPolylines(validBoundaries2, 3);
+ // 将处理后的数据添加到 this.polyline 中
+ this.polyline = this.polyline.concat(polylines2);
+ this.polyline = this.polyline.concat(polylines1);
+ this.polyline = this.polyline.concat(polylines);
+ this.parkingList = res.rows;
+
+ // 设置停车场标记并区分
+ const newParkingMarkers = res.rows.map(item => ({
+ id: parseFloat(item.parkingId),
+ latitude: parseFloat(item.latitude),
+ longitude: parseFloat(item.longitude),
+ width: 20,
+ height: 29,
+ iconPath: item.type == 1 ?
+ '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',
+ callout: {
+ content: item.parkingName,
+ color: '#ffffff',
+ fontSize: 14,
+ borderRadius: 10,
+ bgColor: item.type == 1 ? '#3A7EDB' : item.type == 2 ?
+ '#FFC107' : '#FF473E',
+ padding: 6,
+ display: 'BYCLICK' // 初始时不显示气泡
+ },
+ isCalloutVisible: false, // 初始时不显示气泡
+ isParkingMarker: true // 区分为停车场标记
+ }));
+
+ // 保留设备标记
+ const preservedMarkers = this.markers.filter(marker => marker.isDeviceMarker);
+
+ // 合并停车场标记和设备标记
+ this.markers = [...newParkingMarkers, ...preservedMarkers];
+ this.$set(this, 'markers', [...this.markers]);
+ }
+ }).catch(error => {
+ console.error("Error fetching parking data:", error);
+ });
},
convertBoundaryToPolyline(boundary) {
if (!boundary) return null;
@@ -4409,6 +4445,7 @@
url: '/page_user/gzsb'
})
} else if (num == 6) {
+ console.log('点击了');
uni.navigateTo({
url: '/pages/my'
})
@@ -4433,8 +4470,8 @@
this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
if (res.code === 200) {
this.deviceInfos = res.data;
- if(!this.orderinfo.sn){
- this.mac=res.data.mac
+ if (!this.orderinfo.sn) {
+ this.mac = res.data.mac
}
if (num == 0) {
this.showdevice = true;
@@ -4829,36 +4866,42 @@
}
- .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);
- display: flex;
- padding-top: 104rpx;
- // align-items: center;
- // justify-content: center;
+ z-index: 10;
- image {
- position: absolute;
- top: 100rpx;
- left: 30rpx;
- width: 60rpx;
- height: 60rpx;
- }
+ .navBar {
+ width: 100vw;
+ // padding-top: 85rpx;
- .txts {
- width: 100%;
- // position: absolute;
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ // align-items: center;
+ // justify-content: center;
+
+ image {
+ 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;
+ }
- text-align: center;
- font-weight: 500;
- font-size: 36rpx;
- color: #3D3D3D;
- font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
}
}
diff --git a/pages_admin/admin_worke.vue b/pages_admin/admin_worke.vue
index f5795e1..030d0e8 100644
--- a/pages_admin/admin_worke.vue
+++ b/pages_admin/admin_worke.vue
@@ -113,8 +113,8 @@
confirm(e){
// console.log(e);
uni.setStorageSync('adminAreaid', e[0].value);
-
-
+ this.areaId= e[0].value
+ this.getArea()
},
getArea() {
diff --git a/pages_admin/order/device_detail.vue b/pages_admin/order/device_detail.vue
index 9700666..c1b7f0f 100644
--- a/pages_admin/order/device_detail.vue
+++ b/pages_admin/order/device_detail.vue
@@ -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()