Add 卓米会 mini program and admin server.
Initial commit of the WeChat mini program, Express backend, and admin console. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
const media = require('../../utils/media')
|
||||
|
||||
Component({
|
||||
properties: {
|
||||
activity: {
|
||||
type: Object,
|
||||
value: null
|
||||
},
|
||||
showPast: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
}
|
||||
},
|
||||
data: {
|
||||
poster: '',
|
||||
video: '',
|
||||
ended: false
|
||||
},
|
||||
observers: {
|
||||
activity(activity) {
|
||||
const item = activity || {}
|
||||
this.setData({
|
||||
poster: media.absUrl(item.poster || item.cover),
|
||||
video: media.absUrl(item.video),
|
||||
ended: item.status === 'past'
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onMap() {
|
||||
this.triggerEvent('map')
|
||||
},
|
||||
onSignup() {
|
||||
if (!this.data.activity || this.data.ended) return
|
||||
this.triggerEvent('signup')
|
||||
},
|
||||
onPast() {
|
||||
this.triggerEvent('past')
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user