jufubao-base 1.0.120 → 1.0.121

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.120",
3
+ "version": "1.0.121",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -14,96 +14,110 @@
14
14
  </view>
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-con-phone__body" v-if="done">
17
- <view
18
- v-if="has_times === 'Y'"
19
- class="jfb-base-con-phone__body-wrap"
20
- :style="{
21
- height: layoutInfo.bodyMinHeightRpx + 'rpx',
22
- backgroundImage: `url(${background})`,
23
- backgroundSize: '100% 100%',
24
- }"
25
- >
26
- <view v-if="showCode" class="jfb-base-con-phone__body-wrap-input">
27
- <view>
28
- <input
29
- @input="filterSpaces"
30
- v-model="phoneNumber"
31
- placeholder="请输入手机号"
32
- type="text"
33
- />
34
- </view>
35
- <view
36
- class="jfb-base-con-phone__body-wrap-input-code"
37
- style="margin-bottom: 54rpx"
38
- >
39
- <input
40
- v-model="valid_code"
41
- placeholder="请输入验证码"
42
- type="text"
43
- />
44
- <XdButton
45
- :disabled="disabled"
46
- class="jfb-base-con-phone__body-wrap-input-code-btn"
47
- type="primary"
48
- :bg-color="mainColor"
49
- size="small"
50
- @click="handleSendCode"
51
- >{{ message }}</XdButton
17
+ <view v-if="has_times === 'Y'">
18
+ <view
19
+ class="jfb-base-con-phone__body-wrap"
20
+ :style="{
21
+ height: topHeight + 'rpx',
22
+ width: topWidth + 'rpx',
23
+ backgroundImage: `url(${background})`,
24
+ backgroundSize: '100% 100%',
25
+ }"
26
+ >
27
+ <view v-if="showCode" class="jfb-base-con-phone__body-wrap-input">
28
+ <view>
29
+ <input
30
+ @input="filterSpaces"
31
+ v-model="phoneNumber"
32
+ placeholder="请输入手机号"
33
+ type="text"
34
+ />
35
+ </view>
36
+ <view
37
+ class="jfb-base-con-phone__body-wrap-input-code"
38
+ style="margin-bottom: 54rpx"
52
39
  >
53
- </view>
54
- <XdButton
55
- type="primary"
56
- :bg-color="mainColor"
57
- width="360rpx"
58
- radius="20rpx"
59
- size="small"
60
- :disabled="!phoneNumber || !valid_code"
61
- @click="handleConfirm"
62
- >确认领取</XdButton
63
- >
64
- </view>
65
- <view v-else class="jfb-base-con-phone__body-wrap-input">
66
- <view class="jfb-base-con-phone__body-wrap-input-phone">
67
- <view class="jfb-base-con-phone__body-wrap-input-phone-change">
68
- <view>当前登录手机号</view>
40
+ <input
41
+ v-model="valid_code"
42
+ placeholder="请输入验证码"
43
+ type="text"
44
+ />
69
45
  <XdButton
70
- style="margin: 0"
46
+ :disabled="disabled"
47
+ class="jfb-base-con-phone__body-wrap-input-code-btn"
71
48
  type="primary"
72
49
  :bg-color="mainColor"
73
50
  size="small"
74
- @click="showCode = true"
75
- >切换手机号</XdButton
51
+ @click="handleSendCode"
52
+ >{{ message }}</XdButton
76
53
  >
77
54
  </view>
78
- <view>{{ showOhoneNumber }}</view>
55
+ <XdButton
56
+ type="primary"
57
+ :bg-color="mainColor"
58
+ width="360rpx"
59
+ radius="20rpx"
60
+ size="small"
61
+ :disabled="!phoneNumber || !valid_code"
62
+ @click="handleConfirm"
63
+ >确认领取</XdButton
64
+ >
65
+ </view>
66
+ <view v-else class="jfb-base-con-phone__body-wrap-input">
67
+ <view class="jfb-base-con-phone__body-wrap-input-phone">
68
+ <view class="jfb-base-con-phone__body-wrap-input-phone-change">
69
+ <view>当前登录手机号</view>
70
+ <XdButton
71
+ style="margin: 0"
72
+ type="primary"
73
+ :bg-color="mainColor"
74
+ size="small"
75
+ @click="showCode = true"
76
+ >切换手机号</XdButton
77
+ >
78
+ </view>
79
+ <view>{{ showOhoneNumber }}</view>
80
+ </view>
81
+ <XdButton
82
+ type="primary"
83
+ :bg-color="mainColor"
84
+ width="360rpx"
85
+ radius="20rpx"
86
+ size="small"
87
+ @click="handleConfirm"
88
+ >直接领取</XdButton
89
+ >
79
90
  </view>
