Commit e4781d92 by kaisa

Merge branch 'test'

parents fbcf6264 d3849dd4
...@@ -50,7 +50,7 @@ service.interceptors.request.use( ...@@ -50,7 +50,7 @@ service.interceptors.request.use(
const newParams = { const newParams = {
token: queryParams?.token || "debug", token: queryParams?.token || "debug",
micId: queryParams?.uid || 123456, micId: queryParams?.uid || 1,
lang: queryParams?.lang || 2, lang: queryParams?.lang || 2,
cid: queryParams?.cid || "web_gw", cid: queryParams?.cid || "web_gw",
vest: queryParams?.vest || 0, vest: queryParams?.vest || 0,
...@@ -74,8 +74,6 @@ service.interceptors.request.use( ...@@ -74,8 +74,6 @@ service.interceptors.request.use(
service.interceptors.response.use( service.interceptors.response.use(
(response: AxiosResponse) => { (response: AxiosResponse) => {
const { code, msg } = response.data const { code, msg } = response.data
console.log(response.data,'response.data?');
if (code === 1) { if (code === 1) {
return response.data; return response.data;
} else { } else {
......
import { usePkStore } from '@/stores/pkStore';
const pkStore = usePkStore();
function url_get_params(url_path) {
let url = url_path;
let theRequest = new Object();
if (url.indexOf("?") != -1) {
let str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for (let i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
let wsTimer = null;
let wsReconnect = null;
let mUrlParam = url_get_params(location.href);
pkStore.setMurlParam(mUrlParam);
console.log(mUrlParam, 'mUrlParam');
let ws = null;
export function WebSocketGo() {
/* 測試: ws://47.75.50.13:5300/ws */
/* 正式: wss://firefly-cloud-websocket.yabolive.net/ws */
ws = new WebSocket(
`${import.meta.env.VITE_APP_WS_URL}?type=4&uid=` +
mUrlParam.uid +
"&token=debug" +
"&roomid=" +
mUrlParam.roomId +
"&lang=" +
mUrlParam.lang
);
console.log("建立链接");
pkStore.setWsLocation("WS建立连接中...")
ws.onopen = function () {
clearInterval(wsReconnect);
clearInterval(wsTimer);
wsTimer = setInterval(function () {
heartbeat();
}, 4500);
};
ws.onmessage = function (event) {
let msg = JSON.parse(event.data);
console.log("推流", msg);
// 存储游戏推流数据
if (msg.content) {
const parseData = JSON.parse(msg.content);
if (parseData.wsdata) {
pkStore.setGameData(JSON.parse(msg.content).wsdata);
}
}
};
ws.onclose = function (error) {
clearInterval(wsReconnect);
wsReconnect = setInterval(function () {
console.log("断了", error);
pkStore.setWsLocation("WS断开连接...")
WebSocketGo();
}, 3000);
};
function heartbeat() {
if (ws.readyState == WebSocket.OPEN) {
pkStore.setWsLocation("WS发送心跳...")
var msg = new WsMsg(1000, "ping", 0, mUrlParam.uid);
ws.send(JSON.stringify(msg));
}
}
function WsMsg(cid, content, extend, uid) {
this.time = new Date().getTime();
this.msgid = Math.random().toString(36).slice(-8);
this.cid = cid;
this.content = content;
this.extend = extend;
this.uid = uid;
}
}
export function closeWebSocket() {
if (ws) {
clearInterval(wsTimer);
clearInterval(wsReconnect);
ws.close();
ws = null;
}
}
...@@ -93,7 +93,7 @@ watch(() => props.resultLevel, (newVal) => { ...@@ -93,7 +93,7 @@ watch(() => props.resultLevel, (newVal) => {
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
font-size: 52px; font-size: 52px;
color: #111; color: #444444;
padding: 40px 0 34px 0; padding: 40px 0 34px 0;
} }
......

156 KB | W: | H:

26.9 KB | W: | H:

src/views/activity/recruitment/image/btn.png
src/views/activity/recruitment/image/btn.png
src/views/activity/recruitment/image/btn.png
src/views/activity/recruitment/image/btn.png
  • 2-up
  • Swipe
  • Onion skin

126 KB | W: | H:

27.6 KB | W: | H:

src/views/activity/recruitment/image/contentBg.png
src/views/activity/recruitment/image/contentBg.png
src/views/activity/recruitment/image/contentBg.png
src/views/activity/recruitment/image/contentBg.png
  • 2-up
  • Swipe
  • Onion skin

5.17 KB | W: | H:

2.13 KB | W: | H:

src/views/activity/recruitment/image/dialogBottom.png
src/views/activity/recruitment/image/dialogBottom.png
src/views/activity/recruitment/image/dialogBottom.png
src/views/activity/recruitment/image/dialogBottom.png
  • 2-up
  • Swipe
  • Onion skin

1.87 KB | W: | H:

521 Bytes | W: | H:

src/views/activity/recruitment/image/dialogCenter.png
src/views/activity/recruitment/image/dialogCenter.png
src/views/activity/recruitment/image/dialogCenter.png
src/views/activity/recruitment/image/dialogCenter.png
  • 2-up
  • Swipe
  • Onion skin

24.7 KB | W: | H:

7.94 KB | W: | H:

src/views/activity/recruitment/image/dialogTop.png
src/views/activity/recruitment/image/dialogTop.png
src/views/activity/recruitment/image/dialogTop.png
src/views/activity/recruitment/image/dialogTop.png
  • 2-up
  • Swipe
  • Onion skin

443 Bytes | W: | H:

232 Bytes | W: | H:

src/views/activity/recruitment/image/down.png
src/views/activity/recruitment/image/down.png
src/views/activity/recruitment/image/down.png
src/views/activity/recruitment/image/down.png
  • 2-up
  • Swipe
  • Onion skin

186 KB | W: | H:

35 KB | W: | H:

src/views/activity/recruitment/image/fail.png
src/views/activity/recruitment/image/fail.png
src/views/activity/recruitment/image/fail.png
src/views/activity/recruitment/image/fail.png
  • 2-up
  • Swipe
  • Onion skin

212 KB | W: | H:

40.1 KB | W: | H:

src/views/activity/recruitment/image/judge.png
src/views/activity/recruitment/image/judge.png
src/views/activity/recruitment/image/judge.png
src/views/activity/recruitment/image/judge.png
  • 2-up
  • Swipe
  • Onion skin

11.6 KB | W: | H:

3.69 KB | W: | H:

src/views/activity/recruitment/image/leftArrow.png
src/views/activity/recruitment/image/leftArrow.png
src/views/activity/recruitment/image/leftArrow.png
src/views/activity/recruitment/image/leftArrow.png
  • 2-up
  • Swipe
  • Onion skin

1.09 KB | W: | H:

376 Bytes | W: | H:

src/views/activity/recruitment/image/leftLine.png
src/views/activity/recruitment/image/leftLine.png
src/views/activity/recruitment/image/leftLine.png
src/views/activity/recruitment/image/leftLine.png
  • 2-up
  • Swipe
  • Onion skin

2.58 KB | W: | H:

978 Bytes | W: | H:

src/views/activity/recruitment/image/money.png
src/views/activity/recruitment/image/money.png
src/views/activity/recruitment/image/money.png
src/views/activity/recruitment/image/money.png
  • 2-up
  • Swipe
  • Onion skin

1.29 KB | W: | H:

654 Bytes | W: | H:

src/views/activity/recruitment/image/pop.png
src/views/activity/recruitment/image/pop.png
src/views/activity/recruitment/image/pop.png
src/views/activity/recruitment/image/pop.png
  • 2-up
  • Swipe
  • Onion skin

12.4 KB | W: | H:

3.74 KB | W: | H:

src/views/activity/recruitment/image/progress.png
src/views/activity/recruitment/image/progress.png
src/views/activity/recruitment/image/progress.png
src/views/activity/recruitment/image/progress.png
  • 2-up
  • Swipe
  • Onion skin

11.5 KB | W: | H:

3.7 KB | W: | H:

src/views/activity/recruitment/image/rightArrow.png
src/views/activity/recruitment/image/rightArrow.png
src/views/activity/recruitment/image/rightArrow.png
src/views/activity/recruitment/image/rightArrow.png
  • 2-up
  • Swipe
  • Onion skin

1.09 KB | W: | H:

372 Bytes | W: | H:

src/views/activity/recruitment/image/rightLine.png
src/views/activity/recruitment/image/rightLine.png
src/views/activity/recruitment/image/rightLine.png
src/views/activity/recruitment/image/rightLine.png
  • 2-up
  • Swipe
  • Onion skin

2.01 KB | W: | H:

849 Bytes | W: | H:

src/views/activity/recruitment/image/service.png
src/views/activity/recruitment/image/service.png
src/views/activity/recruitment/image/service.png
src/views/activity/recruitment/image/service.png
  • 2-up
  • Swipe
  • Onion skin

187 KB | W: | H:

36 KB | W: | H:

src/views/activity/recruitment/image/success.png
src/views/activity/recruitment/image/success.png
src/views/activity/recruitment/image/success.png
src/views/activity/recruitment/image/success.png
  • 2-up
  • Swipe
  • Onion skin

117 KB | W: | H:

19.7 KB | W: | H:

src/views/activity/recruitment/image/titleBg.png
src/views/activity/recruitment/image/titleBg.png
src/views/activity/recruitment/image/titleBg.png
src/views/activity/recruitment/image/titleBg.png
  • 2-up
  • Swipe
  • Onion skin

121 KB | W: | H:

20.5 KB | W: | H:

src/views/activity/recruitment/image/titleBgLong.png
src/views/activity/recruitment/image/titleBgLong.png
src/views/activity/recruitment/image/titleBgLong.png
src/views/activity/recruitment/image/titleBgLong.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -16,13 +16,6 @@ const getAnchorSignView = async () => { ...@@ -16,13 +16,6 @@ const getAnchorSignView = async () => {
type: 0 type: 0
}); });
// 签约状态 0 需要签约页面 1 签约结果页面
if (data.signInfo == 1) {
isShowReview.value = true
} else {
isShowReview.value = false
}
// 合作状态 // 合作状态
signLevel.value = data.levelInfo; signLevel.value = data.levelInfo;
...@@ -31,14 +24,25 @@ const getAnchorSignView = async () => { ...@@ -31,14 +24,25 @@ const getAnchorSignView = async () => {
// 签约平台 // 签约平台
platformList.value = data.list; platformList.value = data.list;
// 签约状态 0 需要签约页面 1 签约结果页面
if (data.signInfo == 1) {
isShowReview.value = true
} else {
isShowReview.value = false
}
}; };
const refresh = () => {
getAnchorSignView()
}
onMounted(() => { onMounted(() => {
getAnchorSignView() getAnchorSignView()
}) })
</script> </script>
<template> <template>
<sign v-if="isShowReview === false" :signLevel="signLevel" :platformList="platformList" /> <sign v-if="isShowReview === false" :signLevel="signLevel" :platformList="platformList" @refreshView="refresh" />
<review v-else-if="isShowReview === true" :resultLevel="resultLevel" /> <review v-else-if="isShowReview === true" :resultLevel="resultLevel" />
</template> </template>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment