index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <view class="phone-ycms-page">
  3. <view class="icon-title-navBar-box">
  4. <view @click="goUpPage" class="nav-bar-icon"></view>
  5. <text class="nav-bar-title">远程面试</text>
  6. </view>
  7. <view class="ycms-body-box">
  8. <view class="ycms-card-box">
  9. <view class="card-title-row">
  10. <text>远程面试</text>
  11. <view @click="handleClose" class="colse-btn">关闭房间</view>
  12. </view>
  13. <view class="room-box">
  14. <view class="room-info-box">
  15. <view class="room-wcj">未创建</view>
  16. <view class="room-num" v-if="false">78979</view>
  17. <view class="room-text">房间号</view>
  18. </view>
  19. <button @click="openUrl" type="default" class="phone-green-btn jr-btn">进入房间</button>
  20. <!-- <button @click="openUrl2">进入房间2</button> -->
  21. </view>
  22. <button @click="handleCreate" type="default" class="phone-white-btn yqkh-btn">邀请客户进入面试</button>
  23. <button @click="handleCreate" type="default" class="phone-green-btn">创建面试房间</button>
  24. <view class="ycms-tip-box">
  25. <view class="tip-title"><text>小贴士</text><icon></icon></view>
  26. <view class="tip-text">1.创建房间后会生成房间号,生成房间号后,可进入房间,也可以直接分享给客户进入房间。</view>
  27. <view class="tip-text">2. 结束面试后,房间内的人员会被退出,同时面试房间号会失效;</view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script setup>
  34. import * as httpApi from '@/api/mianshi.js'
  35. import { ref, reactive } from "vue"
  36. const data = reactive({
  37. room: '',
  38. })
  39. function goUpPage() {
  40. uni.redirectTo({
  41. url: `/pages/admin/ShouYe/shouye`
  42. })
  43. }
  44. function handleCreate() {
  45. httpApi.getMianshiCreate().then(res =>{
  46. this.data = res.data.room;
  47. uni.showToast({
  48. title:'创建成功'
  49. })
  50. })
  51. }
  52. function handleClose() {
  53. httpApi.getMianshiClose().then(res =>{
  54. if (res.data) {
  55. data.room = null
  56. uni.showToast({
  57. title:'关闭成功'
  58. })
  59. }
  60. })
  61. }
  62. const url =
  63. `https://kf2.mtavip.com/aliyunZhibo/index.html?roomId=900803&appId=dehjl65f&uid=1234&userName=654321&token=000eJxjYGBQsA1url798NJZWaZ%2BjcOiqvN85r2sm1VyiP2c42evb%2F1PlRkYGDhSUjOycsxM0zJjN%2BcveXkvIjOe5StQnM3SwMDCwBjIYjE0MjZhYGQYBUMKAACboBuh`
  64. function openUrl() {
  65. plus.runtime.openURL(url, (err) => {
  66. if (err) {
  67. console.error('打开浏览器失败: ', err);
  68. uni.showToast({
  69. title: '打开链接失败',
  70. icon: 'none'
  71. });
  72. }
  73. });
  74. }
  75. const url2 =
  76. `https://kf2.mtavip.com/aliyunZhibo/index.html?roomId=900803&appId=dehjl65f&uid=1145&userName=123456&token=000eJxjYGBQ%2BNqm4zpNb%2FZc1u5tTh9MFtnfjTM5mMo2%2FZebyk3Rbl%2F19wwMDBwpqRlZOWamaZmxmyfwHU9izYxnFQOKs1kaGFgYGANZLIaGJqYMjAyjYEgBADKGGBo%3D`
  77. function openUrl2() {
  78. plus.runtime.openURL(url2, (err) => {
  79. if (err) {
  80. console.error('打开浏览器失败: ', err);
  81. uni.showToast({
  82. title: '打开链接失败',
  83. icon: 'none'
  84. });
  85. }
  86. });
  87. }
  88. </script>