Compare commits

..

20 Commits

@ -24,24 +24,25 @@ import ai_recongize_plan from './components/ai_recongize_plan/ai_recongize_plan.
import ai_recongize_hot from './components/ai_recongize_hot/ai_recongize_hot.vue';
import ai_recongize_recipe from './components/ai_recongize_recipe/ai_recongize_recipe.vue';
export default {
globalData: {
//
fit_journey_basic_address: 'http://47.122.61.54:8086',//TODO:
fit_journey_community_address: 'http://47.122.61.54:8082',//TODO:
fit_journey_basic_address: 'http://127.0.0.1:8086',//TODO:
fit_journey_community_address: 'http://127.0.0.1:8082',//TODO:
fit_journey_ai_address: 'http://47.122.61.54:8081',//TODO
fit_journey_login_address: 'http://127.0.0.1:8084',//TODO:
fit_journey_recipe_address: 'http://47.122.61.54:8087',//TODO:
fit_journey_exercise_address: 'http://47.122.61.54:8080',//TODO:
fit_journey_admin_address: 'http://47.122.61.54:8085',//TODO:
message_count: 0,
// TODO: token localStorage
token: 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxODUxOTgwMTI1O' +
'TYxMjMyMzg1IiwiaXNzIjoiZml0am91cm5leSIsInVzZXJuY' +
'W1lOiI6InRlc3QiLCJyb2xlczoiOiJ1c2VyIiwiaWQ6IjoxODUxOTgwM' +
'TI1OTYxMjMyMzg1LCJpYXQiOjE3MzA1NDEzMTksImV4cCI6MzE3' +
'MDkwNTQxMzE5fQ.tdP-uBa-oKVJjGJlN70tzxXCa4usXOev6xf_fgZhWD4'
token: 'eyJhbGciOiJIUzI1NiJ9.eyJzdW' +
'IiOiIxODU5MDU4ODM2NDQ3NDk4MjQyIiwiaXNz' +
'IjoiZml0am91cm5leSIsInVzZXJuYW1lOiI6InV' +
'zZXIiLCJyb2xlczoiOiJVU0VSX1JPTEUiLCJpZDoiOj' +
'E4NTkwNTg4MzY0NDc0OTgyNDIsImlhdCI6MTczMjA4NjA4Ny' +
'wiZXhwIjozMTcwOTIwODYwODd9.rxLV3cUtwUKwsdpNq2yf2O' +
'5Fte2hX4OqvcwN9mo6y9w'
},
components: {

@ -26,9 +26,14 @@ export default {
methods:{
go_to_page() {
uni.navigateTo({
url: '/pages/homepages/homes/ai_recongize_fruit/ai_recongize_fruit'
url: '/pages/homepages/homes/ai_recognize_fruit/ai_recognize_fruit'
})
}
uni.showToast({
title: '跳转成功',
icon: 'success',
})
},
}
}

@ -26,7 +26,11 @@ export default {
methods:{
go_to_page() {
uni.navigateTo({
url: '/pages/homepages/homes/ai_recongize_hot/ai_recongize_hot'
url: '/pages/homepages/homes/ai_recognize_hot/ai_recognize_hot'
})
uni.showToast({
title: '跳转成功',
icon: 'success',
})
}

@ -26,7 +26,11 @@ export default {
methods:{
go_to_page() {
uni.navigateTo({
url: '/pages/homepages/homes/ai_recongize_plan/ai_recongize_plan'
url: '/pages/homepages/homes/ai_recognize_plan/ai_recognize_plan'
})
uni.showToast({
title: '跳转成功',
icon: 'success',
})
}

@ -26,7 +26,11 @@ export default {
methods:{
go_to_page() {
uni.navigateTo({
url: '/pages/homepages/homes/ai_recongize_recipe/ai_recongize_recipe'
url: '/pages/homepages/homes/ai_recognize_recipe/ai_recognize_recipe'
})
uni.showToast({
title: '跳转成功',
icon: 'success',
})
}

@ -0,0 +1,141 @@
<template>
<view class="myimgDV">
<view v-if="imgPicList.length>0" class='receiveimage flex justify'>
<block v-for="(item,ind) in imgPicList" :key="ind">
<image class="imgitem" :style="{width:imgwidth,height:imgheight}" :class="imgboxtype==0?'onepic':imgboxtype==1?'doublepic':imgboxtype==2?'triplepic':''"
:src="item" :mode="imgboxtype==0?'widthFix':imgboxtype==1?'aspectFill':imgboxtype==2?'aspectFill':''" @click="previewpic(item,imgPicList)"></image>
<!-- {width:(imgboxtype==0?'':imgwidth),height:(imgboxtype==0?'':imgwidth),padding:(imgboxtype==0?'':imgpad)} -->
</block>
</view>
</view>
</template>
<script>
export default {
name:"community_image_box",
data() {
return {
imgPicList: [],
imgboxtype: 0,
imgwidth: 0,
imgpad: 0,
imgheight: ''
}
},
props: {
imgList: {
type: Array
},
num: {
type: Number,
default: 0
},
pad: {
type: Number,
default: 0
}
},
methods: {
//
previewpic(cind, clist) {
console.log(cind, clist);
uni.previewImage({
urls: clist,
current: cind,
indicator: 'default'
});
},
getheight() {
console.log('imgboxtype:',this.imgboxtype)
let that = this;
const query = uni.createSelectorQuery().in(that)
query.select('.imgitem').boundingClientRect()
query.exec((res)=>{
console.log(res[0].width)
if (that.num == 1) {
that.imgheight = '100%';
} else if (that.num == 2 || that.num == 4) {
that.imgheight = (res[0].width).toFixed(2) + 'px';
} else {
that.imgheight = (res[0].width).toFixed(2) + 'px';
}
})
// const query = uni.createSelectorQuery().in(this).select('.imgitem');
// uni.createSelectorQuery().select('.imgitem').boundingClientRect(res => {
// console.log('reac', res)
// if (this.num == 1) {
// this.imgheight = '100%';
// } else if (this.num == 2 || this.num == 4) {
// this.imgheight = (res.width).toFixed(2) + 'px';
// } else {
// this.imgheight = (res.width).toFixed(2) + 'px';
// }
// }).exec()
}
},
mounted() {
// let this = this;
this.imgPicList = this.imgList;
console.log('num:'+this.num)
if (this.num == 1) {
this.imgboxtype = 0;
this.imgwidth = 100 + '%';
} else if (this.num == 2 || this.num == 4) {
this.imgboxtype = 1;
this.imgwidth = 49 + '%';
} else if (this.num == 3 || this.num > 4) {
this.imgboxtype = 2;
this.imgwidth = 32 + '%';
}
this.$nextTick(function() {
this.getheight();
})
}
}
</script>
<style lang="scss">
.myimgDV {
.flex {
display: flex;
}
.justify {
justify-content: space-between;
}
.receiveimage {
margin-top: 28rpx;
display: flex;
flex-wrap: wrap;
width: 100%;
.onepic {
width: 100%;
// height: 188rpx;
// height: auto;
margin-bottom: 28rpx;
&:nth-child(3n) {
margin-right: 0;
}
}
.doublepic {
// width: 340rpx;
// height: 340rpx;
margin-right: 12rpx;
margin-bottom: 12rpx;
&:nth-child(2n) {
margin-right: 0;
}
}
.triplepic {
// width: 222rpx;
// height: 222rpx;
margin-right: 12rpx;
margin-bottom: 12rpx;
&:nth-child(3n) {
margin-right: 0;
}
}
}
}
</style>

@ -26,7 +26,7 @@ export default {
methods: {
go_to_page() {
uni.navigateTo({
url: '/pages/homepages/homes/ai_recongize_fruit/ai_recongize_fruit'
url: '/pages/homepages/homes/knowledge_dictionary/knowledge_dictionary'
})
}

@ -26,10 +26,15 @@ export default {
methods: {
go_to_page() {
uni.navigateTo({
url: '/pages/homepages/homes/ai_recongize_fruit/ai_recongize_fruit'
url: '/pages/homepages/homes/my_exercise_plan/my_exercise_plan'
}) ;
uni.showToast({
title: '跳转成功',
icon: 'success',
})
}
}
}
</script>

@ -26,7 +26,11 @@ export default {
methods: {
go_to_page() {
uni.navigateTo({
url: '/pages/homepages/homes/ai_recongize_fruit/ai_recongize_fruit'
url: '/pages/homepages/homes/my_recipe_plan/my_recipe_plan'
})
uni.showToast({
title: '跳转成功',
icon: 'success',
})
}

@ -26,7 +26,10 @@ export default {
methods: {
go_to_page() {
uni.navigateTo({
url: '/pages/homepages/homes/ai_recongize_fruit/ai_recongize_fruit'
url: '/pages/homepages/homes/choice_book/choice_book'
})
uni.showToast({
title: '跳转成功',
})
}

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

@ -1,7 +1,7 @@
<template>
<view :class="['container', extend_class]">
<image class="background" src="@/static/components/swiper/exercise/background.png"></image>
<image class="button" @click="go_to_exercise" src="@/static/components/swiper/exercise/button.png"></image>
<image class="button" @click="go_to_my_exercise_plan" src="@/static/components/swiper/exercise/button.png"></image>
</view>
</template>
@ -10,13 +10,19 @@
export default {
name: "exercise",
data() {
return {};
return {
extend_class : ''
};
},
methods:{
go_to_my_exercise_plan() {
uni.navigateTo({
url: '/pages/homepages/homes/my_exercise_plan/my_exercise_plan'
})
uni.showToast({
title: '跳转',
icon: 'success',
})
}
}
}

@ -10,14 +10,20 @@
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'
})
uni.showToast({
title: '跳转成功',
icon: 'success',
})
}
}
}

@ -10,12 +10,18 @@
export default {
name: "read_center",
data() {
return {};
return {
extend_class : ''
};
},
methods:{
go_to_choice_book() {
uni.navigateTo({
url: '/pages/homepages/homes/choice_book/choice_book'
url: '/pages/homepages/homes/knowledge_dictionary/knowledge_dictionary'
})
uni.showToast({
title: '跳转成功',
icon: 'success',
})
}

@ -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,9 +1,7 @@
<!-- TabBar.vue -->
<template>
<view class="bar_background"></view>
<!-- Home 图标 -->
<image class="pick_up_home"
src="/static/components/tarbar/pictures/home_picked_up.png"
@click="pick_up_home">
@ -17,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 图标 -->
@ -55,12 +53,7 @@ export default {
is_user_picked_up: false
};
},
props: {
extend_class: { // class
type: String,
default: ''
}
},
methods: {
pick_up_home() {
@ -69,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;
}
@ -101,6 +94,7 @@ export default {
<style lang="scss">
@keyframes colorTransition {
from {
background-color: #5858cd;
@ -113,7 +107,8 @@ 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; /* 圆角半径,可以根据需要调整 */
@ -125,17 +120,17 @@ export default {
position: fixed;
width: 15%;
height: 6%;
bottom: 1%;
z-index: 101;
bottom: 2%;
z-index: 100; /* 使背景框在其他元素后面 */
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; /* 添加渐变过渡 */
z-index: 100; /* 使背景框在其他元素后面 */
}
/* 图标位置调整 */

@ -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() {
@ -109,7 +108,7 @@ export default {
}
}
.bar_background{
position: absolute;
position: fixed;
width: 95%; /* 宽度占95% */
height: 10%; /* 高度 */
@ -122,14 +121,14 @@ export default {
}
.home, .community, .assistant, .user {
position: absolute;
position: fixed;
width: 15%;
height: 6%;
bottom: 2%;
transition: opacity 1s ease; /* 添加渐变过渡 */
}
.pick_up_home, .pick_up_community, .pick_up_assistant, .pick_up_user {
position: absolute;
position: fixed;
width: 17%;
height: 10%;
bottom: 2%;

@ -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
},

@ -1,7 +1,7 @@
{
"pages": [
/*-----------------------------------------------------------------------------------------*/
/* {
{
"path": "pages/transition/page1/page1",
"style": {
"navigationStyle": "custom"
@ -42,11 +42,11 @@
"style": {
"navigationStyle": "custom"
}
},*/
},
/*------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------*/
/* {
{
"path": "pages/login/account_login/account_login",
"style": {
"navigationStyle": "custom"
@ -69,18 +69,18 @@
"style": {
"navigationStyle": "custom"
}
},*/
},
/*------------------------------------------------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------------------------------*/
/* {
{
"path": "pages/information/sex/sex",
"style": {
"navigationStyle": "custom"
}
},*/
},
/*------------------------------------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------------------------*/
/* {
{
"path": "pages/information/boy_weight_start/boy_weight_start",
"style": {
"navigationStyle": "custom"
@ -97,10 +97,10 @@
"style": {
"navigationStyle": "custom"
}
},*/
},
/*------------------------------------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------------------------------*/
/* {
{
"path": "pages/information/boy_height_start/boy_height_start",
"style": {
"navigationStyle": "custom"
@ -117,10 +117,10 @@
"style": {
"navigationStyle": "custom"
}
},*/
},
/*-----------------------------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------------------------------*/
/* {
{
"path": "pages/information/girl_height_start/girl_height_start",
"style": {
"navigationStyle": "custom"
@ -137,10 +137,10 @@
"style": {
"navigationStyle": "custom"
}
},*/
},
/*------------------------------------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------------------------------------------------------------*/
/* {
{
"path": "pages/information/girl_weight_start/girl_weight_start",
"style": {
"navigationStyle": "custom"
@ -157,83 +157,110 @@
"style": {
"navigationStyle": "custom"
}
},*/
},
/*--------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------使--------------------------------------------------*/
/* {
{
"path": "pages/information/purpose/purpose",
"style": {
"navigationStyle": "custom"
}
},*/
},
/*------------------------------------------------使-----------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------*/
/*{
{
"path": "pages/transition/page8/page8",
"style": {
"navigationStyle": "custom"
}
},*/
},
/*--------------------------------------------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------------------------------------*/
{
"path": "pages/homepages/homes/home/home",
"style": {
"navigationStyle": "custom"
}
}
/* {
"path": "pages/homepages/homes/my_recipe_plan/my_recipe_plan",
"style": {
"navigationStyle": "custom"
}
},*/
/* {
"path": "pages/homepages/temp/temp",
"style": {
},
{
"path" : "pages/homepages/homes/ai_recognize_recipe/ai_recognize_recipe",
"style" :
{
"navigationStyle": "custom"
}
}*/
/*{
"path": "pages/homepages/homes/ai_recognize_fruit/ai_recognize_fruit",
},//
{
"path": "pages/homepages/homes/ai_recognize_fruit/ai_recognize_fruit",
"style": {
"navigationStyle": "custom"
}
},//
{
"path": "pages/homepages/homes/ai_recognize_hot/ai_recognize_hot",
"style": {
"navigationStyle": "custom"
}
}*/
/* {
"path": "pages/homepages/homes/ai_recognize_hot/ai_recognize_hot
",
"style": {
},//
{
"path": "pages/homepages/homes/my_recipe_plan/my_recipe_plan",
"style": {
"navigationStyle": "custom"
}
},//
{
"path" : "pages/homepages/homes/ai_recognize_plan/ai_recognize_plan",
"style" :
{
"navigationStyle": "custom"
}
},//
{
"path": "pages/homepages/homes/my_exercise_plan/my_exercise_plan",
"style" :
{
"navigationStyle": "custom"
}
},//
{
"path": "pages/homepages/homes/choice_book/choice_book",
"style" :
{
"navigationStyle": "custom"
}
},//
{
"path": "pages/homepages/homes/knowledge_dictionary/knowledge_dictionary",
"style" :
{
"navigationStyle": "custom"
}
}*/
},//
/*---------------------------------------------------------------------------------------------------------------------------------*/
/* {
{
"path": "pages/homepages/puppy_chat/puppy_chat",
"style": {
"navigationStyle": "custom"
}
}*/
},
/*------------------------------------------------------------------------------------------------------------------------------*/
/* {
/* {
"path": "pages/homepages/community/community",
"style": {
"navigationStyle": "custom"
}
},*/
/*---------------------------------------------------------------------------------------------------------------------------*/
/*{
{
"path": "pages/homepages/user/user/user",
"style": {
"navigationStyle": "custom"
}
}*/
},
/*-------------------------------------------------------------------------------------------------------------------------*/
/*
{
"path": "pages/homepages/user/user_information/user_information",
/* {
"path": "pages/homepages/user/basic_information/basic_information",
"style": {
"navigationStyle": "custom"
}
@ -249,8 +276,8 @@
"style": {
"navigationStyle": "custom"
}
},
{
},*/
/* {
"path": "pages/homepages/user/exercise_plans/exercise_plans",
"style": {
"navigationStyle": "custom"
@ -270,13 +297,7 @@
"navigationStyle": "custom"
}
},
{
"path" : "pages/homepages/homes/ai_recognize_recipe/ai_recognize_recipe",
"style" :
{
"navigationStyle": "custom"
}
},
{
"path" : "pages/homepages/homes/ai_recognize_plan/ai_recognize_plan",
"style" :
@ -470,40 +491,28 @@
}*/
/*------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------*/,
{
"path": "pages/homepages/homes/my_exercise_plan/my_exercise_plan",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/homepages/homes/choice_book/choice_book",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/homepages/homes/knowlege_dictionary/knowlege_dictionary",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
/*----------------------------------------------------------------------------------------------------------------------*/
{
"path": "pages/homepages/community/community/community",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"style" :
{
"navigationStyle": "custom"
}
},
{
"path": "pages/homepages/community/add_post/add_post",
"style" :
{
"navigationStyle": "custom"
}
},
{
"path": "pages/homepages/community/personal_center/personal_center",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"style" :
{
"navigationStyle": "custom"
}
}
],

@ -0,0 +1,116 @@
<template>
<view class="add_post_box">
<!-- 头部盒子 -->
<view class="addpost_top_box">
<!-- 返回个人中心盒子 -->
<view class="return_box" @click="toCommunityPage">
<image
class="return_image"
src="../../../../static/homepages/community/add_post/pictures/left_arrow.png"
mode="widthFix"
></image>
</view>
<!-- 标题盒子 -->
<view class="title_box">发布我的帖子</view>
<button class="publish_btn">发表</button>
</view>
<!-- 提示盒子 -->
<view class="addpost_tip_box">分享自己的健康秘诀</view>
<!-- 发布盒子 -->
<view class="addpost_box">
<view class="post_box">
<view class="post_top_box">
<view class="post_avatar_box">
<image class="post_avatar" :src=user.avatar mode="widthFix"></image>
</view>
<view class="post_info">
<view class="post_name">{{user.name}}</view>
<view class="post_date">{{user.date}}</view>
</view>
</view>
<textarea class="post_word_box" v-model="user.word" placeholder="请输入你的文案(最多50个字)" cols="16" rows="2" auto-height maxlength="50"></textarea>
<!-- <view class="post_word_box">{{user.word}}</view> -->
<view class="post_images_box">
<view class="myimgDV">
<view class='receiveimage flex justify'>
<block v-for="(item,ind) in user.imgList" :key="ind">
<image class="imgitem doublepic" @tap="chooseTheImg(ind)" :style="{height:imgheight}" :src="item" mode="aspectFill"></image>
</block>
</view>
</view>
<!-- <community_image_box class="post_images" :imgList='user.imgList' :num='user.imgList.length'></community_image_box> -->
</view>
</view>
</view>
</view>
</template>
<script>
import community_image_box from "../../../../components/community_image_box/community_image_box.vue";
export default{
data(){
return{
user:{
avatar:'../../../../static/homepages/community/community/pictures/dog_image.png',
name:'cat',
date:'2024年9月31日',
word:'',
imgList:[
'../../../../static/homepages/community/add_post/pictures/add_post_image.png',
'../../../../static/homepages/community/add_post/pictures/add_post_image.png',
'../../../../static/homepages/community/add_post/pictures/add_post_image.png',
'../../../../static/homepages/community/add_post/pictures/add_post_image.png',
],
},
imgheight:'',
}
},
methods:{
getheight() {
console.log('imgboxtype:',this.imgboxtype)
let that = this;
const query = uni.createSelectorQuery().in(that)
query.select('.imgitem').boundingClientRect()
query.exec((res)=>{
console.log(res[0].width)
that.imgheight = (res[0].width).toFixed(2) + 'px';
})
},
chooseTheImg(index){
uni.chooseImage({
count: 1, //
sizeType: ['original','compressed'], //original compressed
sourceType: ['album'], //album camera 使
crop: { //
width: 100,
height: 100
},
success: res => {
console.log('res', res)
let imgFiles = res.tempFilePaths //
// this.uploadTheImg(imgFiles)
console.log('imgFiles', imgFiles)
this.user.imgList[index] = imgFiles[0]
console.log(this.user.imgList[index])
}
})
},
toCommunityPage(){
uni.navigateTo({
url:'/pages/homepages/community/community/community'
})
}
},
mounted() {
this.$nextTick(function() {
this.getheight();
})
}
}
</script>
<style lang="scss" scoped>
@import "@/static/homepages/community/add_post/scss/add_post.scss"
</style>

@ -1,17 +1,190 @@
<template>
<view>
<view class="community_box">
<!-- 头部信息 -->
<view class="top_box">
<!-- 头像 -->
<view class="dog_image_box" @click="toPersonCenter">
<image class="dog_image" src="../../../../static/homepages/community/community/pictures/dog_image.png" mode="widthFix"></image>
</view>
<view class="words_box">
<!-- 标题 -->
<view class="title_box">fit journey社区</view>
<view class="tip_word_box">搜索他人的健康秘诀</view>
</view>
<view class="add_image_box">
<image
class="add_image"
src="../../../../static/homepages/community/community/pictures/add_image.png"
mode="widthFix"
@click="toAddPostPage"
></image>
</view>
</view>
<view class="line_box"></view>
<!-- 帖子 -->
<view class="post_body">
<scroll-view class="post_scroll_box" scroll-y="true">
<view class="post_box" v-for="(item, index) in posts" :key="index">
<view class="post_top_box">
<view class="post_avatar_box">
<image class="post_avatar" :src=item.avatar mode="widthFix"></image>
</view>
<view class="post_info">
<view class="post_name">{{item.name}}</view>
<view class="post_date">{{item.date}}</view>
</view>
</view>
<view class="post_word_box">{{item.word}}</view>
<view class="post_images_box">
<community_image_box class="post_images" :imgList='item.imgList' :num='item.imgList.length'></community_image_box>
</view>
<view class="post_bottom_box">
<view class="comments_box">
<image class="chat_icon" src="../../../../static/homepages/community/community/pictures/chat_icon.png" mode="widthFix"></image>
<view class="comments_num">{{item.comments_num}}</view>
</view>
<view class="like_box">
<image
class="love_icon"
:src=getLikeImage(index)
mode="widthFix"
@click="likeClick(index)"
></image>
<view class="like_num">{{item.like_num}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<!-- 底部导航栏 -->
<tarbar_community class="tarbar_box"></tarbar_community>
</template>
<script>
import Community from "@/components/swiper/community.vue";
import community_image_box from "../../../../components/community_image_box/community_image_box.vue";
export default {
components: {Community, community_image_box},
data() {
return {};
return {
posts:[
{
avatar:'../../../../static/homepages/community/community/pictures/dog_image.png',
name:'cat',
date:'2024年9月31日',
word:'今天去海边锻炼看见的,真是太美了啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊',
imgList:[
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
],
comments_num:1,
like_num:100,
islike:false,
},
{
avatar:'../../../../static/homepages/community/community/pictures/dog_image.png',
name:'puppy',
date:'2024年11月13日',
word:'今天去海边锻炼看见的,真是太美了',
imgList:[
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
],
comments_num:12,
like_num:17,
islike:false,
},
{
avatar:'../../../../static/homepages/community/community/pictures/dog_image.png',
name:'cat',
date:'2024年10月13日',
word:'今天去海边锻炼看见的',
imgList:[
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
],
comments_num:10,
like_num:100,
islike:false,
},
{
avatar:'../../../../static/homepages/community/community/pictures/dog_image.png',
name:'cat',
date:'2024年1月13日',
word:'今天去锻炼',
imgList:[
'../../../../static/homepages/community/community/pictures/dog_image.png',
],
comments_num:10,
like_num:100,
islike:false,
},
],
};
},
mounted(){
this.getAllPost()
},
computed:{
likeImages() {
return this.posts.map((post, index) => ({
index,
image: post.islike ? '../../../../static/homepages/community/community/pictures/red_love_image.png' : '../../../../static/homepages/community/community/pictures/love_image.png'
}));
}
},
methods:{
getLikeImage(index) {
//TODO:
const item = this.likeImages.find(item => item.index === index);
return item ? item.image : '';
},
getAllPost(){
//TODO:
const app = getApp()
uni.request({
url:app.globalData.fit_journey_community_address + '/post/getAll',
method:"GET",
success:(res) => {
console.log('getAllPost')
console.log(res)
},
fail: (err) => {
console.log('getAllPost fail')
console.log(err.log)
},
})
},
likeClick(index){
//TODO:
if (this.posts[index].islike){
this.posts[index].islike = false
this.posts[index].like_num--
}
else{
this.posts[index].islike = true
this.posts[index].like_num++
}
},
toAddPostPage(){
//TODO:
uni.navigateTo({
url:'/pages/homepages/community/add_post/add_post'
})
},
toPersonCenter(){
uni.navigateTo({
url:'/pages/homepages/community/personal_center/personal_center'
})
}
}
}
</script>
<style lang="scss">
@import "@/static/homepages/community/community/scss/community.scss";
</style>

@ -1,17 +1,229 @@
<template>
<view>
<view class="person_center_box">
<view class="person_center_top">
<view class="return_box">
<image
class="return_image"
src="../../../../static/homepages/community/personal_center/pictures/left_arrow.png"
mode="widthFix"
></image>
</view>
</view>
<view class="person_center_body">
<view class="info_box">
<view class="height_box">
<view class="height_data">{{height}}cm</view>
<view class="height_words">身高</view>
</view>
<image class="avatar_box" src="" mode="widthFix"></image>
<view class="weight_box">
<view class="weight_data">{{weight}}kg</view>
<view class="weight_words">体重</view>
</view>
<view class="name_box">{{name}}</view>
<view class="tip_box">{{tip}}</view>
</view>
<view class="btns_box">
<button class="changeInfoBtn">个人中心修改信息</button>
<button class="addPostBtn" @click="toAddPostPage"></button>
</view>
<view class="posts_box">
<view class="post_nav_box">
<view class="toMypost_box post_nav">
<view class="toMypost" @click="myPostClick"></view>
<view class="bottom_line" v-if="isMyPost"></view>
</view>
<view class="toLikepost_box post_nav">
<view class="toLikepost" @click="likePostClick"></view>
<view class="bottom_line" v-if="!isMyPost"></view>
</view>
</view>
<view class="posts">
<view class="post_box" v-for="(item, index) in posts" :key="index">
<view class="post_top_box">
<view class="post_avatar_box">
<image class="post_avatar" :src=item.avatar mode="widthFix"></image>
</view>
<view class="post_info">
<view class="post_name">{{item.name}}</view>
<view class="post_date">{{item.date}}</view>
</view>
</view>
<view class="post_word_box">{{item.word}}</view>
<view class="post_images_box">
<community_image_box class="post_images" :imgList='item.imgList' :num='item.imgList.length'></community_image_box>
</view>
<view class="post_bottom_box">
<view class="comments_box">
<image class="chat_icon" src="../../../../static/homepages/community/community/pictures/chat_icon.png" mode="widthFix"></image>
<view class="comments_num">{{item.comments_num}}</view>
</view>
<view class="like_box">
<image
class="love_icon"
:src=getLikeImage(index)
mode="widthFix"
@click="likeClick(index)"
></image>
<view class="like_num">{{item.like_num}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import community_image_box from "../../../../components/community_image_box/community_image_box.vue";
export default {
data() {
return {};
}
components: {community_image_box},
data() {
return {
name:'puppy',
height:187,
weight:71,
tip:'这是一条个性签名',
isMyPost:true,
likePosts:[
{
avatar:'../../../../static/homepages/community/community/pictures/dog_image.png',
name:'cat',
date:'2024年9月31日',
word:'这是我喜欢的帖子',
imgList:[
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
],
comments_num:1,
like_num:100,
islike:false,
},
],
myPosts:[
{
avatar:'../../../../static/homepages/community/community/pictures/dog_image.png',
name:'cat',
date:'2024年9月31日',
word:'今天去海边锻炼看见的,真是太美了啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊',
imgList:[
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
],
comments_num:1,
like_num:100,
islike:false,
},
{
avatar:'../../../../static/homepages/community/community/pictures/dog_image.png',
name:'puppy',
date:'2024年11月13日',
word:'今天去海边锻炼看见的,真是太美了',
imgList:[
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
],
comments_num:12,
like_num:17,
islike:false,
},
{
avatar:'../../../../static/homepages/community/community/pictures/dog_image.png',
name:'cat',
date:'2024年10月13日',
word:'今天去海边锻炼看见的',
imgList:[
'../../../../static/homepages/community/community/pictures/dog_image.png',
'../../../../static/homepages/community/community/pictures/dog_image.png',
],
comments_num:10,
like_num:100,
islike:false,
},
{
avatar:'../../../../static/homepages/community/community/pictures/dog_image.png',
name:'cat',
date:'2024年1月13日',
word:'今天去锻炼',
imgList:[
'../../../../static/homepages/community/community/pictures/dog_image.png',
],
comments_num:10,
like_num:100,
islike:false,
},
],
posts:[],
};
},
mounted(){
this.getAllPost()
this.posts = this.myPosts
},
computed:{
likeImages() {
return this.posts.map((post, index) => ({
index,
image: post.islike ? '../../../../static/homepages/community/community/pictures/red_love_image.png' : '../../../../static/homepages/community/community/pictures/love_image.png'
}));
}
},
methods:{
myPostClick(){
this.isMyPost = true
this.posts = this.myPosts
},
likePostClick(){
this.isMyPost = false
this.posts = this.likePosts
},
getLikeImage(index) {
//TODO:
const item = this.likeImages.find(item => item.index === index);
return item ? item.image : '';
},
getAllPost(){
//TODO:
const app = getApp()
uni.request({
url:app.globalData.fit_journey_community_address + '/post/getAll',
method:"GET",
success:(res) => {
console.log('getAllPost')
console.log(res)
},
fail: (err) => {
console.log('getAllPost fail')
console.log(err.log)
},
})
},
likeClick(index){
//TODO:
if (this.posts[index].islike){
this.posts[index].islike = false
this.posts[index].like_num--
}
else{
this.posts[index].islike = true
this.posts[index].like_num++
}
},
toAddPostPage(){
uni.navigateTo({
url:'/pages/homepages/community/add_post/add_post'
})
}
}
}
</script>
<style lang="scss">
<style lang="scss" scoped>
@import "../../../../static/homepages/community/personal_center/scss/personal_center.scss"
</style>

@ -24,6 +24,7 @@ export default {
return {
calorie: 0,
name: '',
token:uni.getStorageSync("access_token")
};
},
methods: {
@ -52,19 +53,28 @@ export default {
//
uni.uploadFile({
header: {
'Authorization': app.globalData.token // token
'Authorization':this.token
},
url: app.globalData.fit_journey_ai_address + `/ai/fruit`, //
filePath: filePath,
name: 'file', //
success: (uploadFileRes) => {
console.log('上传结果:', uploadFileRes);
const response = JSON.parse(uploadFileRes.data); //
if (response && response.data) {
//
this.calorie = response.data.calorie || 0;
this.name = response.data.name || '识别失败,请重新上传图片';
let result = response.data; //
console.log("识别到的果蔬信息:", result);
//
for (let [name, calorie] of Object.entries(result)) {
this.name = name; //
this.calorie = calorie; //
console.log(`水果: ${name}, 卡路里: ${calorie} kcal/100g`);
}
uni.showToast({
title: '恭喜你AI识别成功了呢~',
icon: 'none',
});
} else {
uni.showToast({
title: '识别失败,请重新上传图片',

@ -24,6 +24,7 @@ export default {
return {
calorie: 0,
name: '',
token :uni.getStorageSync("access_token")
};
},
methods: {
@ -37,7 +38,11 @@ export default {
const app = getApp();
const serverAddress = app.globalData.fit_journey_ai_address;
console.log("后端服务器的地址是:"+serverAddress);
/* uni.showToast({
title: 'AI正在识别中呢~',
icon: 'loading',
duration: 2000
});*/
// API
uni.file
uni.chooseImage({
@ -47,25 +52,42 @@ export default {
success: (chooseImageRes) => {
const filePath = chooseImageRes.tempFilePaths[0]; //
console.log('选择的图片路径:', filePath);
console.log("图片上传成功!");
//
uni.uploadFile({
header: {
'Authorization': app.globalData.token // token
'Authorization': this.token
},
url: app.globalData.fit_journey_ai_address+`/ai/hot`, //
url: app.globalData.fit_journey_ai_address+`/ai/recipe`, //
filePath: filePath,
name: 'file', //
success: (uploadFileRes) => {
uni.showToast({
title: 'AI正在识别中呢~',
icon: 'loading',
duration: 2000
});
console.log('上传结果:', uploadFileRes);
const response = JSON.parse(uploadFileRes.data); //
if (response && response.data) {
//
this.calorie = response.data.calorie || 0;
this.name = response.data.name || '识别失败,请重新上传图片';
uni.showToast({
title: '恭喜您AI识别成功啦~',
icon: 'none',
duration :2000,//2
});
} else {
uni.showToast({
title: '识别失败,请重新上传图片',
icon: 'none',

@ -1,96 +1,198 @@
<template>
<view>
<image class="background" src="/static/homepages/homes/ai_recognize_plan/pictures/background.png"></image>
<image class="back_button" src="/static/homepages/homes/ai_recognize_plan/pictures/button.png"></image>
<image class="background" src="@/static/homepages/homes/ai_recognize_plan/pictures/background.png"></image>
<image class="back_button" @click="go_back_to_home" src="@/static/homepages/homes/ai_recognize_plan/pictures/button.png"></image>
<image v-if="planImage" class="plan-image" :src="planImage"></image>
<image class="generate_button" @click="generate()" src="/static/homepages/homes/ai_recognize_plan/pictures/generate.png"></image>
<image class="generate_button" @click="generate()" src="@/static/homepages/homes/ai_recognize_plan/pictures/generate.png"></image>
</view>
<!-- 生成成功的弹窗 -->
<view class="create_fail" v-if="is_create_success===1">
<text class="ai_create_text">AI生成的结果是</text>
<view class="result_area">
<text class="result">{{ result }}</text>
</view>
<image class="go_back" @click="go_back" src="@/static/homepages/homes/ai_recognize_recipe/pictures/go_back_button.png"></image>
</view>
</template>
<script>
export default {
data() {
return {
planImage: null //
planImage: null ,//
is_create_success : -1,//-1
token: uni.getStorageSync("access_token"),
result:""
};
},
methods: {
generate() {
uni.request({
url: app.globalData.fit_journey_ai_address+`/ai/plan`, // URL
method: 'GET',
success: (res) => {
if (res.data && res.data.base64) {
this.saveBase64Image(res.data.base64);
}
}
});
},
saveBase64Image(base64Data) {
//
plus.io.resolveLocalFileSystemURL(plus.io.convertLocalFileSystemURL('_doc/'), (entry) => {
//
const fileName = `_doc/${new Date().getTime()}.png`;
//
entry.getFile(fileName, {create: true}, (fileEntry) => {
// base64Blob
const arr = base64Data.split(',');
const mime = arr[0].match(/:(.*?);/)[1];
const bstr = atob(arr[1]);
let n = bstr.length;
const u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
const blob = new Blob([u8arr], {type: mime});
//
fileEntry.createWriter((fileWriter) => {
fileWriter.write(blob);
//
this.planImage = plus.io.convertLocalFileSystemURL(fileName);
}, (e) => {
console.log("Write file failed: " + e.message);
});
}, (e) => {
console.log("Get file failed: " + e.message);
});
}, (e) => {
console.log("Resolve file system failed: " + e.message);
});
}
go_back_to_home() {
uni.navigateTo({
url: '/pages/homepages/homes/home/home'
});
},
generate() {
uni.showToast({
title: '正在生成...',
icon: 'loading',
duration: 15000, // Toast 2
});
//
const app= getApp();
uni.request({
url: app.globalData.fit_journey_ai_address + '/exercise_plan/ai/recipe/generate',
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization':this.token
},
data: {
},
success: (res) => {
if(res.data.code===200){
console.log("请求成功!请求数据是", res);
this.result = res.data.data;
}else {
uni.showToast({
title:"AI生成失败",
icon: 'none',
duration: 2000
})
this.result = res.data.msg;
}
},
error: (res) => {
console.log("请求失败!请求数据是", res);
}
});
//
setTimeout(() => {
this.is_create_success = 1;
}, 15000);
},
go_back(){
this.is_create_success = -1;
}
}
}
</script>
<style lang="scss">
.background {
position: absolute;
width: 100%;
height: 100%;
top: 0%;
left: 0%;
}
.back_button {
position: absolute;
width: 3%;
height: 3%;
top: 4%;
left: 7%;
}
.generate_button {
position: absolute;
width: 70%;
height: 12%;
top: 85%;
left: 14%;
}
.plan-image {
position: absolute;
width: 80%; //
height: auto; //
top: 50%; //
left: 50%; //
transform: translate(-50%, -50%); // 使transform
z-index: 10; //
}
.background {
position: absolute;
width: 102%;
height: 102%;
left: -1%;
}
.back_button {
position: absolute;
width: 3%;
height: 3%;
top: 4%;
left: 7%;
}
.generate_button {
position: absolute;
width: 90%;
height: 12%;
top: 87%;
left: 5%;
}
.plan-image {
position: absolute;
width: 80%; //
height: auto; //
top: 50%; //
left: 50%; //
transform: translate(-50%, -50%); // 使transform
z-index: 10; //
}
.create_fail{
position: absolute;
height: 80%;
width: 90%;
top: 7%;
left: 5%;
border-radius: 20px;
background-color: #b694d1;
z-index: 1;
.ai_create_text{
position: absolute;
width: 100%;
height: 10%;
top: 5%;
left: 0;
font-weight: bold;
font-size: 20px;
text-align: center;
color: #ffffff;
}
.go_back{
position: absolute;
width: 80%;
height: 13%;
top: 88.5%;
left: 10%;
}
.result_area{
position: absolute;
width: 80%;
height: 75%;
top: 12%;
left: 10%;
border-radius: 20px;
background-color: #cec1e4;
color: #000000;
.result{
position: relative;
left: 2%;
font-size: 16px; /* 设置文字大小 */
font-weight: bold; /* 文字加粗 */
line-height: 1.5; /* 行间距 */
padding: 10px; /* 添加内边距,使文字不贴边 */
word-break: break-word; /* 长单词换行 */
}
}
}
</style>

@ -1,9 +1,35 @@
<template>
<view>
<image class="background" src="/static/homepages/homes/ai_recognize_recipe/pictures/background.png"></image>
<image class="back_button" src="/static/homepages/homes/ai_recognize_recipe/pictures/button.png"></image>
<image class="back_button" @click="go_back_to_home" src="/static/homepages/homes/ai_recognize_recipe/pictures/button.png" ></image>
<image v-if="recipeImage" class="recipe-image" :src="recipeImage"></image>
<image class="generate_button" @click="generate()" src="/static/homepages/homes/ai_recognize_recipe/pictures/generate.png"></image>
<image class="generate_button" @click="generate" src="/static/homepages/homes/ai_recognize_recipe/pictures/generate.png"></image>
<!--
&lt;!&ndash; 生成成功的弹窗 &ndash;&gt;
<view class="create_success" v-if="is_create_success===true">
<text class="ai_create_text">AI生成的结果是</text>
&lt;!&ndash; 取消弹窗的按钮 &ndash;&gt;
<image class="go_back" src="@/static/homepages/homes/ai_recognize_recipe/pictures/go_back_button.png"></image>
<view class="result" v-text="result"></view>
</view>
-->
<!-- 生成成功的弹窗 -->
<view class="create_fail" v-if="is_create_success===0">
<text class="ai_create_text">AI生成的结果是</text>
<view class="result_area">
<text class="result">{{ result }}</text>
</view>
<image class="go_back" @click="go_back" src="@/static/homepages/homes/ai_recognize_recipe/pictures/go_back_button.png"></image>
</view>
</view>
</template>
@ -11,86 +37,190 @@
export default {
data() {
return {
recipeImage: null //
is_create_success: -1,//01-1
can_generate_button_click: true, //
recipeImage: null, //
result: '对不起AI生成有点慢哦请耐心等待~',
token:uni.getStorageSync("access_token"),
};
},
methods: {
generate() {
uni.request({
url: app.globalData.fit_journey_ai_address+`/ai/recipe`, // URL
method: 'GET',
success: (res) => {
if (res.data && res.data.base64) {
this.saveBase64Image(res.data.base64);
}
}
});
},
saveBase64Image(base64Data) {
//
plus.io.resolveLocalFileSystemURL(plus.io.convertLocalFileSystemURL('_doc/'), (entry) => {
//
const fileName = `_doc/${new Date().getTime()}.png`;
//
entry.getFile(fileName, {create: true}, (fileEntry) => {
// base64Blob
const arr = base64Data.split(',');
const mime = arr[0].match(/:(.*?);/)[1];
const bstr = atob(arr[1]);
let n = bstr.length;
const u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
const blob = new Blob([u8arr], {type: mime});
//
fileEntry.createWriter((fileWriter) => {
fileWriter.write(blob);
//
this.recipeImage = plus.io.convertLocalFileSystemURL(fileName);
}, (e) => {
console.log("Write file failed: " + e.message);
});
}, (e) => {
console.log("Get file failed: " + e.message);
});
}, (e) => {
console.log("Resolve file system failed: " + e.message);
});
}
go_back_to_home() {
uni.navigateTo({
url: '/pages/homepages/homes/home/home'
});
},
generate() {
uni.showToast({
title: '正在生成...',
icon: 'loading',
duration: 15000, // Toast 2
});
//
const app= getApp();
uni.request({
url: app.globalData.fit_journey_ai_address + '/ai/recipe/generate',
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization':this.token
},
data: {
},
success: (res) => {
if(res.data.code===200){
console.log("请求成功!请求数据是", res);
this.result = res.data.data;
}else {
uni.showToast({
title:"AI生成失败",
icon: 'none',
duration: 2000
})
this.result = res.data.msg;
}
},
error: (res) => {
console.log("请求失败!请求数据是", res);
}
});
//
setTimeout(() => {
this.can_generate_button_click= false;
this.is_create_success = 0;
}, 20000);
/* //在20秒的时候清空result
setTimeout(() => {
this.result="";
}, 20000);*/
},
go_back(){
this.is_create_success = -1;
this.can_generate_button_click=true;
}
}
}
</script>
<style lang="scss">
.background {
position: absolute;
width: 100%;
height: 100%;
top: 0%;
left: 0%;
}
.back_button {
position: absolute;
width: 3%;
height: 3%;
top: 4%;
left: 7%;
}
.generate_button {
position: absolute;
width: 70%;
height: 12%;
top: 85%;
left: 14%;
}
.recipe-image {
position: absolute;
width: 80%; //
height: auto; //
top: 50%; //
left: 50%; //
transform: translate(-50%, -50%); // 使transform
z-index: 10; //
}
<style scoped lang="scss">
.background {
position: absolute;
width: 102%;
height: 102%;
top: 0;
left: -1%;
z-index: -1;
}
.back_button {
position: absolute;
width: 3%;
height: 3%;
top: 4%;
left: 7%;
}
.generate_button {
position: absolute;
width: 90%;
height: 12%;
top: 87%;
left: 5%;
}
.create_fail{
position: absolute;
height: 80%;
width: 90%;
top: 7%;
left: 5%;
border-radius: 20px;
background-color: #92a9c6;
z-index: 1;
.ai_create_text{
position: absolute;
width: 100%;
height: 10%;
top: 5%;
left: 0;
font-weight: bold;
font-size: 20px;
text-align: center;
color: #ffffff;
}
.go_back{
position: absolute;
width: 80%;
height: 13%;
top: 88.5%;
left: 10%;
}
.result_area{
position: absolute;
width: 80%;
height: 75%;
top: 12%;
left: 10%;
border-radius: 20px;
background-color: #e4dfdf;
color: #000000;
.result{
position: relative;
left: 2%;
font-size: 16px; /* 设置文字大小 */
font-weight: bold; /* 文字加粗 */
line-height: 1.5; /* 行间距 */
padding: 10px; /* 添加内边距,使文字不贴边 */
word-break: break-word; /* 长单词换行 */
}
}
}
/*
.create_success{
position: absolute;
height: 80%;
width: 80%;
top: 10%;
left: 10%;
border-radius: 20px;
background-color: #2C405A;
z-index: 10;
border: 2px solid #ffffff;
!* .go_back{
position: absolute;
width: 10%;
height: 10%;
top: 5%;
left: 85%;
}
.ai_create_text{
z-index: 100;
color: #ffffff;
}*!
}
*/
.recipe-image {
position: absolute;
width: 80%; //
height: auto; //
top: 50%; //
left: 50%; //
transform: translate(-50%, -50%); // 使transform
z-index: 10; //
}
</style>

@ -1,5 +1,20 @@
<template>
<view>
<view class="background">
<image class="go_back_button" @click="go_back" src="@/static/homepages/homes/knowledge_dictionary/pictures/go_back_button.png" ></image>
<image class="search_area" src="@/static/homepages/homes/choice_book/pictures/search_area.png"></image>
<input
class="input_area"
v-model="searchText"
placeholder="请输入搜索内容"
placeholder-style="color: #999999;"
@input="onSearch"
></input>
<image class="book" src="@/static/homepages/homes/choice_book/pictures/book.png"></image>
<image class="book1" src="@/static/homepages/homes/choice_book/pictures/book1.png"></image>
<image class="book2" src="@/static/homepages/homes/choice_book/pictures/book2.png"></image>
<image class="book3" src="@/static/homepages/homes/choice_book/pictures/book3.png"></image>
<image class="book4" src="@/static/homepages/homes/choice_book/pictures/book4.png"></image>
</view>
</template>
@ -7,11 +22,102 @@
<script>
export default {
data() {
return {};
return {
token: uni.getStorageSync("access_token"),
searchText: ''
};
},
methods:{
go_back(){
uni.navigateTo({
url: '/pages/homepages/homes/home/home'
})
uni.showToast({
title: '正在返回主页面',
icon: 'none',
duration: 2000
})
},
onSearch() {
console.log('搜索内容:', this.searchText)
}
}
}
</script>
<style lang="scss">
.background{
position: absolute;
height: 100%;
width: 100%;
background: #98AED1;
}
.go_back_button{
position: absolute;
height: 8%;
width: 15%;
top: 5%;
left: 5%;
}
.book{
position: absolute;
height: 50%;
width: 90%;
top: 45%;
left: 5%;
}
.book1{
position: absolute;
height: 18%;
width: 30%;
top: 55%;
left: 10%;
}
.book2{
position: absolute;
height: 18%;
width: 30%;
top: 55%;
left: 59%;
}
.book3{
position: absolute;
height: 18%;
width: 30%;
left: 10%;
top: 76%;
}
.book4{
position: absolute;
height: 18%;
width: 30%;
left: 59%;
top: 76%;
}
.search_area{
position: absolute;
height: 20%;
width: 90%;
top: 15%;
left: 5%;
}
.input_area{
position: absolute;
height: 8%;
width: 70%;
left: 21%;
top: 27%;
background: transparent;
padding: 0 20rpx;
font-size: 32rpx;
color: #333;
z-index: 2;
}
</style>

@ -1,17 +0,0 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {};
}
}
</script>
<style lang="scss">
</style>

@ -1,17 +0,0 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {};
}
}
</script>
<style lang="scss">
</style>

@ -4,16 +4,20 @@
<!--轮播图 -->
<swiper :autoplay="true" interval="3000" duration="500" class="swiper" :current="current" circular="true" @change="onSwiperChange">
<swiper-item>
<puppy_chat class="swiper_item"></puppy_chat>
<image class="swiper_item_background" src="@/static/components/swiper/puppy_chat/background.png"></image>
<image class="puppy_chat_button" @click="go_to_puppy_chat" src="@/static/components/swiper/puppy_chat/button.png"></image>
</swiper-item>
<swiper-item>
<read_center class="swiper_item"></read_center>
<image class="swiper_item_background" src="@/static/components/swiper/community/background.png"></image>
<image class="puppy_chat_button" @click="go_to_community" src="@/static/components/swiper/puppy_chat/button.png"></image>
</swiper-item>
<swiper-item>
<exercise class="swiper_item"></exercise>
<image class="swiper_item_background" src="@/static/components/swiper/read/background.png"></image>
<image class="puppy_chat_button" @click="go_to_read" src="@/static/components/swiper/puppy_chat/button.png"></image>
</swiper-item>
<swiper-item>
<community class="swiper_item"></community>
<image class="swiper_item_background" src="@/static/components/swiper/exercise/background.png"></image>
<image class="exercise_button" @click="go_to_exercise" src="@/static/components/swiper/puppy_chat/button.png"></image>
</swiper-item>
</swiper>
<!-- 动态切换的轮播点 -->
@ -40,10 +44,10 @@
<view class="read_area">
<!-- 知识图谱-->
<image class="dictionary_background" src="@/static/components/dictionary/pictures/background.png"></image>
<image class="dictionary_button" src="@/static/components/dictionary/pictures/button.png"></image>
<image class="dictionary_button" @click="go_to_knowledge_dictionary" src="@/static/components/dictionary/pictures/button.png"></image>
<!-- 书籍阅读-->
<image class="read_background" src="@/static/components/read/pictures/background.png"></image>
<image class="read_button" src="/static/components/read/pictures/button.png"></image>
<image class="read_button" @click="go_to_choice_book" src="/static/components/read/pictures/button.png"></image>
</view>
<!--空白区域 -->
<view class="block_area"></view>
@ -56,7 +60,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() {
@ -71,6 +75,56 @@ export default {
};
},
methods:{
go_to_exercise(){
uni.navigateTo({
url: '/pages/homepages/homes/my_exercise_plan/my_exercise_plan'
});
uni.showToast({
title: '跳转成功',
})
},
go_to_read(){
uni.navigateTo({
url: '/pages/homepages/homes/choice_book/choice_book'
});
uni.showToast({
title: '跳转成功',
})
},
go_to_community(){
uni.navigateTo({
url: '/pages/homepages/community/community/community'
});
uni.showToast({
title: '跳转成功',
})
},
go_to_puppy_chat(){
uni.navigateTo({
url: '/pages/homepages/puppy_chat/puppy_chat'
});
uni.showToast({
title: '跳转成功',
})
},
go_to_choice_book(){
uni.navigateTo({
url: '/pages/homepages/homes/choice_book/choice_book'
});
uni.showToast({
title: '跳转成功',
})
},
go_to_knowledge_dictionary(){
uni.navigateTo({
url: '/pages/homepages/homes/knowledge_dictionary/knowledge_dictionary'
});
uni.showToast({
title: '跳转成功',
})
},
onSwiperChange(e){
this.current = e.detail.current;
}

@ -0,0 +1,189 @@
<template>
<view class="background">
<image class="go_back_button" @click="go_back" src="@/static/homepages/homes/knowledge_dictionary/pictures/go_back_button.png" ></image>
<input> </input>
<image class="search_button" @click="search" src="@/static/homepages/homes/knowledge_dictionary/pictures/search_button.png"></image>
<image class="strawberry_image" @click="go_to_strawberry" src="@/static/homepages/homes/knowledge_dictionary/pictures/strawberry.png"></image>
<image class="peach_image" @click="go_to_peach" src="@/static/homepages/homes/knowledge_dictionary/pictures/peach.png"></image>
<image class="carrot_image" @click="go_to_carrot" src="@/static/homepages/homes/knowledge_dictionary/pictures/carrot.png"></image>
<image class="pineapple_image" @click="go_to_pineapple" src="@/static/homepages/homes/knowledge_dictionary/pictures/pineapple.png"></image>
<image class="orange_image" @click="go_to_orange" src="@/static/homepages/homes/knowledge_dictionary/pictures/orange.png"></image>
<image class="banana_image" @click="go_to_banana" src="@/static/homepages/homes/knowledge_dictionary/pictures/banana.png"></image>
</view>
</template>
<script>
export default {
data() {
return {
url :""//url
};
},
methods:{
search(){
// URL
uni.showToast({
title: '搜索成功!',
icon: 'none',
duration: 2000
})
uni.showToast({
title: '搜索失败,知识库知识有限哦~',
icon: 'none',
duration: 2000
})
},
go_back(){
uni.navigateTo({
url: '/pages/homepages/homes/home/home'
})
uni.showToast({
title: '正在返回主页面',
icon: 'none',
duration: 2000
})
},
go_to_strawberry(){
uni.navigateTo({
url: '/pages/homepages/homes/dictionary/strawberry/strawberry'
})
uni.showToast({
title: '正在前往草莓知识页面',
icon: 'none',
duration: 2000
})
},
go_to_peach(){
uni.navigateTo({
url: '/pages/homepages/homes/dictionary/pear/pear'
})
uni.showToast({
title: '正在前往桃子知识页面',
icon: 'none',
duration: 2000
})
},
go_to_carrot(){
uni.navigateTo({
url: '/pages/homepages/homes/dictionary/carrot/carrot'
})
uni.showToast({
title: '正在前往胡萝卜知识页面',
icon: 'none',
duration: 2000
})
},
go_to_pineapple(){
uni.navigateTo({
url: '/pages/homepages/homes/dictionary/pineapple/pineapple'
})
uni.showToast({
title: '正在前往菠萝知识页面',
icon: 'none',
duration: 2000
})
},
go_to_orange(){
uni.navigateTo({
url: '/pages/homepages/homes/dictionary/orange/orange'
})
uni.showToast({
title: '正在前往橙子知识页面',
icon: 'none',
duration: 2000
})
},
go_to_banana(){
uni.navigateTo({
url: '/pages/homepages/homes/dictionary/banana/banana'
})
uni.showToast({
title: '正在前往香蕉知识页面',
icon: 'none',
duration: 2000
})
},
}
}
</script>
<style lang="scss">
.background{
background-image: url("@/static/homepages/homes/knowledge_dictionary/pictures/background.png");
background-size: cover;
background-position: center;
height: 101vh;
display: flex;
flex-direction: column; /* 纵向排列 */
align-items: center; /* 水平居中 */
justify-content: flex-end; /* 使内容向底部对齐 */
position: relative;
}
.go_back_button{
position: absolute;
height: 8%;
width: 15%;
top: 5%;
left: 5%;
}
.search_button{
position: absolute;
height: 5%;
width: 10%;
top: 43.5%;
left: 83%;
}
.strawberry_image{
position: absolute;
height: 15%;
width: 30%;
top: 60%;
left: 2%;
}
.peach_image{
position: absolute;
height: 15%;
width: 30%;
top: 60%;
left: 34%;
}
.carrot_image{
position: absolute;
height: 15%;
width: 30%;
top: 60%;
left: 67%;
}
.pineapple_image{
position: absolute;
height: 15%;
width: 30%;
top: 78%;
left: 1%;
}
.orange_image{
position: absolute;
height: 15%;
width: 30%;
top: 78%;
left: 34%;
}
.banana_image{
position: absolute;
height: 15%;
width: 30%;
top: 78%;
left: 67%;
}
</style>

@ -1,17 +0,0 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {};
}
}
</script>
<style lang="scss">
</style>

@ -1,17 +1,287 @@
<template>
<view>
<view class="recipe-plan">
<image class="go_back_button" @click="go_back_to_home" src="@/static/homepages/homes/my_recipe_plan/pictures/button.png"></image>
<view class="date">{{ currentDate }}</view>
<text class ="today_recipe_and_calories">今日饮食和热量</text>
<view class="divider_line"></view>
<image class="time_line" src="@/static/homepages/homes/my_recipe_plan/pictures/time_line.png"></image>
<view class="input_box_breakfast">
<input
v-model="meals[0].food"
class="food_input"
placeholder="请输入食物名称"
@input="calculateCalories(0)"
/>
<view class="calories_text">
<text class="icon"></text>
<text>热量{{ meals[0].calories }}J</text>
</view>
<view
class="check_button"
:class="{ active: meals[0].checked }"
@click="toggleCheck(0)"
></view>
</view>
<view class="input_box_lunch">
<input
v-model="meals[1].food"
class="food_input"
placeholder="请输入食物名称"
@input="calculateCalories(1)"
/>
<view class="calories_text">
<text class="icon"></text>
<text>热量{{ meals[1].calories }}J</text>
</view>
<view
class="check_button"
:class="{ active: meals[1].checked }"
@click="toggleCheck(1)"
></view>
</view>
<view class="input_box_dinner">
<input
v-model="meals[2].food"
class="food_input"
placeholder="请输入食物名称"
@input="calculateCalories(2)"
/>
<view class="calories_text">
<text class="icon"></text>
<text>热量{{ meals[2].calories }}J</text>
</view>
<view
class="check_button"
:class="{ active: meals[2].checked }"
@click="toggleCheck(2)"
></view>
</view>
<view class="input_box_midnight_snack">
<input
v-model="meals[3].food"
class="food_input"
placeholder="请输入食物名称"
@input="calculateCalories(3)"
/>
<view class="calories_text">
<text class="icon"></text>
<text>热量{{ meals[3].calories }}J</text>
</view>
<view
class="check_button"
:class="{ active: meals[3].checked }"
@click="toggleCheck(3)"
></view>
</view>
</view>
</template>
<script>
import { getFoodCalories } from '@/static/homepages/homes/my_recipe_plan/js/database.js'
export default {
data() {
return {};
return {
meals: [
{ time: '早餐', food: '', calories: 0, dotColor: 'yellow', checked: false },
{ time: '午餐', food: '', calories: 0, dotColor: 'yellow', checked: false },
{ time: '晚餐', food: '', calories: 0, dotColor: 'red', checked: false },
{ time: '夜宵', food: '', calories: 0, dotColor: 'blue', checked: false }
]
}
},
computed: {
currentDate() {
const date = new Date()
return `${date.getFullYear()}${date.getMonth() + 1}${date.getDate()}`
}
},
methods: {
go_back_to_home(){
uni.navigateTo({
url:"/pages/homepages/homes/home/home"
})
},
calculateCalories(index) {
//
if (!this.meals[index].food.trim()) {
return
}
// loading
this.meals[index].loading = true
this.meals[index].calories = 0
// 2
setTimeout(() => {
const calories = getFoodCalories(this.meals[index].food)
if (calories) {
uni.showToast({
title: '计算食物卡路里成功!!',
icon: 'none',
duration: 2000
})
this.meals[index].calories = calories
this.meals[index].recordTime = this.getCurrentTime()
this.saveMealsData()
} else {
uni.showToast({
title: '未找到该食物的卡路里信息',
icon: 'none',
duration: 2000
})
}
this.meals[index].loading = false
}, 2000)
},
toggleCheck(index) {
this.meals[index].checked = !this.meals[index].checked
}
}
}
</script>
<style lang="scss">
.recipe-plan {
position: relative;
width: 100%;
height: 100vh;
background-color: #B6D1E0;
.go_back_button{
position:absolute;
width: 20%;
height: 8%;
left: 2%;
top: 3%;
}
.date {
position: absolute;
width: 50%;
height: 2%;
left: 6%;
top: 11%;
font-size: 1.4em; //
font-weight: 700; //
display: flex; // 使flex
align-items: center; //
justify-content: center; //
padding: 2% 0;
}
.today_recipe_and_calories{
position: absolute;
width: 75%;
height: 4%;
left: 6%;
top: 16%;
font-size: 2.5em; //
font-weight: 700; //
display: flex; // 使flex
align-items: center; //
justify-content: center; //
padding: 2% 0;
}
.divider_line {
position: absolute;
width: 88%; // 线
height: 2px; // 线
background-color: #0c0b0b;
left: 6%;
top: 24%; // today_recipe_and_calories
}
.time_line{
position: absolute;
width: 15%;
height: 61%;
top: 27%;
left: 5%;
}
.input_box_breakfast{
position: absolute;
width: 70%;
height: 15%;
top: 27%;
left: 25%;
background-color: #ffffff;
border-radius: 30px;
}
.input_box_lunch{
position: absolute;
width: 70%;
height: 15%;
top: 45%;
left: 25%;
background-color: #ffffff;
border-radius: 30px;
}
.input_box_dinner{
position: absolute;
width: 70%;
height: 15%;
top: 63%;
left: 25%;
background-color: #ffffff;
border-radius: 30px;
}
.input_box_midnight_snack{
position: absolute;
width: 70%;
height: 15%;
top: 81%;
left: 25%;
background-color: #ffffff;
border-radius: 30px;
}
.input_box_breakfast,
.input_box_lunch,
.input_box_dinner,
.input_box_midnight_snack {
.food_input {
position: absolute;
left: 5%;
top: 20%;
width: 70%;
height: 30%;
border: none;
font-size: 1.2em;
}
.calories_text {
position: absolute;
left: 5%;
bottom: 20%;
color: #666;
font-size: 1em;
.icon {
margin-right: 8px;
}
}
.check_button {
position: absolute;
right: 5%;
top: 30%;
width: 30px;
height: 30px;
border-radius: 50%;
background-color: #e0e0e0;
color: white;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.3s;
&.active {
background-color: #4285f4; //
}
}
}
}
</style>

@ -1,20 +1,192 @@
<template>
<view>
<text>这个是puppy_chat界面</text>
<tarbar_puppy_chat></tarbar_puppy_chat>
<!-- 背景图片-->
<image class="background" src="@/static/homepages/puppy_chat/pictures/chat_image.png"></image>
<scroll-view scroll-y="true" id="chat_scroll" :scroll-top="scrollTop" scroll-with-animation="true">
<view class="chat">
<!-- 渲染聊天消息气泡 -->
<view v-for="(message, index) in send_messages" :key="index" :class="['chat_area', message.sender === 'user' ? 'user_message' : 'ai_message']">
<!-- 头像部分放在气泡外部 -->
<view v-if="message.sender === 'ai'" class="avatar_container ai_avatar_container">
<image class="ai_avatar" src="@/static/homepages/puppy_chat/pictures/ai_avatar.png"></image>
</view>
<!-- 消息内容 -->
<view :class="['message_content', message.sender === 'user' ? 'user_message_content' : 'ai_message_content']">
<!-- <text>{{ message.message }}</text> -->
<zero-markdown-view :markdown="message.message"></zero-markdown-view>
</view>
<view v-if="message.sender === 'user'" class="avatar_container user_avatar_container">
<image class="user_avatar" src="@/static/homepages/puppy_chat/pictures/user_avatar.png"></image>
</view>
</view>
</view>
</scroll-view>
<!-- 输入框部分 -->
<view class="input_box">
<image class="input_box_background" src="@/static/homepages/puppy_chat/pictures/input_box_background.png"></image>
<image class="send_button" src="@/static/homepages/puppy_chat/pictures/send_button.png" @click="handleSendMessage"></image>
<input class="input_words" type="text" placeholder="fit journey-Ai能回答你任何问题" v-model="input_message"></input>
</view>
<!-- 底部菜单栏部分 -->
<tarbar_puppy_chat></tarbar_puppy_chat>
</template>
<script>
export default {
data() {
return {};
return {
token:uni.getStorageSync("access_token"),
input_message: '',
send_message:'',
send_messages: [], //
conversation_id: 'e97ec0f2-2a94-42e7-b6db-b04883d349e8',//id
answer: '', // AI
scrollTop : 0, //
totalHeight:0,
scrollViewHeight:0,
};
},
onLoad() {
//conversation_id
const app = getApp();
console.log(app.globalData.token);
console.log(app.globalData.fit_journey_ai_address);
//
uni.request({
url: app.globalData.fit_journey_ai_address + '/ai/create-conversation',
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization': this.token
},
data: {
},
success: (res) => {
console.log("请求成功!请求数据是", res);
this.conversation_id= res.data.data.conversation_id;
},
error: (res) => {
console.log("请求失败!请求数据是", res);
}
});
this.send_messages.push({
sender: 'ai', //
message:"我是fit journey的专属AI小助手有什么问题都可以问我哦~"
});
},
mounted() {
//
const that = this
const query = uni.createSelectorQuery().in(that)
query.select('#chat_scroll').boundingClientRect()
query.exec((res)=>{
that.scrollViewHeight = res[0].height
})
},
methods: {
setScrollTop(){
//
setTimeout(()=>{ //
const that = this
const query = uni.createSelectorQuery().in(that)
query.selectAll('.chat_area').boundingClientRect()
query.exec((res)=>{
res[0].forEach((item)=>{
that.totalHeight = that.totalHeight+item.height
})
if (that.totalHeight > that.scrollViewHeight) { //
that.scrollTop = that.totalHeight - that.scrollViewHeight
}
})
},100)
},
handleSendMessage() {
//
const userMessageCount = this.send_messages.filter(msg => msg.sender === 'user').length;
if (userMessageCount >= 1) {
// 2
uni.showToast({
title: "AI 可是要交钱的哦,最多发送1条消息,刷新之后再试试吧~",
icon: "none",
});
} else {
// 2
if (this.input_message.trim() !== "") {
//
this.send_messages.push({
sender: 'user', //
message: this.input_message
});
this.send_messages.push({
sender: 'ai', //
message: "正在分析您的问题等待puppy一会呢"
});
this.send_message=this.input_message;
this.input_message = ""; //
this.setScrollTop() //
// AI
this.fetchAIResponse();
} else {
//
uni.showToast({
title: "请输入内容后发送",
icon: "none",
});
}
}
},
fetchAIResponse() {
const app = getApp();
console.log(app.globalData.token);
console.log(app.globalData.fit_journey_ai_address);
//
uni.request({
url: app.globalData.fit_journey_ai_address + '/ai/chat-with-no-stream',//TODO:
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization': this.token
},
data: {
conversationId: this.conversation_id,
ask: this.send_message,
},
success: (res) => {
// console.log("", res.data.data);
//
this.answer = res.data.data;
// AI
this.send_messages.pop();//
this.send_messages.push({
sender: 'ai', // AI
message:this.answer
});
this.setScrollTop() //
},
error: (res) => {
console.log("请求失败!请求数据是", res);
}
});
}
}
}
</script>
<style lang="scss">
@import "@/static/homepages/puppy_chat/css/puppy_chat.scss";
</style>

@ -1,17 +1,206 @@
<template>
<view>
<view class="background">
<view class="user_head">
<image class="head" src="/static/homepages/user/basic_information/head.png"></image>
<image class="head_pic" src="/static/homepages/user/basic_information/head_pic.png"></image>
<image class="head_but" @click="change_head()" src="/static/homepages/user/basic_information/but.png"></image>
</view>
<view class="self_back">
<view class="name">
<image class="user_name_but" @click="change_name()" src="/static/homepages/user/basic_information/but.png"></image>
<input v-if="n_writeable===true" class="name_text" v-model="name"></input>
<view v-else class="w_name">{{name}}</view>
</view>
<view class="self">
<image class="self_but" @click="change_self()" src="/static/homepages/user/basic_information/but.png"></image>
<textarea v-if="s_writeable===true" v-model="selftext" class="self_write"></textarea>
<view v-else class="self_read">{{selftext}}</view>
</view>
<image class="button" @click="save_change()" src="/static/homepages/user/basic_information/button.png"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
return {
name:'puppy',
selftext:'您的个人简介',
n_writeable:false,
s_writeable:false,
};
},
methods:{
change_self(){
console.log('selftext:', this.selftext);
this.s_writeable=true;
},
change_name(){
console.log('name:', this.name);
this.n_writeable=true;
},
navigateTo(page) {
uni.navigateTo({
url: page
});
},
save_change()
{
console.log('name:', this.name);
console.log('selftext:', this.selftext);
const NAME=this.name;
this.n_writeable=false;
this.s_writeable=false;
this.navigateTo(`/pages/homepages/user/user/user?user_name=${NAME}`);
},
}
}
</script>
<style lang="scss">
</style>
.background{
background-image: url("@/static/homepages/user/basic_information/img.png");
background-size: cover;
background-position: center;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
position: relative;
}
.self_back{
background-image: url("@/static/homepages/user/basic_information/back.png");
background-size: cover;
flex:1;
height: 80vh;
width: 57.3vh;
position: absolute;
bottom:-7%
}
.name{
background-image: url("/static/homepages/user/basic_information/user_name.png");
background-size: cover;
background-position: center;
height: 30vh;
flex:1;
align-items: center;
position: absolute;
height: 10.1vh;
width: 45vh;
right: 10.5%;
bottom: 71%;
}
.self{
background-image: url("/static/homepages/user/basic_information/self_back.png");
background-size: cover;
background-position: center;
height: 20vh;
flex:1;
align-items: center;
position: absolute;
width: 45vh;
right: 10.5%;
bottom: 23%;
}
.user_head{
background-image: url("/static/homepages/user/basic_information/user_back.png");
background-size: cover;
flex:1;
height: 30vh;
width: 57.3vh;
position: absolute;
bottom:70%
}
.head{
position: absolute;
height: 55%;
width: 30%;
opacity: 1;
right: 34%; /* 距右边 10% */
bottom: -20%;
z-index: 1;
}
.head_pic{
position: absolute;
height: 50%;
width: 25%;
opacity: 1;
right: 36.7%; /* 距右边 10% */
bottom: -10%;
z-index: 1;
}
.head_but{
position: absolute;
height: 14%;
width: 7%;
opacity: 1;
right: 34%; /* 距右边 10% */
bottom: -17%;
z-index: 1;
}
.user_name_but{
position: absolute;
height: 47%;
width: 10%;
opacity: 1;
right: 3%; /* 距右边 10% */
bottom: 30%;
}
.name_text{
position: absolute;
font-size: 1.4em;
text-align: center;
width: 65%;
height: 40%;
top: 24%;
left: 20%;
color:#000000;
}
.w_name{
position: absolute;
font-size: 1.4em;
text-align: center;
width: 65%;
height: 40%;
top: 26%;
left: 20%;
color:#000000;
}
.self_but{
position: absolute;
height: 13%;
width: 10%;
opacity: 1;
right: 3%; /* 距右边 10% */
bottom: 3%;
}
.self_write{
position: absolute;
font-size: 1.4em;
width: 70%;
height: 80%;
top: 4%;
right: 10%;
color:#000000;
}
.self_read{
position: absolute;
font-size: 1.4em;
width: 70%;
height: 80%;
top: 4%;
right: 10%;
color:#000000;
}
.button{
position: absolute;
height: 10%;
width: 37%;
opacity: 1;
right: 31%; /* 距右边 10% */
bottom: 11%;
}
</style>

@ -1,24 +1,7 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {};
}
}
</script>
<style lang="scss">
</style>
<template>
<view>
<image class="background" src="/static/homepages/user/bmi_information/pictures/background.png"></image>
<image class="back_button" src="/static/homepages/user/bmi_information/pictures/button.png"></image>
<image class="back_button" @click="goto_user()" src="/static/homepages/user/bmi_information/pictures/button.png"></image>
<image class="text_background_one" src="/static/homepages/user/bmi_information/pictures/text_background.png"></image>
<image class="text_background_two" src="/static/homepages/user/bmi_information/pictures/text_background.png"></image>
<image class="text_background_three" src="/static/homepages/user/bmi_information/pictures/text_background.png"></image>
@ -54,6 +37,16 @@ export default {
};
},
methods:{
navigateTo(page) {
uni.navigateTo({
url: page
});
},
goto_user(){
this.navigateTo(`/pages/homepages/user/user/user`);
},
submit(){
// API
const url = app.globalData.fit_journey_ai_address+`/bmi`;

@ -17,7 +17,6 @@
<image class="submit_button" @click="submit()" src="/static/homepages/user/exercise_plans/pictures/submit_button.png"></image>
</view>
</template>
<script>
export default {
data() {

@ -1,17 +0,0 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {};
}
}
</script>
<style lang="scss">
</style>

@ -1,77 +1,261 @@
<template>
<view>
<text>这个是User界面</text>
<view class="background">
<image class="head_pic" src="@/static/homepages/user/user/pictures/head_pic.png"></image>
<image class="head_button" @click="goto_user()" src="@/static/homepages/user/user/pictures/head_button.png"></image>
<image class="bmi_button" @click="goto_bmi()" src="@/static/homepages/user/user/pictures/bmi_button.png"></image>
<image class="eat_button" @click="goto_eat()" src="@/static/homepages/user/user/pictures/eat_button.png"></image>
<image class="ad_button" @click="goto_exer()" src="@/static/homepages/user/user/pictures/ad_button.png"></image>
<image class="button" @click="goto_login()" src="@/static/homepages/user/user/pictures/button.png"></image>
<image class="point" src="@/static/homepages/user/user/pictures/point.png"></image>
<image class="pie" src="@/static/homepages/user/user/pictures/pie.png"></image>
<!-- ECharts 图表 -->
<view style="width: 100%; height: 400px;">
<canvas ref="myChart" style="width: 100%; height: 100%;"></canvas>
</view>
<tarbar_user></tarbar_user>
<image v-if="sex===0" class="user" src="@/static/homepages/user/user/pictures/female.png"></image>
<image v-if="sex===1" class="user" src="@/static/homepages/user/user/pictures/male.png"></image>
<text class="id">{{user_name}}</text>
<text class="hot_in">20000J</text>
<text class="hot_out">17000J</text>
<text class="height">{{user_height}}cm</text>
<text class="weight">{{user_weight}}kg</text>
<text class="bmi">{{user_bmi}}</text>
<text class="xw">{{user_xw}}</text>
<text class="yw">{{user_yw}}</text>
<text class="tw">{{user_tw}}</text>
<text class="bmi_state">很健康</text>
</view>
<tarbar_user></tarbar_user>
</template>
<script>
import * as echarts from 'echarts';
export default {
data() {
return {};
},
onReady() {
this.initChart();
return {
sex : 1,//10
user_name:'puppy',
user_height:'180',
user_weight:'75',
user_xw:'44.5',
user_yw:'34.0',
user_tw:'42.5',
user_bmi:'23.1'
};
},
methods: {
initChart() {
const chartDom = this.$refs.myChart;
const myChart = echarts.init(chartDom);
const option = {
legend: {
top: 'bottom'
},
toolbox: {
show: true,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true }
}
},
series: [
{
name: 'Nightingale Chart',
type: 'pie',
radius: [50, 250],
center: ['50%', '50%'],
roseType: 'area',
itemStyle: {
borderRadius: 8
},
data: [
{ value: 40, name: 'rose 1' },
{ value: 38, name: 'rose 2' },
{ value: 32, name: 'rose 3' },
{ value: 30, name: 'rose 4' },
{ value: 28, name: 'rose 5' },
{ value: 26, name: 'rose 6' },
{ value: 22, name: 'rose 7' },
{ value: 18, name: 'rose 8' }
]
}
]
};
myChart.setOption(option);
onLoad(options){
if (options.user_name) {
this.user_name = options.user_name;
};
},
methods:{
navigateTo(page) {
uni.navigateTo({
url: page
});
},
onResize() {
this.myChart.resize();
}
goto_user(){
this.navigateTo(`/pages/homepages/user/basic_information/basic_information`);
},
goto_bmi(){
this.navigateTo(`/pages/homepages/user/bmi_information/bmi_information`);
},
goto_eat(){
this.navigateTo(`/pages/homepages/user/recipe_and_calorie/recipe_and_calorie`);
},
goto_exer(){
this.navigateTo(`/pages/homepages/user/exercise_plans/exercise_plans`);
},
goto_login(){
this.navigateTo(`/pages/login/account_login/account_login`);
},
}
}
</script>
<style lang="scss">
/* 添加样式 */
</style>
<style scoped>
.background{
background-image: url("@/static/homepages/user/user/pictures/background.png");
background-size: cover;
background-position: center;
height: 225vh;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
position: relative;
}
.head_pic{
position: absolute;
height: 4%;
width: 20%;
opacity: 1;
right: 70%;
top: 3.5%;
}
.head_button{
position: absolute;
height: 1.2%;
width: 20%;
opacity: 1;
right: 5%;
bottom: 90.7%;
}
.bmi_button{
position: absolute;
height: 1.2%;
width: 20%;
opacity: 1;
right: 6%;
bottom: 60.7%;
}
.ad_button{
position: absolute;
height: 2%;
width: 35%;
opacity: 1;
right: 57%;
bottom:17.5%;
}
.eat_button{
position: absolute;
height: 2%;
width: 35%;
opacity: 1;
right: 57%;
bottom: 10.5%;
}
.user{
position: absolute;
height: 18%;
width: 30%;
opacity: 1;
left: 55%;
bottom: 26%;
}
.point{
position: absolute;
height: 0.3%;
width: 2%;
opacity: 1;
right: 50%;
bottom: 48.4%;
}
.button{
position: absolute;
height: 4%;
width: 90%;
left: 5%;
top: 90.5%;
}
.pie{
position: absolute;
height: 18%;
width: 85%;
left: 5%;
top: 18%;
}
.id{
position: absolute;
opacity: 1;
left: 37%; /* 距右边 10% */
top: 4.7%;
font-size: 1.5rem;
}
.hot_in{
position: absolute;
height: 0.2%;
width: 5%;
opacity: 1;
left: 20%; /* 距右边 10% */
top: 12.7%;
font-size: 0.5rem;
color: #ffffff;
}
.hot_out{
position: absolute;
height: 0.2%;
width: 5%;
opacity: 1;
left: 71%; /* 距右边 10% */
top: 12.7%;
font-size: 0.5rem;
color: #ffffff;
}
.height{
position: absolute;
height: 0.2%;
width: 5%;
opacity: 1;
right: 72%; /* 距右边 10% */
bottom: 55.3%;
font-size: 1.2rem;
color: #ffffff;
}
.weight{
position: absolute;
height: 0.2%;
width: 5%;
opacity: 1;
right: 33%; /* 距右边 10% */
bottom: 55.3%;
font-size: 1.2rem;
color: #ffffff;
}
.bmi{
position: absolute;
height: 0.2%;
width: 5%;
opacity: 1;
right: 73%; /* 距右边 10% */
bottom: 50.5%;
font-size: 1.2rem;
color: #ffffff;
}
.xw{
position: absolute;
height: 0.2%;
width: 5%;
opacity: 1;
right: 79%; /* 距右边 10% */
bottom: 39.3%;
font-size: 1.2rem;
}
.yw{
position: absolute;
height: 0.2%;
width: 5%;
opacity: 1;
right: 79%; /* 距右边 10% */
bottom: 34.5%;
font-size: 1.2rem;
}
.tw{
position: absolute;
height: 0.2%;
width: 5%;
opacity: 1;
right: 79%; /* 距右边 10% */
bottom: 29.3%;
font-size: 1.2rem;
}
.bmi_state{
position: absolute;
text-align: center;
opacity: 1;
left: 68%;
top: 49.4%;
font-size: 0.2em;
color: #000000;
}
</style>

@ -19,7 +19,8 @@
export default {
data(){
return{
height:''
height:'',
token: uni.getStorageSync('access_token'),
};
},
onLoad(options){
@ -33,22 +34,25 @@ export default {
console.log(app.globalData.token);
console.log(app.globalData.fit_journey_basic_address);
console.log("当前的身高是" + this.height);
// height "cm"
const numericHeight = parseFloat(this.height.replace('cm', '').trim());
console.log("本地存储的token是"+this.token)
//
uni.request({
url: app.globalData.fit_journey_basic_address + '/height/write_user_height',
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization': app.globalData.token // TODOtoken
'Authorization': this.token
},
data: {
height: numericHeight, //
},
success: (res) => {
uni.showToast({
title: '提交成功',
icon: 'success',
})
console.log("请求成功!请求数据是", res);
// 使
uni.navigateTo({

@ -17,6 +17,11 @@
<script>
export default {
data() {
return {
token: uni.getStorageSync("access_token"),
};
},
methods: {
navigateTo(page) {
uni.navigateTo({
@ -33,7 +38,7 @@ export default {
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization': app.globalData.token // TODOtoken
'Authorization':this.token
},
data: {
height: 175, //

@ -19,7 +19,8 @@
export default {
data() {
return {
weight: ''
weight: '',
token : uni.getStorageSync("access_token")
};
},
onLoad(options) {
@ -47,13 +48,18 @@ export default {
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization': app.globalData.token // TODOtoken
'Authorization': this.token
},
data: {
weight: numericWeight, //
},
success: (res) => {
console.log("请求成功!请求数据是", res);
uni.showToast({
title: '提交成功',
icon: 'success',
})
//
this.navigateTo('/pages/information/boy_height_start/boy_height_start');
},

@ -17,6 +17,11 @@
<script>
export default {
data() {
return {
token :uni.getStorageSync("access_token")
}
},
methods: {
go_to_height() {
//
@ -30,12 +35,16 @@ export default {
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization': app.globalData.token // TODOtoken
'Authorization': this.token
},
data: {
weight: 65, //
},
success: (res) => {
uni.showToast({
title: '提交成功',
icon: 'success'
})
console.log("请求成功!请求数据是", res);
//
uni.navigateTo({

@ -19,7 +19,8 @@
export default {
data() {
return {
weight: ''
weight: '',
token :uni.getStorageSync("access_token")
};
},
onLoad(options) {
@ -48,12 +49,16 @@ export default {
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization': app.globalData.token // TODOtoken
'Authorization': this.token
},
data: {
weight: numericWeight, //
},
success: (res) => {
uni.showToast({
title: '提交成功',
icon: 'success',
})
console.log("请求成功!请求数据是", res);
//
this.navigateTo('/pages/information/girl_height_start/girl_height_start');

@ -17,6 +17,11 @@
<script>
export default {
data() {
return {
token :uni.getStorageSync("access_token"),
};
},
methods: {
navigateTo(page) {
uni.navigateTo({
@ -36,12 +41,16 @@ export default {
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization': app.globalData.token // TODOtoken
'Authorization': this.token
},
data: {
weight: 65, //
},
success: (res) => {
uni.showToast({
title: '提交成功',
icon: 'success',
})
console.log("请求成功!请求数据是", res);
//
this.navigateTo('/pages/information/girl_height_start/girl_height_start');

@ -56,6 +56,7 @@ export default {
isGirlSelected: false,
isHumanVisible: false, // human
sex:-1,// 1 0
token:uni.getStorageSync("access_token")
};
},
@ -74,7 +75,7 @@ export default {
console.log('调用函数成功!'); //
//
const app = getApp();
console.log('传递的token是:', app.globalData.token); // Token
console.log('传递的token是:',this.token); // Token
console.log('后端的地址是', app.globalData.fit_journey_basic_address); //
uni.request({
@ -82,18 +83,19 @@ export default {
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization': app.globalData.token // TODOtoken
'Authorization': this.token
},
data: {
sex: this.sex
},
success: (res) => {
console.log('Response:', res.data); //
console.log("开始跳转页面");
uni.showToast({
title: '提交成功',
icon: 'success',
})
console.log("开始跳转页面");
//
const targetPage = this.isBoySelected
? "/pages/information/boy_weight_start/boy_weight_start"

@ -6,38 +6,46 @@
<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">
<!-- 账号输入框 -->
<view class="account_box login_form_item">
<view class="form_input_box">
<input class="account" name="account" type="text" placeholder="请输入你的电话号码"/>
<input class="account" v-model="phone_number" type="text" placeholder="请输入你的电话号码"/>
</view>
<view class="error_tip" v-if="isPhoneError">*</view>
</view>
<!-- 密码输入框 -->
<view class="passage_box login_form_item" v-if="isPassagePage">
<view class="form_input_box passage_input_box">
<input class="passage" name="passage" :password="isOpened" type="text" placeholder="请输入你的密码"/>
<input class="passage" v-model="password" :password="isOpened" type="text" placeholder="请输入你的密码"/>
<image @click="openEyesEvent" class="eyes" :src="eyesStateIcon"></image>
</view>
<view class="error_tip" v-if="isPassageError">*</view>
</view>
<!-- 验证码输入框 -->
<view class="captcha_box login_form_item" v-else>
<view class="form_input_box captcha_input_box">
<input class="captcha" name="captcha" type="text" placeholder="请输入你的验证码"/>
<input class="captcha" v-model="code" name="captcha" type="text" placeholder="请输入你的验证码"/>
<button class="captcha_button" @click="sendCaptchaEvent"
:style="{color:captchaButtonColor, backgroundColor:captchaButtonBackgroundColor}">
{{captchaButtonText}}
@ -51,24 +59,29 @@
</view>
</view>
</form>
</view>
<!-- 前往注册 -->
<navigator url="/pages/login/register/register">
<image class="goto_register" src="../../../static/login/account_login/register.png"></image>
</navigator>
<!-- 其他登录部分 -->
<view class="otherways_part">
<!-- <view class="otherways_part">
<image class="otherways_tips" src="../../../static/login/account_login/other_ways.png"></image>
<view class="two_ways">
<image class="qq_icon" src="../../../static/login/account_login/qq_icon.png"></image>
<image class="weixin_icon" src="../../../static/login/account_login/weixin_icon.png"></image>
</view>
</view>
</view>-->
</view>
</template>
<script setup>
import { ref, computed } from 'vue';
import { ref, computed , onMounted } from 'vue';
import app from "@/App.vue";
const isSendCaptcha = ref(false); //
@ -77,6 +90,19 @@ const captchaButtonBackgroundColor = computed(() => isSendCaptcha.value ? "#ABCB
const captchaButtonColor = computed(() => isSendCaptcha.value ? "#ffffff" : "#000364");//
const captchaButtonText = computed(() => isSendCaptcha.value ? (codeTime.value+"s后重新发送"):"发送验证码")
const phone_number=ref("");//
const password=ref("");//
const code=ref("");//
const which_way_to_login = ref("0"); // 使0 使1
const access_token = ref("0"); //token
const isPassagePage = ref(true); //
const passageWordsBottomBorder = computed(() => isPassagePage.value? "0.1rem solid #094ABC":"none"); //
const captchaWordsBottomBorder = computed(() => isPassagePage.value? "none":"0.1rem solid #094ABC"); //
@ -87,15 +113,26 @@ const eyesStateIcon = ref("../../../static/login/account_login/login_part/closed
const isPhoneError = ref(false);
const isPassageError = ref(false);
const isCaptchaError = ref(false);
onMounted(() => {//
which_way_to_login.value= 0;
console.log(which_way_to_login.value);
});
//
function toCaptchaEvent(){
isPassagePage.value = false;
which_way_to_login.value=1;//
}
//
function sendCaptchaEvent(){
console.log("send captcha");
if (codeTime.value>0){ //
//
const isChinaPhone = /^1[3-9]\d{9}$/.test(phone_number.value);
if (!isChinaPhone) {
uni.showToast({
title: '请输入有效的中国大陆手机号',
icon: "none"
});
return; //
}
if (codeTime.value>0){ //
uni.showToast({ //
title: '不能重复获取',
icon:"none"
@ -111,41 +148,189 @@ function sendCaptchaEvent(){
codeTime.value = 0;
}
},1000)
};
}
function login(){
//
const serverAddress = app.globalData.fit_journey_login_address + '/phone_code_register/getPhoneCode';
console.log(String(phoneNumber.value));
//
}
//
const app = getApp();
//
uni.request({
url: serverAddress,
url: app.globalData.fit_journey_login_address + '/phone_code_register/getPhoneCode',
method: 'POST',
header: {
'Content-Type': 'application/x-www-form-urlencoded',
'content-type': 'application/x-www-form-urlencoded',
},
data: {
phone: phoneNumber.value
phone:String(phone_number.value)
},
success: (res) => {
console.log(res.data);
uni.showToast({
title: '发送验证码成功,请注意查收~',
icon: "none"
});
},
fail: (err) => {
console.log("请求失败", err);
error: (res) => {
console.log("请求失败!请求数据是", res);
}
});
//TODO:
console.log("login");
uni.navigateTo({
url: '/pages/information/sex/sex'//
}
function login() {
//
uni.request({
url:app.globalData.fit_journey_login_address+'/common/isPhoneRegistered',
header: {
'content-type': 'application/x-www-form-urlencoded',
},
method:'GET',
data:{
phone:phone_number.value,
},
success:(res)=>{
console.log(res);
if(res.data.code===200){
uni.showToast({
title: '手机号未注册或输入错误~',
icon: "none"
});
return 0;
}
},
})
console.log(which_way_to_login.value);
if (which_way_to_login.value === 0) { //
console.log("这里开始运行了");
//
const serverAddress = app.globalData.fit_journey_login_address + '/AccountLogin/PhonePasswordLogin';
console.log("后端服务器的地址是" + serverAddress);
console.log("发送的账号是" + String(phone_number.value));
console.log("发送的密码是" + String(password.value));
if(phone_number.value==null||code.value==null){
uni.showToast({
title: '手机号和密码不能为空',
icon: "none"
});
}
//
uni.request({
url: serverAddress,
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
},
data: {
phone: String(phone_number.value),
password: String(password.value)
},
success: (res) => {
if (res.statusCode === 500) {
uni.showToast({
title: '账号或密码错误',
icon: "none"
});
} else {
uni.showToast({
title: '登录成功',
icon: "none"
});
access_token.value = res.data.data.token;
console.log("登录成功!从后端收集的token是", access_token.value);
// token
uni.setStorage({
key: 'access_token', //
data: access_token.value, //
success: () => {
console.log("Token 已存储到本地!");
},
fail: () => {
console.error("Token 存储失败!");
}
});
console.log(access_token.value);
console.log("登录成功!从后端收集的token是", uni.getStorageSync('access_token'));
uni.navigateTo({
url: '/pages/information/sex/sex'//
})
}
},
error: (res) => {
console.log("请求失败!请求数据是", res);
uni.showToast({
title: '登录失败,服务器错误',
icon: "none"
});
}
});
} else { //
console.log("验证码登录部分开始运行了");
//
const serverAddress = app.globalData.fit_journey_login_address + '/PhoneLogin/phoneLogin';
console.log("后端服务器的地址是" + serverAddress);
console.log("发送的账号是" + String(phone_number.value));
console.log("发送的code是" + String(code.value));
if(phone_number.value==null||code.value==null){
uni.showToast({
title: '手机号和验证码不能为空',
icon: "none"
});
}
//
uni.request({
url: serverAddress,
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
},
data: {
phone: String(phone_number.value),
code: String(code.value)
},
success: (res) => {
console.log(res);
if (res.statusCode === 500) {
uni.showToast({
title: '账号或密码错误,或账号没有进行注册',
icon: "none"
});
} else {
uni.showToast({
title: '登录成功',
icon: "none"
});
access_token.value = res.data.data.token;
console.log("登录成功!从后端收集的token是", access_token.value);
// token
uni.setStorage({
key: 'access_token', //
data: access_token.value, //
success: () => {
console.log("Token 已存储到本地!");
},
fail: () => {
console.error("Token 存储失败!");
}
});
console.log(access_token.value);
console.log("登录成功!从后端收集的token是", uni.getStorageSync('access_token'));
//
uni.navigateTo({
url: '/pages/information/sex/sex'//
})
}
},
error: (res) => {
console.log("请求失败!请求数据是", res);
uni.showToast({
title: '登录失败,服务器错误',
icon: "none"
})
}
})
}
}
//
function toPassageEvent(){
isPassagePage.value = true;
which_way_to_login.value=0;
}
//
function openEyesEvent()
@ -170,9 +355,7 @@ function forgetPassageClick(){
animationDuration: 200
})
}
</script>
<style lang="scss">
@import "@/static/login/account_login/css/acccount_login.scss";
</style>

@ -11,7 +11,7 @@
<!-- 密码输入 -->
<view class="passage_box change_password_form_item">
<view class="form_input_box passage_input_box">
<input type="text" class="passage" :password="isOpened_1" placeholder="请输入你的密码"/>
<input type="text" v-model="first_input_password" class="passage" :password="isOpened_1" placeholder="请输入你的密码"/>
<image @click="openEyesEvent_1" class="eyes" :src="eyesStateIcon_1"></image>
</view>
<!-- <view class="error_tip" v-if="isPassageError">*</view> -->
@ -19,7 +19,7 @@
<!-- 确认密码输入 -->
<view class="passage_box change_password_form_item">
<view class="form_input_box passage_input_box">
<input type="text" class="passage" :password="isOpened_2" placeholder="请再次确认密码"/>
<input type="text" v-model="second_input_password" class="passage" :password="isOpened_2" placeholder="请再次确认密码"/>
<image @click="openEyesEvent_2" class="eyes" :src="eyesStateIcon_2"></image>
</view>
<view class="error_tip" v-if="isPassageSameError">*</view>
@ -42,10 +42,17 @@
</template>
<script setup>
import { ref, computed } from 'vue';
import { ref, onMounted } from 'vue';
const isPassageSameError = ref(false);
const first_input_password = ref(''); //
const second_input_password= ref(''); //
const phone_number = ref(''); //
const code= ref(''); //
const title = '成功'; //
const content = '密码修改成功'; //
const isOpenPopUp = ref(false);//
@ -54,7 +61,14 @@ const isOpened_1 = ref(true); //输入框是否密码显示的标志
const eyesStateIcon_1 = ref("../../../static/login/change_password/pictures/closedeyes.png");
const isOpened_2 = ref(true); //
const eyesStateIcon_2 = ref("../../../static/login/change_password/pictures/closedeyes.png");
// 使 onLoad
onMounted(() => {
const options = getCurrentPages()[getCurrentPages().length - 1].options;
phone_number.value = options.phone_number || '';
code.value = options.code || '';
console.log('接收到的手机号是:', phone_number.value);
console.log('接收到的验证码是:', code.value);
});
//
function openEyesEvent_1(){
if (isOpened_1.value)
@ -84,8 +98,68 @@ function openEyesEvent_2(){
//
function ensureClickEvent(){
console.log('密码确认修改');
isOpenPopUp.value = true; //
console.log(phone_number.value);
console.log(first_input_password.value);
console.log(second_input_password.value);
console.log(code.value);
if(first_input_password.value !== second_input_password.value){
uni.showToast({
title: '两次密码不相同',
icon: "none"
});
isPassageSameError.value = true;
}
if(first_input_password.value.length<6||first_input_password.value.length>10){
uni.showToast({
title: '密码必须在6-10位之间',
icon: "none"
});
}
//
//
const app = getApp();
//
uni.request({
url: app.globalData.fit_journey_login_address + '/ForgetPassword/FindPassword',
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
},
data: {
phone:String(phone_number.value),
code:String (code.value),
newPassword:String(first_input_password.value)
},
success: (res) => {
if(res.data.code===200){
uni.showToast({
title: '修改密码成功!',
icon: "none"
});
}else if(res.data.code===400){
uni.showToast({
title: '修改密码失败!',
icon: "none"
});
}
uni.navigateTo({
url: '/pages/login/account_login/account_login',
animationType: 'pop-in',
animationDuration: 200
});
},
error: (res) => {
console.log("请求失败!请求数据是", res);
uni.showToast({
title: '发送验证码成功,请注意查收~',
icon: "none"
});
}
});
/*console.log('');
isOpenPopUp.value = true; //*/
}
function onOpenUpClick(){
//TODO:
@ -103,101 +177,5 @@ function onClosePopUPClick(){
</script>
<style lang="scss">
.change_password_box{
background-image: url("../../../static/login/change_password/pictures/background.png");
background-size: cover;
background-position: center;
height: 100vh;
width: auto;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
object-fit: contain;
//
.return_image{
position: absolute;
left: 16.5%;
right: 80.1%;
top: 8.62%;
bottom: 89.09%;
width: 0.8rem;
height: auto;
object-fit: contain;
}
//
.change_passage_words{
position: absolute;
left: 12.4%;
top: 30.8%;
font-family: 'PingFang SC';
font-size: 1.4rem;
color: #000364;
}
//
.change_password_form{
position: absolute;
width: 74.5%;
height: 33.6%;
top: 40%;
//
.change_password_form_item{
height: auto;
margin-bottom: 5%;
.form_input_box{
padding-left: 3%;
padding-right: 3%;
background-color: #D5E9FF;
border-radius: 12px;
}
.error_tip{
margin-top: 0.6vh;
padding-left: 3%;
font-size: 0.8rem;
color: #FF1E1E;
}
}
//
.passage_box{
display: flex;
flex-direction: column;
.passage_input_box{
display: flex;
align-items: center;
background-color: #D5E9FF;
border-radius: 12px;
position: relative;
.passage{
height: 5.5vh;
padding-left: 11%;
background-image: url("../../../static/login/change_password/pictures/lock_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 4.7% 50%;
font-size: 0.8rem;
}
.eyes{
width: 1rem;
height: 1rem;
position: absolute;
right: 13%;
}
}
}
//
.ensure_button{
display: flex;
align-items: center;
justify-content: center;
margin-top: 8%;
height: 5.5vh;
border-radius: 12px;
background-color: #4A69F7;
color: #FFFCFC;
text-align: center;
font-size: 1.2rem;
}
}
}
@import "@/static/login/change_password/css/change_password.scss";
</style>

@ -11,14 +11,14 @@
<!-- 手机号输入 -->
<view class="phone_number_box forget_passage_form_item">
<view class="form_input_box">
<input type="text" class="phone_number" placeholder="请输入你的电话号码"/>
<input type="text" v-model="phone_number" class="phone_number" placeholder="请输入你的电话号码"/>
</view>
<view class="error_tip" v-if="isPhoneError">*</view>
</view>
<!-- 验证码输入 -->
<view class="captcha_box forget_passage_form_item">
<view class="form_input_box captcha_input_box">
<input type="text" class="captcha" placeholder="请输入你的验证码"/>
<input type="text" v-model="code" class="captcha" placeholder="请输入你的验证码"/>
<button class="captcha_button" @click="sendCaptchaEvent"
:style="{color:captchaButtonColor, backgroundColor:captchaButtonBackgroundColor}">
{{captchaButtonText}}
@ -36,45 +36,90 @@
<script setup>
import { ref, computed } from 'vue';
const code = ref("");
const isPhoneError = ref(false);
const isCaptchaError = ref(false);
const phone_number =ref("");
const isSendCaptcha = ref(false); //
var codeTime = ref(0); //
const captchaButtonBackgroundColor = computed(() => isSendCaptcha.value ? "#ABCBFF" : "#ffffff"); //
const captchaButtonColor = computed(() => isSendCaptcha.value ? "#ffffff" : "#000364");//
const captchaButtonText = computed(() => isSendCaptcha.value ? (codeTime.value+"s后重新发送"):"发送验证码");
//
function sendCaptchaEvent(){
console.log("send captcha");
if (codeTime.value>0){ //
uni.showToast({ //
title: '不能重复获取',
icon:"none"
});
} else{ //
codeTime.value = 60;
isSendCaptcha.value = true;
var timer = setInterval(()=>{
codeTime.value--;
if(codeTime.value<1){
clearInterval(timer);
isSendCaptcha.value = false;
codeTime.value = 0;
}
},1000)
};
}
//
const isChinaPhone = /^1[3-9]\d{9}$/.test(phone_number.value);
if (!isChinaPhone) {
uni.showToast({
title: '请输入有效的中国大陆手机号',
icon: "none"
});
return; //
}
if (codeTime.value>0){ //
uni.showToast({ //
title: '不能重复获取',
icon:"none"
});
} else{ //
codeTime.value = 60;
isSendCaptcha.value = true;
var timer = setInterval(()=>{
codeTime.value--;
if(codeTime.value<1){
clearInterval(timer);
isSendCaptcha.value = false;
codeTime.value = 0;
}
},1000)
}
//
const app = getApp();
//
uni.request({
url: app.globalData.fit_journey_login_address + '/phone_code_register/getPhoneCode',
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
},
data: {
phone:String(phone_number.value)
},
success: (res) => {
uni.showToast({
title: '发送验证码成功,请注意查收~',
icon: "none"
});
},
error: (res) => {
console.log("请求失败!请求数据是", res);
}
});
}
//
function nextClickEvent(){
uni.navigateTo({
url:'/pages/login/change_password/change_password',
animationType: 'pop-in',
animationDuration: 200
})
function nextClickEvent() {
const isChinaPhone = /^1[3-9]\d{9}$/.test(phone_number.value);
if (!isChinaPhone) {
uni.showToast({
title: '请输入有效的中国大陆手机号',
icon: "none"
});
return; //
}
// 使 encodeURIComponent
const encodedPhoneNumber = encodeURIComponent(phone_number.value);
const encodedCode = encodeURIComponent(code.value);
console.log("携带参数跳转",phone_number.value,code.value);
uni.navigateTo({
url: `/pages/login/change_password/change_password?phone_number=${encodedPhoneNumber}&code=${encodedCode}`,
animationType: 'pop-in',
animationDuration: 200
});
}
</script>

@ -13,20 +13,20 @@
<!-- 手机号输入 -->
<view class="phone_number_box register_form_item">
<view class="form_input_box">
<input v-model="phonenum" type="text" class="phone_number" placeholder="请输入你的电话号码"/>
<input v-model="phone_number" type="text" class="phone_number" placeholder="请输入你的电话号码"/>
</view>
<view class="error_tip" v-if="isPhoneError">*</view>
</view>
<!-- 验证码输入 -->
<view class="captcha_box register_form_item">
<view class="form_input_box captcha_input_box">
<input v-model="captchanum" class="captcha" name="captcha" type="text" placeholder="请输入你的验证码"/>
<input v-model="code" class="captcha" name="captcha" type="text" placeholder="请输入你的验证码"/>
<button class="captcha_button" @click="sendCaptchaEvent"
:style="{color:captchaButtonColor, backgroundColor:captchaButtonBackgroundColor}">
{{captchaButtonText}}
</button>
</view>
<view class="error_tip" v-if="isCaptchaError">*</view>
<view class="error_tip" v-if="isCaptchaError"></view>
</view>
<!-- 密码输入 -->
<view class="passage_box register_form_item">
@ -71,11 +71,10 @@ import { ref, computed } from 'vue';
const app = getApp();
/*手机号框相关变量*/
const phonenum = ref(); //
const phone_number = ref(""); //
const isPhoneError = ref(false);//
const code=ref("");
/*验证码框相关变量*/
const captchanum = ref(); //
const isCaptchaError = ref(false); //
const isSendCaptcha = ref(false); //
var codeTime = ref(0); //
@ -100,6 +99,13 @@ const title = computed(()=>isRegisterSuccess.value? '成功':'错误'); //弹窗
const content = computed(()=>isRegisterSuccess.value? '注册成功':'注册失败'); //
const isOpenPopUp = ref(false);//
const is_phone_registered = ref();//0 1
/*正则表达式相关变量*/
const pMatch = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/
@ -110,13 +116,13 @@ const pMatch = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])
function checkPhone(){
var flag=true
//
if (phonenum.value==undefined){
if (phone_number.value===undefined){
flag = false
uni.showToast({ //
title: '手机号不能为空',
icon:"error",
});
}else if (!pMatch.test(phonenum.value)){
}else if (!pMatch.test(phone_number.value)){
flag = false
// isPhoneError.value = true
uni.showToast({ //
@ -129,55 +135,63 @@ function checkPhone(){
return flag
}
function sendCaptchaEvent(){
//TODO:
console.log("点击发送验证码按钮");
//
if (checkPhone()){
//
if (codeTime.value>0){ //
uni.showToast({ //
title: '不能重复获取',
icon:"none"
});
} else{ //
codeTime.value = 60;
isSendCaptcha.value = true;
var timer = setInterval(()=>{
codeTime.value--;
if(codeTime.value<1){
clearInterval(timer);
isSendCaptcha.value = false;
codeTime.value = 0;
}
},1000)
};
//
uni.request({
// url:app.globalData.fit_journey_login_address+'/phone_code_register/getPhoneCode',
url:'http://47.122.61.54:8084/phone_code_register/getPhoneCode',
method:'POST',
header:{
'Content-Type':'application/x-www-form-urlencoded',
},
data:{
phone:phonenum.value
},
success:(res)=>{
console.log('发送验证码请求成功:'+res.data)
},
fail:(err)=>{
console.log('发送验证码请求失败')
console.log(err)
}
})
}
//
const isChinaPhone = /^1[3-9]\d{9}$/.test(phone_number.value);
if (!isChinaPhone) {
uni.showToast({
title: '请输入有效的中国大陆手机号',
icon: "none"
});
return; //
}
if (codeTime.value>0){ //
uni.showToast({ //
title: '不能重复获取',
icon:"none"
});
} else{ //
codeTime.value = 60;
isSendCaptcha.value = true;
var timer = setInterval(()=>{
codeTime.value--;
if(codeTime.value<1){
clearInterval(timer);
isSendCaptcha.value = false;
codeTime.value = 0;
}
},1000)
}
//
const app = getApp();
//
uni.request({
url: app.globalData.fit_journey_login_address + '/phone_code_register/getPhoneCode',
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
},
data: {
phone:String(phone_number.value)
},
success: (res) => {
uni.showToast({
title: '发送验证码成功,请注意查收~',
icon: "none"
});
},
error: (res) => {
console.log("请求失败!请求数据是", res);
}
});
}
/*-----密码码相关函数-----*/
function openEyesEvent_1(){
//TODO:
if (isOpened_1.value)
{
isOpened_1.value = false;
@ -190,7 +204,7 @@ function openEyesEvent_1(){
}
}
function openEyesEvent_2(){
//TODO:
if (isOpened_2.value)
{
isOpened_2.value = false;
@ -206,17 +220,21 @@ function openEyesEvent_2(){
/*-----注册按钮相关函数-----*/
function checkSubmit(){
//TODO:
var flag = true
if(code.data===undefined){
uni.showToast({
title: '验证码不能为空',
icon: "error",
})
}//
//
if (phonenum.value==undefined){
if (phone_number.value===undefined){
flag = false
uni.showToast({ //
title: '手机号不能为空',
icon:"error",
});
}else if (!pMatch.test(phonenum.value)){
}else if (!pMatch.test(phone_number.value)){
flag = false
// isPhoneError.value = true
uni.showToast({ //
@ -226,22 +244,27 @@ function checkSubmit(){
} else {
isPhoneError.value = false
}
//
if (passagenum.value==undefined){
if (passagenum.value===undefined){
flag = false
uni.showToast({ //
title: '密码不能为空',
icon:"error",
});
}else if (passagesamenum.value==undefined){
}else if (passagesamenum.value===undefined){
//
flag = false
uni.showToast({ //
title: '请再输入密码',
icon:"error",
});
}else if (passagenum.value!=passagesamenum.value){
}else if(passagenum.value.length < 6 || passagenum.value.length > 10) {
flag = false;
uni.showToast({
title: '密码长度必须为6到10位',
icon: "error",
});
} else if (passagenum.value!==passagesamenum.value){
//
flag = false
// isPassageSameError.value = true
@ -252,9 +275,8 @@ function checkSubmit(){
} else{
isPassageSameError.value = false
}
//
if (captchanum.value==undefined){
if (code.value===undefined){
flag = false
// isCaptchaError.value = true
uni.showToast({ //
@ -264,48 +286,99 @@ function checkSubmit(){
} else{
isCaptchaError.value = false
}
return flag
}
function registerEvent(){
//TODO:
//
console.log(code.value);
console.log(phone_number.value);
console.log(passagenum.value);
//
uni.request({
url:app.globalData.fit_journey_login_address+'/common/isPhoneRegistered',
header: {
'content-type': 'application/x-www-form-urlencoded',
},
method:'GET',
data:{
phone:phone_number.value,
},
success:(res)=>{
console.log(res);
if(res.data.code===400) {
is_phone_registered.value=1;
}
},
})
if(is_phone_registered.value===1){//
uni.showToast({
title: '手机号已经被注册了~',
icon: "error",
});
}
if (checkSubmit()){
//
console.log("服务器地址是:"+app.globalData.fit_journey_login_address);
uni.request({
// url:app.globalData.fit_journey_login_address+'/phone_code_register/registerByPhone',
url:'http://47.122.61.54:8084/phone_code_register/registerByPhone',
url:app.globalData.fit_journey_login_address+'/phone_code_register/registerByPhone',
header: {
'content-type': 'application/x-www-form-urlencoded',
},
method:'POST',
data:{
code:captchanum.value,
phone:phonenum.value
code:code.value,
phone:phone_number.value,
password:passagenum.value
},
success:(res)=>{
console.log('注册成功:'+res.data)
isRegisterSuccess.value = true
isOpenPopUp.value = true //
},
fail:(err)=>{
console.log('注册失败'+err)
isRegisterSuccess.value = false
isOpenPopUp.value = true //
}
})
}
if(res.data.code === 200) {
isRegisterSuccess.value = true
isOpenPopUp.value = true
}else if(res.data.code===400) {
uni.showToast({
title: '手机号已经被注册了~',
icon: "error",
});
}else if(res.data.code===401) {
uni.showToast({
title: '验证码错误~',
icon: "error",
});
}else if(res.data.code===500) {
uni.showToast({
title: '验证码过期~',
icon: "error",
});
}
},
fail:(err)=>{
isRegisterSuccess.value = false
isOpenPopUp.value = true //
}
})
}
}
/*-----弹窗相关函数-----*/
function onOpenUpClick(){
//TODO:
uni.navigateTo({
url: '/pages/login/account_login/account_login',
animationType: 'pop-in', //
animationType: 'pop-in',
animationDuration: 200
});
}
function onClosePopUPClick(){
//TODO:
isOpenPopUp.value = false;
}

@ -11,7 +11,7 @@ export default {
methods: {
click() {
uni.navigateTo({
url: '/pages/homepages/home/home' //
url: '/pages/homepages/homes/home/home' //
});
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,169 @@
.add_post_box{
height: 100vh;
width: 100vw;
position: relative;
.addpost_top_box{
display: flex;
align-items: center;
// background-color: #55aaff;
height: 10vh;
width: 100%;
position: absolute;
top: 5%;
.return_box{
display: flex;
justify-content: center;
align-items: center;
background-color: #E6EEFA;
height: 5.5vh;
width: 5.5vh;
border-radius: 50%;
position: absolute;
left: 5vw;
.return_image{
width: 3vh;
}
}
.title_box{
font-family: 'Poppins';
font-style: normal;
font-weight: 550;
font-size: 2.8vh;
width: fit-content;
// line-height: 33px;
/* or 92% */
text-align: center;
letter-spacing: -0.604677px;
color: #000000;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.publish_btn{
position: absolute;
right: 5vw;
display: flex;
justify-content: center;
align-items: center;
background: #5790DF;
box-shadow: 0px 14.8205px 29.641px rgba(87, 144, 223, 0.5);
border-radius: 20px;
padding: 1vh 2vh;
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
font-size: 1.5vh;
text-align: center;
letter-spacing: -0.604677px;
color: #FFFFFF;
}
}
.addpost_tip_box{
position: absolute;
top: 15vh;
left: 50%;
transform: translateX(-50%);
width: 80%;
text-align: center;
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-size: 1.9vh;
letter-spacing: -0.604677px;
color: #CCB8B8;
padding-bottom: 1vh;
border-bottom: 1px solid #000000;
}
.addpost_box{
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 25vh;
width: 90%;
.post_box{
background-color: #B2CBF0;
border-radius: 30px;
padding: 5vh 2vh;
box-sizing: border-box;
margin-bottom: 5vh;
width: 100%;
display: flex;
flex-direction: column;
position: relative;
}
.post_top_box{
display: flex;
.post_avatar_box{
width: 5vh;
height: 5vh;
border-radius: 50%;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
margin-right: 2vh;
.post_avatar{
width: 80%;
}
}
.post_info{
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 2vh;
color: #000000;
display: flex;
flex-direction: column;
justify-content: center;
}
}
.post_word_box{
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 2vh;
color: #000000;
margin-top: 2.5vh;
background-color: #E6EEFA;
border-radius: 8px;
box-sizing: border-box;
padding: 1.5vh 1.5vh;
height: 5.5vh;
width:100%;
letter-spacing: 1px;
}
.post_images_box{
width: 100%;
height:70%;
// .post_images{
// width: 100%;
// height: 100%;
// }
.myimgDV {
width: 100%;
height: 100%;
.flex {
display: flex;
}
.justify {
justify-content: space-between;
}
.receiveimage {
margin-top: 28rpx;
display: flex;
flex-wrap: wrap;
width: 100%;
.doublepic {
// height: 100%;
width: 49%;
margin-right: 12rpx;
margin-bottom: 12rpx;
&:nth-child(2n) {
margin-right: 0;
}
}
}
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -0,0 +1,196 @@
.community_box{
padding: 5vh 5vw;
display: flex;
flex-direction: column;
position: relative;
.top_box{
display: flex;
justify-content: space-between;
align-items: center;
height: 10vh;
// border-bottom: 1.48205px solid #000000;
.dog_image_box{
// height: 8vh;
// width: 8vh;
height: 110rpx;
width: 110rpx;
border-radius: 50%;
background-color: #D9D9D9;
display: flex;
justify-content: center;
align-items: center;
.dog_image{
width: 85rpx;
}
}
.words_box{
height: 100%;
width: 60%;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
.title_box{
width: fit-content;
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-size: 3vh;
line-height: 33px;
text-align: center;
letter-spacing: -0.604677px;
color: #000000;
}
.tip_word_box{
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-size: 2vh;
line-height: 33px;
text-align: center;
letter-spacing: -0.604677px;
color: #CCB8B8;
}
}
.add_image_box{
// height: 8vh;
// width: 8vh;
height: 110rpx;
width: 110rpx;
border-radius: 50%;
background-color: #D9D9D9;
display: flex;
justify-content: center;
align-items: center;
.add_image{
width: 50rpx;
}
}
}
// 线
.line_box{
width: 70%;
border-bottom: 1.48205px solid #000000;
position: absolute;
top: 17vh;
left: 50%;
transform: translateX(-50%);
}
.post_body{
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 20vh;
width: 90%;
.post_scroll_box{
height: 69vh;
}
.post_box{
background-color: #E6EEFA;
border-radius: 30px;
padding: 2vh 2vh;
box-sizing: border-box;
margin-bottom: 5vh;
width: 100%;
// height: 55vh;
display: flex;
flex-direction: column;
// height:900rpx;
position: relative;
.post_top_box{
display: flex;
.post_avatar_box{
width: 5vh;
height: 5vh;
border-radius: 50%;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
margin-right: 2vh;
.post_avatar{
width: 80%;
}
}
.post_info{
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 2vh;
color: #000000;
display: flex;
flex-direction: column;
justify-content: center;
}
}
.post_word_box{
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 2vh;
color: #000000;
margin-top: 2.5vh;
}
.post_images_box{
width: 100%;
height:70%;
.post_images{
width: 100%;
height: 100%;
}
}
.post_bottom_box{
position: absolute;
bottom: 0%;
width: 100%;
height: 10%;
padding: 0% 6%;
box-sizing: border-box;
display: flex;
background: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(2px);
/* Note: backdrop-filter has minimal browser support */
border-radius: 0px 0px 30px 30px;
left: 50%;
transform: translateX(-50%);
.comments_box{
display: flex;
align-items: center;
height: 100%;
// width: 10%;
.chat_icon{
width: 3.2vh;
}
.comments_num{
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-size: 2vh;
text-align: center;
letter-spacing: -0.604677px;
color: rgba(255, 255, 255, 0.8);
}
}
.like_box{
display: flex;
align-items: center;
height: 100%;
margin-left: 4%;
// width: 10%;
.love_icon{
width: 3.2vh;
}
.like_num{
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-size: 2vh;
text-align: center;
letter-spacing: -0.604677px;
color: rgba(255, 255, 255, 0.8);
}
}
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 KiB

@ -0,0 +1,308 @@
.person_center_box{
height: 100vh;
width: 100vw;
position: relative;
.person_center_top{
height: 25vh;
background-image: url("@/static/homepages/community/personal_center/pictures/top_background.png");
background-size: cover;
background-position: center;
.return_box{
display: flex;
justify-content: center;
align-items: center;
background-color: #E6EEFA;
height: 5.5vh;
width: 5.5vh;
border-radius: 50%;
position: absolute;
left: 5vw;
top: 2vh;
.return_image{
width: 3vh;
}
}
}
.person_center_body{
box-sizing: border-box;
position: absolute;
width: 100vw;
height: 82vh;
top: 18vh;
background: #E6EEFA;
border-radius: 50px 50px 0px 0px;
.info_box{
width: 100vw;
height: 20vh;
position: relative;
// background-color: #fff;
.height_box{
width: fit-content;
position: absolute;
top: 20%;
left: 19vw;
.height_data{
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 2vh;
text-align: center;
letter-spacing: -0.604677px;
color: #000000;
margin-bottom: 0.5vh;
}
.height_words{
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-size: 1.8vh;
text-align: center;
letter-spacing: -0.604677px;
color: #000000;
}
}
.weight_box{
width: fit-content;
position: absolute;
top: 20%;
right: 19vw;
.weight_data{
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 2vh;
text-align: center;
letter-spacing: -0.604677px;
color: #000000;
margin-bottom: 0.5vh;
}
.weight_words{
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-size: 1.8vh;
text-align: center;
letter-spacing: -0.604677px;
color: #000000;
}
}
.avatar_box{
background-color: #fff;
width: 12vh;
height: 12vh;
border-radius: 50%;
position: absolute;
left: 50%;
top: 0%;
transform: translate(-50%, -50%);
}
.name_box{
position: absolute;
left: 50%;
top: 52%;
transform: translateX(-50%);
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 2.1vh;
text-align: center;
letter-spacing: -0.604677px;
color: #000000;
}
.tip_box{
position: absolute;
left: 50%;
top: 70%;
width: 100vw;
transform: translateX(-50%);
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-size: 1.8vh;
text-align: center;
letter-spacing: -0.604677px;
color: #6C7A9C;
}
}
.btns_box{
display: flex;
height: 5vh;
.changeInfoBtn{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 35vw;
font-size: 1.6vh;
background: #fff;
box-shadow: 0px 14.8205px 29.641px rgba(0, 0, 0, 0.25);
border-radius: 29.641px;
}
.addPostBtn{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 35vw;
font-size: 1.6vh;
background: #fff;
box-shadow: 0px 14.8205px 29.641px rgba(0, 0, 0, 0.25);
border-radius: 29.641px;
}
}
.posts_box{
margin-top: 4vh;
height: 52vh;
width: 100vw;
position: relative;
.post_nav_box{
width: 100%;
display: flex;
justify-content: center;
.post_nav{
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
width: 20vw;
height: 3vh;
margin: 0vh 2vw;
position: relative;
.toMypost{
position: absolute;
top: 0%;
}
.toLikepost{
position: absolute;
top: 0%;
}
.bottom_line{
margin-top: 6px;
height: 1px;
width: 5vw;
border-bottom:2px solid #000000 ;
background: #6C7A9C;
border-radius: 2.9641px;
}
}
}
.posts{
background-color: #fff;
border-radius: 50px 50px 0px 0px;
box-sizing: border-box;
margin-top: 2vh;
display: flex;
flex-direction: column;
height: 49vh;
padding: 0vw 3vw 0vw 3vw;
position: relative;
.post_box{
background-color: #E6EEFA;
border-radius: 30px;
padding: 2vh 2vh;
box-sizing: border-box;
margin-bottom: 5vh;
width: 100%;
display: flex;
flex-direction: column;
position: relative;
margin-top: 3vh;
.post_top_box{
display: flex;
.post_avatar_box{
width: 5vh;
height: 5vh;
border-radius: 50%;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
margin-right: 2vh;
.post_avatar{
width: 80%;
}
}
.post_info{
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 2vh;
color: #000000;
display: flex;
flex-direction: column;
justify-content: center;
}
}
.post_word_box{
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 2vh;
color: #000000;
margin-top: 2.5vh;
}
.post_images_box{
width: 100%;
height:70%;
.post_images{
width: 100%;
height: 100%;
}
}
.post_bottom_box{
position: absolute;
bottom: 0%;
width: 100%;
height: 10%;
padding: 0% 6%;
box-sizing: border-box;
display: flex;
background: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(2px);
/* Note: backdrop-filter has minimal browser support */
border-radius: 0px 0px 30px 30px;
left: 50%;
transform: translateX(-50%);
.comments_box{
display: flex;
align-items: center;
height: 100%;
// width: 10%;
.chat_icon{
width: 3.2vh;
}
.comments_num{
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-size: 2vh;
text-align: center;
letter-spacing: -0.604677px;
color: rgba(255, 255, 255, 0.8);
}
}
.like_box{
display: flex;
align-items: center;
height: 100%;
margin-left: 4%;
// width: 10%;
.love_icon{
width: 3.2vh;
}
.like_num{
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-size: 2vh;
text-align: center;
letter-spacing: -0.604677px;
color: rgba(255, 255, 255, 0.8);
}
}
}
}
}
}
}
}

@ -1,6 +1,6 @@
.background {
background-image: url("@/static/homepages/homes/ai_recognize_recipe/pictures/background.png");
background-image: url("@/static/homepages/homes/ai_recognize_hot/pictures/background.png");
background-size: cover;
background-position: center;
height: 100vh;
@ -27,7 +27,7 @@
transform: translateX(-50%); /* 通过 translateX 使其居中 */
}
.calorie_container {
background-image: url("@/static/homepages/homes/ai_recognize_recipe/pictures/calorie.png");
background-image: url("@/static/homepages/homes/ai_recognize_hot/pictures/calorie.png");
background-size: cover;
background-position: center;
display: flex; /* 使用 flex 布局 */
@ -47,7 +47,7 @@
margin-top: 100%; /* 向下移动 100% */
}
.name_container{
background-image: url("@/static/homepages/homes/ai_recognize_recipe/pictures/name.png");
background-image: url("@/static/homepages/homes/ai_recognize_hot/pictures/name.png");
background-size: cover;
background-position: center;
display: flex; /* 使用 flex 布局 */

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

@ -22,6 +22,43 @@
width: 98%;
left: 1%;
}
.swiper_item_background{
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
}
.puppy_chat_button{
position: absolute;
height: 20%;
width: 38%;
left: 6%;
top: 63%;
z-index: 1000;
}
.exercise_button{
position: absolute;
height: 18%;
width: 38%;
left: 6%;
top: 69%;
z-index: 1000;
}
.swiper_item {
justify-content: center;
align-items: center;

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

@ -0,0 +1,133 @@
export const foodCaloriesDB = {
// 主食类
'米饭': 116,
'馒头': 223,
'面条': 110,
'包子': 200,
'饺子': 220,
'油条': 389,
'面包': 265,
'粥': 50,
'炒面': 260,
'炒饭': 290,
// 肉类
'猪肉': 143,
'牛肉': 106,
'鸡肉': 167,
'鸭肉': 240,
'羊肉': 203,
'鱼肉': 100,
'虾': 85,
'蛋': 155,
// 蔬菜类
'西红柿': 20,
'黄瓜': 16,
'胡萝卜': 36,
'白菜': 20,
'菠菜': 23,
'生菜': 15,
'茄子': 24,
'土豆': 81,
'青椒': 20,
// 水果类
'苹果': 52,
'香蕉': 89,
'橙子': 47,
'葡萄': 69,
'西瓜': 32,
'梨': 51,
'草莓': 32,
'柚子': 39,
// 饮品类
'牛奶': 79,
'豆浆': 31,
'可乐': 42,
'果汁': 54,
'咖啡': 1,
'奶茶': 150,
// 常见菜品
'西红柿炒鸡蛋': 100,
'宫保鸡丁': 260,
'鱼香肉丝': 195,
'红烧肉': 425,
'糖醋里脊': 290,
'麻婆豆腐': 174,
'青椒炒肉': 180,
'回锅肉': 327,
'蒜蓉炒菜心': 45,
'炒青菜': 30,
'土豆炖牛肉': 215,
'红烧排骨': 289,
'清炒白菜': 35,
'炸鸡': 260,
'水煮鱼': 180,
'酸菜鱼': 168,
// 零食类
'薯片': 536,
'巧克力': 546,
'饼干': 435,
'爆米花': 382,
'坚果': 607,
'冰淇淋': 267,
'蛋糕': 257,
// 快餐类
'汉堡': 295,
'披萨': 266,
'炸薯条': 312,
'炸鸡翅': 246,
'热狗': 290
}
// 模糊搜索函数
export const searchFood = (keyword) => {
keyword = keyword.toLowerCase()
const results = []
for (const [food, calories] of Object.entries(foodCaloriesDB)) {
if (food.toLowerCase().includes(keyword)) {
results.push({
name: food,
calories: calories
})
}
}
return results
}
// 获取单个食物的卡路里
export const getFoodCalories = (foodName) => {
// 直接匹配
if (foodCaloriesDB[foodName]) {
return foodCaloriesDB[foodName]
}
// 模糊匹配
const results = searchFood(foodName)
if (results.length > 0) {
return results[0].calories
}
return null
}
// 获取食物分类列表
export const getFoodCategories = () => {
return {
'主食类': ['米饭', '馒头', '面条', '包子', '饺子', '油条', '面包', '粥'],
'肉类': ['猪肉', '牛肉', '鸡肉', '鸭肉', '羊肉', '鱼肉', '虾', '蛋'],
'蔬菜类': ['西红柿', '黄瓜', '胡萝卜', '白菜', '菠菜', '生菜', '茄子', '土豆', '青椒'],
'水果类': ['苹果', '香蕉', '橙子', '葡萄', '西瓜', '梨', '草莓', '柚子'],
'饮品类': ['牛奶', '豆浆', '可乐', '果汁', '咖啡', '奶茶'],
'常见菜品': ['西红柿炒鸡蛋', '宫保鸡丁', '鱼香肉丝', '红烧肉', '糖醋里脊', '麻婆豆腐'],
'零食类': ['薯片', '巧克力', '饼干', '爆米花', '坚果', '冰淇淋', '蛋糕'],
'快餐类': ['汉堡', '披萨', '炸薯条', '炸鸡翅', '热狗']
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

@ -0,0 +1,111 @@
.background {
position: fixed;
width: 100%;
height: 75%;
top: 4%;
z-index: -3;
}
#chat_scroll{
position: absolute;
width: 100%;
top: 12%;
height: 65vh;
padding: 10px;
}
.chat {
position: absolute;
width: 100%;
// top: 12%;
height: 100%;
// z-index: -1;
// padding: 10px;
// overflow-y: auto;
// -webkit-overflow-scrolling: touch;
display: flex;
flex-direction: column; /* 消息从上往下显示 */
}
.chat_area {
margin-bottom: 10px;
padding: 10px;
max-width: 75%;
word-wrap: break-word;
display: flex;
flex-direction: row; /* 头像和消息水平排列 */
align-items: center; /* 内容垂直居中 */
}
.user_message {
/*background-color: #7879F1; */
color: white;
margin-top: 2%; /* 让用户的消息气泡靠右 */
margin-right: 5%; /* AI消息靠左 */
margin-left: auto; /* 让AI的消息气泡靠右 */
text-align: left;
word-break: break-word; /* 自动换行 */
}
.ai_message {
/*background-color: #e5e5ea;*/
color: black;
margin-left: 2%; /* 用户消息靠右 */
margin-right: auto; /* 让用户的消息气泡靠左 */
text-align: left;
word-break: break-word; /* 自动换行 */
}
.avatar_container {
right: 10%;
height: 100%;
padding-top: 30rpx;
}
.ai_avatar_container {
margin-right: 10px; /* AI头像与气泡的间距 */
}
.user_avatar_container {
margin-left: 10px; /* 用户头像与气泡的间距 */
}
.ai_avatar, .user_avatar {
right: 5%;
width: 40px; /* 头像的大小 */
height: 40px; /* 头像的大小 */
border-radius: 50%; /* 头像圆形 */
}
.message_content {
max-width: 80%; /* 限制消息气泡的最大宽度 */
}
.user_message_content{
background-color: #7879F1;
border-radius: 15px;
}
.ai_message_content{
background-color: #e5e5ea;
border-radius: 15px;
}
.input_box {
position: fixed;
width: 100%;
height: 9%;
top: 79%;
}
.input_box_background {
position: absolute;
width: 98%;
height: 90%;
left: 1%;
top: 5%;
}
.input_words {
position: absolute;
width: 70%;
height: 80%;
left: 5%;
top: 10%;
}
.send_button {
position: absolute;
width: 12%;
height: 70%;
left: 84%;
top: 15%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save