guhongwei 2 年之前
父节点
当前提交
74ab7a5233
共有 4 个文件被更改,包括 24 次插入9 次删除
  1. 2 3
      pages/home/index.vue
  2. 2 1
      pagesHome/order/detail.vue
  3. 16 3
      pagesRest/activity/info.vue
  4. 4 2
      pagesRest/activity/list.vue

+ 2 - 3
pages/home/index.vue

@@ -48,7 +48,7 @@
 								<image class="image" :src="item.cover&&item.cover.length>0?item.cover[0].url:''" mode="">
 								</image>
 							</view>
-							<view class="title">
+							<view class="title" v-if="item.act_time.is_use=='0'">
 								<text>{{item.title}}</text>
 							</view>
 							<view class="time" v-if="item.act_time.is_use=='0'">
@@ -212,9 +212,8 @@
 			},
 			// 购买
 			toBuy(e) {
-				console.log(e);
 				const that = this;
-				let id = that.market_type == '1' ? e._id || e.id : that.market_type == '2' ? e.goods._id : '';
+				let id = e._id || e.id;
 				that.clearPage();
 				uni.navigateTo({
 					url: `/pagesHome/order/detail?id=${id}`

+ 2 - 1
pagesHome/order/detail.vue

@@ -9,7 +9,7 @@
 							<swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff"
 								indicator-active-color="#FB1438" :autoplay="true" :interval="3000" :duration="1000">
 								<swiper-item class="list" v-for="(item,index) in bannerList" :key="index">
-									<image class="image" :src="item.url" mode="">
+									<image class="image" :src="item.url" mode="aspectFit">
 									</image>
 								</swiper-item>
 							</swiper>
@@ -535,6 +535,7 @@
 						width: 100%;
 						height: 100%;
 						border-radius: 5px;
+						background-color: #fff;
 					}
 				}
 			}

+ 16 - 3
pagesRest/activity/info.vue

@@ -61,10 +61,11 @@
 			const that = this;
 			that.$set(that, `id`, e.id || '634fa595e4ed552882f05a6f');
 		},
-		onShow: function() {
+		onShow: async function() {
 			const that = this;
 			that.searchConfig();
-			that.searchAct();
+			await that.searchAct();
+			await that.configShare();
 		},
 		methods: {
 			// 查询基本设置
@@ -86,7 +87,7 @@
 				let res = await that.$api(`/platformAct/${that.id}`, 'GET');
 				if (res.errcode == '0') {
 					uni.setNavigationBarTitle({
-						title: res.data.title
+						title: res.data.act_time.title
 					});
 					that.$set(that, `info`, res.data);
 					that.search()
@@ -149,6 +150,18 @@
 				that.$set(that, `skip`, 0)
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
+			},
+			// 配置分享内容
+			configShare() {
+				const that = this;
+				let info = that.info;
+				let imageUrl = that.config.config.logo[0].url;
+				if (info.share.length > 0) imageUrl = info.share[0].url;
+				that.$config.share = {
+					title: info.act_time.title,
+					path: `/pagesRest/activity/info?id=${that.id}`,
+					imageUrl: imageUrl
+				}
 			}
 		}
 	}

+ 4 - 2
pagesRest/activity/list.vue

@@ -33,8 +33,8 @@
 	export default {
 		data() {
 			return {
-        // 平台信息
-        config:{},
+				// 平台信息
+				config: {},
 				searchInfo: {},
 				list: [],
 				total: 0,
@@ -160,6 +160,8 @@
 			.list {
 				margin: 2vw 2vw 0 2vw;
 				width: 96vw;
+				height: 22.5vw;
+				overflow: hidden;
 				border-radius: 10px;
 				box-shadow: 0 0 5px #858585;
 				position: relative;