fix: todo修复

This commit is contained in:
hw
2025-11-21 18:19:42 +08:00
parent 0251dc2f3b
commit 8d7d3d5fe1
86 changed files with 963 additions and 1195 deletions

View File

@@ -1,5 +0,0 @@
export * from './types';
export { default as WxMsg } from './wx-msg.vue';
// TODO @hw每个组件下的 index.ts 要不都删除,统一在 mp/components/index.ts 暴露就好了?

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { User } from './types';
import type { MpUserApi } from '#/api/mp/user/index';
import { preferences } from '@vben/preferences';
import { formatDateTime } from '@vben/utils';
@@ -11,7 +11,7 @@ defineOptions({ name: 'MsgList' });
const props = defineProps<{
accountId: number;
list: any[];
user: User;
user: Partial<MpUserApi.User>;
}>();
const SendFrom = {
@@ -63,7 +63,7 @@ function getNickname(sendFrom: number) {
<style lang="scss" scoped>
/* 因为 joolun 实现依赖 avue 组件,该页面使用了 comment.scss、card.scc */
/** TODO @dylan@hw 看看有没适合 tindwind 的哈。 */
/** TODO @dylan 看看有没适合 tindwind 的哈。 */
@import url('./comment.scss');
@import url('./card.scss');

View File

@@ -2,7 +2,6 @@
import { MpMsgType } from '@vben/constants';
import { IconifyIcon } from '@vben/icons';
// TODO @hw貌似这个 antd 才有ele 需要有么?
import {
WxLocation,
WxMusic,

View File

@@ -1,7 +0,0 @@
// TODO @hw用 MpUserApi 里的 user 可以么?
export interface User {
accountId: number;
avatar: string;
nickname: string;
}

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { User } from './types';
import type { MpUserApi } from '#/api/mp/user/index';
import { nextTick, onMounted, reactive, ref, unref } from 'vue';
@@ -29,7 +29,7 @@ const queryParams = reactive({
pageSize: 14, // 每页显示多少条
});
const user: User = reactive({
const user: Partial<MpUserApi.User> = reactive({
accountId, // 公众号账号编号
avatar: preferences.app.defaultAvatar,
nickname: '用户', // 由于微信不再提供昵称,直接使用"用户"展示