Browse Source

微网站

xiaoming_global 5 years ago
parent
commit
2efc09672e

+ 12 - 0
src/api/micro/micro.js View File

188
     params: params
188
     params: params
189
   });
189
   });
190
 }
190
 }
191
+
192
+export function getEnviromentImages(id,orgid){
193
+  const params = {
194
+    id:id,
195
+    orgid:orgid,
196
+  }
197
+   return request({
198
+     url:"/api/site/getenviromentimages",
199
+     Get:"Get",
200
+     params:params
201
+   })
202
+}

+ 63 - 14
src/scrm_pages/Enviroments/enviromentsdetail.vue View File

1
 <template>
1
 <template>
2
     <div>
2
     <div>
3
-        <van-grid :border="true" :column-num="3">
4
-          <van-grid-item>
5
-             <img src="https://img.yzcdn.cn/vant/apple-1.jpg" />
6
-         </van-grid-item>
7
-         <van-grid-item>
8
-            <img src="https://img.yzcdn.cn/vant/apple-2.jpg" />
9
-        </van-grid-item>
10
-         <van-grid-item>
11
-             <img src="https://img.yzcdn.cn/vant/apple-3.jpg" />
12
-          </van-grid-item>
13
-        </van-grid>
3
+       <div class="swiper-container imgSwiper">
4
+              <div class="swiper-wrapper">
5
+                <div class="swiper-slide carousel">
6
+                  <img class="img" src="static/images/a.jpg" />
7
+                </div>
8
+                <div class="swiper-slide carousel">
9
+                  <img class="img" src="static/images/a.jpg" />
10
+                </div>
11
+             </div>
12
+        </div>
14
     </div>
13
     </div>
15
 </template>
14
 </template>
16
 
15
 
17
 <script>
16
 <script>
17
+    import Swiper from "swiper";
18
+   import {getEnviromentImages } from "@/api/micro/micro";
18
     export default {
19
     export default {
19
-        name: "enviromentsdetail"
20
+        name: "enviromentsdetail",
21
+        data(){
22
+            return{
23
+
24
+            }
25
+        },
26
+        created(){
27
+          const id =  this.$route.query.id;
28
+          const orgid = this.$route.query.orgid;
29
+          console.log("id是多少",id)
30
+          console.log("orgid是多少",orgid)
31
+          getEnviromentImages(id,orgid);
32
+        },
33
+        methods:{
34
+         initSwiper() {
35
+           var mySwiper2 = new Swiper(".imgSwiper", {
36
+           slidesPerView: 2,
37
+          });
38
+         },
39
+         getEnviromentImages(id,orgid){
40
+            getEnviromentImages(id,orgid).then(response=>{
41
+                 if(response.data.state == 1){
42
+                   
43
+                 }
44
+            })
45
+         }
46
+        },
47
+      mounted() {
48
+        this.initSwiper();
49
+     },
50
+
51
+     updated() {
52
+       this.initSwiper();
53
+       this.$previewRefresh();
54
+      }
20
     }
55
     }
21
 </script>
56
 </script>
22
 
57
 
23
-<style scoped>
24
-
58
+<style lang="scss">
59
+  .carousel {
60
+    width: 100%;
61
+    height: 200px;
62
+    float: left;
63
+    padding-right: 1rem;
64
+    .img{
65
+        width: 100%;
66
+        height: 100%;
67
+        float: left;
68
+    }
69
+  }
70
+ 
71
+ .swiper-wrapper{
72
+     width:50%;
73
+ }
25
 </style>
74
 </style>

+ 32 - 22
src/scrm_pages/microHome/microHome.vue View File

51
               <div class="img">
51
               <div class="img">
52
                 <img :src="it.imgs" style="width:100%;height:100%" alt />
52
                 <img :src="it.imgs" style="width:100%;height:100%" alt />
53
               </div>
53
               </div>
54
-              <div class="detail">
54
+              <div class="detail" v-if="it.title !=''">
55
                 <p class="detailTitle">{{it.title}}</p>
55
                 <p class="detailTitle">{{it.title}}</p>
56
                 <!-- <p class="detailMessage">{{it.content}}</p> -->
56
                 <!-- <p class="detailMessage">{{it.content}}</p> -->
57
               </div>
57
               </div>
58
+              <div class="detail" v-else-if="it.title ==''">
59
+                <div class="noImg">
60
+                  <img src="../../../static/images/none2.png" alt />
61
+                </div>
62
+              </div>
58
             </div>
63
             </div>
59
           </div>
64
           </div>
60
         </div>
65
         </div>
72
             </div>
77
             </div>
73
           </div>
78
           </div>
74
           <div class="commonBox">
79
           <div class="commonBox">
75
-            <!-- <div class="commonMessage" v-html="item.Hospitals.introduction"></div> -->
76
-            <div class="noImg">
80
+            <div class="commonMessage" v-html="item.Hospitals.introduction" v-if="item.Hospitals.introduction!=''"></div>
81
+            <div class="noImg" v-else-if="item.Hospitals.introcution == ''">
77
               <img src="../../../static/images/none2.png" alt />
