optimize a page

This commit is contained in:
539943419 committed 2023-11-07 23:51:14 +08:00
1 parent 32b3421eb6
commit a173c22633
4 files changed
+104 -18

No files matched your search

+62 -6
View File
@@ -172,14 +172,35 @@
.title{
width: 100%;
height: 100rpx;
// background-color: aqua;
height: 10%;
background-color: aqua;
position:absolute;
top:55rpx;
top:0rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: x-large;
.page_back{
height: 70rpx;
width: 70rpx;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
// background-color: aquamarine;
top: 50rpx;
left:30rpx;
// font-size: 150rpx;
// font-weight: 900;
// font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
}
.content{
position:absolute;
width: 100%;
height: 90%;
top: 10%;
overflow: scroll;
}
// 知识库界面
@@ -194,9 +215,6 @@
// 历史记录
#page_history{
background-color: rgba($color: #fff5d2, $alpha: 1.0);
display: flex;
align-items: center;
justify-content: center;
.date1{
background-color: rgba($color: #fff5d2, $alpha: 1);
height: 50rpx;
@@ -205,6 +223,44 @@
top: 160rpx;
left: 10%;
}
.content{
flex-direction: column;
justify-items: center;
align-items: flex-start;
.history_part{
height: 210rpx;
width: auto;
background-color: violet;
// margin:25rpx;
margin-top:30rpx;
margin-left: 30rpx;
margin-right: 30rpx;
padding: 15rpx;
.history_time{
// height: 30rpx;
width:fit-content;
// margin-left: 10rpx;
padding:5rpx;
background-color: whitesmoke;
}
.history_content{
display: flex;
justify-self: start;
overflow: scroll;
.picture{
margin-left: 0;
height: auto;
width: auto;
}
}
}
}
.picture{
background-color: rgba($color: #ffffff, $alpha: 1);
height: 170rpx;
width: 25%;
margin: 10rpx;
}
.picture1{
background-color: rgba($color: #ffffff, $alpha: 1);
height: 170rpx;
+14
View File
@@ -10,13 +10,27 @@ Page({
text_startPage1: "知识库",
text_startPage4: "个性化",
imgUrl_startPage1:"./static/icons/lib.svg",
function_startPage1:"",
imgUrl_startPage2:"./static/icons/history.svg",
function_startPage2:"popup_history",
imgUrl_startPage3:"./static/icons/heart.svg",
function_startPage3:"popup_collect",
imgUrl_startPage4:"./static/icons/self.svg",
tip_content: "不吃饭会饿死",
tip_hidden: false,
active_Page: "startPage",
currentDate: '',
data_history_test:{
"2023.2.30":["test1","test2","test2","test2","test2","test2","test2","test2","test2","test2"],
"2023.12.31":["test3","test4"],
"2023.2.32":["test5","test6"],
"2023.2.33":["test7","test8"],
"2023.2.34":["test9","test0"],
"2023.2.35":["test9","test0"],
"2023.2.36":["test9","test0"],
"2023.12.37":["test9","test0"],
},
// userInfo: {},
// hasUserInfo: false,
// canIUse: wx.canIUse('button.open-type.getUserInfo'),
+27 -11
View File
@@ -12,10 +12,10 @@
<image src="{{imgUrl_startPage1}}" mode="'aspectFit'" style="height: 100rpx;width: 100rpx;margin-right:30rpx;" />
<view class="text_startPage">{{text_startPage1}}</view>
</view>
<view class='buttom_startPage' id="buttom_startPage2" bind:tap="popup_history">
<view class='buttom_startPage' id="buttom_startPage2" bind:tap="{{function_startPage2}}">
<image src="{{imgUrl_startPage2}}" mode="'aspectFit'" style="height: 100rpx;width: 100rpx;" />
</view>
<view class='buttom_startPage' id="buttom_startPage3" bind:tap="popup_collect">
<view class='buttom_startPage' id="buttom_startPage3" bind:tap="{{function_startPage3}}">
<image src="{{imgUrl_startPage3}}" mode="'aspectFit'" style="height: 100rpx;width: 100rpx;" />
</view>
<view class='buttom_startPage' id="buttom_startPage4">
@@ -30,7 +30,7 @@
<view class="buttom_startPage test" id='test2' bind:tap="popup_camera">弹出相机</view>
</view>
<!-- 相机界面 -->
<!-- 相机界面,放在下面 -->
<view id='page_camera' class="miao_page">
<camera id='camera' device-position="back" flash="off"></camera>
<view id="page_camera_background"></view>
@@ -54,20 +54,36 @@
<!-- 历史记录界面 -->
<view id="page_history" class="miao_page">
<view class="title">搜索历史</view>
<view id="page_history_back" bind:tap="exit_history">
<image src="./static/icons/back.svg" mode="aspectFit" />
<view class="title">
<view>历史记录</view>
<view class="page_back" bind:tap="exit_history">
<image src="./static/icons/back.svg" mode="aspectFit" />
</view>
</view>
<view class="date1">{{currentDate}}</view>
<!-- <view class="date1">{{currentDate}}</view>
<view class="picture1">picture1</view>
<view class="picture2">picture2</view>
<view class="picture2">picture2</view> -->
<view class="content">
<view class="history_part" wx:for="{{data_history_test}}" wx:for-index="date" wx:for-item="arr">
<view class="history_time">{{date}}</view>
<view class="history_content">
<view class="picture" wx:for="{{arr}}" wx:for-item="content">
<!-- {{content}} -->
<image src="{{imgUrl_startPage2}}" mode="'aspectFit'" style="height: 150rpx;width: 150rpx;" />
</view>
</view>
</view>
</view>
</view>
<!-- 我的收藏界面 -->
<view id="page_collect" class="miao_page">
<view class="title">我的收藏</view>
<view id="page_collect_back" bind:tap="exit_collect">
<image src="./static/icons/back.svg" mode="aspectFit" />
<view class="title">
<view>我的收藏</view>
<view class="page_back" bind:tap="exit_collect">
<image src="./static/icons/back.svg" mode="aspectFit" />
</view>
</view>
<view class="collect1">收藏1</view>
<view class="collect2">收藏2</view>