|
@@ -8,19 +8,23 @@
|
|
|
<view class="ycms-card-box">
|
|
<view class="ycms-card-box">
|
|
|
<view class="card-title-row">
|
|
<view class="card-title-row">
|
|
|
<text>远程面试</text>
|
|
<text>远程面试</text>
|
|
|
- <view @click="handleClose" class="colse-btn">关闭房间</view>
|
|
|
|
|
|
|
+ <view @click="handleClose" class="colse-btn" v-if="data.room">关闭房间</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="room-box">
|
|
<view class="room-box">
|
|
|
- <view class="room-info-box">
|
|
|
|
|
|
|
+ <view class="room-info-box" v-if="data.room">
|
|
|
|
|
+ <view class="room-num">{{ data.room }}</view>
|
|
|
|
|
+ <view class="room-text">房间号</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="room-info-box flex-info" v-else>
|
|
|
<view class="room-wcj">未创建</view>
|
|
<view class="room-wcj">未创建</view>
|
|
|
- <view class="room-num" v-if="false">78979</view>
|
|
|
|
|
<view class="room-text">房间号</view>
|
|
<view class="room-text">房间号</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <button @click="openUrl" type="default" class="phone-green-btn jr-btn">进入房间</button>
|
|
|
|
|
|
|
+ <button @click="openUrl" type="default" class="phone-white-btn jr-btn" v-if="data.room">进入房间</button>
|
|
|
<!-- <button @click="openUrl2">进入房间2</button> -->
|
|
<!-- <button @click="openUrl2">进入房间2</button> -->
|
|
|
</view>
|
|
</view>
|
|
|
- <button @click="handleCreate" type="default" class="phone-white-btn yqkh-btn">邀请客户进入面试</button>
|
|
|
|
|
- <button @click="handleCreate" type="default" class="phone-green-btn">创建面试房间</button>
|
|
|
|
|
|
|
+ <!-- phone-white-btn -->
|
|
|
|
|
+ <button @click="yqBtn" type="default" class="phone-green-btn yqkh-btn" v-if="data.room">邀请客户进入面试</button>
|
|
|
|
|
+ <button @click="handleCreate" type="default" class="phone-green-btn" v-else>创建面试房间</button>
|
|
|
|
|
|
|
|
<view class="ycms-tip-box">
|
|
<view class="ycms-tip-box">
|
|
|
<view class="tip-title"><text>小贴士</text><icon></icon></view>
|
|
<view class="tip-title"><text>小贴士</text><icon></icon></view>
|
|
@@ -37,6 +41,7 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import * as httpApi from '@/api/mianshi.js'
|
|
import * as httpApi from '@/api/mianshi.js'
|
|
|
import { ref, reactive } from "vue"
|
|
import { ref, reactive } from "vue"
|
|
|
|
|
+ import {onLoad} from "@dcloudio/uni-app";
|
|
|
|
|
|
|
|
const data = reactive({
|
|
const data = reactive({
|
|
|
room: '',
|
|
room: '',
|
|
@@ -48,22 +53,30 @@
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function handleCreate() {
|
|
|
|
|
- httpApi.getMianshiCreate().then(res =>{
|
|
|
|
|
- this.data = res.data.room;
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title:'创建成功'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ function handleMianshiInfo() {
|
|
|
|
|
+ httpApi.getMianshiInfo().then(res =>{
|
|
|
|
|
+ data.room = res.data.room;
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+ function handleCreate(){
|
|
|
|
|
+ httpApi.getMianshiCreate().then(res => {
|
|
|
|
|
+ data.room = res.data.room;
|
|
|
|
|
+ uni.showToast({ title: '创建成功', icon: 'none' });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(err => {
|
|
|
|
|
+ console.error('创建失败:', err);
|
|
|
|
|
+ uni.showToast({ title: '创建失败,请重试', icon: 'none' });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ function yqBtn(){
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
function handleClose() {
|
|
function handleClose() {
|
|
|
httpApi.getMianshiClose().then(res =>{
|
|
httpApi.getMianshiClose().then(res =>{
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
|
- data.room = null
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title:'关闭成功'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ data.room = null;
|
|
|
|
|
+ uni.showToast({ title: '房间已关闭', icon: 'none' });
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -71,7 +84,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
const url =
|
|
const url =
|
|
|
- `https://kf2.mtavip.com/aliyunZhibo/index.html?roomId=900803&appId=dehjl65f&uid=1234&userName=654321&token=000eJxjYGBQsA1url798NJZWaZ%2BjcOiqvN85r2sm1VyiP2c42evb%2F1PlRkYGDhSUjOycsxM0zJjN%2BcveXkvIjOe5StQnM3SwMDCwBjIYjE0MjZhYGQYBUMKAACboBuh`
|
|
|
|
|
|
|
+ `https://kf2.mtavip.com/aliyunZhibo/index.html?roomId=${data.room}`
|
|
|
|
|
|
|
|
function openUrl() {
|
|
function openUrl() {
|
|
|
plus.runtime.openURL(url, (err) => {
|
|
plus.runtime.openURL(url, (err) => {
|
|
@@ -84,19 +97,8 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- const url2 =
|
|
|
|
|
- `https://kf2.mtavip.com/aliyunZhibo/index.html?roomId=900803&appId=dehjl65f&uid=1145&userName=123456&token=000eJxjYGBQ%2BNqm4zpNb%2FZc1u5tTh9MFtnfjTM5mMo2%2FZebyk3Rbl%2F19wwMDBwpqRlZOWamaZmxmyfwHU9izYxnFQOKs1kaGFgYGANZLIaGJqYMjAyjYEgBADKGGBo%3D`
|
|
|
|
|
-
|
|
|
|
|
- function openUrl2() {
|
|
|
|
|
- plus.runtime.openURL(url2, (err) => {
|
|
|
|
|
- if (err) {
|
|
|
|
|
- console.error('打开浏览器失败: ', err);
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '打开链接失败',
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ onLoad(() => {
|
|
|
|
|
+ handleMianshiInfo()
|
|
|
|
|
+ })
|
|
|
</script>
|
|
</script>
|