小鹿骑行
This commit is contained in:
parent
5e49fa4ef2
commit
c06f62d1eb
|
@ -1,7 +1,7 @@
|
|||
const install = (Vue, vm) => {
|
||||
uni.setStorageSync('deptId', 100);
|
||||
Vue.prototype.$u.http.setConfig({
|
||||
// baseUrl: 'http://192.168.2.76:4101', //键辉本地
|
||||
// baseUrl: 'http://192.168.2.65:4101', //键辉本地
|
||||
// baseUrl: 'http://192.168.0.102:4101', //景森本地
|
||||
baseUrl: 'https://ele.ccttiot.com/prod-api', //线上
|
||||
loadingText: '努力加载中~',
|
||||
|
|
|
@ -691,6 +691,8 @@
|
|||
this.$u.get(`/app/device/availableDetail?sn=${this.sn}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.bikeobj = res.data
|
||||
console.log(res.data,'020202');
|
||||
this.$u.put(`/app/user/bindArea?areaId=${res.data.areaId}`).then(resp =>{})
|
||||
// if (res.data.onlineStatus == 0) {
|
||||
// wx.openBluetoothAdapter({
|
||||
// success: function(res) {
|
||||
|
|
22
page_fenbao/webview.vue
Normal file
22
page_fenbao/webview.vue
Normal file
|
@ -0,0 +1,22 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<web-view :src="url"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url: ''
|
||||
}
|
||||
},
|
||||
onLoad(item) {
|
||||
this.url = decodeURIComponent(item.url)
|
||||
console.log(this.url)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
|
@ -121,7 +121,7 @@
|
|||
<view class="right_cont">
|
||||
<view class="right_top">
|
||||
<view class="right_top_right">
|
||||
牌:{{item.vehicleNum}}
|
||||
牌:{{item.vehicleNum == null ? '--' : item.vehicleNum}}
|
||||
</view>
|
||||
<view class="right_top_left">
|
||||
<image src=" https://lxnapi.ccttiot.com/bike/img/static/u9pggdTCxcZgUTNsEvXQ" mode=""
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<view class="pic_cont">
|
||||
<view class="img" v-for="(pic, idx) in parsePictures(item.picture)" :key="idx"
|
||||
@click="preview(pic, item)">
|
||||
<image :src="pic" mode="aspectFill"></image>
|
||||
<image style="border-radius: 20rpx;" :src="pic" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info_cont">
|
||||
|
@ -38,7 +38,7 @@
|
|||
<view class="btn1" v-if="item.appealStatus==1" @click="unpass(item,1)">
|
||||
处理
|
||||
</view>
|
||||
<view class="btn1" v-if="item.appealStatus==2" @click="unpass(item,1)">
|
||||
<view class="btn1" v-if="item.appealStatus==2" @click="btnwc(item)">
|
||||
维修完成
|
||||
</view>
|
||||
<view class="btn2" v-if="item.appealStatus==1" @click="unpass(item,0)">
|
||||
|
@ -85,14 +85,45 @@
|
|||
this.getlist()
|
||||
}
|
||||
},
|
||||
|
||||
// 点击完成
|
||||
btnwc(item){
|
||||
let data = {
|
||||
id:item.id,
|
||||
pass:true
|
||||
}
|
||||
this.$u.put('/bst/fault/complete', data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
this.pageNum = 1;
|
||||
this.list = []; // 清空当前列表
|
||||
this.getlist();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击处理和忽略
|
||||
unpass(item,num){
|
||||
let passflag = ''
|
||||
if(num == 0){
|
||||
passflag = false
|
||||
}else if(num == 1){
|
||||
passflag = true
|
||||
}
|
||||
uni.showLoading({
|
||||
title:'加载中...'
|
||||
})
|
||||
let data = {
|
||||
id:item.id,
|
||||
handle:num
|
||||
pass:passflag
|
||||
}
|
||||
this.$u.put('/bst/fault/handle', data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
|
@ -115,7 +146,7 @@
|
|||
},
|
||||
parsePictures(pictureString) {
|
||||
if (pictureString) {
|
||||
return pictureString.split(',');
|
||||
return pictureString.split(',')
|
||||
}
|
||||
return [];
|
||||
},
|
||||
|
@ -123,7 +154,7 @@
|
|||
uni.previewImage({
|
||||
current: pic, // 当前显示图片的链接
|
||||
urls: this.parsePictures(item.picture) // 需要预览的图片链接列表
|
||||
});
|
||||
})
|
||||
},
|
||||
getlist() {
|
||||
let data = {
|
||||
|
@ -140,21 +171,20 @@
|
|||
this.list = this.list.concat(res.rows)
|
||||
}
|
||||
this.pageNum ++
|
||||
// this.list = [...this.list, ...res.rows]; // 拼接新数据
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error("Error fetching area data:", error);
|
||||
});
|
||||
})
|
||||
},
|
||||
loadMore() {
|
||||
this.pageNum += 1; // 页码增加
|
||||
this.getlist(); // 调用getlist方法获取更多数据
|
||||
this.pageNum += 1 // 页码增加
|
||||
this.getlist() // 调用getlist方法获取更多数据
|
||||
},
|
||||
search() {
|
||||
clearTimeout(timerId1);
|
||||
|
@ -169,18 +199,16 @@
|
|||
todetail() {
|
||||
uni.navigateTo({
|
||||
url: '/pages_adminSet/shDetail'
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
width: 750rpx;
|
||||
}
|
||||
|
||||
.top_box {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
@ -193,12 +221,10 @@
|
|||
box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07);
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.cont {
|
||||
width: 100%;
|
||||
height: 88vh;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 24rpx;
|
||||
margin: 20rpx auto;
|
||||
|
@ -206,13 +232,11 @@
|
|||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07);
|
||||
border-radius: 10rpx;
|
||||
|
||||
.btn_cont {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-end;
|
||||
/* 添加此行使按钮靠右对齐 */
|
||||
|
||||
.btn1 {
|
||||
margin-right: 30rpx;
|
||||
font-weight: 400;
|
||||
|
@ -222,7 +246,6 @@
|
|||
background: #64B6A8;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
|
@ -231,9 +254,7 @@
|
|||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #64B6A8;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.tips {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
|
@ -242,70 +263,60 @@
|
|||
font-size: 28rpx;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.info_cont {
|
||||
margin-top: 22rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.sn {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #979797;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #979797;
|
||||
}
|
||||
}
|
||||
|
||||
.txt {
|
||||
margin-top: 24rpx;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.pic_cont {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
|
||||
.img {
|
||||
margin-top: 10rpx;
|
||||
background: #D8D8D8;
|
||||
width: 256rpx;
|
||||
height: 256rpx;
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.top {
|
||||
border-bottom: 1rpx solid #D8D8D8;
|
||||
padding-bottom: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.name {
|
||||
width: 100rpx;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.phone {
|
||||
// margin-left: 38rpx;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #979797;
|
||||
}
|
||||
|
||||
.type {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
|
|
|
@ -77,6 +77,9 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="width: 100%;text-align: center;color: #ccc;margin-top: 30rpx;">
|
||||
当前没有更多车辆咯...
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<view class="bot_box">
|
||||
|
|
|
@ -141,11 +141,11 @@
|
|||
</view>
|
||||
修改车型
|
||||
</view>
|
||||
<view class="dangeanniu" v-if="this.deviceInfos.hardwareVersion && this.deviceInfos.hardwareVersion.toLowerCase().includes('x')" @click="btnjingyin">
|
||||
<view class="dangeanniu" v-if="Number(deviceInfos.softwareVersion) > 6000" @click="btnjingyin">
|
||||
<view class="pic">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uUJGVRpPIRC34vF7240K" mode=""></image>
|
||||
</view>
|
||||
静音:{{jytxt}}
|
||||
{{jytxt}}
|
||||
</view>
|
||||
<view class="dangeanniu" @click="btn(10)">
|
||||
<view class="pic">
|
||||
|
@ -190,7 +190,7 @@
|
|||
</view>
|
||||
<view class="wai">
|
||||
<view class="lt">
|
||||
车牌号:<span>{{deviceInfos.vehicleNum}}</span>
|
||||
车牌号:<span>{{deviceInfos.vehicleNum == null ? '--' : deviceInfos.vehicleNum}}</span>
|
||||
</view>
|
||||
<view class="lt">
|
||||
续航里程:<span>{{deviceInfos.remainEndurance == null ? '--' : deviceInfos.remainEndurance}}km</span>
|
||||
|
@ -207,13 +207,13 @@
|
|||
</view>
|
||||
<view class="zuche">
|
||||
<view class="one">
|
||||
最近租车人:<image src="https://api.ccttiot.com/smartmeter/img/static/uCa86z0tr5WHiymtRJYt" mode=""></image> <span>--</span>
|
||||
最近租车人:<image src="https://api.ccttiot.com/smartmeter/img/static/uCa86z0tr5WHiymtRJYt" mode=""></image> <span @click="btntel">{{deviceInfos.lastUserPhone == null ? '--' : deviceInfos.lastUserPhone}}</span>
|
||||
</view>
|
||||
<!-- <view class="">
|
||||
最后定位坐标:<span>{{deviceInfos.latitude}},{{deviceInfos.longitude}}</span>
|
||||
</view> -->
|
||||
<view class="">
|
||||
最后定位时间:<span>{{deviceInfos.lastTime}}</span>
|
||||
最后定位时间:<span>{{deviceInfos.lastTime == null ? '--' : deviceInfos.lastTime}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -275,6 +275,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<u-select v-model="showModelList" :list="ModelList" title='修改车型' @confirm="confirm"></u-select>
|
||||
|
||||
<u-select v-model="shengyin" :list="shengyinlist" title='修改声音' @confirm="shengyinaniu"></u-select>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -285,6 +287,8 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
shengyin:false,
|
||||
shengyinlist:[{label:'静音',value:0},{label:'语音',value:1},{label:'彩铃',value:2}],
|
||||
devicesList: [],
|
||||
searching: false,
|
||||
texts: '正在扫描蓝牙设备...',
|
||||
|
@ -346,7 +350,7 @@
|
|||
deptId: null,
|
||||
showModelList: false,
|
||||
ModelList: [],
|
||||
jytxt: '开',
|
||||
jytxt: '',
|
||||
|
||||
ver_dataflag: 1,
|
||||
mac: '',
|
||||
|
@ -379,6 +383,37 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
// 点击拨打最近租车人电话
|
||||
btntel(){
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.deviceInfos.lastUserPhone,
|
||||
success: function(res) {
|
||||
console.log('拨打电话成功', res)
|
||||
},
|
||||
fail: function(err) {
|
||||
console.error('拨打电话失败', err)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择彩铃
|
||||
shengyinaniu(e){
|
||||
this.$u.put(`/bst/device/iot/music?sn=${this.sn}&music=${e[0].value}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.jytxt = e[0].label
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击进行导航
|
||||
btndaohang(){
|
||||
uni.openLocation({
|
||||
|
@ -479,35 +514,7 @@
|
|||
|
||||
// 静音
|
||||
btnjingyin() {
|
||||
if (this.jytxt == '开') {
|
||||
let data = {
|
||||
isSound: 0
|
||||
}
|
||||
this.$u.post(`/appVerify/device/mute/${this.sn}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.jytxt = '关'
|
||||
uni.showToast({
|
||||
title: '关闭静音成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
let data = {
|
||||
isSound: 1
|
||||
}
|
||||
this.$u.post(`/appVerify/device/mute/${this.sn}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.jytxt = '开'
|
||||
uni.showToast({
|
||||
title: '开启静音成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
this.shengyin = true
|
||||
},
|
||||
|
||||
toTrack() {
|
||||
|
@ -885,21 +892,28 @@
|
|||
this.$u.get(`/bst/device?id=${this.sn}`).then((res) => {
|
||||
console.log(res, 'rererer')
|
||||
if (res.code === 200) {
|
||||
if(res.data.music == 0){
|
||||
this.jytxt = '静音'
|
||||
}else if(res.data.music == 1){
|
||||
this.jytxt = '语音'
|
||||
}else if(res.data.music == 2){
|
||||
this.jytxt = '彩铃'
|
||||
}
|
||||
this.deviceInfos = res.data
|
||||
this.mac = res.data.mac
|
||||
if (res.data.onlineStatus == 0) {
|
||||
this.getlanya()
|
||||
}
|
||||
if (res.data.isSound == 0) {
|
||||
this.jytxt = '关'
|
||||
} else {
|
||||
this.jytxt = '开'
|
||||
}
|
||||
// if (res.data.isSound == 0) {
|
||||
// this.jytxt = '关'
|
||||
// } else {
|
||||
// this.jytxt = '开'
|
||||
// }
|
||||
if (this.getnum == 0) {
|
||||
this.getArea()
|
||||
}
|
||||
this.getnum = 1
|
||||
this.vehicleNum = res.vehicleNum
|
||||
this.vehicleNum = res.data.vehicleNum
|
||||
this.getModelList()
|
||||
this.latitude = this.deviceInfos.latitude
|
||||
this.longitude = this.deviceInfos.longitude
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<view class="half_infoli">
|
||||
距离:
|
||||
<span v-if="orderxqobj.distance">{{orderxqobj.distance > 1000 ? orderxqobj.distance / 1000 + 'km' : orderxqobj.distance + 'm'}}</span>
|
||||
<span v-else>0m</span>
|
||||
<span v-else>0.00m</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info_li">
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
车辆编号:<span>{{pic.deviceSn}}</span>
|
||||
</view>
|
||||
<view class="">
|
||||
车牌号:<span>{{pic.deviceVehicleNum}}</span>
|
||||
车牌号:<span>{{pic.deviceVehicleNum == null ? '--' : pic.deviceVehicleNum}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="img">
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
骑行距离
|
||||
</view>
|
||||
<view class="shen">
|
||||
{{info.distance > 1000 ? (info.distance / 1000).toFixed(2) + 'km' : info.distance + 'm'}}
|
||||
{{info.distance > 1000 ? (info.distance / 1000).toFixed(2) + 'km' : info.distance.toFixed(2) + 'm'}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="one">
|
||||
|
@ -252,7 +252,7 @@
|
|||
})
|
||||
},
|
||||
btntel(){
|
||||
this.$u.get(`/app/customerService/list?pageNum=1&pageSize=999&areald=${this.info.areaId}`).then(res => {
|
||||
this.$u.get(`/app/customerService/list?pageNum=1&pageSize=999&areaId=${this.info.areaId}`).then(res => {
|
||||
if(res.code == 200){
|
||||
if(res.rows.length > 0){
|
||||
this.kefulist = res.rows
|
||||
|
|
|
@ -242,6 +242,13 @@
|
|||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "webview",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "yunwei/addyunwei",
|
||||
"style": {
|
||||
|
|
|
@ -170,7 +170,8 @@
|
|||
announcements: {},
|
||||
kefulist:[],
|
||||
lists: [],
|
||||
info:{}
|
||||
info:{},
|
||||
tiaozhuanlist:[]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
@ -196,11 +197,21 @@
|
|||
this.getlunbo()
|
||||
},
|
||||
methods: {
|
||||
// 点击跳转到商家合作
|
||||
btnshangjia(){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/zhaoshang'
|
||||
})
|
||||
// 点击跳转轮播图跳转
|
||||
btnshangjia(e){
|
||||
console.log(e,'1212121',this.tiaozhuanlist[e].urlType);
|
||||
if(this.tiaozhuanlist[e].urlType == 1){
|
||||
uni.navigateTo({
|
||||
url: '/page_fenbao/webview?url=' + this.tiaozhuanlist[e].url
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/' + this.tiaozhuanlist[e].url
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url:'/page_user/zhaoshang'
|
||||
// })
|
||||
}
|
||||
},
|
||||
// 点击显示客服
|
||||
btnkf(){
|
||||
|
@ -216,7 +227,7 @@
|
|||
},
|
||||
// 获取客服
|
||||
getkefu(){
|
||||
this.$u.get(`/app/customerService/list?pageNum=1&pageSize=999&areald=${this.info.areaId}`).then(res => {
|
||||
this.$u.get(`/app/customerService/list?pageNum=1&pageSize=999&areaId=${this.info.areaId}`).then(res => {
|
||||
if(res.code == 200){
|
||||
if(res.rows.length > 0){
|
||||
this.kefulist = res.rows
|
||||
|
@ -229,6 +240,7 @@
|
|||
this.$u.get("/app/ad").then(res => {
|
||||
if(res.code == 200){
|
||||
this.lists = []
|
||||
this.tiaozhuanlist = res.data
|
||||
if(res.data.length > 0 && res.data[0] != null){
|
||||
res.data.forEach(item =>{
|
||||
this.lists.push({
|
||||
|
|
17
pages/my.vue
17
pages/my.vue
|
@ -151,7 +151,8 @@
|
|||
user:{},
|
||||
kefulist:[],
|
||||
lists:[],
|
||||
logoflag:false
|
||||
logoflag:false,
|
||||
tiaozhuanlist:[]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
@ -169,11 +170,25 @@
|
|||
url:'/page_user/zhaoshang'
|
||||
})
|
||||
},
|
||||
// 点击跳转轮播图跳转
|
||||
btnshangjia(e){
|
||||
console.log(e,'1212121',this.tiaozhuanlist[e].urlType);
|
||||
if(this.tiaozhuanlist[e].urlType == 1){
|
||||
uni.navigateTo({
|
||||
url: '/page_fenbao/webview?url=' + this.tiaozhuanlist[e].url
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/' + this.tiaozhuanlist[e].url
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取广告轮播图
|
||||
getlunbo(){
|
||||
this.$u.get("/app/ad").then(res => {
|
||||
if(res.code == 200){
|
||||
this.lists = []
|
||||
this.tiaozhuanlist = res.data
|
||||
if(res.data.length > 0 && res.data[0] != null){
|
||||
res.data.forEach(item =>{
|
||||
this.lists.push({
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
<text>时长:</text> {{computedList(item.duration)}}
|
||||
</view>
|
||||
<view class="">
|
||||
<text>距离:</text> {{item.distance > 1000 ? (item.distance / 1000).toFixed(2) + 'km' : item.distance + 'm'}}
|
||||
<text>距离:</text> {{item.distance > 1000 ? (item.distance / 1000).toFixed(2) + 'km' : item.distance.toFixed(2) + 'm'}}
|
||||
</view>
|
||||
<view class="" v-if="item.status == 'WAIT_VERIFY'">
|
||||
<text>还车审核:</text> 未审核
|
||||
|
|
|
@ -67,8 +67,8 @@
|
|||
</view>
|
||||
<view class="dingdan" @click="btndd()">
|
||||
<view class="top">
|
||||
<view class="hy">
|
||||
欢迎使用电动车
|
||||
<view class="hy" @click.stop="btnkefu">
|
||||
咨询客服
|
||||
</view>
|
||||
<view class="ck">
|
||||
查看订单 <image src="https://api.ccttiot.com/smartmeter/img/static/uYKb5NUIKO4akZRftejD" mode="">
|
||||
|
@ -150,6 +150,34 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="mask" v-if="fjflag"></view>
|
||||
|
||||
<!-- 平台客服弹窗 -->
|
||||
<view class="kefutc" v-if="kefuflag">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/umtjJg2CJLiOS6hfAEzo" mode="" @click="kefuflag = false"></image>
|
||||
<view class="box">
|
||||
<view class="" style="max-height: 280rpx;overflow: scroll;">
|
||||
<view class="top" v-for="(item,index) in kefulist" :key="index">
|
||||
<view class="dianhua">
|
||||
{{item.name == null ? '--' : item.name}}:{{item.contact == null ? '--' : item.contact}}
|
||||
<view class="wz">
|
||||
工作时间:{{item.startTime}}~{{item.endTime}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="boda" @click.stop="btnptkf(item.contact)">
|
||||
<u-icon name="phone-fill" color="#4297F3" size="28"></u-icon>
|
||||
<text>拨打</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bot">
|
||||
<view class="wzs">
|
||||
客服电话高峰期可能遇忙,请耐心等待
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mask" v-if="kefuflag"></view>
|
||||
|
||||
|
||||
<tab-bar :indexs='3'></tab-bar>
|
||||
</view>
|
||||
|
@ -186,7 +214,9 @@
|
|||
devicename: '',
|
||||
devicesarr: [],
|
||||
findDeviceTimer: null,
|
||||
name: ''
|
||||
name: '',
|
||||
kefuflag:false,
|
||||
kefulist:[]
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -240,6 +270,41 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
// 点击咨询客服
|
||||
btnkefu(){
|
||||
this.$u.get(`/app/customerService/list?pageNum=1&pageSize=999&areaId=${this.deivceobj.orderAreaId}`).then(res => {
|
||||
if(res.code == 200){
|
||||
if(res.rows.length > 0){
|
||||
this.kefulist = res.rows
|
||||
this.kefuflag = true
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '当前运营区暂无客服',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击拨打平台客服电话
|
||||
btnptkf(tel){
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: tel,
|
||||
success: function(res) {
|
||||
console.log('拨打电话成功', res)
|
||||
},
|
||||
fail: function(err) {
|
||||
console.error('拨打电话失败', err)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取本人正在使用的订单设备
|
||||
getorderdevice() {
|
||||
this.$u.get("/app/orderDevice/mineUsing").then((res) => {
|
||||
|
@ -759,7 +824,78 @@
|
|||
padding-bottom: 240rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.kefutc{
|
||||
animation: fadeIn 0.5s ease-in-out forwards;
|
||||
position: fixed;
|
||||
top: 660rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 10;
|
||||
.bot{
|
||||
margin-top: 30rpx;
|
||||
.wz{
|
||||
margin-top: 10rpx;
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.wzs{
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #7C7C7C;
|
||||
}
|
||||
}
|
||||
.top{
|
||||
width: 538rpx;
|
||||
height: 122rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.1);
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-right: 14rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 20rpx;
|
||||
.dianhua{
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
padding-left: 26rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.boda{
|
||||
width: 94rpx;
|
||||
height: 94rpx;
|
||||
background: #DCEDFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
text-align: center;
|
||||
padding-top: 8rpx;
|
||||
box-sizing: border-box;
|
||||
text{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
image{
|
||||
position: absolute;
|
||||
top: -280rpx;
|
||||
z-index: -1;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 614rpx;
|
||||
height: 748rpx;
|
||||
}
|
||||
}
|
||||
.mask{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 9;
|
||||
}
|
||||
.mask {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
|
@ -1005,7 +1141,10 @@
|
|||
.hy {
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
color: #437fec;
|
||||
// border-bottom: 1px solid #437fec;
|
||||
// padding-bottom: 4rpx;
|
||||
// box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ck {
|
||||
|
|
|
@ -102,8 +102,12 @@
|
|||
剩余电量
|
||||
</view>
|
||||
<view class="bikegongli">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u9y1tZIJBWLsO0DRoweT" mode="">
|
||||
</image> {{cheobj.remainingPower == null ? '--' : cheobj.remainingPower}}%
|
||||
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/u9y1tZIJBWLsO0DRoweT" mode=""></image> -->
|
||||
<image v-if="cheobj.remainingPower >= 0 && cheobj.remainingPower < 20 " src="https://api.ccttiot.com/smartmeter/img/static/u8M9KmIfHXpmeifTwCzj" mode=""></image>
|
||||
<image v-if="cheobj.remainingPower >= 20 && cheobj.remainingPower < 50 " src="https://api.ccttiot.com/smartmeter/img/static/u2gp2pE9kPGwaJ4MKUxE" mode=""></image>
|
||||
<image v-if="cheobj.remainingPower >= 50 && cheobj.remainingPower < 80 " src="https://api.ccttiot.com/smartmeter/img/static/umm5Ruc5vhNSjeacslwX" mode=""></image>
|
||||
<image v-if="cheobj.remainingPower >= 80 && cheobj.remainingPower <= 100 " src="https://api.ccttiot.com/smartmeter/img/static/uo75cOfYZiQoxZQAI3FH" mode=""></image>
|
||||
{{cheobj.remainingPower == null ? '--' : cheobj.remainingPower}}%
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -269,13 +273,15 @@
|
|||
newMarkers:'',
|
||||
|
||||
count: 0,
|
||||
timer: null
|
||||
timer: null,
|
||||
user:{}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.getAone()
|
||||
this.covers = []
|
||||
this.sockedata = ''
|
||||
this.getMyLocation()
|
||||
|
@ -901,7 +907,7 @@
|
|||
} else if (this.rtindex == 2) {
|
||||
this.iconPath = 'https://api.ccttiot.com/smartmeter/img/static/uX0FBv86yDIR5tIqjoe2'
|
||||
// this.iconPath = 'https://api.ccttiot.com/smartmeter/img/static/uX0FBv86yDIR5tIqjoe2'
|
||||
this.$u.get(`/app/device/listNearBy?radius=10000¢er=${this.jingweidu}`).then((res) => {
|
||||
this.$u.get(`/app/device/listNearBy?radius=10000¢er=${this.jingweidu}&areaId=${this.user.areaId == undefined ? null : this.user.areaId}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.covers = []
|
||||
this.$set(this, 'covers', [...this.covers, ...this.newMarkers])
|
||||
|
@ -1109,7 +1115,7 @@
|
|||
},
|
||||
getParking() {
|
||||
// 发送请求获取数据
|
||||
this.$u.get(`/app/areaSub/listByArea?areaId=${this.areaId}`).then((res) => {
|
||||
this.$u.get(`/app/areaSub/listByArea?areaId=${this.user.areaId}`).then((res) => {
|
||||
if (res.code === 200) {
|
||||
// 处理接口返回的数据
|
||||
const type1Data = []
|
||||
|
@ -1152,6 +1158,23 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
// 第一次请求运营区停车点,禁行区,
|
||||
getAone() {
|
||||
this.$u.get("/getInfo").then(res =>{
|
||||
if(res.code == 200){
|
||||
this.user = res.user
|
||||
this.polyline = []
|
||||
this.$u.get(`/app/area/nearby?id=${res.user.areaId}&radius=1000¢er=${this.jingweidu}`).then((resp) => {
|
||||
if (resp.code == 200) {
|
||||
const polylines = this.convertBoundaryToPolyline(resp.data.boundaryStr)
|
||||
this.polyline.push(polylines)
|
||||
this.getParking()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user