jufubao-base 1.0.174-beta4 → 1.0.174-beta8

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-base",
3
- "version": "1.0.174-beta4",
3
+ "version": "1.0.174-beta8",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -53,6 +53,7 @@
53
53
  v-if="useSearch==='Y'"
54
54
  :placeholder="placeholder"
55
55
  class="search_input"
56
+ :value="keyword"
56
57
  @input="handleInput"
57
58
  @click="toSearch"
58
59
  :placeholder-style="'color:' + inputTextColor"
@@ -100,6 +101,8 @@
100
101
  timer: null,
101
102
  saveKey: 'xd_user_current_access_city', //用户选中城市存储key
102
103
  loaded: false,
104
+ keyword: "",
105
+
103
106
  //面板
104
107
  showLocation: "",
105
108
  showLocationKey: 'showLocationKey',
@@ -204,6 +207,7 @@
204
207
 
205
208
  },
206
209
  handleInput(e){
210
+ this.keyword = e.detail.value;
207
211
  if(this.timer) clearTimeout(this.timer);
208
212
  this.timer = setTimeout(() => {
209
213
  jfbRootFnExec(this, 'onCustomEvent')("baseHeader@search", e.detail.value);
@@ -242,6 +246,11 @@
242
246
  }
243
247
  this.$xdUniHelper.navigateBack();
244
248
  },
249
+ onJfbCustomEvent({action, data}){
250
+ if(action === 'baseTfkSearch@keyword'){
251
+ this.keyword = data;
252
+ }
253
+ }
245
254
  }
246
255
  }
247
256
 
@@ -42,7 +42,7 @@
42
42
  :color="listItemStyle.mainColor"
43
43
  :border-radius="listItemStyle.imgRradius"
44
44
  :brand-color="listItemStyle.brandColor"
45
- :is-echange="listItemStyle.isShowExchange"
45
+ :is-echange="productConfig.isShowExchange"
46
46
  @on-shop-jhd="data => handleShopJhd(data, parent)"
47
47
  @on-shop-detail="data => handleShopDetail(data, parent)"
48
48
  ></content-shop>
@@ -157,7 +157,7 @@
157
157
  },
158
158
  moduleItemContStyle(){
159
159
  const { contBgColor, contShadow, contBorder, contMargin, contRradius, outSpacing } = this.listItemStyle;
160
-
160
+
161
161
  let padding = `${this.checkValue(contMargin.top, 20)}rpx`;
162
162
  padding = `${padding} ${this.checkValue(contMargin.right, 20)}rpx`;
163
163
  padding = `${padding} ${this.checkValue(contMargin.bottom, 20)}rpx`;
@@ -304,9 +304,11 @@ export default {
304
304
  flex-flow: wrap;
305
305
 
306
306
  &.showTwo {
307
- &:nth-child(4),&:nth-child(5),&:nth-child(6){
308
- margin-top: 8rpx;
309
- }
307
+ & > view{
308
+ &:nth-child(4),&:nth-child(5),&:nth-child(6){
309
+ margin-top: 8rpx;
310
+ }
311
+ }
310
312
  }
311
313
  & > view {
312
314
  padding: 0 14rpx;
@@ -65,7 +65,7 @@
65
65
  <script>
66
66
  import XdSearchHistory from "@/components/XdSearchHistory/XdSearchHistory";
67
67
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
68
- import { jfbRootExec } from "@/utils/xd.event";
68
+ import { jfbRootExec, jfbRootFnExec } from "@/utils/xd.event";
69
69
  import JfbBaseTfkSearchMixin from "./JfbBaseTfkSearchMixin";
70
70
  import { getContainerPropsValue } from "@/utils/xd.base";
71
71
  import componentsMixins from "@/mixins/componentsMixins";
@@ -92,9 +92,11 @@
92
92
  componentsMixins, extsMixins, JfbBaseTfkSearchMixin,listMixins
93
93
  ],
94
94
  data() {
95
+ let keyword = ''
96
+ if(this.$configProject['isPreview']) keyword = '商品'
95
97
  return {
96
98
  tabId: 'all', //cinema/film/shop/product
97
- keyword: '',
99
+ keyword: keyword,
98
100
  options:{},
99
101
  menuList: [],
100
102
  //公共样式
@@ -223,7 +225,7 @@
223
225
  },
224
226
  },
225
227
  created() {
226
- if(this.$configProject['isPreview']) this.keyword = '商品'
228
+
227
229
  this.emitParent = new EmitParent({
228
230
  getParent: ()=>{
229
231
  return this;
@@ -303,7 +305,6 @@
303
305
 
304
306
  if(this.$configProject['isPreview']){
305
307
  this.menuList = this.searchScope;
306
- this.keyword = "搜索关键字";
307
308
  this.isPreview = true;
308
309
  }
309
310
  },
@@ -312,6 +313,7 @@
312
313
  },
313
314
  handleToSearch(item){
314
315
  this.keyword = item;
316
+ jfbRootFnExec(this, 'onCustomEvent')("baseTfkSearch@keyword", item);
315
317
  },
316
318
  onJfbScroll(options) {
317
319
  // console.log('event.onJfbScroll', options)