瀏覽代碼

注释字段增加我的进入详情隐藏领取

asd123a20 2 年之前
父節點
當前提交
9d9f77618d
共有 3 個文件被更改,包括 6 次插入4 次删除
  1. 4 2
      pages/goods/details.vue
  2. 1 1
      pages/goods/index.vue
  3. 1 1
      pages/goods/my.vue

+ 4 - 2
pages/goods/details.vue

@@ -4,7 +4,7 @@
  		<view class="voucher-coupon-detail-header">
  			<view class="voucher-coupon-detail-header-info">
  				<view class="voucher-coupon-detail-header-info-title">{{coupon.name}}</view>				
-				<view class="voucher-coupon-detail-header-info-time">代金券面额:¥{{coupon.money}}</view>
+				<!-- <view class="voucher-coupon-detail-header-info-time">代金券面额:¥{{coupon.money}}</view> -->
  				<view class="voucher-coupon-detail-header-info-desc">剩余数量:{{coupon.remainCount || 0}}</view>
 				<view class="voucher-coupon-detail-header-info-time">需要积分:{{coupon.integral}}</view> 
 				<view class="voucher-coupon-detail-header-info-time">开始领取:{{coupon.startTime}}</view> 
@@ -16,7 +16,7 @@
  			<view class="voucher-coupon-detail-content-title">说明</view>
  			<view class="voucher-coupon-detail-content-desc" v-html="coupon.details"></view>
  		</view>
- 		<view class="voucher-coupon-detail-footer-btn" :class="{ remainCount: coupon.remainCount == 0 }" @click="receive">立即领取</view>
+ 		<view class="voucher-coupon-detail-footer-btn" v-if="type !== 'my'" :class="{ remainCount: coupon.remainCount == 0 }" @click="receive">立即领取</view>
 		<popup ref="popup" :popupInfo="popupInfo" @confirm="popupBtnClick" @close="popupBtnClick"></popup>
  	</view>
  </template>
@@ -50,10 +50,12 @@
 					title: '通知',
 					content: '默认消息'
 				},
+				type: ''
  			};
  		},
 		onLoad: async function(option) {
 			if(option.id) this.id = option.id;
+			if (option.type) this.type = option.type;
 			this.query();
 		},
  		methods: {

+ 1 - 1
pages/goods/index.vue

@@ -19,7 +19,7 @@
 						<template v-slot:body>
 							<view class="slot-body titleBox" @click="btn(item)">
 								<view class="slot-box slot-title">{{ item.name }}</view>
-								<view class="slot-box slot-text">金额:{{ item.money }}</view>
+								<view class="slot-box slot-text">积分:{{ item.integral }}</view>
 								<view class="slot-box slot-text">剩余:{{ item.remainCount }}</view>
 							</view>
 						</template>

+ 1 - 1
pages/goods/my.vue

@@ -65,7 +65,7 @@
 			},
 			// 详情
 			btn(item) {
-				uni.navigateTo({ url: `/pages/goods/details?id=${item.discountId}` });
+				uni.navigateTo({ url: `/pages/goods/details?id=${item.discountId}&type=my` });
 			}
 		},
 		// 页面生命周期中onReachBottom(页面滚动到底部的事件)