feat:新增地图视图效果,接口待对接
This commit is contained in:
+19
-10
@@ -29,7 +29,7 @@
|
||||
<text class="item-value">{{ deviceLocation }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-item">
|
||||
<!-- <view class="card-item">
|
||||
<view class="item-icon battery-icon" :class="{ 'battery-low': batteryLevel < 20 }">
|
||||
<image src="/static/images/Electricity.svg" mode="aspectFill"
|
||||
style="width: 45rpx;height: 45rpx;"></image>
|
||||
@@ -38,7 +38,7 @@
|
||||
<text class="item-label">电池电量</text>
|
||||
<text class="item-value">{{ batteryLevel }}%</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -158,7 +158,8 @@
|
||||
onMounted
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad
|
||||
onLoad,
|
||||
onShow
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
getDeviceInfo,
|
||||
@@ -195,14 +196,22 @@
|
||||
|
||||
// 生命周期 onLoad 钩子
|
||||
onLoad((options) => {
|
||||
deviceId.value = options.deviceNo
|
||||
if (options.deviceNo != uni.getStorageSync('deviceId') || !uni.getStorageSync('deviceId')) {
|
||||
deviceId.value = options.deviceNo
|
||||
uni.setStorageSync('deviceId', options.deviceNo)
|
||||
} else {
|
||||
deviceId.value = uni.getStorageSync('deviceId')
|
||||
// uni.removeStorageSync('deviceId')
|
||||
}
|
||||
checkOrderStatus()
|
||||
console.log(options.deviceNo)
|
||||
fetchDeviceInfo()
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
checkUserPhone()
|
||||
onMounted(async () => {
|
||||
await checkUserPhone()
|
||||
})
|
||||
|
||||
onShow(async () => {
|
||||
await fetchDeviceInfo()
|
||||
})
|
||||
|
||||
const checkUserPhone = async () => {
|
||||
@@ -334,8 +343,8 @@
|
||||
deviceStatus.class = 'offline'
|
||||
}
|
||||
}
|
||||
console.log('feeconfig',deviceInfo.value.feeConfig);
|
||||
|
||||
console.log('feeconfig', deviceInfo.value.feeConfig);
|
||||
|
||||
deviceFeeConfig.value = JSON.parse(deviceInfo.value.feeConfig)[0] || {}
|
||||
}
|
||||
}
|
||||
|
||||
+754
-472
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user