完成AI聊天界面

master
Gary 5 days ago
parent 2462ade3fc
commit 6a7d31e1c0

@ -10,7 +10,9 @@
export default {
name: "community",
data() {
return {};
return {
extend_class : ''
};
},
methods: {
go_to_community() {

@ -10,7 +10,9 @@
export default {
name: "exercise",
data() {
return {};
return {
extend_class : ''
};
},
methods:{
go_to_my_exercise_plan() {

@ -10,13 +10,15 @@
export default {
name: "puppy_chat",
data() {
return {};
return {
extend_class : ''
};
},
methods:{
go_go_puppy_chat(){
uni.navigateTo({
url: '/pages/puppy_chat/puppy_chat'
url: '/pages/homepages/puppy_chat/puppy_chat'
})
}
}

@ -10,7 +10,9 @@
export default {
name: "read_center",
data() {
return {};
return {
extend_class : ''
};
},
methods:{
go_to_choice_book() {

@ -53,7 +53,7 @@ export default {
data() {
return {
is_home_picked_up: false,
is_communnity_picked_up: false,
is_community_picked_up: false,
is_assistant_picked_up: false,
is_user_picked_up: false
};
@ -64,14 +64,14 @@ export default {
this.resetPicks();
this.is_home_picked_up = true;
uni.reLaunch({
url: '/pages/homepages/home/home', // 使 navigateTo
url: '/pages/homepages/homes/home/home', // 使 navigateTo
});
},
pick_up_community() {
this.resetPicks();
this.is_communnity_picked_up = true;
this.is_community_picked_up = true;
uni.reLaunch({
url: '/pages/homepages/community/community',
url: '/pages/homepages/community/community/community',
});
},
pick_up_assistant() {
@ -85,12 +85,12 @@ export default {
this.resetPicks();
this.is_user_picked_up = true;
uni.reLaunch({
url: '/pages/homepages/user/user',
url: '/pages/homepages/user/user/user',
});
},
resetPicks() {
this.is_home_picked_up = false;
this.is_communnity_picked_up = false;
this.is_community_picked_up = false;
this.is_assistant_picked_up = false;
this.is_user_picked_up = false;
}
@ -110,14 +110,14 @@ export default {
}
}
.bar_background{
position: absolute;
position: fixed;
width: 95%; /* 宽度占95% */
height: 10%; /* 高度 */
bottom: 1.2%; /* 距离底部2% */
left: 2.5%; /* 左侧2.5% */
background-color: khaki; /* 初始颜色 */
border-radius: 37px; /* 圆角半径,可以根据需要调整 */
z-index: -1; /* 使背景框在其他元素后面 */
z-index: 100; /* 使背景框在其他元素后面 */
animation: colorTransition 2s ease forwards; /* 添加颜色渐变动画 */
}
@ -125,19 +125,21 @@ export default {
.home, .community, .assistant, .user {
position: absolute;
position: fixed;
width: 15%;
height: 6%;
bottom: 2%;
transition: opacity 0.7s ease; /* 添加渐变过渡 */
z-index: 100; /* 使背景框在其他元素后面 */
}
.pick_up_home, .pick_up_community, .pick_up_assistant, .pick_up_user {
position: absolute;
position: fixed;
width: 17%;
height: 10%;
bottom: 2%;
transition: opacity 1s ease; /* 添加渐变过渡 */
z-index: 101; /* 使背景框在其他元素后面 */
}

@ -1,6 +1,5 @@
<!-- TabBar.vue -->
<template>
<view class="bar_background"></view>
<!-- Home 图标 -->
<image class="pick_up_home"
@ -16,7 +15,7 @@
<image class="pick_up_community"
src="/static/components/tarbar/pictures/community_pick_up.png"
@click="pick_up_community"
:style="{ opacity: is_communnity_picked_up ? 1 : 0 }">
:style="{ opacity: is_community_picked_up ? 1 : 0 }">
</image>
<!-- Assistant 图标 -->
@ -54,12 +53,7 @@ export default {
is_user_picked_up: false
};
},
props: {
extend_class: { // class
type: String,
default: ''
}
},
methods: {
pick_up_home() {
@ -68,28 +62,28 @@ export default {
},
pick_up_community() {
this.resetPicks();
this.is_communnity_picked_up = true;
uni.reLaunch({
url: '/pages/homepages/community/community',
this.is_community_picked_up = true;
uni.navigateTo({
url: '/pages/homepages/community/community/community',
});
},
pick_up_assistant() {
this.resetPicks();
this.is_assistant_picked_up = true;
uni.reLaunch({
uni.navigateTo({
url: '/pages/homepages/puppy_chat/puppy_chat',
});
},
pick_up_user() {
this.resetPicks();
this.is_user_picked_up = true;
uni.reLaunch({
url: '/pages/homepages/user/user',
uni.navigateTo({
url: '/pages/homepages/user/user/user',
});
},
resetPicks() {
this.is_home_picked_up = false;
this.is_communnity_picked_up = false;
this.is_community_picked_up = false;
this.is_assistant_picked_up = false;
this.is_user_picked_up = false;
}
@ -100,6 +94,7 @@ export default {
<style lang="scss">
@keyframes colorTransition {
from {
background-color: #5858cd;
@ -112,11 +107,12 @@ export default {
position: fixed;
width: 95%; /* 宽度占95% */
height: 10%; /* 高度 */
bottom: 0%; /* 距离底部2% */
bottom: 1.2%; /* 距离底部2% */
left: 2.5%; /* 左侧2.5% */
background-color: khaki; /* 初始颜色 */
border-radius: 37px; /* 圆角半径,可以根据需要调整 */
z-index: 100; /* 使背景框在其他元素后面 */
z-index: -1; /* 使背景框在其他元素后面 */
animation: colorTransition 2s ease forwards; /* 添加颜色渐变动画 */
}
@ -124,16 +120,14 @@ export default {
position: fixed;
width: 15%;
height: 6%;
bottom: 1%;
z-index: 101;
bottom: 2%;
transition: opacity 1s ease; /* 添加渐变过渡 */
}
.pick_up_home, .pick_up_community, .pick_up_assistant, .pick_up_user {
position:fixed;
position: fixed;
width: 17%;
height: 10%;
bottom: 0.8%;
z-index: 101;
bottom: 2%;
transition: opacity 1s ease; /* 添加渐变过渡 */
}

@ -18,12 +18,12 @@
<image class="community"
src="/static/components/tarbar/pictures/community.png"
@click="pick_up_community"
:style="{ opacity: is_communnity_picked_up ? 0 : 1 }">
:style="{ opacity: is_community_picked_up ? 0 : 1 }">
</image>
<image class="pick_up_community"
src="/static/components/tarbar/pictures/community_pick_up.png"
@click="pick_up_community"
:style="{ opacity: is_communnity_picked_up ? 1 : 0 }">
:style="{ opacity: is_community_picked_up ? 1 : 0 }">
</image>
<!-- Assistant 图标 -->
@ -51,24 +51,23 @@ export default {
data() {
return {
is_home_picked_up: false,
is_communnity_picked_up: false,
is_community_picked_up: false,
is_user_picked_up: false
};
},
methods: {
pick_up_home() {
this.resetPicks();
this.is_home_picked_up = true;
uni.reLaunch({
url: '/pages/homepages/home/home', // 使 navigateTo
url: '/pages/homepages/homes/home/home', // 使 navigateTo
});
},
pick_up_community() {
this.resetPicks();
this.is_communnity_picked_up = true;
uni.reLaunch({
url: '/pages/homepages/community/community',
url: '/pages/homepages/community/community/community',
});
},
pick_up_assistant() {
@ -82,7 +81,7 @@ export default {
this.resetPicks();
this.is_user_picked_up = true;
uni.reLaunch({
url: '/pages/homepages/user/user',
url: '/pages/homepages/user/user/user',
});
},
resetPicks() {

@ -22,12 +22,12 @@
<image class="community"
src="/static/components/tarbar/pictures/community.png"
@click="pick_up_community"
:style="{ opacity: is_communnity_picked_up ? 0 : 1 }">
:style="{ opacity: is_community_picked_up ? 0 : 1 }">
</image>
<image class="pick_up_community"
src="/static/components/tarbar/pictures/community_pick_up.png"
@click="pick_up_community"
:style="{ opacity: is_communnity_picked_up ? 1 : 0 }">
:style="{ opacity: is_community_picked_up ? 1 : 0 }">
</image>
<!-- Assistant 图标 -->
@ -55,7 +55,7 @@ export default {
data() {
return {
is_home_picked_up: false,
is_communnity_picked_up: false,
is_community_picked_up: false,
is_assistant_picked_up: false,
is_user_picked_up: false
};
@ -66,14 +66,14 @@ export default {
this.resetPicks();
this.is_home_picked_up = true;
uni.reLaunch({
url: '/pages/homepages/home/home', // 使 navigateTo
url: '/pages/homepages/homes/home/home', // 使 navigateTo
});
},
pick_up_community() {
this.resetPicks();
this.is_communnity_picked_up = true;
this.is_community_picked_up = true;
uni.reLaunch({
url: '/pages/homepages/community/community',
url: '/pages/homepages/community/community/community',
});
},
pick_up_assistant() {
@ -87,12 +87,12 @@ export default {
this.resetPicks();
this.is_user_picked_up = true;
uni.reLaunch({
url: '/pages/homepages/user/user',
url: '/pages/homepages/user/user/user',
});
},
resetPicks() {
this.is_home_picked_up = false;
this.is_communnity_picked_up = false;
this.is_community_picked_up = false;
this.is_assistant_picked_up = false;
this.is_user_picked_up = false;
}
@ -113,7 +113,7 @@ export default {
}
}
.bar_background{
position: absolute;
position: fixed;
width: 95%; /* 宽度占95% */
height: 10%; /* 高度 */
@ -121,22 +121,24 @@ export default {
left: 2.5%; /* 左侧2.5% */
background-color: khaki; /* 初始颜色 */
border-radius: 37px; /* 圆角半径,可以根据需要调整 */
z-index: -1; /* 使背景框在其他元素后面 */
z-index: 100; /* 使背景框在其他元素后面 */
animation: colorTransition 2s ease forwards; /* 添加颜色渐变动画 */
}
.home, .community, .assistant, .user {
position: absolute;
position: fixed;
width: 15%;
height: 6%;
bottom: 2%;
z-index: 101;
transition: opacity 2s ease; /* 添加渐变过渡 */
}
.pick_up_home, .pick_up_community, .pick_up_assistant, .pick_up_user {
position: absolute;
position: fixed;
width: 17%;
height: 10%;
bottom: 2%;
z-index: 101;
}

@ -102,18 +102,18 @@
"mp-toutiao" : {
"usingComponents" : true
},
// "h5": {
// "devServer": {
// "proxy": {
// "/prefix/api/user/list": {
// "target": "http://47.122.61.54:8084",
// "pathRewrite": {
// "^/prefix": ""
// }
// }
// }
// }
// },
// "h5": {
// "devServer": {
// "proxy": {
// "/prefix/api/user/list": {
// "target": "http://47.122.61.54:8084",
// "pathRewrite": {
// "^/prefix": ""
// }
// }
// }
// }
// },
"uniStatistics" : {
"enable" : false
},

@ -175,15 +175,14 @@
}
},*/
/*--------------------------------------------------------------------------------------------------------------*/
/*
{
"path": "pages/homepages/homes/home/home",
"style": {
"navigationStyle": "custom"
}
}
/
*/
},
/* {
"path": "pages/homepages/homes/my_recipe_plan/my_recipe_plan",
"style": {
@ -226,12 +225,12 @@
}
},*/
/*---------------------------------------------------------------------------------------------------------------------------*/
/* {
{
"path": "pages/homepages/user/user/user",
"style": {
"navigationStyle": "custom"
}
},*/
},
/*-------------------------------------------------------------------------------------------------------------------------*/
/*
{
@ -475,37 +474,37 @@
/*----------------------------------------------------------------------------------------------------------------------*/
{
"path": "pages/homepages/homes/my_exercise_plan/my_exercise_plan",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"style" :
{
"navigationStyle": "custom"
}
},
{
"path": "pages/homepages/homes/choice_book/choice_book",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"style" :
{
"navigationStyle": "custom"
}
},
{
"path": "pages/homepages/homes/knowlege_dictionary/knowlege_dictionary",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"style" :
{
"navigationStyle": "custom"
}
},
{
"path": "pages/homepages/community/community/community",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"style" :
{
"navigationStyle": "custom"
}
},
{
"path": "pages/homepages/community/personal_center/personal_center",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"style" :
{
"navigationStyle": "custom"
}
}
],

@ -1,11 +1,14 @@
<template>
<view>
<tarbar_community></tarbar_community>
</view>
</template>
<script>
import Community from "@/components/swiper/community.vue";
export default {
components: {Community},
data() {
return {};
}

@ -56,7 +56,7 @@ import Puppy_chat from "@/components/swiper/puppy_chat.vue";
import Read_center from "@/components/swiper/read_center.vue";
import Exercise from "@/components/swiper/exercise.vue";
import Community from "@/components/swiper/community.vue";
import tarbar_home from "@/components/tarbar_home/tarbar_home.vue";
export default {
components: {Community, Exercise, Read_center, Puppy_chat},
data() {

@ -45,7 +45,7 @@ export default {
answer: '', // AI
};
},
/* onLoad() {
onLoad() {
//conversation_id
const app = getApp();
console.log(app.globalData.token);
@ -70,7 +70,7 @@ export default {
console.log("请求失败!请求数据是", res);
}
});
},*/
},
methods: {
handleSendMessage() {
//

@ -1,13 +1,18 @@
<template>
<view class="background">
<image class="head_pic" src="../../../../static/homepages/user/user/head_pic.png"></image>
<image class="head_pic" src="@/static/homepages/user/user/head_pic.png"></image>
<image class="head_button" src="../../../../static/homepages/user/user/head_button.png"></image>
<image class="bmi_button" src="../../../../static/homepages/user/user/bmi_button.png"></image>
<image class="eat_button" src="../../../../static/homepages/user/user/eat_button.png"></image>
<image class="ad_button" src="../../../../static/homepages/user/user/ad_button.png"></image>
<image class="button" src="../../../../static/homepages/user/user/button.png"></image>
<image class="point" src="../../../../static/homepages/user/user/point.png"></image>
<image class="user" src="../../../../static/homepages/user/user/female.png"></image>
<image v-if="sex===0" class="user" src="../../../../static/homepages/user/user/female.png"></image>
<image v-if="sex===1" class="user" src="../../../../static/homepages/user/user/male.png"></image>
<text class="id">aaaaaaaaa</text>
<text class="hot_in">20000J</text>
<text class="hot_out">17000J</text>
@ -17,13 +22,17 @@
<text class="xw">44.5</text>
<text class="yw">34.0</text>
<text class="tw">42.5</text>
</view>
<tarbar_user></tarbar_user>
</template>
<script>
export default {
data() {
return {};
return {
sex : 1//10
};
},
methods:{
navigateTo(page) {
@ -35,17 +44,18 @@ export default {
}
</script>
<style lang="scss">
<style scoped>
.background{
background-image: url("/static/homepages/user/user/background.png");
background-image: url("@/static/homepages/user/user/pictures/background.png");
background-size: cover;
background-position: center;
height: 200vh;
height: 225vh;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
position: relative;
border: 2px solid #0c0b0b ;
}
.head_pic{
position: absolute;
@ -53,7 +63,8 @@ export default {
width: 20%;
opacity: 1;
right: 70%;
bottom: 92%;
top: 3.5%;
}
.head_button{
position: absolute;
@ -61,7 +72,8 @@ export default {
width: 20%;
opacity: 1;
right: 5%;
bottom: 90.7%;
bottom: 90.7%;
}
.bmi_button{
position: absolute;
@ -69,7 +81,8 @@ export default {
width: 20%;
opacity: 1;
right: 6%;
bottom: 60.7%;
bottom: 60.7%;
}
.ad_button{
position: absolute;
@ -77,7 +90,8 @@ export default {
width: 35%;
opacity: 1;
right: 57%;
bottom:17.5%;
bottom:17.5%;
}
.eat_button{
position: absolute;
@ -85,15 +99,17 @@ export default {
width: 35%;
opacity: 1;
right: 57%;
bottom: 10.5%;
bottom: 10.5%;
}
.user{
position: absolute;
height: 18%;
width: 30%;
opacity: 1;
right: 15%;
bottom: 26%;
left: 55%;
bottom: 26%;
}
.point{
position: absolute;
@ -101,23 +117,24 @@ export default {
width: 2%;
opacity: 1;
right: 50%;
bottom: 48.5%;
bottom: 48.5%;
border: 2px solid #0c0b0b ;
}
.button{
position: absolute;
height: 5%;
width: 88%;
opacity: 1;
right: 6%; /* 距右边 10% */
bottom: 4.5%;
height: 4%;
width: 90%;
left: 5%;
top: 90.5%;
}
.id{
position: absolute;
height: 5%;
width: 50%;
opacity: 1;
right: 13%; /* 距右边 10% */
bottom: 90.2%;
bottom: 90.2%;
border: 2px solid #0c0b0b ;
}
.hot_in{
position: absolute;
@ -126,8 +143,9 @@ export default {
opacity: 1;
right: 77%; /* 距右边 10% */
bottom: 87%;
font-size: 1.3rem;
font-size: 0.5rem;
color: #ffffff;
border: 2px solid #b14141;
}
.hot_out{
position: absolute;
@ -138,6 +156,7 @@ export default {
bottom: 87%;
font-size: 0.5rem;
color: #ffffff;
border: 2px solid #0c0b0b ;
}
.height{
position: absolute;

@ -6,16 +6,20 @@
<view class="login_part">
<!-- 导航栏 -->
<view class="login_ways">
<!-- -->
<view class="account_words" @click="toPassageEvent"
:style="{borderBottom:passageWordsBottomBorder}">
密码登录
</view>
<view class="captcha_words" @click="toCaptchaEvent"
:style="{borderBottom:captchaWordsBottomBorder}">
验证码登录
</view>
</view>
<!-- 表单部分 -->
<form class="login_form">
<view class="form_input">
@ -51,6 +55,10 @@
</view>
</view>
</form>
</view>
<!-- 前往注册 -->
<navigator url="/pages/login/register/register">

@ -1,15 +1,16 @@
.background {
position: absolute;
top: 0;
width: 100%;
height: 78%;
height: 75%;
top: 4%;
z-index: -3;
}
.chat {
position: absolute;
top: 0;
width: 100%;
top: 10%;
height: 79%;
z-index: -1;
padding: 10px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

@ -1,8 +1,8 @@
{
"hash": "48f6c93b",
"configHash": "badd50c8",
"lockfileHash": "e3b0c442",
"browserHash": "debd2ea0",
"hash": "0aaf698d",
"configHash": "cc60d382",
"lockfileHash": "22a0e42d",
"browserHash": "89d9bfb2",
"optimized": {},
"chunks": {}
}
Loading…
Cancel
Save