Ver código fonte

Merge branch 'master' of http://svn.ouj.com:3000/FED/dw_lotter_draw

PC-20180523CIYM\Administrator 5 anos atrás
pai
commit
d3d3a65e85

+ 5 - 1
components/award-item/award-item.js

@@ -7,7 +7,11 @@ Component({
 		award: {
 			type: Object,
 			value: {}
-		}
+    },
+    custom: {
+      type: Boolean,
+      value: false
+    }
 	},
 	data: {},
 	methods: {

+ 4 - 1
components/award-item/award-item.wxml

@@ -3,6 +3,9 @@
   <view class="award-bottom">
     <text class="award-title">{{award.title}} x {{award.winner_count}}</text>
     <text class="award-time">{{award.draw_ts}} 自动开奖</text>
-    <view class="award-btn {{award.state === '2' ? 'done' : award.state === '0' ? 'done' : award.user_draw_state ? 'joined' : ''}}">{{award.state === '2' ? '已结束' : award.state === '0' ? '未开始' : award.user_draw_state ? '已参与' : '点击抽奖'}}</view>
+    <view class="award-btn {{award.state === '2' ? 'done' : award.state === '0' ? 'done' : award.user_draw_state ? 'joined' : ''}}"
+    wx:if="{{!custom}}">{{award.state === '2' ? '已结束' : award.state === '0' ? '未开始' : award.user_draw_state ? '已参与' : '点击抽奖'}}</view>
+    <view class="award-btn"
+    wx:if="{{custom}}">点击加入</view>
   </view>
 </view>

+ 4 - 0
components/recommend-award/recommend-award.js

@@ -7,6 +7,10 @@ Component({
     award: {
       type: Object,
       value: {}
+    },
+    custom: {
+      type: Boolean,
+      value: true
     }
   },
 

+ 1 - 1
components/recommend-award/recommend-award.wxml

@@ -1,4 +1,4 @@
   <view class="recommend-activity">
     <view class="tag">推荐</view>
-    <award-item award='{{award}}'></award-item>
+    <award-item award='{{award}}' custom="{{custom}}"></award-item>
   </view>