diff --git a/project/qujing/app/AppCurriculumManage/AppCurriculumManage.vue b/project/qujing/app/AppCurriculumManage/AppCurriculumManage.vue index 9e451393..f23bc436 100644 --- a/project/qujing/app/AppCurriculumManage/AppCurriculumManage.vue +++ b/project/qujing/app/AppCurriculumManage/AppCurriculumManage.vue @@ -7,9 +7,10 @@ diff --git a/project/qujing/app/AppCurriculumManage/components/Comment.vue b/project/qujing/app/AppCurriculumManage/components/Comment.vue new file mode 100644 index 00000000..b485cf82 --- /dev/null +++ b/project/qujing/app/AppCurriculumManage/components/Comment.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/project/qujing/app/AppCurriculumManage/components/Detail.vue b/project/qujing/app/AppCurriculumManage/components/Detail.vue index fd43e438..b3c1bb5d 100644 --- a/project/qujing/app/AppCurriculumManage/components/Detail.vue +++ b/project/qujing/app/AppCurriculumManage/components/Detail.vue @@ -1,154 +1,42 @@ @@ -160,96 +48,40 @@ props: { instance: Function, dict: Object, - params: Object + params: Object, + moduleId: String }, data () { return { - currIndex: 0, - tabList: ['基本信息', '报名记录', '抽奖记录'], - colConfigs: [ - { prop: 'name', label: '姓名', align: 'left', width: '200px' }, - { prop: 'phone', label: '手机号', align: 'center' }, - { prop: 'createTime', label: '报名时间', align: 'center' } - ], - prizeColConfigs: [ - { prop: 'name', label: '姓名', align: 'left', width: '200px' }, - { prop: 'phone', label: '手机号', align: 'center' }, - { prop: 'prizeName', label: '奖品名称', align: 'center' }, - { prop: 'createTime', label: '抽奖时间', align: 'center' } - ], - prizeList: [], - prizeSearch: { - size: 10, - current: 1, - name: '', - prizeId: '' - }, - search: { - size: 10, - name: '', - current: 1 - }, - prizes: [], - tableData: [], - total: 0, - info: {} + info: {}, + id: '' } }, created () { - this.getInfo() - this.getList() - this.getPrizeList() + if (this.params && this.params.id) { + this.id = this.params.id + this.getInfo(this.params.id) + } }, methods: { - getList() { - this.instance.post(`/app/appmarketingactivityinfo/signUpList?activityId=${this.params.id}`, null, { - params: { - ...this.search - } - }).then(res => { - if (res.code == 0) { - this.tableData = res.data.records - this.total = res.data.total + getInfo (id) { + this.instance.post(`/app/appcontentinfo/queryDetailById?id=${id}`).then(res => { + if (res.code === 0) { + this.info = res.data + this.info.pictureUrl = res.data.pictureUrl ? [{ + url: res.data.pictureUrl + }] : [] } }) }, - getPrizeList() { - this.instance.post(`/app/appmarketingactivityinfo/raffleList?activityId=${this.params.id}`, null, { - params: { - ...this.prizeSearch - } - }).then(res => { - if (res.code == 0) { - this.prizeList = res.data.records - this.prizeSearch.total = res.data.total - } - }) - }, - - getInfo () { - this.instance.post(`/app/appmarketingactivityinfo/queryDetailById?id=${this.params.id}`).then(res => { - if (res.code == 0) { - if (res.data) { - this.info = res.data - this.prizes = res.data.prizes.map(v => { - return { - dictValue: v.id, - dictName: v.name - } - }) - } - } - }) - }, - - cancel () { + cancel (isRefresh) { this.$emit('change', { type: 'List', - isRefresh: true + isRefresh: !!isRefresh }) } } @@ -257,14 +89,4 @@ diff --git a/project/qujing/app/AppCurriculumManage/components/List.vue b/project/qujing/app/AppCurriculumManage/components/List.vue index c3e98319..6b6a0257 100644 --- a/project/qujing/app/AppCurriculumManage/components/List.vue +++ b/project/qujing/app/AppCurriculumManage/components/List.vue @@ -1,8 +1,7 @@