parent
0da3c00dea
commit
df41b6860e
|
@ -79,7 +79,8 @@ const include = [
|
||||||
'element-plus/es/components/dropdown-item/style/css',
|
'element-plus/es/components/dropdown-item/style/css',
|
||||||
'element-plus/es/components/badge/style/css',
|
'element-plus/es/components/badge/style/css',
|
||||||
'element-plus/es/components/breadcrumb/style/css',
|
'element-plus/es/components/breadcrumb/style/css',
|
||||||
'element-plus/es/components/breadcrumb-item/style/css'
|
'element-plus/es/components/breadcrumb-item/style/css',
|
||||||
|
'element-plus/es/components/image/style/css'
|
||||||
]
|
]
|
||||||
|
|
||||||
const exclude = ['@iconify/json']
|
const exclude = ['@iconify/json']
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<el-option v-for="item in accountList" :key="item.id" :label="item.name" :value="item.id" />
|
<el-option v-for="item in accountList" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
<!-- TODO @芋艿:WxMpSelect 改成 WxAccountSelect,然后挪到现有的 wx-account-select 包下 -->
|
||||||
<script lang="ts" setup name="WxMpSelect">
|
<script lang="ts" setup name="WxMpSelect">
|
||||||
import * as MpAccountApi from '@/api/mp/account'
|
import * as MpAccountApi from '@/api/mp/account'
|
||||||
|
|
||||||
|
|
|
@ -102,5 +102,3 @@ const uploadError = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style></style>
|
|
||||||
|
|
|
@ -252,7 +252,6 @@ import * as MpFreePublishApi from '@/api/mp/freePublish'
|
||||||
import type { UploadFiles, UploadProps, UploadRawFile } from 'element-plus'
|
import type { UploadFiles, UploadProps, UploadRawFile } from 'element-plus'
|
||||||
// 可以用改本地数据模拟,避免API调用超限
|
// 可以用改本地数据模拟,避免API调用超限
|
||||||
// import drafts from './mock'
|
// import drafts from './mock'
|
||||||
|
|
||||||
const message = useMessage() // 消息
|
const message = useMessage() // 消息
|
||||||
|
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
|
@ -362,7 +361,7 @@ const submitForm = async () => {
|
||||||
} finally {
|
} finally {
|
||||||
dialogNewsVisible.value = false
|
dialogNewsVisible.value = false
|
||||||
addMaterialLoading.value = false
|
addMaterialLoading.value = false
|
||||||
getList()
|
await getList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -276,14 +276,11 @@ const uploadRules: FormRules = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 素材类型
|
// 素材类型
|
||||||
type MatertialType = 'image' | 'voice' | 'video'
|
type MaterialType = 'image' | 'voice' | 'video'
|
||||||
const type = ref<MatertialType>('image')
|
const type = ref<MaterialType>('image')
|
||||||
// 遮罩层
|
const loading = ref(false) // 遮罩层
|
||||||
const loading = ref(false)
|
const list = ref<any[]>([]) // 总条数
|
||||||
// 总条数
|
const total = ref(0) // 数据列表
|
||||||
// 数据列表
|
|
||||||
const list = ref<any[]>([])
|
|
||||||
const total = ref(0)
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
interface QueryParams {
|
interface QueryParams {
|
||||||
pageNo: number
|
pageNo: number
|
||||||
|
@ -301,7 +298,7 @@ const queryParams: QueryParams = reactive({
|
||||||
const fileList = ref<UploadUserFile[]>([])
|
const fileList = ref<UploadUserFile[]>([])
|
||||||
|
|
||||||
interface UploadData {
|
interface UploadData {
|
||||||
type: MatertialType
|
type: MaterialType
|
||||||
title: string
|
title: string
|
||||||
introduction: string
|
introduction: string
|
||||||
}
|
}
|
||||||
|
@ -345,7 +342,7 @@ const handleQuery = () => {
|
||||||
|
|
||||||
const onTabChange = (tabName: TabPaneName) => {
|
const onTabChange = (tabName: TabPaneName) => {
|
||||||
// 设置 type
|
// 设置 type
|
||||||
uploadData.type = tabName as MatertialType
|
uploadData.type = tabName as MaterialType
|
||||||
|
|
||||||
// 提前情况数据,避免tab切换后显示垃圾数据
|
// 提前情况数据,避免tab切换后显示垃圾数据
|
||||||
list.value = []
|
list.value = []
|
||||||
|
|
|
@ -71,11 +71,10 @@
|
||||||
<TagForm ref="formRef" @success="getList" />
|
<TagForm ref="formRef" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="MpTag">
|
<script setup lang="ts" name="MpTag">
|
||||||
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import * as MpTagApi from '@/api/mp/tag'
|
import * as MpTagApi from '@/api/mp/tag'
|
||||||
import TagForm from './TagForm.vue'
|
import TagForm from './TagForm.vue'
|
||||||
import WxMpSelect from '@/views/mp/components/WxMpSelect.vue'
|
import WxMpSelect from '@/views/mp/components/WxMpSelect.vue'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
|
@ -93,7 +92,6 @@ const queryParams: QueryParams = reactive({
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
accountId: undefined
|
accountId: undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
const formRef = ref<InstanceType<typeof TagForm> | null>(null)
|
const formRef = ref<InstanceType<typeof TagForm> | null>(null)
|
||||||
|
|
||||||
/** 侦听公众号变化 **/
|
/** 侦听公众号变化 **/
|
||||||
|
|
|
@ -121,15 +121,8 @@ const queryParams: QueryParams = reactive({
|
||||||
openid: null,
|
openid: null,
|
||||||
nickname: null
|
nickname: null
|
||||||
})
|
})
|
||||||
|
|
||||||
const tagList = ref<any[]>([]) // 公众号标签列表
|
|
||||||
const queryFormRef = ref<FormInstance | null>(null) // 搜索的表单
|
const queryFormRef = ref<FormInstance | null>(null) // 搜索的表单
|
||||||
const formRef = ref<InstanceType<typeof UserForm> | null>(null)
|
const tagList = ref<any[]>([]) // 公众号标签列表
|
||||||
|
|
||||||
/** 初始化 */
|
|
||||||
onMounted(async () => {
|
|
||||||
tagList.value = await MpTagApi.getSimpleTagList()
|
|
||||||
})
|
|
||||||
|
|
||||||
/** 侦听公众号变化 **/
|
/** 侦听公众号变化 **/
|
||||||
const onAccountChanged = (id?: number) => {
|
const onAccountChanged = (id?: number) => {
|
||||||
|
@ -165,6 +158,7 @@ const resetQuery = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 添加/修改操作 */
|
/** 添加/修改操作 */
|
||||||
|
const formRef = ref<InstanceType<typeof UserForm> | null>(null)
|
||||||
const openForm = (id: number) => {
|
const openForm = (id: number) => {
|
||||||
formRef.value?.open(id)
|
formRef.value?.open(id)
|
||||||
}
|
}
|
||||||
|
@ -175,7 +169,12 @@ const handleSync = async () => {
|
||||||
await message.confirm('是否确认同步粉丝?')
|
await message.confirm('是否确认同步粉丝?')
|
||||||
await MpUserApi.syncUser(queryParams.accountId)
|
await MpUserApi.syncUser(queryParams.accountId)
|
||||||
message.success('开始从微信公众号同步粉丝信息,同步需要一段时间,建议稍后再查询')
|
message.success('开始从微信公众号同步粉丝信息,同步需要一段时间,建议稍后再查询')
|
||||||
getList()
|
await getList()
|
||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 初始化 */
|
||||||
|
onMounted(async () => {
|
||||||
|
tagList.value = await MpTagApi.getSimpleTagList()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue