Compare commits

...

10 Commits

Author SHA1 Message Date
383abed2e8 Merge branch 'wyfMain-dev'
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
2025-03-24 16:39:04 +08:00
wwt
2fa381bea1 fix bug#4088
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
2025-03-24 15:55:54 +08:00
wwt
988912de2f 处理全局消息提示,移除部分页面接口的提示
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
2025-03-24 15:24:16 +08:00
wwt
47d5cab23a 处理message提示
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
2025-03-24 14:55:21 +08:00
wwt
ed2d6dfbd5 Merge branch 'main' into wwt 2025-03-24 14:18:43 +08:00
wwt
e780d44255 1
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
2025-03-24 14:18:33 +08:00
wwt
f6d66fa71c 处理消息提示 2025-03-24 14:18:11 +08:00
wwt
5822c80f6a 1 2025-03-24 11:36:28 +08:00
wwt
fe857f1e81 Merge branch 'wwt'
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
2025-03-24 11:34:59 +08:00
wwt
4a670201c6 fix bug#3909 2025-03-24 11:34:13 +08:00
7 changed files with 47 additions and 37 deletions

View File

@ -90,8 +90,6 @@ const onSubmit = () => {
ServeUploadAvatar(form).then((res) => {
if (res.code == 200) {
emit('success', res.data.avatar)
} else {
message.warning(res.message)
}
})
})

View File

