xiaoming_global 5 years ago
parent
commit
d48595774f
2 changed files with 226 additions and 204 deletions
  1. 172 166
      src/api/micro/micro.js
  2. 54 38
      src/scrm_pages/microHome/microHome.vue

+ 172 - 166
src/api/micro/micro.js View File

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

+ 54 - 38
src/scrm_pages/microHome/microHome.vue View File

17
 
17
 
18
         <!-- 魔方导航 -->
18
         <!-- 魔方导航 -->
19
         <div class="btnList" v-if="item.mode_type== 8">
19
         <div class="btnList" v-if="item.mode_type== 8">
20
-          <div class="btnOne" v-for="it in item.Editmargin" :key="it.id"  @click="NavigationClick(it.margtitle,it.marginaddress,it.user_org_id)">
20
+          <div
21
+            class="btnOne"
22
+            v-for="it in item.Editmargin"
23
+            :key="it.id"
24
+            @click="NavigationClick(it.margtitle,it.marginaddress,it.user_org_id)"
25
+          >
21
             <div>
26
             <div>
22
               <img :src="it.margimage" alt />
27
               <img :src="it.margimage" alt />
23
             </div>
28
             </div>
65
             </div>
70
             </div>
66
           </div>
71
           </div>
67
           <div class="commonBox">
72
           <div class="commonBox">
68
-
69
             <div class="commonMessage" v-html="item.Hospitals.introduction"></div>
73
             <div class="commonMessage" v-html="item.Hospitals.introduction"></div>
70
           </div>
74
           </div>
71
         </div>
75
         </div>
102
               </p>
106
               </p>
103
             </div>
107
             </div>
104
           </div>
108
           </div>
105
-          <div class="content" @click="docmore(item.id,item.user_org_id)" >
109
+          <div class="content" @click="docmore(item.id,item.user_org_id)">
106
             <div class="contentOne" v-for="doc in item.Editdoctor" :key="doc.id">
110
             <div class="contentOne" v-for="doc in item.Editdoctor" :key="doc.id">
107
               <div class="img">
111
               <div class="img">
108
                 <img :src="doc.dochead" style="width:100%;height:100%" alt />
112
                 <img :src="doc.dochead" style="width:100%;height:100%" alt />
159
               </p>
163
               </p>
160
             </div>
164
             </div>
161
           </div>
165
           </div>
162
-          <div class="content"  @click="Activitiesmore(item.id,item.user_org_id)">
166
+          <div class="content" @click="Activitiesmore(item.id,item.user_org_id)">
163
             <div class="contentOne" v-for="it in Activitieslist" :key="it.id">
167
             <div class="contentOne" v-for="it in Activitieslist" :key="it.id">
164
               <div class="img">
168
               <div class="img">
165
                 <img :src="it.poster_photo" style="widht:100%;height:100%" alt />
169
                 <img :src="it.poster_photo" style="widht:100%;height:100%" alt />
186
     <!-- tab切换 -->
190
     <!-- tab切换 -->
187
     <div class="tabs">
191
     <div class="tabs">
188
       <ul class="tabList">
192
       <ul class="tabList">
189
-        <li class="tabOne" v-for="item in this.navigationdata" :key="item.id" @click="CallPhone(item.linktype,item.navaddress)">
193
+        <li
194
+          class="tabOne"
195
+          v-for="item in this.navigationdata"
196
+          :key="item.id"
197
+          @click="CallPhone(item.linktype,item.navaddress)"
198
+        >
190
           <img :src="item.navimages" alt />
199
           <img :src="item.navimages" alt />
191
           <span>{{item.navtitle}}</span>
200
           <span>{{item.navtitle}}</span>
192
         </li>
201
         </li>
204
   getArticlelist,
213
   getArticlelist,
205
   getActivities,
214
   getActivities,
206
   getDefalutNavigationData,
215
   getDefalutNavigationData,
216
+  getData
207
 } from "@/api/micro/micro";
217
 } from "@/api/micro/micro";
