@uxda/appkit 1.2.78 → 4.0.2

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.
@@ -4,13 +4,16 @@ import OcrId from './../../components/ocr-id/index.vue'
4
4
  import { OcrResultType } from '../../components/ocr-id/types'
5
5
  import DdArea from './../../components/dd-area/index.vue'
6
6
  import DdSelector from './../../components/dd-selector/index.vue'
7
- import Taro from "@tarojs/taro";
7
+ import Taro from '@tarojs/taro'
8
8
 
9
- const props = withDefaults(defineProps<{
10
- banner?: string
11
- }>(), {
12
- banner: 'https://cdn.ddjf.com/static/images/wx-yunservice/ai-form-bg2.png'
13
- })
9
+ const props = withDefaults(
10
+ defineProps<{
11
+ banner?: string
12
+ }>(),
13
+ {
14
+ banner: 'https://cdn.ddjf.com/static/images/wx-yunservice/ai-form-bg2.png',
15
+ }
16
+ )
14
17
 
15
18
  const formState = reactive({
16
19
  name: '',
@@ -19,25 +22,25 @@ const formState = reactive({
19
22
  areaCode: '',
20
23
  position: '',
21
24
  companyName: '',
22
- companyNo: ''
25
+ companyNo: '',
23
26
  })
24
27
 
25
28
  const positionOptions = [
26
29
  {
27
- label: "老板",
28
- value: "老板",
30
+ label: '老板',
31
+ value: '老板',
29
32
  },
30
33
  {
31
- label: "业务负责人",
32
- value: "业务负责人",
34
+ label: '业务负责人',
35
+ value: '业务负责人',
33
36
  },
34
37
  {
35
- label: "风控负责人",
36
- value: "风控负责人",
38
+ label: '风控负责人',
39
+ value: '风控负责人',
37
40
  },
38
41
  {
39
- label: "其它",
40
- value: "其它",
42
+ label: '其它',
43
+ value: '其它',
41
44
  },
42
45
  ]
43
46
 
@@ -59,42 +62,42 @@ function showVerifyToast(tip: string, duration = 1500) {
59
62
  }
60
63
 
61
64
  async function submit() {
62
- if (!formState.name){
65
+ if (!formState.name) {
63
66
  showVerifyToast('请输入你的姓名')
64
67
  return
65
68
  }
66
69
  const params = {
67
70
  useCase: formState.scene,
68
- customerName: formState.name
71
+ customerName: formState.name,
69
72
  }
70
73
  if (formState.scene === 'person') {
71
- if (!formState.certNo){
74
+ if (!formState.certNo) {
72
75
  showVerifyToast('请输入身份证号码')
73
76
  return
74
77
  }
75
- if (formState.certNo.length != 18){
78
+ if (formState.certNo.length != 18) {
76
79
  showVerifyToast('请输入正确的身份证号码')
77
80
  return
78
81
  }
79
82
  params['idCardNo'] = formState.certNo
80
83
  } else {
81
- if (!formState.position){
84
+ if (!formState.position) {
82
85
  showVerifyToast('请选择你的职位')
83
86
  return
84
87
  }
85
- if (!formState.companyName){
88
+ if (!formState.companyName) {
86
89
  showVerifyToast('请输入公司名称')
87
90
  return
88
91
  }
89
- if (!formState.companyNo){
92
+ if (!formState.companyNo) {
90
93
  showVerifyToast('请输入社会统一信用代码')
91
94
  return
92
95
  }
93
- if (formState.companyNo.length != 18){
96
+ if (formState.companyNo.length != 18) {
94
97
  showVerifyToast('请输入正确的社会统一信用代码')
95
98
  return
96
99
  }
97
- if (!formState.areaCode){
100
+ if (!formState.areaCode) {
98
101
  showVerifyToast('请选择所在地区')
99
102
  return
100
103
  }
@@ -111,47 +114,69 @@ async function submit() {
111
114
  <template>
112
115
  <div class="self-registration">
113
116
  <div class="self-registration-body">
114
- <img :src="banner" class="self-registration-banner" alt=""/>
117
+ <img :src="banner" class="self-registration-banner" alt="" />
115
118
  <nut-form>
116
119
  <nut-form-item label="使用场景" required body-align="right">
117
- <nut-radiogroup v-model="formState.scene" direction="horizontal">
120
+ <nut-radio-group v-model="formState.scene" direction="horizontal">
118
121
  <nut-radio label="person">个人使用</nut-radio>
119
122
  <nut-radio label="company">公司使用</nut-radio>
120
- </nut-radiogroup>
123
+ </nut-radio-group>
121
124
  </nut-form-item>
122
125
  <nut-form-item label="你的姓名" required>
123
126
  <div class="self-registration__input">
124
- <input v-model="formState.name" class="nut-input-text" placeholder="请输入或拍照识别" type="text" :maxlength="20"/>
125
- <OcrId @ocr="onOCRInfo" style="margin-left: 5px"/>
127
+ <input
128
+ v-model="formState.name"
129
+ class="nut-input-text"
130
+ placeholder="请输入或拍照识别"
131
+ type="text"
132
+ :maxlength="20"
133
+ />
134
+ <OcrId @ocr="onOCRInfo" style="margin-left: 5px" />
126
135
  </div>
127
136
  </nut-form-item>
128
137
 
129
138
  <nut-form-item v-if="formState.scene === 'person'" label="身份证号码" required>
130
- <input v-model="formState.certNo" class="nut-input-text" placeholder="请输入" type="text" :maxlength="18"/>
139
+ <input
140
+ v-model="formState.certNo"
141
+ class="nut-input-text"
142
+ placeholder="请输入"
143
+ type="text"
144
+ :maxlength="18"
145
+ />
131
146
  </nut-form-item>
132
147
 
133
148
  <template v-else>
134
149
  <nut-form-item label="你的职位" required>
135
- <DdSelector v-model:value="formState.position" :options="positionOptions"/>
150
+ <DdSelector v-model:value="formState.position" :options="positionOptions" />
136
151
  </nut-form-item>
137
152
  <nut-form-item label="公司名称" required>
138
- <input v-model="formState.companyName" class="nut-input-text" placeholder="请输入" type="text"
139
- :maxlength="50"/>
153
+ <input
154
+ v-model="formState.companyName"
155
+ class="nut-input-text"
156
+ placeholder="请输入"
157
+ type="text"
158
+ :maxlength="50"
159
+ />
140
160
  </nut-form-item>
141
161
  <nut-form-item label="社会统一信用代码" required>
142
- <input v-model="formState.companyNo" class="nut-input-text" placeholder="请输入" type="text" :maxlength="18"/>
162
+ <input
163
+ v-model="formState.companyNo"
164
+ class="nut-input-text"
165
+ placeholder="请输入"
166
+ type="text"
167
+ :maxlength="18"
168
+ />
143
169
  </nut-form-item>
144
170
  <nut-form-item label="所在地区" required>
145
- <DdArea
146
- v-model:value="formState.areaCode"
147
- type="city"
148
- placeholder="请选择"/>
171
+ <DdArea v-model:value="formState.areaCode" type="city" placeholder="请选择" />
149
172
  </nut-form-item>
150
173
  </template>
151
174
  </nut-form>
152
175
  </div>
153
176
  <div class="self-registration-bottom">
154
- <nut-button block type="primary" class="experience-button" @click="submit">立即体验</nut-button>
177
+ <nut-button block type="primary" class="experience-button" @click="submit"
178
+ >立即体验</nut-button
179
+ >
155
180
  </div>
156
181
  </div>
157
182
  </template>
@@ -197,6 +222,7 @@ async function submit() {
197
222
 
198
223
  .nut-input-text {
199
224
  text-align: right !important;
225
+ flex: 1;
200
226
  }
201
227
 
202
228
  .nut-form-item__label.required::before {
@@ -204,7 +230,7 @@ async function submit() {
204
230
  }
205
231
 
206
232
  .nut-form-item__label.required::after {
207
- content: "*";
233
+ content: '*';
208
234
  color: #fa2c19;
209
235
  margin-right: 4px;
210
236
  }
@@ -225,4 +251,4 @@ async function submit() {
225
251
  font-size: 16px;
226
252
  }
227
253
  }
228
- </style>
254
+ </style>
@@ -14,31 +14,35 @@
14
14
  </div>
15
15
 
16
16
  <div class="user-binding-layout user-binding-inputlayout" style="flex: 1" v-if="current === 1">
17
- <nut-input
18
- label="手机号码"
19
- v-model="authState.mobile"
20
- placeholder="请输入手机号码"
21
- :max-length="11"
22
- readonly
23
- input-align="right"
24
- />
25
- <nut-input
26
- label="验证码"
27
- v-model="authState.code"
28
- placeholder="请输入验证码"
29
- :max-length="6"
30
- input-align="right"
31
- >
32
- <template #button>
33
- <nut-button
34
- :disabled="countdownActive"
35
- class="user-binding-codebtn"
36
- type="default"
37
- @click="onAuthCode"
38
- >{{ countdownText }}</nut-button
17
+ <nut-form>
18
+ <nut-form-item label="手机号码" label-align="left">
19
+ <nut-input
20
+ v-model="authState.mobile"
21
+ placeholder="请输入手机号码"
22
+ :max-length="11"
23
+ readonly
24
+ input-align="right"
25
+ />
26
+ </nut-form-item>
27
+ <nut-form-item label="验证码" label-align="left">
28
+ <nut-input
29
+ v-model="authState.code"
30
+ placeholder="请输入验证码"
31
+ :max-length="6"
32
+ input-align="right"
39
33
  >
40
- </template>
41
- </nut-input>
34
+ <template #right>
35
+ <nut-button
36
+ :disabled="countdownActive"
37
+ class="user-binding-codebtn"
38
+ type="default"
39
+ @click="onAuthCode"
40
+ >{{ countdownText }}</nut-button
41
+ >
42
+ </template>
43
+ </nut-input>
44
+ </nut-form-item>
45
+ </nut-form>
42
46
 
43
47
  <nut-button
44
48
  class="user-binding-btn"
@@ -51,30 +55,34 @@
51
55
  </div>
52
56
 
53
57
  <div class="user-binding-layout user-binding-inputlayout" style="flex: 1" v-else>
54
- <nut-input
55
- label="手机号码"
56
- v-model="bindingState.mobile"
57
- placeholder="请输入新手机号码"
58
- :max-length="11"
59
- input-align="right"
60
- />
61
- <nut-input
62
- label="验证码"
63
- v-model="bindingState.code"
64
- placeholder="请输入验证码"
65
- :max-length="6"
66
- input-align="right"
67
- >
68
- <template #button>
69
- <nut-button
70
- :disabled="countdownActive1"
71
- class="user-binding-codebtn"
72
- type="default"
73
- @click="onBindingCode"
74
- >{{ countdownText1 }}</nut-button
58
+ <nut-form>
59
+ <nut-form-item label="手机号码" label-align="left">
60
+ <nut-input
61
+ v-model="bindingState.mobile"
62
+ placeholder="请输入新手机号码"
63
+ :max-length="11"
64
+ input-align="right"
65
+ />
66
+ </nut-form-item>
67
+ <nut-form-item label="验证码" label-align="left">
68
+ <nut-input
69
+ v-model="bindingState.code"
70
+ placeholder="请输入验证码"
71
+ :max-length="6"
72
+ input-align="right"
75
73
  >
76
- </template>
77
- </nut-input>
74
+ <template #right>
75
+ <nut-button
76
+ :disabled="countdownActive1"
77
+ class="user-binding-codebtn"
78
+ type="default"
79
+ @click="onBindingCode"
80
+ >{{ countdownText1 }}</nut-button
81
+ >
82
+ </template>
83
+ </nut-input>
84
+ </nut-form-item>
85
+ </nut-form>
78
86
 
79
87
  <nut-button
80
88
  class="user-binding-btn"
@@ -104,7 +112,7 @@ const {
104
112
  countdownActive: countdownActive1,
105
113
  } = useCountdown()
106
114
  const { phoneValidator } = useValidator()
107
- const current = ref(1)
115
+ const current = ref(2)
108
116
 
109
117
  onMounted(() => {
110
118
  if (!params.mobile) {
@@ -202,6 +210,8 @@ const emits = defineEmits(['success'])
202
210
  flex-direction: column;
203
211
  box-sizing: border-box;
204
212
  padding: 10px 12px env(safe-area-inset-bottom, 0px);
213
+ --nut-cell-padding: 0;
214
+
205
215
  &-img {
206
216
  width: 351px;
207
217
  height: 192px;
@@ -214,7 +224,26 @@ const emits = defineEmits(['success'])
214
224
  overflow: hidden;
215
225
  margin-bottom: 10px;
216
226
  }
217
- &-btn {
227
+ &-inputlayout {
228
+ padding: 0 10px;
229
+ box-sizing: border-box;
230
+ .nut-input {
231
+ height: 40px;
232
+ padding: 0;
233
+ display: flex;
234
+ align-items: center;
235
+ font-size: 16px;
236
+ padding-left: 3px;
237
+ border-color: #f5f5f5;
238
+ .input-text {
239
+ width: 100%;
240
+ }
241
+ }
242
+ }
243
+ .nut-placeholder {
244
+ color: #cccccc;
245
+ }
246
+ .user-binding-btn {
218
247
  position: absolute;
219
248
  bottom: 50px;
220
249
  left: 25px;
@@ -224,7 +253,7 @@ const emits = defineEmits(['success'])
224
253
  height: 40px;
225
254
  line-height: 38px;
226
255
  }
227
- &-codebtn {
256
+ .user-binding-codebtn {
228
257
  height: 30px;
229
258
  font-size: 12px;
230
259
  padding: 0;
@@ -233,7 +262,7 @@ const emits = defineEmits(['success'])
233
262
  color: var(--app-primary-color, #017fff);
234
263
  background: #f2f2f2;
235
264
  }
236
- &-steps {
265
+ .user-binding-steps {
237
266
  margin-top: 15px;
238
267
  .nut-step-line {
239
268
  background: rgba(220, 220, 220, 1);
@@ -244,12 +273,12 @@ const emits = defineEmits(['success'])
244
273
  font-weight: bold;
245
274
  color: rgba(0, 0, 0, 0.4);
246
275
  }
247
- .nut-step.nut-step-wait .nut-step-icon.is-text {
276
+ .nut-step.nut-step-wait .nut-step-icon {
248
277
  background: rgba(243, 243, 243, 1);
249
278
  border-color: rgba(243, 243, 243, 1);
250
279
  color: rgba(0, 0, 0, 0.4);
251
280
  }
252
- .nut-step.nut-step-process .nut-step-icon.is-text {
281
+ .nut-step.nut-step-process .nut-step-icon {
253
282
  background: var(--app-primary-color, #017fff);
254
283
  border-color: var(--app-primary-color, #017fff);
255
284
  }
@@ -274,27 +303,5 @@ const emits = defineEmits(['success'])
274
303
  height: 22px;
275
304
  }
276
305
  }
277
- &-inputlayout {
278
- padding: 0 10px;
279
- box-sizing: border-box;
280
- .nut-input {
281
- height: 40px;
282
- padding: 0;
283
- display: flex;
284
- align-items: center;
285
- font-size: 16px;
286
- padding-left: 3px;
287
- border-color: #f5f5f5;
288
- .input-text {
289
- width: 100%;
290
- }
291
- }
292
- .nut-input-label {
293
- color: #666;
294
- }
295
- }
296
- .nut-placeholder {
297
- color: #cccccc;
298
- }
299
306
  }
300
307
  </style>
@@ -125,7 +125,7 @@
125
125
  v-model:visible="userState.visible"
126
126
  @cancel="onUserNameCancel"
127
127
  >
128
- <nut-input label="" :max-length="20" placeholder="请输入新的用户名" v-model="userState.value" />
128
+ <nut-input :max-length="20" placeholder="请输入新的用户名" v-model="userState.value" />
129
129
  <template #footer>
130
130
  <nut-button class="change-username-popup-cancel" type="default" @click="onUserNameCancel">
131
131
  取消
@@ -1,88 +0,0 @@
1
-
2
- .user-feedback {
3
- // margin: 10px 12px;
4
- // padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px));
5
- // height: 100vh;
6
- // box-sizing: border-box;
7
- // overflow: hidden;
8
- // &-wrap {
9
- // height: 100%;
10
- // background: #fff;
11
- // display: flex;
12
- // flex-direction: column;
13
- // box-sizing: border-box;
14
- // padding: 10px;
15
- // border-radius: 5px;
16
- // }
17
- // &-head {
18
- // background: #f2f9ff;
19
- // padding: 15px;
20
- // border-radius: 2px;
21
- // font-size: 12px;
22
- // margin-bottom: 8px;
23
- // &-info {
24
- // padding-left: 9px;
25
- // text-indent: -9px;
26
- // }
27
- // }
28
- // &-tit {
29
- // height: 44px;
30
- // display: flex;
31
- // align-items: center;
32
- // color: #1a1a1a;
33
- // font-weight: 500;
34
- // font-size: 17px;
35
- // }
36
- // &-body {
37
- // flex: 1;
38
- // background: #f5f5f5;
39
- // border-radius: 4px 4px 0px 0px;
40
- // display: flex;
41
- // flex-direction: column;
42
- // overflow: hidden;
43
- // }
44
- // &-handle {
45
- // display: flex;
46
- // flex-wrap: wrap;
47
- // &-item {
48
- // border-radius: 2px;
49
- // background: #f5f5f5;
50
- // display: flex;
51
- // align-items: center;
52
- // width: 80px;
53
- // height: 80px;
54
- // }
55
- // }
56
- // &-editor {
57
- // padding: 10px;
58
- // font-size: 14px;
59
- // overflow-y: auto;
60
- // min-height: 165px;
61
- // }
62
- // .ql-editor.ql-blank:before {
63
- // color: rgba(0, 0, 0, 0.3);
64
- // font-style: normal;
65
- // }
66
-
67
- // &-footer {
68
- // position: fixed;
69
- // z-index: 10;
70
- // bottom: 0;
71
- // left: 0;
72
- // width: 100%;
73
- // min-height: 63px;
74
- // background: #ffffff;
75
- // box-shadow: 0 -3px 11px 0 rgba(224, 224, 224, 0.5);
76
- // padding: 10px 12px calc(8px + env(safe-area-inset-bottom, 0px));
77
- // display: flex;
78
- // justify-content: space-between;
79
- // box-sizing: border-box;
80
- // &-btn {
81
- // flex: 1;
82
- // &:first-child {
83
- // margin-right: 10px;
84
- // }
85
- // }
86
- // }
87
- }
88
-
package/dist/main.css DELETED
@@ -1,3 +0,0 @@
1
- var undefined$1 = undefined;
2
-
3
- export { undefined$1 as default };
package/dist/styles.css DELETED
@@ -1 +0,0 @@
1
- @import url(./styles/vars.scss);