xiaoming_global 5 vuotta sitten
vanhempi
commit
fa21d84949

+ 7 - 7
config/dev.env.js Näytä tiedosto

@@ -1,13 +1,13 @@
1 1
 module.exports = {
2 2
   NODE_ENV: '"development"',
3 3
   ENV_CONFIG: '"dev"',
4
-  // BASE_API:'"http://api.test1.sgjyun.com"',//'"http://localhost:9534"'
5
-  BASE_API:'"http://api.scrm.kuyicloud.com"',//'"http://localhost:9534"'
4
+  BASE_API:'"http://localhost:9535"',//'"http://api.test1.sgjyun.com"'
5
+  // BASE_API:'"http://api.scrm.kuyicloud.com"',//'"http://localhost:9534"'
6 6
   
7
-   SSO_HOST: '"https://testsso.sgjyun.com"',
8
-   SRCM_HOST: '"http://test1.sgjyun.com"',
9
-   XT_HOST: '"http://xt.test.sgjyun.com"',
10
-   MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
11
-   CDM_HOST: '"http://cdm.test.sgjyun.com"',
7
+  //  SSO_HOST: '"https://testsso.sgjyun.com"',
8
+  //  SRCM_HOST: '"http://test1.sgjyun.com"',
9
+  //  XT_HOST: '"http://xt.test.sgjyun.com"',
10
+  //  MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
11
+  //  CDM_HOST: '"http://cdm.test.sgjyun.com"',
12 12
 }
13 13
 

+ 4 - 3
config/index.js Näytä tiedosto

@@ -17,10 +17,11 @@ 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
-     host: 'microweb.kuyicloud.com',
22
-    // host: 'localhost',
20
+    // host: 'test1.sgjyun.com',
21
+    // host: 'microweb.kuyicloud.com',
22
+    host: 'localhost',
23 23
     // host: 'jk.kuyicloud.com',
24
+    // port: 8091, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
24 25
     port: 8090, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
25 26
     // host: 'test1.sgjyun.com',
26 27
     autoOpenBrowser: true,

+ 126 - 33
src/api/micro/micro.js Näytä tiedosto

@@ -1,78 +1,171 @@
1 1
 import request from '@/utils/request'
2
+import org from '../../router/modules/org';
2 3
 
3
-export function getHospitaldata(params){
4
+export function getHospitaldata(orgid,params){
4 5
     return request({
5
-        url:"/api/site/getdata",
6
-        method:"Post",
6
+        url:"/api/site/getdata?orgid="+orgid,
7
+        method:"Get",
7 8
         params:params,
8 9
     })
9 10
  }
10 11
 
11
- export function getArticlelist(data){
12
+ export function getArticlelist(orgid,params){
12 13
     return request({
13
-        url:"/api/site/getarticlelist",
14
-        method:"Post",
15
-        data:data,
14
+        url:"/api/site/getarticlelist?orgid="+orgid,
15
+        method:"Get",
16
+        params:params,
16 17
     })
17 18
  }
18 19
 
19
- export function getActivities(params){
20
+ export function getActivities(orgid,params){
20 21
    
21 22
     return request({
22
-        url:"/api/site/getactivities",
23
-        method:"Post",
23
+        url:"/api/site/getactivities?orgid="+orgid,
24
+        method:"Get",
24 25
         params:params, 
25 26
     })
26 27
  }
27 28
 
28 29
  
29
-export function hispitalmore(id,data){
30
-    return request({
31
-        url:"/api/site/hispitalmore?id="+id,
32
-        method:"Get",
33
-        data:data,
34
-    })
35
-  }
30
+// export function hispitalmore(id,params){
31
+//     console.log("id是多少",id)
32
+//     return request({
33
+//         url:"/api/site/hispitalmore?id="+id,
34
+//         method:"Get",
35
+//         params:params,
36
+//     })
37
+//   }
38
+export function hispitalmore(id,orgid){
39
+    console.log("orgid是多少",orgid)
40
+    const params = {
41
+      orgid: orgid  
42
+  }  
43
+  return request({
44
+      url:"/api/site/getdatatwo?id="+id,
45
+      method:"Get",
46
+      params:params,
47
+  })
48
+}
36 49
 
37 50
   
38
-export function officemore(id,data){
51
+export function officemore(id,orgid){
52
+   const params = {
53
+       orgid: orgid
54
+   }
39 55
     return request({
40
-        url:"/api/site/officemore?id="+id,
56
+        url:"/api/site/getdatathree?id="+id,
41 57
         method:"Get",
42
-        data:data,
58
+        params:params,
43 59
     })
44 60
  }
45 61
 
46 62
 
47
- export function docmore(id,data){
63
+ export function docmore(id,orgid){
64
+     const params = {
65
+         orgid: orgid
66
+     }
48 67
     return request({
49
-       url:"/api/site/docmore?id="+id,
68
+       url:"/api/site/getdatafour?id="+id,
50 69
        method:"Get",
51
-       data:data,
70
+       params:params,
52 71
     })
53 72
  }
54 73
 
55
- export function kemore(id,data){
56
-    console.log('香港回归',id)
74
+ export function kemore(id,orgid){
75
+    const params = {
76
+       orgid: orgid
77
+    }  
57 78
    return request({
58
-       url:"/api/site/kemore?id="+id,
79
+       url:"/api/site/getdatafive?id="+id,
59 80
        method:'Get',
60
-       data:data,
81
+       params:params,
61 82
    })
62 83
 }
63 84
 
64
-export function articlemore(id,data){
85
+export function articlemore(id,orgid){
86
+    const params = {
87
+        orgid: orgid 
88
+    }
65 89
      return request({
66
-         url:"/api/site/articlemore?id="+id,
90
+         url:"/api/site/getdatasix?id="+id,
67 91
          method:"Get",
68
-         data:data,
92
+         params:params,
69 93
      })
70 94
 }
71 95
 
72
-export function Activitiesmore(id,data){
96
+export function Activitiesmore(id,orgid){
97
+    const params = {
98
+        id:id,
99
+        orgid: orgid, 
100
+    }
73 101
     return request({
74
-       url:"/api/site/activitiesmore?id="+id,
102
+       url:"/api/site/getdataseven",
103
+       method:"Get",
104
+       params:params, 
105
+    })
106
+}
107
+
108
+export function getDefalutNavigationData(orgid,params){
109
+    console.log("orgid",orgid)
110
+   return request({
111
+       url:"/api/site/getdefalutnavigationdata?orgid="+orgid,
75 112
        method:"Get",
76
-       data:data, 
113
+       params:params,
114
+   })
115
+}
116
+
117
+export function getOrderModel(orgid,params){
118
+    console.log("联系我们",orgid)
119
+    console.log("params",params)
120
+    return request({
121
+        url:"/api/site/getdataeight?orgid="+orgid,
122
+        method:"Get",
123
+        params:params,
77 124
     })
125
+}
126
+
127
+export function getAllConnecWay(orgid,params){
128
+    return request({
129
+        url:"/api/site/getdatanight?orgid="+orgid,
130
+        method:"Get",
131
+        params:params,
132
+    })
133
+}
134
+
135
+export function singleActivitInfo(id,orgid){
136
+    const params = {
137
+        id:id,
138
+        orgid:orgid,
139
+    }
140
+   return request({
141
+       url:"/api/site/singleactivitinfo",
142
+       method:"Get",
143
+       params:params,
144
+   })
145
+}
146
+
147
+export function singleArticleInfo(id,orgid){
148
+   const params = {
149
+       id:id,
150
+       orgid:orgid,
151
+   }
152
+   return request({
153
+       url:"/api/site/singlearticleinfo",
154
+       Get:"Get",
155
+       params:params,
156
+   })
157
+}
158
+
159
+export function singleDoctorInfo(id,orgid){
160
+    console.log(id,orgid)
161
+   const params = {
162
+       id:id,
163
+       orgid:orgid,
164
+   }
165
+
166
+   return request({
167
+       url:"/api/site/singledoctorinfo",
168
+       Get:"Get",
169
+       params:params,
170
+   })
78 171
 }

+ 7 - 2
src/api/site/site.js Näytä tiedosto

@@ -410,14 +410,19 @@ export function  SaveOfficeEnvironment(id,data){
410 410
      })
411 411
 }
412 412
 
413
-export function hispitalmore(id,data){
413
+export function hispitalmore(id,orgid){
414
+    console.log("orgid是多少",orgid)
415
+  const params = {
416
+      orgid: orgid  
417
+  }  
414 418
   return request({
415 419
       url:"/api/site/hispitalmore?id="+id,
416 420
       method:"Get",
417
-      data:data,
421
+      params:params,
418 422
   })
419 423
 }
420 424
 
425
+
421 426
 export function officemore(id,data){
422 427
    return request({
423 428
        url:"/api/site/officemore?id="+id,

+ 17 - 2
src/router/index.js Näytä tiedosto

@@ -55,13 +55,28 @@ var _constant_router_map = [{
55 55
   component: () => import('@/views/errorPage/401'),
56 56
   hidden: true
57 57
 },
58
+// {
59
+//   path: '',
60
+//   component: ()=>import('@/scrm_pages/qrcode/qrcode'),
61
+//   redirect: '/qrcode',
62
+//   children: [{
63
+//     path: '/qrcode',
64
+//     component: () => import('@/scrm_pages/qrcode/qrcode'),
65
+//     name: 'qrcode',
66
+//     meta: {
67
+//       title: 'qrcode',
68
+//       icon: 'dashboard',
69
+//       noCache: true
70
+//     }
71
+//   }]
72
+// },
58 73
 {
59 74
   path: '',
60
-  component: ()=>import('@/scrm_pages/qrcode/qrcode'),
75
+  component: ()=>import('@/scrm_pages/micro/micro'),
61 76
   redirect: '/qrcode',
62 77
   children: [{
63 78
     path: '/qrcode',
64
-    component: () => import('@/scrm_pages/qrcode/qrcode'),
79
+    component: () => import('@/scrm_pages/micro/micro'),
65 80
     name: 'qrcode',
66 81
     meta: {
67 82
       title: 'qrcode',

File diff suppressed because it is too large
+ 1354 - 0
src/scrm_pages/micro/micro.vue


+ 73 - 79
src/scrm_pages/qrcode/qrcode.vue Näytä tiedosto

@@ -8,8 +8,8 @@
8 8
                    <!-- 轮播图 -->
9 9
                    <div class="modeone" v-if="item.mode_type == 1" v-show="show">
10 10
                      <mt-swipe :auto="2000" class="swipertwo">
11
-                         <mt-swipe-item v-for="it in item.images" :key="it.id">
12
-                            <img :src="it" style="width:100%;height:230px" >
11
+                          <mt-swipe-item v-for="it in item.PatientEditpiclink" :key="it.id">
12
+                             <img :src="it.images" style="width:100%;height:230px">
13 13
                           </mt-swipe-item>
14 14
                      </mt-swipe>       
15 15
                    </div>
@@ -17,10 +17,10 @@
17 17
                    <div class="modetwo" v-if="item.mode_type == 2" v-show="show">
18 18
                       <img src="static\images\u.png" style="width:5px;height:20px;">
19 19
                         <div class="kefont"><span >{{item.title}}</span></div>   
20
-                        <div class="more" @click="hispitalmore(item.id)">查看更多</div>
20
+                        <div class="more" @click="hispitalmore(item.id,item.user_org_id)">查看更多</div>
21 21
                         <div class="logo"><img src="static\images\u216.png"></div>  
22 22
                         <div class="hoscontent">
23
-                         <span v-html="item.Hospitals.introduction" id="content"></span>
23
+                         <span v-html="item.Hospitals.introduction" id="content" ></span>
24 24
                        </div>
25 25
                     </div> 
26 26
 
@@ -28,7 +28,7 @@
28 28
                     <div v-if="item.mode_type == 3" class="modethree" v-show="show">
29 29
                        <img src="static\images\u.png" style="width:5px;height:20px;">
30 30
                        <div class="kefont"><span >{{item.title}}</span></div>   
31
-                       <div class="more" @click="officemore(item.id)">查看更多</div>
31
+                       <div class="more" @click="officemore(item.id,item.user_org_id)">查看更多</div>
32 32
                        <div class="logo"><img src="static\images\u216.png"></div>  
33 33
                        <div class="xcontent">
34 34
                           <span  v-html="item.Offices.introduction" id="ycontent"></span>
@@ -39,7 +39,7 @@
39 39
                      <div v-if="item.mode_type == 4" class="modefour" v-show="show">
40 40
                        <img src="static\images\u.png" style="width:5px;height:20px;">
41 41
                          <div class="kefont"><span >{{item.title}}</span></div> 
42
-                           <div class="more" @click="docmore(item.id)">查看更多</div>
42
+                           <div class="more" @click="docmore(item.id,item.user_org_id)">查看更多</div>
43 43
                               <div class="logo"><img src="static\images\u216.png"></div>
44 44
                                 <div class="docborde">
45 45
                                  <div class="docheart" v-for="doc in item.Editdoctor" :key="doc.id">
@@ -57,13 +57,13 @@
57 57
                        <div v-if="item.mode_type == 5" class="modefive" v-show="show">
58 58
                             <img src="static\images\u.png" style="width:5px;height:20px;"> 
59 59
                             <div class="kefont"><span >{{item.title}}</span></div> 
60
-                            <div class="more" @click="kemore(item.id)">查看更多</div>
60
+                            <div class="more" @click="kemore(item.id,item.user_org_id)">查看更多</div>
61 61
                             <div class="logo"><img src="static\images\u216.png"></div>
62 62
                             <div class="swiperimages">
63 63
                                <div class="swiper-container swiperthree" >
64 64
                                  <div class="swiper-wrapper" id="wrappertwo" >
65
-                                    <div class="swiper-slide"  v-for="it in item.Enviroimages" :key="it.id">
66
-                                      <img :src="it.enviroimages" style="width:150px;height:140px;border-radius:5px;"/>
65
+                                    <div class="swiper-slide"  v-for="itms in item.Enviroimages" :key="itms.id">
66
+                                      <img :src="itms.enviroimages" style="width:150px;height:140px;border-radius:5px"/>
67 67
                                      </div>
68 68
                                 </div>
69 69
                               </div>
@@ -120,7 +120,7 @@
120 120
                                   </div>                                                                                              
121 121
                               </div>     
122 122
                     </div>
123
-                 <div class="mtwo" v-show="showtwo"></div>          
123
+                 <div class="mtwo" v-show="showtwo"></div>                       
124 124
              </div>
125 125
               <!--医院介绍详情 -->
126 126
               <div class="hosdetail" v-show="showone" v-html="hospitalform.introduction" id="target"></div>
@@ -184,7 +184,6 @@
184 184
                     </div>
185 185
                  </div>
186 186
              </div>
187
-
188 187
           </div>
189 188
        </div>
190 189
     </div>
@@ -207,12 +206,10 @@
207 206
         </div>
208 207
        </div>
209 208
    </div> 
210
-  
211 209
 </template>
212 210
 
213 211
 <script>
214
- import {getHospitaldata,getArticlelist,getActivities,hispitalmore,officemore,docmore,kemore,articlemore,Activitiesmore} from '@/api/micro/micro' 
215
-//import { getHospitaldata, } from '@/api/micro/micro'
212
+import {getHospitaldata,getArticlelist,getActivities,hispitalmore,officemore,docmore,kemore,articlemore,Activitiesmore} from '@/api/micro/micro'  
216 213
 import Swiper from "swiper";
217 214
 import Vue from 'vue';
218 215
 import { Swipe, SwipeItem } from 'mint-ui';
@@ -254,31 +251,17 @@ export default {
254 251
     }
255 252
   },
256 253
   methods: {
257
-       getHospitaldata(){
258
-           getHospitaldata().then(response=>{
259
-                if(response.data.state == 1){
260
-                  var str = [];
261
-                  var images = [];
262
-                  var macimages = [];
263
-                  var mactitle = [];
264
-                 
254
+       getHospitaldata(orgid){
255
+           getHospitaldata(orgid).then(response=>{
256
+                if(response.data.state == 1){            
265 257
                  this.patientModels = response.data.data.patientModels;
266 258
                  console.log("数据是什么",this.patientModels)
267
-                 for (let index = 0; index < this.patientModels.length; index++) {   
268
-                   if(this.patientModels[index].Rotation.rotation_images!=""){   
269
-                     var strimages =  this.patientModels[index].Rotation.rotation_images;
270
-                     var strimagess =  strimages.split(',')
271
-                     str = strimagess;
272
-                     console.log("strimages",strimages)
273
-                     this.patientModels[index]["images"] = str;
274
-                   }                                                          
275
-                }   
276 259
                 }
277 260
            })
278 261
          },
279 262
 
280
-        getArticlelist(){
281
-          getArticlelist(this.Articlelist).then(response=>{
263
+        getArticlelist(orgid){
264
+          getArticlelist(orgid,this.Articlelist).then(response=>{
282 265
            if(response.data.state ==1){
283 266
             var articlelist =  response.data.data.articlelists;
284 267
              this.Articlelist =  response.data.data.articlelists;
@@ -287,8 +270,8 @@ export default {
287 270
         })
288 271
        },  
289 272
 
290
-       getActivities(){
291
-        getActivities(this.Activitieslist).then(response=>{
273
+       getActivities(orgid){
274
+        getActivities(orgid,this.Activitieslist).then(response=>{
292 275
         if(response.data.state ==1){
293 276
          var activity =   response.data.data.activity;
294 277
          this.Activitieslist = response.data.data.activity;
@@ -299,10 +282,11 @@ export default {
299 282
       },
300 283
 
301 284
 
302
-      hispitalmore(id){
303
-        hispitalmore(id).then(response=>{
285
+      hispitalmore(id,orgid){
286
+        hispitalmore(id,orgid).then(response=>{
304 287
            if(response.data.state ==1){
305 288
               var hospital =  response.data.data.hospital;
289
+              console.log("hospital",hospital)
306 290
               this.hospitalform =  response.data.data.hospital;
307 291
               this.show = false;
308 292
               this.showtwo = false;
@@ -313,13 +297,13 @@ export default {
313 297
               this.showfour = false;
314 298
               this.showfive =false;
315 299
               this.showsix = false;
316
-              this.showseven = false;
300
+              this.showseven = false;              
317 301
            }
318 302
         })
319 303
       },
320 304
 
321
-      officemore(id){
322
-        officemore(id).then(response=>{
305
+      officemore(id,orgid){
306
+        officemore(id,orgid).then(response=>{
323 307
            if(response.data.state == 1){
324 308
              var offices = response.data.data.offices;
325 309
             this.officeform = response.data.data.offices; 
@@ -337,8 +321,8 @@ export default {
337 321
         })
338 322
       },
339 323
 
340
-      docmore(id){
341
-        docmore(id).then(response=>{
324
+      docmore(id,orgid){
325
+        docmore(id,orgid).then(response=>{
342 326
           if(response.data.state == 1){
343 327
             var editdoctor =  response.data.data.editdoctor;
344 328
             this.editdocfrom = editdoctor;
@@ -356,8 +340,8 @@ export default {
356 340
         })
357 341
       },
358 342
 
359
-      kemore(id){
360
-        kemore(id).then(response=>{
343
+      kemore(id,orgid){
344
+        kemore(id,orgid).then(response=>{
361 345
           if(response.data.state == 1){
362 346
              var offenvironment =  response.data.data.offenvironment;
363 347
             this.keEnvironmentImages =  offenvironment;
@@ -458,9 +442,12 @@ export default {
458 442
          document.getElementById('target').removeEventListener('scroll', this.scrollToTop)
459 443
     },
460 444
      created(){
461
-       this.getHospitaldata();
462
-       this.getArticlelist();
463
-       this.getActivities();
445
+        const orgid = this.$route.query.orgid;
446
+        console.log("机构id是",orgid)
447
+       this.getHospitaldata(orgid);
448
+       this.getArticlelist(orgid);
449
+       this.getActivities(orgid);
450
+       
464 451
      },
465 452
        mounted(){
466 453
       var swiper = new Swiper('.swiperone', {
@@ -567,11 +554,11 @@ export default {
567 554
    width: 100%;
568 555
    height: 860px;
569 556
    overflow-y: auto;
570
-   border: 1px solid white;
571
-  //  margin-left: 30px;
572
-  //  margin-top: 40px;
557
+  //  border: 1px solid red;
558
+  //  position: relative;
559
+  //  z-index: -1;
573 560
  }
574
-    .yycontent{
561
+  .yycontent{
575 562
      overflow: hidden;
576 563
      text-overflow: ellipsis;
577 564
      display: -webkit-box;
@@ -579,7 +566,7 @@ export default {
579 566
      -webkit-box-orient: vertical   
580 567
    }
581 568
 
582
-    .zzcontent{
569
+   .zzcontent{
583 570
      overflow: hidden;
584 571
      text-overflow: ellipsis;
585 572
      display: -webkit-box;
@@ -628,39 +615,40 @@ export default {
628 615
   position: absolute;
629 616
   font-size: 14px;
630 617
   color:black;
631
-  margin-left: 275px;
618
+  margin-left: 290px;
632 619
   margin-top: -14px;
633 620
 }
634 621
 .logo{
635 622
    position: absolute;
636
-   margin-left: 335px;
623
+   margin-left: 350px;
637 624
    margin-top: -16px;
638 625
 }
639 626
  .hoscontent{
640
-      height:auto!important; 
641
-      min-height:200px;
642
-      font-size: 14px;
643
-      overflow: hidden;
644
-      text-overflow: ellipsis;
645
-      display: -webkit-box;
646
-      -webkit-line-clamp: 6;
647
-      -webkit-box-orient: vertical; 
648
-      margin-top: 5px;
649
-      margin-left: 5px;
627
+    height:auto!important; 
628
+    min-height:200px;
629
+    font-size: 14px;
630
+    text-overflow: ellipsis;
631
+    display: -webkit-box;
632
+    -webkit-line-clamp: 6;
633
+    -webkit-box-orient: vertical; 
634
+    margin-top: 5px;
635
+    margin-left: 5px;
636
+     // border: solid 1px red;
637
+    overflow: hidden;
650 638
   }
651 639
   
652
-    .xcontent{
653
-      height:auto!important; 
654
-      min-height:200px;
655
-      margin-top: 5px;
656
-      margin-left: 5px;
657
-      font-size: 14px;
658
-      overflow: hidden;
659
-      text-overflow: ellipsis;
660
-      display: -webkit-box;
661
-      -webkit-line-clamp: 6;
662
-      -webkit-box-orient: vertical; 
663
-    }
640
+  .xcontent{
641
+    height:auto!important; 
642
+    min-height:200px;
643
+    margin-top: 5px;
644
+    margin-left: 5px;
645
+    font-size: 14px;
646
+    overflow: hidden;
647
+    text-overflow: ellipsis;
648
+    display: -webkit-box;
649
+    -webkit-line-clamp: 6;
650
+    -webkit-box-orient: vertical; 
651
+  }
664 652
 
665 653
 
666 654
  .box{
@@ -757,6 +745,7 @@ export default {
757 745
       height: 90px;
758 746
       // border:solid 1px red;
759 747
       margin-left: 5px;
748
+      overflow: hidden;
760 749
     }
761 750
 
762 751
     .acthead{
@@ -782,6 +771,10 @@ export default {
782 771
       margin-left: 5px;
783 772
       margin-top: 10px;
784 773
       font-size: 14px;
774
+      text-overflow: ellipsis;
775
+      display: -webkit-box;
776
+      -webkit-line-clamp: 1;
777
+      -webkit-box-orient: vertical;
785 778
     }
786 779
     .actcomments{
787 780
       width: 190px;
@@ -830,7 +823,7 @@ export default {
830 823
       // border:solid 1px red;
831 824
       margin-top: 2px;
832 825
       margin-bottom: 5px;
833
-      margin-left: 4px;
826
+      margin-left: 30px;
834 827
     }
835 828
     #macimgtwo{
836 829
       width:58px;
@@ -840,7 +833,7 @@ export default {
840 833
       // overflow:hidden;
841 834
       // border: solid 1px red;
842 835
       text-align: center;
843
-      margin-left: -1px;
836
+      margin-left: 22px;
844 837
     }
845 838
 
846 839
      .mac{
@@ -1001,7 +994,7 @@ export default {
1001 994
       width: 100%;
1002 995
       height: 100%;
1003 996
       border:solid 1px white;
1004
-    }
997
+  }
1005 998
 
1006 999
    .swiperimages{
1007 1000
      width: 100%;
@@ -1139,5 +1132,6 @@ export default {
1139 1132
      margin-left: 100px;
1140 1133
      margin-top: 70px;
1141 1134
    }
1135
+
1142 1136
    
1143 1137
 </style>

+ 2 - 53
src/xt_permission.js Näytä tiedosto

@@ -1,63 +1,12 @@
1 1
 import router from './router'
2 2
 import store from './store'
3
-import NProgress from 'nprogress' // progress bar
4
-import 'nprogress/nprogress.css'// progress bar style
5
-
6
-NProgress.configure({ showSpinner: false })// NProgress Configuration
7
-
8
-const loginWhiteList = ['/token/verify', '/401', '/404', "/activity/preview"] // 登录验证白名单
9
-const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名单
3
+const loginWhiteList = ['/qrcode'] // 登录验证白名单
10 4
 
11 5
 router.beforeEach((to, from, next) => {
12
-  // 线上注释
13
-  // if (store.getters.permission_routers === undefined) {
14
-  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
15
-  //     next()
16
-  //   })
17
-  // } else {
18
-  //   next()
19
-  // }
20
-  //  return
21
-  // 线上注释
22
-
23
-  NProgress.start()
24
-  // console.log(store.getters.current_role_urls.indexOf(to.path))
25
-  // alert('path:' + to.path)
26
-  // 如果 url 带有 lt (login_token)参数,则跳转到验证 token 时等待的页面
27
-  if (to.query.lt != null && to.query.lt.length > 0) {
28
-    // alert('will go to verify token: ' + to.query.lt)
29
-    next({ path: '/token/verify', query: { token: to.query.lt }})
30
-
31
-    // 否则 如果没有 user 信息,则前往 sso 登录
32
-  } else if (store.getters.xt_user.user.id === 0) {
33 6
     if (loginWhiteList.indexOf(to.path) !== -1) {
34
-      // alert('登录白名单内,跳过登录')
35 7
       next()
36 8
     } else {
37
-      // alert('前往登录')
38
-      window.location.href = process.env.BASE_API + '/login' // sso 地址
9
+      next({ path: '/qrcode'})
39 10
     }
40 11
 
41
-    // 否则 如果当前 url 不需要验证访问权限,则通过
42
-  } else if (permissionWhiteList.indexOf(to.path) !== -1) {
43
-    // alert('权限验证白名单内,直接进入')
44
-    next()
45
-
46
-    // 否则 如果拥有当前 url 的权限,则通过
47
-  // } else if (store.getters.current_role_urls.indexOf(to.path) !== -1) {
48
-  //   // alert('权限验证通过')
49
-  //   next()
50
-
51
-    // 否则 跳转401 (未经授权)
52
-  } else {
53
-    // console.log(store.getters.current_role_urls)
54
-    // console.log(store.getters.current_role_urls.indexOf(to.path))
55
-    // alert('401')
56
-    next()
57
-    // next({ path: '/404' })
58
-  }
59
-})
60
-
61
-router.afterEach(() => {
62
-  NProgress.done()
63 12
 })

BIN
static/images/phone.png Näytä tiedosto