xiaoe_mp_npm 0.5.17 → 0.5.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,6 +24,13 @@ Component({
24
24
  type: Object,
25
25
  value: {}
26
26
  },
27
+ showList:{
28
+ type: Boolean,
29
+ value: false,
30
+ observer(newVal) {
31
+ newVal && this.initCouponList()
32
+ }
33
+ }
27
34
  },
28
35
 
29
36
  /**
@@ -588,8 +588,12 @@ Component({
588
588
  }
589
589
  wx.navigateToMiniProgram(params)
590
590
  },
591
- sendGoodsCard(){
592
- this.triggerEvent('sendGoodsCard',this.data.goodsItem)
591
+ sendGoodsCard(e) {
592
+ let dataset = e.currentTarget.dataset;
593
+ // 触发父组件的send
594
+ this.triggerEvent('sendGoodsCard', {
595
+ datas: dataset
596
+ });
593
597
  },
594
598
  changeShowType(){
595
599
  this.setData({
@@ -27,7 +27,7 @@
27
27
  <!-- 商品列表 start-->
28
28
  <scroll-view class="goods-list" scroll-y="true" bindscrolltolower="onScrolltolower" refresher-triggered="{{refreshing}}" bindrefresherrefresh="onLoad" refresher-enabled="{{true}}">
29
29
  <!-- 优惠券列表 start -->
30
- <coupon-list aliveInfo="{{ aliveInfo }}" bind:showPopup="showInfoCollection" bind:receivedSuccess="receivedSuccess" sensorReportParams="{{sensorReportParams}}"></coupon-list>
30
+ <coupon-list showList="{{ showList }}" aliveInfo="{{ aliveInfo }}" bind:showPopup="showInfoCollection" bind:receivedSuccess="receivedSuccess" sensorReportParams="{{sensorReportParams}}"></coupon-list>
31
31
  <!-- 优惠券列表 end -->
32
32
  <!-- 讲解中的商品 start -->
33
33
  <block wx:if="{{showExplainingGoods}}">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xiaoe_mp_npm",
3
- "version": "0.5.17",
3
+ "version": "0.5.19",
4
4
  "description": "",
5
5
  "main": "miniprogram_dist/index.js",
6
6
  "scripts": {
@@ -24,6 +24,13 @@ Component({
24
24
  type: Object,
25
25
  value: {}
26
26
  },
27
+ showList:{
28
+ type: Boolean,
29
+ value: false,
30
+ observer(newVal) {
31
+ newVal && this.initCouponList()
32
+ }
33
+ }
27
34
  },
28
35
 
29
36
  /**
@@ -588,8 +588,12 @@ Component({
588
588
  }
589
589
  wx.navigateToMiniProgram(params)
590
590
  },
591
- sendGoodsCard(){
592
- this.triggerEvent('sendGoodsCard',this.data.goodsItem)
591
+ sendGoodsCard(e) {
592
+ let dataset = e.currentTarget.dataset;
593
+ // 触发父组件的send
594
+ this.triggerEvent('sendGoodsCard', {
595
+ datas: dataset
596
+ });
593
597
  },
594
598
  changeShowType(){
595
599
  this.setData({
@@ -27,7 +27,7 @@
27
27
  <!-- 商品列表 start-->
28
28
  <scroll-view class="goods-list" scroll-y="true" bindscrolltolower="onScrolltolower" refresher-triggered="{{refreshing}}" bindrefresherrefresh="onLoad" refresher-enabled="{{true}}">
29
29
  <!-- 优惠券列表 start -->
30
- <coupon-list aliveInfo="{{ aliveInfo }}" bind:showPopup="showInfoCollection" bind:receivedSuccess="receivedSuccess" sensorReportParams="{{sensorReportParams}}"></coupon-list>
30
+ <coupon-list showList="{{ showList }}" aliveInfo="{{ aliveInfo }}" bind:showPopup="showInfoCollection" bind:receivedSuccess="receivedSuccess" sensorReportParams="{{sensorReportParams}}"></coupon-list>
31
31
  <!-- 优惠券列表 end -->
32
32
  <!-- 讲解中的商品 start -->
33
33
  <block wx:if="{{showExplainingGoods}}">