From 73639d511ea095a8e12aab0eb81edcc0e8f6f42b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com>
Date: Fri, 17 Mar 2023 17:17:34 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/request.js | 10 ++++++----
pages/CommodityOrder/CommodityOrder.vue | 11 +++++------
.../Nursingstationserviceorder.vue | 11 +++++------
pages/integral/integral.vue | 12 +++++++++---
pages/startup/startup.vue | 6 +++---
5 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/api/request.js b/api/request.js
index 193e62c..063a05c 100644
--- a/api/request.js
+++ b/api/request.js
@@ -21,10 +21,12 @@ var request = function(config) {
uni.removeStorageSync('phone');
let pages = getCurrentPages();
let path = pages[pages.length - 1].$page.fullPath
- if (path == '/pages/integral/integral') {} else if (path ==
- '/pages/CommodityOrder/CommodityOrder') {} else if (path ==
- '/pages/coupon/coupon') {} else if (path ==
- '/pages/Nursingstationserviceorder/Nursingstationserviceorder') {} else {
+ let paths = path.split('?')
+ console.log(paths)
+ if (paths == '/pages/integral/integral' || paths ==
+ '/pages/shopping/shopping' || paths ==
+ '/pages/coupon/coupon' || paths ==
+ '/pages/materialbenefits/materialbenefits') {} else {
uni.navigateTo({
url: '/pages/login/login'
})
diff --git a/pages/CommodityOrder/CommodityOrder.vue b/pages/CommodityOrder/CommodityOrder.vue
index cb5b352..f61ec28 100644
--- a/pages/CommodityOrder/CommodityOrder.vue
+++ b/pages/CommodityOrder/CommodityOrder.vue
@@ -274,12 +274,6 @@
this.pageNum = 1;
this.baseurl = baseurl;
let that = this
- const value = uni.getStorageSync('openid');
- if (value) {} else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
const value3 = uni.getStorageSync('Refresh');
if (value3) {
that.goodsOrderinfo();
@@ -310,6 +304,11 @@
} else {
that.goodsOrderinfo();
}
+ }else{
+ that.$refs.uToast.show({
+ title: '未登录,请先登录',
+ type: 'error',
+ })
}
},
onReachBottom() { //下滑加载
diff --git a/pages/Nursingstationserviceorder/Nursingstationserviceorder.vue b/pages/Nursingstationserviceorder/Nursingstationserviceorder.vue
index 33962b2..6d2777e 100644
--- a/pages/Nursingstationserviceorder/Nursingstationserviceorder.vue
+++ b/pages/Nursingstationserviceorder/Nursingstationserviceorder.vue
@@ -116,12 +116,6 @@
if (value3) {
that.getinfo();
}
- const value = uni.getStorageSync('openid');
- if (value) {} else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
},
onLoad() {
let that = this
@@ -132,6 +126,11 @@
that.patientId = value
that.openid = value2
that.getinfo()
+ } else {
+ this.$refs.uToast.show({
+ title: '未登录,请先登录',
+ type: 'error',
+ })
}
},
methods: {
diff --git a/pages/integral/integral.vue b/pages/integral/integral.vue
index a156dd9..18d2c56 100644
--- a/pages/integral/integral.vue
+++ b/pages/integral/integral.vue
@@ -24,7 +24,7 @@
积分兑换
-
+
@@ -43,7 +43,7 @@
-
+
@@ -296,7 +296,13 @@
}
}
})
- } else {}
+ } else {
+ that.$refs.uToast.show({
+ title: '未登录,请先登录',
+ type: 'error',
+ duration: '2000',
+ })
+ }
let useritem = null
uni.$on('updata', function(data) {
if (data.useritem) {
diff --git a/pages/startup/startup.vue b/pages/startup/startup.vue
index 1593810..2030f92 100644
--- a/pages/startup/startup.vue
+++ b/pages/startup/startup.vue
@@ -42,9 +42,9 @@
},
onShow() {
var that = this
- createMobileToken().then(res => {
- uni.setStorageSync("token", res.data.token)
- })
+ // createMobileToken().then(res => {
+ // uni.setStorageSync("token", res.data.token)
+ // })
setTimeout(() => {
uni.reLaunch({
url: '/pages/homepage/homepage'