80
- <XdButton
81
- type="primary"
82
- :bg-color="mainColor"
83
- width="360rpx"
84
- radius="20rpx"
85
- size="small"
86
- @click="handleConfirm"
87
- >直接领取</XdButton
88
- >
89
91
  </view>
90
- <view v-if="showBtn === 'Y'" class="jfb-base-con-phone__body-wrap-btn">
91
- <XdButton
92
- size="small"
93
- type="primary"
94
- :bg-color="mainColor"
95
- radius="20rpx"
96
- @click="handleTo(btnOneUrl)"
97
- >{{ btnOneName }}</XdButton
98
- >
99
- <XdButton
100
- size="small"
101
- type="primary"
102
- :bg-color="mainColor"
103
- radius="20rpx"
104
- @click="handleTo(btnTwoUrl)"
105
- >{{ btnTwoName }}</XdButton
92
+ <view
93
+ :style="{
94
+ height: bottomHeight + 'rpx',
95
+ width: bottomWidth + 'rpx',
96
+ backgroundImage: `url(${used_background})`,
97
+ backgroundSize: '100% 100%',
98
+ }"
99
+ >
100
+ <view
101
+ v-if="showBtn === 'Y'"
102
+ class="jfb-base-con-phone__body-wrap-btn"
106
103
  >
104
+ <XdButton
105
+ size="small"
106
+ type="primary"
107
+ :bg-color="mainColor"
108
+ radius="20rpx"
109
+ @click="handleTo(btnOneUrl)"
110
+ >{{ btnOneName }}</XdButton
111
+ >
112
+ <XdButton
113
+ size="small"
114
+ type="primary"
115
+ :bg-color="mainColor"
116
+ radius="20rpx"
117
+ @click="handleTo(btnTwoUrl)"
118
+ >{{ btnTwoName }}</XdButton
119
+ >
120
+ </view>
107
121
  </view>
108
122
  </view>
109
123
  <view
@@ -125,7 +139,7 @@ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
125
139
  import XdButton from "@/components/XdButton/XdButton";
126
140
  import { jfbRootExec } from "@/utils/xd.event";
127
141
  import JfbBaseConPhoneMixin from "./JfbBaseConPhoneMixin";
128
- import { getContainerPropsValue } from "@/utils/xd.base";
142
+ import { getContainerPropsValue, getImageInfo } from "@/utils/xd.base";
129
143
  import componentsMixins from "@/mixins/componentsMixins";
130
144
  import extsMixins from "@/mixins/extsMixins";
131
145
  import { mapState } from "vuex";
@@ -171,6 +185,12 @@ export default {
171
185
  date: 2, //时间底数
172
186
  time: 0, //时间幂指数
173
187
  timeer: null,
188
+ topHeight: "",
189
+ topWidth: "750",
190
+ used_background: "",
191
+ bottomHeight: "",
192
+ bottomWidth: "750",
193
+ showBtn: "N",
174
194
  };
175
195
  },
176
196
  watch: {
@@ -234,7 +254,7 @@ export default {
234
254
  activity_id: this.activity_id,
235
255
  },
236
256
  })
