From 56772970e21c150810efbc44ca857a71d5229251 Mon Sep 17 00:00:00 2001
From: fuchao <2577131060@qq.com>
Date: Thu, 18 Dec 2025 14:03:01 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E8=AE=BF=E5=AE=A2=E6=A8=A1=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/course/index.vue | 7 ++++++-
pages/login/login.vue | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/pages/course/index.vue b/pages/course/index.vue
index c7695e3..76ae958 100644
--- a/pages/course/index.vue
+++ b/pages/course/index.vue
@@ -459,7 +459,12 @@ const requestAll = async () => {
onMounted(() => {
// 重置分类索引
currentIndex.value = 0
-
+ if(!uni.getStorageSync('state') && !uni.getStorageSync('token')) {
+ uni.navigateTo({
+ url: '/pages/login/login'
+ });
+ }
+ if(uni.getStorageSync('state')) uni.removeStorageSync('state')
// 请求所有数据
requestAll()
})
diff --git a/pages/login/login.vue b/pages/login/login.vue
index d02c9a4..a10b9d9 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -401,6 +401,7 @@ const yszc = () => {
* 页面跳转
*/
const onPageSwitch = (url: string) => {
+ uni.setStorageSync('state', 'true');
uni.switchTab({
url: url,
})
@@ -446,7 +447,6 @@ const getOS = () =>{
const oprateOs = uni.getSystemInfoSync().platform
console.log(oprateOs, 'oprateOs');
isAndorid.value = oprateOs === "android" ? true : false
- console.log(isAndorid.value);
}
onMounted(() => {
From 4df53c611bb680aa2f57137c8054f117239617ad Mon Sep 17 00:00:00 2001
From: fuchao <2577131060@qq.com>
Date: Thu, 18 Dec 2025 15:30:23 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=90=8E?=
=?UTF-8?q?=E5=8F=B0=E6=93=8D=E4=BD=9C,=E5=85=85=E5=80=BC=E3=80=81?=
=?UTF-8?q?=E7=A7=AF=E5=88=86=E5=8A=9F=E8=83=BD=E3=80=82=E6=89=8B=E6=9C=BA?=
=?UTF-8?q?=E7=AB=AF=E8=BF=9B=E8=A1=8C=E9=99=90=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
locale/en.json | 4 +++-
locale/zh-Hans.json | 4 +++-
pages/user/points/index.vue | 16 ++++++++++------
pages/user/virtual/index.vue | 14 +++++++++-----
4 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/locale/en.json b/locale/en.json
index afcee3f..46be2bf 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -234,7 +234,9 @@
"certificate": "My certificate",
"iHufen": "My lake",
"hufenRecord": "Lake division record",
- "hufen": "Hufen"
+ "hufen": "Hufen",
+ "backEnd" : "Back-end recharge",
+ "cannotView" : "The recharge in the background cannot be viewed"
},
"book": {
"title": "My Books",
diff --git a/locale/zh-Hans.json b/locale/zh-Hans.json
index 538f917..26236a1 100644
--- a/locale/zh-Hans.json
+++ b/locale/zh-Hans.json
@@ -235,7 +235,9 @@
"certificate": "我的证书",
"iHufen": "我的湖分",
"hufenRecord": "湖分记录",
- "hufen": "湖分"
+ "hufen": "湖分",
+ "backEnd" : "后台充值",
+ "cannotView" : "后台充值无法查看"
},
"book": {
"title": "我的书单",
diff --git a/pages/user/points/index.vue b/pages/user/points/index.vue
index 4870704..73b957e 100644
--- a/pages/user/points/index.vue
+++ b/pages/user/points/index.vue
@@ -12,11 +12,11 @@
{{$t('order.pointsRecord')}}
- {{item.remark.slice(0, (item.remark.indexOf(',')))}}{{item.relationId ? item.remark.slice(0, (item.remark.indexOf(','))) : $t('user.backEnd')}}{{item.actType === 1 ? '' : '+'}}{{item.changeAmount}}
{{item.createTime}}
- {{item.remark.slice((item.remark.indexOf(','))+1)}}{{item.remark.slice((item.remark.indexOf(','))+1)}}
@@ -69,10 +69,14 @@
* 跳转订单详情
*/
const toDetails = (order: IOrder) => {
- console.log(order.relationId, "order");
- uni.navigateTo({
- url: '/pages/user/order/details?orderId=' + order.relationId
- })
+ if (order.relationId) {
+ uni.navigateTo({
+ url: '/pages/user/order/details?orderId=' + order.relationId
+ })
+ } else {
+ uni.showToast({ title: t('user.cannotView'), icon: 'none' });
+ }
+
}
diff --git a/pages/user/virtual/index.vue b/pages/user/virtual/index.vue
index 2e1cf01..3cbc5bb 100644
--- a/pages/user/virtual/index.vue
+++ b/pages/user/virtual/index.vue
@@ -19,7 +19,7 @@
:class="item.orderType !== '充值' ? 'text1' : 'text2'">{{item.orderType !== '充值' ? '' : '+'}}{{item.changeAmount}}
{{item.productName}}
- {{$t('user.orderSn')}}:{{item.payNo}}{{$t('user.orderSn')}}:{{item.payNo}}
{{item.createTime}}
@@ -75,10 +75,14 @@
* 跳转订单详情
*/
const toDetails = (order: IOrder) => {
- console.log(order.relationId, "order");
- uni.navigateTo({
- url: '/pages/user/order/details?orderId=' + order.relationId
- })
+ if (order.relationId) {
+ uni.navigateTo({
+ url: '/pages/user/order/details?orderId=' + order.relationId
+ })
+ } else {
+ uni.showToast({ title: t('user.cannotView'), icon: 'none' });
+ }
+
}