From ad40d7749ee16b268594d1696fb83a3810efdbb3 Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Thu, 29 Oct 2020 17:11:48 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E6=97=B6?= =?UTF-8?q?=E9=97=B4top?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/regime/week.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/regime/week.vue b/src/views/regime/week.vue index bc7462f..a11d2d2 100644 --- a/src/views/regime/week.vue +++ b/src/views/regime/week.vue @@ -44,9 +44,9 @@ item > 9 ? item : "0" + item }}:00 -
+
-
+
{{week.date[i -1].list[item - 1].title}}
@@ -64,6 +64,7 @@ display: flex; flex-direction: column; align-items: center; + .head { width: 1320px; height: 57px; @@ -144,6 +145,7 @@ } .body { width: 100%; + overflow: hidden; .row { background-color: #fff; height: 63px; @@ -165,8 +167,9 @@ display: flex; flex-direction: column; color: #111; - + position: relative; > div { + position: absolute; min-height: 100%; width: 100%; border-radius: 6px; From e0319762c9995dcfbb8d53b10e999b6bd9c4d08c Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Fri, 30 Oct 2020 09:31:33 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=91=A8=E5=8E=86=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/regime/week.vue | 54 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/src/views/regime/week.vue b/src/views/regime/week.vue index a11d2d2..5643380 100644 --- a/src/views/regime/week.vue +++ b/src/views/regime/week.vue @@ -39,7 +39,7 @@
-
+
{{ item > 10 ? item - 1 : "0" + (item - 1) }}:00-{{ item > 9 ? item : "0" + item }}:00 @@ -55,6 +55,13 @@
+
+
+
+
+
+
{{times}}
+
@@ -146,6 +153,7 @@ .body { width: 100%; overflow: hidden; + position: relative; .row { background-color: #fff; height: 63px; @@ -205,6 +213,32 @@ border: unset; } } + .lien{ + width: 100%; + position: absolute; + top: 0; + left: 128px; + .heng{ + display: flex; + align-items: center; + } + .dian{ + width: 6px; + height: 6px; + flex-shrink: 0; + background-color: #FFFA18; + border-radius: 50%; + } + .xian{ + width: 100%; + height: 2px; + background: linear-gradient(90deg, #FFFA18, #D0EB3D, #87E062, #42DE9D, #00DAC2); + } + } + .times{ + font-size: 11px; + color: #FFFA18; + } } } } @@ -215,6 +249,7 @@ import { getDay, gethour, getminute, gettime, getweek } from "@/utils/date"; import store from '@/store'; import { getdatelist, userinfo } from '@/api'; import router from '@/router'; +import dayjs from 'dayjs'; export default defineComponent({ props: {}, @@ -247,6 +282,18 @@ export default defineComponent({ getdates(userid); + const top = ref(0); + const times = ref(''); + const xs = ref(0); + setInterval(()=>{ + const now = dayjs(); + const xiaoshi = now.month() + const fenzhong = now.minute() + top.value = (xiaoshi + (fenzhong / 60)) * 0.63; + times.value = (xiaoshi > 10 ? xiaoshi : '0' + xiaoshi) + ":" + (fenzhong > 10 ? fenzhong : '0' + fenzhong); + xs.value = xiaoshi; + }, 2000) + watch(zhou, (value) => { week.value = getweek(value); console.log(week.value); @@ -272,7 +319,10 @@ export default defineComponent({ zhou, week, navto, - zhuangtai + zhuangtai, + top, + times, + xs }; }, }); From 7a3ca8fb62bba918c6db02066c9dd768ece17e73 Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Fri, 30 Oct 2020 09:54:39 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 21 +++++++++++++++++++++ src/components/LiveCount.vue | 2 +- src/views/regime/Liveing.vue | 11 ++++++++--- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 27c5969..294f114 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -967,4 +967,25 @@ export async function livestart(id: string) { }else{ message.error(res.msg) } + } + +export async function livestop(id: string, roomid: string) { + const res = await put("live/" + id, {status : 2}) + if(res.code == 0){ + message.success(res.msg) + }else{ + message.error(res.msg) + } + const luzhi = await get('StopMCUMixTranscode', {roomid}); + console.log(luzhi) +} +export async function luzhi(roomid: string){ + const res = await get('StartMCUMixTranscode', {roomid}); + console.log(res) +} + +// export async function StopMCUMixTranscode(roomid: number) { +// const res = await get('StopMCUMixTranscode', {roomid}); +// console.log(res) +// } diff --git a/src/components/LiveCount.vue b/src/components/LiveCount.vue index 375661e..42bd694 100644 --- a/src/components/LiveCount.vue +++ b/src/components/LiveCount.vue @@ -15,7 +15,7 @@
参加时长 -
30min
+
{{i.length}}min
{ console.error('进房失败 ' + error); }) .then(() => { console.log('进房成功'); + // if(typeof id == "string"){ + luzhi(roominfo.value.roomid) + // } fun() }); } @@ -374,7 +377,9 @@ export default defineComponent({ client.leave().then(() => { // leaving room success visible.value = false; - + if(typeof id == "string"){ + livestop(id, roominfo.value.roomid) + } }).catch((error: string) => { message.error('关闭失败: ' + error); }); From 8ded17d75477f52175536044eea8cc732cf9b110 Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Fri, 30 Oct 2020 10:35:39 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=BB=98=E8=AE=A4ip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 ++ src/api/index.ts | 10 ++++++++++ src/store/index.ts | 18 +++++++++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index 686aa3d..9c88408 100644 --- a/src/App.vue +++ b/src/App.vue @@ -25,6 +25,8 @@ export default defineComponent({ store.commit("login", true) store.dispatch("setUserInfo"); }else{ + console.log('ip') + store.dispatch("getip"); router.push("/") } return{ diff --git a/src/api/index.ts b/src/api/index.ts index 294f114..6f1b1a2 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -985,6 +985,16 @@ export async function luzhi(roomid: string){ console.log(res) } +export async function getaddr() { + const res = await get('ip'); + const gj = res.data.address.split("|")[0]; + if(gj == "CN"){ + return ["zh", "中文", '人民币¥']; + }else { + return ['en', 'English', '美元$'] + } +} + // export async function StopMCUMixTranscode(roomid: number) { // const res = await get('StopMCUMixTranscode', {roomid}); // console.log(res) diff --git a/src/store/index.ts b/src/store/index.ts index a281356..7c3fadc 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,4 +1,5 @@ -import { userinfo } from '@/api'; +import { getaddr, userinfo } from '@/api'; +import { isProxy } from 'vue'; import { createStore } from 'vuex' export default createStore({ @@ -57,6 +58,14 @@ export default createStore({ }, login(state, islogin: boolean){ state.islogin = islogin; + }, + setLanguage(state, data){ + const split = new Date().toString().split(" "); + const timeZoneFormatted = split[split.length - 2] + " " + split[split.length - 1]; + state.userinfo.language = data[1] // English 中文 + state.userinfo.languageValue = data[0] // 'en' 'zh' + state.userinfo.zoneStr = timeZoneFormatted; + state.userinfo.currency = data[2]; } }, actions: { @@ -64,7 +73,14 @@ export default createStore({ const user = await userinfo(); if(user != '未登录'){ commit('setUserInfo', user); + } else { + const info = await getaddr(); + commit("setLanguage", info) } + }, + async getip({ commit }){ + const info = await getaddr(); + commit("setLanguage", info) } }, modules: { From 1ea10e5a780437f4d77273996713c6a7c8a6cb99 Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Fri, 30 Oct 2020 14:49:01 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=80=E5=87=BA?= =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Menu.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/Menu.vue b/src/components/Menu.vue index dcdfc7c..e75117d 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -115,8 +115,10 @@ }