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

This commit is contained in:
sexygoat
2026-04-24 10:27:35 +08:00
parent 1d6c12e8d7
commit 42f4d9f96a
3 changed files with 51 additions and 48 deletions

View File

@@ -3,7 +3,7 @@
<!-- 自定义导航栏 --> <!-- 自定义导航栏 -->
<view v-if="!fromLogin" class="custom-navbar"> <view v-if="!fromLogin" class="custom-navbar">
<view class="navbar-back" @tap="goBack"> <view class="navbar-back" @tap="goBack">
<text class="back-text">🔙</text> <image class="back-icon" src="../../static/left.png" mode="aspectFit" />
</view> </view>
<view class="navbar-title">绑定手机号</view> <view class="navbar-title">绑定手机号</view>
<view class="navbar-placeholder"></view> <view class="navbar-placeholder"></view>
@@ -164,8 +164,8 @@
cursor: pointer; cursor: pointer;
.back-icon { .back-icon {
font-size: 36rpx; width: 40rpx;
color: var(--text-primary); height: 40rpx;
} }
.back-text { .back-text {

View File

@@ -593,52 +593,55 @@
return; return;
} }
uni.showLoading({ uni.showModal({
title: '同步中...', title: '确认同步',
mask: true content: '确定要同步运营商数据吗?',
success: (res) => {
if (!res.confirm) return;
uni.showLoading({
title: '同步中...',
mask: true
});
assetApi.refresh(identifier).then((data) => {
uni.hideLoading();
if (data.accepted) {
const refreshTypeText = data.refresh_type === 'device' ? '设备' : '卡';
uni.showToast({
title: `${refreshTypeText}数据同步成功`,
icon: 'success',
duration: 2000
});
setTimeout(() => {
loadAssetInfo();
}, 2000);
} else {
uni.showToast({
title: '同步失败,请稍后重试',
icon: 'none'
});
}
}).catch((e) => {
uni.hideLoading();
console.error('同步数据失败', e);
if (e.msg && e.msg.includes('冷却')) {
uni.showToast({
title: e.msg,
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: '同步失败',
icon: 'none'
});
}
});
}
}); });
try {
const data = await assetApi.refresh(identifier);
uni.hideLoading();
if (data.accepted) {
const refreshTypeText = data.refresh_type === 'device' ? '设备' : '卡';
uni.showToast({
title: `${refreshTypeText}数据同步成功`,
icon: 'success',
duration: 2000
});
// 同步成功后,延迟重新加载资产信息
setTimeout(() => {
loadAssetInfo();
}, 2000);
} else {
uni.showToast({
title: '同步失败,请稍后重试',
icon: 'none'
});
}
} catch (e) {
uni.hideLoading();
console.error('同步数据失败', e);
// 如果是冷却时间错误,显示提示
if (e.msg && e.msg.includes('冷却')) {
uni.showToast({
title: e.msg,
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: '同步失败',
icon: 'none'
});
}
}
}; };
const enterDetail = (name) => { const enterDetail = (name) => {

BIN
static/left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB