整合代码

main
Connor 2024-06-05 12:56:09 +08:00
parent ea4db68fbe
commit f7500713af
1 changed files with 10 additions and 29 deletions

View File

@ -145,7 +145,8 @@ import PostView from "@/pages/common/postview/index.vue";
const postTypeOpen = ref(false);
const bgColor = ref('rgba(170, 0, 0, 0)');
const postTypeList = ['发布话题', '发布活动'];
// const postTypeList = ['', ''];
const postTypeList = [{lable:'发布话题',id:1}, {lable:'发布活动',id:2}];
const searchPrerequisiteList = [
'热门', '最新', '筛选3', '筛选4', '筛选5', '筛选6', '筛选7', '筛选8', '筛选9'
];
@ -243,6 +244,14 @@ import PostView from "@/pages/common/postview/index.vue";
}
]);
const publishTalk = (item) => {
console.log()
if(item.id === 2){
//todo
proxy.$tab.navigateTo('/pages/activity/publish')
}
}
const previewImage = (url, urls) => {
uni.previewImage({
current: url, // http
@ -280,34 +289,6 @@ import PostView from "@/pages/common/postview/index.vue";
viewIndex.value = item.index;
};
const cancelCollection = (index) => {
postList[index].likeCount -= 1;
postList[index].isLike = !postList[index].isLike;
};
const addCollection = (index) => {
postList[index].likeCount += 1;
postList[index].isLike = !postList[index].isLike;
};
const cancelFavorite = (index) => {
postList[index].favoriteCount -= 1;
postList[index].ifFavorite = !postList[index].ifFavorite;
};
const addFavorite = (index) => {
postList[index].favoriteCount += 1;
postList[index].ifFavorite = !postList[index].ifFavorite;
};
const cancelFocus = (index) => {
postList[index].isFocus = !postList[index].isFocus;
};
const addFocus = (index) => {
postList[index].isFocus = !postList[index].isFocus;
};
const handerLi = (res) => {
lefther.value = res;
searchPrerequisite.value = searchPrerequisiteList[res];