index.vue 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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">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">邀请客户进入面试</button>
  23. <button @click="handleCreate" type="default" class="phone-green-btn">创建房间</button>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script setup>
  29. import * as httpApi from '@/api/mianshi.js'
  30. import { ref, reactive } from "vue"
  31. const data = reactive({
  32. room: '',
  33. })
  34. function goUpPage() {
  35. uni.redirectTo({
  36. url: `/pages/admin/ShouYe/shouye`
  37. })
  38. }
  39. function handleCreate() {
  40. httpApi.getMianshiCreate().then(res =>{
  41. this.data = res.data.room;
  42. uni.showToast({
  43. title:'创建成功'
  44. })
  45. })
  46. }
  47. function handleClose() {
  48. httpApi.getMianshiClose().then(res =>{
  49. if (res.data) {
  50. data.room = null
  51. uni.showToast({
  52. title:'关闭成功'
  53. })
  54. }
  55. })
  56. }
  57. const url =
  58. `https://kf2.mtavip.com/aliyunZhibo/index.html?roomId=900803&appId=dehjl65f&uid=1234&userName=654321&token=000eJxjYGBQsA1url798NJZWaZ%2BjcOiqvN85r2sm1VyiP2c42evb%2F1PlRkYGDhSUjOycsxM0zJjN%2BcveXkvIjOe5StQnM3SwMDCwBjIYjE0MjZhYGQYBUMKAACboBuh`
  59. function openUrl() {
  60. plus.runtime.openURL(url, (err) => {
  61. if (err) {
  62. console.error('打开浏览器失败: ', err);
  63. uni.showToast({
  64. title: '打开链接失败',
  65. icon: 'none'
  66. });
  67. }
  68. });
  69. }
  70. const url2 =
  71. `https://kf2.mtavip.com/aliyunZhibo/index.html?roomId=900803&appId=dehjl65f&uid=1145&userName=123456&token=000eJxjYGBQ%2BNqm4zpNb%2FZc1u5tTh9MFtnfjTM5mMo2%2FZebyk3Rbl%2F19wwMDBwpqRlZOWamaZmxmyfwHU9izYxnFQOKs1kaGFgYGANZLIaGJqYMjAyjYEgBADKGGBo%3D`
  72. function openUrl2() {
  73. plus.runtime.openURL(url2, (err) => {
  74. if (err) {
  75. console.error('打开浏览器失败: ', err);
  76. uni.showToast({
  77. title: '打开链接失败',
  78. icon: 'none'
  79. });
  80. }
  81. });
  82. }
  83. </script>