xiaoming_global 5 vuotta sitten
vanhempi
commit
2efc09672e

+ 12 - 0
src/api/micro/micro.js Näytä tiedosto

@@ -188,3 +188,15 @@ export function GetRotationLinkAddress(linkid, orgid) {
188 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 Näytä tiedosto

@@ -1,25 +1,74 @@
1 1
 <template>
2 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 13
     </div>
15 14
 </template>
16 15
 
17 16
 <script>
17
+    import Swiper from "swiper";
18
+   import {getEnviromentImages } from "@/api/micro/micro";
18 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 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 74
 </style>

+ 32 - 22
src/scrm_pages/microHome/microHome.vue Näytä tiedosto

@@ -51,10 +51,15 @@
51 51
               <div class="img">
52 52
                 <img :src="it.imgs" style="width:100%;height:100%" alt />
53 53
               </div>
54
-              <div class="detail">
54
+              <div class="detail" v-if="it.title !=''">
55 55
                 <p class="detailTitle">{{it.title}}</p>
56 56
                 <!-- <p class="detailMessage">{{it.content}}</p> -->
57 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 63
             </div>
59 64
           </div>
60 65
         </div>
@@ -72,8 +77,8 @@
72 77
             </div>
73 78
           </div>
74 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 82
               <img src="../../../static/images/none2.png" alt />
78 83
             </div>
79 84
           </div>
@@ -95,8 +100,8 @@
95 100
             <!-- <div class="commonImg">
96 101
             <img src="static\images\img2.png" alt />
97 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 105
               <img src="../../../static/images/none2.png" alt />
101 106
             </div>
102 107
           </div>
@@ -119,12 +124,12 @@
119 124
               <div class="img">
120 125
                 <img :src="doc.dochead" style="width:100%;height:100%" alt />
121 126
               </div>
122
-              <!-- <div class="detail">
127
+              <div class="detail" v-if="doc.docintroduction != ''">
123 128
                 <p class="detailTitle">{{doc.doc_name}}</p>
124 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 133
                 <div class="noImg">
129 134
                   <img src="../../../static/images/none2.png" alt />
130 135
                 </div>
@@ -147,12 +152,12 @@
147 152
           <div class="common_title">
148 153
             <div class="one"></div>
149 154
             <div class="dynamicTxt">{{item.title}}</div>
150
-            <!-- <div class="more">
155
+            <div class="more" @click="EnviromentClick(item.id,item.user_org_id)">
151 156
             <p>
152 157
               查看更多
153 158
               <i class="iconfont">&#xe632;</i>
154 159
             </p>
155
-            </div>-->
160
+            </div>
156 161
           </div>
157 162
           <div class="imgs">
158 163
             <div class="swiper-container imgSwiper">
@@ -182,19 +187,13 @@
182 187
               <div class="img">
183 188
                 <img :src="it.poster_photo" style="widht:100%;height:100%" alt />
184 189
               </div>
185
-              <div class="detail">
190
+              <div class="detail" v-if="it.title != ''">
186 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 196
                 </div>
197
-                </div>-->
198 197
               </div>
199 198
             </div>
200 199
           </div>
@@ -329,6 +328,15 @@ export default {
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 340
     getDefalutNavigationData(orgid) {
333 341
       getDefalutNavigationData(orgid).then(response => {
334 342
         if (response.data.state == 1) {
@@ -404,7 +412,9 @@ export default {
404 412
           console.log("数据是什么", this.patientModels);
405 413
         }
406 414
       });
407
-    }
415
+    },
416
+
417
+
408 418
   },
409 419
   created() {
410 420
     const orgid = this.$route.query.orgid;