小鹿骑行最新

This commit is contained in:
吴鹏 2025-08-19 17:02:14 +08:00
parent 9d3e94012e
commit da9514e206
17 changed files with 630 additions and 486 deletions

View File

@ -1,7 +1,7 @@
const install = (Vue, vm) => {
uni.setStorageSync('deptId', 100);
Vue.prototype.$u.http.setConfig({
// baseUrl: 'http://192.168.2.124:4101', //键辉本地
// baseUrl: 'http://192.168.2.10:4101', //键辉本地
// baseUrl: 'http://192.168.0.102:4101', //景森本地
baseUrl: 'https://ele.ccttiot.com/prod-api', //线上
// baseUrl: 'https://cc.ccttiot.com/prod-api', //叉车线上

View File

@ -1246,7 +1246,7 @@ function init() {
// && devices.devices[0].name != 'SMART_R2XS'
// && devices.devices[0].name != 'SMART_R2XS'
// )
if (devices.devices[0].name.indexOf("CTPO") != -1 || devices.devices[0].name.indexOf("BBLE") != -1){
if (devices.devices[0].name.indexOf("BBLE") != -1){
// if ( devices.devices[0].name.indexOf("gjkg") != -1 ){
// console.log("跳过",devices.devices[0].name)
// isnotexist = false;

View File

@ -40,7 +40,11 @@
{{item.tit}}
</view>
</view>
<view class="rt">
<view class="rt" v-if="item.name == '查看运营区'">
<u-switch v-model="item.checked" :disabled="true" active-color="#2b2929" size="36"
inactive-color="#eee"></u-switch>
</view>
<view class="rt" v-else>
<u-switch v-model="item.checked" active-color="#4C97E7" size="36"
inactive-color="#eee"></u-switch>
</view>
@ -105,7 +109,7 @@
list: [{
name: '查看运营区',
tit: '是否允许',
checked: false,
checked: true,
txt: 1
},
{

View File

@ -579,6 +579,7 @@
ljsbflag:false,
kefuflag: false,
kefulist: [],
respData:{}
}
},
onLoad(option) {
@ -764,7 +765,6 @@
this.getgg()
this.gethuiyuan()
},1500)
console.log(this.sn,'03333333303333333');
},
onShow() {
@ -1260,6 +1260,104 @@
}
},
//
openDevice() {
let xllat = null
let xllng = null
uni.getLocation({
type: 'wgs84',
success: (res) => {
xllat = res.latitude
xllng = res.longitude
},
fail: (err) => {
console.error('获取位置失败:', err)
}
})
this.$u.put(`/app/order/openDevice?orderId=${this.bstId}&requiredIot=true&lon=${xllng}&lat=${xllat}`).then(res =>{
if(res.code == 200){
this.$u.put(`/app/pay/refreshPayResult?no=${this.respData.pay.no}`).then((res) => {
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index?orderid=' + this.bstId
})
}, 2000)
}) //
}else if(res.code == 20001){
this.wenbentxtflag = true
this.wenbentxt = '蓝牙开锁中...'
let that = this
const findDevice = () =>{
that.ver_dataflag = 2
const matchedDevice = that.devicesarr.find(device => {
return device.name.slice(-12) == that.mac.slice(-12)
})
if (matchedDevice) {
xBlufi.notifyStartDiscoverBle({
'isStart': false
})
xBlufi.notifyConnectBle({
isStart: true,
deviceId: matchedDevice.deviceId,
name: matchedDevice.name
})
that.deviceid = matchedDevice.deviceId
that.devicename = matchedDevice.name
setTimeout(()=>{
if(that.ver_dataflag == 3){
xBlufi.notifySendCustomData({
customData: "11opensub5@"
})
that.wenbentxt = ''
that.wenbentxtflag = false
let flag = false
that.zhezhaoflag = true
that.$u.put(`/app/order/openDevice?orderId=${that.bstId}&requiredIot=false&lon=${xllng}&lat=${xllat}`).then(res =>{})
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index?orderid=' + that.respData.pay.bstId
})
}, 2000)
}else{
that.ver_dataflag = 1
that.shibainum = 0
that.wenbentxt = ''
that.wenbentxtflag = false
that.ljsbflag = true
}
},4000)
} else {
if(that.shibainum < 3){
that.shibainum++
that.findDeviceTimer = setTimeout(findDevice.bind(that), 1000) // 使 bind this
}else{
that.ver_dataflag = 1
that.shibainum = 0
that.wenbentxt = ''
that.wenbentxtflag = false
that.ljsbflag = true
}
}
}
findDevice()
}else if(res.code == 40001){
// 40001
console.log('开锁返回40001重新执行开锁请求...')
setTimeout(() => {
this.openDevice()
}, 1000) // 1
} else{
this.wenbentxt = ''
this.wenbentxtflag = false
uni.showToast({
title: res.msg,
icon: 'none',
duration: 3000
})
}
})
},
//
getzf() {
let data = {
@ -1288,98 +1386,13 @@
success: (respc) => {
console.log(respc, '支付成功')
this.bstId = resp.data.pay.bstId
this.respData = resp.data // 使
this.wenbentxtflag = true
this.wenbentxt = '开锁中...'
let xllat = null
let xllng = null
uni.getLocation({
type: 'wgs84',
success: (res) => {
xllat = res.latitude
xllng = res.longitude
},
fail: (err) => {
console.error('获取位置失败:', err)
}
})
this.$u.put(`/app/order/openDevice?orderId=${this.bstId}&requiredIot=true&lon=${xllng}&lat=${xllat}`).then(res =>{
if(res.code == 200){
this.$u.put(`/app/pay/refreshPayResult?no=${resp.data.pay.no}`).then((res) => {
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index?orderid=' + this.bstId
})
}, 2000)
}) //
}else if(res.code == 20001){
this.wenbentxtflag = true
this.wenbentxt = '蓝牙开锁中...'
let that = this
const findDevice = () =>{
that.ver_dataflag = 2
const matchedDevice = that.devicesarr.find(device => {
return device.name.slice(-12) == that.mac.slice(-12)
})
if (matchedDevice) {
xBlufi.notifyStartDiscoverBle({
'isStart': false
})
xBlufi.notifyConnectBle({
isStart: true,
deviceId: matchedDevice.deviceId,
name: matchedDevice.name
})
that.deviceid = matchedDevice.deviceId
that.devicename = matchedDevice.name
setTimeout(()=>{
if(that.ver_dataflag == 3){
xBlufi.notifySendCustomData({
customData: "11opensub5@"
})
that.wenbentxt = ''
that.wenbentxtflag = false
let flag = false
that.zhezhaoflag = true
that.$u.put(`/app/order/openDevice?orderId=${that.bstId}&requiredIot=false&lon=${xllng}&lat=${xllat}`).then(res =>{})
that.$u.put(`/app/pay/refreshPayResult?no=${resp.data.pay.bstId}`).then((res) => {
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index?orderid=' + resp.data.pay.bstId
})
}, 2000)
}) //
}else{
that.ver_dataflag = 1
that.shibainum = 0
that.wenbentxt = ''
that.wenbentxtflag = false
that.ljsbflag = true
}
},4000)
} else {
if(that.shibainum < 3){
that.shibainum++
that.findDeviceTimer = setTimeout(findDevice.bind(that), 1000) // 使 bind this
}else{
that.ver_dataflag = 1
that.shibainum = 0
that.wenbentxt = ''
that.wenbentxtflag = false
that.ljsbflag = true
}
}
}
findDevice()
}else{
this.wenbentxt = ''
this.wenbentxtflag = false
uni.showToast({
title: res.msg,
icon: 'none',
duration: 3000
})
}
})
//
this.$u.put(`/app/pay/refreshPayResult?no=${this.respData.pay.no}`).then((res) => {
this.openDevice()
}) //
},
fail(err) {
setTimeout(() => {

View File

@ -37,7 +37,11 @@
{{item.tit}}
</view>
</view>
<view class="rt">
<view class="rt" v-if="item.name == '查看运营区'">
<u-switch v-model="item.checked" :disabled="true" active-color="#2b2929" size="36"
inactive-color="#eee"></u-switch>
</view>
<view class="rt" v-else>
<u-switch v-model="item.checked" active-color="#4C97E7" size="36"
inactive-color="#eee"></u-switch>
</view>
@ -102,7 +106,7 @@
list: [{
name: '查看运营区',
tit: '是否允许',
checked: false,
checked: true,
txt: 1
},
{

View File

@ -160,9 +160,10 @@
<script>
import TabBar from '@/page_shanghu/components/tab-bar/tab-bar.vue';
import SliderRange from '@/page_shanghu/components/primewind-sliderrange/index.vue'
let timerId;
var appMap = null;
import SliderRange from '@/page_shanghu/components/primewind-sliderrange/index.vue'
let pollIntervalId = null; // interval
let rangeDebounceId = null; // debounce
var appMap = null;
export default {
data() {
@ -208,21 +209,21 @@
SliderRange,TabBar
},
onShow() {
this.polyline = []
if (uni.getStorageSync('adminAreaid')) {
this.areaId = uni.getStorageSync('adminAreaid')
this.getArea()
console.log(this.areaId)
console.log('admin_index onShow -> start poll')
this.btnshuaixn()
if (pollIntervalId) {
clearInterval(pollIntervalId)
}
this.getqb()
this.getmarks()
pollIntervalId = setInterval(() => {
console.log('admin_index poll tick')
this.btnshuaixn()
}, 10000)
},
onLoad() {
let that = this
uni.getLocation({
type: 'wgs84',
success: function(lb) {
console.log(that.areaInfo, 'that.areaInfo')
console.log(this.areaInfo, 'that.areaInfo')
},
fail: function(error) {
uni.showToast({
@ -232,6 +233,26 @@
})
}
})
this.polyline = []
if (uni.getStorageSync('adminAreaid')) {
this.areaId = uni.getStorageSync('adminAreaid')
this.getArea()
console.log(this.areaId)
}
this.getqb()
this.getmarks()
},
onHide() {
if (pollIntervalId) {
clearInterval(pollIntervalId)
pollIntervalId = null
}
},
onUnload() {
if (pollIntervalId) {
clearInterval(pollIntervalId)
pollIntervalId = null
}
},
computed: {
userId() {
@ -470,9 +491,11 @@
handleRangeChange(e) {
console.log(e,'121212');
//
clearTimeout(timerId)
if (rangeDebounceId) {
clearTimeout(rangeDebounceId)
}
// 500ms
timerId = setTimeout(() => {
rangeDebounceId = setTimeout(() => {
this.rangeValue = e
// 使
this.filterDevicesByPowerRange()

View File

@ -116,7 +116,7 @@
</view>
<view class="box_bot">
<view class="bot_left">
提现时间{{item.createTime}}
{{item.createTime}}
</view>
<view class="top_left">
提现金额 {{'¥' + item.amount}}
@ -175,7 +175,6 @@
this.areaId = uni.getStorageSync('adminAreaid')
}
this.getUserInfo()
this.getlist()
},
onReachBottom() {
if(this.total > this.list.length){
@ -209,6 +208,7 @@
this.$u.get(`/getInfo`).then((res) => {
if (res.code == 200) {
this.userInfo = res.user
this.getlist()
this.gettxfs()
this.successAmount = res.stat.withdraw.successAmount == null ? 0 : res.stat.withdraw.successAmount
this.waitDivideAmount = res.stat.bonus.waitDivideAmount == null ? 0 : res.stat.bonus.waitDivideAmount
@ -314,7 +314,7 @@
},
//
getlist() {
this.$u.get(`/bst/withdraw/list?pageNum=${this.pageNum}&pageSize=10`).then((res) => {
this.$u.get(`/bst/withdraw/list?pageNum=${this.pageNum}&pageSize=10&orderByColumn=createTime&isAsc=desc&userId=${this.userInfo.userId}`).then((res) => {
if (res.code == 200) {
this.total = res.total
if(this.pageNum == 1){

View File

@ -46,36 +46,35 @@
<u-picker mode="time" v-model="time2" :params="params" @confirm="confirm2"
:default-time='pickertime'></u-picker>
<scroll-view class="warp_box" @scrolltolower="handqixing" scroll-y refresher-enabled @refresherrefresh="onRefresh" :refresher-triggered="isRefreshing" refresher-default-style="black">
<view class="swiper-item ">
<view class="swiper-item">
<view class="card" v-for="(item,index) in allList" :key="index" @click="toOrderDetail(item.deviceSn,item.id)">
<view class="line"></view>
<view class="top_info">
<view class="top_info_left">
订单编号{{item.no}}
</view>
<view class="top_info_right" v-if="item.status=='PROCESSING'">
<view class="top_info_right status-processing" v-if="item.status=='PROCESSING'">
<view class="yuan"></view>
进行中
</view>
<view class="top_info_right" v-if="item.status== 'WAIT_PAY'"
style="color: orangered;">
<view class="yuan" style="background: orangered;"></view>
<view class="top_info_right status-wait-pay" v-if="item.status== 'WAIT_PAY'">
<view class="yuan"></view>
押金待支付
</view>
<view class="top_info_right" v-if="item.status=='FINISHED'" style="color: green;">
<view class="yuan" style="background: green;"></view>
<view class="top_info_right status-finished" v-if="item.status=='FINISHED'">
<view class="yuan"></view>
已完成
</view>
<view class="top_info_right" v-if="item.status=='CANCELED'" style="color: #666;">
<view class="yuan" style="background: #666;"></view>
<view class="top_info_right status-canceled" v-if="item.status=='CANCELED'">
<view class="yuan"></view>
已取消
</view>
<view class="top_info_right" v-if="item.status=='RIDE_WAIT_PAY'" style="color: orange;">
<view class="yuan" style="background: orange;"></view>
<view class="top_info_right status-ride-wait-pay" v-if="item.status=='RIDE_WAIT_PAY'">
<view class="yuan"></view>
骑行待支付
</view>
<view class="top_info_right" v-if="item.status=='WAIT_VERIFY'" style="color: #666;">
<view class="yuan" style="background: #666;"></view>
<view class="top_info_right status-wait-verify" v-if="item.status=='WAIT_VERIFY'">
<view class="yuan"></view>
待审核
</view>
</view>
@ -125,7 +124,7 @@
</view>
</view>
</view>
<view class="" style="width: 100%;text-align: center;color: #ccc;margin-top: 30rpx;">
<view class="no-more-orders">
当前没有更多订单啦...
</view>
</view>
@ -516,120 +515,180 @@
.warp_box {
height: 61vh;
overflow: scroll;
.swiper-item {
background: #f5f5f5;
.swiper-item {
padding: 16rpx;
.card {
margin: 0 auto 16rpx;
width: 100%;
background: #fff;
border-radius: 12rpx;
// box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
overflow: hidden;
border-radius: 24rpx;
transition: all 0.3s ease;
.card {
margin: 16rpx auto;
width: 750rpx;
background: #fff;
&:active {
transform: scale(0.98);
}
.btn_box {
.btn_box {
display: flex;
flex-wrap: nowrap;
align-items: center;
width: 100%;
height: 96rpx;
.btn {
display: flex;
flex-wrap: nowrap;
align-items: center;
width: 100%;
height: 96rpx;
.btn {
display: flex;
align-items: center;
justify-content: center;
font-weight: 400;
font-size: 36rpx;
color: #3D3D3D;
width: 49%;
}
.btn_line {
width: 0rpx;
height: 51rpx;
border: 2rpx solid #4C97E7;
}
justify-content: center;
font-weight: 500;
font-size: 32rpx;
color: #333;
width: 49%;
}
.order_info {
padding: 0rpx 30rpx;
.btn_line {
width: 0rpx;
height: 51rpx;
border: 2rpx solid #4C97E7;
}
}
.order_info {
padding: 20rpx 30rpx 30rpx;
display: flex;
flex-direction: column;
margin-top: 10rpx;
.info_li {
display: flex;
flex-wrap: wrap;
margin-top: 10rpx;
.info_li {
justify-content: space-between;
align-items: center;
width: 100%;
font-weight: 400;
font-size: 28rpx;
color: #808080;
margin-bottom: 12rpx;
.half_info_li {
// flex: 1;
display: flex;
flex-wrap: nowrap;
width: 100%;
align-items: center;
font-weight: 400;
font-size: 28rpx;
color: #808080;
.half_info_li:first-child {
width: 50%;
}
.half_info_li {
width: 55%;
font-weight: 400;
font-size: 28rpx;
color: #808080;
span{
color: #000;
}
span {
color: #000;
font-weight: 500;
margin-left: 8rpx;
}
}
.half_info_li:last-child {
text-align: right;
justify-content: flex-end;
}
}
}
.line {
width: 100%;
height: 12rpx;
background: #F6F6F6;
}
.lines {
width: 100%;
height: 1rpx;
background: #f7f7f7;
}
.top_info {
padding: 24rpx 32rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
.top_info_left {
width: 70%;
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.line {
width: 750rpx;
height: 22rpx;
background: #F6F6F6;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
.lines {
width: 750rpx;
height: 2rpx;
background: #f7f7f7;
}
.top_info {
padding: 24rpx 32rpx;
.top_info_right {
display: flex;
flex-wrap: nowrap;
align-items: center;
margin-left: auto;
padding: 6rpx 12rpx;
border-radius: 16rpx;
font-weight: 500;
font-size: 24rpx;
.top_info_left {
width: 70%;
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
font-weight: 600;
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
/* 显示省略号 */
.yuan {
margin-right: 8rpx;
border-radius: 50%;
width: 12rpx;
height: 12rpx;
}
.top_info_right {
display: flex;
flex-wrap: nowrap;
align-items: center;
margin-left: auto;
.yuan {
margin-right: 12rpx;
border-radius: 50%;
width: 14rpx;
height: 14rpx;
background: #4C97E7;
}
font-weight: 400;
font-size: 28rpx;
&.status-processing {
background: rgba(76, 151, 231, 0.1);
color: #4C97E7;
.yuan { background: #4C97E7; }
}
&.status-wait-pay {
background: rgba(255, 69, 0, 0.1);
color: #ff4500;
.yuan { background: #ff4500; }
}
&.status-finished {
background: rgba(34, 139, 34, 0.1);
color: #228b22;
.yuan { background: #228b22; }
}
&.status-canceled {
background: rgba(128, 128, 128, 0.1);
color: #808080;
.yuan { background: #808080; }
}
&.status-ride-wait-pay {
background: rgba(255, 165, 0, 0.1);
color: #ffa500;
.yuan { background: #ffa500; }
}
&.status-wait-verify {
background: rgba(128, 128, 128, 0.1);
color: #808080;
.yuan { background: #808080; }
}
}
}
}
}
.no-more-orders {
width: 100%;
text-align: center;
color: #999;
margin: 30rpx 0;
font-size: 28rpx;
padding: 20rpx;
}
}
.tap {

View File

@ -74,13 +74,13 @@
</view>
</view>
<view class="cont" @click="btnreturnbike">
<image src="https://api.ccttiot.com/smartmeter/img/static/usv2hT8WU6LTBQXemobM" mode=""></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/ui8unTyOFXCkgier5F5P" mode=""></image>
<view class="text">
还车审核
</view>
</view>
<view class="cont" @click="btnhy">
<image src="https://api.ccttiot.com/smartmeter/img/static/uov2297NuScFZayry0iH" mode=""></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/usv2hT8WU6LTBQXemobM" mode=""></image>
<view class="text">
会员中心
</view>
@ -137,6 +137,12 @@
视频教程
</view>
</view>
<view class="cont" @click="btnfuwuewm">
<image src="https://api.ccttiot.com/smartmeter/img/static/uov2297NuScFZayry0iH" mode=""></image>
<view class="text">
消息通知
</view>
</view>
<!-- <view class="cont" @click="btngggl">
<image src="https://api.ccttiot.com/smartmeter/img/static/ui8unTyOFXCkgier5F5P" mode=""></image>
<view class="text">
@ -178,6 +184,16 @@
</scroll-view>
</view>
</view>
<view class="fuwuewm" v-if="fuwuewm">
<image src="https://api.ccttiot.com/qrcode_for_gh_25c71c637dbc_344%20(2)-1753329225290.jpg" show-menu-by-longpress @longpress="handleLongPress" mode=""></image>
<text class="" style="width: 100%;text-align: center;margin-top: 20rpx;display: block;color: #fff;">
长按关注公众号租车信息不错过
</text>
<view class="" @click="fuwuewm = false">
关闭
</view>
</view>
<view class="mask" style="background-color: rgba(0, 0, 0, 0.5);" v-if="fuwuewm"></view>
<TabBar :indexs='0' style=""></TabBar>
</view>
</template>
@ -207,7 +223,8 @@ export default {
gonggaoflag:false,
announcements: {},
yyqid:'',
userId:''
userId:'',
fuwuewm:false
}
},
onLoad(option) {
@ -244,6 +261,27 @@ export default {
}
},
methods: {
//
btnfuwuewm(){
let that = this
wx.login({
success(res) {
if (res.code) {
that.$u.put(`/app/user/bindUnionId?jsCode=${res.code}`).then((res) => {
if (res.code == 200) {
that.fuwuewm = true
}else{
uni.showModal({
title: '提示',
content: res.msg,
showCancel:false,
})
}
})
}
},
})
},
//
btnhy(){
uni.navigateTo({
@ -490,6 +528,44 @@ export default {
</script>
<style lang="scss">
.fuwuewm{
position: fixed;
top: 30%;
left: 50%;
transform: translateX(-50%);
z-index: 10;
image{
width: 600rpx;
height: 600rpx;
}
view{
width: 200rpx;
height: 70rpx;
background-color: #4297F3;
color: #fff;
font-size: 32rpx;
text-align: center;
line-height: 70rpx;
margin: auto;
margin-top: 50rpx;
border-radius: 10rpx;
}
}
.fuwuhao{
width: 100%;
text-align: center;
text-underline-offset: 4px;
margin-top: 30rpx;
color: #4297F3;
padding-left: 50rpx;
box-sizing: border-box;
height: 60rpx;
line-height: 60rpx;
font-size: 32rpx;
text-decoration: underline;
text-decoration-color: #4297F3;
text-decoration-thickness: 1px;
}
.mask{
width: 100%;
height: 100vh;

View File

@ -8,14 +8,6 @@
<cover-image class="img" src="https://lxnapi.ccttiot.com/bike/img/static/uRiYQZQEb3l2LsltEsyW"
mode=""></cover-image>
</cover-view>
<!-- <cover-view class="park" style="bottom: 240rpx;width: 70rpx;height: 70rpx;right: 40rpx;" @click="btnsjyc">
<cover-image class="img" src="https://api.ccttiot.com/smartmeter/img/static/uBluMsnJyV5Judyx7SYx"
mode=""></cover-image>
</cover-view> -->
<!-- <cover-view class="track" @click="toTrack">
<cover-image class="img" src="https://lxnapi.ccttiot.com/bike/img/static/ufaAAtlirJYs1QwJF25P"
mode=""></cover-image>
</cover-view> -->
</map>
<view class="new_infocard">
@ -580,7 +572,7 @@
}
}
return item;
});
})
this.$forceUpdate(); //
},
//
@ -642,7 +634,7 @@
//
btntel() {
uni.makePhoneCall({
phoneNumber: this.deviceInfos.lastUserPhone,
phoneNumber: this.deviceInfos.orderUserPhone,
success: function(res) {
console.log('拨打电话成功', res)
},
@ -941,14 +933,14 @@
clearTimeout(this.uploadTimer)
// 10
if (now - this.lastUploadTime >= throttleInterval && !this.isUploading) {
this.doUpload()
this.doUpload()
} else {
//
const remainingTime = throttleInterval - (now - this.lastUploadTime)
this.uploadTimer = setTimeout(() => {
this.doUpload()
}, remainingTime)
}
//
const remainingTime = throttleInterval - (now - this.lastUploadTime)
this.uploadTimer = setTimeout(() => {
this.doUpload()
}, remainingTime)
}
},
//
@ -956,7 +948,6 @@
if (!this.bluetoothData || this.isUploading) return
this.isUploading = true
this.lastUploadTime = Date.now()
// console.log(this.bluetoothData,'this.bluetoothDatathis.bluetoothData')
this.$u.put(`/app/device/iot/bltUpload`, this.bluetoothData).then(res => {
if(res.code == 200) {
console.log('上传蓝牙数据成功',this.bluetoothData, new Date().toLocaleTimeString())

View File

@ -507,6 +507,9 @@
</view>
<input type="text" style="width:440rpx;" v-model="yuanyin" placeholder="请输入退款原因" />
</view>
<view class="" style="margin-top: 20rpx;">
当前操作总退款为<text style="color: #FF4444;font-size: 600;">{{ totalRefund }}</text>
</view>
<view class="anniu">
<view class="qx" @click="qxqx">
取消
@ -624,10 +627,10 @@
yajinyajin:false,
huancheflag:false,
beizhu:'',
qxfei: '',
ddfei: '',
glfei: '',
csfei:'',
qxfei: 0,
ddfei: 0,
glfei: 0,
csfei:0,
yuanyin: '',
zengsongflag: false,
devicesList: [],
@ -740,6 +743,14 @@
},
computed: {
totalRefund() {
return (
Number(this.qxfei) +
Number(this.ddfei) +
Number(this.glfei) +
Number(this.csfei)
).toFixed(2); //
},
formattedDuration() {
//
const startTime = this.orderxqobj?.startTime ? new Date(this.orderxqobj.startTime) : null;
@ -2484,7 +2495,7 @@
display: flex;
justify-content: space-between;
text-align: center;
margin-top: 50rpx;
margin-top: 20rpx;
border-top: 1px solid #ccc;
.qd{
font-size: 36rpx;

View File

@ -51,11 +51,13 @@
noMoreData: false,
total: 0,
showflag: false,
jlflag: false
jlflag: false,
userId:''
}
},
onLoad(option) {
this.getList(option.userId)
this.userId = option.userId
this.getList()
},
onShareAppMessage: function() {
return {
@ -71,8 +73,8 @@
}
},
methods: {
getList(userId) {
this.$u.get(`/bst/balanceLog/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}&orderByColumn=createTime&isAsc=desc&userId=${userId}`).then((res) => {
getList() {
this.$u.get(`/bst/balanceLog/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}&orderByColumn=createTime&isAsc=desc&userId=${this.userId}`).then((res) => {
if (res.code == 200) {
this.total = res.total
if (this.total > 0) {

View File

@ -17,8 +17,16 @@
</view>
<input type="text" class="ips" v-model="sn" placeholder="请扫描设备上的二维码" style="margin-left: 32rpx;"
placeholder-class="my-placeholder" />
</view>
<view class="iptbox" @click="kashow=true">
<view class="" v-if="kaname">
卡商{{kaname}}
</view>
<view class="" v-else>
请点击选择卡商
</view>
</view>
<u-select v-model="kashow" :list="kalist" title='选择卡商' @confirm="confirmka"></u-select>
<view class="iptbox" @click="show=true">
<view class="" v-if="hardwareInfo.version">
版本{{hardwareInfo.version}}
@ -32,7 +40,7 @@
</view>
<u-select v-model="show" :list="list" title='选择版本' @confirm="confirm"></u-select>
<view class="imgs" style="margin-top: 330rpx;">
<view class="imgs" style="margin-top: 30rpx;">
<image src="https://lxnapi.ccttiot.com/bike/img/static/u9wFJhLZGm7rboSDySV4" mode="" @click="qrcode()"></image>
</view>
<view class="btn" @click="bind()">
@ -141,8 +149,11 @@
list: [],
hardwareInfo: {},
showbind:false,
deviceid:''
deviceid:'',
kalist:[],
kashow:false,
kaname:'',
kaid:''
}
},
@ -158,29 +169,29 @@
},
onShow() {
this.getlist()
this.getka()
},
// onUnload: function() {
// xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
// xBlufi.notifyStartDiscoverBle({
// 'isStart': false
// });
// },
// onHide() {
// xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
// xBlufi.notifyStartDiscoverBle({
// 'isStart': false
// });
// },
// onBeforeUnmount() {
// xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
// xBlufi.notifyStartDiscoverBle({
// 'isStart': false
// });
// },
watch: {
},
methods: {
//
confirmka(e){
this.kaname = e[0].label
this.kaid = e[0].value
},
//
getka(){
this.$u.get(`/system/dict/data/type/device_sim_producer`).then((res) => {
if (res.code === 200) {
this.kalist = res.data.map(item => ({
value: item.dictValue,
label: item.dictLabel
}))
}
})
},
btnfh(){
uni.reLaunch({
url:'/page_user/luru/index'
@ -220,9 +231,7 @@
this.$u.get('/bst/hardwareVersion/all').then((res) => {
if (res.code === 200) {
this.Versionlist = res.data.filter(item => item.parentId !== 0);
const hardwareVersionId = uni.getStorageSync('hardwareVersionId');
if (hardwareVersionId) {
this.hardwareVersionId=hardwareVersionId
const matchedVersion = this.Versionlist.find(version => version.id ===
@ -291,46 +300,33 @@
})
},
bind() {
// if(this.sn!='' && this.sn.length === 7 && /^\d+$/.test(this.sn)){
let data = {
sn:this.sn,
mac:this.mac,
hardwareVersionId:this.hardwareVersionId
let data = {
sn:this.sn,
mac:this.mac,
hardwareVersionId:this.hardwareVersionId,
simProducer:this.kaid
}
console.log(data,'111');
this.$u.post(`/bst/device`,data).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '操作成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
uni.navigateTo({
url:'/page_user/luru/controlDevice?sn='+this.sn
})
}, 2000)
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
console.log(data,'111');
this.$u.post(`/bst/device`,data).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '操作成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
uni.navigateTo({
url:'/page_user/luru/controlDevice?sn='+this.sn
})
// uni.navigateBack({
// delta: 1 // delta1
// });
}, 2000)
} else {
// if(res.msg=='MAC'){
// this.showbind=true
// }else{
// }
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
// }
})
},
qrcode() {
uni.scanCode({

View File

@ -22,7 +22,7 @@
</view>
<!-- 驾驶证认证 -->
<view class="certification-item" @click="navigateTo('driver')">
<!-- <view class="certification-item" @click="navigateTo('driver')">
<view class="item-left">
<view class="item-info">
<text class="item-title">驾驶证认证</text>
@ -30,10 +30,9 @@
</view>
</view>
<view class="item-right" :class="{'verified': driverStatus === 'uploaded'}">
<!-- <text>{{ driverStatus === 'uploaded' ? '已上传' : '未上传' }}</text> -->
<uni-icons type="forward" size="16" color="#999"></uni-icons>
</view>
</view>
</view> -->
</view>
</view>
</view>

View File

@ -339,6 +339,7 @@
wenbentxtflag:false,
ljsbflag:false,
chongshinum:'',
jieshuflag:true,
}
},
onLoad() {
@ -367,7 +368,6 @@
setTimeout(()=>{
this.setMapScale()
},500)
this.getkefu()
this.polyline = []
this.isFirstLoad = true //
setTimeout(()=>{
@ -454,7 +454,18 @@
}
this.wenbentxt = '车辆响铃中...'
this.wenbentxtflag = true
this.$u.put(`/app/device/iot/ring?id=${this.orderobj.deviceId}`).then((res) => {
uni.getLocation({
type: 'wgs84',
success: (res) => {
console.log(res);
this.xllat = res.latitude
this.xllng = res.longitude
},
fail: (err) => {
console.error('获取位置失败:', err)
}
})
this.$u.put(`/app/device/iot/ring?id=${this.orderobj.deviceId}&lat=${this.xllat}&lon=${this.xllng}`).then((res) => {
if (res.code == 200) {
this.wenbentxt = ''
this.wenbentxtflag = false
@ -535,7 +546,7 @@
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
duration: 3000
})
}
})
@ -1043,38 +1054,54 @@
},
//
btnjsdd() {
this.$u.get("/app/order/mineProcessing").then((res) => {
if (res.code == 200) {
if(res.data){
if (this.orderAreaReturnVerify == true) {
if(this.orderobj.deviceOnlineStatus == 0){
this.wenbentxtflag = true
this.wenbentxt = '蓝牙连接中...'
let that = this
const findDevice = () =>{
that.ver_dataflag = 2
const matchedDevice = that.devicesarr.find(device => {
return device.name.slice(-12) == that.mac.slice(-12)
})
if (matchedDevice) {
xBlufi.notifyStartDiscoverBle({
'isStart': false
if(this.jieshuflag == true){
this.jieshuflag = false
this.$u.get("/app/order/mineProcessing").then((res) => {
if (res.code == 200) {
if(res.data){
if (this.orderAreaReturnVerify == true) {
if(this.orderobj.deviceOnlineStatus == 0){
this.jieshuflag = true
this.wenbentxtflag = true
this.wenbentxt = '蓝牙连接中...'
let that = this
const findDevice = () =>{
that.ver_dataflag = 2
const matchedDevice = that.devicesarr.find(device => {
return device.name.slice(-12) == that.mac.slice(-12)
})
xBlufi.notifyConnectBle({
isStart: true,
deviceId: matchedDevice.deviceId,
name: matchedDevice.name
})
that.deviceid = matchedDevice.deviceId
that.devicename = matchedDevice.name
setTimeout(()=>{
if(that.ver_dataflag == 3){
that.wenbentxt = ''
that.wenbentxtflag = false
let flag = false
uni.navigateTo({
url: '/page_user/hcshenhe?sn=' + that.orderobj.deviceSn + '&orderid=' + that.orderobj.orderId + '&orderAreaId=' + that.orderobj.orderAreaId + '&flag=' + flag + '&mac=' + that.mac
})
if (matchedDevice) {
xBlufi.notifyStartDiscoverBle({
'isStart': false
})
xBlufi.notifyConnectBle({
isStart: true,
deviceId: matchedDevice.deviceId,
name: matchedDevice.name
})
that.deviceid = matchedDevice.deviceId
that.devicename = matchedDevice.name
setTimeout(()=>{
if(that.ver_dataflag == 3){
that.wenbentxt = ''
that.wenbentxtflag = false
let flag = false
uni.navigateTo({
url: '/page_user/hcshenhe?sn=' + that.orderobj.deviceSn + '&orderid=' + that.orderobj.orderId + '&orderAreaId=' + that.orderobj.orderAreaId + '&flag=' + flag + '&mac=' + that.mac
})
}else{
that.ver_dataflag = 1
that.shibainum = 0
that.wenbentxt = ''
that.wenbentxtflag = false
that.ljsbflag = true
that.chongshinum = '还车'
}
},4000)
} else {
if(that.shibainum < 3){
that.shibainum++
that.findDeviceTimer = setTimeout(findDevice.bind(that), 1000) // 使 bind this
}else{
that.ver_dataflag = 1
that.shibainum = 0
@ -1083,64 +1110,66 @@
that.ljsbflag = true
that.chongshinum = '还车'
}
},4000)
} else {
if(that.shibainum < 3){
that.shibainum++
that.findDeviceTimer = setTimeout(findDevice.bind(that), 1000) // 使 bind this
}else{
that.ver_dataflag = 1
that.shibainum = 0
that.wenbentxt = ''
that.wenbentxtflag = false
that.ljsbflag = true
that.chongshinum = '还车'
}
}
findDevice()
}else{
this.jieshuflag = true
uni.navigateTo({
url: '/page_user/hcshenhe?sn=' + this.orderobj.deviceSn + '&orderid=' + this.orderobj.orderId + '&orderAreaId=' + this.orderobj.orderAreaId + '&flag=' + false
})
}
findDevice()
}else{
uni.navigateTo({
url: '/page_user/hcshenhe?sn=' + this.orderobj.deviceSn + '&orderid=' + this.orderobj.orderId + '&orderAreaId=' + this.orderobj.orderAreaId + '&flag=' + false
})
} else {
uni.getLocation({
type: 'gcj02', //
isHighAccuracy: true,
accuracy:'best',
success: (res) => {
console.log('精确坐标:', res)
this.lat = res.latitude
this.lon = res.longitude
this.lngsc = res.longitude
this.latsc = res.latitude
this.getfeiyong()
},
fail: (err) => {
console.error('获取位置失败:', err)
this.lat = null
this.lon = null
this.lngsc = null
this.latsc = null
this.getfeiyong() //
}
});
}
} else {
uni.getLocation({
type: 'gcj02', //
isHighAccuracy: true,
accuracy:'best',
success: (res) => {
console.log('精确坐标:', res)
this.lat = res.latitude
this.lon = res.longitude
this.getfeiyong()
},
fail: (err) => {
console.error('获取位置失败:', err)
this.lat = null
this.lon = null
this.getfeiyong() //
}
});
}else{
this.jieshuflag = true
uni.navigateTo({
url:'/page_user/yongche/orderxq?id=' + this.orderobj.orderId
})
}
}else{
uni.navigateTo({
url:'/page_user/yongche/orderxq?id=' + this.orderobj.orderId
this.jieshuflag = true
uni.showToast({
title: res.msg,
icon: 'none',
duration: 5000
})
}
}
})
})
}
},
//
getfeiyong() {
let data = {
orderId: this.orderobj.orderId,
lon: this.lonsc,
lon: this.lngsc,
lat: this.latsc,
checkLocation:true
}
this.$u.post(`/app/order/calcFee`, data).then(res => {
if (res.code == 200) {
this.jieshuflag = true
this.fajinobj = res.data
if (res.data.manageFee > 0 || res.data.dispatchFee > 0) {
this.wenbentxt = ''
@ -1156,19 +1185,31 @@
icon: 'none',
duration: 5000
})
setTimeout(()=>{
this.jieshuflag = true
},3000)
}else if(res.code == 30002){
uni.showToast({
title: '不允许在禁停区内还车',
icon: 'none',
duration: 5000
})
setTimeout(()=>{
this.jieshuflag = true
},3000)
}else if(res.code == 30003){
uni.showToast({
title: '必须在运营区内还车',
icon: 'none',
duration: 5000
})
setTimeout(()=>{
this.jieshuflag = true
},3000)
}else{
setTimeout(()=>{
this.jieshuflag = true
},3000)
uni.showToast({
title: res.msg,
icon: 'none',
@ -1196,7 +1237,7 @@
let data = {
orderId: that.orderobj.orderId,
picture: that.imgs,
lon: that.lonsc,
lon: that.lngsc,
lat: that.latsc,
requiredIot: true
}
@ -2072,14 +2113,14 @@
console.log('订单设备定时器已停止')
}
},
//
getkefu() {
this.$u.get(`/app/customerService/list?pageNum=1&pageSize=999`).then(res => {
if (res.code == 200) {
this.kefulist = res.rows
}
})
},
// //
// getkefu() {
// this.$u.get(`/app/customerService/list?pageNum=1&pageSize=999`).then(res => {
// if (res.code == 200) {
// this.kefulist = res.rows
// }
// })
// },
//
btndetaxq() {
this.$u.get(`/getInfo`).then(res => {

View File

@ -153,7 +153,7 @@
},
onShow() {
this.getareaList()
this.getkefu()
// this.getkefu()
// this.getlunbo()
},
methods: {
@ -204,14 +204,7 @@
}
})
},
//
getkefu(){
this.$u.get(`/app/customerService/list?pageNum=1&pageSize=999`).then(res =>{
if(res.code == 200){
this.kefulist = res.rows
}
})
},
handleSearch(e) {
const value = e.detail.value;

View File

@ -14,21 +14,6 @@
</view>
<!-- 右侧图标 -->
<view class="rticon">
<!-- <image v-if="rtindex != 1" src="https://api.ccttiot.com/smartmeter/img/static/uyNPBYUMjYxybfRLHyu9"
@click="btntap(1)" mode=""></image>
<image v-if="rtindex == 1" src="https://api.ccttiot.com/smartmeter/img/static/u8zXd0xYhLKD0BvgZDVv"
@click="btntap(1)" mode=""></image>
<image v-if="rtindex != 2" :src="iconobj.bikertpic"
@click="btntap(2)" mode=""></image>
<image v-if="rtindex == 2" :src="iconobj.bikertpicgl"
@click="btntap(2)" mode=""></image>
<image v-if="rtindex != 3" src="https://api.ccttiot.com/smartmeter/img/static/uwIWeuTVbjFLNmLTGPOh"
@click="btntap(3)" mode=""></image>
<image v-if="rtindex == 3" src="https://api.ccttiot.com/smartmeter/img/static/uEWVQFGBf10XJn8aTlaZ"
@click="btntap(3)" mode=""></image>
<image style="width: 80rpx;height: 80rpx;" @click="toggleIconAndCallout"
src="https://api.ccttiot.com/smartmeter/img/static/uZT6o9OqOdZeXHLYszIg" mode=""></image>
<image style="width: 80rpx;height: 80rpx;" src="https://api.ccttiot.com/smartmeter/img/static/uDnm3dpbwMh9jLBRMeZw" @click="btnhuiz" mode=""></image> -->
<image v-if="rtindex != 1" src="https://api.ccttiot.com/smartmeter/img/static/uRtmbcCSrLLZ7hkGFeg2"
@click="btntap(1)" mode=""></image>
<image v-if="rtindex == 1" src="https://api.ccttiot.com/smartmeter/img/static/u8zXd0xYhLKD0BvgZDVv"
@ -127,37 +112,6 @@
</view>
</view>
<view class="clmask" v-if="taocanflag"></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: 170rpx;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>
<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="wz">
平台客服工作时间
</view>
<view class="wz">
0800~2000
</view>
<view class="wzs">
客服电话高峰期可能遇忙请耐心等待
</view>
</view>
</view>
</view>
<view class="mask" v-if="kefuflag"></view>
<view class="mask" v-if="fjflag"></view>
<!-- 公告 -->
<view class="gonggao" @click="btntopgg">
@ -236,7 +190,7 @@
<view class="" style="margin-top: 20rpx;font-weight: 600;color: #3D3D3D;" v-if="kefuarr.length > 0">
骑行前咨询:
</view>
<view class="top" v-for="(item,index) in kefuarr" :key="index">
<view class="top" v-for="(item,index) in kefuarr" :key="index" v-if="orderflag == false">
<view class="dianhua">
{{item.name == null ? '--' : item.name}}{{item.contact == null ? '--' : item.contact}}
<view class="wz">
@ -374,8 +328,6 @@
},
onShow() {
this.getinfo()
uni.getLocation({
type: 'wgs84',
success: (res) => {
@ -395,7 +347,6 @@
this.setMapScale()
this.getgonggao()
this.getlunbo()
this.getkefu()
},1000)
this.polyline = []
this.isFirstLoad = true //
@ -555,7 +506,6 @@
url:'/page_fenbao/storedlist/trueorder?modelId=' + this.modelId + '&sn=' + this.sn
})
}else{
console.log('前台');
uni.showModal({
title: '提示',
content: '当前车辆不可用',
@ -589,22 +539,19 @@
//
btnkf(){
if(this.kefulist.length > 0){
this.kefuflag = true
}else{
uni.showToast({
title: '当前暂无客服',
icon: 'none',
duration: 2000
})
}
},
//
getkefu(){
this.$u.get(`/app/customerService/indexList?radius=1000&center=${this.jinweidu}&areaId=${this.user.areaId}`).then(res => {
if(res.code == 200){
this.kefulist = res.after
this.kefuarr = res.before
if(this.kefulist.length > 0 || this.kefuarr.length > 0){
this.kefuflag = true
}else{
uni.showToast({
title: '当前暂无客服',
icon: 'none',
duration: 2000
})
}
}
})
},
@ -958,9 +905,9 @@
},
//
btnptkf() {
btnptkf(contact) {
uni.makePhoneCall({
phoneNumber: '18888888888',
phoneNumber: contact,
success: function(res) {
console.log('拨打电话成功', res)
},
@ -1504,7 +1451,6 @@
.select-item {
display: flex;
// flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 20rpx 30rpx;
@ -1545,7 +1491,7 @@
}
}
.top{
width: 538rpx;
width: 570rpx;
height: 122rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.1);
@ -2111,16 +2057,6 @@
}
}
}
image {
position: absolute;
top: -280rpx;
z-index: -1;
left: 50%;
transform: translateX(-50%);
width: 614rpx;
height: 748rpx;
}
}
.mask {
@ -2326,11 +2262,7 @@
.anniuks {
width: 100%;
// height: 184rpx;
// background: #FFFFFF;
text-align: center;
// line-height: 184rpx;
text {
display: inline-block;
width: 680rpx;