李志伟 3 years ago
parent
commit
551c40aaf1

+ 2
- 1
src/main.js View File

19
   Toast,
19
   Toast,
20
   Card,
20
   Card,
21
   NavBar,
21
   NavBar,
22
-  Image, SwipeItem, Tag, Swipe, Divider, Picker, Popup, List
22
+  Image, SwipeItem, Tag, Swipe, Divider, Picker, Popup, List,ImagePreview 
23
 } from 'vant';
23
 } from 'vant';
24
 Vue.config.productionTip = false
24
 Vue.config.productionTip = false
25
 
25
 
30
 Vue.use(Divider);
30
 Vue.use(Divider);
31
 Vue.use(Swipe);
31
 Vue.use(Swipe);
32
 Vue.use(Tag);
32
 Vue.use(Tag);
33
+Vue.use(ImagePreview);
33
 Vue.use(NavBar);
34
 Vue.use(NavBar);
34
 Vue.use(SwipeItem);
35
 Vue.use(SwipeItem);
35
 Vue.use(Image);
36
 Vue.use(Image);

+ 0
- 1
src/util/formattingData.js View File

8
     .replace(/T/g, ' ')
8
     .replace(/T/g, ' ')
9
     .replace(/\.[\d]{3}Z/, '')
9
     .replace(/\.[\d]{3}Z/, '')
10
 
10
 
11
-  console.log("🚀 ~ file: formattingData.js ~ line 6 ~ parseTime ~ time", aTime)
12
 
11
 
13
   if (arguments.length === 0 || !aTime) {
12
   if (arguments.length === 0 || !aTime) {
14
     return null
13
     return null

+ 1
- 2
src/views/Course.vue View File

121
   }
121
   }
122
 
122
 
123
   .course-list {
123
   .course-list {
124
-    margin-top: 2em;
124
+    margin-top: 10vw;
125
   }
125
   }
126
 
126
 
127
   .custom-indicator {
127
   .custom-indicator {
130
     text-align: center;
130
     text-align: center;
131
     left: 0;
131
     left: 0;
132
     right: 0;
132
     right: 0;
133
-    bottom: -1em;
134
     z-index: 10;
133
     z-index: 10;
135
 
134
 
136
     & > span {
135
     & > span {

+ 36
- 27
src/views/StrongPhoto.vue View File

1
 <template>
1
 <template>
2
-  <!-- <h1>StrongPhoto 精彩集锦</h1> -->
3
   <div class="Photo-box">
2
   <div class="Photo-box">
4
-    <div>
5
-      <van-swipe :autoplay="3000">
6
-        <van-swipe-item v-for="(image, index) in photoBannerImages" :key="index">
7
-          <van-image width="100%" height="100%" :src="image.thumb" />
8
-        </van-swipe-item>
9
-      </van-swipe>
10
-    </div>
11
-    <div style="display: flex; aline-itme:center;margin-top: 30px;padding-left: 15px; ">
3
+    <van-swipe :autoplay="3000">
4
+      <van-swipe-item v-for="(image, index) in photoBannerImages" :key="index">
5
+        <van-image width="100%" height="100%" :src="image.thumb" />
6
+      </van-swipe-item>
7
+    </van-swipe>
8
+    <div style="display: flex; aline-itme:center;margin-top: 30px;position:relative ">
12
       <!-- <div :class="`${classStyle?'Zhedie-box Donghua':'Zhedie-box'}`"> -->
9
       <!-- <div :class="`${classStyle?'Zhedie-box Donghua':'Zhedie-box'}`"> -->
13
       <div :class="{'Zhedie-box': true, 'expand': classStyle}">
10
       <div :class="{'Zhedie-box': true, 'expand': classStyle}">
14
         <!-- :class="`${clickStyle?'clickStyle':''}`" -->
11
         <!-- :class="`${clickStyle?'clickStyle':''}`" -->
22
       </div>
19
       </div>
23
       <van-icon
20
       <van-icon
24
         v-show="iconShow"
21
         v-show="iconShow"
25
-        style="left:0; top: 0.6vh;"
22
+        style="right:4vw; top: 0.6vh; position:absolute"
26
         :name="`${classStyle?'arrow-up ':'arrow-down'}`"
23
         :name="`${classStyle?'arrow-up ':'arrow-down'}`"
27
         @click="animations"
24
         @click="animations"
28
       />
25
       />
34
           <div></div>
31
           <div></div>
35
           <span>{{item.createDate}}</span>
32
           <span>{{item.createDate}}</span>
36
         </div>
33
         </div>
37
-        <span v-for="(image, index) in item.res" :key="index">
38
-          <van-image width="31vw" :src="image.url" style="padding:0 3px 0 2px" />
39
-        </span>
34
+        <van-image v-for="(image, index) in item.res" :key="index" width="31vw" :src="image.url" style="padding:0 3px 0 2px" @click="showBig(image.url)" />
35
+        <van-image-preview v-model="imageShow" :images="bigImg" />
40
       </div>
36
       </div>
41
     </div>
37
     </div>
42
   </div>
38
   </div>
54
       classStyle: false,
50
       classStyle: false,
55
       clickStyle: false,
51
       clickStyle: false,
56
       iconShow: true,
52
       iconShow: true,
53
+      imageShow: false,
54
+      bigImg: [],
57
       activeNum: 0, //下标
55
       activeNum: 0, //下标
58
       buttList: [],
56
       buttList: [],
59
       photoBannerImages: [],
57
       photoBannerImages: [],
62
       newArrImageList: []
60
       newArrImageList: []
63
     }
61
     }
64
   },
62
   },
