封装首页AI组件

master
Gary 4 months ago
parent 105503f15c
commit b76dd2ed34

@ -5,12 +5,19 @@
</template> </template>
<script> <script>
import tarbar from './components/tarbar/tarbar.vue'; import tarbar from './components/tarbar/tarbar.vue';
import tarbar_home from "@/components/tarbar_home/tarbar_home.vue"; import tarbar_home from "@/components/tarbar_home/tarbar_home.vue";
import tarbar_user from "@/components/tarbar_user/tarbar_user.vue"; import tarbar_user from "@/components/tarbar_user/tarbar_user.vue";
import tarbar_community from "@/components/tarbar_community/tarbar_community.vue"; import tarbar_community from "@/components/tarbar_community/tarbar_community.vue";
import tarbar_puppy_chat from "@/components/tarbar_puppy_chat/tarbar_puppy_chat.vue"; import tarbar_puppy_chat from "@/components/tarbar_puppy_chat/tarbar_puppy_chat.vue";
import my_pop_up from './components/my_pop_up/my_pop_up.vue'; import my_pop_up from './components/my_pop_up/my_pop_up.vue';
import ai_recongize_fruit from './components/ai_recongize_fruit/ai_recongize_fruit.vue';
import ai_recongize_plan from './components/ai_recongize_plan/ai_recongize_plan.vue';
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 { export default {
globalData: { globalData: {

@ -0,0 +1,58 @@
<template>
<view :class="['container', extend_class]">
<!--背景图 -->
<image src="/static/components/ai_recongize_fruit/pictures/background.png" class="background_image"></image>
<!--按钮和文字 -->
<image class="button" src="/static/components/ai_recongize_fruit/pictures/text_and_button.png" @click="go_to_page"></image>
</view>
</template>
<script>
export default {
name: "ai_recongize_fruit",
data() {
return {};
},
props: {
extend_class: { // class
type: String,
default: ''
}
},
methods:{
go_to_page() {
uni.navigateTo({
url: '/pages/homepages/homes/ai_recongize_fruit/ai_recongize_fruit'
})
}
}
}
</script>
<style lang="scss">
.container{
position: absolute;
width: 100%;
height: 28%;
}
.background_image{
position: absolute;
width: 100%;
height: 100%;
}
.button{
position: absolute;
width: 40%;
height: 20%;
left: 50%;
top: 62%;
}
</style>

@ -0,0 +1,58 @@
<template>
<view :class="['container', extend_class]">
<!--背景图 -->
<image src="/static/components/ai_recongize_hot/pictures/background.png" class="background_image"></image>
<!--按钮和文字 -->
<image class="button" src="/static/components/ai_recongize_hot/pictures/text_and_button.png" @click="go_to_page"></image>
</view>
</template>
<script>
export default {
name: "ai_recongize_fruit",
data() {
return {};
},
props: {
extend_class: { // class
type: String,
default: ''
}
},
methods:{
go_to_page() {
uni.navigateTo({
url: '/pages/homepages/homes/ai_recongize_hot/ai_recongize_hot'
})
}
}
}
</script>
<style lang="scss">
.container{
position: absolute;
width: 100%;
height: 28%;
}
.background_image{
position: absolute;
width: 100%;
height: 100%;
}
.button{
position: absolute;
width: 40%;
height: 20%;
left: 50%;
top: 62%;
}
</style>

@ -0,0 +1,55 @@
<template>
<view :class="['container', extend_class]">
<!--背景图 -->
<image src="/static/components/ai_recongize_plan/pictures/background.png" class="background_image"></image>
<!--按钮和文字 -->
<image class="button" src="/static/components/ai_recongize_plan/pictures/text_and_button.png" @click="go_to_page"></image>
</view>
</template>
<script>
export default {
name: "ai_recongize_plan",
data() {
return {};
},
props: {
extend_class: { // class
type: String,
default: ''
}
},
methods:{
go_to_page() {
uni.navigateTo({
url: '/pages/homepages/homes/ai_recongize_plan/ai_recongize_plan'
})
}
}
}
</script>
<style lang="scss">
.container{
position: absolute;
width: 100%;
height: 28%;
}
.background_image{
position: absolute;
width: 100%;
height: 100%;
}
.button{
position: absolute;
width: 40%;
height: 20%;
left: 50%;
top: 62%;
}
</style>

@ -0,0 +1,58 @@
<template>
<view :class="['container', extend_class]">
<!--背景图 -->
<image src="/static/components/ai_recongize_recipe/pictures/background.png" class="background_image"></image>
<!--按钮和文字 -->
<image class="button" src="/static/components/ai_recongize_recipe/pictures/text_and_button.png" @click="go_to_page"></image>
</view>
</template>
<script>
export default {
name: "ai_recongize_recipe",
data() {
return {};
},
props: {
extend_class: { // class
type: String,
default: ''
}
},
methods:{
go_to_page() {
uni.navigateTo({
url: '/pages/homepages/homes/ai_recongize_recipe/ai_recongize_recipe'
})
}
}
}
</script>
<style lang="scss">
.container{
position: absolute;
width: 100%;
height: 28%;
}
.background_image{
position: absolute;
width: 100%;
height: 100%;
}
.button{
position: absolute;
width: 40%;
height: 20%;
left: 50%;
top: 62%;
}
</style>

@ -170,25 +170,25 @@
} }
},*/ },*/
/*--------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------*/
/* { {
"path": "pages/homepages/homes/home/home", "path": "pages/homepages/homes/home/home",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},*/ }
{ /*{
"path": "pages/homepages/homes/ai_recognize_fruit/ai_recognize_fruit", "path": "pages/homepages/homes/ai_recognize_fruit/ai_recognize_fruit",
"style": { "style": {
"navigationBarTitleText": "", "navigationStyle": "custom"
"enablePullDownRefresh": false
} }
}, }*/
{ /* {
"path": "pages/homepages/homes/ai_recognize_recipe/ai_recognize_recipe", "path": "pages/homepages/homes/ai_recognize_hot/ai_recognize_hot
",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} }*/
/*---------------------------------------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------------------------------------*/
/* { /* {
"path": "pages/homepages/puppy_chat/puppy_chat", "path": "pages/homepages/puppy_chat/puppy_chat",
@ -242,22 +242,37 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}*/ }*/
/*----------------------------------------------------------------------------------------------------------------*/,
{ /*----------------------------------------------------------------------------------------------------------------*/
"path": "components/ai_recognize_recipe_bar/ai_recognize_recipe_bar", /* {
"style": { "path": "components/ai_recongize_fruit/ai_recongize_fruit",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "components/ai_recognize_fruit_bar/ai_recognize_fruit_bar",
"style": { "style": {
"navigationBarTitleText": "", "navigationStyle": "custom"
"enablePullDownRefresh": false
}
} }
}*/
/*----------------------------------------------------------------------------------------------------------------------*/
], ],
"uniIdRouter": {}, "uniIdRouter": {},
"tabBar": null "tabBar": null

