Commit f206d6ff by 李伟康

commit

1 parent 11f313db
...@@ -90,27 +90,22 @@ import { activityApi, liveApi } from '@/api' ...@@ -90,27 +90,22 @@ import { activityApi, liveApi } from '@/api'
export default { export default {
name: '', name: '',
mixins: [shareMixin, pageMixin], mixins: [shareMixin, pageMixin],
data () { data() {
return { return {}
}
},
mounted () {
},
activated () {
},
deactivated () {
}, },
mounted() {},
activated() {},
deactivated() {},
methods: { methods: {
getList_0 (pageNum) { getList_0(pageNum) {
let { list } = this let { list } = this
activityApi.getActivityList({ currentPage: pageNum }).then(res => { activityApi.getActivityList({ currentPage: pageNum }).then(res => {
console.log('活动列表', res) console.log('活动列表', res)
res.list.map(e => { res.list.map(e => {
e.startTime = new Date(this.iosTimeFormat(e.startTime)).format('yyyy年M月d日') if (e.startTime) e.startTime = new Date(this.iosTimeFormat(e.startTime)).format('yyyy年M月d日')
e.endTime = new Date(this.iosTimeFormat(e.endTime)).format('yyyy年M月d日') if (e.endTime) e.endTime = new Date(this.iosTimeFormat(e.endTime)).format('yyyy年M月d日')
e.price1 = this.centsToyuan(e.price1) e.price1 = this.centsToyuan(e.price1 || 0)
e.price2 = this.centsToyuan(e.price2) e.price2 = this.centsToyuan(e.price2 || 0)
}) })
this.flag = true this.flag = true
this.list = list.concat(res.list) this.list = list.concat(res.list)
...@@ -118,7 +113,7 @@ export default { ...@@ -118,7 +113,7 @@ export default {
this.hideLoading() this.hideLoading()
}) })
}, },
getList_1 (pageNum) { getList_1(pageNum) {
let { list } = this let { list } = this
liveApi.getLiveList({ pageNum }).then(res => { liveApi.getLiveList({ pageNum }).then(res => {
console.log('直播列表', res) console.log('直播列表', res)
...@@ -128,10 +123,10 @@ export default { ...@@ -128,10 +123,10 @@ export default {
this.hideLoading() this.hideLoading()
}) })
}, },
centsToyuan (price) { centsToyuan(price) {
return Number(price / 100).toFixed(2) return Number(price / 100).toFixed(2)
}, },
iosTimeFormat (time) { iosTimeFormat(time) {
return time.replace(/\-/g, '/') return time.replace(/\-/g, '/')
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!