切换wxjava导致直播间roomid不兼容,同步时候报错
This commit is contained in:
@ -54,7 +54,7 @@ export function parseTime(time, cFormat) {
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
export function formatTime(time, option) {
|
export function formatTime(time, option) {
|
||||||
if(time == null) return '----'
|
if (time == null) return '----'
|
||||||
|
|
||||||
if (('' + time).length === 10) {
|
if (('' + time).length === 10) {
|
||||||
time = parseInt(time) * 1000
|
time = parseInt(time) * 1000
|
||||||
@ -94,8 +94,23 @@ export function formatTime(time, option) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function formatTimeTwo(time) {
|
export function formatTimeTwo(time) {
|
||||||
if(time == null) return "无"
|
if (time == null) return '无'
|
||||||
//time = time * 1000
|
// time = time * 1000
|
||||||
|
const d = new Date(time)
|
||||||
|
return (
|
||||||
|
d.getFullYear() + '年' +
|
||||||
|
(d.getMonth() + 1) +
|
||||||
|
'月' +
|
||||||
|
d.getDate() +
|
||||||
|
'日' +
|
||||||
|
d.getHours() +
|
||||||
|
'时' +
|
||||||
|
d.getMinutes() +
|
||||||
|
'分'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export function formatTimeThree(time) {
|
||||||
|
time = time * 1000
|
||||||
const d = new Date(time)
|
const d = new Date(time)
|
||||||
return (
|
return (
|
||||||
d.getFullYear() + '年' +
|
d.getFullYear() + '年' +
|
||||||
@ -109,7 +124,6 @@ export function formatTimeTwo(time) {
|
|||||||
'分'
|
'分'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} url
|
* @param {string} url
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column v-if="columns.visible('roomid')" prop="roomid" label="直播间id" />
|
<el-table-column v-if="columns.visible('roomId')" prop="roomId" label="直播间id" />
|
||||||
<el-table-column v-if="columns.visible('name')" prop="name" label="直播间标题" />
|
<el-table-column v-if="columns.visible('name')" prop="name" label="直播间标题" />
|
||||||
<el-table-column v-if="columns.visible('coverImge')" prop="coverImge" label="背景图">
|
<el-table-column v-if="columns.visible('coverImge')" prop="coverImge" label="背景图">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -114,8 +114,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-if="columns.visible('startTime')" prop="startTime" label="开始时间" />
|
<el-table-column :show-overflow-tooltip="true" prop="startTime" label="开始时间" width="200" >
|
||||||
<el-table-column v-if="columns.visible('endTime')" prop="endTime" label="预计结束时间" />
|
<template slot-scope="scope" width="200">
|
||||||
|
<span>{{ formatTimeThree(scope.row.startTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" prop="endTime" label="预计结束时间" width="200">
|
||||||
|
<template slot-scope="scope" width="200">
|
||||||
|
<span>{{ formatTimeThree(scope.row.endTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column v-if="columns.visible('anchorName')" prop="anchorName" label="主播昵称" />
|
<el-table-column v-if="columns.visible('anchorName')" prop="anchorName" label="主播昵称" />
|
||||||
<el-table-column v-if="columns.visible('anchorWechat')" prop="anchorWechat" label="主播微信号" />
|
<el-table-column v-if="columns.visible('anchorWechat')" prop="anchorWechat" label="主播微信号" />
|
||||||
<el-table-column v-if="columns.visible('anchorImge')" prop="anchorImge" label="主播头像" >
|
<el-table-column v-if="columns.visible('anchorImge')" prop="anchorImge" label="主播头像" >
|
||||||
@ -188,15 +196,15 @@ import pagination from '@crud/Pagination'
|
|||||||
import MaterialList from '@/components/material'
|
import MaterialList from '@/components/material'
|
||||||
import LiveGoods from '@/views/components/livegoods'
|
import LiveGoods from '@/views/components/livegoods'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import {formatTimeThree} from '@/utils/index'
|
||||||
// crud交由presenter持有
|
// crud交由presenter持有
|
||||||
const defaultCrud = CRUD({ optShow: {
|
const defaultCrud = CRUD({ optShow: {
|
||||||
add: true,
|
add: true,
|
||||||
edit: false,
|
edit: false,
|
||||||
del: false,
|
del: false,
|
||||||
download: true
|
download: true
|
||||||
},title: '直播房间', url: 'api/yxWechatLive', sort: 'roomId,desc', crudMethod: { ...crudYxWechatLive }})
|
},title: '直播房间', url: 'api/yxWechatLive', sort: 'room_id,desc', crudMethod: { ...crudYxWechatLive }})
|
||||||
const defaultForm = { product: [],roomid: null,productId: null, name: null, coverImge: null, startDate: null, endDate : null,shareImge: null, liveStatus: null, coverImgArr: [],shareImgArr: [],anchorImgArr: [],startTime: null, endTime: null, anchorName: null, anchorWechat: null, anchorImge: null, type: null, screenType: null, closeLike: null,closeGoods: null, closeComment: null }
|
const defaultForm = { product: [],roomId: null,productId: null, name: null, coverImge: null, startDate: null, endDate : null,shareImge: null, liveStatus: null, coverImgArr: [],shareImgArr: [],anchorImgArr: [],startTime: null, endTime: null, anchorName: null, anchorWechat: null, anchorImge: null, type: null, screenType: null, closeLike: null,closeGoods: null, closeComment: null }
|
||||||
export default {
|
export default {
|
||||||
name: 'YxWechatLive',
|
name: 'YxWechatLive',
|
||||||
components: { pagination, crudOperation, rrOperation ,MaterialList,udOperation,LiveGoods},
|
components: { pagination, crudOperation, rrOperation ,MaterialList,udOperation,LiveGoods},
|
||||||
@ -258,6 +266,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
formatTimeThree,
|
||||||
getGoods(p) {
|
getGoods(p) {
|
||||||
var ids = []
|
var ids = []
|
||||||
p.forEach((item,index) => {
|
p.forEach((item,index) => {
|
||||||
|
Reference in New Issue
Block a user