Commit 37b57f4d by 杨明

fixed

1 parent 26911de0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-23 11:06:49 * @Date: 2022-11-23 11:06:49
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-29 16:59:43 * @LastEditTime: 2022-12-01 10:13:27
* @FilePath: \live\src\setup\qiankun.js * @FilePath: \live\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-23 11:06:49 * @Date: 2022-11-23 11:06:49
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-28 11:18:50 * @LastEditTime: 2022-12-01 10:06:04
* @FilePath: \live\src\utils\index.js * @FilePath: \live\src\utils\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -40,7 +40,7 @@ export function downloadUrl(url) { ...@@ -40,7 +40,7 @@ export function downloadUrl(url) {
} }
export function GetDateDiff(time1, time2 = new Date()) { export function GetDateDiff(time1, time2 = new Date()) {
let startTime = new Date(time1) //开始时间 let startTime = new Date(time1) //开始时间
let endTime = time2 //结束时间 let endTime = new Date(time2) //结束时间
let date = endTime.getTime() - startTime.getTime() //时间差秒 let date = endTime.getTime() - startTime.getTime() //时间差秒
//计算出相差天数 //计算出相差天数
let days = Math.floor(date / (24 * 3600 * 1000)) let days = Math.floor(date / (24 * 3600 * 1000))
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<div class="look-title">{{ room.name }}</div> <div class="look-title">{{ room.name }}</div>
<div class="look-desc">开播时间:{{ getBetween }}</div> <div class="look-desc">开播时间:{{ getBetween }}</div>
<div class="look-desc">房间号:{{ room.id }}</div> <div class="look-desc">房间号:{{ room.id }}</div>
<div class="look-status">直播已结束{{ endTime }}</div> <div class="look-status" v-if="endStatus == 'end'">直播已结束{{ endTime }}</div>
<div class="look-status" v-if="endStatus == 'start'">直播倒计时{{ endTime }}</div>
</div> </div>
</div> </div>
<div class="look-right"> <div class="look-right">
...@@ -103,6 +104,7 @@ export default { ...@@ -103,6 +104,7 @@ export default {
}, },
data() { data() {
return { return {
endStatus: '',
roomNum: 0, roomNum: 0,
roomId: '', roomId: '',
endTime: '', endTime: '',
...@@ -179,7 +181,14 @@ export default { ...@@ -179,7 +181,14 @@ export default {
methods: { methods: {
//时间差 //时间差
getTime() { getTime() {
this.endTime = GetDateDiff(this.room.endTimeStr) if (new Date(this.room.endTimeStr).getTime() < new Date().getTime()) {
this.endTime = GetDateDiff(this.room.endTimeStr)
this.endStatus = 'end'
}
if (new Date(this.room.startTimeStr).getTime() > new Date().getTime()) {
this.endTime = GetDateDiff(new Date(), this.room.startTimeStr)
this.endStatus = 'start'
}
}, },
handleLook(row) { handleLook(row) {
this.visitSource = row.visitSource this.visitSource = row.visitSource
......
...@@ -111,6 +111,7 @@ export default { ...@@ -111,6 +111,7 @@ export default {
self.$refs['uploadForm'].clearValidate('mediaUrl') self.$refs['uploadForm'].clearValidate('mediaUrl')
const videoUrl = res.video.url const videoUrl = res.video.url
self.$set(self.uploadForm, 'mediaUrl', videoUrl) self.$set(self.uploadForm, 'mediaUrl', videoUrl)
self.$set(self.uploadForm, 'fileId', res.fileId)
self.$nextTick(() => { self.$nextTick(() => {
self.getImgUrl(videoUrl).then(res => { self.getImgUrl(videoUrl).then(res => {
self.$set(self.uploadForm, 'coverUrl', res) self.$set(self.uploadForm, 'coverUrl', res)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!