|
|
// App.vue
|
|
|
<template>
|
|
|
<view class="app-container">
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import puppy_chat from "@/components/swiper/puppy_chat.vue";
|
|
|
import exercise from "@/components/swiper/exercise.vue";
|
|
|
import community from "@/components/swiper/community.vue";
|
|
|
import read_center from "@/components/swiper/read_center.vue";
|
|
|
import read from './components/tarbar/tarbar.vue';
|
|
|
import my_exercise_plan from "@/components/my_exercise_plan/my_exercise_plan.vue";
|
|
|
import my_recipe_plan from "@/components/my_recipe_plan/my_recipe_plan.vue";
|
|
|
import tarbar from './components/tarbar/tarbar.vue';
|
|
|
import tarbar_home from "@/components/tarbar_home/tarbar_home.vue";
|
|
|
import tarbar_user from "@/components/tarbar_user/tarbar_user.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 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 {
|
|
|
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_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:已完成
|
|
|
|
|
|
// TODO: 后期需要把 token 更换成从 localStorage 中获取
|
|
|
token: 'eyJhbGciOiJIUzI1NiJ9.eyJzdW' +
|
|
|
'IiOiIxODU5MDU4ODM2NDQ3NDk4MjQyIiwiaXNz' +
|
|
|
'IjoiZml0am91cm5leSIsInVzZXJuYW1lOiI6InV' +
|
|
|
'zZXIiLCJyb2xlczoiOiJVU0VSX1JPTEUiLCJpZDoiOj' +
|
|
|
'E4NTkwNTg4MzY0NDc0OTgyNDIsImlhdCI6MTczMjA4NjA4Ny' +
|
|
|
'wiZXhwIjozMTcwOTIwODYwODd9.rxLV3cUtwUKwsdpNq2yf2O' +
|
|
|
'5Fte2hX4OqvcwN9mo6y9w'
|
|
|
},
|
|
|
|
|
|
components: {
|
|
|
tarbar,
|
|
|
my_pop_up // JS 变量名中不能有‘-’
|
|
|
},
|
|
|
|
|
|
onLaunch: function() {
|
|
|
console.log('App Launch');
|
|
|
// 你可以在这里执行初始化逻辑,比如检查用户状态
|
|
|
},
|
|
|
onShow: function() {
|
|
|
console.log('App Show');
|
|
|
// 更新应用状态,比如获取最新数据
|
|
|
},
|
|
|
onHide: function() {
|
|
|
console.log('App Hide');
|
|
|
// 清理工作,比如保存数据
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style>
|
|
|
/* 你的样式 */
|
|
|
.app-container {
|
|
|
position: relative; /* 确保容器能够正确定位子元素 */
|
|
|
height: 100vh; /* 确保应用占满整个视口 */
|
|
|
}
|
|
|
|
|
|
/* 其他全局样式 */
|
|
|
</style>
|