Ver Fonte

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

wangguoyu há 3 dias atrás
pai
commit
9ae4bc2be1

+ 36 - 0
api/haibao.js

@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+export function getHaibaoOpsZhiye(data = {}) {
+  return request({
+    url: '/app/haibao/ops/zhiye',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getHaibaoList(data = {}) {
+  return request({
+    url: '/app/haibao/list',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getHaibaoInfo(data = {}) {
+  return request({
+    url: '/app/haibao/info',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}

+ 57 - 0
common/styles/global/pages.scss

@@ -1528,4 +1528,61 @@
 		}
 		.tip-text{font-size: 24rpx;color: #666;line-height: 1.8;}
 	}
+}
+
+/* 职业海报 */
+.phone-haibao-page{
+	width: 100%;height: 100vh;background-color: #fff;
+	display: flex;flex-direction: column;
+	.haibao-body-box{
+		display: flex;flex: 1;border-top: 1rpx solid #f0f0f0;overflow: hidden;
+	}
+	.haibao-menu-box{
+		width: 180rpx;border-right: 1rpx solid #f0f0f0;overflow-y: auto;
+		.menu-item-box{
+			width: 100%;height: 72rpx;line-height: 72rpx;font-size: 28rpx;
+			box-sizing: border-box;padding: 0 10rpx;
+			border-bottom: 1rpx solid #f0f0f0;text-align: center;@include single-line-ellipsis();
+		}
+		.active{background-color: #3fd2a1;color: #fff;}
+	}
+	.haibao-show-box{
+		flex: 1;overflow: hidden;display: flex;flex-direction: column;
+		.haibao-title{
+			width: 100%;height: 72rpx;line-height: 72rpx;font-size: 24rpx;color: #666;
+			border-bottom: 1rpx solid #f0f0f0;box-sizing: border-box;padding:0 20rpx;
+		}
+		.card-list-box{
+			display: flex;flex-wrap: wrap;box-sizing: border-box;padding: 20rpx;overflow-y: auto;
+			
+		}
+		.haibao-card-box{
+			width: 31%;margin-right: 3.5%;font-size: 0;margin-bottom: 20rpx;
+			img{width: 100%;height: 260rpx;border-radius: 8rpx;}
+			.card-name{font-size: 24rpx;color: #666;text-align: center;margin-top: 6rpx;@include single-line-ellipsis();}
+		}
+		.haibao-card-box:nth-child(3n){margin-right: 0;}
+	}
+}
+
+.phone-haibao-info-page{
+	width: 100%;height: 100vh;background-color: #fff;
+	display: flex;flex-direction: column;background-color: #202020;
+	.haibao-info-body-box{
+		box-sizing: border-box;padding: 24rpx;flex: 1;
+		display: flex;align-items: center;
+		img{width: 100%;}
+		.haibao-info-text{
+			color: #000;font-size: 28rpx;margin-top: 16rpx;display: flex;align-items: center;
+			icon{width: 32rpx;height: 32rpx;@include ezy-no-repeat-cover;margin-right: 10rpx;}
+			.jz-icon{background-image: url("@/static/images/common/haibao-jz-icon.svg");}
+			.tel-icon{background-image: url("@/static/images/common/haibao-yh-icon.svg");}
+		}
+		.info-text-box{
+			position: absolute;bottom: 16rpx;left: 10rpx;
+		}
+		.img-box{
+			position: relative;
+		}
+	}
 }

+ 1 - 0
config.js

@@ -7,6 +7,7 @@ const proUrl = 'https://www.chengxiangjiaoyu.com/api/v10'
 const devKey = 'MZRBZ-Q6PKQ-THS5E-BOGKN-ZH4MQ-6YFWC'
 const proKey = 'VLOBZ-Q7XWB-YR4UP-NO4PH-EM7FS-G3BLR'
 export default   {
+  mianshiUrl: `https://kf1.mtavip.com/h5/room`, // 面试外链地址
   baseUrl: isPro?proUrl:devUrl,
   mapKey:isPro?proKey:devKey,
   // 应用信息

+ 12 - 0
pages.json

@@ -342,6 +342,18 @@
 			"style": {
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path": "pages/admin/haibao/index",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/admin/haibao/haibaoInfo",
+			"style": {
+				"navigationStyle": "custom"
+			}
 		}
 		
 	],

+ 10 - 1
pages/admin/ShouYe/shouye.vue

@@ -94,11 +94,15 @@
 			
 		</view>
 		<view class="card-list-box">
-			<view class="card-list-title">面试管理</view>
+			<view class="card-list-title">其他服务</view>
 			<view @click="goToPage('ycms')" class="card-item-box">
 				<icon class="index-icon ycms-icon"></icon>
 				<text>远程面试</text>
 			</view>
+			<view @click="goToPage('zyhb')" class="card-item-box">
+				<icon class="index-icon ycms-icon"></icon>
+				<text>职业海报</text>
+			</view>
 		</view>
 		<!-- 页面底端 -->
 		<customTabbarAdminVue :current-tab="0"></customTabbarAdminVue>
@@ -331,6 +335,11 @@
 				url: '/pages/admin/mianshi/index'
 			})
 			break;
+			case 'zyhb':
+			uni.navigateTo({
+				url: '/pages/admin/haibao/index'
+			})
+			break;
 			case 'demo':
 				uni.redirectTo({
 					url: '/pages/demo/demo2'

+ 61 - 0
pages/admin/haibao/haibaoInfo.vue

@@ -0,0 +1,61 @@
+<template>
+    <view class="phone-haibao-info-page">
+        <view class="phone-navBar-box">
+            <view @click="goUpPage" class="nav-bar-icon"></view>
+            <text class="nav-bar-title">职业海报</text>
+            <view class="text-btn">分享</view>
+        </view>
+        <view class="haibao-info-body-box">
+			<view v-if="data.img" class="img-box">
+				<img :src="data.img" class="haibao-image" />
+				<view class="info-text-box">
+					<view class="haibao-info-text"><icon class="jz-icon"></icon>{{data.jzName}}</view>
+					<view class="haibao-info-text"><icon class="tel-icon"></icon>{{data.realName}}({{data.tel}})</view>
+				</view>
+				
+			</view>
+            <view v-else class="loading-text">加载中...</view>
+        </view>
+    </view>
+</template>
+
+<script setup>
+import { reactive } from "vue"
+import { onLoad } from "@dcloudio/uni-app";
+import * as httpApi from '@/api/haibao.js'	
+
+const data = reactive({
+    img: '',
+    id: '',
+    menuId: '',
+	jzName: '',
+	realName: '',
+	tel: '',
+})
+
+function goUpPage() {
+    uni.redirectTo({
+        url: `/pages/admin/haibao/index?menuId=${data.menuId}`
+    })
+}
+
+function getHaibaoOpsZhiyeData(id) {
+    httpApi.getHaibaoInfo({ id }).then(res => {
+        data.img = res.data.image;
+		data.jzName = res.data.jzName;
+		data.realName = res.data.realName;
+		data.tel = res.data.tel;
+    }).catch(err => {
+        console.error('加载海报失败:', err)
+        uni.showToast({ title: '加载失败', icon: 'none' })
+    })
+}
+
+onLoad((options) => {
+    data.id = options.cardId || ''
+    data.menuId = options.menuId || ''
+    if (data.id) {
+        getHaibaoOpsZhiyeData(data.id) 
+    }
+})
+</script>

+ 108 - 0
pages/admin/haibao/index.vue

@@ -0,0 +1,108 @@
+<template>
+	<view class="phone-haibao-page">
+		<view class="icon-title-navBar-box">
+			<view @click="goUpPage" class="nav-bar-icon"></view>
+			<text class="nav-bar-title">职业海报</text>
+		</view>
+		<view class="haibao-body-box">
+			<view class="haibao-menu-box">
+				<view v-for="menu in menuData" :key="menu.id" class="menu-item-box"
+				      :class="{ active: selectedCategory === Number(menu.id) }"
+				      @click="menuBtn(menu.id)">
+				  {{ menu.name }}
+				</view>
+			</view>
+			<view class="haibao-show-box">
+				<view class="haibao-title">共{{cardData.length}}个海报</view>
+				<view class="card-list-box">
+					<view v-for="item in cardData" :key="item.id" class="haibao-card-box"
+					      @click="cardBtn(item.id)">
+						  <img :src="item.image"/>
+						  <view class="card-name">{{ item.name }}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+	
+</template>
+
+<script setup>
+import * as httpApi from '@/api/haibao.js'	
+import { ref, reactive } from "vue"
+import {onLoad} from "@dcloudio/uni-app";
+const menuData = ref([])
+const cardData = ref([])
+// 当前选中的分类
+const selectedCategory = ref(null)
+
+function goUpPage() {
+	uni.redirectTo({
+		url: `/pages/admin/ShouYe/shouye`
+	})
+}
+
+// 加载海报列表
+function getHaibaoListData(zyId) {
+    if (zyId == null) return;
+    httpApi.getHaibaoList({ zyId }).then(res => {
+        cardData.value = Array.isArray(res.data) ? res.data : [];
+    }).catch(err => {
+        console.error('获取海报列表失败:', err);
+        cardData.value = [];
+        uni.showToast({ title: '加载失败', icon: 'none' });
+    });
+}
+	
+// 菜单按钮点击
+function menuBtn(id) {
+    const numericId = Number(id);
+    selectedCategory.value = numericId;
+    getHaibaoListData(numericId);
+}
+
+// 海报卡片点击
+function cardBtn(data) {
+    uni.redirectTo({
+        url: `/pages/admin/haibao/haibaoInfo?cardId=${data}&menuId=${selectedCategory.value}`
+    });
+}
+
+// 首次进入页面初始化
+function pageInit() {
+    httpApi.getHaibaoOpsZhiye().then(res => {
+        menuData.value = Array.isArray(res.data) ? res.data : [];
+        if (menuData.value.length > 0) {
+            const firstId = Number(menuData.value[0].id);
+            selectedCategory.value = firstId;
+            getHaibaoListData(firstId);
+        }
+    }).catch(err => {
+        console.error('初始化职业失败:', err);
+        menuData.value = [];
+        uni.showToast({ title: '职业加载失败', icon: 'none' });
+    });
+}
+
+// 从详情页返回时恢复状态
+function pageRecover(data) {
+    httpApi.getHaibaoOpsZhiye().then(res => {
+        menuData.value = Array.isArray(res.data) ? res.data : [];
+        const menuId = Number(data.menuId);
+        menuBtn(menuId); 
+    }).catch(err => {
+        console.error('页面加载:', err);
+        uni.showToast({ title: '页面加载失败', icon: 'none' });
+    });
+}
+onLoad((options) => {
+	// 详情页返回
+	if(options.menuId){
+		pageRecover(options)
+	}else{
+		// 首页进入
+		pageInit()
+	}
+	
+})
+</script>

+ 12 - 10
pages/admin/mianshi/index.vue

@@ -19,19 +19,19 @@
 						<view class="room-wcj">未创建</view>
 						<view class="room-text">房间号</view>
 					</view>
-					<button @click="openUrl" type="default" class="phone-white-btn jr-btn" v-if="data.room">进入房间</button> <!-- 客户uid 4 -->
+					<button @click="openUrl(1)" type="default" class="phone-white-btn jr-btn" v-if="data.room">进入房间</button>
 					<!-- <button @click="openUrl2">进入房间2</button> -->
 				</view>
 				<!-- phone-white-btn -->
-        <button @click="yqBtn" type="default" class="phone-green-btn yqkh-btn"  v-if="data.room">邀请客户进入面试</button> <!-- 客户uid 1 -->
-        <button @click="yqBtn" type="default" class="phone-green-btn yqkh-btn"  v-if="data.room">邀请阿姨进入面试</button> <!-- 客户uid 2 -->
-        <button @click="yqBtn" type="default" class="phone-green-btn yqkh-btn"  v-if="data.room">邀请旁听进入面试</button> <!-- 客户uid 3 -->
+        <button @click="yqBtn(3)" type="default" class="phone-green-btn yqkh-btn"  v-if="data.room">邀请阿姨</button>
+        <button @click="yqBtn(2)" type="default" class="phone-green-btn yqkh-btn"  v-if="data.room">邀请客户1</button>
+        <button @click="yqBtn(4)" type="default" class="phone-green-btn yqkh-btn"  v-if="data.room">邀请客户2</button>
 				<button @click="handleCreate" type="default" class="phone-green-btn" v-else>创建面试房间</button>
 				
 				<view class="ycms-tip-box">
 					<view class="tip-title"><text>小贴士</text><icon></icon></view>
 					<view class="tip-text">1.创建房间后会生成房间号,生成房间号后,可进入房间,也可以直接分享给客户进入房间。</view>
-					<view class="tip-text">2. 结束面试后,房间内的人员会被退出,同时面试房间号会失效;</view>
+					<view class="tip-text">2. 关闭房间后,面试人员将无法再进入房间,需要重新创建房间。</view>
 				</view>
 			</view>
 			
@@ -44,6 +44,7 @@
 	import * as httpApi from '@/api/mianshi.js'
 	import { ref, reactive } from "vue"
 	import {onLoad} from "@dcloudio/uni-app";
+  import config from "../../../config"
 	
 	const data = reactive({
 		room: '',
@@ -70,8 +71,9 @@
 			uni.showToast({ title: '创建失败,请重试', icon: 'none' });
 		  });
 	}
-	function yqBtn(){
-		
+	function yqBtn(code){
+    // 分享地址
+    const url = `${config.mianshiUrl}?roomId=900803&index=${code}`
 	}
 	
 	function handleClose() {
@@ -85,10 +87,10 @@
 	
 	
 	
-	const url =
-		`https://kf2.mtavip.com/aliyunZhibo/index.html?roomId=${data.room}`
 
-	function openUrl() {
+
+	function openUrl(code) {
+    const url = `${config.mianshiUrl}?roomId=${data.room}&index=${code}`
 		plus.runtime.openURL(url, (err) => {
 			if (err) {
 				console.error('打开浏览器失败: ', err);

+ 45 - 0
pages/admin/webview/index.vue

@@ -0,0 +1,45 @@
+<!-- pages/admin/webview/index.vue -->
+<template>
+  <view class="webview-container">
+    <!-- #ifndef H5 -->
+    <web-view :src="url" @load="onLoad" @message="onMessage"></web-view>
+    <!-- #endif -->
+
+    <!-- #ifdef H5 -->
+    <iframe :src="url" style="width:100%;height:100vh;border:none;"></iframe>
+    <!-- #endif -->
+  </view>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { onLoad as onPageLoad } from '@dcloudio/uni-app';
+
+const url = ref('');
+
+onPageLoad((options) => {
+  if (options.url) {
+    url.value = decodeURIComponent(options.url);
+  }
+});
+
+const onLoad = (e) => {
+  console.log('webview loaded', e);
+};
+
+const onMessage = (e) => {
+  console.log('message from webview', e.detail.data);
+};
+function goUpPage() {
+		uni.redirectTo({
+			url: `/pages/admin/ShouYe/shouye`
+		})
+	}
+</script>
+
+<style>
+.webview-container {
+  width: 100%;
+  height: 100vh;
+}
+</style>

+ 1 - 0
static/images/common/haibao-jz-icon.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1768273274794" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5257" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100"><path d="M831.999792 588.800109a193.279952 193.279952 0 0 1-156.159961-76.799981 211.711947 211.711947 0 0 1-327.679918 0 193.023952 193.023952 0 0 1-155.903961 76.799981A189.439953 189.439953 0 0 1 0 402.432155a31.231992 31.231992 0 0 1 5.119999-16.895995L195.327951 15.616252A32.511992 32.511992 0 0 1 223.231944 0.000256h577.535856a32.511992 32.511992 0 0 1 27.903993 15.615996l190.975952 371.199907a30.207992 30.207992 0 0 1 4.351999 18.431996A189.695953 189.695953 0 0 1 831.999792 588.800109z m-155.135961-180.991955a32.255992 32.255992 0 0 1 30.975992 24.063994 127.999968 127.999968 0 0 0 251.391937-22.271994L782.335804 62.46424H241.66394L64.511984 409.600154a126.463968 126.463968 0 0 0 127.999968 115.711971 126.463968 126.463968 0 0 0 123.903969-94.463977 31.999992 31.999992 0 0 1 30.975992-24.063994 32.511992 32.511992 0 0 1 31.231992 23.551994A134.143966 134.143966 0 0 0 511.999872 526.336124a134.911966 134.911966 0 0 0 133.631967-94.975976 31.999992 31.999992 0 0 1 31.231992-23.551994z m217.343945 584.191854V680.192086a31.999992 31.999992 0 0 0-63.999984 0V960.000016H193.791952V680.192086a31.999992 31.999992 0 0 0-63.999984 0v311.807922A31.999992 31.999992 0 0 0 161.79196 1024h700.415824a31.999992 31.999992 0 0 0 31.999992-31.999992z" p-id="5258" fill="#000000"></path></svg>

+ 1 - 0
static/images/common/haibao-yh-icon.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1768273983850" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="43856" data-spm-anchor-id="a313x.search_index.0.i4.3ddb3a81Xg38G3" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100"><path d="M98.46 417.5a19.7 19.7 0 0 1-19.69-19.69V178.75a100.09 100.09 0 0 1 100-100h219.04a19.69 19.69 0 0 1 0 39.38H178.75a60.68 60.68 0 0 0-60.6 60.6v219.08a19.69 19.69 0 0 1-19.69 19.69zM397.81 945.23H178.75a100.09 100.09 0 0 1-100-100V626.19a19.69 19.69 0 0 1 39.38 0v219.06a60.68 60.68 0 0 0 60.6 60.6h219.08a19.69 19.69 0 0 1 0 39.38zM925.54 387.2a19.69 19.69 0 0 1-19.69-19.69V178.75a60.68 60.68 0 0 0-60.6-60.6H629.59a19.69 19.69 0 1 1 0-39.38h215.66a100.09 100.09 0 0 1 100 100v188.74a19.7 19.7 0 0 1-19.71 19.69zM845.25 945.23H626.19a19.69 19.69 0 0 1 0-39.38h219.06a60.68 60.68 0 0 0 60.6-60.6V626.19a19.69 19.69 0 0 1 39.38 0v219.06a100.09 100.09 0 0 1-99.98 99.98zM512 551.38c-97.73 0-177.23-79.5-177.23-177.23S414.27 196.92 512 196.92s177.23 79.51 177.23 177.23S609.73 551.38 512 551.38z m0-315.07c-76 0-137.85 61.84-137.85 137.84S436 512 512 512s137.85-61.84 137.85-137.85S588 236.31 512 236.31z" p-id="43857" fill="#000000"></path><path d="M787.69 827.08a19.7 19.7 0 0 1-19.69-19.7 256 256 0 0 0-512 0 19.69 19.69 0 1 1-39.38 0 295.38 295.38 0 0 1 590.76 0 19.69 19.69 0 0 1-19.69 19.7z" p-id="43858" fill="#000000"></path></svg>