guhongwei преди 2 години
родител
ревизия
affdbe80cf
променени са 1 файла, в които са добавени 5 реда и са изтрити 6 реда
  1. 5 6
      pagesRest/recom/index.vue

+ 5 - 6
pagesRest/recom/index.vue

@@ -2,7 +2,7 @@
 	<mobile-frame>
 		<view class="main">
 			<view class="one">
-				<image class="image" :src="topUrl" mode=""></image>
+				<image class="image" :src="topUrl" mode="aspectFit"></image>
 			</view>
 			<view class="two">
 				<view class="pubu">
@@ -44,7 +44,7 @@
 			if (e && e.tags) {
 				that.$set(that, `type`, '1')
 				that.$set(that, `tags`, e.tags || '');
-			} else {
+			} else if (e && e.act_tags) {
 				that.$set(that, `type`, '2')
 				that.$set(that, `act_tags`, e.act_tags || '');
 			}
@@ -63,9 +63,6 @@
 					key: 'config',
 					success: function(res) {
 						if (res.data) that.$set(that, `config`, res.data)
-					},
-					fail: function(err) {
-						console.log(err);
 					}
 				})
 			},
@@ -104,7 +101,8 @@
 					uni.setNavigationBarTitle({
 						title: data.label
 					});
-					if (data.file.length > 0) topUrl = data;
+					if (that.type == '1' && data.tags_file.length > 0) topUrl = data.tags_file
+					else if (that.type == '2' && data.file.length > 0) topUrl = data.file
 				}
 				if (topUrl.length > 0) {
 					that.$set(that, `topUrl`, topUrl[0].url)
@@ -132,6 +130,7 @@
 
 		.one {
 			padding: 2vw;
+			background-color: #ffffff;
 
 			.image {
 				width: 100%;