diff --git a/api/request.ts b/api/request.ts
index 07f68f1..e4616ea 100644
--- a/api/request.ts
+++ b/api/request.ts
@@ -6,4 +6,4 @@ export const domain = 'https://www.carboner.cn:8888/api'
export const myIp = 'http://8.130.119.119:9092/api'
export const nwct = 'https://winning-mouse-internally.ngrok-free.app/api'
export const suiUrl = ''
-export const baseUrl = Url
+export const baseUrl = domain
diff --git a/common/globalFunction.js b/common/globalFunction.js
index 724ed4e..9f48605 100644
--- a/common/globalFunction.js
+++ b/common/globalFunction.js
@@ -4,7 +4,16 @@ export const dealResult = (res) => {
uni.showModal({
title: '提示',
content: response.message,
- showCancel: false
+ showCancel: false,
+ success: (res) => {
+ if(response.code === 40100) {
+ if(res.confirm) {
+ uni.redirectTo({
+ url: '/pages/login/login'
+ })
+ }
+ }
+ }
})
return false
}
diff --git a/pages/book/myPhotoProductDetail/myPhotoProductDetail.vue b/pages/book/myPhotoProductDetail/myPhotoProductDetail.vue
index a9eb571..16e3005 100644
--- a/pages/book/myPhotoProductDetail/myPhotoProductDetail.vue
+++ b/pages/book/myPhotoProductDetail/myPhotoProductDetail.vue
@@ -15,7 +15,7 @@
- 立即租赁
+ 立即预约
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 10c1171..fd2e5eb 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -60,11 +60,11 @@ import { homeUrl,bkgPubilcPath } from '../../common/globalImagesUrl';
const bkgUrl = ref(homeUrl + '/bkg.png')
onShow(() => {
uni.removeStorageSync('businessId')
- getMyUser()
})
onLoad(()=>{
getFonts()
getZSFont()
+ getMyUser()
})
const getMyUser = async () =>{
const res = await uni.request({
@@ -76,15 +76,15 @@ const getMyUser = async () =>{
}
})
console.log('获取用户信息==>',res.data)
- // if( res.data.code === 40100 ) {
- // uni.navigateTo({
- // url: '/pages/login/login'
- // })
- // uni.showToast({
- // icon: 'loading',
- // title: "请登录"
- // })
- // }
+ if( res.data.code === 40100 ) {
+ // uni.navigateTo({
+ // url: '/pages/login/login'
+ // })
+ uni.showToast({
+ icon: 'error',
+ title: "未登录"
+ })
+ }
}
const jump_xiezhen =()=>{ //跳转写真预约
uni.navigateTo({
diff --git a/pages/mine/main/main.vue b/pages/mine/main/main.vue
index 16e6527..cc912a7 100644
--- a/pages/mine/main/main.vue
+++ b/pages/mine/main/main.vue
@@ -42,7 +42,7 @@
-
+
@@ -96,6 +96,16 @@
+
+
+
+
+
+ 立 即 登 陆
+
+
+
+
@@ -121,10 +131,21 @@
uni.stopPullDownRefresh() //停止下拉刷新
}, 1000)
})
+
+ onShow( async ()=>{
+ await getMyUser()
+ })
+
onLoad(() => {
getFonts() //启动使从服务器下载字体
})
+
+ const gotoLogin = () => {
+ uni.redirectTo({
+ url: '/pages/login/login'
+ })
+ }
onMounted(() => {
getMyUser()
@@ -284,7 +305,7 @@
if(res.data.code === 40100) {
nickName.value = '未登录'
uni.showToast({
- icon: 'fail',
+ icon: 'error',
title: '未登录'
})
} else if(res.data.code === 1) {
diff --git a/pages/store-home/ProductDetails/ProductDetails.vue b/pages/store-home/ProductDetails/ProductDetails.vue
index 8eda8f8..2969633 100644
--- a/pages/store-home/ProductDetails/ProductDetails.vue
+++ b/pages/store-home/ProductDetails/ProductDetails.vue
@@ -1,5 +1,5 @@
-
+