From 31efd8ef6c2fd5f4c07c7739dd3b316853f23f04 Mon Sep 17 00:00:00 2001
From: yuanteng0011 <1876787513@qq.com>
Date: Mon, 24 Mar 2025 22:42:31 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 api/request.ts                                |  2 +-
 common/globalFunction.js                      | 11 +++++++-
 .../myPhotoProductDetail.vue                  |  2 +-
 pages/home/home.vue                           | 20 +++++++--------
 pages/mine/main/main.vue                      | 25 +++++++++++++++++--
 .../ProductDetails/ProductDetails.vue         | 23 ++++++++++++++---
 6 files changed, 64 insertions(+), 19 deletions(-)

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 @@
 		  <rich-text :nodes="obj.richText"></rich-text>
 	  </view>
 	  <view class="flex-col justify-start items-center section_4 pos_4">
-	    <view class="flex-col justify-start items-center text-wrapper" @click="openPopup"><text class="text_3">立即租赁</text></view>
+	    <view class="flex-col justify-start items-center text-wrapper" @click="openPopup"><text class="text_3">立即预约</text></view>
 	  </view>
 	</view>
 	
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 @@
 				</view>
 			</view>
 		</view>
-		<view class="flex-col mt-20">
+		<view class="flex-col mt-20" v-if="nickName != '未登录'">
 			<view class="flex-col group_3">
 				<view class="flex-row justify-between relative" @click="jump_addressList">
 					<image class="image_3" :src="mineUrl + '/main/address.png'" />
@@ -96,6 +96,16 @@
 				</view>
 			</view>
 		</view>
+		<view class="flex-col mt-20" v-if="nickName === '未登录'">
+			<view class="flex-col group_3">
+				<view class="flex-row justify-between relative" @click="gotoLogin">
+					<image class="image_3" :src="mineUrl + '/main/logout.png'" />
+					<image class="self-start image_4 image_5" :src="mineUrl + '/main/yjt.png'" />
+					<text class="font_2 text_8 pos">立 即 登 陆</text>
+					<!-- <view class="divider pos_2"></view> -->
+				</view>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -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 @@
 <template>
-<view class="flex-col page" :style="{ backgroundImage: 'url(' + bkgUrl + ')' }">
+<view class="flex-col page" :style="{ backgroundImage: 'url(' + bkgPubilcPath + ')' }">
 <!--  <image
 		mode="aspectFit"
     class="self-stretch image"
@@ -42,7 +42,7 @@
     </view>
   </view>
   
-  <view>
+  <view class="book-selected">
 	<rich-text :nodes="richTextcontent"></rich-text>
   </view>
 
@@ -96,8 +96,10 @@ import { baseUrl } from '../../../api/request';
 import  emitter from '../../../utils/emitter'
 import addProduct from '../../Shopping-cart/component/addProduct.vue';
 import { dealResult } from '../../../common/globalFunction';
-import { storeHomeUrl } from '../../../common/globalImagesUrl';
+import { storeHomeUrl,bkgPubilcPath } from '../../../common/globalImagesUrl';
 import { publicPath } from '../../../common/globalImagesUrl';
+
+
 const popup = ref(null)  //弹窗对象
 const goodObject = ref({})  //商品对象
 const idInfo = ref(0) //发送到下一页的商品id
@@ -215,6 +217,17 @@ const checkGeneralGood = async () => {
 </script>
 
 <style lang="scss" scoped>
+	
+.book-selected {
+	height: 1100rpx; 
+	justify-content: center;
+	background-color: #fff;
+	border-radius: 20rpx 20rpx 0 0;
+	padding: 20rpx;
+	margin: 36rpx auto;
+	width: 736rpx;
+}
+	
 button::after {
 	border: none;
 }
@@ -245,6 +258,8 @@ button::after {
   padding-top: 19.2rpx;
   background-color: #ffffff;
   border-radius: 18.75rpx;
+	margin: 0 auto;
+	width: 736rpx;
 }
 .group {
   margin-left: 14.16rpx;
@@ -296,7 +311,7 @@ button::after {
   margin-top: 18.28rpx;
 }
 .group_4 {
-  padding: 10.56rpx 0 32.04rpx;
+  padding: 10.56rpx 1rpx 32.04rpx 0;
 }
 .font_2 {
   font-size: 26.25rpx;