fs-alipay-ad-component 0.0.7 → 0.0.8

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.0.8
2
+ * **Feature**:
3
+ * 新增参数showConfirm,传true的话展示支付成功弹窗
4
+
1
5
  ## 0.0.5
2
6
  * **Feature**:
3
7
  * 真实曝光优化
@@ -5,7 +5,7 @@ export var MOCK_URL = 'http://127.0.0.1:4523/mock/1080865/'; // mock地址
5
5
  export default function getEnv() {
6
6
  // 环境变量类型,值为:test、beta、prod
7
7
  var ENVIRONMENT_TYPE = 'prod';
8
- var XCXVERSION = '0.0.7'; // 组件版本号
8
+ var XCXVERSION = '0.0.8'; // 组件版本号
9
9
  var APP_ID = "fs-alipay-ad-component-" + ENVIRONMENT_TYPE;
10
10
  var environmentObj = {
11
11
  test: {
package/es/index/index.js CHANGED
@@ -36,6 +36,8 @@ Component({
36
36
  // 付呗自用
37
37
  minaVersion: '',
38
38
  // 宿主小程序版本号
39
+ showConfirm: false,
40
+ // 是否展示确认弹窗
39
41
  onAdInfoReady: function onAdInfoReady() {}
40
42
  },
41
43
  didMount: function didMount() {
@@ -134,7 +136,7 @@ Component({
134
136
  if (res) {
135
137
  _this3.setData({
136
138
  adInfo: res,
137
- showPayed: true
139
+ showPayed: _this3.props.showConfirm
138
140
  });
139
141
  _this3.props.onAdInfoReady();
140
142
  }
@@ -147,8 +149,11 @@ Component({
147
149
  showAd: function showAd() {
148
150
  this.setData({
149
151
  showAdDom: true,
150
- showPayed: true
152
+ showPayed: this.props.showConfirm
151
153
  });
154
+ if (!this.props.showConfirm) {
155
+ this.handleShowAd();
156
+ }
152
157
  this.handleExposureDataReport();
153
158
  },
154
159
  /**
@@ -172,7 +177,9 @@ Component({
172
177
  if (typeId === AD_TYPE_ID.H5Link) {
173
178
  this.navigateToH5();
174
179
  }
175
- this.handleExposureDataReport(ACTION_TYPE.click);
180
+ if (this.props.showConfirm) {
181
+ this.handleExposureDataReport(ACTION_TYPE.click);
182
+ }
176
183
  },
177
184
  /**
178
185
  * @function 跳转H5页面
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fs-alipay-ad-component",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "支付宝小程序广告组件",
5
5
  "files": [
6
6
  "es"