This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view class="container">
|
||||
<UserInfoCard :currentCardNo="currentCardNo" :deviceInfo="deviceInfo" :onlineStatus="onlineStatus"
|
||||
:isDevice="userInfo.isDevice" :networkStatus="deviceInfo.network_status"
|
||||
:isExpiring="deviceInfo.isExpiring" :expiryDays="deviceInfo.expiryDays" />
|
||||
:isExpiring="deviceInfo.isExpiring" :expiryDays="deviceInfo.expiryDays" @renew="startHomepageRenewal" />
|
||||
|
||||
<DeviceStatusCard v-if="userInfo.isDevice" :deviceInfo="deviceInfo" :isRealName="isRealName"
|
||||
:isDevice="userInfo.isDevice" @authentication="enterDetail('authentication')" />
|
||||
@@ -156,6 +156,7 @@
|
||||
network_status: 1,
|
||||
status: 1,
|
||||
packageName: '-',
|
||||
currentPackageId: 0,
|
||||
expireDate: '-',
|
||||
isExpiring: false,
|
||||
expiryDays: null,
|
||||
@@ -251,10 +252,11 @@
|
||||
deviceInfo.network_status = data.network_status;
|
||||
deviceInfo.status = data.status;
|
||||
deviceInfo.imei = data.imei || '-';
|
||||
deviceInfo.asset_type = data.asset_type || 'device';
|
||||
deviceInfo.bound_phone = data.bound_phone || '';
|
||||
deviceInfo.packageName = data.current_package || '-';
|
||||
deviceInfo.expireDate = formatDate(data.estimated_final_expires_at);
|
||||
deviceInfo.asset_type = data.asset_type || 'device';
|
||||
deviceInfo.bound_phone = data.bound_phone || '';
|
||||
deviceInfo.packageName = data.current_package || '-';
|
||||
deviceInfo.currentPackageId = Number(data.current_package_id || 0);
|
||||
deviceInfo.expireDate = formatDate(data.estimated_final_expires_at);
|
||||
deviceInfo.isExpiring = data.is_expiring === true;
|
||||
deviceInfo.expiryDays = data.days_until_final_expiry ?? null;
|
||||
deviceInfo.expiryEstimateStatus = data.expiry_estimate_status || 'none';
|
||||
@@ -350,6 +352,18 @@
|
||||
}
|
||||
};
|
||||
|
||||
const startHomepageRenewal = () => {
|
||||
const packageId = Number(deviceInfo.currentPackageId || 0);
|
||||
if (!packageId) {
|
||||
uni.showToast({ title: '当前资产暂无可续费套餐', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const packageName = deviceInfo.packageName === '-' ? '' : deviceInfo.packageName;
|
||||
const query = `renewal_package_ids=${encodeURIComponent(String(packageId))}&renewal_package_names=${encodeURIComponent(packageName)}`;
|
||||
uni.navigateTo({ url: `/pages/package-order/package-order?${query}` });
|
||||
};
|
||||
|
||||
const modifyWifi = () => {
|
||||
wifi_info.ssid = deviceInfo.ssidName;
|
||||
wifi_info.pwd = deviceInfo.ssidPwd;
|
||||
|
||||
Reference in New Issue
Block a user