@ -1,7 +1,7 @@
<template> <template>
<view class="background"> <view class="background">
<!-- 点击上传图片按钮 --> <!-- 点击上传图片按钮 -->
<image class="upload_picture" @click="selectAndUploadPicture" src="@/static/homepages/homes/ai_recognize_recipe/pictures/photo.png"></image> <image class="upload_picture" @click="selectAndUploadPicture" src="/static/homepages/homes/ai_recognize_hot/pictures/photo.png"></image>
<!-- 所含卡路里显示窗口 --> <!-- 所含卡路里显示窗口 -->
<view class="calorie_container"> <view class="calorie_container">
@ -14,7 +14,7 @@
</view> </view>
<!-- 返回按钮 --> <!-- 返回按钮 -->
<image class="button" @click="goBackToHome" src="@/static/homepages/homes/ai_recognize_recipe/pictures/button.png"></image> <image class="button" @click="goBackToHome" src="/static/homepages/homes/ai_recognize_hot/pictures/button.png"></image>
</view> </view>
</template> </template>
@ -54,7 +54,7 @@ export default {
header: { header: {
'Authorization': app.globalData.token // token 'Authorization': app.globalData.token // token
}, },
url: app.globalData.fit_journey_ai_address+`/ai/recipe`, // url: app.globalData.fit_journey_ai_address+`/ai/hot`, //
filePath: filePath, filePath: filePath,
name: 'file', // name: 'file', //
@ -94,5 +94,5 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
@import "@/static/homepages/homes/ai_recognize_recipe/css/ai_recongnize_recipe.scss"; @import "@/static/homepages/homes/ai_recognize_hot/css/ai_recongnize_hot.scss";
</style> </style>

@ -1,6 +1,12 @@
<template> <template>
<view> <view>
<text>这个是home界面</text> <text>这个是home界面</text>
<!-- <ai_recongize_fruit class="ai_recognize_fruit"></ai_recongize_fruit>-->
<!-- <ai_recongize_plan class="ai_recognize_fruit"></ai_recongize_plan>-->
<!-- <ai_recongize_hot class="ai_recognize_fruit"></ai_recongize_hot>-->
<!-- <ai_recongize_recipe class="ai_recognize_fruit"></ai_recongize_recipe>-->
<tarbar_home ></tarbar_home> <tarbar_home ></tarbar_home>
</view> </view>
</template> </template>
@ -17,5 +23,9 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.ai_recognize_fruit{
width: 90%;
height: 30%;
left: 5%;
}
</style> </style>

@ -0,0 +1,29 @@
#-------------------------------------------------------------------------------#
# Qodana analysis is configured by qodana.yaml file #
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
#-------------------------------------------------------------------------------#
version: "1.0"
#Specify inspection profile for code analysis
profile:
name: qodana.starter
#Enable inspections
#include:
# - name: <SomeEnabledInspectionId>
#Disable inspections
#exclude:
# - name: <SomeDisabledInspectionId>
# paths:
# - <path/where/not/run/inspection>
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
#bootstrap: sh ./prepare-qodana.sh
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
#plugins:
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
linter: jetbrains/qodana-js:latest

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

@ -1,8 +1,8 @@
{ {
"hash": "73fa705f", "hash": "0aaf698d",
"configHash": "9df2b8b3", "configHash": "cc60d382",
"lockfileHash": "e3b0c442", "lockfileHash": "22a0e42d",
"browserHash": "1cea3dfc", "browserHash": "89d9bfb2",
"optimized": {}, "optimized": {},
"chunks": {} "chunks": {}
} }
Loading…
Cancel
Save