File tree Expand file tree Collapse file tree 9 files changed +20
-334
lines changed Expand file tree Collapse file tree 9 files changed +20
-334
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ const include = [
75
75
'element-plus/es/components/dropdown-item/style/css' ,
76
76
'element-plus/es/components/badge/style/css' ,
77
77
'element-plus/es/components/breadcrumb/style/css' ,
78
- 'element-plus/es/components/breadcrumb-item/style/css'
78
+ 'element-plus/es/components/breadcrumb-item/style/css' ,
79
+ 'element-plus/es/components/image/style/css'
79
80
]
80
81
81
82
const exclude = [ '@iconify/json' ]
Original file line number Diff line number Diff line change 3
3
<el-option v-for =" item in accountList" :key =" item.id" :label =" item.name" :value =" item.id" />
4
4
</el-select >
5
5
</template >
6
-
6
+ <!-- TODO @芋艿:WxMpSelect 改成 WxAccountSelect,然后挪到现有的 wx-account-select 包下 -->
7
7
<script lang="ts" setup name="WxMpSelect">
8
8
import * as MpAccountApi from ' @/api/mp/account'
9
9
Original file line number Diff line number Diff line change @@ -102,5 +102,3 @@ const uploadError = () => {
102
102
</div >
103
103
</div >
104
104
</template >
105
-
106
- <style ></style >
Original file line number Diff line number Diff line change @@ -252,7 +252,6 @@ import * as MpFreePublishApi from '@/api/mp/freePublish'
252
252
import type { UploadFiles , UploadProps , UploadRawFile } from ' element-plus'
253
253
// 可以用改本地数据模拟,避免API调用超限
254
254
// import drafts from './mock'
255
-
256
255
const message = useMessage () // 消息
257
256
258
257
const loading = ref (true ) // 列表的加载中
@@ -362,7 +361,7 @@ const submitForm = async () => {
362
361
} finally {
363
362
dialogNewsVisible .value = false
364
363
addMaterialLoading .value = false
365
- getList ()
364
+ await getList ()
366
365
}
367
366
}
368
367
Original file line number Diff line number Diff line change @@ -277,14 +277,11 @@ const uploadRules: FormRules = {
277
277
}
278
278
279
279
// 素材类型
280
- type MatertialType = ' image' | ' voice' | ' video'
281
- const type = ref <MatertialType >(' image' )
282
- // 遮罩层
283
- const loading = ref (false )
284
- // 总条数
285
- // 数据列表
286
- const list = ref <any []>([])
287
- const total = ref (0 )
280
+ type MaterialType = ' image' | ' voice' | ' video'
281
+ const type = ref <MaterialType >(' image' )
282
+ const loading = ref (false ) // 遮罩层
283
+ const list = ref <any []>([]) // 总条数
284
+ const total = ref (0 ) // 数据列表
288
285
// 查询参数
289
286
interface QueryParams {
290
287
pageNo: number
@@ -302,7 +299,7 @@ const queryParams: QueryParams = reactive({
302
299
const fileList = ref <UploadUserFile []>([])
303
300
304
301
interface UploadData {
305
- type: MatertialType
302
+ type: MaterialType
306
303
title: string
307
304
introduction: string
308
305
}
@@ -346,7 +343,7 @@ const handleQuery = () => {
346
343
347
344
const onTabChange = (tabName : TabPaneName ) => {
348
345
// 设置 type
349
- uploadData .type = tabName as MatertialType
346
+ uploadData .type = tabName as MaterialType
350
347
351
348
// 提前情况数据,避免tab切换后显示垃圾数据
352
349
list .value = []
Original file line number Diff line number Diff line change 71
71
<TagForm ref =" formRef" @success =" getList" />
72
72
</template >
73
73
<script setup lang="ts" name="MpTag">
74
+ import { dateFormatter } from ' @/utils/formatTime'
74
75
import * as MpTagApi from ' @/api/mp/tag'
75
76
import TagForm from ' ./TagForm.vue'
76
77
import WxMpSelect from ' @/views/mp/components/WxMpSelect.vue'
77
- import { dateFormatter } from ' @/utils/formatTime'
78
-
79
78
const message = useMessage () // 消息弹窗
80
79
const { t } = useI18n () // 国际化
81
80
@@ -93,7 +92,6 @@ const queryParams: QueryParams = reactive({
93
92
pageSize: 10 ,
94
93
accountId: undefined
95
94
})
96
-
97
95
const formRef = ref <InstanceType <typeof TagForm > | null >(null )
98
96
99
97
/** 侦听公众号变化 **/
Original file line number Diff line number Diff line change @@ -121,15 +121,8 @@ const queryParams: QueryParams = reactive({
121
121
openid: null ,
122
122
nickname: null
123
123
})
124
-
125
- const tagList = ref <any []>([]) // 公众号标签列表
126
124
const queryFormRef = ref <FormInstance | null >(null ) // 搜索的表单
127
- const formRef = ref <InstanceType <typeof UserForm > | null >(null )
128
-
129
- /** 初始化 */
130
- onMounted (async () => {
131
- tagList .value = await MpTagApi .getSimpleTagList ()
132
- })
125
+ const tagList = ref <any []>([]) // 公众号标签列表
133
126
134
127
/** 侦听公众号变化 **/
135
128
const onAccountChanged = (id ? : number ) => {
@@ -165,6 +158,7 @@ const resetQuery = () => {
165
158
}
166
159
167
160
/** 添加/修改操作 */
161
+ const formRef = ref <InstanceType <typeof UserForm > | null >(null )
168
162
const openForm = (id : number ) => {
169
163
formRef .value ?.open (id )
170
164
}
@@ -175,7 +169,12 @@ const handleSync = async () => {
175
169
await message .confirm (' 是否确认同步粉丝?' )
176
170
await MpUserApi .syncUser (queryParams .accountId )
177
171
message .success (' 开始从微信公众号同步粉丝信息,同步需要一段时间,建议稍后再查询' )
178
- getList ()
172
+ await getList ()
179
173
} catch {}
180
174
}
175
+
176
+ /** 初始化 */
177
+ onMounted (async () => {
178
+ tagList .value = await MpTagApi .getSimpleTagList ()
179
+ })
181
180
</script >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments