n20-common-lib 1.3.149 → 1.3.151

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": "n20-common-lib",
3
- "version": "1.3.149",
3
+ "version": "1.3.151",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -120,7 +120,7 @@ export default {
120
120
  created() {
121
121
  if (this.procInstId) {
122
122
  axios
123
- .get('/bems/activiti/sample/Q003', {
123
+ .get(`/bems/activiti/sample/Q003?r=${Math.random()}`, {
124
124
  procInstId: this.procInstId
125
125
  })
126
126
  .then(({ data = [] }) => {
@@ -161,6 +161,10 @@ export default {
161
161
  type: Function,
162
162
  default: undefined
163
163
  },
164
+ beforeLogin: {
165
+ type: Function,
166
+ default: undefined
167
+ },
164
168
  otherName: {
165
169
  type: String,
166
170
  default: ''
@@ -275,11 +279,13 @@ export default {
275
279
  submitLogin() {
276
280
  this.$refs['login-form'].validate((valid) => {
277
281
  if (!valid) return false
278
-
279
282
  auth.removeToken()
280
- this.theType === 'account' && this.passwordLogin()
281
- this.theType === 'pthon' && this.phoneLogin()
282
- this.theType === 'accountPthon' && this.accountPthonLogin()
283
+ this.beforeLogin().then(() => {
284
+ this.theType === 'account' && this.passwordLogin()
285
+ this.theType === 'pthon' && this.phoneLogin()
286
+ this.theType === 'accountPthon' && this.accountPthonLogin()
287
+ })
288
+
283
289
  })
284
290
  },
285
291
  // 获取加密参数
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div v-if="alV" v-loading="alV" class="login-wrap">
3
- <loginForm
3
+ <loginForm :beforeLogin="beforeLogin"
4
4
  ref="login-form"
5
5
  :login-types="loginTypes"
6
6
  :login-then="loginThen"
@@ -17,6 +17,7 @@
17
17
  <!-- eslint-disable-next-line vue/no-v-html -->
18
18
  <div doc="登录页标语" v-html="loginSloganHtml"></div>
19
19
  <loginForm
20
+ :beforeLogin="beforeLogin"
20
21
  v-if="operateType === 'login'"
21
22
  :login-types="loginTypes"
22
23
  :login-then="loginThen"
@@ -74,6 +75,10 @@ export default {
74
75
  type: Boolean,
75
76
  default: false
76
77
  },
78
+ beforeLogin: {
79
+ type: Function,
80
+ default:undefined
81
+ },
77
82
  autoLoginDate: {
78
83
  type: Object,
79
84
  default: undefined
@@ -172,7 +177,6 @@ export default {
172
177
  return undefined
173
178
  }
174
179
  },
175
-
176
180
  removeStorage() {
177
181
  Object.keys(window.sessionStorage).forEach((k) => {
178
182
  !['subEntry'].includes(k) && window.sessionStorage.removeItem(k)