@uxda/appkit 4.2.2 → 4.2.6

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": "@uxda/appkit",
3
- "version": "4.2.2",
3
+ "version": "4.2.6",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -9,6 +9,7 @@
9
9
  v-model="formData.姓名"
10
10
  placeholder="请输入或拍照识别"
11
11
  :maxlength="30"
12
+ :disabled="已认证"
12
13
  :rules="['required']"
13
14
  >
14
15
  <template #append>
@@ -21,6 +22,7 @@
21
22
  placeholder="请输入身份证号码"
22
23
  :maxlength="30"
23
24
  v-model="formData.身份证号码"
25
+ :disabled="已认证"
24
26
  :rules="[
25
27
  'required',
26
28
  {
@@ -90,8 +92,8 @@ import {
90
92
  import { OcrIcon } from "../../shared/components";
91
93
  import Taro from "@tarojs/taro";
92
94
  import { useNutshell } from "@uxda/nutshell/taro";
93
- import isMobilePhone from 'validator/es/lib/isMobilePhone'
94
- import isIdentityCard from 'validator/es/lib/isIdentityCard'
95
+ import isMobilePhone from "validator/es/lib/isMobilePhone";
96
+ import isIdentityCard from "validator/es/lib/isIdentityCard";
95
97
  import { useHttp } from "../api";
96
98
 
97
99
  const props = withDefaults(
@@ -152,12 +154,18 @@ async function toSubmit() {
152
154
  idCard: formData.身份证号码,
153
155
  mobile: formData.电话号码,
154
156
  name: formData.姓名,
155
- tenantId: props.userId,
157
+ // tenantId: props.userId,
156
158
  })
157
- .then(() => {
158
- Taro.showToast({ title: "已提交认证信息", icon: "none" });
159
- // 提交认证信息,成功后返回
160
- toBack();
159
+ .then((res: any) => {
160
+ if (res?.status) {
161
+ Taro.showToast({ title: "已提交认证信息", icon: "none" });
162
+ // 提交认证信息,成功后返回
163
+ setTimeout(() => {
164
+ toBack();
165
+ }, 500);
166
+ } else {
167
+ Taro.showToast({ title: "认证失败", icon: "none" });
168
+ }
161
169
  })
162
170
  .catch((err) => {
163
171
  Taro.showToast({ title: err?.errMsg || "认证失败", icon: "none" });
@@ -168,6 +176,18 @@ watch(
168
176
  () => {
169
177
  if (props.verifyResult == 1) {
170
178
  已认证.value = true;
179
+ const $http = useHttp();
180
+
181
+ // 向当前用户的手机中发送短信验证码
182
+ $http
183
+ .get(`/cas/sysAccount/verifyIdHistory/${props.userId}`)
184
+ .then((res) => {
185
+ if (res?.length) {
186
+ const temp = res[res.length - 1];
187
+ formData.身份证号码 = temp.idCard;
188
+ formData.姓名 = temp.name;
189
+ }
190
+ });
171
191
  }
172
192
  },
173
193
  { deep: true, immediate: true }
@@ -38,11 +38,13 @@
38
38
  @click="toBinding"
39
39
  />
40
40
  <nut-cell
41
+ v-if="props.isPersonal"
41
42
  title="昵称"
42
43
  is-link
43
44
  @click="onNickNameChange"
44
45
  :desc="userInfo?.nickName || '--'"
45
46
  />
47
+ <nut-cell v-else title="昵称" :desc="userInfo?.nickName || '--'" />
46
48
  <nut-cell title="认证信息" is-link @click="toAuth">
47
49
  <template #desc>
48
50
  <span v-if="userInfo?.verifyResult == 1">已认证</span>
@@ -57,9 +59,8 @@
57
59
  </template>
58
60
  </nut-cell>
59
61
  </div>
60
-
61
- <div class="user-info-tit">企业/团队</div>
62
- <div class="user-info-team">
62
+ <div v-if="props.isPersonal != 1" class="user-info-tit">企业/团队</div>
63
+ <div v-if="props.isPersonal != 1" class="user-info-team">
63
64
  <div
64
65
  v-for="(item, key) in userInfo.tenantInfoList"
65
66
  :key="key"
@@ -264,11 +265,13 @@ const props = withDefaults(
264
265
  miniType?: string;
265
266
  app?: string;
266
267
  userId: string;
268
+ isPersonal: number;
267
269
  }>(),
268
270
  {
269
271
  miniType: "05",
270
272
  app: "",
271
273
  userId: "",
274
+ isPersonal: 0,
272
275
  }
273
276
  );
274
277