208
-import { link } from 'fs';
218
+import { link } from "fs";
209
 export default {
219
 export default {
210
   data() {
220
   data() {
211
     return {
221
     return {
262
         path: "/hospitalIntroduction",
272
         path: "/hospitalIntroduction",
263
         query: {
273
         query: {
264
           id: id,
274
           id: id,
265
-          orgid:orgid,
275
+          orgid: orgid
266
         }
276
         }
267
       });
277
       });
268
     },
278
     },
272
         path: "/officeIntroduction",
282
         path: "/officeIntroduction",
273
         query: {
283
         query: {
274
           id: id,
284
           id: id,
275
-          orgid:orgid
285
+          orgid: orgid
276
         }
286
         }
277
       });
287
       });
278
     },
288
     },
281
         path: "/medicalTeam",
291
         path: "/medicalTeam",
282
         query: {
292
         query: {
283
           id: id,
293
           id: id,
284
-          orgid:orgid
294
+          orgid: orgid
285
         }
295
         }
286
       });
296
       });
287
     },
297
     },
290
         path: "/news",
300
         path: "/news",
291
         query: {
301
         query: {
292
           id: id,
302
           id: id,
293
-          orgid:orgid
303
+          orgid: orgid
294
         }
304
         }
295
       });
305
       });
296
     },
306
     },
299
         path: "/activity",
309
         path: "/activity",
300
         query: {
310
         query: {
301
           id: id,
311
           id: id,
302
-          orgid:orgid
312
+          orgid: orgid
303
         }
313
         }
304
       });
314
       });
305
     },
315
     },
312
         }
322
         }
313
       });
323
       });
314
     },
324
     },
315
-    NavigationClick(title,address,orgid){
316
-      console.log("orgid",orgid)
317
-        if(title == "联系我们"){
318
-            this.$router.push({
319
-              path:"/contact",
320
-              query: {
321
-                orgid:orgid,
322
-              }
323
-            })
324
-        }
325
-        window.location.href = address;   
326
-    }, 
325
+    NavigationClick(title, address, orgid) {
326
+      console.log("orgid", orgid);
327
+      if (title == "联系我们") {
328
+        this.$router.push({
329
+          path: "/contact",
330
+          query: {
331
+            orgid: orgid
332
+          }
333
+        });
334
+      }
335
+      window.location.href = address;
336
+    },
327
 
337
 
328
-    CallPhone(linktype,address){
329
-       if(linktype == "2"){
330
-         window.location.href = address;
331
-       }
332
-       if(linktype == "3"){
333
-          window.location.href = 'tel://'+address+''
334
-       }
335
-       if(linktype == "4"){
336
-          window.location.href = address;
337
-       }
338
+    CallPhone(linktype, address) {
339
+      if (linktype == "2") {
340
+        window.location.href = address;
341
+      }
342
+      if (linktype == "3") {
343
+        window.location.href = "tel://" + address + "";
344
+      }
345
+      if (linktype == "4") {
346
+        window.location.href = address;
347
+      }
348
+    },
349
+    getData(orgid) {
350
+      getData(orgid).then(response => {
351
+        if (response.data.state == 1) {
352
+          this.patientModels = response.data.data.patientModels;
353
+          console.log("数据是什么", this.patientModels);
354
+        }
355
+      });
338
     }
356
     }
339
   },
357
   },
340
   created() {
358
   created() {
341
     const orgid = this.$route.query.orgid;
359
     const orgid = this.$route.query.orgid;
342
-    console.log("机构id是", orgid);
343
-    this.getHospitaldata(orgid);
360
+    console.log("机构id是什么", orgid);
361
+    // this.getHospitaldata(orgid);
344
     this.getArticlelist(orgid);
362
     this.getArticlelist(orgid);
345
     this.getActivities(orgid);
363
     this.getActivities(orgid);
346
     this.getDefalutNavigationData(orgid);
364
     this.getDefalutNavigationData(orgid);
365
+    this.getData(orgid);
347
   },
366
   },
348
   mounted() {
367
   mounted() {
349
     this.initSwiper();
368
     this.initSwiper();
642
     }
661
     }
643
   }
662
   }
644
 }
663
 }
645
-
646
-
647
-
648
 </style>
664
 </style>