fix: 问题修复
This commit is contained in:
parent
9af63de623
commit
946d29ad97
@ -152,7 +152,11 @@ async function bindArchive(customerId) {
|
||||
const res = await api('bindMiniAppArchive', { id: customerId, corpId: corpId.value, teamId: teamId.value, miniAppId: account.value.openid });
|
||||
if (res && res.success) {
|
||||
await toast('绑定成功');
|
||||
uni.reLaunch({ url: `/pages/home/home?corpId=${corpId.value}&teamId=${teamId.value}` })
|
||||
set('home-invite-teamId', teamId.value);
|
||||
uni.switchTab({
|
||||
url:'/pages/home/home'
|
||||
})
|
||||
// uni.reLaunch({ url: `/pages/home/home?corpId=${corpId.value}&teamId=${teamId.value}` })
|
||||
} else {
|
||||
toast(res?.message || '绑定失败');
|
||||
}
|
||||
@ -195,7 +199,7 @@ async function getBaseForm() {
|
||||
formItems.value = Array.isArray(res.data) ? res.data : [];
|
||||
const mobileIndex = formItems.value.findIndex(item => item.title === 'mobile');
|
||||
if (mobileIndex > -1) {
|
||||
formItems.value[mobileIndex].appendText = `(授权手机号不可修改)`;
|
||||
formItems.value[mobileIndex].appendText = `(授权手机号)`;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@ -22,7 +22,8 @@
|
||||
<script setup>
|
||||
import { computed, ref } from "vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
import useGuard from "@/hooks/useGuard";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
// import useGuard from "@/hooks/useGuard";
|
||||
import useAccount from "@/store/account";
|
||||
import api from "@/utils/api";
|
||||
import { toast } from "@/utils/widget";
|
||||
@ -37,12 +38,12 @@ import teamMate from "./team-mate.vue";
|
||||
import ycHome from "./yc-home.vue";
|
||||
import pageLoading from "./loading.vue";
|
||||
|
||||
const { useLoad, useShow } = useGuard();
|
||||
// const { useLoad, useShow } = useGuard();
|
||||
const { account } = storeToRefs(useAccount());
|
||||
|
||||
const team = ref(null);
|
||||
const teams = ref([]);
|
||||
const loading = ref(true);
|
||||
const loading = ref(false);
|
||||
const customers = ref([]);
|
||||
|
||||
const corpId = computed(() => team.value?.corpId);
|
||||
@ -83,14 +84,18 @@ async function getTeams() {
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
useLoad((opts) => {
|
||||
if (opts.teamId) {
|
||||
team.value = { teamId: opts.teamId, corpId: opts.corpId };
|
||||
}
|
||||
});
|
||||
// useLoad((opts) => {
|
||||
// if (opts.teamId) {
|
||||
// team.value = { teamId: opts.teamId, corpId: opts.corpId };
|
||||
// }
|
||||
// });
|
||||
|
||||
useShow(() => {
|
||||
getTeams();
|
||||
onShow(() => {
|
||||
if (account.value && account.value.openid) {
|
||||
getTeams();
|
||||
} else {
|
||||
teams.value = [];
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
@ -29,7 +29,7 @@ export default defineStore("accountStore", () => {
|
||||
code
|
||||
});
|
||||
loading.value = false
|
||||
if (res.success && res.data && res.data.mobile) {
|
||||
if (res.success && res.data) {
|
||||
account.value = res.data;
|
||||
openid.value = res.data.openid;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user