fix: status
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 55s

This commit is contained in:
sexygoat
2026-04-15 17:16:40 +08:00
parent 6916be02da
commit 727c4126dd

View File

@@ -1,6 +1,7 @@
<template> <template>
<view class="container"> <view class="container">
<UserInfoCard :currentCardNo="currentCardNo" :deviceInfo="deviceInfo" :onlineStatus="onlineStatus" :isDevice="userInfo.isDevice" :networkStatus="deviceInfo.network_status" /> <UserInfoCard :currentCardNo="currentCardNo" :deviceInfo="deviceInfo" :onlineStatus="onlineStatus"
:isDevice="userInfo.isDevice" :networkStatus="deviceInfo.network_status" />
<DeviceStatusCard v-if="userInfo.isDevice" :deviceInfo="deviceInfo" :isRealName="isRealName" <DeviceStatusCard v-if="userInfo.isDevice" :deviceInfo="deviceInfo" :isRealName="isRealName"
@authentication="enterDetail('authentication')" /> @authentication="enterDetail('authentication')" />
@@ -145,6 +146,7 @@
battery: 0, battery: 0,
connect: 0, connect: 0,
network_status: 1, network_status: 1,
status: 1,
expireDate: '-', expireDate: '-',
currentIccid: '-', currentIccid: '-',
category: '-', category: '-',
@@ -215,6 +217,7 @@
userInfo.isDevice = data.asset_type === 'device'; userInfo.isDevice = data.asset_type === 'device';
currentCardNo.value = data.identifier || '-'; currentCardNo.value = data.identifier || '-';
deviceInfo.network_status = data.network_status; deviceInfo.network_status = data.network_status;
deviceInfo.status = data.status;
deviceInfo.imei = data.imei || '-'; deviceInfo.imei = data.imei || '-';
deviceInfo.asset_type = data.asset_type || 'device'; deviceInfo.asset_type = data.asset_type || 'device';
deviceInfo.bound_phone = data.bound_phone || ''; deviceInfo.bound_phone = data.bound_phone || '';
@@ -292,7 +295,8 @@
if (activePackage && activePackage.expires_at) { if (activePackage && activePackage.expires_at) {
// 格式化到期时间 // 格式化到期时间
const date = new Date(activePackage.expires_at); const date = new Date(activePackage.expires_at);
deviceInfo.expireDate = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`; deviceInfo.expireDate =
`${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
} else { } else {
deviceInfo.expireDate = '-'; deviceInfo.expireDate = '-';
} }
@@ -325,7 +329,8 @@
}; };
const connectKF = () => { const connectKF = () => {
const kfUrl = 'https://work.weixin.qq.com/kfid/kfc0fd79f27686fb65e?enc_scene=ENCfR9AVui6UfvvxySGVuvaG&scene_param=commonlink'; const kfUrl =
'https://work.weixin.qq.com/kfid/kfc0fd79f27686fb65e?enc_scene=ENCfR9AVui6UfvvxySGVuvaG&scene_param=commonlink';
// #ifdef H5 // #ifdef H5
window.location.href = kfUrl; window.location.href = kfUrl;
@@ -334,7 +339,9 @@
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
// 微信小程序跳转到企业微信客服 // 微信小程序跳转到企业微信客服
wx.openCustomerServiceChat({ wx.openCustomerServiceChat({
extInfo: { url: kfUrl }, extInfo: {
url: kfUrl
},
corpId: 'ww4e3b7f9f7c8a9b0c', corpId: 'ww4e3b7f9f7c8a9b0c',
success: () => { success: () => {
console.log('打开客服会话成功'); console.log('打开客服会话成功');
@@ -360,7 +367,10 @@
uni.setClipboardData({ uni.setClipboardData({
data: kfUrl, data: kfUrl,
success: () => { success: () => {
uni.showToast({ title: '客服链接已复制', icon: 'success' }); uni.showToast({
title: '客服链接已复制',
icon: 'success'
});
} }
}); });
} }
@@ -395,7 +405,10 @@
uni.setClipboardData({ uni.setClipboardData({
data: url, data: url,
success: () => { success: () => {
uni.showToast({ title: '地址已复制', icon: 'success' }); uni.showToast({
title: '地址已复制',
icon: 'success'
});
} }
}); });
} }