Browse Source

Merge remote-tracking branch 'origin/2025北京诚祥App' into 2025北京诚祥App

wangxy 11 hours ago
parent
commit
e284367426

+ 1 - 1
pages/admin/Hetong/Hetong.vue

@@ -23,7 +23,7 @@
 		<button v-if="info.status == 0" type="default" class="phone-green-btn ht-btn"
 			@click="handleQianming">我已阅读</button>
 
-		<uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">
+		<uni-popup ref="popupRef" type="top" background-color="#fff" :is-mask-click="false" :mask-click="false">
 			<view class="ht-qm-popup">
 				<view class="icon-title-navBar-box">
 					<view @click="goback2" class="nav-bar-icon"></view>

+ 1 - 1
pages/admin/Hetong/HetongInfo.vue

@@ -24,7 +24,7 @@
 		<button @click="handleQianming" v-if="tId && info.status == 0" class="phone-green-btn ht-btn"
 			type="default">我已阅读</button>
 
-		<uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">
+		<uni-popup ref="popupRef" type="top" background-color="#fff" :is-mask-click="false" :mask-click="false">
 			<view class="ht-qm-popup">
 				<view class="icon-title-navBar-box">
 					<view @click="goback2" class="nav-bar-icon"></view>

+ 1 - 1
pages/admin/Hetong/components/selectJz.vue

@@ -1,5 +1,5 @@
 <template>
-	<uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">
+	<uni-popup ref="popupRef" type="top" background-color="#fff" :is-mask-click="false" :mask-click="false">
 		<view class="jz-select-list">
 			<view class="phone-navBar-box">
 				<view @click="goback2" class="nav-bar-icon"></view>

+ 1 - 1
pages/admin/Hetong/components/selectKh.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">
+		<uni-popup ref="popupRef" type="top" background-color="#fff" :is-mask-click="false" :mask-click="false">
 			<view class="kehu-select-list">
 				<view class="phone-navBar-box">
 					<view @click="goback2" class="nav-bar-icon"></view>

+ 30 - 13
pages/admin/mianshi/index.vue

@@ -40,15 +40,8 @@
 					<view class="tip-text">2. 关闭房间后,面试人员将无法再进入房间,需要重新创建房间。</view>
 				</view>
 			</view>
-			 <share-popup 
-			      ref="sharePopupRef"
-				  :image="roomImageUrl"
-			      title="远程面试邀请"
-			      desc="请点击链接参加面试"
-			      :link=roomUrl
-			      type="0"
-			      @success="onShareSuccess"
-			    />
+			<share-popup ref="sharePopupRef" :image="roomImageUrl" title="远程面试邀请" desc="请点击链接参加面试" :link=roomUrl
+				type="0" @success="onShareSuccess" />
 		</view>
 	</view>
 </template>
@@ -71,13 +64,14 @@
 		room: '',
 	})
 	const roomUrl = ref('')
-	
+
 
 	const sharePopupRef = ref(null)
 
-	function onShareSuccess(e){
-		 console.log('分享成功', e.scene)
+	function onShareSuccess(e) {
+		console.log('分享成功', e.scene)
 	}
+
 	function goUpPage() {
 		uni.redirectTo({
 			url: `/pages/admin/ShouYe/shouye`
@@ -109,11 +103,34 @@
 
 	function yqBtn(code) {
 		roomUrl.value = `${config.mianshiUrl}?roomId=${data.room}&index=${code}`
-		sharePopupRef.value.open()
+		//sharePopupRef.value.open()
 		// 分享地址
 		//const url = `${config.mianshiUrl}?roomId=900803&index=${code}`
+		//固定为微信好友 不使用组件
+		directShare()
+	}
+
+	function directShare() {
+		const shareConfig = {
+			provider: 'weixin',
+			scene: 'WXSceneSession', // 固定为微信好友
+			type: 0, // 图文分享
+			title: '远程面试邀请',
+			summary: '请点击链接参加面试',
+			href: roomUrl.value,
+			imageUrl: roomImageUrl.value,
+			success: function(res) {
+				console.log('分享成功')
+			},
+			fail: function(err) {
+				console.error('分享失败:', err)
+				// 错误处理...
+			}
+		}
+		uni.share(shareConfig)
 	}
 
+
 	function handleClose() {
 		httpApi.getMianshiClose().then(res => {
 			if (res.data) {

+ 24 - 33
utils/request.js

@@ -12,6 +12,7 @@ import {
 } from '@/utils/common'
 
 let timeout = 20000
+let isShowingLoginExpired = false
 const baseUrl = config.baseUrl
 const request = config => {
 
@@ -50,40 +51,30 @@ const request = config => {
 				const code = res.code
 				const msg = res.msg
 				// const msg = errorCode[code] || res.data.msg || errorCode['default']
-				if (code === 401) {
-					showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
-						if (res.confirm) {
-							const auth = cacheManager.get('auth')
-							if (auth.type == 2 || auth.type == 5) {
-								uni.reLaunch({
-									url: '/pages/Login/index'
-								})
-							} else {
-								uni.reLaunch({
-									url: '/pages/Login/clientIndex'
-								})
-							}
-						
-						}
-					})
-					reject('无效的会话,或者会话已过期,请重新登录。')
-				} else if (code === 405) {
-					showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
-						if (res.confirm) {
-							const auth = cacheManager.get('auth')
-							if (auth.type == 2 || auth.type == 5) {
-								uni.reLaunch({
-									url: '/pages/Login/index'
-								})
-							} else {
-								uni.reLaunch({
-									url: '/pages/Login/clientIndex'
-								})
-							}
-							
-						}
 
-					})
+				if (code == 401 || code == 405) {
+					// 如果已经在显示弹窗,就不再显示新的
+					if (!isShowingLoginExpired) {
+						isShowingLoginExpired = true
+						showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
+							// 弹窗关闭后重置状态
+							isShowingLoginExpired = false
+							if (res.confirm) {
+								const auth = cacheManager.get('auth')
+								if (auth.type == 2 || auth.type == 5) {
+									uni.reLaunch({
+										url: '/pages/Login/index'
+									})
+								} else {
+									uni.reLaunch({
+										url: '/pages/Login/clientIndex'
+									})
+								}
+							}
+						}).finally(() => {
+							isShowingLoginExpired = false
+						})
+					}
 					reject('无效的会话,或者会话已过期,请重新登录。')
 				} else if (code === 500) {
 					toast("数据异常-500")