@ -69,7 +69,7 @@
class="text-[#747474] text-[28rpx] leading-[40rpx] font-bold"
:class="[
index !== 0 ? 'mt-[10rpx]' : '',
depsNoExpanded && index > 4 ? 'hidden' : '',
depsNoExpanded_1 && index > 4 ? 'hidden' : '',
]"
>
{{ item.name }}
@ -79,10 +79,10 @@
>
<div
v-if="depCheckedKeys.length > 5"
@click="depsNoExpanded = !depsNoExpanded"
@click="depsNoExpanded_1 = !depsNoExpanded_1"
class="w-[100rpx]"
>
{{ depsNoExpanded ? '展开' : '收起' }}
{{ depsNoExpanded_1 ? '展开' : '收起' }}
</div>
</div>
</div>
@ -150,7 +150,7 @@
class="text-[#747474] text-[28rpx] leading-[40rpx] font-bold"
:class="[
index !== 0 ? 'mt-[10rpx]' : '',
depsNoExpanded && index > 4 ? 'hidden' : '',
depsNoExpanded_2 && index > 4 ? 'hidden' : '',
]"
>
{{ item.name }}
@ -160,10 +160,10 @@
>
<div
v-if="groupAdmins.length > 5"
@click="depsNoExpanded = !depsNoExpanded"
@click="depsNoExpanded_2 = !depsNoExpanded_2"
class="w-[100rpx]"
>
{{ depsNoExpanded ? '展开' : '收起' }}
{{ depsNoExpanded_2 ? '展开' : '收起' }}
</div>
</div>
</div>
@ -212,7 +212,8 @@ const groupStore = useGroupStore()
const { userInfo } = useAuth()
const groupChatType = ref('')
const depsNoExpanded = ref(true)
const depsNoExpanded_1 = ref(true)
const depsNoExpanded_2 = ref(true)
onLoad(()=> {
@ -317,11 +318,9 @@ const handleConfirm = async () => {
} else {
}
}
//
const confirmBtnStatus = computed(() => {
let disabledT = false
console.log(groupActiveIndex.value !== -1)
if (
groupName.value === '' ||
(groupActiveIndex.value && groupActiveIndex.value === -1) ||
@ -329,9 +328,16 @@ const confirmBtnStatus = computed(() => {
) {
return true
}
//
let temp = []
allChooseMembers?.value?.forEach((ele) => {
if (ele.ID !== userInfo.value.ID) {
temp.push(ele)
}
})
switch (groupActiveIndex.value) {
case 0:
if(allChooseMembers?.value?.length < 2) {
if(temp?.length < 2) {
disabledT = true
}
break
@ -344,7 +350,7 @@ const confirmBtnStatus = computed(() => {
}
break
case 2:
if(allChooseMembers?.value?.length < 2) {
if(temp?.length < 2) {
disabledT = true
}
break
@ -355,12 +361,8 @@ const confirmBtnStatus = computed(() => {
})
onShow(() => {
depsNoExpanded.value = true
if(groupActiveIndex.value === 0 || groupActiveIndex.value === 2){
// allChooseMembers.value = []
console.log(allChooseMembers.value)
}
depsNoExpanded_1.value = true;
depsNoExpanded_2.value = true;
})
</script>
<style scoped lang="scss">

View File

@ -1,5 +1,21 @@
import Request from '@/service/request/index.js'
import {useAuth} from "@/store/auth";
import { createApp } from 'vue';
import XMessage from '@/components/x-message/index.vue';
// 创建消息提示实例
const messageInstance = (() => {
const messageNode = document.createElement('div');
document.body.appendChild(messageNode);
const app = createApp(XMessage);
const instance = app.mount(messageNode);
return {
warning: (msg) => instance.showMessage({ type: 'warning', message: msg }),
error: (msg) => instance.showMessage({ type: 'error', message: msg }),
success: (msg) => instance.showMessage({ type: 'success', message: msg }),
info: (msg) => instance.showMessage({ type: 'info', message: msg })
};
})();
const { token ,refreshToken,userInfo}=useAuth()
let isRefreshing = false;
let refreshSubscribers = [];
@ -24,7 +40,8 @@ const request = new Request({
},
responseInterceptors: async (res) => {
if(res.data.status===1){
message.warning(res.data.msg)
// message.warning(res.data.msg)
messageInstance.warning(res.data.msg)
}
if (res.data.status === 401) {
return getRefreshToken(res);
@ -33,10 +50,14 @@ const request = new Request({
// })
}
if ([200, 201, 204].includes(res.status)) {
if(res.data.code !== 200 && res.data.code!== 0) {
messageInstance.error(res.data.message || res.data.msg || 'An error occurred.');
}
return res.config.responseType === 'blob' ? res : res;
} else {
/* message.error(res.data.msg || 'An error occurred.');*/
return Promise.reject(new Error(res.data.msg || 'An error occurred.'));
messageInstance.error(res.data.message || res.data.msg || 'An error occurred.');
return Promise.reject(new Error(res.data.message || res.data.msg || 'An error occurred.'));
}
}
}
@ -59,7 +80,8 @@ async function getRefreshToken(response) {
})
return request.request(response.config);
} else {
message.error(res.message || res.msg);
messageInstance.error(res.message || res.msg);
throw new Error(res.message || res.msg);
}
} catch (error) {

View File

@ -5,7 +5,7 @@ import { userInfoApi } from "@/api/user";
import {ref} from 'vue'
export const useAuth = createGlobalState(() => {
const token = useStorage('token', '', uniStorage)
// const token = ref("79b5c732d96d2b27a48a99dfd4a5566c43aaa5796242e854ebe3ffc198d6876b9628e7b764d9af65ab5dbb2d517ced88170491b74b048c0ba827c0d3741462cb89dc59ed46653a449af837a8262941caaef1334d640773710f8cd96473bacfb190cba595a5d6a9c87d70f0999a3ebb41147213b31b4bdccffca66a56acf3baab5af0154f0dce360079f37709f78e13711036899344bddb0fb4cf0f2890287cb62c3fcbe33368caa5e213624577be8b8420ab75b1f50775ee16142a4321c5d56995f37354a66a969da98d95ba6e65d142ed097e04b411c1ebad2f62866d0ec7e1838420530a9941dbbcd00490199f8b899eade812a32201a0a025612a7615c43b1ac91d78661c4e9b7d0ca9701e2ea152073ff929e2cc3f2f29c1934a8873a44886758d3cf16439dfda105c00c3c2e0d8748163a63ce7ce8e44f599b42a89d2b6")
// const token = ref("79b5c732d96d2b27a48a99dfd4a5566c43aaa5796242e854ebe3ffc198d6876b9628e7b764d9af65ab5dbb2d517ced88170491b74b048c0ba827c0d3741462cb89dc59ed46653a449af837a8262941caba0afc18e7cb819d125e8c04282beb5d4dd454307169f7eb51cd3dbbee20c1a17784f78ad30c3b3a102bd03c3218080beedae501a95c365d360a7a0d682cba2eca94a2915c13f0bdcb42f2eab9458cb4bd89ae6f3200fe4893d64caf1bce02894aab876f94f7825d23be507733468deba21734b6d666b75fd0bee74753fdd6ca5def7ec42cd7dbb47750e61cac6965f34fd71b52be66a472d3ee5b1e4661e59d4489860c2e1d8c178de5b43853ef9be822f00e0903b5c97efaa9ba0d9c76a1a91a2d6d77c5a19c551906a67fbfd3af69bd6a59310b8b300658e9b7248d9dd51a66be399ef412cb7c83bc81abfc15b65b")
const refreshToken = useStorage('refreshToken', '', uniStorage)
const userInfo = useStorage('userInfo', {}, uniStorage)
const leaderList = useStorage('leaderList', [], uniStorage)

View File

@ -218,8 +218,6 @@ export const useDialogueStore = defineStore('dialogue', {
if (res.code == 200) {
this.batchDelDialogueRecord(msgIds)
batchDelDialogueRecord(msgIds)
} else {
message.warning(res.message)
}
})
},
@ -243,8 +241,6 @@ export const useDialogueStore = defineStore('dialogue', {
ServeRevokeRecords({ msg_id }).then((res) => {
if (res.code == 200) {
this.updateDialogueRecord({ msg_id, is_revoke: 1 })
} else {
message.warning(res.message)
}
})
},

View File

@ -41,8 +41,6 @@ export const useEditorStore = defineStore('editor', {
}).then((res) => {
if (res.code == 200) {
this.loadUserEmoticon()
} else {
message.warning(res.message)
}
})
},
@ -55,8 +53,6 @@ export const useEditorStore = defineStore('editor', {
ServeUploadEmoticon(data).then((res) => {
if (res.code == 200) {
this.emoticon.items[1].children.unshift(res.data)
} else {
message.warning(res.message)
}
})
},
@ -69,9 +65,7 @@ export const useEditorStore = defineStore('editor', {
if (res.code == 200) {
this.emoticon.items[1].children.splice(resoure.index, 1)
message.success('删除成功')
} else {
message.warning(res.message)
}
}
})
}
}

View File

@ -74,9 +74,7 @@ export const useUploadsStore = defineStore('uploads', {
this.triggerUpload(upload_id,msgId)
this.isShow = true
} else {
message.error(res.message)
}
}
})
},