Your Name 4 vuotta sitten
vanhempi
commit
71d8c6aeac

+ 4
- 13
src/components/detailCompents/swiper/index.vue Näytä tiedosto

@@ -4,7 +4,6 @@
4 4
       <van-swipe-item v-for="(image, index) in images" :key="index" >
5 5
         <van-image
6 6
           height="300"
7
-          fit="contain"
8 7
           :src="image.image"
9 8
           @click="onPerView(index)"
10 9
         />
@@ -24,9 +23,7 @@
24 23
           v-for="(image, index) in images"
25 24
           :key="index"
26 25
           :title="image.text"
27
-          
28 26
         >
29
-          <!-- {{ image.text }} -->
30 27
         </van-tab>
31 28
       </van-tabs>
32 29
     </div>
@@ -53,12 +50,6 @@ export default {
53 50
     [Tabs.name]: Tabs,
54 51
     [Tab.name]: Tab,
55 52
   },
56
-
57
-  //   images = [
58
-  //       'https://img.yzcdn.cn/vant/apple-1.jpg',
59
-  //       'https://img.yzcdn.cn/vant/apple-2.jpg',
60
-  //     ];
61
-
62 53
   props: {
63 54
     images: {
64 55
       type: Array,
@@ -68,7 +59,7 @@ export default {
68 59
 
69 60
   setup(props,) {
70 61
     const current = ref(0);
71
-const swipe = ref();
62
+    const swipe = ref();
72 63
     
73 64
     const onChange = (index) => {
74 65
       current.value = index;
@@ -82,8 +73,8 @@ const swipe = ref();
82 73
     };
83 74
     const onClickTab = (index) => {
84 75
       current.value=index
85
-    swipe.value.swipeTo(index)
86
-swipe.value.resize()
76
+      swipe.value.swipeTo(index)
77
+      swipe.value.resize()
87 78
     
88 79
       console.log(index,  "ongchawng");
89 80
     };
@@ -91,7 +82,7 @@ swipe.value.resize()
91 82
     // refs.checkbox.toggle();
92 83
     onPerView;
93 84
     return {
94
-        swipe,
85
+      swipe,
95 86
       current,
96 87
       onChange,
97 88
       onPerView,

+ 9
- 1
src/view/secondhand/detail/index.vue Näytä tiedosto

@@ -170,12 +170,20 @@ export default {
170 170
       getDetail,
171 171
     } = useModel("room")
172 172
 
173
+    const { dicts, getDict } = useModel('dicts')
174
+
175
+    const getRescType = val => {
176
+      const rescTypes = dicts['roomResc_type'] || []
177
+      return (rescTypes.filter(x => x.value === val)[0] || {}).text
178
+    }
179
+
173 180
     const imageList = computed(() => {
174
-      return (detail.RoomResc || []).filter(x => x.imgType !== '0').map(x => ({image: x.url, text: ''}))
181
+      return (detail.RoomResc || []).filter(x => x.imgType !== '0').map(x => ({image: x.url, text: getRescType(x.imgType)}))
175 182
     })
176 183
 
177 184
     onMounted(() => {
178 185
       getDetail(roomId);
186
+      getDict('roomResc_type')
179 187
     });
180 188
 
181 189
     const shareOptions = [

+ 2
- 2
vue.config.js Näytä tiedosto

@@ -11,8 +11,8 @@ module.exports = {
11 11
     disableHostCheck: true,
12 12
     proxy: {
13 13
       '/mp': {
14
-        target: 'http://10.161.7.66:8080/',
15
-        // target: 'http://localhost:8080/',
14
+        // target: 'http://10.161.7.66:8080/',
15
+        target: 'http://localhost:8080/',
16 16
         ws: true,
17 17
         changeOrigin: true,
18 18
         // pathRewrite: {'^/mp': ''}