237
- .then((res) => {
257
+ .then(async (res) => {
238
258
  console.log(res, "res");
239
259
  this.has_times = res.has_times;
240
260
  this.showBtn = res.phone_button;
@@ -242,7 +262,15 @@ export default {
242
262
  this.btnTwoName = res.button_name_two;
243
263
  this.btnOneUrl = res.button_url_one;
244
264
  this.btnTwoUrl = res.button_url_two;
265
+ let image = await getImageInfo(getServiceUrl(res.background));
266
+ let image1 = await getImageInfo(getServiceUrl(res.used_background));
267
+ console.log({ ...image }, "imageimage");
268
+ this.topHeight = image.imgHeight / this.$rpxNum;
269
+ this.topWidth = '100%';
270
+ this.bottomHeight = image1.imgHeight / this.$rpxNum;
271
+ this.bottomWidth = '100%';
245
272
  this.background = getServiceUrl(res.background);
273
+ this.used_background = getServiceUrl(res.used_background);
246
274
  this.errmessage = res.message;
247
275
  this.done = true;
248
276
  })
@@ -451,13 +479,15 @@ export default {
451
479
  }
452
480
  &-wrap {
453
481
  display: flex;
454
- justify-content: center;
482
+ justify-content: flex-end;
455
483
  align-items: center;
456
484
  flex-direction: column;
457
485
  &-input {
458
486
  border-radius: 40rpx;
459
487
  background: rgba(255, 255, 255, 0.5);
460
488
  padding: 70rpx 60rpx;
489
+ position: relative;
490
+ bottom: 120rpx;
461
491
  input {
462
492
  margin-bottom: 26rpx;
463
493
  font-size: 28rpx;
@@ -504,8 +534,8 @@ export default {
504
534
  display: flex;
505
535
  justify-content: space-around;
506
536
  align-items: center;
507
- width: 100%;
508
- margin-top: 64rpx;
537
+ width: 750rpx;
538
+ padding-top: 40rpx;
509
539
  }
510
540
  }
511
541
  }
@@ -12,7 +12,7 @@
12
12
  */
13
13
  module.exports = [
14
14
  {
15
- mapFnName: 'getUserInfo',
15
+ mapFnName: 'getBaseUserInfo',
16
16
  title: '获取用户信息',
17
17
  path: '/passport/v1/user/get',
18
18
  params: {},
@@ -21,7 +21,7 @@ module.exports = [
21
21
  disabled: true,
22
22
  },
23
23
  {
24
- mapFnName: 'getCardUserSetting',
24
+ mapFnName: 'getBaseCardUserSetting',
25
25
  title: '获取用户卡券配置',
26
26
  path: '/card/v1/card-bind/get-card-user-setting',
27
27
  params: {},
@@ -8,10 +8,11 @@ export default {
8
8
  content: (data) => {
9
9
  return [
10
10
  {
11
- label: '绑定手机号地址:', //label
12
- ele: 'xd-select-pages-path', //package 名称
13
- valueKey: 'bind_phone_url', //form[valueKey]
14
- value: data['bind_phone_url'] || {},
11
+ label: '绑定手机号地址:',
12
+ ele: 'xd-select-pages-path',
13
+ valueKey: 'bind_phone_url',
14
+ value: data['bind_phone_url'] || null,
15
+ //groupKey:'advanced',
15
16
  setting: {
16
17
  router: XdBus.getParentApi('getPagesTree')
17
18
  },
@@ -22,6 +22,7 @@
22
22
  style="margin-bottom: 8rpx;"
23
23
  @click="handleToShowSwitch"
24
24
  >
25
+
25
26
  <view v-if="!showSwitch">去配置</view>
26
27
  <view v-else class="switch_wrap">
27
28
  <view :style="{
@@ -91,8 +92,6 @@
91
92
  },
92
93
  created() {
93
94
  this.init(this.container);
94
-
95
- //todo
96
95
  },
97
96
  methods: {
98
97
  onJfbLoad(options) {
@@ -131,7 +130,7 @@
131
130
  })
132
131
  },
133
132
  p_getUserInfo(){
134
- jfbRootExec("getUserInfo", {
133
+ jfbRootExec("getBaseUserInfo", {
135
134
  vm: this,
136
135
  data: {
137
136
 
@@ -146,7 +145,7 @@
146
145
  })
147
146
  },
148
147
  getCardConfig(){
149
- jfbRootExec("getCardUserSetting", {
148
+ jfbRootExec("getBaseCardUserSetting", {
150
149
  vm: this,
151
150
  data: {}
152
151
  }).then(res => {
@@ -173,27 +172,6 @@
173
172
  })
174
173
  }
175
174
  },
176
- onJfbScroll(options) {
177
- console.log('event.onJfbScroll', options)
178
- },
179
- onJfbReachBottom(options) {
180
- console.log('event.onJfbReachBottom', options)
181
- },
182
- onJfbShow(options) {
183
- console.log('event.onJfbShow', options)
184
- },
185
- onJfbHide(options) {
186
- console.log('event.onJfbHide', options)
187
- },
188
- onJfbBack(options) {
189
- console.log('event.onJfbBack', options)
190
- },
191
- onJfbUpdate(...data) {
192
- console.log('event.onJfbUpdate', data)
193
- },
194
- onJfbCustomEvent(options) {
195
- console.log('event.onJfbReachBottom', options)
196
- },
197
175
  }
198
176
  }
199
177
 
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- aaaa: {}
4
+ getBaseUserInfo: {"user_name":"","user_code":"pK60goP5om","nickname":"braveboy","real_name":"","head_url":"https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/DYAIOgq83epC3zrUbrbh1n7JAiaws8JKK0zk6Q91FNH10ticgWoVENlwnZPfdyxTicEqBnjnwd7RzJmQwicfQG0D1A\/132","province_code":"","city_code":"","province_name":"","city_name":"","sex":"","sex_name":"未知","birthday_date":"","phone_number":"151****8397","show_user_name":"braveboy","request_id":"863a1276dc972043"},
5
+ getBaseCardUserSetting:{"user_id":0,"is_entity_card_invalid":"","request_id":"8ddfd81488f33522"}
5
6
  }