|
@@ -0,0 +1,133 @@
|
|
1
|
+<template>
|
|
2
|
+ <div id="root">
|
|
3
|
+ <span class="activityTile">{{ ruleForm.activityTitle }}</span>
|
|
4
|
+ <img :src="ruleForm.activityCarouselImg" width="700" height="500">
|
|
5
|
+ <div class="activityContext">
|
|
6
|
+ {{ ruleForm.activityContent }}
|
|
7
|
+ </div>
|
|
8
|
+ <div class="activityContextImg">
|
|
9
|
+ <img v-for="item in ruleForm.contentImg" :src="item" width="700" height="500" >
|
|
10
|
+ </div>
|
|
11
|
+ </div>
|
|
12
|
+</template>
|
|
13
|
+
|
|
14
|
+<script>
|
|
15
|
+export default {
|
|
16
|
+ data() {
|
|
17
|
+ return {
|
|
18
|
+ asOfdate: '2018/10/10 23:59:59',
|
|
19
|
+ ruleForm: {
|
|
20
|
+ id: '',
|
|
21
|
+ activityTitle: '',
|
|
22
|
+ activityCarouselImg: '', // 轮播图
|
|
23
|
+ activityContent: '', // 活动内容详细
|
|
24
|
+ contentImg: [], // 活动内容配图
|
|
25
|
+ signUpCount: '', // 报名人数统计
|
|
26
|
+ signUpMax: '', // 活动人数上限
|
|
27
|
+ registrationEndTime: '', // 报名活动结束时间
|
|
28
|
+ sort: 1, // 权重
|
|
29
|
+ status: '' // 状态 0 是已作废 1 是已发布 2 是草稿 3 是已修改
|
|
30
|
+ }
|
|
31
|
+ }
|
|
32
|
+ },
|
|
33
|
+ mounted() {
|
|
34
|
+ this.getById(this.$route.params.id)
|
|
35
|
+ },
|
|
36
|
+ methods: {
|
|
37
|
+ getById(id) { // 根据ID获取活动信息
|
|
38
|
+ this.$store.dispatch('TransactionById', id).then((res) => {
|
|
39
|
+ const resData = res.data
|
|
40
|
+ this.ruleForm = resData.info
|
|
41
|
+ this.ruleForm.contentImg = resData.contentImg
|
|
42
|
+ })
|
|
43
|
+ },
|
|
44
|
+ formatDate(val) {
|
|
45
|
+ var value = new Date(val)
|
|
46
|
+ var year = value.getFullYear()
|
|
47
|
+ var month = value.getMonth() + 1
|
|
48
|
+ var day = value.getDate()
|
|
49
|
+ // var hour = value.getHours()
|
|
50
|
+ // var minutes = value.getMinutes()
|
|
51
|
+ // var seconds = value.getSeconds()
|
|
52
|
+ // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
|
|
53
|
+ return year + '-' + month + '-' + day
|
|
54
|
+ },
|
|
55
|
+ ediActivity() { // 修改活动
|
|
56
|
+ this.$router.push({ name: 'activity-edi', params: { id: this.ruleForm.id }})
|
|
57
|
+ }
|
|
58
|
+ }
|
|
59
|
+}
|
|
60
|
+</script>
|
|
61
|
+
|
|
62
|
+<style scoped>
|
|
63
|
+#root {
|
|
64
|
+ display: flex;
|
|
65
|
+ flex-flow: column;
|
|
66
|
+ width: 700px;
|
|
67
|
+ margin-top: 50px;
|
|
68
|
+ margin-left: auto;
|
|
69
|
+ margin-right: auto;
|
|
70
|
+}
|
|
71
|
+.activityTile{
|
|
72
|
+ text-align: center;
|
|
73
|
+ font-size: 30px;
|
|
74
|
+ margin-bottom: 10px;
|
|
75
|
+}
|
|
76
|
+.activityContext{
|
|
77
|
+ margin-top: 20px;
|
|
78
|
+ margin-bottom: 20px;
|
|
79
|
+ font-size: 20px;
|
|
80
|
+ justify-items: center;
|
|
81
|
+}
|
|
82
|
+.progress {
|
|
83
|
+ display: flex;
|
|
84
|
+ justify-content: space-between;
|
|
85
|
+ margin-top: 20px;
|
|
86
|
+ margin-bottom: 20px;
|
|
87
|
+}
|
|
88
|
+.text-progress {
|
|
89
|
+ width: 500px;
|
|
90
|
+ float: left;
|
|
91
|
+ align-content: center;
|
|
92
|
+ position: absolute;
|
|
93
|
+ margin-top: 12px;
|
|
94
|
+}
|
|
95
|
+.people-number {
|
|
96
|
+ position: relative;
|
|
97
|
+ margin-left: 180px;
|
|
98
|
+}
|
|
99
|
+.outer-layer {
|
|
100
|
+ background-color: gainsboro;
|
|
101
|
+ height: 3px;
|
|
102
|
+ width: 450px;
|
|
103
|
+ margin-top: -10px;
|
|
104
|
+ position: relative;
|
|
105
|
+}
|
|
106
|
+.inner-layer {
|
|
107
|
+ background-color: aquamarine;
|
|
108
|
+ height: 6px;
|
|
109
|
+ width: 100px;
|
|
110
|
+ position: relative;
|
|
111
|
+ margin-top: -4px;
|
|
112
|
+}
|
|
113
|
+.circular {
|
|
114
|
+ border: 1px #001528 solid;
|
|
115
|
+ border-radius: 10px;
|
|
116
|
+ /*background-color: chartreuse;*/
|
|
117
|
+ width: 20px;
|
|
118
|
+ height: 20px;
|
|
119
|
+ position: relative;
|
|
120
|
+ margin-left: 452px;
|
|
121
|
+ margin-top: 11px;
|
|
122
|
+ float: left;
|
|
123
|
+}
|
|
124
|
+.people-limit {
|
|
125
|
+ margin-top: 13px;
|
|
126
|
+}
|
|
127
|
+.bom-button{
|
|
128
|
+ display: flex;
|
|
129
|
+ justify-content: center;
|
|
130
|
+ margin-top: 20px;
|
|
131
|
+ margin-bottom: 100px;
|
|
132
|
+}
|
|
133
|
+</style>
|