65
-  watch: {},
63
+  watch: {
64
+    buttList: {
65
+      handler(val) {
66
+        if (val.length !== 0) {
67
+          this.SeePhotos(0,val[0].packId)
68
+        }
69
+      },
70
+      immediate: true
71
+    }
72
+  },
66
   mounted() {
73
   mounted() {
67
     this.onBanner()
74
     this.onBanner()
68
     this.onLoadSort()
75
     this.onLoadSort()
75
     // }
82
     // }
76
   },
83
   },
77
   methods: {
84
   methods: {
85
+    showBig(val) {
86
+      this.bigImg = [val]
87
+      this.imageShow = true
88
+    },
78
     parseTime,
89
     parseTime,
79
     dataResort(arr) {
90
     dataResort(arr) {
80
       var newArr = []
91
       var newArr = []
101
           newArr[index].res.push(oldData)
112
           newArr[index].res.push(oldData)
102
         }
113
         }
103
       })
114
       })
104
-      console.log(
105
-        '🚀 ~ file: StrongPhoto.vue ~ line 105 ~ dataResort ~ newArr',
106
-        newArr
107
-      )
108
-
109
       this.newArrImageList = newArr
115
       this.newArrImageList = newArr
110
     },
116
     },
111
     onLoadSort() {
117
     onLoadSort() {
112
       getPhotoSotr().then((e) => {
118
       getPhotoSotr().then((e) => {
113
         this.buttList = e.records
119
         this.buttList = e.records
114
-        console.log(e.records)
115
       })
120
       })
116
     },
121
     },
117
     animations() {
122
     animations() {
118
       this.classStyle = !this.classStyle
123
       this.classStyle = !this.classStyle
124
+      if (this.classStyle === false) {
125
+        var item =this.buttList[this.activeNum]
126
+        this.buttList.splice(this.activeNum,1)
127
+        this.buttList.unshift(item)
128
+      }
119
     },
129
     },
