@uxda/appkit 1.2.42 → 1.2.46
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/dist/index.js +7 -15
- package/package.json +1 -1
- package/src/notice/components/LoginSetting.vue +9 -20
package/dist/index.js
CHANGED
|
@@ -3796,8 +3796,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
3796
3796
|
setup(__props, { emit: __emit }) {
|
|
3797
3797
|
const props = __props;
|
|
3798
3798
|
const safeArea = useSafeArea();
|
|
3799
|
-
const loginRule = ref({});
|
|
3800
3799
|
const showLoginRule = ref(false);
|
|
3800
|
+
const loginRuleTip = ref("");
|
|
3801
3801
|
const style = computed(() => {
|
|
3802
3802
|
let str = "";
|
|
3803
3803
|
if (props.withTabbar) {
|
|
@@ -3808,7 +3808,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
3808
3808
|
}
|
|
3809
3809
|
return str;
|
|
3810
3810
|
});
|
|
3811
|
-
|
|
3811
|
+
useDidShow(() => {
|
|
3812
3812
|
checkLoginTimeRule();
|
|
3813
3813
|
});
|
|
3814
3814
|
async function checkLoginTimeRule() {
|
|
@@ -3816,22 +3816,14 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
3816
3816
|
const $http = useHttp();
|
|
3817
3817
|
$http.post("/cas/sysUser/checkLoginTimeRule", {
|
|
3818
3818
|
appCode: props.app || appkitOptions.app(),
|
|
3819
|
-
tenantId: appkitOptions.tenant()
|
|
3819
|
+
tenantId: appkitOptions.tenant(),
|
|
3820
|
+
device: "mini"
|
|
3820
3821
|
}).then((result) => {
|
|
3821
3822
|
if (result === true)
|
|
3822
3823
|
return;
|
|
3823
|
-
|
|
3824
|
+
loginRuleTip.value = result.message;
|
|
3824
3825
|
showLoginRule.value = true;
|
|
3825
|
-
|
|
3826
|
-
}
|
|
3827
|
-
async function getLoginRule() {
|
|
3828
|
-
const appkitOptions = useAppKitOptions();
|
|
3829
|
-
const $http = useHttp();
|
|
3830
|
-
$http.get("/cas/sysUser/getLoginRule", {
|
|
3831
|
-
appCode: props.app || appkitOptions.app()
|
|
3832
|
-
}).then((result) => {
|
|
3833
|
-
loginRule.value = result;
|
|
3834
|
-
emits("show", { startTime: loginRule.value.startTime, endTime: loginRule.value.endTime });
|
|
3826
|
+
emits("show", loginRuleTip.value);
|
|
3835
3827
|
});
|
|
3836
3828
|
}
|
|
3837
3829
|
const emits = __emit;
|
|
@@ -3848,7 +3840,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
3848
3840
|
createElementVNode(
|
|
3849
3841
|
"div",
|
|
3850
3842
|
_hoisted_2,
|
|
3851
|
-
|
|
3843
|
+
toDisplayString(loginRuleTip.value),
|
|
3852
3844
|
1
|
|
3853
3845
|
/* TEXT */
|
|
3854
3846
|
)
|
package/package.json
CHANGED
|
@@ -5,16 +5,17 @@
|
|
|
5
5
|
src="https://cdn.ddjf.com/static/images/nutshell/empty-permission.png"
|
|
6
6
|
/>
|
|
7
7
|
<div class="login-setting-text">
|
|
8
|
-
|
|
8
|
+
{{ loginRuleTip }}
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script lang="ts" setup>
|
|
14
|
-
import { computed,
|
|
14
|
+
import { computed, ref } from 'vue'
|
|
15
15
|
import { useHttp } from '../api'
|
|
16
16
|
import { useAppKitOptions } from '../../Appkit'
|
|
17
17
|
import { useSafeArea } from '../../shared/composables'
|
|
18
|
+
import { useDidShow } from '@tarojs/taro'
|
|
18
19
|
|
|
19
20
|
const props = withDefaults(
|
|
20
21
|
defineProps<{
|
|
@@ -32,8 +33,8 @@ const props = withDefaults(
|
|
|
32
33
|
)
|
|
33
34
|
|
|
34
35
|
const safeArea = useSafeArea()
|
|
35
|
-
const loginRule = ref<any>({})
|
|
36
36
|
const showLoginRule = ref<boolean>(false)
|
|
37
|
+
const loginRuleTip = ref('')
|
|
37
38
|
|
|
38
39
|
const style = computed(() => {
|
|
39
40
|
let str = ''
|
|
@@ -46,7 +47,7 @@ const style = computed(() => {
|
|
|
46
47
|
return str
|
|
47
48
|
})
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
useDidShow(() => {
|
|
50
51
|
checkLoginTimeRule()
|
|
51
52
|
})
|
|
52
53
|
|
|
@@ -59,28 +60,16 @@ async function checkLoginTimeRule() {
|
|
|
59
60
|
.post('/cas/sysUser/checkLoginTimeRule', {
|
|
60
61
|
appCode: props.app || appkitOptions.app(),
|
|
61
62
|
tenantId: appkitOptions.tenant(),
|
|
63
|
+
device: 'mini',
|
|
62
64
|
})
|
|
63
65
|
.then((result: any) => {
|
|
64
66
|
if (result === true) return
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
showLoginRule.value = true
|
|
68
|
-
})
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// 查询当前租户登录规则
|
|
72
|
-
async function getLoginRule() {
|
|
73
|
-
const appkitOptions = useAppKitOptions()
|
|
68
|
+
loginRuleTip.value = result.message
|
|
74
69
|
|
|
75
|
-
|
|
76
|
-
$http
|
|
77
|
-
.get('/cas/sysUser/getLoginRule', {
|
|
78
|
-
appCode: props.app || appkitOptions.app(),
|
|
79
|
-
})
|
|
80
|
-
.then((result) => {
|
|
81
|
-
loginRule.value = result
|
|
70
|
+
showLoginRule.value = true
|
|
82
71
|
|
|
83
|
-
emits('show',
|
|
72
|
+
emits('show', loginRuleTip.value)
|
|
84
73
|
})
|
|
85
74
|
}
|
|
86
75
|
|