From ef05f1416c204098f003c3f4c3861354d18cd503 Mon Sep 17 00:00:00 2001
From: 张钢 <floatgang@163.com>
Date: 星期六, 24 八月 2024 13:48:35 +0800
Subject: [PATCH] Merge branch 'master' of http://47.93.189.255:8099/r/zhangshi_app_web
---
ruoyi-ui/src/views/meeting/Home.vue | 62 ++++++++++++++++++++++++++++--
1 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/ruoyi-ui/src/views/meeting/Home.vue b/ruoyi-ui/src/views/meeting/Home.vue
index 9144f00..e09ac85 100644
--- a/ruoyi-ui/src/views/meeting/Home.vue
+++ b/ruoyi-ui/src/views/meeting/Home.vue
@@ -80,6 +80,7 @@
return {
user:{},
showComponent: false,
+ time:undefined,
loading: true,
// 浼氳鍩烘湰淇℃伅
sdkAppId: 1600032250,
@@ -91,8 +92,35 @@
};
},
created() {
- this.getUser();
this.getRoomId();
+ this.getUser();
+ },
+
+computed: {
+ isStartExercise() {
+ let roomId = this.roomId;
+ let userId = this.userId;
+ let time = this.time
+ return { roomId, userId, time };
+ }
+},
+
+watch: {
+
+ isStartExercise: {
+ immediate: true,
+ handler(n) {
+ if (n.roomId && n.userId) {
+ // 鍒ゆ柇杩欎袱涓�煎悓鏃跺瓨鍦�
+ this.loading = false;
+ this.showComponent = true;
+ }
+ if(n.time == false){
+ this.showComponent = false;
+ }
+ },
+ }
+
},
methods: {
// 鑾峰彇鎴块棿鍙�
@@ -100,6 +128,23 @@
const id = this.$route.params && this.$route.params.id;
getWebcastInfo(id).then(response => {
this.roomId = response.data.roomId
+ console.log(response.data,'datadtaadadsd')
+
+ let time = response.data.startTime.split(' ')[0]
+ // let now = new Date();
+ // let dateStr = now.toLocaleDateString().replaceAll('/','-'); // 鏈湴鏍煎紡鐨勬棩鏈熷瓧绗︿覆
+ const now = new Date();
+ const year = now.getFullYear();
+ const month = (now.getMonth() + 1).toString().padStart(2, '0');
+ const day = now.getDate().toString().padStart(2, '0');
+ let dateStr = `${year}-${month}-${day}`;
+ if(time == dateStr){
+ this.time = true
+ }else{
+ this.time = false
+ this.$modal.msgSuccess("涓嶅湪鐩存挱鏃堕棿鑼冨洿锛�");
+ }
+
})
},
// 鑾峰彇鐢ㄦ埛鍚�
@@ -108,11 +153,18 @@
this.user = response.data;
this.userId = this.user.nickName
// alert(this.userId)
+ // alert(this.roomId)
});
- setTimeout(() => {
- this.loading = false;
- this.showComponent = true;
- }, 3000);
+
+ // setTimeout(() => {
+ // this.loading = false;
+ // this.showComponent = true;
+ // }, 5000);
+ // if(this.userId !== '' && this.roomId !== ''){
+ // alert(123)
+ // this.loading = false;
+ // this.showComponent = true;
+ // }
},
handleValueChange(value, key) {
--
Gitblit v1.9.1