Selaa lähdekoodia

Merge branch 'master' of http://git.shengws.com/zhangbj/scrm-vue

zhengchengwu 5 vuotta sitten
vanhempi
commit
e2afa8e2a5

+ 2 - 1
config/index.js Näytä tiedosto

@@ -17,8 +17,9 @@ module.exports = {
17 17
     // can be overwritten by process.env.HOST
18 18
     // if you want dev by ip, please set host: '0.0.0.0'
19 19
 
20
-    host: 'test1.sgjyun.com',
21 20
     // host: 'jk.kuyicloud.com',
21
+
22
+
22 23
     port: 8090, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
23 24
     autoOpenBrowser: true,
24 25
     errorOverlay: true,

+ 3 - 3
package-lock.json Näytä tiedosto

@@ -3495,9 +3495,9 @@
3495 3495
       "dev": true
3496 3496
     },
3497 3497
     "element-ui": {
3498
-      "version": "2.7.2",
3499
-      "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.7.2.tgz",
3500
-      "integrity": "sha512-Exh9QTkm9gwMMPzg1TyaTlBKyr3k4K9XcC5vl0A/mneDvJX//RsURGuOWsCNDVQMdhh5h9e+W5icosh+pKfbCg==",
3498
+      "version": "2.9.1",
3499
+      "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.9.1.tgz",
3500
+      "integrity": "sha512-w8vrCW5Q+2gfDzs19MUrFdnCy5IjF98rs7DBsKnJQKFfZJZiZ2O+YAsSp/EuPrCm3P/2o/N3MtvZ34VANel13g==",
3501 3501
       "requires": {
3502 3502
         "async-validator": "~1.8.1",
3503 3503
         "babel-helper-vue-jsx-merge-props": "^2.0.0",

+ 1 - 1
package.json Näytä tiedosto

@@ -44,7 +44,7 @@
44 44
     "driver.js": "0.5.2",
45 45
     "dropzone": "5.2.0",
46 46
     "echarts": "3.8.5",
47
-    "element-ui": "^2.7.2",
47
+    "element-ui": "^2.9.1",
48 48
     "file-saver": "1.3.3",
49 49
     "font-awesome": "4.7.0",
50 50
     "js-cookie": "2.2.0",

BIN
src/assets/home/wei.jpg Näytä tiedosto


BIN
src/assets/preview/new-1.png Näytä tiedosto


+ 1 - 0
src/components/Neditor/index.vue Näytä tiedosto

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

+ 1 - 1
src/icons/svg/dashboard.svg Näytä tiedosto

@@ -1 +1 @@
1
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1559132638469" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1438" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M563.197497 0 460.802503 0 0.012259 486.388227c0 0 0.901006 102.396016 51.200051 102.396016s76.797012 0 76.797012 0 0 232.496449 0 332.816677c0 100.300818 102.397038 102.399081 102.397038 102.399081l204.79714 0c0 0 0-272.419617 0-358.416702 0-25.647017 25.600026-25.600026 25.600026-25.600026l102.394994 0c0 0 25.601047 0.851972 25.601047 25.600026 0 92.198911 0 358.416702 0 358.416702s99.647027 0 204.795097 0c105.147048 0 102.398059-102.399081 102.398059-102.399081L895.992721 563.185239c0 0 27.19875 0 76.799055 0 49.59724 0 51.195965-76.79599 51.195965-76.79599L563.197497 0z" p-id="1439" fill="#bfcbd9"></path></svg>
1
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1559805368038" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2337" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M405.923568 101.722776C279.295566 206.825532 205.614449 276.459472 95.310228 397.352867c-27.430746 35.963073-22.976294 102.870926 0 102.870926 71.362304 0 102.870926 0 102.870926 0s0 128.160915 0 257.177314c0 37.830607 5.390777 102.869902 45.196365 102.869902 65.173348 0 160.544463 0 160.544463 0L403.921981 603.088578l205.741851 0 0 257.18243c0 0 83.145675 0 148.308791 0 29.956266 0 57.43306-27.219945 57.43306-102.869902 0-132.344191 0-257.177314 0-257.177314s40.329521 0 102.869902 0c30.588669 0 35.552727-72.79084 0-102.870926C817.308009 294.65795 703.651436 195.340967 593.641927 105.117083 506.79393 37.305651 459.622584 46.296419 405.923568 101.722776z" p-id="2338"></path></svg>

+ 3 - 1
src/router/index.js Näytä tiedosto

@@ -12,6 +12,7 @@ import member from './modules/member'
12 12
 import org from './modules/org'
13 13
 import marketing_tool from './modules/marketing_tool'
14 14
 import system from './modules/system'
15
+import site from './modules/site'
15 16
 
16 17
 /** note: submenu only apppear when children.length>=1
17 18
  *   detail see  https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
@@ -77,7 +78,8 @@ var _asy_router_map = [
77 78
   marketing_tool,
78 79
   org,
79 80
   role,
80
-  system
81
+  system,
82
+  site
81 83
 ]
82 84
 
83 85
 var is_asy_router = process.env.NODE_ENV === 'production' // true; 设置为 true 强制进行路由验证

+ 20 - 0
src/router/modules/site.js Näytä tiedosto

@@ -0,0 +1,20 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '',
5
+  component: Layout,
6
+  redirect: '/site',
7
+  children: [{
8
+    path: '/site',
9
+    component: () => import('@/scrm_pages/site/index'),
10
+    name: 'site',
11
+    meta: {
12
+      title: '微网站',
13
+      icon: 'dashboard',
14
+      noCache: true
15
+    }
16
+  },
17
+  { path: '/site/preview', component: () => import('@/scrm_pages/site/preview'), name: '预览', meta: { title: 'preview' }, hidden: true, is_menu: false }
18
+
19
+  ]
20
+}

+ 19 - 2
src/scrm_pages/marketing_tool/activity_publish.vue Näytä tiedosto

@@ -6,10 +6,10 @@
6 6
         <div class="app-container" style="padding: 0 20px; background-color: #f6f8f9;">
7 7
             <div class="edit-main">
8 8
                 <div class="preview-panel">
9
-                    <preview-form></preview-form>
9
+                    <preview-form :activity="activity" :paragraph="activity_paragraph"></preview-form>
10 10
                 </div>
11 11
                 <div class="edit-panel">
12
-                    <edit-form></edit-form>
12
+                    <edit-form :activity="activity" :paragraph="activity_paragraph"></edit-form>
13 13
                 </div>
14 14
             </div>
15 15
         </div>
@@ -34,6 +34,23 @@ export default {
34 34
                 { path: false, name: "营销工具" },
35 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 Näytä tiedosto

@@ -1,14 +1,316 @@
1 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 102
 </template>
4 103
 
5 104
 <script>
105
+import Neditor from '@/components/Neditor'
106
+import { getToken } from "@/api/qiniu"
107
+import { getFileExtension } from "@/utils/tools"
108
+
6 109
 export default {
7 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 216
 </script>
10 217
 
11 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 315
 </style>
14 316
 

+ 121 - 12
src/scrm_pages/marketing_tool/components/edit_activity_preview_form.vue Näytä tiedosto

@@ -1,5 +1,5 @@
1 1
 <template>
2
-    <div class="preview-main">
2
+    <div class="preview-form-main">
3 3
         <div class="form-title">
4 4
             <img class="icon" src="@/assets/img/sa_06.png" />
5 5
             <span>预览</span>
@@ -14,11 +14,11 @@
14 14
             </div>
15 15
             <div class="org-info-cell border">
16 16
                 <div class="logo">
17
-                    <img :src="poster_photo" />
17
+                    <img :src="$store.getters.xt_user.org.org_logo" />
18 18
                 </div>
19 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 22
                 </div>
23 23
                 <div class="arrow-panel">
24 24
                     <img src="@/assets/img/sa_52.png" />
@@ -29,7 +29,7 @@
29 29
                     <img src="@/assets/img/sa_21.png" />
30 30
                 </div>
31 31
                 <div class="text">
32
-                    <p>2019-01-01</p>
32
+                    <p>{{ activity_time }}</p>
33 33
                 </div>
34 34
                 <div class="arrow-panel">
35 35
                     <img src="@/assets/img/sa_52.png" />
@@ -40,19 +40,55 @@
40 40
                     <img src="@/assets/img/sa_24.png" />
41 41
                 </div>
42 42
                 <div class="text">
43
-                    <p>0755-86879866</p>
43
+                    <p>{{ phone_number }}</p>
44 44
                 </div>
45 45
                 <div class="arrow-panel">
46 46
                     <img src="@/assets/img/sa_52.png" />
47 47
                 </div>
48 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 73
         </div>
50 74
     </div>
51 75
 </template>
52 76
 
53 77
 <script>
78
+import { parseTime } from "@/utils"
79
+
54 80
 export default {
55 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 92
     data() {
57 93
         return {
58 94
             
@@ -60,22 +96,51 @@ export default {
60 96
     },
61 97
     computed: {
62 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 101
         title: function() {
66
-            return "与孩子一起挑选采摘新鲜有机马陆葡萄,体验采摘乐趣"
102
+            return this.activity.title.length > 0 ? this.activity.title : "与孩子一起挑选采摘新鲜有机马陆葡萄,体验采摘乐趣"
67 103
         },
68 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 137
 </script>
74 138
 
75 139
 <style lang="scss" scoped>
76
-.preview-main {
140
+.preview-form-main {
77 141
     .form-title {
78 142
         width: 100%;
143
+        height: 60px;
79 144
         padding: 20px 0 20px 30px;
80 145
         border-bottom: 1px #dee2e5 solid;
81 146
 
@@ -94,7 +159,7 @@ export default {
94 159
 
95 160
     .form-content {
96 161
         width: 100%;
97
-        padding: 14px 30px 0 30px;
162
+        padding: 14px 30px 14px 30px;
98 163
 
99 164
         .preview-cell-poster-photo {
100 165
             .poster-photo {
@@ -173,7 +238,7 @@ export default {
173 238
             .icon {
174 239
                 img {
175 240
                     width: 20px;
176
-                    height: 20px;
241
+                    height: auto;//20px;
177 242
                     vertical-align: middle;
178 243
                 }
179 244
             }
@@ -193,6 +258,50 @@ export default {
193 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
 }

+ 107 - 0
src/scrm_pages/site/components/new-feature.vue Näytä tiedosto

@@ -0,0 +1,107 @@
1
+<template>
2
+<div class="feature">
3
+    <ul >
4
+        <li>
5
+            <span>
6
+              <img :src="new1" alt="">
7
+              <p>轮播图</p>  
8
+            </span>
9
+        </li>
10
+         <li>
11
+           <span>
12
+              <img :src="new1" alt="">
13
+              <p>轮播图</p>  
14
+            </span>  
15
+        </li>
16
+         <li>
17
+           <span>
18
+              <img :src="new1" alt="">
19
+              <p>轮播图</p>  
20
+            </span>  
21
+        </li>
22
+         <li>
23
+           <span>
24
+              <img :src="new1" alt="">
25
+              <p>轮播图</p>  
26
+            </span>  
27
+        </li>
28
+         <li>
29
+           <span>
30
+              <img :src="new1" alt="">
31
+              <p class="title">轮播图</p>  
32
+            </span>  
33
+        </li>
34
+    </ul>
35
+    <!-- <el-row :gutter="21" type="flex"  justify="space-around">
36
+        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>轮播图</p></div></el-col>
37
+        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>医院介绍</p></div></el-col>
38
+        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>科室介绍</p></div></el-col>
39
+    </el-row>
40
+    <el-row :gutter="21" type="flex"  justify="space-around">
41
+        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>轮播图</p></div></el-col>
42
+        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>医院介绍</p></div></el-col>
43
+        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>科室介绍</p></div></el-col>
44
+    </el-row>
45
+    <el-row :gutter="21" type="flex"  justify="space-around">
46
+        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>轮播图</p></div></el-col>
47
+        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>医院介绍</p></div></el-col>
48
+        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>科室介绍</p></div></el-col>
49
+    </el-row> -->
50
+</div>    
51
+</template>
52
+
53
+
54
+<script>
55
+export default {
56
+  name: "newfeature",
57
+  data() {
58
+    return {
59
+      new1: require("../../../assets/preview/new-1.png")
60
+    };
61
+  }
62
+};
63
+</script>
64
+
65
+<style rel="stylesheet/scss" lang="scss" scoped>
66
+.feature {
67
+  ul {
68
+    border: 1px solid #eaeefb;
69
+    float: left;
70
+    width: 100%;
71
+    li {
72
+      width: 33.3%;
73
+      float: left;
74
+      text-align: center;
75
+      height: 120px;
76
+      color: #666;
77
+      font-size: 13px;
78
+      border-right: 1px solid #eee;
79
+      border-bottom: 1px solid #eee;
80
+      margin-right: -1px;
81
+      margin-bottom: -1px;
82
+      span {
83
+        vertical-align: middle;
84
+        display: flex;
85
+        flex-direction: column;
86
+        align-items: center;
87
+        justify-content: center;
88
+        height: 120px;
89
+        img {
90
+          display: inline-block;
91
+          font-size: 32px;
92
+          margin-bottom: 15px;
93
+          color: #606266;
94
+          transition: color 0.15s linear;
95
+          vertical-align: middle;
96
+        }
97
+        .title {
98
+          display: inline-block;
99
+          padding: 0 3px;
100
+          height: 30px;
101
+          vertical-align: middle;
102
+        }
103
+      }
104
+    }
105
+  }
106
+}
107
+</style>

+ 67 - 0
src/scrm_pages/site/index.vue Näytä tiedosto

@@ -0,0 +1,67 @@
1
+<template>
2
+   <div class="main-contain">
3
+      <div class="position">
4
+        <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      </div>
6
+      <div class="app-container">
7
+         <el-row :gutter="20">
8
+            <el-col :span="12">
9
+              <div class="success">
10
+                <h1 class="name">欢迎来到微官网主页</h1>
11
+                <div class="tips">您可以手机扫码访问或在右侧预览</div>
12
+                <div class="site-code"><img :src="codeImg" alt=""></div>
13
+                <router-link to="/site/preview">
14
+                  <el-button type="primary">进入微官网后台</el-button>
15
+                </router-link>
16
+              </div>
17
+            </el-col>
18
+            <el-col :span="12">
19
+
20
+            </el-col>
21
+          </el-row>
22
+      </div>
23
+   </div>
24
+</template>
25
+
26
+<script>
27
+import BreadCrumb from "../components/bread-crumb";
28
+export default {
29
+  name: "site",
30
+  components: {
31
+    BreadCrumb
32
+  },
33
+  data() {
34
+    return {
35
+      crumbs: [{ path: false, name: "微网站" }],
36
+      codeImg: require("../../assets/home/wei.jpg")
37
+    };
38
+  }
39
+};
40
+</script>
41
+
42
+<style rel="stylesheet/scss" lang="scss" scoped>
43
+.success {
44
+  text-align: center;
45
+  align-items: center;
46
+  display: flex;
47
+  flex-direction: column;
48
+  .name {
49
+    font-size: 30px;
50
+    font-weight: bold;
51
+    color: #333;
52
+    margin: 0;
53
+    padding-bottom: 10px;
54
+  }
55
+  .tips{
56
+    line-height: 30px;
57
+    padding-bottom: 10px;
58
+  }
59
+  .site-code {
60
+    width: 200px;
61
+    padding-bottom: 10px;
62
+    img{
63
+      width: 100%;
64
+    }
65
+  }
66
+}
67
+</style>

+ 57 - 0
src/scrm_pages/site/preview.vue Näytä tiedosto

@@ -0,0 +1,57 @@
1
+<template>
2
+   <div class="main-contain">
3
+      <div class="position">
4
+        <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      </div>
6
+      <div class="app-container">
7
+            <!-- 新增 -->
8
+                <el-tabs type="border-card" style="width:450px;">
9
+                    <el-tab-pane label="首页">
10
+                        <el-tabs v-model="activeName" @tab-click="handleClick"  >
11
+                            <el-tab-pane label="新增模块" name="first">
12
+                                 <new-feature> </new-feature>
13
+                            </el-tab-pane>
14
+                            <el-tab-pane label="已使用" name="second">
15
+
16
+                            </el-tab-pane>
17
+                        </el-tabs>
18
+                    </el-tab-pane>
19
+                    <el-tab-pane label="联系我们">
20
+                        <el-tabs v-model="activeName" @tab-click="handleClick">
21
+                            <el-tab-pane label="新增模块" name="three">
22
+
23
+                            </el-tab-pane>
24
+                            <el-tab-pane label="已使用" name="four">
25
+                                
26
+                            </el-tab-pane>
27
+                        </el-tabs>                        
28
+                    </el-tab-pane>
29
+                </el-tabs>
30
+            <!-- 已使用 -->
31
+           
32
+      </div>
33
+   </div>
34
+</template>
35
+
36
+<script> 
37
+import BreadCrumb from "../components/bread-crumb";
38
+import NewFeature from "./components/new-feature";
39
+export default {
40
+  name: "preview",
41
+  components: {
42
+    BreadCrumb,
43
+    NewFeature
44
+  },
45
+  data() {
46
+    return {
47
+      crumbs: [{ path: false, name: "预览" }],
48
+      activeName: 'first'
49
+    };
50
+  }
51
+};
52
+</script>
53
+
54
+<style rel="stylesheet/scss" lang="scss" scoped>
55
+</style>
56
+
57
+

+ 8 - 8
src/xt_permission.js Näytä tiedosto

@@ -10,14 +10,14 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
10 10
 
11 11
 router.beforeEach((to, from, next) => {
12 12
   // 线上注释
13
-  // if (store.getters.permission_routers === undefined) {
14
-  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
15
-  //     next()
16
-  //   })
17
-  // } else {
18
-  //   next()
19
-  // }
20
-  // return
13
+  if (store.getters.permission_routers === undefined) {
14
+    store.dispatch('xt_GenerateRoutes', []).then(() => {
15
+      next()
16
+    })
17
+  } else {
18
+    next()
19
+  }
20
+  return
21 21
   // 线上注释
22 22
 
23 23
   NProgress.start()