WXtrialInterface.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>双子星云手机</title>
  7. <link rel="stylesheet" href="./config/css/vant.css">
  8. <link rel="stylesheet" href="./css/WXtrialInterface.css">
  9. <!-- <script src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/vConsole/3.12.1/vconsole.min.js"></script>
  10. <script>
  11. const vConsole = new VConsole();
  12. </script> -->
  13. </head>
  14. <body @touchmove.prevent @mousemove.prevent>
  15. <div id="app" v-cloak>
  16. <!-- 计时卡计时 -->
  17. <div class="pfi flex timing" v-if="timingVisible" v-cloak>
  18. <div>{{countdownTime}}</div>
  19. <img class="wh22" src="../static/img/close.png" alt="" @click="handlecountdownTimeClose" />
  20. </div>
  21. <!-- 悬浮框 -->
  22. <div class="levitated-sphere" :style="levitatedSpherePositionData" v-cloak
  23. @click="onSphere">
  24. <img src="../static/img/xuanfu_icon.png" alt=""
  25. @mousedown.prevent="onSphereDown"
  26. @mouseup.prevent.stop="onSphereUp"
  27. @touchmove.prevent="touchmoveLevitatedSphere"
  28. @mousemove.prevent="touchmoveLevitatedSphere"
  29. @touchend="touchendLevitatedSphere"
  30. @mouseup="touchendLevitatedSphere"
  31. @mouseleave="touchendLevitatedSphere">
  32. </div>
  33. <div class="layout" :style="{height: height + 'px'}" v-cloak @touchmove.prevent @mousemove.prevent>
  34. <!-- 云机位置 -->
  35. <div class="layout-view" v-cloak @touchmove.prevent @mousemove.prevent>
  36. <video ref="rtcMediaPlayer" :style="rtcMediaPlayerStyle" width="100%" height="100%" autoplay
  37. webkit-playsinline="true" playsinline x-webkit-airplay="allow" x5-video-player-type="h5"
  38. x5-video-player-fullscreen="true" x5-video-orientation="portraint" id="playerVideo"
  39. class="videoRotate" :controls="false"
  40. @touchmove.prevent="(event) => {engine.touchClick(event, 2)}"
  41. @mousemove.prevent="(event) => {engine.touchClick(event, 2)}"
  42. @touchstart.prevent="(event) => {engine.touchClick(event, 0)}"
  43. @mousedown.prevent="(event) => {engine.touchClick(event, 0)}"
  44. @mouseup.prevent="touchendRtcMediaPlayer"
  45. @mouseleave.prevent="touchendRtcMediaPlayer"
  46. @touchend.prevent="touchendRtcMediaPlayer"
  47. v-show="isShowVideo">
  48. 当前浏览器暂不支持、请使用谷歌浏览器或前往双子星客户端使用</video>
  49. </div>
  50. <!-- 底部按钮 -->
  51. <div class="layout-footer" v-cloak @touchmove.prevent @mousemove.prevent>
  52. <template v-for="item in footerBtn">
  53. <img :src="item.img" alt="" @click="footerBtnFun(item.key)">
  54. </template>
  55. </div>
  56. <!-- 右侧弹框 -->
  57. <van-popup v-model="levitatedSphereVisible" position="right" class="levitated-sphere-drawer"
  58. overlay-class="levitated-sphere-overlay" v-cloak>
  59. <div class="flex-column">
  60. <div class="flex-column-container">
  61. <div>
  62. <div v-for="item in definitionList" :key="item.key"
  63. :class="['tc drawer-item mb-15', {active: definitionValue === item.value}]"
  64. @click.prevent="definitionFun(item.value)">
  65. {{item.name}}
  66. </div>
  67. <!-- <div class="tc drawer-item mb-15" @click.prevent="resolutionRatio">
  68. 分辨率
  69. </div> -->
  70. <div class="tc drawer-item mb-15" @click.prevent="volumeControl(24)">
  71. 音量 +
  72. </div>
  73. <div class="tc drawer-item" @click.prevent="volumeControl(25)">
  74. 音量 -
  75. </div>
  76. </div>
  77. </div>
  78. <div class="exit">
  79. <template v-for="(item, index) in exitList">
  80. <div :key="item.key" :class="['tc', {'mb-15': index !== exitList.length - 1}, item.key]"
  81. @click="exitFun(item.key)">
  82. <img :src="item.img" alt="">
  83. <div class="drawer-item">
  84. {{item.name}}
  85. </div>
  86. </div>
  87. </template>
  88. </div>
  89. </div>
  90. </van-popup>
  91. <!-- 分辨率 -->
  92. <van-dialog v-model="resolutionRatioVisible" :show-confirm-button="false" class="resolution-ratio-modal"
  93. v-cloak>
  94. <div>
  95. <div>
  96. <div class="flex-jub resolution-ratio-btn">
  97. <div @click="resolutionRatioVisible = false">取消</div>
  98. <div @click="confirmResolution">确定</div>
  99. </div>
  100. <div class="resolution-ratio-list">
  101. <div v-for="(item, index) in resolutionRatioList" :key="item"
  102. :class="{active: phoneSize.dpi === item.dpi}" @click="phoneSize = item">
  103. <div class="tc">
  104. {{item.width}} x {{item.height}}
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </van-dialog>
  111. <!-- 粘贴板 -->
  112. <van-dialog v-model="pasteVersionVisible" :show-confirm-button="false" class="paste-version-modal" v-cloak>
  113. <template v-if="pasteVersionList.length">
  114. <div class="tc paste-version-title pre">
  115. <span class="pab">粘贴版</span>
  116. <span class="pab paste-version-clear" @click="deletePasteVersion()">
  117. 清空
  118. </span>
  119. </div>
  120. <div class="paste-version-list">
  121. <div v-for="(item,index) in pasteVersionList" :key="item"
  122. :class="[{'mb-5': index!==pasteVersionList.length - 1}]">
  123. <van-swipe-cell>
  124. <div :class="`copy-value-${index}, ellipsis`" @click="copyPasteVersiontext">
  125. {{item.content}}
  126. </div>
  127. <template #right>
  128. <div class="paste-version-delete" @click="deletePasteVersion(item.id)">
  129. 删除
  130. </div>
  131. </template>
  132. </van-swipe-cell>
  133. </div>
  134. </div>
  135. </template>
  136. <template v-else>
  137. <div class="paste-version-empty flex-center-all h100">
  138. <div>
  139. <img src="./img/jianqieban_pic@2x.png" alt="">
  140. <div class="tc">
  141. 剪贴板为空
  142. </div>
  143. </div>
  144. </div>
  145. </template>
  146. <img class="pab paste-version-close" src="./img/guanbi_icon@2x.png" alt=""
  147. @click="pasteVersionVisible = false" />
  148. </van-dialog>
  149. <!-- 增加复制粘贴板 -->
  150. <van-dialog v-model="copyTextVisible" class="copy-text-modal" confirm-button-text="确定" show-cancel-button
  151. confirm-button-color="#3cc51f" v-cloak :before-close="beforeCloseCopy">
  152. <div class="tc">
  153. 读取剪贴板失败
  154. </div>
  155. <div>
  156. <van-field v-model="copyTextValue" placeholder="请输入复制到剪切板的内容" />
  157. </div>
  158. </van-dialog>
  159. <!-- 计费规则 -->
  160. <van-dialog v-model="billingRulesVisible" :show-confirm-button="false" class="billing-rules-modal" v-cloak>
  161. <div class="tc">
  162. <img class="billing-rules-img" src="./img/countdown.png" />
  163. </div>
  164. <div class="tc billing-rules-title">
  165. 计费规则
  166. </div>
  167. <div class="tc">进入云机开始计时,点击退出并下机停止计时。点击退出云机仍处于计时状态。</div>
  168. <div class="tc billing-rules-tips">云机时长剩余:<span class="billing-rules-time">{{countdownTime}}</span>
  169. </div>
  170. <div class="billing-rules-btn" @click="getRecommend">我知道了</div>
  171. </van-dialog>
  172. <!-- 应用推荐 -->
  173. <van-dialog v-model="applyRecommendVisible" :show-confirm-button="false" class="apply-recommend-modal"
  174. v-cloak>
  175. <div>
  176. <div class="tc apply-recommend-title">
  177. 应用推荐
  178. </div>
  179. <div class="apply-recommend-list">
  180. <div v-for="(item, index) in recommendList" :key="item.id"
  181. :class="['flex w100', {'mt-16': index !== 0}]">
  182. <div class="left flex-align-c">
  183. <img :src="item.imageUrl" alt="">
  184. <div>
  185. <div class="title ellipsis">{{item.filename}}</div>
  186. <div class="download-num">有{{item.installNum}}个人下载</div>
  187. </div>
  188. </div>
  189. <div class="right flex-align-c" @click="downAndInstallApk(item)">
  190. <div>
  191. 下载
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. <div class="apply-recommend-btn tc" @click="getRecommend">
  197. 换一批
  198. </div>
  199. </div>
  200. <img class="apply-recommend-close pab" src="./img/close.png" alt=""
  201. @click="applyRecommendVisible = false" />
  202. </van-dialog>
  203. <!-- 超过指定触碰时间的弹窗提示 -->
  204. <van-dialog v-model="noOperationSetTimeoutTimeVisible" title="提示" show-cancel-button
  205. message="由于您长时间未操作,将自动断开视频链接(不影响云手机内应用运行)" :confirm-button-text="confirmButtonText"
  206. confirm-button-color="#3cc51f" cancel-button-text="继续操作" @cancel="noOperationSetTimeout('cancel')"
  207. @confirm="noOperationSetTimeout('cancel'), exit(), noOperationSetTimeoutTimeVisible = false" v-cloak>
  208. </van-dialog>
  209. </div>
  210. </div>
  211. </body>
  212. <script src="./config/js/jweixin.js"></script>
  213. <script src="./config/js/clipboard.js"></script>
  214. <script type="text/javascript" src="../static/js/uni.webview.1.5.2.js"></script>
  215. <script src="./config/js/vue.js"></script>
  216. <script src="./config/js/vant.js"></script>
  217. <script src="./config/js/axios.js"></script>
  218. <script src="./config/js/rtcEngine.min.js"></script>
  219. <script src="../static/lib/qs.js"></script>
  220. <script type="module" src="./js/WXtrialInterface.js"></script>
  221. </html>