jufubao-gift 1.0.32-beta2 → 1.0.33-beta2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-gift",
3
- "version": "1.0.32-beta2",
3
+ "version": "1.0.33-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件礼包插件包",
6
6
  "main": "index.js",
@@ -19,7 +19,7 @@ module.exports = [
19
19
  params: {
20
20
  mode: ['模式1一选一 2 二选一', 'Number', '必选'],
21
21
  gift_pool_id: ['礼包池id', 'Number', '必选'],
22
- scene: ['模式百货market,礼包gift', 'Number', '必选'],
22
+ scene: ['模式百货market,礼包gift', 'Number', '必选', 'market'],
23
23
  is_show_price: ['模式百货market是否展示价格', 'Number', '必选'],
24
24
  page_size: ['page_size', 'Number', '必选'],
25
25
  page_token: ['page_token', 'Number', '必选'],
@@ -34,7 +34,7 @@ module.exports = [
34
34
  isRule: false,
35
35
  params: {
36
36
  mode: ['模式1一选一 2 二选一', 'Number', '必选'],
37
- scene: ['模式百货market,礼包gift', 'Number', '必选'],
37
+ scene: ['模式百货market,礼包gift', 'Number', '必选', 'market'],
38
38
  gift_pool_id: ['礼包池id', 'Number', '必选']
39
39
  },
40
40
  isConsole: true,
@@ -33,6 +33,18 @@ export default {
33
33
  groupKey: "content",
34
34
  },
35
35
  {
36
+ label: "展示维度",
37
+ ele: "xd-radio",
38
+ valueKey: "tabType",
39
+ value: data.tabType || "pool",
40
+ list: [
41
+ { label: "按礼包池", value: "pool" },
42
+ { label: "按归类", value: "category" },
43
+ ],
44
+ inline: false,
45
+ groupKey: "content",
46
+ },
47
+ data.tabType === 'pool' &&{
36
48
  label: "是否展示池名称",
37
49
  ele: "xd-radio",
38
50
  valueKey: "showPoolName",
@@ -29,7 +29,7 @@
29
29
  @onTab="(item,index) => handleTab(item,index, 'onTab')"
30
30
  ></xd-tab>
31
31
  </view>
32
- <view style="height: 100rpx;"></view>
32
+ <!-- <view style="height: 100rpx;"></view> -->
33
33
  </template>
34
34
 
35
35
  <view class="gift_list" :style="[listWrapBoxStyle]">
@@ -65,7 +65,7 @@
65
65
  import XdUnit from "@/components/XdUnit/XdUnit";
66
66
  import { jfbRootExec } from "@/utils/xd.event";
67
67
  import JfbGiftListNewMixin from "./JfbGiftListNewMixin";
68
- import { getContainerPropsValue } from "@/utils/xd.base";
68
+ import { getContainerPropsValue, gCPVal } from "@/utils/xd.base";
69
69
  import componentsMixins from "@/mixins/componentsMixins";
70
70
  import extsMixins from "@/mixins/extsMixins";
71
71
  import getServiceUrl from "@/common/getServiceUrl";
@@ -156,6 +156,7 @@
156
156
  this.colNum = getContainerPropsValue(container, 'content.colNum', 2);
157
157
  this.listBgColor = getContainerPropsValue(container, 'content.listBgColor', '#FFFFFF');
158
158
  this.listTextColor = getContainerPropsValue(container, 'content.listTextColor', '#333333');
159
+ this.tabType = gCPVal(container, 'tabType', "pool")
159
160
  this.showPrice = getContainerPropsValue(container, 'content.showPrice', "Y");
160
161
  this.showPoolName = getContainerPropsValue(container, 'content.showPoolName', "Y");
161
162
  this.detailPath = getContainerPropsValue(container, 'content.detailPath', {value: ""}).value;
@@ -174,6 +175,12 @@
174
175
  })
175
176
  let itemShadow = getContainerPropsValue(container, "content.itemShadow", {});
176
177
  this.itemShadow = this.getShadowCompatibleOldStyle(itemShadow, {})
178
+
179
+ if (this.$configProject['isPreview']) {
180
+ if(this.showPoolName === "Y"){
181
+ this.p_getGiftPoolList();
182
+ }
183
+ }
177
184
  },
178
185
  handleGiftClick(item){
179
186
  let curPool = this.poolList[this.poolActiveIndex];
@@ -192,9 +199,18 @@
192
199
  mode: this.mode,
193
200
  page_size: 20,
194
201
  is_show_price: this.showPrice,
195
- scene: 'market'
202
+ show: this.tabType,
203
+ scene: "market"
196
204
  }
197
205
  }).then(res => {
206
+ if(this.$configProject['isPreview']){
207
+ if(this.tabType === 'category'){
208
+ this.poolList = [ { value: 1, name: "归类A" },{ value: 2, name: "归类B" },{ value: 4, name: "归类C" },]
209
+ }else{
210
+ this.poolList = res.list.map(item => ({name: item.pool_name, value: item.gift_pool_id}))
211
+ }
212
+ return;
213
+ }
198
214
  this.poolList = res.list.map(item => ({name: item.pool_name, value: item.gift_pool_id}))
199
215
  })
200
216
  },
@@ -203,13 +219,18 @@
203
219
  let curPool = this.poolList[this.poolActiveIndex];
204
220
  let data = {
205
221
  mode: this.mode,
206
- scene: 'market',
222
+ scene: "market",
207
223
  is_show_price: this.showPrice,
224
+ show: this.tabType,
208
225
  page_size,
209
226
  page_token,
210
227
  }
211
228
  if(curPool && curPool.value){
212
- data['gift_pool_id'] = curPool.value;
229
+ if(this.tabType === 'category'){
230
+ data['category_id'] = curPool.value;
231
+ }else{
232
+ data['gift_pool_id'] = curPool.value;
233
+ }
213
234
  }
214
235
 
215
236
  jfbRootExec("getGiftProductListNew", {
@@ -279,7 +300,6 @@
279
300
  .jfb-gift-list-new {
280
301
  &__body{
281
302
  .tab_wrap{
282
- position: fixed;
283
303
  width:100%;
284
304
  z-index: 999;
285
305
  background: #FFFFFF;