jufubao-base 1.0.146 → 1.0.148-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.
Files changed (27) hide show
  1. package/package.json +1 -1
  2. package/src/common/ICB.SDK.js +78 -0
  3. package/src/common/authorize.js +187 -33
  4. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +1 -1
  5. package/src/components/JfbBaseCard/JfbBaseCard.vue +10 -9
  6. package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2.vue +4 -2
  7. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +1 -3
  8. package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +3 -3
  9. package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +10 -5
  10. package/src/components/JfbBaseCardDisabledEntry/cardListMixins.js +15 -1
  11. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +5 -7
  12. package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +2 -1
  13. package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +1 -3
  14. package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +1 -3
  15. package/src/components/JfbBaseEntry/JfbBaseEntry.vue +12 -4
  16. package/src/components/JfbBaseLogin/Api.js +12 -0
  17. package/src/components/JfbBaseLogin/Attr.js +13 -1
  18. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +95 -40
  19. package/src/components/JfbBaseNoticeBottom/JfbBaseNoticeBottom.vue +1 -34
  20. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +6 -6
  21. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +8 -3
  22. package/src/components/JfbBasePay/JfbBasePay.vue +7 -17
  23. package/src/components/JfbBasePosterType/JfbBasePosterType.vue +1 -1
  24. package/src/components/JfbBaseSearch/JfbBaseSearch.vue +11 -1
  25. package/src/components/JfbBaseWxAuthorize/Api.js +13 -0
  26. package/src/components/JfbBaseWxAuthorize/Attr.js +20 -0
  27. package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +60 -5
@@ -100,10 +100,7 @@
100
100
  <view class="remain_pay" v-if="payInfo.channel_amount > 0">
101
101
  <view style="border-bottom: 2rpx solid #eee;" class="column-group">
102
102
  <view class="column-item" style="padding: 30rpx 60rpx">
103
- <view class="column_label">
104
- 仍需支付
105
- <view class="label_sub">(可使用多张票券支付)</view>
106
- </view>
103
+ <view class="column_label">仍需支付<text class="label_sub">(可使用多张票券支付)</text></view>
107
104
  <view class="column_value text-primary">
108
105
  <xd-unit
109
106
  :price="payInfo.channel_amount"
@@ -135,31 +132,25 @@
135
132
  class="pay_item"
136
133
  >
137
134
  <view class="icon">
138
- <xd-font-icon
139
- v-if="item.channel_code == 'wxpay'"
140
- icon="iconwx"
141
- size="64"
142
- color="#25bc46"
143
- ></xd-font-icon>
135
+ <image mode="scaleToFill" :src="item['channel_logo']" style="height:64rpx; width: 64rpx" />
144
136
  </view>
145
137
  <view class="pay_name">{{ item.channel_provider_name }}</view>
146
138
  <xd-radio
147
139
  @change="(flat) => handlerPayCheck(item.channel_provider_id, flat)"
148
- :value="channel_provider_id == item.channel_provider_id"
140
+ :value="channel_provider_id === item.channel_provider_id"
149
141
  size="mini"
150
142
  ></xd-radio>
151
143
  </view>
152
144
  </view>
153
145
  </view>
154
146
  <view class="bottom_btn-mask"></view>
155
- <view v-if="is_can_pay=='Y'" class="bottom_btn" :style="prod_bottom">
147
+ <view v-if="is_can_pay==='Y'" class="bottom_btn" :style="prod_bottom">
156
148
  <xd-button
157
149
  width="360rpx"
158
150
  type="primary"
159
151
  radius="50rpx"
160
152
  @click="doThirdPay"
161
- >确认支付</xd-button
162
- >
153
+ >确认支付</xd-button>
163
154
  </view>
164
155
  </view>
165
156
  </view>
@@ -336,7 +327,6 @@ export default {
336
327
  item["end_time"] = this.getTimeFormat(item.end_time);
337
328
  return item;
338
329
  });
339
- //this.cardList = [...this.cardList,...this.cardList,...this.cardList,...this.cardList,...this.cardList]
340
330
  });
341
331
  },
342
332
  p_getListUserPayChannel() {
@@ -590,7 +580,7 @@ export default {
590
580
  .remain_header {
591
581
  display: flex;
592
582
  justify-content: space-between;
593
- padding: 16rpx 60rpx 0;
583
+ padding: 30rpx 60rpx 0;
594
584
  color: #999999;
595
585
  font-size: 24rpx;
596
586
  }
@@ -607,8 +597,8 @@ export default {
607
597
  width: 64rpx;
608
598
  height: 64rpx;
609
599
  border-radius: 32rpx;
610
- // background: #DDD;
611
600
  margin-right: 30rpx;
601
+ overflow: hidden;
612
602
  }
613
603
  .pay_name {
614
604
  flex: 1;
@@ -23,7 +23,7 @@
23
23
  borderRadius: bgRadius + 'rpx'
24
24
  }"
25
25
  >
26
- <four-screen :config="getConfig" :content="info"></four-screen>
26
+ <four-screen style="width: 100%;" :config="getConfig" :content="info"></four-screen>
27
27
  </view>
28
28
 
29
29
  </view>
@@ -17,16 +17,24 @@
17
17
  </view>
18
18
  <!-- #endif -->
19
19
  <view class="jfb-base-search__body" :style="{height:layoutInfo.bodyMinHeightRpx+'rpx'}" v-if="layoutInfo!==null">
20
+ <!--#ifdef H5-->
20
21
  <xd-baidu-search
21
22
  @onSelect="handleSelect"
22
23
  ></xd-baidu-search>
24
+ <!-- #endif -->
25
+
26
+ <!-- #ifdef MP-WEIXIN -->
27
+ base Search
28
+ <!-- #endif -->
23
29
  </view>
24
30
  </view>
25
31
  </template>
26
32
 
27
33
  <script>
28
34
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
35
+ // #ifdef H5
29
36
  import XdBaiduSearch from "./XdBaiduSearch";
37
+ // #endif
30
38
  import {jfbRootExec} from "@/utils/xd.event";
31
39
  import JfbBaseSearchMixin from "./JfbBaseSearchMixin";
32
40
  import componentsMixins from "@/mixins/componentsMixins";
@@ -37,7 +45,9 @@
37
45
  name: "JfbBaseSearch",
38
46
  components: {
39
47
  XdFontIcon,
40
- XdBaiduSearch
48
+ // #ifdef H5
49
+ XdBaiduSearch,
50
+ // #endif
41
51
  },
42
52
  mixins: [componentsMixins,extsMixins,JfbBaseSearchMixin],
43
53
  data() {
@@ -18,6 +18,19 @@ module.exports = [
18
18
  isConsole: true,
19
19
  disable: true,
20
20
  },
21
+ {
22
+ mapFnName: 'userPhoneCollect',
23
+ title: "收集手机号",
24
+ path: "/passport/v1/user/collect-phone-number",
25
+ isRule: false,
26
+ data: {
27
+ phone_number: ['手机号', 'String', null], //手机号
28
+ verification_code: ['手机验证码', 'String', null],
29
+ provider_id: ['登录方式id', 'Number', '必选'],
30
+ },
31
+ isConsole: true,
32
+ disable: true,
33
+ },
21
34
  {
22
35
  mapFnName: "getContentInfo",
23
36
  title: "获取内容列表",
@@ -19,6 +19,26 @@ export default {
19
19
  placeholder: '请选择文字颜色',
20
20
  classNmae: 'input80',
21
21
  },
22
+ {
23
+ abel: '授权收集手机号按钮文案:',
24
+ ele: 'el-input',
25
+ type: 'text',
26
+ valueKey: 'btnCollectPhoneText',
27
+ groupKey:'content',
28
+ value: data.btnCollectPhoneText || "授权手机号",
29
+ placeholder: '请输入授权收集手机号按钮文案',
30
+ className: 'input80',
31
+ },
32
+ {
33
+ abel: '授权登录按钮文案:',
34
+ ele: 'el-input',
35
+ type: 'text',
36
+ valueKey: 'btnLoginText',
37
+ groupKey:'content',
38
+ value: data.btnLoginText || "微信授权登录",
39
+ placeholder: '请输入授权按钮文案',
40
+ className: 'input80',
41
+ },
22
42
  {
23
43
  label: '授权按钮下面文案:',
24
44
  ele: 'el-input',
@@ -24,6 +24,7 @@
24
24
  }"
25
25
  >
26
26
  </view>
27
+ <view v-if="!auth_code" class="app-body__jump" @click="doJump">跳过</view>
27
28
  <view class="app-body__bottom">
28
29
  <view class="app-body__bottom-btn">
29
30
  <button
@@ -35,7 +36,7 @@
35
36
  boxShadow: '0 5rpx 10rpx ' + mainColor
36
37
  }"
37
38
  @getphonenumber="decryptPhoneNumber"
38
- >微信授权登录</button>
39
+ >{{ authBtnText }}</button>
39
40
  <button
40
41
  v-else
41
42
  @click="decryptPhoneNumber()"
@@ -43,7 +44,7 @@
43
44
  background: mainColor,
44
45
  boxShadow: '0 5rpx 10rpx ' + mainColor
45
46
  }"
46
- >微信授权登录</button>
47
+ >{{ authBtnText }}</button>
47
48
  </view>
48
49
  <view class="app-body__bottom-tips" v-if="notice" v-html="notice" :style="{color: textColor}"></view>
49
50
  <view class="app-body__bottom-policy">
@@ -87,7 +88,7 @@
87
88
  return {
88
89
  isPreview: false,
89
90
  selectPolicy: false,
90
- auth_code: null,
91
+ auth_code: null, //有值说明未关联
91
92
  provider_id:null,
92
93
  nextUrl: null,
93
94
  showDialog: false,
@@ -98,11 +99,16 @@
98
99
  //面板
99
100
  bgImage: '', //背景图片
100
101
  notice: '', //授权按钮下面文案
101
- textColor: '#fff'
102
+ textColor: '#fff',
103
+ btnLoginText: "", //授权按钮文案
104
+ btnCollectPhoneText: "", //授权收集手机号按钮文案
102
105
  }
103
106
  },
104
107
  computed:{
105
108
  ...mapState(['jfbAuthorize']),
109
+ authBtnText(){
110
+ return this.auth_code ? this.btnLoginText : this.btnCollectPhoneText;
111
+ }
106
112
  },
107
113
  watch: {
108
114
  container(value) {
@@ -127,6 +133,14 @@
127
133
  this.selectPolicy = !this.selectPolicy;
128
134
  },
129
135
 
136
+ doJump(){
137
+ if(!this.auth_code){
138
+ this.$xdUniHelper.redirectTo({
139
+ url: this.nextUrl
140
+ })
141
+ }
142
+ },
143
+
130
144
  decryptPhoneNumber(e) {
131
145
  if (e === undefined) {
132
146
  this.$xdConfirm({
@@ -146,6 +160,18 @@
146
160
  let {iv, encryptedData} = e.detail;
147
161
  let raw_data = JSON.stringify({iv, encryptedData});
148
162
 
163
+ //auth_code 临时授权码,走授权登录。 否则走授权收集手机号
164
+ if(this.auth_code){
165
+ this.p_userPhoneWxLogin(raw_data)
166
+ }else{
167
+ this.p_userPhoneCollect(raw_data)
168
+ }
169
+ },
170
+
171
+ /**
172
+ * @description 授权登录
173
+ */
174
+ p_userPhoneWxLogin(raw_data){
149
175
  jfbRootExec("userPhoneWxLogin", {
150
176
  vm: this,
151
177
  data: {
@@ -183,9 +209,30 @@
183
209
  zIndex: this.isPreview ? 2000 : 1400
184
210
  });
185
211
  })
186
-
187
212
  },
188
213
 
214
+ /**
215
+ * @description 授权收集手机号
216
+ */
217
+ p_userPhoneCollect(raw_data){
218
+ uni.login({
219
+ provider: "weixin",
220
+ success: (loginRes) => {
221
+ jfbRootExec("userPhoneCollect", {
222
+ vm: this,
223
+ data: {
224
+ raw_data,
225
+ third_auth_code: loginRes.code,
226
+ provider_id: this.provider_id,
227
+ }
228
+ }).then(res => {
229
+ this.$xdUniHelper.redirectTo({
230
+ url: this.nextUrl
231
+ })
232
+ })
233
+ }
234
+ })
235
+ },
189
236
 
190
237
  /**
191
238
  * @description 监听事件变化
@@ -195,6 +242,8 @@
195
242
  let bgImage = getContainerPropsValue(container, 'content.bgImage', {});
196
243
  if(bgImage.url) this.bgImage = getServiceUrl(bgImage.url);
197
244
  this.notice = getContainerPropsValue(container, 'content.notice', '');
245
+ this.btnLoginText = getContainerPropsValue(container, 'content.btnLoginText', '微信授权登录');
246
+ this.btnCollectPhoneText = getContainerPropsValue(container, 'content.btnCollectPhoneText', '获取手机号');
198
247
  this.textColor = getContainerPropsValue(container, 'content.textColor', '#fff');
199
248
  },
200
249
 
@@ -242,6 +291,12 @@
242
291
 
243
292
  }
244
293
 
294
+ &__jump {
295
+ position: absolute;
296
+ top: 40rpx;
297
+ right: 40rpx;
298
+ }
299
+
245
300
  &__bottom {
246
301
  position: absolute;
247
302
  bottom: unit(80, rpx);