120
     SeePhotos(i, id) {
130
     SeePhotos(i, id) {
121
-      console.log('🚀 ~ file: StrongPhoto.vue ~ line 94 ~ SeePhotos ~ id', id)
122
       this.activeNum = i
131
       this.activeNum = i
123
       getPhotos(id).then((e) => {
132
       getPhotos(id).then((e) => {
124
         this.imageList = e.records
133
         this.imageList = e.records
129
     onBanner() {
138
     onBanner() {
130
       getBanner('Wonderful').then((e) => {
139
       getBanner('Wonderful').then((e) => {
131
         this.photoBannerImages = e.records
140
         this.photoBannerImages = e.records
132
-        console.log(e)
141
+        // console.log(e)
133
       })
142
       })
134
     }
143
     }
135
   }
144
   }
146
     border-radius: 10px;
155
     border-radius: 10px;
147
     margin: 10px auto;
156
     margin: 10px auto;
148
     box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.2);
157
     box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.2);
149
-
150
     height: 33vh;
158
     height: 33vh;
151
   }
159
   }
152
   .Zhedie-box {
160
   .Zhedie-box {
153
-    width: 90%;
161
+    padding: 0 4vw;
154
     overflow: hidden;
162
     overflow: hidden;
155
     display: flex;
163
     display: flex;
156
     align-items: center;
164
     align-items: center;
157
     flex-wrap: wrap;
165
     flex-wrap: wrap;
158
-    height: 35px;
166
+    height: 7vw;
159
     transition: height 0.2s ease;
167
     transition: height 0.2s ease;
160
     &.expand {
168
     &.expand {
161
       height: 50vh;
169
       height: 50vh;
162
     }
170
     }
163
 
171
 
164
     > div {
172
     > div {
165
-      padding: 2px 10px;
173
+      padding: 1.5vw 3vw;
166
       color: rgb(128, 128, 128);
174
       color: rgb(128, 128, 128);
167
-      line-height: 28px;
175
+      margin-right: 1.5vw;
176
+      margin-bottom: 1vw;
168
       text-align: center;
177
       text-align: center;
169
       font-size: 10px;
178
       font-size: 10px;
170
     }
179
     }

+ 2
- 2
src/views/Tabber.vue View File

22
   },
22
   },
23
   created() {
23
   created() {
24
     //由于 vant 标签栏路由模式,无法自动加载页面,所以这里需要初始化
24
     //由于 vant 标签栏路由模式,无法自动加载页面,所以这里需要初始化
25
-    console.log(this.$route) //打印当前路由属性
25
+    // console.log(this.$route) //打印当前路由属性
26
     this.active = 0
26
     this.active = 0
27
 
27
 
28
     switch (this.$route.name) {
28
     switch (this.$route.name) {
41
   },
41
   },
42
   methods: {
42
   methods: {
43
     onChange(index) {
43
     onChange(index) {
44
-      console.log(index)
44
+      // console.log(index)
45
       switch (index) {
45
       switch (index) {
46
         case 0:
46
         case 0:
47
           this.$router.push('/')
47
           this.$router.push('/')

+ 5
- 4
src/views/components/CourseCard.vue View File

53
   box-shadow: 0px 0px 4px 4px rgba(0, 0, 0, 0.06);
53
   box-shadow: 0px 0px 4px 4px rgba(0, 0, 0, 0.06);
54
 
54
 
55
   & + & {
55
   & + & {
56
-    margin-top: 1.5em;
56
+    margin-top: 3vw;
57
   }
57
   }
58
 
58
 
59
   .media-box, .card-footer {
59
   .media-box, .card-footer {
62
   }
62
   }
63
 
63
 
64
   .media-box {
64
   .media-box {
65
-    padding: 1em;
65
+    padding: 5vw;
66
     .media-head {
66
     .media-head {
67
       flex: none;
67
       flex: none;
68
       width: 20vw;
68
       width: 20vw;
93
   }
93
   }
94
 
94
 
95
   .card-footer {
95
   .card-footer {
96
-    padding: 1em;
97
-    border-top: 1px solid rgb(238, 238, 238);
96
+    padding: 2.5vw 0;
97
+    margin: 0 5vw;
98
+    border-top: 2px solid rgb(239, 239, 239);
98
 
99
 
99
     & > div {
100
     & > div {
100
       color: rgb(133, 133, 133);
101
       color: rgb(133, 133, 133);