From 572d90c86731b8a17734cceaccc9ea54b3f3c1f1 Mon Sep 17 00:00:00 2001 From: Connor <1813766834@qq.com> Date: Tue, 28 May 2024 10:34:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=AF=9D=E9=A2=98/=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 5 +- pages/index.vue | 816 +++++++++++++++++++++++++++-------------- pages/search/index.vue | 428 +++++++++++---------- 3 files changed, 761 insertions(+), 488 deletions(-) diff --git a/pages.json b/pages.json index a5ded61..e8359d9 100644 --- a/pages.json +++ b/pages.json @@ -92,9 +92,8 @@ }, { "path": "pages/search/index", "style": { - - "navigationStyle": "custom" , - "navigationBarTextStyle": "white" + "navigationBarTitleText": "搜索", + } }], "tabBar": { diff --git a/pages/index.vue b/pages/index.vue index 7d11e1f..ab30ab4 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -4,33 +4,44 @@ + - - + + 在食堂捡到一张饭卡 - + - - 热门 - + + {{searchPrerequisite}} + + + @@ -68,21 +79,43 @@ - + +
+ + +
+ {{item.uname}} {{item.createTime + '·' + item.address}}
- + 关注 已关注 {{item.title}} {{item.content}} - + + + + + + + + + + + + + + + - +
- + + + + + + + + + 全部类目 + + + + + + 点击选择类目,仅可选择一个 + + + + + +
    +
  • + {{ item }} +
  • +
+
+
+ + +
+
+
@@ -148,7 +235,15 @@ data() { return { viewIndex: 0, + searchOpen: false, + lefther: 0, + searchPrerequisite: '热门', + postTypeOpen: false, + postTypeList: ['发布话题', '发布活动'], bgColor: 'rgba(170, 0, 0, 0)', + searchPrerequisiteList: [ + '热门', '最新', '筛选3', '筛选4', '筛选5', '筛选6', '筛选7', '筛选8', '筛选9' + ], list1: [{ name: '关注', }, { @@ -173,12 +268,14 @@ createTime: '11分钟前', address: '南开大学', isFocus: false, + isOfficial: true, title: '怎么评论爱德华·艾尔加这位音乐家及其他的作品,欢迎大家发表自己的看法?', content: '八年前,学弟在工地上杀了一个工友,杀人前,他给警察打了电话,预告杀人的时间和地点,并......', type: '1', media: [ 'https://tu.sioe.cn/gj/qiege/image.jpg', 'https://picx.zhimg.com/v2-3b4fc7e3a1195a081d0259246c38debc_720w.jpg?source=172ae18b', + 'https://bpic.51yuansu.com/backgd/cover/00/63/09/64b52b1426fff_800.jpg?x-oss-process=image/resize,w_780/sharpen,100', 'https://tu.sioe.cn/gj/qiege/image.jpg', ], tab: [ @@ -197,6 +294,7 @@ createTime: '2024-5-5', address: '南开大学', isFocus: false, + isOfficial: false, // title: '怎么评论爱德华·艾尔加这位音乐家及其他的作品,欢迎大家发表自己的看法?', content: '是一个中文互联网高质量问答社区和创作者聚集的原创内容平台,于2011年1月正式上线', type: '1', @@ -212,6 +310,29 @@ commentCount: 13, ifFavorite: true, favoriteCount: 13 + },{ + avatar: 'https://picx.zhimg.com/v2-02f89d05a781ffed9fd2e32654d93135_720w.jpg?source=172ae18b', + uname: '恋爱60秒', + createTime: '2024-5-4', + address: '理工大学', + isFocus: false, + isOfficial: false, + title: '怎么评论爱德华·艾尔加这位音乐家及其他的作品,欢迎大家发表自己的看法?', + content: '是一个中文互联网高质量问答社区和创作者聚集的原创内容平台,于2011年1月正式上线', + type: '1', + media: [ + 'https://tu.sioe.cn/gj/qiege/image.jpg', + 'https://picx.zhimg.com/v2-3b4fc7e3a1195a081d0259246c38debc_720w.jpg?source=172ae18b' + ], + tab: [ + '校园风景' + ], + transmitCount: 13, + isLike: false, + likeCount: 99, + commentCount: 13, + ifFavorite: false, + favoriteCount: 13 }] } }, @@ -219,6 +340,24 @@ console.log(this.$store.state.user.QNDomain); }, methods: { + previewImage(url, urls) { + uni.previewImage({ + current: url, // 当前显示图片的http链接 + urls: urls // 需要预览的图片http链接列表 + }); + }, + toScanCode() { + // 允许从相机和相册扫码 + uni.scanCode({ + success: function (res) { + console.log('条码类型:' + res.scanType); + console.log('条码内容:' + res.result); + } + }); + }, + togglePostType() { + this.postTypeOpen = !this.postTypeOpen; + }, toEarch() { console.log() this.$tab.navigateTo('/pages/search/index') @@ -261,12 +400,24 @@ addFocus(index) { console.log(111,index) this.postList[index].isFocus = !this.postList[index].isFocus; + }, + handerLi(res) { + this.lefther = res; + console.log(res) + this.searchPrerequisite = this.searchPrerequisiteList[res] + setTimeout(() => { + this.searchOpen = !this.searchOpen + }, 350); + + }, + handerShowHand() { + this.searchOpen = !this.searchOpen } } } - diff --git a/pages/search/index.vue b/pages/search/index.vue index eb4e402..26688dd 100644 --- a/pages/search/index.vue +++ b/pages/search/index.vue @@ -1,241 +1,239 @@ - - - \ No newline at end of file