jufubao-base 1.0.24 → 1.0.26

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.24",
3
+ "version": "1.0.26",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -242,13 +242,20 @@
242
242
  },
243
243
  p_getListProviders(){
244
244
  let providers = this.projectAttr.login_providers || '62fde99f2583a19c58fd937b,62fde9432583a19c58fd937a';
245
+ let {redirect_url, callback_url} = this;
246
+ try{
247
+ let redirectURL = new URL(decodeURIComponent(redirect_url));
248
+ redirect_url = redirectURL.href;
249
+ }catch(e){
250
+ redirect_url = location.origin + redirect_url;
251
+ }
245
252
  jfbRootExec("listSiteProvider", {
246
253
  vm: this,
247
254
  data: {
248
255
  providers: providers,
249
- callback_url: this.callback_url,
250
- phone_number_login_url: this.phone_number_login_url,
251
- phone_number_collect_url: this.phone_number_collect_url
256
+ callback_url: redirect_url || (location.origin + this.settings.index),
257
+ phone_number_login_url: location.origin + this.phone_number_login_url,
258
+ phone_number_collect_url: location.origin + this.phone_number_collect_url
252
259
  }
253
260
  }).then(res => {
254
261
  if(res.quick_enabled){
@@ -271,6 +278,13 @@
271
278
  reGetCode(){
272
279
  if(this.time > 0) return;
273
280
  const { phone_number } = this.accountForm;
281
+ if(!/^1[3-9]\d{9}$/.test(phone_number)){
282
+ uni.showToast({
283
+ title: "请填写正确的手机号",
284
+ icon: 'none'
285
+ });
286
+ return false;
287
+ }
274
288
 
275
289
  console.log("jfbRootExec: sendMsg");
276
290
  jfbRootExec('sendMsg', {
@@ -335,6 +349,17 @@
335
349
  doLoginForm(){
336
350
  const { accountLoginType } = this;
337
351
  const { phone_number, verification_code, password } = this.accountForm;
352
+ let err_tip = "";
353
+ if(!phone_number) err_tip = "手机号不能为空";
354
+ else if(accountLoginType == "phone" && !verification_code) err_tip = "验证码不能为空";
355
+ else if(accountLoginType == "pwd" && !password) err_tip = "密码不能为空";
356
+ if(err_tip){
357
+ return uni.showToast({
358
+ title: err_tip,
359
+ icon: 'none'
360
+ })
361
+ }
362
+
338
363
  if(accountLoginType == "phone"){
339
364
  //表单接口登录
340
365
  jfbRootExec('phoneLogin', {
@@ -12,11 +12,9 @@ export default {
12
12
  value: '', //v-model
13
13
  placeholder: '请输入客服电话号码',
14
14
  classNmae: 'input40', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
15
- disabled: true,
16
15
  rules: [
17
16
  {
18
17
  required: true,
19
- type: 'url',
20
18
  message: '请输入客服电话号码',
21
19
  trigger: 'blur'
22
20
  },
@@ -22,7 +22,7 @@
22
22
  <view style="font-size:26rpx;color: #A6A6A6;">为了您的账号安全,请先验证手机号</view>
23
23
  </view>
24
24
  <xd-form
25
- label-width="120"
25
+ label-width="126"
26
26
  style="margin-top: 40rpx;"
27
27
  label-align="right"
28
28
  content-align="left"
@@ -79,10 +79,19 @@
79
79
  import { jfbRootExec } from "@/utils/xd.event";
80
80
  import JfbBaseLoginForgetPwdMixin from "./JfbBaseLoginForgetPwdMixin";
81
81
  import { getContainerPropsValue } from "@/utils/xd.base";
82
+ import XdFormItem from "@/components/XdFormItem/XdFormItem";
83
+ import XdForm from "@/components/XdForm/XdForm";
84
+ import XdFormInput from "@/components/XdFormInput/XdFormInput";
85
+ import XdButton from "@/components/XdButton/XdButton";
86
+
82
87
  export default {
83
88
  name: "JfbBaseLoginForgetPwd",
84
89
  components: {
85
- XdFontIcon
90
+ XdFontIcon,
91
+ XdFormItem,
92
+ XdForm,
93
+ XdFormInput,
94
+ XdButton
86
95
  },
87
96
  mixins: [
88
97
  JfbBaseLoginForgetPwdMixin
@@ -127,12 +136,19 @@
127
136
  reGetCode(){
128
137
  if(this.time > 0) return;
129
138
  const { phone_number } = this.resetForm;
139
+ if(!/^1[3-9]\d{9}$/.test(phone_number)){
140
+ uni.showToast({
141
+ title: "请填写正确的手机号",
142
+ icon: 'none'
143
+ });
144
+ return false;
145
+ }
130
146
 
131
147
  jfbRootExec('sendMsg', {
132
148
  vm: this,
133
149
  data: {
134
150
  phone_number,
135
- biz_name: "login" //todo
151
+ biz_name: "passport-password"
136
152
  }
137
153
  }).then(res => {
138
154
  this.time = 120;
@@ -145,6 +161,13 @@
145
161
  })
146
162
  },
147
163
  toResetPassword(){
164
+ const { verification_code, phone_number } = this.resetForm;
165
+ if(!verification_code || !phone_number){
166
+ return uni.showToast({
167
+ title: "填写手机号跟验证码",
168
+ icon: 'none'
169
+ })
170
+ }
148
171
  jfbRootExec("verifyPhoneCode", {
149
172
  vm: this,
150
173
  data: this.resetForm
@@ -166,9 +189,9 @@
166
189
  // onJfbHide(options) {
167
190
  // console.log('event.onJfbHide', options)
168
191
  // },
169
- // onJfbBack(options) {
170
- // console.log('event.onJfbBack', options)
171
- // },
192
+ onJfbBack(options) {
193
+ this.$xdUniHelper.navigateBack();
194
+ },
172
195
  }
173
196
  }
174
197
 
@@ -178,8 +201,59 @@
178
201
  @import "./JfbBaseLoginForgetPwdLess.less";
179
202
 
180
203
  .jfb-base-login-forget-pwd {
181
- &__body{
204
+ &__body {
205
+ .xd-form-checkbox {
206
+ /deep/ .checklist-content .checklist-text {
207
+ font-size: 26rpx !important;
208
+ }
209
+ }
182
210
 
211
+ .form-group {
212
+ padding: 20rpx 70rpx;
213
+ }
214
+
215
+ .get_code {
216
+ color: @xd-base-color;
217
+ font-size: 24rpx;
218
+ }
219
+ .panel-forget-password {
220
+ /deep/ .uni-forms-item__label {
221
+ .label-text {
222
+ font-size: 26rpx;
223
+ color: #A6A6A6;
224
+ }
225
+ }
226
+ /deep/ .uni-easyinput__placeholder-class {
227
+ font-size: 26rpx;
228
+ color: #D4D4D4;
229
+ }
230
+
231
+ .forget_tip {
232
+ box-sizing: border-box;
233
+ width: 600rpx;
234
+ border-radius: 10rpx;
235
+ box-shadow: 0px 0px 20px 0px #00000019;
236
+ padding: 64rpx 46rpx;
237
+ margin: 200rpx auto;
238
+ text-align: center;
239
+ font-size: 32rpx;
240
+
241
+ .contact_phone {
242
+ color: @xd-base-color;
243
+ font-size: 56rpx;
244
+ margin: 20rpx 0 30rpx;
245
+ }
246
+ }
247
+ }
183
248
  }
184
249
  }
250
+ .flex{
251
+ display: flex;
252
+ }
253
+ .flex-sub{
254
+ flex: 1;
255
+ }
256
+ .align-center{
257
+ align-items: center;
258
+ }
185
259
  </style>
@@ -14,7 +14,7 @@ module.exports = [
14
14
  {
15
15
  mapFnName: 'setPwd',
16
16
  title: '重新设置密码',
17
- path: '/passport/v1/user/set-password',//编的
17
+ path: '/passport/v1/user/update-password',
18
18
  isRule: false,
19
19
  data: {
20
20
  password: ['密码', 'String', '必选'],
@@ -27,7 +27,7 @@ module.exports = [
27
27
  {
28
28
  mapFnName: 'resetPwd',
29
29
  title: '重新设置密码',
30
- path: '/passport/v1/user/update-password',
30
+ path: '/passport/v1/user/forget-password',
31
31
  isRule: false,
32
32
  data: {
33
33
  password: ['密码', 'String', '必选'],
@@ -68,10 +68,20 @@
68
68
  import { jfbRootExec } from "@/utils/xd.event";
69
69
  import JfbBaseLoginSetPwdMixin from "./JfbBaseLoginSetPwdMixin";
70
70
  import { getContainerPropsValue } from "@/utils/xd.base";
71
+ import XdFormItem from "@/components/XdFormItem/XdFormItem";
72
+ import XdForm from "@/components/XdForm/XdForm";
73
+ import XdFormInput from "@/components/XdFormInput/XdFormInput";
74
+ import XdButton from "@/components/XdButton/XdButton";
75
+
76
+
71
77
  export default {
72
78
  name: "JfbBaseLoginSetPwd",
73
79
  components: {
74
- XdFontIcon
80
+ XdFontIcon,
81
+ XdFormItem,
82
+ XdForm,
83
+ XdFormInput,
84
+ XdButton
75
85
  },
76
86
  mixins: [
77
87
  JfbBaseLoginSetPwdMixin
@@ -120,6 +130,10 @@
120
130
  this.pwd_type = getContainerPropsValue(value, 'content.pwd_type');
121
131
  },
122
132
  doSetPassword(){
133
+ const { password, confirm_password } = this.resetForm;
134
+ if(!password || !confirm_password) return uni.showToast({title: "请输入密码",icon: 'none'});
135
+ if(password !== confirm_password) return uni.showToast({title: "密码不一致",icon: 'none'});
136
+
123
137
  let typeFn = "resetPwd"
124
138
  if(this.pwd_type == 1) typeFn = "setPwd"
125
139
  jfbRootExec(typeFn, {
@@ -131,20 +145,20 @@
131
145
  })
132
146
  })
133
147
  },
134
- onJfbScroll(options) {
135
- console.log('event.onJfbScroll', options)
136
- },
137
- onJfbReachBottom(options) {
138
- console.log('event.onJfbReachBottom', options)
139
- },
140
- onJfbShow(options) {
141
- console.log('event.onJfbShow', options)
142
- },
143
- onJfbHide(options) {
144
- console.log('event.onJfbHide', options)
145
- },
148
+ // onJfbScroll(options) {
149
+ // console.log('event.onJfbScroll', options)
150
+ // },
151
+ // onJfbReachBottom(options) {
152
+ // console.log('event.onJfbReachBottom', options)
153
+ // },
154
+ // onJfbShow(options) {
155
+ // console.log('event.onJfbShow', options)
156
+ // },
157
+ // onJfbHide(options) {
158
+ // console.log('event.onJfbHide', options)
159
+ // },
146
160
  onJfbBack(options) {
147
- console.log('event.onJfbBack', options)
161
+ this.$xdUniHelper.navigateBack();
148
162
  },
149
163
  }
150
164
  }
@@ -155,8 +169,30 @@
155
169
  @import "./JfbBaseLoginSetPwdLess.less";
156
170
 
157
171
  .jfb-base-login-set-pwd {
158
- &__body{
172
+ &__body {
173
+ .xd-form-checkbox {
174
+ /deep/ .checklist-content .checklist-text {
175
+ font-size: 26rpx !important;
176
+ }
177
+ }
178
+
179
+ .form-group {
180
+ padding: 20rpx 70rpx;
181
+ }
182
+ .panel-reset-password {
183
+ /deep/ .uni-forms-item__label {
184
+ width: 185rpx !important;
159
185
 
186
+ .label-text {
187
+ font-size: 26rpx;
188
+ color: #A6A6A6;
189
+ }
190
+ }
191
+ /deep/ .uni-easyinput__placeholder-class {
192
+ font-size: 26rpx;
193
+ color: #D4D4D4;
194
+ }
195
+ }
160
196
  }
161
197
  }
162
198
  </style>
@@ -81,10 +81,21 @@
81
81
  import { jfbRootExec } from "@/utils/xd.event";
82
82
  import JfbBasePhoneCollectMixin from "./JfbBasePhoneCollectMixin";
83
83
  import { getContainerPropsValue } from "@/utils/xd.base";
84
+ import XdFormItem from "@/components/XdFormItem/XdFormItem";
85
+ import XdForm from "@/components/XdForm/XdForm";
86
+ import XdFormInput from "@/components/XdFormInput/XdFormInput";
87
+ import XdButton from "@/components/XdButton/XdButton";
88
+ import XdFormCheckbox from "@/components/XdFormCheckbox/XdFormCheckbox"
89
+
84
90
  export default {
85
91
  name: "JfbBasePhoneCollect",
86
92
  components: {
87
- XdFontIcon
93
+ XdFontIcon,
94
+ XdFormItem,
95
+ XdForm,
96
+ XdFormInput,
97
+ XdButton,
98
+ XdFormCheckbox
88
99
  },
89
100
  mixins: [
90
101
  JfbBasePhoneCollectMixin
@@ -134,6 +145,13 @@
134
145
  reGetCode(){
135
146
  if(this.time > 0) return;
136
147
  const { phone_number } = this.accountForm;
148
+ if(!/^1[3-9]\d{9}$/.test(phone_number)){
149
+ uni.showToast({
150
+ title: "请填写正确的手机号",
151
+ icon: 'none'
152
+ });
153
+ return false;
154
+ }
137
155
 
138
156
  console.log("jfbRootExec: sendMsg");
139
157
  jfbRootExec('sendMsg', {
@@ -155,6 +173,8 @@
155
173
  doLoginForm(){
156
174
  const { provider_id } = this;
157
175
  const { phone_number, verification_code } = this.accountForm;
176
+ if(!phone_number || !verification_code) return uni.showToast({title: "手机号跟验证码不能为空",icon: 'none'});
177
+
158
178
  jfbRootExec('phoneCollect', {
159
179
  vm: this,
160
180
  data: {
@@ -182,9 +202,9 @@
182
202
  // onJfbHide(options) {
183
203
  // console.log('event.onJfbHide', options)
184
204
  // },
185
- // onJfbBack(options) {
186
- // console.log('event.onJfbBack', options)
187
- // },
205
+ onJfbBack(options) {
206
+ this.$xdUniHelper.navigateBack();
207
+ },
188
208
  }
189
209
  }
190
210
 
@@ -194,8 +214,60 @@
194
214
  @import "./JfbBasePhoneCollectLess.less";
195
215
 
196
216
  .jfb-base-phone-collect {
197
- &__body{
217
+ border: 1px dashed rgba(0, 0, 0, 0);
218
+ box-sizing: border-box;
219
+
220
+ &__body {
221
+ .xd-form-checkbox {
222
+ /deep/ .checklist-content .checklist-text {
223
+ font-size: 26rpx !important;
224
+ }
225
+ }
226
+
227
+ .form-group {
228
+ padding: 20rpx 70rpx;
229
+ }
230
+
231
+ .get_code {
232
+ color: @xd-base-color;
233
+ font-size: 24rpx;
234
+ }
235
+ .panel-login-password {
236
+
237
+ /deep/ .uni-forms-item__label {
238
+ .label-text {
239
+ font-size: 26rpx;
240
+ color: #A6A6A6;
241
+ }
242
+ }
198
243
 
244
+ /deep/ .uni-easyinput__placeholder-class {
245
+ font-size: 26rpx;
246
+ color: #D4D4D4;
247
+ }
248
+
249
+
250
+ .not_login {
251
+ position: fixed;
252
+ width: 100%;
253
+ text-align: center;
254
+ bottom: 100rpx;
255
+ font-size: 24rpx;
256
+ color: #FE7A63;
257
+ }
258
+ }
199
259
  }
200
260
  }
261
+
262
+ .flex {
263
+ display: flex;
264
+ }
265
+
266
+ .flex-sub {
267
+ flex: 1;
268
+ }
269
+
270
+ .align-center {
271
+ align-items: center;
272
+ }
201
273
  </style>
@@ -1,9 +1,5 @@
1
1
  'use strict';
2
2
 
3
- //@AttrImport
4
- import Attr from "./Attr";
5
- //@EndAttrImport
6
-
7
3
  import {getContainerPropsValue} from "@/utils/xd.base";
8
4
  export default {
9
5
  props: {
@@ -92,10 +88,6 @@ export default {
92
88
  containerId: null, //容器ID
93
89
  //#ifdef H5
94
90
 
95
- //@AttrData
96
- Attr:{}, //对外开发编辑属性
97
- //@EndAttrData
98
-
99
91
  active: false, //是否选择当前状态
100
92
  isEditx: true, //当前为Editx模式
101
93
  edit: false, //是否开启编辑模式
@@ -113,10 +105,6 @@ export default {
113
105
  },
114
106
  created() {
115
107
 
116
- //@AttrDataCreated
117
- this.Attr = this.$xdUniHelper.customClone(Attr);
118
- //@EndAttrDataCreated
119
-
120
108
 
121
109
  //设置插件cid
122
110
  if (this.cid) {
@@ -60,6 +60,7 @@
60
60
  </view>
61
61
  <view class="form-group">
62
62
  <xd-button
63
+ :disabled="!panelIsChecked"
63
64
  style="flex: 1;"
64
65
  type="primary"
65
66
  radius="10rpx"
@@ -81,10 +82,21 @@
81
82
  import { jfbRootExec } from "@/utils/xd.event";
82
83
  import JfbBasePhoneLoginMixin from "./JfbBasePhoneLoginMixin";
83
84
  import { getContainerPropsValue } from "@/utils/xd.base";
85
+ import XdFormItem from "@/components/XdFormItem/XdFormItem";
86
+ import XdForm from "@/components/XdForm/XdForm";
87
+ import XdFormInput from "@/components/XdFormInput/XdFormInput";
88
+ import XdButton from "@/components/XdButton/XdButton";
89
+ import XdFormCheckbox from "@/components/XdFormCheckbox/XdFormCheckbox"
90
+
84
91
  export default {
85
92
  name: "JfbBasePhoneLogin",
86
93
  components: {
87
- XdFontIcon
94
+ XdFontIcon,
95
+ XdForm,
96
+ XdFormItem,
97
+ XdFormInput,
98
+ XdButton,
99
+ XdFormCheckbox
88
100
  },
89
101
  mixins: [
90
102
  JfbBasePhoneLoginMixin
@@ -136,6 +148,13 @@
136
148
  reGetCode(){
137
149
  if(this.time > 0) return;
138
150
  const { phone_number } = this.accountForm;
151
+ if(!/^1[3-9]\d{9}$/.test(phone_number)){
152
+ uni.showToast({
153
+ title: "请填写正确的手机号",
154
+ icon: 'none'
155
+ });
156
+ return false;
157
+ }
139
158
 
140
159
  console.log("jfbRootExec: sendMsg");
141
160
  jfbRootExec('sendMsg', {
@@ -157,6 +176,7 @@
157
176
  doLoginForm(){
158
177
  const { auth_code, provider_id } = this;
159
178
  const { phone_number, verification_code } = this.accountForm;
179
+ if(!phone_number || !verification_code) return uni.showToast({title: "手机号跟验证码不能为空",icon: 'none'});
160
180
  jfbRootExec('phoneLogin', {
161
181
  vm: this,
162
182
  data: {
@@ -167,7 +187,7 @@
167
187
  },
168
188
  }).then(res => {
169
189
  let { callback_url } = this;
170
- if(callback_url) redirect_url = decodeURIComponent(callback_url);
190
+ if(callback_url) callback_url = decodeURIComponent(callback_url);
171
191
  this.$xdUniHelper.redirectTo({
172
192
  url: callback_url || this.settings.index
173
193
  })
@@ -185,9 +205,9 @@
185
205
  // onJfbHide(options) {
186
206
  // console.log('event.onJfbHide', options)
187
207
  // },
188
- // onJfbBack(options) {
189
- // console.log('event.onJfbBack', options)
190
- // },
208
+ onJfbBack(options) {
209
+ this.$xdUniHelper.navigateBack();
210
+ },
191
211
  }
192
212
  }
193
213
 
@@ -197,8 +217,93 @@
197
217
  @import "./JfbBasePhoneLoginLess.less";
198
218
 
199
219
  .jfb-base-phone-login {
200
- &__body{
201
-
220
+ &__body {
221
+ .xd-form-checkbox {
222
+ /deep/ .checklist-content .checklist-text {
223
+ font-size: 26rpx !important;
224
+ }
225
+ }
226
+
227
+ .form-group {
228
+ padding: 20rpx 70rpx;
229
+ }
230
+
231
+ .get_code {
232
+ color: @xd-base-color;
233
+ font-size: 24rpx;
234
+ }
235
+ .panel-login-password {
236
+ /deep/ .uni-forms-item__label {
237
+ .label-text {
238
+ font-size: 26rpx;
239
+ color: #A6A6A6;
240
+ }
241
+ }
242
+
243
+ /deep/ .uni-easyinput__placeholder-class {
244
+ font-size: 26rpx;
245
+ color: #D4D4D4;
246
+ }
247
+
248
+ .phone-login-type {
249
+ display: flex;
250
+ color: #808080;
251
+ font-size: 32rpx;
252
+ padding: 20rpx 70rpx;
253
+ align-items: center;
254
+
255
+ ._item {
256
+ margin: 0 30rpx;
257
+ position: relative;
258
+ line-height: 2;
259
+
260
+ &:first-child {
261
+ margin-left: 0;
262
+ }
263
+
264
+ &.active {
265
+ color: #383838;
266
+ font-size: 36rpx;
267
+
268
+ text {
269
+ position: absolute;
270
+ height: 6rpx;
271
+ width: 90rpx;
272
+ border-radius: 6rpx;
273
+ left: 50%;
274
+ bottom: 0;
275
+ transform: translateX(-50%);
276
+ }
277
+ }
278
+ }
279
+ }
280
+
281
+ .forget_password {
282
+ font-size: 24rpx;
283
+ color: #A6A6A6;
284
+ text-align: right;
285
+ margin: 20rpx 70rpx 0 0;
286
+
287
+ }
288
+
289
+ .not_login {
290
+ position: fixed;
291
+ width: 100%;
292
+ text-align: center;
293
+ bottom: 100rpx;
294
+ font-size: 24rpx;
295
+ color: #FE7A63;
296
+ }
297
+ }
202
298
  }
203
299
  }
300
+ .flex{
301
+ display: flex;
302
+ }
303
+ .flex-sub{
304
+ flex: 1;
305
+ }
306
+ .align-center{
307
+ align-items: center;
308
+ }
204
309
  </style>
@@ -1,9 +1,5 @@
1
1
  'use strict';
2
2
 
3
- //@AttrImport
4
- import Attr from "./Attr";
5
- //@EndAttrImport
6
-
7
3
  import {getContainerPropsValue} from "@/utils/xd.base";
8
4
  export default {
9
5
  props: {
@@ -92,10 +88,6 @@ export default {
92
88
  containerId: null, //容器ID
93
89
  //#ifdef H5
94
90
 
95
- //@AttrData
96
- Attr:{}, //对外开发编辑属性
97
- //@EndAttrData
98
-
99
91
  active: false, //是否选择当前状态
100
92
  isEditx: true, //当前为Editx模式
101
93
  edit: false, //是否开启编辑模式
@@ -113,10 +105,6 @@ export default {
113
105
  },
114
106
  created() {
115
107
 
116
- //@AttrDataCreated
117
- this.Attr = this.$xdUniHelper.customClone(Attr);
118
- //@EndAttrDataCreated
119
-
120
108
 
121
109
  //设置插件cid
122
110
  if (this.cid) {
@@ -14,19 +14,32 @@
14
14
  </view>
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-test-api__body">
17
- <view>JfbBaseTestApi</view>
17
+ <view>
18
+ <xd-button @click="getUserStatus" type="primary">获取用户登陆状态</xd-button>
19
+ </view>
20
+ <view>
21
+ <xd-button @click="getCardStatus" type="primary">获取用户登陆卡状态</xd-button>
22
+ </view>
23
+ <view>
24
+ <xd-button @click="handleGetByIdCardDetail('101001000005193')" type="primary">获取登陆('101001000005193')</xd-button>
25
+ </view>
18
26
  </view>
19
27
  </view>
20
28
  </template>
21
29
 
22
30
  <script>
23
31
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
24
- import { jfbRootExec } from "@/utils/xd.event";
32
+ import XdButton from "@/components/XdButton/XdButton";
33
+ import {
34
+ jfbRootExec,
35
+ jfbRootFnExec
36
+ } from "@/utils/xd.event";
25
37
  import JfbBaseTestApiMixin from "./JfbBaseTestApiMixin";
26
38
  export default {
27
39
  name: "JfbBaseTestApi",
28
40
  components: {
29
- XdFontIcon
41
+ XdFontIcon,
42
+ XdButton
30
43
  },
31
44
  mixins: [
32
45
  JfbBaseTestApiMixin
@@ -39,23 +52,54 @@
39
52
  },
40
53
  created() {
41
54
 
42
- //todo
55
+ console.log('created.api', this.pageAttr.permission['can_card'])
43
56
  },
44
57
  methods: {
45
58
  onJfbLoad(options) {
46
- console.log('222')
47
- jfbRootExec('getListBindCard', {
59
+
60
+
61
+ },
62
+ getUserStatus(){
63
+ jfbRootFnExec(this, 'checkLoginAndCardLogin')(
64
+ true,
65
+ 'login',
66
+ false,//是否自动跳转到用户登陆页
67
+ )
68
+ .then(status=>{
69
+ console.log(status)
70
+ })
71
+ .catch(error=>{
72
+ console.log(error)
73
+ });
74
+ },
75
+ getCardStatus() {
76
+ jfbRootFnExec(this, 'checkLoginAndCardLogin')(
77
+ true || this.pageAttr.permission['can_card'], //是否免登陆
78
+ 'card', //检查卡类型
79
+ false,//是否自动跳转到卡登陆页
80
+ )
81
+ .then(status => {
82
+ this.$xdHideLoading();
83
+ console.log(status)
84
+ })
85
+ .catch(error => {
86
+ console.log(error)
87
+ });
88
+ },
89
+ handleGetByIdCardDetail(number){
90
+ jfbRootExec('getByIdCardDetail', {
48
91
  vm: this,
49
92
  data: {
50
- ...options
51
- },
93
+ card_number: number,
94
+ }
52
95
  })
53
- .then(res=>{
96
+ .then(res => {
54
97
  console.log(res)
55
98
  })
56
- .catch()
57
- },
58
-
99
+ .catch(err => {
100
+ console.error(err)
101
+ })
102
+ }
59
103
  }
60
104
  }
61
105
 
@@ -67,7 +111,7 @@
67
111
  .jfb-base-test-api {
68
112
  &__body{
69
113
  & > view {
70
- height: unit(250, rpx);
114
+ margin: unit(20, rpx);
71
115
  }
72
116
  }
73
117
  }
@@ -1,154 +0,0 @@
1
- 'use strict';
2
-
3
- export default {
4
- style: [],
5
- advanced: [],
6
- content: [
7
- //文本信息
8
- {
9
- label: '标题名称:', //label
10
- ele: 'el-input', //package 名称
11
- type: 'text',
12
- valueKey: 'title', //form[valueKey]
13
- value: '', //v-model
14
- placeholder: '请输入标题名称',
15
- classNmae: 'input40', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
16
- disabled: true,
17
- rules: [
18
- {
19
- required: true,
20
- type: 'url',
21
- message: '请输入域名地址',
22
- trigger: 'blur'
23
- },
24
- ]
25
- },
26
-
27
- //远程获取内容选择
28
- {
29
- label: '跳转路径:', //label
30
- ele: 'xd-select-list', //package 名称
31
- valueKey: 'jumpToLink', //form[valueKey]
32
- value: '', //v-model
33
- placeholder: '请选择加盟商',
34
- multiple: false, //多选
35
- collapseTags: false,
36
- remoteApi: '/api/editx/pages',
37
- remote: true,
38
- },
39
-
40
- //本地固定内容选择
41
- {
42
- label: '选择内容:', //label
43
- ele: 'xd-select-list', //package 名称
44
- valueKey: 'select', //form[valueKey]
45
- value: '', //v-model
46
- placeholder: '请选择选择内容',
47
- multiple: false, //多选
48
- remote: false,
49
- list: [
50
- {"label": "订单详情", "value": '/main/order/order'},
51
- {"label": "购物车详情", "value": '/main/cart/cart'},
52
- {"label": "商品详情", "value": '/main/product/product'},
53
- {"label": "商品分类", "value": '/main/producttype/producttype'},
54
- ],
55
- },
56
-
57
- //本地固定单选选择
58
- {
59
- label: '单选列表(固定):', //label
60
- ele: 'xd-radio', //package 名称
61
- valueKey: 'radio_status_list', //form[valueKey]
62
- value: 6, //v-model
63
- disabled: true,
64
- rules: [
65
- {required: true, message: '请选择', trigger: ['blur', 'change']}
66
- ],
67
- list: [
68
- {"label": "万利达集团", "value": 4},
69
- {"label": "中国联通", "value": 5},
70
- {"label": "中国移动", "value": 6},
71
- {"label": "味多美", "value": 7},
72
- ]
73
- },
74
-
75
- //远程固定单选选择
76
- {
77
- label: '单选列表(固定):', //label
78
- ele: 'xd-radio', //package 名称
79
- valueKey: 'radio_status_list', //form[valueKey]
80
- value: 6, //v-model
81
- disabled: false,
82
- remoteApi: '/api/editx/pages',
83
- remote: true,
84
- rules: [
85
- {required: true, message: '请选择', trigger: ['blur', 'change']}
86
- ],
87
- },
88
-
89
- //本地固定多选选择
90
- {
91
- label: '多选列表(固定):', //label
92
- ele: 'xd-check', //package 名称
93
- valueKey: 'xd-check_list', //form[valueKey]
94
- value: 6, //v-model
95
- disabled: true,
96
- rules: [
97
- {required: true, message: '请选择', trigger: ['blur', 'change']}
98
- ],
99
- list: [
100
- {"label": "万利达集团", "value": 4},
101
- {"label": "中国联通", "value": 5},
102
- {"label": "中国移动", "value": 6},
103
- {"label": "味多美", "value": 7},
104
- ]
105
- },
106
-
107
- //远程多选选选择
108
- {
109
- label: '多选列表:', //label
110
- ele: 'xd-check', //package 名称
111
- valueKey: 'xd-check_remote-list', //form[valueKey]
112
- value: 6, //v-model
113
- disabled: false,
114
- remoteApi: '/api/editx/pages',
115
- remote: true,
116
- rules: [
117
- {required: true, message: '请选择', trigger: ['blur', 'change']}
118
- ],
119
- },
120
-
121
- //状态(二选一)单选选择
122
- {
123
- label: '状态(二选一):', //label
124
- ele: 'xd-radio-status', //package 名称
125
- valueKey: 'radio_status', //form[valueKey]
126
- value: 'Y', //v-model
127
- isall: true,
128
- disabled: true,
129
- backValueType: '', //返回值类型 1=>返回(Y,N)2=> [true|false] 3=>[1,0] 4=>[1,2]
130
- placeholder: '请选择',
131
- list: 'status', //status=>状态 best=>推荐 associate=>关联 yes=>是否 open=> 是否开启 check=>审核
132
- },
133
-
134
- //文本信息
135
- {
136
- label: '标题名称:', //label
137
- ele: 'el-input', //package 名称
138
- type: 'text',
139
- valueKey: 'title', //form[valueKey]
140
- value: '', //v-model
141
- placeholder: '请输入标题名称',
142
- classNmae: 'input40', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
143
- disabled: true,
144
- rules: [
145
- {
146
- required: true,
147
- type: 'url',
148
- message: '请输入域名地址',
149
- trigger: 'blur'
150
- },
151
- ]
152
- },
153
- ],
154
- }
@@ -1,154 +0,0 @@
1
- 'use strict';
2
-
3
- export default {
4
- style: [],
5
- advanced: [],
6
- content: [
7
- //文本信息
8
- {
9
- label: '标题名称:', //label
10
- ele: 'el-input', //package 名称
11
- type: 'text',
12
- valueKey: 'title', //form[valueKey]
13
- value: '', //v-model
14
- placeholder: '请输入标题名称',
15
- classNmae: 'input40', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
16
- disabled: true,
17
- rules: [
18
- {
19
- required: true,
20
- type: 'url',
21
- message: '请输入域名地址',
22
- trigger: 'blur'
23
- },
24
- ]
25
- },
26
-
27
- //远程获取内容选择
28
- {
29
- label: '跳转路径:', //label
30
- ele: 'xd-select-list', //package 名称
31
- valueKey: 'jumpToLink', //form[valueKey]
32
- value: '', //v-model
33
- placeholder: '请选择加盟商',
34
- multiple: false, //多选
35
- collapseTags: false,
36
- remoteApi: '/api/editx/pages',
37
- remote: true,
38
- },
39
-
40
- //本地固定内容选择
41
- {
42
- label: '选择内容:', //label
43
- ele: 'xd-select-list', //package 名称
44
- valueKey: 'select', //form[valueKey]
45
- value: '', //v-model
46
- placeholder: '请选择选择内容',
47
- multiple: false, //多选
48
- remote: false,
49
- list: [
50
- {"label": "订单详情", "value": '/main/order/order'},
51
- {"label": "购物车详情", "value": '/main/cart/cart'},
52
- {"label": "商品详情", "value": '/main/product/product'},
53
- {"label": "商品分类", "value": '/main/producttype/producttype'},
54
- ],
55
- },
56
-
57
- //本地固定单选选择
58
- {
59
- label: '单选列表(固定):', //label
60
- ele: 'xd-radio', //package 名称
61
- valueKey: 'radio_status_list', //form[valueKey]
62
- value: 6, //v-model
63
- disabled: true,
64
- rules: [
65
- {required: true, message: '请选择', trigger: ['blur', 'change']}
66
- ],
67
- list: [
68
- {"label": "万利达集团", "value": 4},
69
- {"label": "中国联通", "value": 5},
70
- {"label": "中国移动", "value": 6},
71
- {"label": "味多美", "value": 7},
72
- ]
73
- },
74
-
75
- //远程固定单选选择
76
- {
77
- label: '单选列表(固定):', //label
78
- ele: 'xd-radio', //package 名称
79
- valueKey: 'radio_status_list', //form[valueKey]
80
- value: 6, //v-model
81
- disabled: false,
82
- remoteApi: '/api/editx/pages',
83
- remote: true,
84
- rules: [
85
- {required: true, message: '请选择', trigger: ['blur', 'change']}
86
- ],
87
- },
88
-
89
- //本地固定多选选择
90
- {
91
- label: '多选列表(固定):', //label
92
- ele: 'xd-check', //package 名称
93
- valueKey: 'xd-check_list', //form[valueKey]
94
- value: 6, //v-model
95
- disabled: true,
96
- rules: [
97
- {required: true, message: '请选择', trigger: ['blur', 'change']}
98
- ],
99
- list: [
100
- {"label": "万利达集团", "value": 4},
101
- {"label": "中国联通", "value": 5},
102
- {"label": "中国移动", "value": 6},
103
- {"label": "味多美", "value": 7},
104
- ]
105
- },
106
-
107
- //远程多选选选择
108
- {
109
- label: '多选列表:', //label
110
- ele: 'xd-check', //package 名称
111
- valueKey: 'xd-check_remote-list', //form[valueKey]
112
- value: 6, //v-model
113
- disabled: false,
114
- remoteApi: '/api/editx/pages',
115
- remote: true,
116
- rules: [
117
- {required: true, message: '请选择', trigger: ['blur', 'change']}
118
- ],
119
- },
120
-
121
- //状态(二选一)单选选择
122
- {
123
- label: '状态(二选一):', //label
124
- ele: 'xd-radio-status', //package 名称
125
- valueKey: 'radio_status', //form[valueKey]
126
- value: 'Y', //v-model
127
- isall: true,
128
- disabled: true,
129
- backValueType: '', //返回值类型 1=>返回(Y,N)2=> [true|false] 3=>[1,0] 4=>[1,2]
130
- placeholder: '请选择',
131
- list: 'status', //status=>状态 best=>推荐 associate=>关联 yes=>是否 open=> 是否开启 check=>审核
132
- },
133
-
134
- //文本信息
135
- {
136
- label: '标题名称:', //label
137
- ele: 'el-input', //package 名称
138
- type: 'text',
139
- valueKey: 'title', //form[valueKey]
140
- value: '', //v-model
141
- placeholder: '请输入标题名称',
142
- classNmae: 'input40', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
143
- disabled: true,
144
- rules: [
145
- {
146
- required: true,
147
- type: 'url',
148
- message: '请输入域名地址',
149
- trigger: 'blur'
150
- },
151
- ]
152
- },
153
- ],
154
- }