82
               <img src="../../../static/images/none2.png" alt />
78
             </div>
83
             </div>
79
           </div>
84
           </div>
95
             <!-- <div class="commonImg">
100
             <!-- <div class="commonImg">
96
             <img src="static\images\img2.png" alt />
101
             <img src="static\images\img2.png" alt />
97
             </div>-->
102
             </div>-->
98
-            <!-- <div class="commonMessage" v-html="item.Offices.introduction"></div> -->
99
-            <div class="noImg">
103
+            <div class="commonMessage" v-html="item.Offices.introduction" v-if="item.Offices.introduction != ''"></div>
104
+            <div class="noImg" v-else-if="item.Offices.introduction">
100
               <img src="../../../static/images/none2.png" alt />
105
               <img src="../../../static/images/none2.png" alt />
101
             </div>
106
             </div>
102
           </div>
107
           </div>
119
               <div class="img">
124
               <div class="img">
120
                 <img :src="doc.dochead" style="width:100%;height:100%" alt />
125
                 <img :src="doc.dochead" style="width:100%;height:100%" alt />
121
               </div>
126
               </div>
122
-              <!-- <div class="detail">
127
+              <div class="detail" v-if="doc.docintroduction != ''">
123
                 <p class="detailTitle">{{doc.doc_name}}</p>
128
                 <p class="detailTitle">{{doc.doc_name}}</p>
124
                 <p class="detailMessage" v-html="doc.docintroduction"></p>
129
                 <p class="detailMessage" v-html="doc.docintroduction"></p>
125
                 
130
                 
126
-              </div>-->
127
-              <div class="detail">
131
+              </div>
132
+              <div class="detail" v-else-if="doc.docintroduction ==''">
128
                 <div class="noImg">
133
                 <div class="noImg">
129
                   <img src="../../../static/images/none2.png" alt />
134
                   <img src="../../../static/images/none2.png" alt />
130
                 </div>
135
                 </div>
147
           <div class="common_title">
152
           <div class="common_title">
148
             <div class="one"></div>
153
             <div class="one"></div>
149
             <div class="dynamicTxt">{{item.title}}</div>
154
             <div class="dynamicTxt">{{item.title}}</div>
150
-            <!-- <div class="more">
155
+            <div class="more" @click="EnviromentClick(item.id,item.user_org_id)">
151
             <p>
156
             <p>
152
               查看更多
157
               查看更多
153
               <i class="iconfont">&#xe632;</i>
158
               <i class="iconfont">&#xe632;</i>
154
             </p>
159
             </p>
155
-            </div>-->
160
+            </div>
156
           </div>
161
           </div>
157
           <div class="imgs">
162
           <div class="imgs">
158
             <div class="swiper-container imgSwiper">
163
             <div class="swiper-container imgSwiper">
182
               <div class="img">
187
               <div class="img">
183
                 <img :src="it.poster_photo" style="widht:100%;height:100%" alt />
188
                 <img :src="it.poster_photo" style="widht:100%;height:100%" alt />
184
               </div>
189
               </div>
185
-              <div class="detail">
190
+              <div class="detail" v-if="it.title != ''">
186
                 <p class="detailTitle">{{it.title}}</p>
191
                 <p class="detailTitle">{{it.title}}</p>
187
-                <!-- <div class="detailBox">
188
-                <div class="activityTime">
189
-                  <p>
190
-                    7月28日 08:30开始
191
-                    深圳市南山区
192
-                  </p>
193
-                </div>
194
-                <div class="people">
195
-                  <p>100人已报名</p>
192
+              </div>
193
+               <div class="detail" v-else-if="it.title ==''">
194
+                <div class="noImg">
195
+                  <img src="../../../static/images/none2.png" alt />
196
                 </div>
196
                 </div>
197
-                </div>-->
198
               </div>
197
               </div>
199
             </div>
198
             </div>
200
           </div>
199
           </div>
329
         }
328
         }
330
       });
329
       });
331
     },
330
     },
331
+    EnviromentClick(id,orgid){
332
+      this.$router.push({
333
+        path:"/departmentEnvironment",
334
+        query:{
335
+          id:id,
336
+          orgid: orgid,
337
+        }
338
+      })
339
+    },
332
     getDefalutNavigationData(orgid) {
340
     getDefalutNavigationData(orgid) {
333
       getDefalutNavigationData(orgid).then(response => {
341
       getDefalutNavigationData(orgid).then(response => {
334
         if (response.data.state == 1) {
342
         if (response.data.state == 1) {
404
           console.log("数据是什么", this.patientModels);
412
           console.log("数据是什么", this.patientModels);
405
         }
413
         }
406
       });
414
       });
407
-    }
415
+    },
416
+
417
+
408
   },
418
   },
409
   created() {
419
   created() {
410
     const orgid = this.$route.query.orgid;
420
     const orgid = this.$route.query.orgid;