This commit is contained in:
liuye
2024-07-16 10:12:00 +08:00
parent 1a67e725af
commit 8e389a2afc
3 changed files with 39 additions and 57 deletions

View File

@@ -2,12 +2,11 @@
<div class="AppRecord"> <div class="AppRecord">
<u-navbar title="Copilot小助理" title-color="#000" title-width="300" title-size="32" :title-bold="true" <u-navbar title="Copilot小助理" title-color="#000" title-width="300" title-size="32" :title-bold="true"
:background="backgroundNavbar" :is-back="false" :is-fixed="true" height="44"></u-navbar> :background="backgroundNavbar" :is-back="false" :is-fixed="true" height="44"></u-navbar>
<div class="list-bg"> <div class="list-bg"></div>
<div class="search-content"> <div class="search-content">
<u-search v-model="searchVal" :clearabled="true" placeholder="请输入搜索关键词…" :show-action="false" <u-search v-model="searchVal" :clearabled="true" placeholder="请输入搜索关键词…" :show-action="false"
bg-color="#fff" search-icon-color="#E2E8F1" color="#666" height="72" @search="getSearchList" @clear="handerClear"> bg-color="#fff" search-icon-color="#E2E8F1" color="#666" height="72" @search="getSearchList" @clear="handerClear">
</u-search> </u-search>
</div>
</div> </div>
<div class="list-content" :style="{'top': `${statusBarHeight+110}px`}"> <div class="list-content" :style="{'top': `${statusBarHeight+110}px`}">
<div class="item" v-for="(item, index) in messageList" :key="index"> <div class="item" v-for="(item, index) in messageList" :key="index">
@@ -142,19 +141,22 @@ page {
width: 100%; width: 100%;
height: 420px; height: 420px;
background-image: url("https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/content-top-bg.png"); background-image: url("https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/content-top-bg.png");
position: fixed;
left: 0;
background-size: 100vw; background-size: 100vw;
background-repeat: no-repeat; background-repeat: no-repeat;
.search-content { position: fixed;
padding: 32px; left: 0;
width: 100%; }
box-sizing: border-box; .search-content {
position: fixed; padding: 32px;
left: 0; width: 100%;
z-index: 99; // background: linear-gradient(to bottom, #D7EDFE, #EAF5FE);
background: linear-gradient(to bottom, #D7EDFE, #EAF5FE); background-image: url("https://cdn.sinoecare.com/i/2024/07/15/6694f173557c9.png");
} background-size: 100vw;
background-repeat: no-repeat;
box-sizing: border-box;
position: fixed;
left: 0;
z-index: 99;
} }
.list-content { .list-content {
width: 100%; width: 100%;

View File

@@ -54,7 +54,8 @@ export default {
], ],
current: 1, current: 1,
pages: 2, pages: 2,
aiConfigId: '' aiConfigId: '',
isFirst: true
} }
}, },
computed: { computed: {
@@ -87,12 +88,16 @@ export default {
}) })
this.messageList = this.current == 1 ? res.data.records : [...res.data.records, ...this.messageList] this.messageList = this.current == 1 ? res.data.records : [...res.data.records, ...this.messageList]
var idPage = res.data.records.length-1 var idPage = res.data.records.length-1
this.$nextTick(() => { if(this.isFirst) { //初始化不下滑到最新页
uni.pageScrollTo({ this.isFirst = false
duration: 300, }else {
selector: this.current == 1 ? `.item${this.messageList.length-1}` : `.item${idPage}` this.$nextTick(() => {
}); uni.pageScrollTo({
}) duration: 300,
selector: this.current == 1 ? `.item${this.messageList.length-1}` : `.item${idPage}`
});
})
}
this.pages = res.data.pages this.pages = res.data.pages
this.$hideLoading() this.$hideLoading()
}else { }else {

View File

@@ -6,7 +6,7 @@
<img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt=""> <img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt="">
</div> </div>
<div class="statistics-content" v-if="currentTabBar == 0"> <div class="statistics-content" v-if="currentTabBar == 0">
<div class="top-tabs" :style="{'top': `${statusBarHeight+50}px`}"> <div class="top-tabs">
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#fff" inactive-color="#222" <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#fff" inactive-color="#222"
active-color="#1D2229" :bar-style="barStyle" font-size="34" @change="change"></u-tabs> active-color="#1D2229" :bar-style="barStyle" font-size="34" @change="change"></u-tabs>
</div> </div>
@@ -514,40 +514,15 @@ uni-page-body {
z-index: -1; z-index: -1;
} }
} }
.header-content-bg {
width: 100%;
position: relative;
img {
width: 100%;
height: 592px;
position: absolute;
z-index: -1;
}
}
.top-tabs {
width: calc(100% - 64px);
box-sizing: border-box;
position: fixed;
left: 32px;
}
::v-deep .u-tabs {
border-bottom: 1px solid #eee;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
}
.statistics-content { .statistics-content {
padding-bottom: 216px; padding-bottom: 216px;
// .top-tabs { .top-tabs {
// padding: 32px; padding: 32px;
// box-sizing: border-box; box-sizing: border-box;
// ::v-deep .u-tabs { ::v-deep .u-tabs {
// border-radius: 16px; border-radius: 16px;
// } }
// } }
.statistics-chart { .statistics-chart {
padding: 0 32px; padding: 0 32px;
.statistics-num { .statistics-num {