Browse Source

活动编辑页面

庄逸洲 5 years ago
parent
commit
a1386387db

+ 11 - 30
package-lock.json View File

4706
         "ansi-regex": {
4706
         "ansi-regex": {
4707
           "version": "2.1.1",
4707
           "version": "2.1.1",
4708
           "bundled": true,
4708
           "bundled": true,
4709
-          "dev": true,
4710
-          "optional": true
4709
+          "dev": true
4711
         },
4710
         },
4712
         "aproba": {
4711
         "aproba": {
4713
           "version": "1.2.0",
4712
           "version": "1.2.0",
4728
         "balanced-match": {
4727
         "balanced-match": {
4729
           "version": "1.0.0",
4728
           "version": "1.0.0",
4730
           "bundled": true,
4729
           "bundled": true,
4731
-          "dev": true,
4732
-          "optional": true
4730
+          "dev": true
4733
         },
4731
         },
4734
         "brace-expansion": {
4732
         "brace-expansion": {
4735
           "version": "1.1.11",
4733
           "version": "1.1.11",
4736
           "bundled": true,
4734
           "bundled": true,
4737
           "dev": true,
4735
           "dev": true,
4738
-          "optional": true,
4739
           "requires": {
4736
           "requires": {
4740
             "balanced-match": "^1.0.0",
4737
             "balanced-match": "^1.0.0",
4741
             "concat-map": "0.0.1"
4738
             "concat-map": "0.0.1"
4750
         "code-point-at": {
4747
         "code-point-at": {
4751
           "version": "1.1.0",
4748
           "version": "1.1.0",
4752
           "bundled": true,
4749
           "bundled": true,
4753
-          "dev": true,
4754
-          "optional": true
4750
+          "dev": true
4755
         },
4751
         },
4756
         "concat-map": {
4752
         "concat-map": {
4757
           "version": "0.0.1",
4753
           "version": "0.0.1",
4758
           "bundled": true,
4754
           "bundled": true,
4759
-          "dev": true,
4760
-          "optional": true
4755
+          "dev": true
4761
         },
4756
         },
4762
         "console-control-strings": {
4757
         "console-control-strings": {
4763
           "version": "1.1.0",
4758
           "version": "1.1.0",
4764
           "bundled": true,
4759
           "bundled": true,
4765
-          "dev": true,
4766
-          "optional": true
4760
+          "dev": true
4767
         },
4761
         },
4768
         "core-util-is": {
4762
         "core-util-is": {
4769
           "version": "1.0.2",
4763
           "version": "1.0.2",
4880
         "inherits": {
4874
         "inherits": {
4881
           "version": "2.0.3",
4875
           "version": "2.0.3",
4882
           "bundled": true,
4876
           "bundled": true,
4883
-          "dev": true,
4884
-          "optional": true
4877
+          "dev": true
4885
         },
4878
         },
4886
         "ini": {
4879
         "ini": {
4887
           "version": "1.3.5",
4880
           "version": "1.3.5",
4893
           "version": "1.0.0",
4886
           "version": "1.0.0",
4894
           "bundled": true,
4887
           "bundled": true,
4895
           "dev": true,
4888
           "dev": true,
4896
-          "optional": true,
4897
           "requires": {
4889
           "requires": {
4898
             "number-is-nan": "^1.0.0"
4890
             "number-is-nan": "^1.0.0"
4899
           }
4891
           }
4908
           "version": "3.0.4",
4900
           "version": "3.0.4",
4909
           "bundled": true,
4901
           "bundled": true,
4910
           "dev": true,
4902
           "dev": true,
4911
-          "optional": true,
4912
           "requires": {
4903
           "requires": {
4913
             "brace-expansion": "^1.1.7"
4904
             "brace-expansion": "^1.1.7"
4914
           }
4905
           }
4916
         "minimist": {
4907
         "minimist": {
4917
           "version": "0.0.8",
4908
           "version": "0.0.8",
4918
           "bundled": true,
4909
           "bundled": true,
4919
-          "dev": true,
4920
-          "optional": true
4910
+          "dev": true
4921
         },
4911
         },
4922
         "minipass": {
4912
         "minipass": {
4923
           "version": "2.3.5",
4913
           "version": "2.3.5",
4924
           "bundled": true,
4914
           "bundled": true,
4925
           "dev": true,
4915
           "dev": true,
4926
-          "optional": true,
4927
           "requires": {
4916
           "requires": {
4928
             "safe-buffer": "^5.1.2",
4917
             "safe-buffer": "^5.1.2",
4929
             "yallist": "^3.0.0"
4918
             "yallist": "^3.0.0"
4942
           "version": "0.5.1",
4931
           "version": "0.5.1",
4943
           "bundled": true,
4932
           "bundled": true,
4944
           "dev": true,
4933
           "dev": true,
4945
-          "optional": true,
4946
           "requires": {
4934
           "requires": {
4947
             "minimist": "0.0.8"
4935
             "minimist": "0.0.8"
4948
           }
4936
           }
5023
         "number-is-nan": {
5011
         "number-is-nan": {
5024
           "version": "1.0.1",
5012
           "version": "1.0.1",
5025
           "bundled": true,
5013
           "bundled": true,
5026
-          "dev": true,
5027
-          "optional": true
5014
+          "dev": true
5028
         },
5015
         },
5029
         "object-assign": {
5016
         "object-assign": {
5030
           "version": "4.1.1",
5017
           "version": "4.1.1",
5036
           "version": "1.4.0",
5023
           "version": "1.4.0",
5037
           "bundled": true,
5024
           "bundled": true,
5038
           "dev": true,
5025
           "dev": true,
5039
-          "optional": true,
5040
           "requires": {
5026
           "requires": {
5041
             "wrappy": "1"
5027
             "wrappy": "1"
5042
           }
5028
           }
5122
         "safe-buffer": {
5108
         "safe-buffer": {
5123
           "version": "5.1.2",
5109
           "version": "5.1.2",
5124
           "bundled": true,
5110
           "bundled": true,
5125
-          "dev": true,
5126
-          "optional": true
5111
+          "dev": true
5127
         },
5112
         },
5128
         "safer-buffer": {
5113
         "safer-buffer": {
5129
           "version": "2.1.2",
5114
           "version": "2.1.2",
5159
           "version": "1.0.2",
5144
           "version": "1.0.2",
5160
           "bundled": true,
5145
           "bundled": true,
5161
           "dev": true,
5146
           "dev": true,
5162
-          "optional": true,
5163
           "requires": {
5147
           "requires": {
5164
             "code-point-at": "^1.0.0",
5148
             "code-point-at": "^1.0.0",
5165
             "is-fullwidth-code-point": "^1.0.0",
5149
             "is-fullwidth-code-point": "^1.0.0",
5179
           "version": "3.0.1",
5163
           "version": "3.0.1",
5180
           "bundled": true,
5164
           "bundled": true,
5181
           "dev": true,
5165
           "dev": true,
5182
-          "optional": true,
5183
           "requires": {
5166
           "requires": {
5184
             "ansi-regex": "^2.0.0"
5167
             "ansi-regex": "^2.0.0"
5185
           }
5168
           }
5223
         "wrappy": {
5206
         "wrappy": {
5224
           "version": "1.0.2",
5207
           "version": "1.0.2",
5225
           "bundled": true,
5208
           "bundled": true,
5226
-          "dev": true,
5227
-          "optional": true
5209
+          "dev": true
5228
         },
5210
         },
5229
         "yallist": {
5211
         "yallist": {
5230
           "version": "3.0.3",
5212
           "version": "3.0.3",
5231
           "bundled": true,
5213
           "bundled": true,
5232
-          "dev": true,
5233
-          "optional": true
5214
+          "dev": true
5234
         }
5215
         }
5235
       }
5216
       }
5236
     },
5217
     },

+ 1 - 0
src/components/Neditor/index.vue View File

39
       selectionchange() {
39
       selectionchange() {
40
         this.ue.addListener('selectionchange', () => {
40
         this.ue.addListener('selectionchange', () => {
41
           this.content = this.ue.getContent()
41
           this.content = this.ue.getContent()
42
+          this.$emit("content_changed", this.content)
42
         })
43
         })
43
       },
44
       },
44
 
45
 

+ 19 - 2
src/scrm_pages/marketing_tool/activity_publish.vue View File

6
         <div class="app-container" style="padding: 0 20px; background-color: #f6f8f9;">
6
         <div class="app-container" style="padding: 0 20px; background-color: #f6f8f9;">
7
             <div class="edit-main">
7
             <div class="edit-main">
8
                 <div class="preview-panel">
8
                 <div class="preview-panel">
9
-                    <preview-form></preview-form>
9
+                    <preview-form :activity="activity" :paragraph="activity_paragraph"></preview-form>
10
                 </div>
10
                 </div>
11
                 <div class="edit-panel">
11
                 <div class="edit-panel">
12
-                    <edit-form></edit-form>
12
+                    <edit-form :activity="activity" :paragraph="activity_paragraph"></edit-form>
13
                 </div>
13
                 </div>
14
             </div>
14
             </div>
15
         </div>
15
         </div>
34
                 { path: false, name: "营销工具" },
34
                 { path: false, name: "营销工具" },
35
                 { path: false, name: "发布活动" }
35
                 { path: false, name: "发布活动" }
36
             ],
36
             ],
37
+
38
+            activity: {
39
+                id: 0,
40
+                poster_photo: "",
41
+                title: "",
42
+                subtitle: "",
43
+                address: "",
44
+                limit_num: 0,
45
+                sign_up_deadline: 0,
46
+                start_time: 0,
47
+                phone_number: "",
48
+                sign_up_notice: "",
49
+            },
50
+            activity_paragraph: {
51
+                title: "",
52
+                content: "",
53
+            }
37
         }
54
         }
38
     },
55
     },
39
 }
56
 }

+ 303 - 1
src/scrm_pages/marketing_tool/components/edit_activity_edit_form.vue View File

1
 <template>
1
 <template>
2
-    <div></div>
2
+    <div class="edit-form-main">
3
+        <div class="form-title">
4
+            <img class="icon" src="@/assets/img/sa_7.png" />
5
+            <span>活动编辑</span>
6
+        </div>
7
+        <div class="form-content">
8
+            <div class="module-panel">
9
+                <p class="module-title">
10
+                    <img src="@/assets/img/sa_13.png" />
11
+                    基本信息
12
+                </p>
13
+                <div class="module-item">
14
+                    <label class="item-title">主图</label>
15
+                    <div class="poster-photo-panel">
16
+                        <el-input v-model="poster_photo_file_name" :readonly="true" class="input"></el-input>
17
+                        <el-upload 
18
+                        action="https://upload.qiniup.com" 
19
+                        :data="{ token: qntoken, key: poster_photo_file_key }"
20
+                        :show-file-list="false"
21
+                        :on-error="posterPhotoUploadFail"
22
+                        :on-success="posterPhotoUploadSuccess"
23
+                        :before-upload="beforePosterPhotoUpload"
24
+                        >
25
+                            <el-button type="primary" style="margin-left: 10px;" v-loading="uploading_poster_photo">上传图片</el-button>
26
+                        </el-upload>
27
+                    </div>
28
+                </div>
29
+                <div class="poster-photo-hint">图片建议尺寸828*430,大小不超过3M</div>
30
+                <div class="module-item">
31
+                    <label class="item-title">标题</label>
32
+                    <el-input v-model="activity.title" class="item-input"></el-input>
33
+                </div>
34
+                <div class="module-item">
35
+                    <label class="item-title">名称</label>
36
+                    <el-input v-model="activity.subtitle" class="item-input"></el-input>
37
+                </div>
38
+                <div class="module-item">
39
+                    <label class="item-title">商户简称</label>
40
+                    <el-input v-model="$store.getters.xt_user.org.org_name" class="item-input" readonly></el-input>
41
+                </div>
42
+                <div class="module-item">
43
+                    <label class="item-title">报名时间</label>
44
+                    <el-date-picker v-model="sign_up_deadline" :picker-options="pickerOptions" value-format="timestamp" type="datetime" format="yyyy-MM-dd HH:mm" class="item-input"></el-date-picker>
45
+                </div>
46
+                <div class="module-item">
47
+                    <label class="item-title">活动时间</label>
48
+                    <el-date-picker v-model="activity_time" :picker-options="pickerOptions" value-format="timestamp" type="datetime" format="yyyy-MM-dd HH:mm" class="item-input"></el-date-picker>
49
+                </div>
50
+                <div class="module-item">
51
+                    <label class="item-title">活动地址</label>
52
+                    <el-input v-model="activity.address" class="item-input"></el-input>
53
+                </div>
54
+                <div class="module-item">
55
+                    <label class="item-title">限定人数</label>
56
+                    <el-input v-model="limit_num" class="item-input" :maxlength="9" @keyup.native="limit_num=limit_num.replace(/\D/g,'')" @afterpaste.native="limit_num=limit_num.replace(/\D/g,'')"></el-input>
57
+                    <span class="limit-text">不填写默认为无限制</span>
58
+                </div>
59
+                <div class="module-item">
60
+                    <label class="item-title">联系方式</label>
61
+                    <el-input v-model="activity.phone_number" class="item-input"></el-input>
62
+                </div>
63
+            </div>
64
+
65
+            <div class="module-panel" style="margin-top: 30px;">
66
+                <p class="module-title">
67
+                    <img src="@/assets/img/sa_13.png" />
68
+                    报名须知
69
+                </p>
70
+                <div class="module-item">
71
+                    <label class="item-title">报名须知</label>
72
+                    <el-input v-model="activity.sign_up_notice" class="item-input" type="textarea" :rows="4" resize="none"></el-input>
73
+                </div>
74
+            </div>
75
+
76
+            <div class="module-panel" style="margin-top: 30px;">
77
+                <p class="module-title">
78
+                    <img src="@/assets/img/sa_13.png" />
79
+                    详细说明
80
+                </p>
81
+                <div class="module-item">
82
+                    <label class="item-title">标题</label>
83
+                    <el-input v-model="paragraph.title" class="item-input"></el-input>
84
+                </div>
85
+                <div class="module-item">
86
+                    <label class="item-title">详情</label>
87
+                    <div class="item-input">
88
+                        <keep-alive>
89
+                            <neditor ref="neditor" id="editor" :r_content="paragraph_init_content" @content_changed="paragraphContentChanged"></neditor>
90
+                        </keep-alive>
91
+                    </div>
92
+                </div>
93
+            </div>
94
+
95
+            <div class="submit-button-panel">
96
+                <el-button style="padding: 10px 30px;" type="primary">发 布</el-button>
97
+                <el-button style="color: #409eff; border-color: #409eff; padding: 10px 30px;">保存草稿</el-button>
98
+                <el-button style="color: #409eff; border-color: #409eff; padding: 10px 30px;">预 览</el-button>
99
+            </div>
100
+        </div>
101
+    </div>
3
 </template>
102
 </template>
4
 
103
 
5
 <script>
104
 <script>
105
+import Neditor from '@/components/Neditor'
106
+import { getToken } from "@/api/qiniu"
107
+import { getFileExtension } from "@/utils/tools"
108
+
6
 export default {
109
 export default {
7
     name: "EditActivityEditForm",
110
     name: "EditActivityEditForm",
111
+    components: {
112
+        Neditor,
113
+    },
114
+    props: {
115
+        activity: {
116
+            type: Object,
117
+            required: true,
118
+        },
119
+        paragraph: {
120
+            type: Object,
121
+            required: true,
122
+        },
123
+    },
124
+    data() {
125
+        return {
126
+            uploading_poster_photo: false,
127
+            qntoken: "",
128
+            poster_photo_file_key: "",
129
+            poster_photo_file_name: "",
130
+
131
+            limit_num: "",
132
+            activity_time: 0,
133
+            sign_up_deadline: 0,
134
+            paragraph_init_content: "",
135
+
136
+            pickerOptions: {
137
+                disabledDate: (time) => {
138
+                    return time.getTime() < Date.now() - 8.64e7
139
+                }
140
+            }
141
+        }
142
+    },
143
+    created() {
144
+        this.activity_time = (new Date()).getTime()
145
+        this.sign_up_deadline = (new Date()).getTime()
146
+    },
147
+    watch: {
148
+        limit_num: function(new_val) {
149
+            if (/^[1-9]+[0-9]*]*$/.test(new_val)) {
150
+                this.activity.limit_num = parseInt(new_val)
151
+            } else {
152
+                this.activity.limit_num = 0
153
+            }
154
+        },
155
+        activity_time: function(new_val) {
156
+            this.activity.start_time = new_val
157
+        },
158
+        sign_up_deadline: function(new_val) {
159
+            this.activity.sign_up_deadline = new_val  
160
+        },
161
+    },
162
+    methods: {
163
+        initParagraphContent: function(content) {
164
+            this.paragraph_init_content = this.paragraph.content
165
+        },
166
+        paragraphContentChanged: function(content) {
167
+            this.paragraph.content = content
168
+        },
169
+
170
+        posterPhotoUploadFail: function(err, file, fileList) {
171
+            this.uploading_poster_photo = false
172
+            this.$message.error(err)
173
+        },
174
+        posterPhotoUploadSuccess: function(res, file) {
175
+            console.log(res)
176
+            console.log(file)
177
+            this.poster_photo_file_name = file.name
178
+            this.uploading_poster_photo = false
179
+            this.activity.poster_photo = "https://images.shengws.com/" + res.url
180
+        },
181
+        beforePosterPhotoUpload: function(file) {
182
+            console.log(file)
183
+            var is_image = file.type.indexOf("image") > -1
184
+            var mb = file.size / 1024 / 1024
185
+
186
+            if (!is_image) {
187
+                this.$message.error("请上传图片")
188
+                return false
189
+            }
190
+            if (mb > 3) {
191
+                this.$message.error("上传主图大小不能超过3MB")
192
+                return false
193
+            }
194
+
195
+            var rand = Math.floor(Math.random() * 1000000000)
196
+            var date = new Date()
197
+            var ext = getFileExtension(file.name)
198
+            var key = "" + date.getFullYear() + (date.getMonth() + 1) + date.getDate() + "_activity_" + rand + "." + ext
199
+
200
+            this.uploading_poster_photo = true
201
+
202
+            return new Promise((resolve, reject) => {
203
+                getToken().then(rs => {
204
+                    var token = rs.data.data.uptoken
205
+                    this.qntoken = token
206
+                    this.poster_photo_file_key = key
207
+                    resolve(true)
208
+                }).catch(err => {
209
+                    this.uploading_poster_photo = false
210
+                    reject(false)
211
+                })
212
+            })
213
+        },
214
+    },
8
 }
215
 }
9
 </script>
216
 </script>
10
 
217
 
11
 <style lang="scss" scoped>
218
 <style lang="scss" scoped>
219
+.edit-form-main {
220
+    .form-title {
221
+        width: 100%;
222
+        height: 60px;
223
+        padding: 20px 0 20px 30px;
224
+        border-bottom: 1px #dee2e5 solid;
225
+
226
+        .icon {
227
+            margin-top: -4px;
228
+            vertical-align: middle;
229
+        }
230
+
231
+        span {
232
+            font-size: 18px;
233
+            font-weight: 500;
234
+            color: #485b6d;
235
+            margin-left: 10px;
236
+        }
237
+    }
12
 
238
 
239
+    .form-content {
240
+        width: 100%;
241
+        padding: 14px 30px 14px 30px;
242
+
243
+        .module-panel {
244
+            // padding: 0 30px;
245
+
246
+            .module-title {
247
+                font-size: 18px;
248
+                color: #a8b3ba;
249
+
250
+                img {
251
+                    float: left;
252
+                    display: block;
253
+                    padding: 2px 19px 0 0;
254
+                }
255
+            }
256
+
257
+            .module-item {
258
+                margin-top: 20px;
259
+                display: flex;
260
+                // padding: 0 30px;
261
+
262
+                .item-title {
263
+                    width: 115px;
264
+                    height: 40px;
265
+                    line-height: 40px;
266
+                    color: #485b6d;
267
+                    font-size: 13px;
268
+                    // font-weight: 100;
269
+                    text-align: right;
270
+                    padding-right: 22px;
271
+                    float: left;
272
+                }
273
+
274
+                .item-input {
275
+                    flex: 1;
276
+                    color: #485b6d;
277
+                }
278
+
279
+                .limit-text {
280
+                    line-height: 40px;
281
+                    color: #a8b3ba;
282
+                    font-size: 13px;
283
+                    // font-weight: 100;
284
+                    text-align: left;
285
+                    padding-left: 10px;
286
+                }
287
+
288
+                .poster-photo-panel {
289
+                    display: flex;
290
+                    flex: 1;
291
+                    align-items: center;
292
+
293
+                    .input {
294
+                        flex: 1;
295
+                        color: #485b6d;
296
+                        cursor: pointer;
297
+                    }
298
+                }
299
+            }
300
+
301
+            .poster-photo-hint {
302
+                font-size: 12px;
303
+                line-height: 16px;
304
+                color: #a8b3ba;
305
+                margin-left: 115px;
306
+            }
307
+        }
308
+
309
+        .submit-button-panel {
310
+            padding: 0 0 0 115px;
311
+            margin-top: 30px;
312
+        }
313
+    }
314
+}
13
 </style>
315
 </style>
14
 
316
 

+ 121 - 12
src/scrm_pages/marketing_tool/components/edit_activity_preview_form.vue View File

1
 <template>
1
 <template>
2
-    <div class="preview-main">
2
+    <div class="preview-form-main">
3
         <div class="form-title">
3
         <div class="form-title">
4
             <img class="icon" src="@/assets/img/sa_06.png" />
4
             <img class="icon" src="@/assets/img/sa_06.png" />
5
             <span>预览</span>
5
             <span>预览</span>
14
             </div>
14
             </div>
15
             <div class="org-info-cell border">
15
             <div class="org-info-cell border">
16
                 <div class="logo">
16
                 <div class="logo">
17
-                    <img :src="poster_photo" />
17
+                    <img :src="$store.getters.xt_user.org.org_logo" />
18
                 </div>
18
                 </div>
19
                 <div class="text-info">
19
                 <div class="text-info">
20
-                    <p class="name">测试机构</p>
21
-                    <p class="address">地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址</p>
20
+                    <p class="name">{{ $store.getters.xt_user.org.org_name }}</p>
21
+                    <p class="address">{{ address }}</p>
22
                 </div>
22
                 </div>
23
                 <div class="arrow-panel">
23
                 <div class="arrow-panel">
24
                     <img src="@/assets/img/sa_52.png" />
24
                     <img src="@/assets/img/sa_52.png" />
29
                     <img src="@/assets/img/sa_21.png" />
29
                     <img src="@/assets/img/sa_21.png" />
30
                 </div>
30
                 </div>
31
                 <div class="text">
31
                 <div class="text">
32
-                    <p>2019-01-01</p>
32
+                    <p>{{ activity_time }}</p>
33
                 </div>
33
                 </div>
34
                 <div class="arrow-panel">
34
                 <div class="arrow-panel">
35
                     <img src="@/assets/img/sa_52.png" />
35
                     <img src="@/assets/img/sa_52.png" />
40
                     <img src="@/assets/img/sa_24.png" />
40
                     <img src="@/assets/img/sa_24.png" />
41
                 </div>
41
                 </div>
42
                 <div class="text">
42
                 <div class="text">
43
-                    <p>0755-86879866</p>
43
+                    <p>{{ phone_number }}</p>
44
                 </div>
44
                 </div>
45
                 <div class="arrow-panel">
45
                 <div class="arrow-panel">
46
                     <img src="@/assets/img/sa_52.png" />
46
                     <img src="@/assets/img/sa_52.png" />
47
                 </div>
47
                 </div>
48
             </div>
48
             </div>
49
+            <div class="simple-cell border">
50
+                <div class="title">
51
+                    <p>活动名额</p>
52
+                </div>
53
+                <div class="detail">
54
+                    <p>{{ limit_num }}</p>
55
+                </div>
56
+            </div>
57
+            <div class="large-text-cell border">
58
+                <div class="title">
59
+                    <img src="@/assets/img/sa_25.png" />
60
+                    <span>报名须知</span>
61
+                </div>
62
+                <p class="content" v-html="sign_up_notice">
63
+                </p>
64
+            </div>
65
+            <div class="large-text-cell border">
66
+                <div class="title">
67
+                    <img src="@/assets/img/sa_26.png" />
68
+                    <span>{{ paragraph_title }}</span>
69
+                </div>
70
+                <p class="content" v-html="paragraph_content">
71
+                </p>
72
+            </div>
49
         </div>
73
         </div>
50
     </div>
74
     </div>
51
 </template>
75
 </template>
52
 
76
 
53
 <script>
77
 <script>
78
+import { parseTime } from "@/utils"
79
+
54
 export default {
80
 export default {
55
     name: "EditActivityPreviewForm",
81
     name: "EditActivityPreviewForm",
82
+    props: {
83
+        activity: {
84
+            type: Object,
85
+            required: true,
86
+        },
87
+        paragraph: {
88
+            type: Object,
89
+            required: true,
90
+        },
91
+    },
56
     data() {
92
     data() {
57
         return {
93
         return {
58
             
94
             
60
     },
96
     },
61
     computed: {
97
     computed: {
62
         poster_photo: function() {
98
         poster_photo: function() {
63
-            return require("@/assets/img/activity_poster_photo_default.png")
99
+            return this.activity.poster_photo.length > 0 ? this.activity.poster_photo : require("@/assets/img/activity_poster_photo_default.png")
64
         },
100
         },
65
         title: function() {
101
         title: function() {
66
-            return "与孩子一起挑选采摘新鲜有机马陆葡萄,体验采摘乐趣"
102
+            return this.activity.title.length > 0 ? this.activity.title : "与孩子一起挑选采摘新鲜有机马陆葡萄,体验采摘乐趣"
67
         },
103
         },
68
         subtitle: function() {
104
         subtitle: function() {
69
-            return "亲子采摘活动"
105
+            return this.activity.subtitle.length > 0 ? this.activity.subtitle : "亲子采摘活动"
106
+        },
107
+        address: function() {
108
+            return this.activity.address.length > 0 ? this.activity.address : "深圳市南山区高新园"
109
+        },
110
+        activity_time: function() {
111
+            if (this.activity.start_time > 0) {
112
+                return parseTime(this.activity.start_time, "{y}-{m}-{d} {h}:{i}")
113
+            } else {
114
+                return "2019-01-01 09:00:00"
115
+            }
116
+        },
117
+        phone_number: function() {
118
+            return this.activity.phone_number.length > 0 ? this.activity.phone_number : "0755-86879866"
119
+        },
120
+        limit_num: function() {
121
+            return this.activity.limit_num > 0 ? (this.activity.limit_num + "人") : "无限制"
122
+        },
123
+        sign_up_notice: function() {
124
+            var notice = this.activity.sign_up_notice.length > 0 ? this.activity.sign_up_notice : "1.活动费用88元(2斤葡萄 1只手绘风筝 车费 包含1个大人 1个小孩)。\n2.多加1个大人另收30元/人。\n3.葡萄采摘时在园内可以适当品尝。"
125
+            return notice.replace(/\n/g, "<br/>")
126
+        },
127
+
128
+        paragraph_title: function() {
129
+            return this.paragraph.title.length > 0 ? this.paragraph.title : "商家介绍"
130
+        },
131
+        paragraph_content: function() {
132
+            var content = this.paragraph.content.length > 0 ? this.paragraph.content : "1.活动费用88元(2斤葡萄 1只手绘风筝 车费 包含1个大人 1个小孩)。<br/>2.多加1个大人另收30元/人。<br/>3.葡萄采摘时在园内可以适当品尝。"
133
+            return content
70
         },
134
         },
71
     },
135
     },
72
 }
136
 }
73
 </script>
137
 </script>
74
 
138
 
75
 <style lang="scss" scoped>
139
 <style lang="scss" scoped>
76
-.preview-main {
140
+.preview-form-main {
77
     .form-title {
141
     .form-title {
78
         width: 100%;
142
         width: 100%;
143
+        height: 60px;
79
         padding: 20px 0 20px 30px;
144
         padding: 20px 0 20px 30px;
80
         border-bottom: 1px #dee2e5 solid;
145
         border-bottom: 1px #dee2e5 solid;
81
 
146
 
94
 
159
 
95
     .form-content {
160
     .form-content {
96
         width: 100%;
161
         width: 100%;
97
-        padding: 14px 30px 0 30px;
162
+        padding: 14px 30px 14px 30px;
98
 
163
 
99
         .preview-cell-poster-photo {
164
         .preview-cell-poster-photo {
100
             .poster-photo {
165
             .poster-photo {
173
             .icon {
238
             .icon {
174
                 img {
239
                 img {
175
                     width: 20px;
240
                     width: 20px;
176
-                    height: 20px;
241
+                    height: auto;//20px;
177
                     vertical-align: middle;
242
                     vertical-align: middle;
178
                 }
243
                 }
179
             }
244
             }
193
                     vertical-align: middle;
258
                     vertical-align: middle;
194
                 }
259
                 }
195
             }
260
             }
261
+
262
+            .title {
263
+                p {
264
+                    color: #485b6d;
265
+                }
266
+            }
267
+            .detail {
268
+                flex: 1;
269
+                padding-left: 23px;
270
+                color: #485b6d;
271
+
272
+                p {
273
+                    color: #485b6d;
274
+                    float: right;
275
+                    text-align: right;
276
+                }
277
+            }
278
+        }
279
+
280
+        .large-text-cell {
281
+            padding: 20px 20px;
282
+            position: relative;
283
+            -webkit-box-align: center;
284
+            align-items: center;
285
+            margin-top: 15px;
286
+
287
+            .title {
288
+                color: #485b6d;
289
+                line-height: 18px;
290
+                height: 18px;
291
+
292
+                img {
293
+                    // width: 18px;
294
+                    // height: auto;
295
+                    margin-right: 11px;
296
+                    float: left;
297
+                }
298
+            }
299
+            .content {
300
+                color: #a8b3ba;
301
+                margin: 10px 0 0 0;
302
+                font-size: 14px;
303
+                line-height: 20px;
304
+            }
196
         }
305
         }
197
     }
306
     }
198
 }
307
 }