refactor: mp模块统一accountId未初始化值为-1,删除QueryParams定义

(cherry picked from commit 198752868c)
This commit is contained in:
dhb52
2023-04-22 23:43:35 +08:00
committed by shizhong
parent 64d4583805
commit a737b267a8
11 changed files with 42 additions and 83 deletions

View File

@ -113,27 +113,20 @@ const loading = ref(true) // 列表的加载中
const total = ref(0) // 列表的总页数
const list = ref<any[]>([]) // 列表的数据
interface QueryParams {
pageNo: number
pageSize: number
accountId: number
openid: string | null
nickname: string | null
}
const queryParams: QueryParams = reactive({
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
accountId: 0,
openid: null,
nickname: null
accountId: -1,
openid: '',
nickname: ''
})
const queryFormRef = ref<FormInstance | null>(null) // 搜索的表单
const tagList = ref<any[]>([]) // 公众号标签列表
/** 侦听公众号变化 **/
const onAccountChanged = (id: number) => {
queryParams.pageNo = 1
queryParams.accountId = id
queryParams.pageNo = 1
getList()
}