jufubao-base 1.0.136 → 1.0.137-beta1

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.136",
3
+ "version": "1.0.137-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -14,21 +14,22 @@
14
14
  </view>
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-wallet__body">
17
- <view class="jfb-base-wallet__body-title">我的账户</view>
18
- <view class="jfb-base-wallet__body-type">
19
- <view
20
- :style="{
21
- marginRight: index === showType.length - 1 ? '0' : '36rpx',
22
- }"
23
- v-for="(item, index) in showType"
24
- @click="handleJumpTo(item)"
25
- :key="index"
26
- class="jfb-base-wallet__body-type-item"
27
- >
28
- <XdFontIcon :icon="item.icon"></XdFontIcon>
29
- <view>{{ item.label }}</view>
17
+ <template v-if="showContent">
18
+ <view class="jfb-base-wallet__body-title">我的账户</view>
19
+ <view class="jfb-base-wallet__body-type" v-if="showType.length > 0">
20
+ <view
21
+ :style="{marginRight: index === showType.length - 1 ? '0' : '36rpx',}"
22
+ v-for="(item, index) in showType"
23
+ @click="handleJumpTo(item)"
24
+ :key="index"
25
+ class="jfb-base-wallet__body-type-item"
26
+ >
27
+ <XdFontIcon :icon="item.icon"></XdFontIcon>
28
+ <view>{{ item.label }}</view>
29
+ </view>
30
30
  </view>
31
- </view>
31
+ <view v-else class="jfb-base-wallet__body-type notice" :style="{backgroundColor:backgroundColor, color:warningColor}">我的账户无配置数据,在正式环境将不显示改模块</view>
32
+ </template>
32
33
  </view>
33
34
  </view>
34
35
  </template>
@@ -40,6 +41,7 @@ import JfbBaseWalletMixin from "./JfbBaseWalletMixin";
40
41
  import { getContainerPropsValue } from "@/utils/xd.base";
41
42
  import componentsMixins from "@/mixins/componentsMixins";
42
43
  import extsMixins from "@/mixins/extsMixins";
44
+ import Color from "color";
43
45
  export default {
44
46
  name: "JfbBaseWallet",
45
47
  components: {
@@ -55,7 +57,7 @@ export default {
55
57
  value: "card",
56
58
  },
57
59
  {
58
- icon: "iconyuanbao",
60
+ icon: "iconyuanbao",
59
61
  label: "元宝",
60
62
  value: "wallet",
61
63
  },
@@ -73,6 +75,9 @@ export default {
73
75
  cardPath: "",
74
76
  yuanbaoPath: "",
75
77
  integralPath: "",
78
+
79
+
80
+ backgroundColor: '',
76
81
  };
77
82
  },
78
83
  watch: {
@@ -160,7 +165,6 @@ export default {
160
165
  showType() {
161
166
  this.typeList.forEach((item1, index) => {
162
167
  const item2 = this.newLabel.find((item) => item.value === item1.value);
163
-
164
168
  if (item2) {
165
169
  item1.label = item2.newLabel || item1.label;
166
170
  item1.sort = item2.sort;
@@ -169,21 +173,21 @@ export default {
169
173
  this.typeList.sort((a, b) => a.sort - b.sort);
170
174
  return this.typeList;
171
175
  },
176
+ showContent(){
177
+ if(this.$configProject.isPreview) return true;
178
+ return this.showType.length > 0;
179
+ }
172
180
  },
173
181
  created() {
182
+ this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
174
183
  this.init(this.container);
175
184
  this.isPreview = this.$configProject.isPreview;
176
-
177
- //todo
178
185
  },
179
186
  methods: {
180
187
  onJfbLoad(options) {
181
- // jfbRootExec('baiduUserLogin', {
182
- // vm: this,// data: {
183
- // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
184
- // }
185
- // }).then().catch()
188
+
186
189
  },
190
+
187
191
  /**
188
192
  * @description 监听事件变化
189
193
  * @param container {object} 业务组件对象自己
@@ -242,27 +246,6 @@ export default {
242
246
  break;
243
247
  }
244
248
  },
245
- onJfbScroll(options) {
246
- console.log("event.onJfbScroll", options);
247
- },
248
- onJfbReachBottom(options) {
249
- console.log("event.onJfbReachBottom", options);
250
- },
251
- onJfbShow(options) {
252
- console.log("event.onJfbShow", options);
253
- },
254
- onJfbHide(options) {
255
- console.log("event.onJfbHide", options);
256
- },
257
- onJfbBack(options) {
258
- console.log("event.onJfbBack", options);
259
- },
260
- onJfbUpdate(...data) {
261
- console.log("event.onJfbUpdate", data);
262
- },
263
- onJfbCustomEvent(options) {
264
- console.log("event.onJfbReachBottom", options);
265
- },
266
249
  },
267
250
  };
268
251
  </script>
@@ -283,6 +266,10 @@ export default {
283
266
  padding: 32rpx 48rpx 32rpx 48rpx;
284
267
  margin: 0 20rpx 0;
285
268
 
269
+ &.notice {
270
+ font-size: 26rpx;
271
+ }
272
+
286
273
  &-item {
287
274
  color: #999999;
288
275
  flex: 1;