diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..866e8ee
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+*.html linguist-detectable=false
+*.vue linguist-detectable=true
diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml
index 33ef0da..4891842 100644
--- a/.gitea/workflows/deploy.yaml
+++ b/.gitea/workflows/deploy.yaml
@@ -3,7 +3,7 @@ name: 构建并部署前端到生产环境
on:
push:
branches:
- - main
+ - develop
- dev
- test
@@ -28,7 +28,7 @@ jobs:
- name: 设置镜像标签
id: tag
run: |
- if [ "${{ github.ref }}" = "refs/heads/main" ]; then
+ if [ "${{ github.ref }}" = "refs/heads/develop" ]; then
echo "tag=latest" >> $GITHUB_OUTPUT
elif [ "${{ github.ref }}" = "refs/heads/dev" ]; then
echo "tag=dev" >> $GITHUB_OUTPUT
@@ -52,8 +52,8 @@ jobs:
docker push ${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }}
docker push ${{ env.IMAGE_NAME }}:${{ github.sha }}
- - name: 部署到本地(仅 main 分支)
- if: github.ref == 'refs/heads/main'
+ - name: 部署到本地(仅 develop 分支)
+ if: github.ref == 'refs/heads/develop'
run: |
mkdir -p ${{ env.DEPLOY_DIR }}
diff --git a/.gitignore b/.gitignore
index 71e2bf4..9fc774f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,9 +2,22 @@
logs
*.log
npm-debug.log*
+npminstall-debug.log
yarn-debug.log*
yarn-error.log*
+# Common local files
+dist-ssr
+*.local
+.cursorrules
+.claude
+.codex
+.env.development
+.env.production
+.scratch
+.agents
+Thumbs.db
+
# Runtime data
pids
*.pid
@@ -91,4 +104,4 @@ dist/
# OS
.DS_Store
-Thumbs.db
\ No newline at end of file
+Thumbs.db
diff --git a/App.vue b/App.vue
index 6737a67..914dd7f 100644
--- a/App.vue
+++ b/App.vue
@@ -7,13 +7,18 @@
\ No newline at end of file
+
diff --git a/components/FunctionCard.vue b/components/FunctionCard.vue
index be23dd3..5831030 100644
--- a/components/FunctionCard.vue
+++ b/components/FunctionCard.vue
@@ -1,16 +1,10 @@
-
-
+
{{ realNameStatus || '实名认证' }}
@@ -18,48 +12,56 @@
-
+
- 运营数据同步
+ 数据同步
-
+
套餐订购
+
+
+
+ {{ unreadCount > 99 ? '99+' : unreadCount }}
+
+ 站内通知
+
-
+
我的订单
-
+
后台管理
-
+
切换运营商
-
+
- 资产套餐历史
+ 历史套餐
-
+
{{ alreadyBindPhone ? '已绑定' : '未绑定' }}
@@ -68,42 +70,42 @@
-
+
更换手机号
-
+
换货
-
+
{{ walletText }}
-
+
重启设备
-
+
恢复出厂
-
+
退出登录
@@ -132,6 +134,10 @@
walletBalance: {
type: [Number, String],
default: 0
+ },
+ unreadCount: {
+ type: Number,
+ default: 0
}
});
@@ -164,8 +170,8 @@
.function-grid {
display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: 16rpx;
+ grid-template-columns: repeat(4, 1fr);
+ gap: 12rpx;
width: 100%;
.function-item {
@@ -173,11 +179,11 @@
flex-direction: column;
align-items: center;
justify-content: center;
- padding: 20rpx;
+ padding: 16rpx 8rpx;
.function-icon {
- width: 120rpx;
- height: 120rpx;
+ width: 64rpx;
+ height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
@@ -186,14 +192,52 @@
width: 100%;
height: 100%;
}
+
+ .function-image {
+ transform-origin: center;
+ }
+
+ .icon-authentication,
+ .icon-shop,
+ .icon-back,
+ .icon-change-phone,
+ .icon-wallet,
+ .icon-restart {
+ transform: scale(0.9);
+ }
+
+ .icon-data { transform: scale(1.06); }
+ .icon-notification,
+ .icon-change,
+ .icon-asset-package { transform: scale(1.01); }
+ .icon-order,
+ .icon-recover { transform: scale(0.91); }
+ .icon-bind-phone { transform: scale(0.93); }
+ .icon-out { transform: scale(0.97); }
+ }
+
+ .function-icon-badge { position: relative; }
+ .unread-badge {
+ position: absolute;
+ top: -8rpx;
+ right: -12rpx;
+ min-width: 34rpx;
+ height: 34rpx;
+ padding: 0 8rpx;
+ border-radius: 20rpx;
+ background: var(--danger);
+ color: #fff;
+ font-size: 18rpx;
+ line-height: 34rpx;
+ text-align: center;
}
.function-name {
- font-size: 28rpx;
+ font-size: 24rpx;
font-weight: 500;
color: var(--text-primary);
text-align: center;
- margin-top: 15rpx;
+ margin-top: 12rpx;
}
}
}
diff --git a/components/NotificationPopup.vue b/components/NotificationPopup.vue
new file mode 100644
index 0000000..064826d
--- /dev/null
+++ b/components/NotificationPopup.vue
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+
diff --git a/components/RenewalPaymentPopup.vue b/components/RenewalPaymentPopup.vue
new file mode 100644
index 0000000..2415129
--- /dev/null
+++ b/components/RenewalPaymentPopup.vue
@@ -0,0 +1,510 @@
+
+
+
+
+
+
+
+
+
diff --git a/components/UserInfoCard.vue b/components/UserInfoCard.vue
index 04bf72d..06ff347 100644
--- a/components/UserInfoCard.vue
+++ b/components/UserInfoCard.vue
@@ -2,11 +2,21 @@
-
+
{{ currentCardNo || '-' }}
+
+
+
+ ICCID:{{ deviceInfo.iccid || '-' }}
+
套餐名称:{{ deviceInfo.packageName || '-' }}
- 套餐到期时间:{{ deviceInfo.expireDate || '-' }}
+
+ 套餐到期时间:{{ deviceInfo.expireDate || '-' }}
+ (剩余 {{ expiryDays }} 天)
+
{{ onlineStatus }}
@@ -15,27 +25,70 @@
{{ networkStatus == 1 ? '正常' : '停机' }}
+ 立即续费
diff --git a/components/WifiCard.vue b/components/WifiCard.vue
index 7cb20ae..ca08954 100644
--- a/components/WifiCard.vue
+++ b/components/WifiCard.vue
@@ -3,7 +3,8 @@
@@ -12,25 +13,27 @@
网络名称
{{ deviceInfo.ssidName }}
-
连接密码
{{ deviceInfo.ssidPwd }}
-
diff --git a/pages/asset-package-history/asset-package-history.vue b/pages/asset-package-history/asset-package-history.vue
index 62d2258..4647b4f 100644
--- a/pages/asset-package-history/asset-package-history.vue
+++ b/pages/asset-package-history/asset-package-history.vue
@@ -1,8 +1,11 @@
-
- 📦
+
+
+
+
+
暂无套餐记录
当前账号下暂无套餐历史信息
@@ -69,6 +72,7 @@
let packageList = reactive([]);
let loading = ref(false);
+ let historyLoaded = ref(false);
let noMore = ref(false);
let page = ref(1);
const pageSize = 10;
@@ -161,6 +165,7 @@
console.error('加载套餐历史失败', e);
}
loading.value = false;
+ historyLoaded.value = true;
};
const loadMore = () => {
@@ -176,6 +181,13 @@
diff --git a/pages/device-exchange/device-exchange.vue b/pages/device-exchange/device-exchange.vue
index 0d469d0..07e305b 100644
--- a/pages/device-exchange/device-exchange.vue
+++ b/pages/device-exchange/device-exchange.vue
@@ -1,7 +1,10 @@
-
-
+
+
+
+
+
暂无换货记录
当前账号下暂无换货记录
@@ -91,7 +94,9 @@
收件人电话
@@ -156,6 +161,7 @@
const exchangeData = ref(null);
const loading = ref(false);
+ const exchangeLoaded = ref(false);
const showPopup = ref(false);
const showAreaPicker = ref(false);
const areaPickerColumns = ref([]);
@@ -188,6 +194,24 @@
return String(time).split('T').join(' ').slice(0, 19);
};
+ const getRecipientPhone = () => String(form.recipient_phone || '').trim();
+
+ const validateRecipientPhone = () => {
+ const phone = getRecipientPhone();
+
+ if (!phone) {
+ uni.showToast({ title: '请输入收件人电话', icon: 'none' });
+ return '';
+ }
+
+ if (!PHONE_REG.test(phone)) {
+ uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
+ return '';
+ }
+
+ return phone;
+ };
+
const syncAreaPickerState = (regionCodes = []) => {
const { columns, defaultIndex } = buildRegionColumns(regionCodes);
areaPickerColumns.value = columns;
@@ -204,6 +228,7 @@
exchangeData.value = null;
} finally {
loading.value = false;
+ exchangeLoaded.value = true;
}
};
@@ -307,15 +332,8 @@
return;
}
- if (!form.recipient_phone.trim()) {
- uni.showToast({ title: '请输入收件人电话', icon: 'none' });
- return;
- }
-
- if (!PHONE_REG.test(form.recipient_phone.trim())) {
- uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
- return;
- }
+ const recipientPhone = validateRecipientPhone();
+ if (!recipientPhone) return;
if (form.recipient_region_codes.length !== 3) {
uni.showToast({ title: '请选择省市区', icon: 'none' });
@@ -336,7 +354,7 @@
await exchangeApi.submitShippingInfo(
exchangeData.value.id,
form.recipient_name.trim(),
- form.recipient_phone.trim(),
+ recipientPhone,
recipientAddress
);
uni.showToast({ title: '提交成功', icon: 'success' });
@@ -355,6 +373,13 @@
diff --git a/pages/notifications/notifications.vue b/pages/notifications/notifications.vue
new file mode 100644
index 0000000..1f03753
--- /dev/null
+++ b/pages/notifications/notifications.vue
@@ -0,0 +1,178 @@
+
+
+
+ 共 {{ total }} 条通知
+
+
+
+
+
+
+
+
+ 暂无通知
+ 当前没有可查看的业务通知
+
+
+
+
+
+ {{ item.body || '-' }}
+
+
+
+
+
+ 加载中...
+ 没有更多了
+ 点击加载更多
+
+
+
+
+
+
+
diff --git a/pages/order-list/order-list.vue b/pages/order-list/order-list.vue
index 4efe3ef..b375bc4 100644
--- a/pages/order-list/order-list.vue
+++ b/pages/order-list/order-list.vue
@@ -1,6 +1,7 @@
+
{{ item.label }}
-
-
-
- ORD
+
+
+
+
+
暂无订单
当前账号下暂无订单信息
@@ -23,11 +25,9 @@
+
+
diff --git a/pages/package-order/package-order.vue b/pages/package-order/package-order.vue
index fe2306f..167e96e 100644
--- a/pages/package-order/package-order.vue
+++ b/pages/package-order/package-order.vue
@@ -1,36 +1,50 @@
-
- PKG
- 暂无可购套餐,请联系客服
- 当前资产暂无适用的套餐
-
+
+
-
-