语言调试
|
|
@ -1,16 +1,20 @@
|
|||
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version": "0.0",
|
||||
"configurations": [{
|
||||
"default" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"mp-weixin" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
}
|
||||
{
|
||||
// launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version" : "0.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"default" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"mp-weixin" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
},
|
||||
{
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
122
App.vue
|
|
@ -1,31 +1,121 @@
|
|||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
let platform = ""
|
||||
let SystemVersion = ""
|
||||
export default {
|
||||
computed: {
|
||||
...mapState(["bleValue"]),
|
||||
},
|
||||
onLaunch: function() {
|
||||
let that = this
|
||||
that.$store.dispatch("getHomeConfig")
|
||||
console.log('App Launch')
|
||||
// #ifdef APP-PLUS
|
||||
uni.getSystemInfo({
|
||||
success(e) {
|
||||
platform = e.platform
|
||||
that.$store.commit('changePhoneInfo', {
|
||||
platform: e.platform
|
||||
})
|
||||
}
|
||||
})
|
||||
if (platform === 'ios') { // ios首次安装没有网络
|
||||
uni.onNetworkStatusChange(function(res) {
|
||||
if (res.isConnected == true) {
|
||||
that.handleoginversion()
|
||||
}
|
||||
});
|
||||
}
|
||||
plus.runtime.getProperty(plus.runtime.appid, function(info) {
|
||||
uni.setStorageSync('VERSION', info.version)
|
||||
SystemVersion = info.version
|
||||
that.$store.commit('changePhoneInfo', {
|
||||
info: info
|
||||
})
|
||||
})
|
||||
// #endif
|
||||
that.handleoginversion()
|
||||
// that.$store.dispatch("getHomeConfig")
|
||||
},
|
||||
onHide: function() {
|
||||
// #ifdef APP-PLUS
|
||||
uni.offNetworkStatusChange(function(res) {
|
||||
console.log("取消网络监听")
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
onShow: function() {
|
||||
let that = this
|
||||
that.handleTabBarItem()
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
},
|
||||
methods: {
|
||||
// handleHomeConfig() {
|
||||
// let that = this
|
||||
// that.$model.getHomeConfig({}).then(res => {
|
||||
// if (res.code != 0) return
|
||||
// that.$store.commit('changeMenuList', res.data.cook_label)
|
||||
// that.$store.commit('changeFoodList', res.data.food_list)
|
||||
// })
|
||||
// },
|
||||
// 版本信息
|
||||
handleoginversion() {
|
||||
let that = this
|
||||
that.$model.getloginversion({}).then(res => {
|
||||
console.log("res.data", res)
|
||||
let language = res.data.language == "zh" ? 'zh-Hans' : res.data.language
|
||||
uni.setLocale(language)
|
||||
that.$i18n.locale = language
|
||||
uni.setStorageSync('language', res.data.language)
|
||||
if (res.code == 0) {
|
||||
that.$store.dispatch("getHomeConfig")
|
||||
} else {
|
||||
uni.setStorageSync('token', null)
|
||||
uni.setStorageSync('aan_id', null)
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
}, 500);
|
||||
}
|
||||
// #ifdef APP-PLUS||APP
|
||||
that.$store.commit('changePhoneInfo', {
|
||||
versionUrl: res.data
|
||||
})
|
||||
// 比对版本号
|
||||
let version = that.$tools.compareVersions(SystemVersion, res.data.version)
|
||||
console.log("是否登录及版本号", res, res.data.version, SystemVersion, version)
|
||||
if (version == -1) { // 0版本号相通,1,:第一个版本号大于第二个版本号,-1:第一个版本号小于第二个版本号
|
||||
uni.showModal({
|
||||
title: '发现新版本',
|
||||
content: '检查到新版本' + res.data.version + ',是否更新?',
|
||||
cancelText: that.$t('btnSancellation'),
|
||||
confirmText: that.$t('btnConfirm'),
|
||||
success: (modalRes) => {
|
||||
if (modalRes.confirm) { //确定更新
|
||||
if (platform === 'android') { //安卓更新
|
||||
uni.setStorageSync('VERSION', res.data.version)
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/me/about"
|
||||
})
|
||||
} else { //ios跳转
|
||||
plus.runtime.launchApplication({
|
||||
action: `itms-apps://itunes.apple.com/cn/app/id6654906497?mt=8`
|
||||
})
|
||||
}
|
||||
} else {
|
||||
that.$tools.msg("稍后可在'关于我们'内更新程序!")
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
})
|
||||
},
|
||||
handleTabBarItem() {
|
||||
let that = this
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
text: that.$t('titleHome')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 1,
|
||||
text: that.$t('titleCount')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 2,
|
||||
text: that.$t('titleMe')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -844,7 +844,7 @@ page {
|
|||
|
||||
.mubiao {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
// margin-top: 32rpx;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
<view class="table">
|
||||
<view class="text">
|
||||
<image src="/static/zhong.png"></image>
|
||||
<text @click="openBluetoothAdapter">{{bleTipsText}}</text>
|
||||
<text @click="openBluetoothAdapter">{{bletipstext}}</text>
|
||||
</view>
|
||||
<view class="duan" @click="handleBack" v-if="isShow&&isConnection == 0">
|
||||
断开连接
|
||||
{{$t('Disconnect')}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
|
|
@ -25,20 +25,20 @@
|
|||
<picker mode="selector" :range="unitList" range-key="name" @change="changleUnits"
|
||||
:value="unitListIndex">
|
||||
<view class="uni-input">
|
||||
单位
|
||||
{{$t('UnitBtn')}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn addbtn size14" @click="handlesub" v-if="btnType==2">保存</view>
|
||||
<view class="btn addbtn size14" @click="handlesub" v-if="btnType==2">{{$t('Save')}}</view>
|
||||
<view class="btn addbtn" @click="handleAddFood" v-if="btnType==1">+</view>
|
||||
<view class="btn qingling" @click="handleqingling">清零</view>
|
||||
<view class="btn qingling" @click="handleqingling">{{$t('resetBtn')}}</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view>
|
||||
<uni-popup ref="popup" type="dialog">
|
||||
<uni-popup-dialog mode="input" title="重量" placeholder="请输入食物重量" @close="close"
|
||||
<uni-popup-dialog mode="input" :title="$t('Weight')" :placeholder="$t('RecordWeight')" @close="close"
|
||||
@confirm="confirm"></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
|
@ -57,7 +57,6 @@
|
|||
kcal: 0,
|
||||
unit: '',
|
||||
// weight: "",
|
||||
bleTipsText: "",
|
||||
inputDialog: false,
|
||||
unitList: [{
|
||||
name: "克",
|
||||
|
|
@ -69,7 +68,7 @@
|
|||
unit: "oz"
|
||||
}],
|
||||
unitListIndex: 0,
|
||||
units: ['kg', '斤', 'st:lb', 'lb', 'g', 'ml', 'Waterml',
|
||||
units: ['kg', 'g', 'st:lb', 'lb', 'g', 'ml', 'Waterml',
|
||||
'milkml', 'oz', 'floz', 'lboz'
|
||||
]
|
||||
}
|
||||
|
|
@ -87,16 +86,20 @@
|
|||
computed: {
|
||||
...mapState(["bleValue", "isBluetoothTyle", "countFoodInfo"]),
|
||||
weight() {
|
||||
this.kcal = (Number(this.weightKcal) / 100 * this.bleValue.countWeight).toFixed(2)
|
||||
let kcal = (Number(this.weightKcal) / 100 * this.bleValue.countWeight).toFixed(2)
|
||||
this.unit = this.bleValue.unit
|
||||
this.bleTipsText = this.bleValue.bleTipsText
|
||||
this.kcal = this.convertToGrams(kcal, this.bleValue.unit).toFixed(2)
|
||||
return this.bleValue.countWeight
|
||||
},
|
||||
isConnection() {
|
||||
this.bleTipsText = this.bleValue.bleTipsText
|
||||
return this.bleValue.isConnectStatus
|
||||
},
|
||||
isShow() {
|
||||
return this.bleValue.serviceId != '' ? true : false
|
||||
},
|
||||
bletipstext() {
|
||||
return this.bleValue.bleTipsText
|
||||
}
|
||||
|
||||
},
|
||||
|
|
@ -117,7 +120,7 @@
|
|||
if (!that.isBluetoothTyle) {
|
||||
that.handleBack()
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 初始化蓝牙
|
||||
|
|
@ -132,18 +135,18 @@
|
|||
write: '',
|
||||
unit: "g",
|
||||
countWeight: "",
|
||||
bleTipsText: "蓝牙搜索中",
|
||||
bleTipsText: that.$t('SearchBluetooth'),
|
||||
isConnectStatus: 0,
|
||||
})
|
||||
that.$ble.openBluetoothAdapter()
|
||||
},
|
||||
|
||||
|
||||
changleUnits(e) {
|
||||
let that = this
|
||||
let name = that.unitList[e.detail.value].name
|
||||
let name = that.unitList[e.detail.value].unit
|
||||
console.log("单位切换", name, that.unit)
|
||||
if (that.isShow && that.unit != name) {
|
||||
that.handletoggleUnit(name == '盎司' ? 0x08 : 0x04)
|
||||
if (that.isShow && that.unit != unit) {
|
||||
that.handletoggleUnit(name == 'oz' ? 0x08 : 0x04)
|
||||
}
|
||||
that.unitListIndex = [e.detail.value]
|
||||
that.$store.commit('changeBluetoothValue', {
|
||||
|
|
@ -192,19 +195,33 @@
|
|||
if (Number(that.weight) > 0) {
|
||||
that.$emit("handleBle", that.weight, that.unit, that.kcal)
|
||||
} else {
|
||||
that.$tools.msg("数据异常,请清零后重新测量!")
|
||||
that.$tools.msg(that.$t('reset'))
|
||||
}
|
||||
},
|
||||
handleBack() {
|
||||
let that = this
|
||||
that.$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "连接失败,点击重新连接",
|
||||
bleTipsText: that.$t('ConnectionTimeout'),
|
||||
isConnectStatus: 1
|
||||
})
|
||||
that.$ble.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
that.$ble.closeBLEConnection(that.bleValue.deviceId)
|
||||
that.$ble.closeBluetoothAdapter()
|
||||
},
|
||||
convertToGrams(value, fromUnit) {
|
||||
const conversionFactors = {
|
||||
'lb': 453.59237, // 1磅 = 453.59237克
|
||||
'oz': 28.349523125, // 1盎司 = 28.349523125克
|
||||
'kg': 1000, // 1公斤 = 1000克
|
||||
'g': 1
|
||||
};
|
||||
|
||||
if (!conversionFactors.hasOwnProperty(fromUnit)) {
|
||||
return ''
|
||||
}
|
||||
|
||||
return value * conversionFactors[fromUnit];
|
||||
},
|
||||
|
||||
unitConversion(unit) {
|
||||
if (unit == 'kcal') {
|
||||
|
|
@ -221,7 +238,7 @@
|
|||
// 添加食物
|
||||
handleAddFood() {
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/count/search?name=早餐&time=" + this.countFoodInfo.date
|
||||
url: "/pageTwo/count/search?index=0&time=" + this.countFoodInfo.date
|
||||
})
|
||||
},
|
||||
inputDialogToggle() {
|
||||
|
|
@ -348,6 +365,7 @@
|
|||
.text {
|
||||
color: #8284f0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
image {
|
||||
|
|
|
|||
160
language/en.json
|
|
@ -1,14 +1,150 @@
|
|||
{
|
||||
"index.home": "index",
|
||||
"index.component": "Component",
|
||||
"index.api": "API",
|
||||
"index.schema": "Schema",
|
||||
"index.demo": "uni-app globalization",
|
||||
"index.demo-description": "Include uni-framework, manifest.json, pages.json, tabbar, Page, Component, API, Schema",
|
||||
"index.detail": "Detail",
|
||||
"index.language": "Language",
|
||||
"index.language-info": "Settings",
|
||||
"index.system-language": "System language",
|
||||
"index.application-language": "Application language",
|
||||
"index.language-change-confirm": "Applying this setting will restart the app"
|
||||
"msgTitle": "Friendly Reminder",
|
||||
"msgUpgradeFail": "Upgrade failed",
|
||||
"msgDownloading": "Downloading",
|
||||
"msgLatestVersion": "It's already the latest version!",
|
||||
"msgCancel": "You have canceled the operation!",
|
||||
"msgLoginSuccess": "Login successful!",
|
||||
"msgDelete": "Deleted successfully",
|
||||
"msgSetSuccess": "Setup successful",
|
||||
"msgBottom": "That's it, let's look at something else",
|
||||
"msgNoMoreData": "No more data available!",
|
||||
"msgSetPasswordSuccess": "Password set successfully, entering the program!",
|
||||
"msgAddUser": "Currently, there are no members. Please add one first",
|
||||
"verifyNickName": "Please enter a nickname",
|
||||
"verifyNotOptional": "Future dates are not selectable",
|
||||
"verifyDate": "Please select the measurement date",
|
||||
"verifyBirthday": "Please select your date of birth",
|
||||
"verifyHeight": "Please enter your height",
|
||||
"verifyWeight": "Please enter your weight",
|
||||
"verifyGender": "Please select gender",
|
||||
"verifyBontrast": "Please select data",
|
||||
"verifyBodyDate": "Please choose the correct time",
|
||||
"verifyRecord": "Please enter",
|
||||
"verifyPicker": "Please select",
|
||||
"verifyAccount": "Please enter a correct phone number or email address",
|
||||
"verifyEmail": "Please enter your email",
|
||||
"verifyEmailCorrect": "Please enter a correct email address",
|
||||
"verifyMobile": "Please enter your phone number",
|
||||
"verifyMobileCorrect": "Please enter a correct phone number",
|
||||
"verifyCode": "Please enter the verification code",
|
||||
"verifyPassword": "Please enter the password",
|
||||
"verifyPasswordTwo": "Please enter the confirmation password",
|
||||
"verifyPasswordCorrect": "Please confirm that the passwords entered are identical",
|
||||
"verifyAgreement": "Please confirm and check the agreement first",
|
||||
"verifyOutLogin": "Are you sure you want to log out?",
|
||||
"verifyDeleteUser": "Should this member be deleted?",
|
||||
"verifyDeleteHistory": "Do you want to delete the current measurement record?",
|
||||
"verifyDeleteAccount": "After successful deletion, all associated information of the account will be cleared and cannot be retrieved. Are you sure you want to delete?",
|
||||
"btnConfirm": "confirm",
|
||||
"btnSubmit": "submit",
|
||||
"btnSancellation": "Cancel",
|
||||
"btnContinue": "continue",
|
||||
"btnBack": "return",
|
||||
"ConnectionTimeout": "Connection timed out, click to reconnect",
|
||||
"Measuring": "During the measurement, please place the food on the scale",
|
||||
"Weight": "weight",
|
||||
"RecordWeight": "Please enter food weight",
|
||||
"SearchBluetooth": "In Bluetooth search",
|
||||
"Remeasure": "Data anomaly, please re-measure!",
|
||||
"reset": "Data anomaly, please reset and measure again!",
|
||||
"Disconnect": "Disconnect",
|
||||
"remeasure": "remeasure",
|
||||
"resetBtn": "Tare",
|
||||
"UnitBtn": "unit",
|
||||
"SaveResult": "save",
|
||||
"titleHome": "home",
|
||||
"titleMenu": "recipe",
|
||||
"titleMenuAdd": "Add recipe",
|
||||
"titleMenuSearch": "Search for recipes",
|
||||
"titleCount": "Count food",
|
||||
"titleCountList": "Ingredient library",
|
||||
"titleCustomKcal": "Custom calorie",
|
||||
"titleEveryMeal": "Meal details",
|
||||
"titleCountSearch": "Ingredient search",
|
||||
"titleeveryDay": "Nutritional Analysis",
|
||||
"titleMe": "my",
|
||||
"titleDetail": "Details",
|
||||
"titleBody": "target",
|
||||
"titleHistory": "Diet record",
|
||||
"titlePhone": "Bind mobile number",
|
||||
"titleEmail": "Bind email",
|
||||
"titlePasswordEdit": "Change password",
|
||||
"titleSet": "Settings",
|
||||
"titleDate": "date",
|
||||
"titleMember": "data",
|
||||
"titleManage": "Member Management",
|
||||
"titleManageAdd": "Add member",
|
||||
"titleAboutUs": "About Us",
|
||||
"titleSetPassword": "set password",
|
||||
"titlePassword": "password",
|
||||
"titleConfirmPassword": "Confirm Password",
|
||||
"titleForgotPassword": "Forgot password",
|
||||
"titleCode": "CAPTCHA",
|
||||
"titleLanguage": "Language settings",
|
||||
"titleSendCode": "Get verification code",
|
||||
"titleSendCodeRetry": "Resend after S",
|
||||
"titleLogin": "login",
|
||||
"titleRegister": "register",
|
||||
"titleToggleLogin": "Switch login",
|
||||
"titleAccountText": "Mobile phone number/Email",
|
||||
"titleAgreementText": "Read and agree",
|
||||
"titleAgreementContntText": "Privacy Policy",
|
||||
"titleVersionUpdate": "Version Update",
|
||||
"titleNewVersion": "new version",
|
||||
"infoActivityCoefficient": "Activity coefficient",
|
||||
"infoPersonalProfile": "Personal Profile",
|
||||
"infoMyRecipes": "My recipe",
|
||||
"infoMyCollection": "My Collection",
|
||||
"infoAvatar": "avatar",
|
||||
"infoNickname": "nickname",
|
||||
"infoMobile": "mobile phone number",
|
||||
"infoEmail": "email",
|
||||
"infoAge": "age",
|
||||
"infoAgeunit": "year",
|
||||
"infoGender": "gender",
|
||||
"infoMan": "male",
|
||||
"infoWoman": "female",
|
||||
"infoUnknown": "unknown",
|
||||
"infoBirthday": "Birthday",
|
||||
"infoHeight": "height",
|
||||
"infoWeight": "weight",
|
||||
"btnEdit": "edit",
|
||||
"btnDelete": "delete",
|
||||
"btnAdd": "add",
|
||||
"btnDetail": "View details",
|
||||
"btnDeleteAccount": "Delete account",
|
||||
"btnLogOut": "Log out",
|
||||
"countIntake": "intake",
|
||||
"countCalorieIntake": "caloric intake",
|
||||
"countMealdetails": "Meal details",
|
||||
"countAddFood": "Add food",
|
||||
"countNutritionalProportion": "Nutrient composition",
|
||||
"countComponentStatistics": "Ingredient statistics",
|
||||
"countCalorieAnalysis": "Calorie analysis",
|
||||
"countNutrientElementEnergyProportion": "Energy proportion",
|
||||
"countNutritionClassification": "Nutrition classification",
|
||||
"countNutritionElementRankingList": "Nutrient Rankings",
|
||||
"countFoodTypes": "Food type",
|
||||
|
||||
"total": "Total of",
|
||||
"records": "records",
|
||||
"Search": "Search",
|
||||
"VoiceSearch": "VoiceSearch",
|
||||
"Save": "Save",
|
||||
"noMoreData": "There is no more data",
|
||||
"HistoricalSearch": "Historical search",
|
||||
"wantSearch": "I guess you want to search",
|
||||
"verifyCalorie": "Please enter calories",
|
||||
"kcal": "Calorie",
|
||||
"countNoFood": "NO Food Yet",
|
||||
"msgLoginTips": "Log in to view more",
|
||||
"Nutrients": "Nutrients",
|
||||
"Content": "Content",
|
||||
"CaloriesAndnutrients": "Calories and nutrients",
|
||||
"ImproveInformation": "Improve information",
|
||||
"WhetherTodelete": "Whether to delete",
|
||||
"BusinessCooperation": "Businesscooperation",
|
||||
"verifyActivityCoefficient": "Please select the activity coefficient"
|
||||
|
||||
}
|
||||
|
|
@ -2,11 +2,31 @@ import en from './en.json'
|
|||
import zh from './zh.json'
|
||||
import zhHant from './zh-Hant.json'
|
||||
import ja from './ja.json'
|
||||
import fr from './fr.json'
|
||||
import de from './de.json'
|
||||
import ko from './ko.json'
|
||||
import ru from './ru.json'
|
||||
import pt from './pt.json'
|
||||
import es from './es.json'
|
||||
import ar from './ar.json'
|
||||
export default {
|
||||
zh,
|
||||
zh, //中文
|
||||
en, // 英语
|
||||
ja, //日语
|
||||
fr, //法语
|
||||
de, //德语
|
||||
ko, //韩语
|
||||
ru, //俄语
|
||||
pt, //葡萄牙
|
||||
es, //西班牙
|
||||
ar, //阿拉伯
|
||||
"zh-Hans": zh, //中文
|
||||
'zh-Hant': zhHant, //繁体
|
||||
"en-CN": en
|
||||
"en-CN": en,
|
||||
"jp":ja,
|
||||
"fra":fr,
|
||||
"kor":ko,
|
||||
"spa":es,
|
||||
"ara":ar,
|
||||
|
||||
}
|
||||
164
language/ja.json
|
|
@ -1,15 +1,151 @@
|
|||
{
|
||||
"index.title": "Hello i18n",
|
||||
"index.home": "ホーム",
|
||||
"index.component": "コンポーネント",
|
||||
"index.api": "API",
|
||||
"index.schema": "Schema",
|
||||
"index.demo": "uni-app globalization",
|
||||
"index.demo-description": "ユニフレームワーク、manifest.json、pages.json、タブバー、ページ、コンポーネント、APIを含める、Schema",
|
||||
"index.detail": "詳細",
|
||||
"index.language": "言語",
|
||||
"index.language-info": "設定",
|
||||
"index.system-language": "システム言語",
|
||||
"index.application-language": "アプリケーション言語",
|
||||
"index.language-change-confirm": "この設定を適用すると、アプリが再起動します"
|
||||
}
|
||||
|
||||
"msgTitle": "友情のヒント",
|
||||
"msgUpgradeFail": "アップグレード失敗",
|
||||
"msgDownloading": "ダウンロード中",
|
||||
"msgLatestVersion": "最新バージョンですよ!",
|
||||
"msgCancel": "操作をキャンセルしました!",
|
||||
"msgLoginSuccess": "ログイン成功!",
|
||||
"msgDelete": "削除に成功しました",
|
||||
"msgSetSuccess": "設定完了",
|
||||
"msgBottom": "これ以上ありません。他のものを見てみましょう",
|
||||
"msgNoMoreData": "これ以上データはありません!",
|
||||
"msgSetPasswordSuccess": "パスワード設定完了、プログラムに入ります!",
|
||||
"msgAddUser": "メンバーがまだいません。まず追加してください",
|
||||
"verifyNickName": "ニックネームを入力してください",
|
||||
"verifyNotOptional": "将来の日付は選択できません",
|
||||
"verifyDate": "測定日を選択してください",
|
||||
"verifyBirthday": "生年月日を選択してください",
|
||||
"verifyHeight": "身長を入力してください",
|
||||
"verifyWeight": "体重を入力してください",
|
||||
"verifyGender": "性別を選択してください",
|
||||
"verifyBontrast": "データを選択してください",
|
||||
"verifyBodyDate": "正しい時間を選択してください",
|
||||
"verifyRecord": "入力してください",
|
||||
"verifyPicker": "選択してください",
|
||||
"verifyAccount": "正しい携帯電話番号またはメールアドレスを入力してください",
|
||||
"verifyEmail": "メールアドレスを入力してください",
|
||||
"verifyEmailCorrect": "正しいメールアドレスを入力してください",
|
||||
"verifyMobile": "携帯電話番号を入力してください",
|
||||
"verifyMobileCorrect": "正しい携帯電話番号を入力してください",
|
||||
"verifyCode": "認証コードを入力してください",
|
||||
"verifyPassword": "パスワードを入力してください",
|
||||
"verifyPasswordTwo": "確認用パスワードを入力してください",
|
||||
"verifyPasswordCorrect": "パスワードが一致しているか確認してください",
|
||||
"verifyAgreement": "まず、同意書を確認してチェックしてください",
|
||||
"verifyOutLogin": "ログアウトしますか?",
|
||||
"verifyDeleteUser": "このメンバーを削除しますか?",
|
||||
"verifyDeleteHistory": "現在の測定記録を削除しますか?",
|
||||
"verifyDeleteAccount": "削除に成功すると、そのアカウントに関連するすべての情報が消去され、復元できません。削除しますか?",
|
||||
"btnConfirm": "確認",
|
||||
"btnSubmit": "提出",
|
||||
"btnSancellation": "キャンセル",
|
||||
"btnContinue": "続ける",
|
||||
"btnBack": "戻る",
|
||||
"ConnectionTimeout": "接続タイムアウト、再接続をクリックしてください",
|
||||
"Measuring": "測定中は、食べ物をはかりの上に置いてください",
|
||||
"Weight": "重量",
|
||||
"RecordWeight": "食品の重量を入力してください",
|
||||
"SearchBluetooth": "Bluetooth検索中",
|
||||
"Remeasure": "データに異常があります。再度計測してください!",
|
||||
"reset": "データ異常です。ゼロにしてから再度測定してください!",
|
||||
"Disconnect": "接続を切断",
|
||||
"remeasure": "再測定",
|
||||
"resetBtn": "ゼロクリア",
|
||||
"UnitBtn": "単位",
|
||||
"SaveResult": "保存",
|
||||
"titleHome": "ホームページ",
|
||||
"titleMenu": "レシシピ",
|
||||
"titleMenuAdd": "レシピを追加",
|
||||
"titleMenuSearch": "レシピ検索",
|
||||
"titleCount": "食事の計算",
|
||||
"titleCountList": "食材庫(しょかいく)",
|
||||
"titleCustomKcal": "カスタムカロリー",
|
||||
"titleEveryMeal": "食事の詳細",
|
||||
"titleCountSearch": "食材検索",
|
||||
"titleeveryDay": "栄養分析",
|
||||
"titleMe": "私の",
|
||||
"titleDetail": "詳細",
|
||||
"titleBody": "目標",
|
||||
"titleHistory": "食事記録",
|
||||
"titlePhone": "携帯電話番号の紐付け",
|
||||
"titleEmail": "メールアドレスの紐付け",
|
||||
"titlePasswordEdit": "パスワードを変更する",
|
||||
"titleSet": "設定",
|
||||
"titleDate": "日付",
|
||||
"titleMember": "資料",
|
||||
"titleManage": "メンバー管理",
|
||||
"titleManageAdd": "メンバー追加",
|
||||
"titleAboutUs": "私たちについて",
|
||||
"titleSetPassword": "パスワードを設定する",
|
||||
"titlePassword": "パスワード",
|
||||
"titleConfirmPassword": "確認用パスワード",
|
||||
"titleForgotPassword": "パスワードを忘れた",
|
||||
"titleCode": "認証コード",
|
||||
"titleLanguage": "言語設定",
|
||||
"titleSendCode": "認証コードを取得する",
|
||||
"titleSendCodeRetry": "S後再送",
|
||||
"titleLogin": "ログイン",
|
||||
"titleRegister": "登録",
|
||||
"titleToggleLogin": "ログイン切り替え",
|
||||
"titleAccountText": "携帯電話番号/メールアドレス",
|
||||
"titleAgreementText": "読み、同意する",
|
||||
"titleAgreementContntText": "プライバシーポリシー",
|
||||
"titleVersionUpdate": "バージョンアップデート",
|
||||
"titleNewVersion": "新バージョン",
|
||||
"infoActivityCoefficient": "活動係数",
|
||||
"infoPersonalProfile": "個人情報",
|
||||
"infoMyRecipes": "私のレシピ",
|
||||
"infoMyCollection": "私のコレクション",
|
||||
"infoAvatar": "アバター",
|
||||
"infoNickname": "ニックネーム",
|
||||
"infoMobile": "携帯電話番号",
|
||||
"infoEmail": "メールボックス",
|
||||
"infoAge": "年齢",
|
||||
"infoAgeunit": "歳",
|
||||
"infoGender": "性別",
|
||||
"infoMan": "男",
|
||||
"infoWoman": "女(おんな)",
|
||||
"infoUnknown": "未知(みちゅう)",
|
||||
"infoBirthday": "生年月日",
|
||||
"infoHeight": "身長",
|
||||
"infoWeight": "体重",
|
||||
"btnEdit": "編集",
|
||||
"btnDelete": "削除",
|
||||
"btnAdd": "追加",
|
||||
"btnDetail": "詳細を見る",
|
||||
"btnDeleteAccount": "アカウント削除",
|
||||
"btnLogOut": "ログアウト",
|
||||
"countIntake": "摂取",
|
||||
"countCalorieIntake": "熱量摂取",
|
||||
"countMealdetails": "食事の詳細",
|
||||
"countAddFood": "食品を追加する",
|
||||
"countNutritionalProportion": "栄養の割合",
|
||||
"countComponentStatistics": "成分統計",
|
||||
"countCalorieAnalysis": "カロリー分析",
|
||||
"countNutrientElementEnergyProportion": "栄養素のエネルギー割合",
|
||||
"countNutritionClassification": "栄養分類",
|
||||
"countNutritionElementRankingList": "栄養素ランキング",
|
||||
"countFoodTypes": "食品タイプ",
|
||||
|
||||
"total": "共です",
|
||||
"records": "記録します",
|
||||
"Search": "検索します",
|
||||
"VoiceSearch": "音声検索です",
|
||||
"Save": "保存します",
|
||||
"noMoreData": "これ以上のデータはありません",
|
||||
"HistoricalSearch": "履歴検索です",
|
||||
"wantSearch": "あなたが探していると思います",
|
||||
"verifyCalorie": "カロリー入力お願いします。",
|
||||
"kcal": "カロリーです",
|
||||
"countNoFood": "しばらく食べ物がありません",
|
||||
"msgLoginTips": "ログインしてもっと見ます",
|
||||
"Nutrients": "栄養素です",
|
||||
"Content": "含有量です",
|
||||
"CaloriesAndnutrients": "カロリーと栄養です",
|
||||
"ImproveInformation": "情報を補完します",
|
||||
"WhetherTodelete": "削除しますか",
|
||||
"BusinessCooperation": "ビジネス提携です",
|
||||
"verifyActivityCoefficient": "活動係数を選択します"
|
||||
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
"common": {
|
||||
"uni.app.quit": "もう一度押すと、アプリケーションが終了します",
|
||||
"uni.async.error": "サーバーへの接続がタイムアウトしました。画面をクリックして再試行してください",
|
||||
"uni.showActionSheet.cancel": "キャンセル",
|
||||
"uni.showToast.unpaired": "使用するには、showToastとhideToastをペアにする必要があることに注意してください",
|
||||
"uni.showLoading.unpaired": "使用するには、showLoadingとhideLoadingをペアにする必要があることに注意してください",
|
||||
"uni.showModal.cancel": "キャンセル",
|
||||
"uni.showModal.confirm": "OK",
|
||||
"uni.chooseImage.cancel": "キャンセル",
|
||||
"uni.chooseImage.sourceType.album": "アルバムから選択",
|
||||
"uni.chooseImage.sourceType.camera": "カメラ",
|
||||
"uni.chooseVideo.cancel": "キャンセル",
|
||||
"uni.chooseVideo.sourceType.album": "アルバムから選択",
|
||||
"uni.chooseVideo.sourceType.camera": "カメラ",
|
||||
"uni.previewImage.cancel": "キャンセル",
|
||||
"uni.previewImage.button.save": "画像を保存",
|
||||
"uni.previewImage.save.success": "画像をアルバムに正常に保存します",
|
||||
"uni.previewImage.save.fail": "画像をアルバムに保存できませんでした",
|
||||
"uni.setClipboardData.success": "コンテンツがコピーされました",
|
||||
"uni.scanCode.title": "スキャンコード",
|
||||
"uni.scanCode.album": "アルバム",
|
||||
"uni.scanCode.fail": "認識に失敗しました",
|
||||
"uni.scanCode.flash.on": "タッチして点灯",
|
||||
"uni.scanCode.flash.off": "タップして閉じる",
|
||||
"uni.startSoterAuthentication.authContent": "指紋認識...",
|
||||
"uni.picker.done": "完了",
|
||||
"uni.picker.cancel": "キャンセル",
|
||||
"uni.video.danmu": "「弾幕」",
|
||||
"uni.video.volume": "ボリューム",
|
||||
"uni.button.feedback.title": "質問のフィードバック",
|
||||
"uni.button.feedback.send": "送信"
|
||||
},
|
||||
"ios": {},
|
||||
"android": {}
|
||||
}
|
||||
284
language/zh.json
|
|
@ -1,162 +1,148 @@
|
|||
{
|
||||
"tips": {
|
||||
"msgTitle": "友情提示",
|
||||
"msgUpgradeFail": "升级失败",
|
||||
"msgDownloading": "正在下载",
|
||||
"msgLatestVersion": "已经是最新版本了!",
|
||||
"msgCancel": "您已取消操作!",
|
||||
"msgLoginSuccess": "登录成功!",
|
||||
"msgDelete": "删除成功",
|
||||
"msgSetSuccess": "设置成功",
|
||||
"msgBottom": "到底了,看看别的吧",
|
||||
"msgNoMoreData": "没有更多数据了!",
|
||||
"msgSetPasswordSuccess": "密码设置成功,进入程序中!",
|
||||
"msgAddUser": "暂无成员,请先添加",
|
||||
"verifyNickName": "请输入昵称",
|
||||
"verifyNotOptional": "未来日期不可选",
|
||||
"verifyDate": "请选择测量日期",
|
||||
"verifyBirthday": "请选择出生日期",
|
||||
"verifyHeight": "请输入身高",
|
||||
"verifyWeight": "请输入体重",
|
||||
"verifyGender": "请选择性别",
|
||||
"verifyBontrast": "请选择数据",
|
||||
"verifyBodyDate": "请选择正确的时间",
|
||||
"verifyRecord": "请输入",
|
||||
"verifyPicker": "请选择",
|
||||
"verifyAccount": "请输入正确的手机号或邮箱",
|
||||
"verifyEmail": "请输入邮箱",
|
||||
"verifyEmailCorrect": "请输入正确的邮箱",
|
||||
"verifyMobile": "请输入手机号",
|
||||
"verifyMobileCorrect": "请输入正确的手机号",
|
||||
"verifyCode": "请输入验证码",
|
||||
"verifyPassword": "请输入密码",
|
||||
"verifyPasswordTwo": "请输入确认密码",
|
||||
"verifyPasswordCorrect": "请确认两次密码填写一致",
|
||||
"verifyAgreement": "请先确认并勾选协议",
|
||||
"verifyOutLogin": "是否退出登录?",
|
||||
"verifyDeleteUser": "是否删除该成员?",
|
||||
"verifyDeleteHistory": "是否删除当前测量记录?",
|
||||
"verifyDeleteAccount": "删除成功后,该账号的所有关联信息将被清空且无法找回,是否删除?",
|
||||
"btnConfirm": "确认",
|
||||
"btnSubmit": "提交",
|
||||
"btnSancellation": "取消",
|
||||
"btnContinue": "继续",
|
||||
"btnBack": "返回",
|
||||
"btnDelete": "删除"
|
||||
},
|
||||
"linkBluetooth": {
|
||||
"onBluetoothTips": "请在设备开机状态下,搜索设备",
|
||||
"onBluetoothHaveFound": "已发现",
|
||||
"onBluetoothDevice": "个设备",
|
||||
"onBluetoothMac": "mac地址",
|
||||
"onBluetoothBind": "设备绑定流程说明",
|
||||
"onBluetoothSelect": "选择蓝牙进行绑定",
|
||||
"onPhoneBluetoothTips": "手机蓝牙未打开",
|
||||
"onDeviceBluetoothTips": "请确定设备是开机状态、手机蓝牙权限已打开!",
|
||||
"accreditTips": "需要您授权使用手机蓝牙",
|
||||
"openBluetoothSuccess": "蓝牙权限获取成功,重新连接蓝牙",
|
||||
"openSettingFail": "获取权限失败,将无法使用手机蓝牙进行测量",
|
||||
"isLinkBluetooth": "请先连接设备",
|
||||
"startlinkBluetooth": "开始连接",
|
||||
"linkBluetooth": "蓝牙连接中",
|
||||
"anewlinkBluetooth": "重新连接",
|
||||
"linkBluetoothFail": "设备连接失败,返回首页重新连接",
|
||||
"linkBluetoothSuccess": "蓝牙连接成功,请开始测量",
|
||||
"startSearchBluetooth": "开始搜索",
|
||||
"searchBluetooth": "蓝牙搜索中",
|
||||
"searchBluetoothFail": "重新搜索",
|
||||
"Nodevicefound": "没有搜索到蓝牙设备",
|
||||
"onDeviceMeasureTips": "请确定设备是开机状态",
|
||||
"openDeviceeMeasureTips": "请确定手机蓝牙已打开",
|
||||
"openDeviceeMeasureTips2": "请确定手机位置信息已打开",
|
||||
"deviceDisconnection": "测量过程中已与设备连接中断,请重新连接设备再开始测量",
|
||||
"offBluetooth": "蓝牙已关闭,请重新打开蓝牙后再开始测量",
|
||||
"remeasure": "重新测量",
|
||||
"zeroBtn": "清零",
|
||||
"UnitBtn": "单位",
|
||||
"SaveResult": "保存结果",
|
||||
"measureResultTips": "测量结果提示"
|
||||
},
|
||||
"common": {
|
||||
"titleHome": "首页",
|
||||
"titleMenu": "菜谱",
|
||||
"titleMenuAdd": "添加食谱",
|
||||
"titleMenuSearch": "搜索菜谱",
|
||||
"titleCount": "计食",
|
||||
"titleCountList": "食材库",
|
||||
"titleCustomKcal": "自定义卡路里",
|
||||
"titleEveryMeal": "餐食详情",
|
||||
"titleCountSearch": "食材搜索",
|
||||
"titleeveryDay": "营养分析",
|
||||
"titleMe": "我的",
|
||||
"titleDetail": "详情",
|
||||
"titleBody": "目标",
|
||||
"titleHistory": "饮食记录",
|
||||
"titlePhone": "绑定手机号",
|
||||
"titleEmail": "绑定邮箱",
|
||||
"titlePasswordEdit": "修改密码",
|
||||
"titleSet": "设置",
|
||||
"titleDate": "日期",
|
||||
"titleMember": "资料",
|
||||
"titleManage": "成员管理",
|
||||
"titleManageAdd": "添加成员",
|
||||
"titleAboutUs": "关于我们",
|
||||
"titleSetPassword": "设置密码",
|
||||
"titlePassword": "密码",
|
||||
"titleConfirmPassword": "确认密码",
|
||||
"titleForgotPassword": "忘记密码",
|
||||
"titleCode": "验证码",
|
||||
"titleLanguage": "语言设置",
|
||||
"titleSendCode": "获取验证码",
|
||||
"titleSendCodeRetry": "S后重发",
|
||||
"titleLogin": "登录",
|
||||
"titleRegister": "注册",
|
||||
"titleToggleLogin": "切换登录",
|
||||
"titleAccountText": "手机号/邮箱",
|
||||
"titleAgreementText": "阅读并同意",
|
||||
"titleAgreementContntText": "隐私协议",
|
||||
"titleVersionUpdate": "版本更新",
|
||||
"titleNewVersion": "新版本",
|
||||
"infoActivityCoefficient": "活动系数",
|
||||
"infoPersonalProfile": "个人资料",
|
||||
"infoMyRecipes": "我的菜谱",
|
||||
"infoMyCollection": "我的收藏",
|
||||
"infoAvatar": "头像",
|
||||
"infoNickname": "昵称",
|
||||
"infoMobile": "手机号",
|
||||
"infoEmail": "邮箱",
|
||||
"infoAge": "年龄",
|
||||
"infoAgeunit": "岁",
|
||||
"infoGender": "性别",
|
||||
"infoMan": "男",
|
||||
"infoWoman": "女",
|
||||
"infoUnknown": "未知",
|
||||
"infoBirthday": "出生日期",
|
||||
"infoHeight": "身高",
|
||||
"infoWeight": "体重",
|
||||
"btnEdit": "编辑",
|
||||
"btnDelete": "删除",
|
||||
"btnAdd": "添加",
|
||||
"btnDetail": "查看详情",
|
||||
"btnDeleteAccount": "删除账号",
|
||||
"btnLogOut": "退出登录"
|
||||
},
|
||||
"msgTitle": "友情提示",
|
||||
"msgUpgradeFail": "升级失败",
|
||||
"msgDownloading": "正在下载",
|
||||
"msgLatestVersion": "已经是最新版本了!",
|
||||
"msgCancel": "您已取消操作!",
|
||||
"msgLoginSuccess": "登录成功!",
|
||||
"msgDelete": "删除成功",
|
||||
"msgSetSuccess": "设置成功",
|
||||
"msgBottom": "到底了,看看别的吧",
|
||||
"msgNoMoreData": "暂无数据!",
|
||||
"msgSetPasswordSuccess": "密码设置成功,进入程序中!",
|
||||
"msgAddUser": "暂无成员,请先添加",
|
||||
"verifyNickName": "请输入昵称",
|
||||
"verifyNotOptional": "未来日期不可选",
|
||||
"verifyDate": "请选择测量日期",
|
||||
"verifyBirthday": "请选择出生日期",
|
||||
"verifyHeight": "请输入身高",
|
||||
"verifyWeight": "请输入体重",
|
||||
"verifyGender": "请选择性别",
|
||||
"verifyBontrast": "请选择数据",
|
||||
"verifyBodyDate": "请选择正确的时间",
|
||||
"verifyRecord": "请输入",
|
||||
"verifyPicker": "请选择",
|
||||
"verifyAccount": "请输入正确的手机号或邮箱",
|
||||
"verifyEmail": "请输入邮箱",
|
||||
"verifyEmailCorrect": "请输入正确的邮箱",
|
||||
"verifyMobile": "请输入手机号",
|
||||
"verifyMobileCorrect": "请输入正确的手机号",
|
||||
"verifyCode": "请输入验证码",
|
||||
"verifyPassword": "请输入密码",
|
||||
"verifyPasswordTwo": "请输入确认密码",
|
||||
"verifyPasswordCorrect": "请确认两次密码填写一致",
|
||||
"verifyAgreement": "请先确认并勾选协议",
|
||||
"verifyOutLogin": "是否退出登录?",
|
||||
"verifyDeleteUser": "是否删除该成员?",
|
||||
"verifyDeleteHistory": "是否删除当前测量记录?",
|
||||
"verifyDeleteAccount": "删除成功后,该账号的所有关联信息将被清空且无法找回,是否删除?",
|
||||
"btnConfirm": "确认",
|
||||
"btnSubmit": "提交",
|
||||
"btnSancellation": "取消",
|
||||
"btnContinue": "继续",
|
||||
"btnBack": "返回",
|
||||
"btnDelete": "删除",
|
||||
"ConnectionTimeout": "连接超时,点击重新连接",
|
||||
"Measuring": "测量中,请将食物放到秤上",
|
||||
"Weight": "重量",
|
||||
"RecordWeight": "请输入食物重量",
|
||||
"SearchBluetooth": "蓝牙搜索中",
|
||||
"Remeasure": "数据异常,请重新测量!",
|
||||
"reset": "数据异常,请清零后重新测量!",
|
||||
"Disconnect": "断开连接",
|
||||
"remeasure": "重新测量",
|
||||
"resetBtn": "清零",
|
||||
"UnitBtn": "单位",
|
||||
"titleHome": "首页",
|
||||
"titleMenu": "菜谱",
|
||||
"titleMenuAdd": "添加食谱",
|
||||
"titleMenuSearch": "搜索菜谱",
|
||||
"titleCount": "计食",
|
||||
"titleCountList": "食材库",
|
||||
"titleCustomKcal": "自定义卡路里",
|
||||
"titleEveryMeal": "餐食详情",
|
||||
"titleCountSearch": "食材搜索",
|
||||
"titleeveryDay": "营养分析",
|
||||
"titleMe": "我的",
|
||||
"titleDetail": "详情",
|
||||
"titleBody": "目标",
|
||||
"titleHistory": "饮食记录",
|
||||
"titlePhone": "绑定手机号",
|
||||
"titleEmail": "绑定邮箱",
|
||||
"titlePasswordEdit": "修改密码",
|
||||
"titleSet": "设置",
|
||||
"titleDate": "日期",
|
||||
"titleMember": "资料",
|
||||
"titleManage": "成员管理",
|
||||
"titleManageAdd": "添加成员",
|
||||
"titleAboutUs": "关于我们",
|
||||
"titleSetPassword": "设置密码",
|
||||
"titlePassword": "密码",
|
||||
"titleConfirmPassword": "确认密码",
|
||||
"titleForgotPassword": "忘记密码",
|
||||
"titleCode": "验证码",
|
||||
"titleLanguage": "语言设置",
|
||||
"titleSendCode": "获取验证码",
|
||||
"titleSendCodeRetry": "S后重发",
|
||||
"titleLogin": "登录",
|
||||
"titleRegister": "注册",
|
||||
"titleToggleLogin": "切换登录",
|
||||
"titleAccountText": "手机号/邮箱",
|
||||
"titleAgreementText": "阅读并同意",
|
||||
"titleAgreementContntText": "隐私协议",
|
||||
"titleVersionUpdate": "版本更新",
|
||||
"titleNewVersion": "新版本",
|
||||
"infoActivityCoefficient": "活动系数",
|
||||
"infoPersonalProfile": "个人资料",
|
||||
"infoMyRecipes": "我的菜谱",
|
||||
"infoMyCollection": "我的收藏",
|
||||
"infoAvatar": "头像",
|
||||
"infoNickname": "昵称",
|
||||
"infoMobile": "手机号",
|
||||
"infoEmail": "邮箱",
|
||||
"infoAge": "年龄",
|
||||
"infoAgeunit": "岁",
|
||||
"infoGender": "性别",
|
||||
"infoMan": "男",
|
||||
"infoWoman": "女",
|
||||
"infoUnknown": "未知",
|
||||
"infoBirthday": "出生日期",
|
||||
"infoHeight": "身高",
|
||||
"infoWeight": "体重",
|
||||
"btnEdit": "编辑",
|
||||
"btnAdd": "添加",
|
||||
"btnDetail": "查看详情",
|
||||
"btnDeleteAccount": "删除账号",
|
||||
"btnLogOut": "退出登录",
|
||||
"countIntake": "摄入",
|
||||
"countCalorieIntake": "热量摄入",
|
||||
"countMealdetails": "餐食详情",
|
||||
"countAddFood": "添加食物",
|
||||
"countNutritionalProportion": "营养占比",
|
||||
|
||||
|
||||
|
||||
"countComponentStatistics": "成分统计",
|
||||
"countCalorieAnalysis": "卡路里分析",
|
||||
"countNutrientElementEnergyProportion": "营养元素能量占比",
|
||||
"countNutritionClassification": "营养分类",
|
||||
"countNutritionElementRankingList": "营养元素排行榜",
|
||||
"countFoodTypes": "食物类型"
|
||||
|
||||
|
||||
|
||||
"countFoodTypes": "食物类型",
|
||||
|
||||
"total": "共",
|
||||
"records": "条记录",
|
||||
"Search": "搜索",
|
||||
"VoiceSearch": "语音搜索",
|
||||
"Save": "保存",
|
||||
"noMoreData": "没有更多数据了",
|
||||
"HistoricalSearch": "历史搜索",
|
||||
"wantSearch": "猜你想搜",
|
||||
"verifyCalorie": "请输入卡路里",
|
||||
"kcal": "卡路里",
|
||||
"countNoFood": "暂无食物",
|
||||
"msgLoginTips": "登录后查看更多",
|
||||
"Nutrients": "营养素",
|
||||
"Content": "含量",
|
||||
"CaloriesAndnutrients": "热量和营养",
|
||||
"ImproveInformation": "完善信息",
|
||||
"WhetherTodelete": "是否删除",
|
||||
"BusinessCooperation": "商务合作",
|
||||
"verifyActivityCoefficient": "请选择活动系数"
|
||||
}
|
||||
2
main.js
|
|
@ -14,7 +14,7 @@ Vue.prototype.$http = http;
|
|||
import model from '@/tools/model.js'
|
||||
Vue.prototype.$model = model;
|
||||
// 语言
|
||||
import messages from './language/index'
|
||||
import messages from '@/language/index.js'
|
||||
|
||||
|
||||
let i18nConfig = {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "kitchendDevice",
|
||||
"appid" : "__UNI__20604F1",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"versionName" : "1.1.1",
|
||||
"versionCode" : 111,
|
||||
"transformPx" : false,
|
||||
"sassImplementationName" : "node-sass",
|
||||
/* 5+App特有相关 */
|
||||
|
|
@ -18,7 +18,9 @@
|
|||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {},
|
||||
"modules" : {
|
||||
"Bluetooth" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
|
|
@ -42,10 +44,50 @@
|
|||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
"ios" : {
|
||||
"privacyDescription" : {
|
||||
"NSBluetoothPeripheralUsageDescription" : "使用蓝牙与外设通信",
|
||||
"NSBluetoothAlwaysUsageDescription" : "需要蓝牙权限来连接设备"
|
||||
}
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"speech" : {}
|
||||
},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||
"ipad" : {
|
||||
"app" : "unpackage/res/icons/76x76.png",
|
||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||
"notification" : "unpackage/res/icons/20x20.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||
"settings" : "unpackage/res/icons/29x29.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone" : {
|
||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen" : {
|
||||
"useOriginalMsgbox" : true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -84,5 +126,10 @@
|
|||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "2"
|
||||
"vueVersion" : "2",
|
||||
"locale" : "zh-Hans",
|
||||
"fallbackLocale" : "zh-Hans",
|
||||
"h5" : {
|
||||
"template" : "index.html"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="title">
|
||||
自定义卡路里量
|
||||
{{$t('titleCustomKcal')}}
|
||||
<text class="desc">{{suggestion_kcal_range_val}}</text>
|
||||
</view>
|
||||
<view class="input">
|
||||
<input type="digit" placeholder="请输入" v-model="kcal" />
|
||||
<text>千卡</text>
|
||||
<input type="digit" :placeholder="$t('verifyCalorie')" v-model="kcal" />
|
||||
<text>kcal</text>
|
||||
</view>
|
||||
<view class="btn" @click="handlesub">确认修改</view>
|
||||
<view class="btn" @click="handlesub">{{$t('btnSubmit')}}</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -28,13 +28,16 @@
|
|||
...mapState(["user"]),
|
||||
},
|
||||
onLoad(options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('titleSet')
|
||||
})
|
||||
this.suggestion_kcal_range_val = options.suggestion_kcal_range_val
|
||||
},
|
||||
methods: {
|
||||
handlesub() {
|
||||
let that = this
|
||||
if (that.kcal == '' || Number(that.kcal) <= 0) {
|
||||
that.$tools.msg("请输入卡路里")
|
||||
that.$tools.msg(that.$t('verifyCalorie'))
|
||||
return
|
||||
}
|
||||
that.$model.getCountSetUserKcal({
|
||||
|
|
@ -42,7 +45,7 @@
|
|||
set_kcal: that.kcal
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
that.$tools.msg("设置成功")
|
||||
that.$tools.msg(that.$t('msgSetSuccess'))
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
url: '/pages/count/count'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<!-- 早午晚餐 -->
|
||||
<view class="everyDay">
|
||||
<view class="title">
|
||||
<view><text class="quan"></text>卡路里分析</view>
|
||||
<view><text class="quan"></text>{{$t("countCalorieAnalysis")}}</view>
|
||||
</view>
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts type="ring" :opts="opts" :chartData="chartData" :cHeight="320" :cWidth="320" />
|
||||
|
|
@ -23,15 +23,15 @@
|
|||
<!--营养元素分析 -->
|
||||
<view class="everyDay">
|
||||
<view class="title">
|
||||
<view><text class="quan"></text>营养元素能量占比</view>
|
||||
<view><text class="quan"></text>{{$t("countNutrientElementEnergyProportion")}}</view>
|
||||
</view>
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts type="ring" :opts="opts2" :chartData="chartData2" :cHeight="320" :cWidth="320" />
|
||||
</div>
|
||||
<view class="foodtools">
|
||||
<view class="top">
|
||||
<view>营养分类</view>
|
||||
<view>摄入</view>
|
||||
<view>{{$t("countNutritionClassification")}}</view>
|
||||
<view>{{$t("countIntake")}}</view>
|
||||
</view>
|
||||
<view class="type">
|
||||
<view class="name">
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
<!--营养元素排行榜 -->
|
||||
<view class="everyDay">
|
||||
<view class="title">
|
||||
<view><text class="quan"></text>营养元素排行榜</view>
|
||||
<view><text class="quan"></text>{{$t("countNutritionElementRankingList")}}</view>
|
||||
</view>
|
||||
<view class="foodtools rank_list">
|
||||
<view class="topname">{{details.carbohydrate.name}}</view>
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -170,6 +170,9 @@
|
|||
onLoad(options) {
|
||||
let that = this
|
||||
that.page = options.page
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('titleeveryDay')
|
||||
})
|
||||
that.handleList()
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<!-- 成分统计 -->
|
||||
<view class="everyDay">
|
||||
<view class="title">
|
||||
<view><text class="quan"></text>成分统计</view>
|
||||
<view><text class="quan"></text>{{$t('countComponentStatistics')}}</view>
|
||||
</view>
|
||||
<view class="progress">
|
||||
<div class="chart-wrap">
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
<view class="foodtools">
|
||||
<view class="type">
|
||||
<view class="title">
|
||||
<view><text class="quan"></text>食物类型</view>
|
||||
<view><text class="quan"></text>{{$t('countFoodTypes')}}</view>
|
||||
</view>
|
||||
<view class="list" v-if="info.list.length">
|
||||
<uni-swipe-action>
|
||||
|
|
@ -54,29 +54,29 @@
|
|||
</view>
|
||||
<view v-else class="nolist">
|
||||
<image src="/static/none.png"></image>
|
||||
<view>暂无食物</view>
|
||||
<view>{{$t('countNoFood')}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 添加食物 -->
|
||||
<view class="add" @click="handleAddFood()">
|
||||
<text>+</text>添加食物
|
||||
<text>+</text>{{$t('countAddFood')}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 营养含量分析 -->
|
||||
<uni-drawer ref="showRight" mode="right" width="300">
|
||||
<uni-drawer ref="showRight" mode="right">
|
||||
<scroll-view style="height: 100%;" scroll-y="true">
|
||||
<view class="foodDetail">
|
||||
<view class="foodInfo">
|
||||
<image :src="activeFoodDetail.pic_url" mode="aspectFill"></image>
|
||||
<view class="info">
|
||||
<view class="name">{{activeFoodDetail.name}}</view>
|
||||
<view class="kcal">{{activeFoodDetail.val}}千卡</view>
|
||||
<view class="kcal">{{activeFoodDetail.val}}kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="foodContent">
|
||||
<view class="title">热量和营养</view>
|
||||
<view class="title">{{$t('CaloriesAndnutrients')}}</view>
|
||||
<view class="progress">
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts type="ring" :opts="opts2" :chartData="chartData2" :cHeight="280"
|
||||
|
|
@ -92,8 +92,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<text>营养素</text>
|
||||
<text>{{activeFoodDetail.weight}}含量</text>
|
||||
<text>{{$t('Nutrients')}}</text>
|
||||
<text>{{activeFoodDetail.weight}}{{$t('Content')}}</text>
|
||||
</view>
|
||||
<view class="foodDetailList">
|
||||
<view class="foodDetailItem" v-for="(item,index) in activeFoodDetail.nutrients_list"
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
mapState
|
||||
} from "vuex";
|
||||
let next = 0
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
chartData2: {},
|
||||
activeFoodDetail: {},
|
||||
actionOptions: [{
|
||||
text: '删除',
|
||||
text: this.$t('btnDelete'),
|
||||
style: {
|
||||
backgroundColor: '#dd524d',
|
||||
borderRadius: '10rpx'
|
||||
|
|
@ -166,6 +166,9 @@
|
|||
that.page = options.page
|
||||
that.index = options.index
|
||||
that.bgimage = that.foodItem[options.index].icon_bg
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('titleEveryMeal')
|
||||
})
|
||||
that.handleInfo()
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -230,7 +233,7 @@
|
|||
delAcitionItem(item) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
content: `是否删除[${item.name}]?`,
|
||||
content: that.$t("WhetherTodelete") + item.name,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.$model.delCEatAction({
|
||||
|
|
@ -317,7 +320,6 @@
|
|||
position: relative;
|
||||
width: 280rpx;
|
||||
height: 280rpx;
|
||||
margin-top: -30rpx;
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@
|
|||
import blueTooth from "../../components/bluetooth_food.vue"
|
||||
import FoodItem from "../../components/food_item.vue"
|
||||
// import ruler from "../../components/select-ruler/select-ruler.vue"
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
const plugin = requirePlugin("WechatSI")
|
||||
export default {
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@
|
|||
</view>
|
||||
<view class="serach-box">
|
||||
<view class="searchInput">
|
||||
<input placeholder="请输入..." class="city-serach-input" v-model="search_value" />
|
||||
<input :placeholder="$t('verifyRecord')" class="city-serach-input" v-model="search_value" />
|
||||
<icon v-if="search_value" class="iconfont icon-error" @click="handlecolse" size="30"></icon>
|
||||
</view>
|
||||
<view class="searchBtn">
|
||||
<view @click="handleSerach">搜索</view>
|
||||
<view @click="handleSerach">{{$t("Search")}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<view class="content-box" v-if="!search_list.length">
|
||||
<view v-if="history_food.length" class="search-history">
|
||||
<view class="title">
|
||||
<view class="quan mr-5"></view>历史搜索
|
||||
<view class="quan mr-5"></view>{{$t("HistoricalSearch")}}
|
||||
</view>
|
||||
<view class="button-container" @click="showAll =! showAll" v-if="history_food.length>10">
|
||||
<image :src="showAll?'/static/arrow-up.png':'/static/arrow-down.png'"></image>
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
</view>
|
||||
<view class="popular-container">
|
||||
<view class="title">
|
||||
<view class="quan mr-5"></view>猜你想搜
|
||||
<view class="quan mr-5"></view>{{$t("wantSearch")}}
|
||||
</view>
|
||||
<view class="popular-food-item" v-for="(ite,index) in popular_food" :key="index">
|
||||
<view class="food-title">{{ite.title}}</view>
|
||||
|
|
@ -64,11 +64,11 @@
|
|||
<image src="/static/arrow-down.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mic-icon" @touchstart="onVoiceTouchStart" @touchend="onVoiceTouchEnd"
|
||||
<!-- <view class="mic-icon" @touchstart="onVoiceTouchStart" @touchend="onVoiceTouchEnd"
|
||||
@touchcancel="cancelRecording">
|
||||
<uni-icons type="mic-filled" size="20" color="#fff"></uni-icons>
|
||||
语音搜索
|
||||
</view>
|
||||
{{$t("VoiceSearch")}}
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 搜索列表 -->
|
||||
<view class="search_list" v-if="search_list.length">
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
<text>100g/{{ite.kcal}}kcal</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="endtext" v-if="!lastPage || page >= lastPage">—— 到底了,看看别的吧 ——</view>
|
||||
<view class="endtext" v-if="!lastPage || page >= lastPage">—— {{$t("msgBottom")}} ——</view>
|
||||
</view>
|
||||
<!-- 购物车弹框 -->
|
||||
<view class="wrapper activeList" v-if="isShop">
|
||||
|
|
@ -90,16 +90,15 @@
|
|||
<view class="jishiqi">
|
||||
<view class="left">
|
||||
<view class="chart-wrap">
|
||||
<qiun-data-charts type="arcbar" :chartData="chartData" :cHeight="280" :cWidth="280"
|
||||
:canvas2d="true" canvasId="searchCharts" />
|
||||
<qiun-data-charts type="arcbar" :chartData="chartData" :cHeight="320" :cWidth="320" />
|
||||
<view class="center">
|
||||
摄入
|
||||
{{$t("countIntake")}}
|
||||
<text>{{foodInfo[0].today_intake}}</text>
|
||||
<view class="unit">Kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mubiao">
|
||||
目标:<text>{{foodInfo[0].suggestion}}</text>kcal
|
||||
{{$t("titleBody")}}:<text>{{foodInfo[0].suggestion}}</text>kcal
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
|
|
@ -132,8 +131,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="box_list_item" v-if="ActiveList.length">
|
||||
<view class="length">共<text
|
||||
class="red">{{ActiveList.filter(ite => ite.meals_type == foodName).length}}</text>条记录
|
||||
<view class="length">{{$t("total")}}<text
|
||||
class="red">{{ActiveList.filter(ite => ite.meals_type == foodName).length}}</text>{{$t("records")}}
|
||||
</view>
|
||||
<view class="item" v-for="(ite,ind) in ActiveList" :key="ind"
|
||||
v-if="ite.meals_type==foodName">
|
||||
|
|
@ -150,7 +149,7 @@
|
|||
</view>
|
||||
<view v-else class="nolist list">
|
||||
<icon class="iconfont icon-wancan"></icon>
|
||||
<text>还没有添加食物</text>
|
||||
<text>{{$t('countNoFood')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -168,7 +167,7 @@
|
|||
<image :src="activeType.pic_url" mode="aspectFill"></image>
|
||||
<view class="info">
|
||||
<view class="name">{{activeType.name}}</view>
|
||||
<view class="kcal">{{activeType.kcal}}千卡/100克</view>
|
||||
<view class="kcal">{{activeType.kcal}}kcal/100g</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -187,15 +186,15 @@
|
|||
<!-- 蓝牙称重 -->
|
||||
<view class="blue-tooth" v-if="isBle">
|
||||
<blue-tooth @handleBle="handleBle" :weightKcal="weightKcal"
|
||||
@realTimeWeight="realTimeWeight" :btnType="'2'"></blue-tooth>
|
||||
@realTimeWeight="realTimeWeight" :btnType="btnType"></blue-tooth>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 营养分析 -->
|
||||
<view class="foodDetail">
|
||||
<view class="foodContent">
|
||||
<view class="tips">
|
||||
<text>营养素</text>
|
||||
<text>{{Math.floor(activeType.weight)}}克含量</text>
|
||||
<text>{{$t('Nutrients')}}</text>
|
||||
<text>{{Math.floor(activeType.weight)}}g{{$t('Content')}}</text>
|
||||
</view>
|
||||
<view class="foodDetailList">
|
||||
<view class="foodDetailItem" v-for="(item,index) in activeType.nutrients_list"
|
||||
|
|
@ -234,10 +233,10 @@
|
|||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
const plugin = requirePlugin("WechatSI")
|
||||
// const plugin = requirePlugin("WechatSI")
|
||||
import search from "../../components/search.vue"
|
||||
import blueTooth from "../../components/bluetooth_food.vue"
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -249,6 +248,7 @@
|
|||
},
|
||||
foodInfo: [],
|
||||
time: "",
|
||||
btnType: 2,
|
||||
page: 1,
|
||||
foodName: "",
|
||||
showAll: false,
|
||||
|
|
@ -257,12 +257,13 @@
|
|||
isShop: false,
|
||||
lastPage: "",
|
||||
isBle: true,
|
||||
weightKcal: "",
|
||||
weightKcal: 0,
|
||||
search_value: '',
|
||||
ActiveList: [],
|
||||
activeType: {},
|
||||
voiceManager: null,
|
||||
showAutoSearchDlg: false
|
||||
showAutoSearchDlg: false,
|
||||
index: 0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -285,7 +286,11 @@
|
|||
onLoad(options) {
|
||||
let that = this
|
||||
that.time = options.time
|
||||
that.foodName = options.name
|
||||
that.index = options.index
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('titleCountSearch')
|
||||
})
|
||||
that.foodName = that.foodItem[that.index].name
|
||||
},
|
||||
watch: {
|
||||
bleValue: {
|
||||
|
|
@ -297,21 +302,21 @@
|
|||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
that.voiceManager = plugin.getRecordRecognitionManager()
|
||||
that.voiceManager.onStop = function(res) {
|
||||
that.search_value = res.result.replace('。', '')
|
||||
that.handleSerach()
|
||||
}
|
||||
that.voiceManager.onError = function(res) {
|
||||
console.error("error msg", res.retcode)
|
||||
}
|
||||
that.voiceManager.stop()
|
||||
// that.voiceManager = plugin.getRecordRecognitionManager()
|
||||
// that.voiceManager.onStop = function(res) {
|
||||
// that.search_value = res.result.replace('。', '')
|
||||
// that.handleSerach()
|
||||
// }
|
||||
// that.voiceManager.onError = function(res) {
|
||||
// console.error("error msg", res.retcode)
|
||||
// }
|
||||
// that.voiceManager.stop()
|
||||
},
|
||||
onReachBottom() {
|
||||
let that = this
|
||||
if (!this.lastPage || this.page >= this.lastPage) {
|
||||
uni.showToast({
|
||||
title: '没有更多数据!',
|
||||
title: this.$t('noMoreData'),
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
|
|
@ -389,7 +394,7 @@
|
|||
that.IsWeight = true
|
||||
that.showAutoSearchDlg = false
|
||||
that.activeType = ite
|
||||
that.weightKcal = ite.kcal
|
||||
that.weightKcal = Number(ite.kcal)
|
||||
if (that.bleValue.serviceId != "") {
|
||||
that.realTimeWeight(that.bleValue.countWeight, that.bleValue.unit)
|
||||
} else {
|
||||
|
|
@ -471,7 +476,7 @@
|
|||
let that = this
|
||||
that.search_list = []
|
||||
if (that.search_value == "") {
|
||||
that.$tools.msg("输入关键字后搜索")
|
||||
that.$tools.msg(this.$t('searchkeywords'))
|
||||
return
|
||||
}
|
||||
that.$model.getFoodSearch({
|
||||
|
|
@ -509,7 +514,7 @@
|
|||
handledelactive(ite) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
content: `是否删除[${ite.name}]?`,
|
||||
content: this.$t('WhetherTodelete') + ite.name,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.$model.delCEatAction({
|
||||
|
|
@ -1140,18 +1145,24 @@
|
|||
border-radius: 10px;
|
||||
height: 340rpx;
|
||||
|
||||
|
||||
.chart-wrap {
|
||||
margin-top: -15px;
|
||||
position: relative;
|
||||
width: 280rpx;
|
||||
height: 280rpx;
|
||||
margin-left: -5px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.center {
|
||||
border: none;
|
||||
width: 280rpx;
|
||||
height: 210rpx;
|
||||
position: absolute;
|
||||
top: 44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.center {
|
||||
height: 270rpx;
|
||||
top: 80rpx;
|
||||
}
|
||||
|
||||
.mubiao {
|
||||
margin-top: 10px
|
||||
}
|
||||
}
|
||||
|
||||
.box_list {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
<!-- -->
|
||||
<view class="kcal">
|
||||
<view class="set">
|
||||
<input type="digit" v-model="weight" placeholder="请输入" :focus="focus" @blur="handleBlur">
|
||||
<input type="digit" v-model="weight" :placeholder="$t('verifyRecord')" :focus="focus"
|
||||
@blur="handleBlur">
|
||||
<uni-icons v-if="weight!=''" type="close" size="24" class="uni-iocns" color="#999"
|
||||
@click="handleclear"></uni-icons>
|
||||
<view class="num">
|
||||
|
|
@ -17,7 +18,7 @@
|
|||
<!-- -->
|
||||
<view class="kcal">
|
||||
<view class="text">
|
||||
营养占比
|
||||
{{$t('countNutritionalProportion')}}
|
||||
</view>
|
||||
<view class="slider">
|
||||
<llt-slider-range :model-value="rangeValue" @change="handleChange" />
|
||||
|
|
@ -36,7 +37,7 @@
|
|||
<text>{{ite}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="subbtn" @click="handleEditKcal">保存</view>
|
||||
<view class="subbtn" @click="handleEditKcal">{{$t('btnSubmit')}}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -69,6 +70,9 @@
|
|||
},
|
||||
onLoad() {
|
||||
this.handleList()
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('titleSet')
|
||||
})
|
||||
},
|
||||
components: {
|
||||
lltSliderRange
|
||||
|
|
@ -85,7 +89,8 @@
|
|||
that.nutrition = res.data.nutrition
|
||||
that.weight = res.data.kcal.suggestion_kcal_val
|
||||
that.rangeValue[0] = Number(that.nutrition.list[0].proportion)
|
||||
that.rangeValue[1] = Number(that.nutrition.list[0].proportion) + Number(that.nutrition.list[1].proportion)
|
||||
that.rangeValue[1] = Number(that.nutrition.list[0].proportion) + Number(that.nutrition
|
||||
.list[1].proportion)
|
||||
console.log("that.rangeValue", that.rangeValue)
|
||||
that.handleProportion()
|
||||
}
|
||||
|
|
@ -105,20 +110,20 @@
|
|||
handleProportion() {
|
||||
let that = this
|
||||
that.nutrition.list.forEach(ite => {
|
||||
if (ite.name.indexOf('碳水') != -1) {
|
||||
if (ite.key_v == "carbohydrate") {
|
||||
ite.proportion = that.rangeValue[0]
|
||||
ite.val = Number(that.weight * ite.proportion / 100 / 4).toFixed(2)
|
||||
that.carbohydrate_v = ite.val
|
||||
that.carbohydrate_p = ite.proportion
|
||||
}
|
||||
if (ite.name.indexOf('蛋白') != -1) {
|
||||
if (ite.key_v == "protein") {
|
||||
ite.proportion = that.rangeValue[1] - that.rangeValue[0]
|
||||
ite.val = Number(that.weight * ite.proportion / 100 / 4).toFixed(2)
|
||||
that.protein_v = ite.val
|
||||
that.protein_p = ite.proportion
|
||||
|
||||
}
|
||||
if (ite.name.indexOf('脂肪') != -1) {
|
||||
if (ite.key_v == "fat") {
|
||||
ite.proportion = 100 - that.rangeValue[1]
|
||||
ite.val = Number(that.weight * ite.proportion / 100 / 9).toFixed(2)
|
||||
that.fat_v = ite.val
|
||||
|
|
@ -134,7 +139,7 @@
|
|||
handleEditKcal() {
|
||||
let that = this
|
||||
if (that.weight == '' || Number(that.weight) <= 0) {
|
||||
that.$tools.msg("请输入卡路里")
|
||||
that.$tools.msg(that.$t('verifyCalorie'))
|
||||
return
|
||||
}
|
||||
that.$model.getCountSetUserKcal({
|
||||
|
|
@ -148,7 +153,7 @@
|
|||
fat_p: that.fat_p,
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
that.$tools.msg("设置成功")
|
||||
that.$tools.msg(that.$t('msgSetSuccess'))
|
||||
that.$store.dispatch("getUserInfo")
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
|
|
|
|||
|
|
@ -4,28 +4,28 @@
|
|||
<view class="login">
|
||||
<view class="editem">
|
||||
<view class="item">
|
||||
<view class="text">手机号/邮箱</view>
|
||||
<view class="text">{{$t("infoMobile")}}</view>
|
||||
<view class="input">
|
||||
<input v-model="phone" type="text"/>
|
||||
<input v-model="phone" type="text" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item ">
|
||||
<view class="text">验证码</view>
|
||||
<view class="text">{{$t("titleCode")}}</view>
|
||||
<view class="input yanzhengma">
|
||||
<input class="uni-input" v-model="code" />
|
||||
<button class="code" type="none" @click="handleCode" v-model="code"
|
||||
:disabled="disabled">{{second<60 ? second+'S后重发':'获取验证码'}}
|
||||
:disabled="disabled">{{second<60 ? second+$t("titleSendCodeRetry"):$t("titleSendCode")}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="text">密码</view>
|
||||
<view class="text">{{$t("titlePassword")}}</view>
|
||||
<view class="input">
|
||||
<input class="uni-input" v-model="password" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="text">确认密码</view>
|
||||
<view class="text">{{$t("titleConfirmPassword")}}</view>
|
||||
<view class="input">
|
||||
<input class="uni-input" v-model="password2" />
|
||||
</view>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
</label>
|
||||
</checkbox-group>
|
||||
</view> -->
|
||||
<view class="btnlogin" @click="handleTelLogin">确认</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">{{$t("titleRegister")}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -59,6 +59,10 @@
|
|||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleLogin')
|
||||
})
|
||||
this.type = options.type //1
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -70,31 +74,31 @@
|
|||
let that = this
|
||||
let phoneType = that.phone.indexOf("@") !== -1
|
||||
if (that.value == 0) {
|
||||
that.$tools.msg("请先确认勾选协议")
|
||||
that.$tools.msg(that.$t("verifyAgreement"))
|
||||
return
|
||||
}
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
that.$tools.msg(that.$t("verifyMobileCorrect"))
|
||||
return
|
||||
}
|
||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
if (!that.code) {
|
||||
that.$tools.msg("请填写验证码")
|
||||
that.$tools.msg(that.$t("verifyCode"))
|
||||
return
|
||||
}
|
||||
if (!that.password) {
|
||||
that.$tools.msg("请填写密码")
|
||||
that.$tools.msg(that.$t("verifyPassword"))
|
||||
return
|
||||
}
|
||||
if (!that.password2) {
|
||||
that.$tools.msg("请确认密码")
|
||||
that.$tools.msg(that.$t("verifyPassword"))
|
||||
return
|
||||
}
|
||||
if (that.password2 != that.password) {
|
||||
that.$tools.msg("请确认两次密码填写一致")
|
||||
that.$tools.msg(that.$t("verifyPasswordCorrect"))
|
||||
return
|
||||
}
|
||||
let account = {
|
||||
|
|
@ -113,7 +117,8 @@
|
|||
}
|
||||
uni.setStorageSync('token', res.data.token)
|
||||
uni.setStorageSync('aan_id', res.data.aan_id)
|
||||
that.$tools.msg("设置成功,进入程序中")
|
||||
that.$store.dispatch("getUserInfo")
|
||||
that.$tools.msg(that.$t("msgSetPasswordSuccess"))
|
||||
setTimeout(function() {
|
||||
uni.reLaunch({
|
||||
url: "/pages/index/index"
|
||||
|
|
@ -126,11 +131,11 @@
|
|||
let that = this
|
||||
let phoneType = that.phone.indexOf("@") !== -1
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
that.$tools.msg(that.$t("verifyMobileCorrect"))
|
||||
return
|
||||
}
|
||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
//
|
||||
|
|
@ -194,7 +199,7 @@
|
|||
.title {
|
||||
text-align: left;
|
||||
color: #333;
|
||||
font-size: 40rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
|
@ -242,13 +247,13 @@
|
|||
left: 20rpx;
|
||||
right: 0px;
|
||||
z-index: 88;
|
||||
font-size:28rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.yanzhengma {
|
||||
input {
|
||||
right: 220rpx;
|
||||
font-size:28rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,54 +6,56 @@
|
|||
<text>轻厨记</text>
|
||||
</view>
|
||||
<view class="login box_shadow">
|
||||
<view class="title">登录</view>
|
||||
<view class="title">{{$t("titleLogin")}}</view>
|
||||
<view class="toggle cblue" @click="handleToggle">
|
||||
切换登录
|
||||
{{$t("titleToggleLogin")}}
|
||||
</view>
|
||||
<view class="editem">
|
||||
<view class="item">
|
||||
<view class="text">手机号/邮箱</view>
|
||||
<view class="text">{{$t("titleAccountText")}}</view>
|
||||
<view class="input">
|
||||
<input v-model="phone" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 验证码登录 -->
|
||||
<view class="item " v-if="isCode">
|
||||
<view class="text">验证码</view>
|
||||
<view class="text">{{$t("titleCode")}}</view>
|
||||
<view class="input yanzhengma">
|
||||
<input class="uni-input" v-model="code" />
|
||||
<button class="code" type="none" @click="handleCode" v-model="code"
|
||||
:disabled="disabled">{{second<60 ? second+'S后重发':'获取验证码'}}
|
||||
:disabled="disabled">{{second<60 ? second+$t("titleSendCodeRetry"):$t("titleSendCode")}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 密码登录 -->
|
||||
<view class="item " v-else>
|
||||
<view class="text">密码</view>
|
||||
<view class="text">{{$t("titlePassword")}}</view>
|
||||
<view class="input">
|
||||
<input class="uni-input" v-model="password" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="forget " v-if="!isCode">
|
||||
<text @click="handlePassword('forgetPassword')">忘记密码?</text>
|
||||
<text @click="handlePassword('forgetPassword')">{{$t("titleForgotPassword")}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="xieyi">
|
||||
<checkbox-group @change="checkboxChange" class="group">
|
||||
<label>
|
||||
<checkbox :value="1" style="transform:scale(0.7)" />阅读并同意
|
||||
<checkbox :value="1" style="transform:scale(0.7)" />{{$t("titleAgreementText")}}
|
||||
<!-- <text @click.stop @click="handleUserXieyi" class="blue">《用户协议》</text>和 -->
|
||||
<text @click.stop @click="handlexieyi" class="blue">《隐私协议》</text>
|
||||
<text @click.stop @click="handlexieyi" class="blue">《{{$t("titleAgreementContntText")}}》</text>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">登录</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">{{$t("titleLogin")}}</view>
|
||||
<view class="btngroup" @click="handlePassword('register')">
|
||||
<text>注册</text>
|
||||
<text>{{$t("titleRegister")}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wxbtn">
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- <view class="wxbtn">
|
||||
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="value==1">
|
||||
<view>
|
||||
<image src="../../static/phone.png"></image>
|
||||
|
|
@ -66,7 +68,8 @@
|
|||
</view>
|
||||
<text>手机号快捷登录</text>
|
||||
</button>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -85,6 +88,10 @@
|
|||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleLogin')
|
||||
})
|
||||
this.login()
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -96,23 +103,23 @@
|
|||
let that = this
|
||||
let phoneType = that.phone.indexOf("@") !== -1
|
||||
if (that.value == 0) {
|
||||
that.$tools.msg("请先确认勾选协议")
|
||||
that.$tools.msg(that.$t("verifyAgreement"))
|
||||
return
|
||||
}
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
that.$tools.msg(that.$t("verifyMobileCorrect"))
|
||||
return
|
||||
}
|
||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
if (that.isCode && !that.code) {
|
||||
that.$tools.msg("请输入验证码")
|
||||
that.$tools.msg(that.$t("verifyCode"))
|
||||
return
|
||||
}
|
||||
if (!that.isCode && !that.password) {
|
||||
that.$tools.msg('请输入正确密码')
|
||||
that.$tools.msg(that.$t("verifyPassword"))
|
||||
return
|
||||
}
|
||||
this.$model.getonlogin({
|
||||
|
|
@ -123,8 +130,9 @@
|
|||
console.log("data", res.data)
|
||||
that.$tools.msg(res.msg)
|
||||
if (res.code != 0) return
|
||||
that.$tools.msg("登录成功")
|
||||
that.$tools.msg(that.$t("msgLoginSuccess"))
|
||||
uni.setStorageSync('token', res.data.token)
|
||||
that.$store.dispatch("getHomeConfig")
|
||||
setTimeout(function() {
|
||||
uni.reLaunch({
|
||||
url: "/pages/index/index"
|
||||
|
|
@ -137,11 +145,11 @@
|
|||
let that = this
|
||||
let phoneType = that.phone.indexOf("@") !== -1
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
that.$tools.msg(that.$t("verifyMobileCorrect"))
|
||||
return
|
||||
}
|
||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
//
|
||||
|
|
@ -190,6 +198,7 @@
|
|||
if (res.code != 0) return
|
||||
that.value = 1
|
||||
uni.setStorageSync('token', res.data.token)
|
||||
that.$store.dispatch("getHomeConfig")
|
||||
setTimeout(function() {
|
||||
uni.reLaunch({
|
||||
url: "/pages/index/index"
|
||||
|
|
@ -200,7 +209,7 @@
|
|||
},
|
||||
handleIsTel() {
|
||||
if (this.value == 0) {
|
||||
this.$tools.msg("请先确认勾选协议")
|
||||
this.$tools.msg(that.$t("verifyAgreement"))
|
||||
return
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -51,10 +51,6 @@
|
|||
onLoad(option) {
|
||||
let that = this
|
||||
that.type = option.pageName
|
||||
uni.setNavigationBarTitle({
|
||||
title: option.pageName
|
||||
});
|
||||
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
|
|
|
|||
|
|
@ -3,20 +3,25 @@
|
|||
<!-- 列表 -->
|
||||
<view class="box">
|
||||
<view class="list" v-for="(item,ind) in infoList" :key="ind" @click="handleDetail(item)">
|
||||
<view class="time">{{item.time}}</view>
|
||||
<view class="time">
|
||||
<view class="date size14">{{item.time}}</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<view class="kcal">
|
||||
<view>摄入卡路里<text>{{item.val}}</text>{{item.unit}}</view>
|
||||
<view class="intake">
|
||||
{{$t('countIntake')}}{{$t('kcal')}}
|
||||
<text>{{item.val}}</text>{{item.unit}}
|
||||
</view>
|
||||
<view class="status">
|
||||
<text class="quan0" :style="'background:'+item.color"></text>
|
||||
{{item.describe}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="endtext" v-if="!lastPage || page >= lastPage">—— 到底了,看看别的吧 ——</view>
|
||||
<view class="endtext" v-if="!lastPage || page >= lastPage">—— {{$t('msgBottom')}} ——</view>
|
||||
<view v-if="!infoList.length" class="nolist">
|
||||
<icon class="iconfont icon-wancan"></icon>
|
||||
<text>还没有记录哦</text>
|
||||
<text>{{$t('msgNoMoreData')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -46,6 +51,9 @@
|
|||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleHistory')
|
||||
})
|
||||
that.page = 1
|
||||
that.handleList()
|
||||
},
|
||||
|
|
@ -53,7 +61,7 @@
|
|||
let that = this
|
||||
if (!this.lastPage || this.page >= this.lastPage) {
|
||||
uni.showToast({
|
||||
title: '没有更多数据!',
|
||||
title: that.$t('noMoreData'),
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
|
|
@ -124,6 +132,18 @@
|
|||
width: 100%;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.quan0 {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
background: $uni-color-warning;
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.kcal {
|
||||
|
|
@ -138,17 +158,8 @@
|
|||
color: #000;
|
||||
}
|
||||
|
||||
.status {
|
||||
width: 85px;
|
||||
}
|
||||
|
||||
.quan0 {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
background: $uni-color-warning;
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
.intake {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@
|
|||
mapState
|
||||
} from "vuex";
|
||||
let next = 0
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -10,28 +10,31 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom">
|
||||
<view class="left">昵称</view>
|
||||
<view class="left">{{$t('infoNickname')}}</view>
|
||||
<view class="right">
|
||||
<input name="name" type="text" v-model="memInfo.nickname" placeholder="请输入" class="name" />
|
||||
<input name="name" type="text" v-model="memInfo.nickname" :placeholder="$t('verifyRecord')"
|
||||
class="name" />
|
||||
<icon class="iconfont icon-bianji" v-if="!memInfo.nickname"></icon>
|
||||
<icon class="iconfont icon-error" v-else @click="memInfo.nickname=''"></icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom">
|
||||
<view class="left">性别</view>
|
||||
<view class="left">{{$t('infoGender')}}</view>
|
||||
<view class="right">
|
||||
<picker mode="selector" :range="sexItem" @change="onsexArr">
|
||||
<view class="uni-input">{{memInfo.gender==0?'请选择':memInfo.gender==1?'男':'女'}}</view>
|
||||
<view class="uni-input">
|
||||
{{memInfo.gender==0?$t('verifyPicker'):memInfo.gender==1? $t('infoMan'):$t('infoWoman')}}
|
||||
</view>
|
||||
<icon class="iconfont icon-arrow-down"></icon>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom">
|
||||
<view class="left">出生日期</view>
|
||||
<view class="left">{{$t('infoBirthday')}}</view>
|
||||
<view class="right">
|
||||
<picker mode="date" :end="endDate" @change="maskClick"
|
||||
:value="memInfo.birthday?memInfo.birthday:endDate">
|
||||
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:"请选择"}}</view>
|
||||
:value="memInfo.birthday?memInfo.birthday:endDate" fields="day">
|
||||
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:$t('verifyPicker')}}</view>
|
||||
<icon class="iconfont icon-arrow-down"></icon>
|
||||
</picker>
|
||||
</view>
|
||||
|
|
@ -46,23 +49,24 @@
|
|||
</view>
|
||||
</view> -->
|
||||
<view class="lan border-bottom">
|
||||
<view class="left">身高</view>
|
||||
<view class="left">{{$t('infoHeight')}}</view>
|
||||
<view class="right">
|
||||
<input type="digit" v-model="memInfo.height" placeholder="请输入" />
|
||||
<input type="digit" v-model="memInfo.height" :placeholder="$t('verifyRecord')" />
|
||||
<text>cm</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom">
|
||||
<view class="left">体重</view>
|
||||
<view class="left">{{$t('infoWeight')}}</view>
|
||||
<view class="right">
|
||||
<input type="digit" v-model="memInfo.weight" placeholder="请输入" />
|
||||
<input type="digit" v-model="memInfo.weight" :placeholder="$t('verifyRecord')" />
|
||||
<text>kg</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom">
|
||||
<view class="left">活动系数</view>
|
||||
<view class="left">{{$t('infoActivityCoefficient')}}</view>
|
||||
<view class="right">
|
||||
<picker mode="selector" @change="changeClickType" :range="activityLevel" range-key="name" :value="levelInd">
|
||||
<picker mode="selector" @change="changeClickType" :range="activityLevel" range-key="name"
|
||||
:value="levelInd">
|
||||
<view>
|
||||
{{activityLevel[levelInd].name}}
|
||||
<icon class="iconfont icon-arrow-down"></icon>
|
||||
|
|
@ -72,7 +76,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn" @click="confirmInfo">提交</view>
|
||||
<view class="btn" @click="confirmInfo">{{$t('btnSubmit')}}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -110,6 +114,10 @@
|
|||
},
|
||||
onLoad(options) {
|
||||
// 编辑
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('infoPersonalProfile')
|
||||
})
|
||||
if (options.familayData) {
|
||||
let info = options.familayData
|
||||
this.memInfo = JSON.parse(info)
|
||||
|
|
@ -130,27 +138,27 @@
|
|||
let that = this
|
||||
console.log("activity_level", this.memInfo)
|
||||
if (!this.memInfo.nickname) {
|
||||
this.$tools.msg("请输入昵称")
|
||||
this.$tools.msg(that.$t('verifyNickName'))
|
||||
return;
|
||||
}
|
||||
if (!this.memInfo.gender) {
|
||||
this.$tools.msg("请选择性别")
|
||||
this.$tools.msg(that.$t('verifyGender'))
|
||||
return;
|
||||
}
|
||||
if (!this.memInfo.birthday) {
|
||||
this.$tools.msg("请选择出生日期")
|
||||
this.$tools.msg(that.$t('verifyBirthday'))
|
||||
return;
|
||||
}
|
||||
if (!this.memInfo.height) {
|
||||
this.$tools.msg("请输入身高")
|
||||
this.$tools.msg(that.$t('verifyHeight'))
|
||||
return;
|
||||
}
|
||||
if (!this.memInfo.weight) {
|
||||
this.$tools.msg("请输入体重")
|
||||
this.$tools.msg(that.$t('verifyWeight'))
|
||||
return;
|
||||
}
|
||||
if (!this.memInfo.activity_level) {
|
||||
this.$tools.msg("请选择活动系数")
|
||||
this.$tools.msg(that.$t('verifyActivityCoefficient'))
|
||||
return;
|
||||
}
|
||||
that.subInfo(this.memInfo)
|
||||
|
|
@ -159,7 +167,6 @@
|
|||
let that = this
|
||||
that.$model.getUserInfoEdit(data).then(res => {
|
||||
if (res.code == 0) {
|
||||
that.$tools.msg("提交成功");
|
||||
that.handleHomeUserInfo()
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
|
|
@ -179,7 +186,6 @@
|
|||
},
|
||||
//确定年龄
|
||||
maskClick(e) {
|
||||
console.log("出生日期", e.detail.value)
|
||||
this.memInfo.birthday = e.detail.value
|
||||
},
|
||||
//确定性别
|
||||
|
|
@ -235,6 +241,7 @@
|
|||
.left {
|
||||
width: 24%;
|
||||
text-align: left;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,22 +3,22 @@
|
|||
<view class="login">
|
||||
<view class="editem">
|
||||
<view class="item">
|
||||
<view class="text">邮箱</view>
|
||||
<view class="text">{{$t("infoEmail")}}</view>
|
||||
<view class="input">
|
||||
<input v-model="phone" placeholder="请输入邮箱"/>
|
||||
<input v-model="phone" :placeholder="$t('verifyEmail')" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item ">
|
||||
<view class="text">验证码</view>
|
||||
<view class="text">{{$t("titleCode")}}</view>
|
||||
<view class="input yanzhengma">
|
||||
<input class="uni-input" v-model="code" />
|
||||
<button class="code" type="none" @click="handleCode" v-model="code"
|
||||
:disabled="disabled">{{second<60 ? second+'S后重发':'获取验证码'}}
|
||||
:disabled="disabled">{{second<60 ? second+$t("titleSendCodeRetry"):$t("titleSendCode")}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">确认</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">{{$t("btnConfirm")}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -33,16 +33,22 @@
|
|||
second: 60,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleEmail')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 登录、
|
||||
handleTelLogin() {
|
||||
let that = this
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
if (!that.code) {
|
||||
that.$tools.msg("请填写验证码")
|
||||
that.$tools.msg(that.$t("verifyCode"))
|
||||
return
|
||||
}
|
||||
that.$model.getAccountMsg({
|
||||
|
|
@ -53,7 +59,7 @@
|
|||
that.$tools.msg(res.msg)
|
||||
return
|
||||
} else {
|
||||
that.$tools.msg("设置成功!")
|
||||
that.$tools.msg(that.$t("msgSetSuccess"))
|
||||
that.$store.commit('changeAccountNumber', {
|
||||
my_email: that.phone
|
||||
})
|
||||
|
|
@ -69,11 +75,11 @@
|
|||
handleCode() {
|
||||
let that = this
|
||||
if (!that.phone) {
|
||||
that.$tools.msg("请输入邮箱")
|
||||
that.$tools.msg(that.$t("verifyEmail"))
|
||||
return
|
||||
}
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
//
|
||||
|
|
@ -114,7 +120,7 @@
|
|||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
|
||||
|
||||
z-index: 99;
|
||||
|
||||
.title {
|
||||
|
|
@ -180,7 +186,7 @@
|
|||
}
|
||||
|
||||
.code {
|
||||
width: 120rpx;
|
||||
width: auto;
|
||||
background: #dfdfdf;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -3,19 +3,19 @@
|
|||
<view class="login">
|
||||
<view class="editem">
|
||||
<view class="item">
|
||||
<view class="text">密码</view>
|
||||
<view class="text">{{$t('titlePassword')}}</view>
|
||||
<view class="input">
|
||||
<input class="uni-input" v-model="password" placeholder="请输入密码" />
|
||||
<input class="uni-input" v-model="password" :placeholder="$t('verifyPassword')" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="text">确认密码</view>
|
||||
<view class="text">{{$t('titleConfirmPassword')}}</view>
|
||||
<view class="input">
|
||||
<input class="uni-input" v-model="password2" placeholder="请输入确认密码" />
|
||||
<input class="uni-input" v-model="password2" :placeholder="$t('verifyPasswordTwo')" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">确认</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">{{$t('btnSubmit')}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -28,21 +28,26 @@
|
|||
password2: "",
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titlePasswordEdit')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 登录、
|
||||
handleTelLogin() {
|
||||
let that = this
|
||||
if (!that.password) {
|
||||
that.$tools.msg("请填写密码")
|
||||
that.$tools.msg(that.$t('verifyPassword'))
|
||||
return
|
||||
}
|
||||
if (!that.password2) {
|
||||
that.$tools.msg("请确认密码")
|
||||
that.$tools.msg(that.$t('verifyPasswordTwo'))
|
||||
return
|
||||
}
|
||||
if (that.password2 != that.password) {
|
||||
that.$tools.msg("请确认两次密码填写一致")
|
||||
that.$tools.msg(that.$t('verifyPasswordCorrect'))
|
||||
return
|
||||
}
|
||||
that.$model.getAccountPassword({
|
||||
|
|
@ -53,7 +58,7 @@
|
|||
if (res.code != 0) {
|
||||
that.$tools.msg(res.msg)
|
||||
} else {
|
||||
that.$tools.msg("密码设置成功")
|
||||
that.$tools.msg(that.$t('msgSetSuccess'))
|
||||
setTimeout(function() {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
|
|
|
|||
|
|
@ -3,22 +3,22 @@
|
|||
<view class="login">
|
||||
<view class="editem">
|
||||
<view class="item">
|
||||
<view class="text">手机号</view>
|
||||
<view class="text">{{$t('infoMobile')}}</view>
|
||||
<view class="input">
|
||||
<input v-model="phone" placeholder="请输入手机号" />
|
||||
<input v-model="phone" :placeholder="$t('verifyMobile')" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item ">
|
||||
<view class="text">验证码</view>
|
||||
<view class="text">{{$t('titleCode')}}</view>
|
||||
<view class="input yanzhengma">
|
||||
<input class="uni-input" v-model="code" />
|
||||
<button class="code" type="none" @click="handleCode" v-model="code"
|
||||
:disabled="disabled">{{second<60 ? second+'S后重发':'获取验证码'}}
|
||||
:disabled="disabled">{{second<60 ? second+$t('titleSendCodeRetry'):$t('titleSendCode')}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">确认</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">{{$t('btnSubmit')}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -33,16 +33,22 @@
|
|||
second: 60,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titlePhone')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 登录、
|
||||
handleTelLogin() {
|
||||
let that = this
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t('verifyMobileCorrect'))
|
||||
return
|
||||
}
|
||||
if (!that.code) {
|
||||
that.$tools.msg("请填写验证码")
|
||||
that.$tools.msg(that.$t('verifyCode'))
|
||||
return
|
||||
}
|
||||
that.$model.getAccountMsg({
|
||||
|
|
@ -53,7 +59,7 @@
|
|||
that.$tools.msg(res.msg)
|
||||
return
|
||||
} else {
|
||||
that.$tools.msg("设置成功!")
|
||||
that.$tools.msg(that.$t('msgSetSuccess'))
|
||||
that.$store.commit('changeAccountNumber', {
|
||||
my_tel: that.phone
|
||||
})
|
||||
|
|
@ -69,11 +75,11 @@
|
|||
handleCode() {
|
||||
let that = this
|
||||
if (!that.phone) {
|
||||
that.$tools.msg("请输入手机号")
|
||||
that.$tools.msg(that.$t('verifyMobile'))
|
||||
return
|
||||
}
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
that.$tools.msg(that.$t('verifyMobileCorrect'))
|
||||
return
|
||||
}
|
||||
//
|
||||
|
|
@ -179,7 +185,7 @@
|
|||
}
|
||||
|
||||
.code {
|
||||
width: 120rpx;
|
||||
width: auto;
|
||||
background: #dfdfdf;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="caritem" @click="navTo('/pageTwo/setting/phone')">
|
||||
<view class="text">手机号</view>
|
||||
<view class="text">{{$t('infoMobile')}}</view>
|
||||
<view class="text_r">
|
||||
<text>{{userinfo.tel?userinfo.tel:''}}</text>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="caritem" @click="navTo('/pageTwo/setting/email')">
|
||||
<view class="text">邮箱</view>
|
||||
<view class="text">{{$t('infoEmail')}}</view>
|
||||
<view class="text_r">
|
||||
<text>{{userinfo.email}}</text>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="caritem" @click="navTo('/pageTwo/setting/password')">
|
||||
<view class="text">设置密码</view>
|
||||
<view class="text">{{$t('titleSetPassword')}}</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<!-- <view class="btn mb-15" @click="handleOutLogin">删除账号</view> -->
|
||||
|
|
@ -40,18 +40,24 @@
|
|||
return this.user
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleSet')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleOutLogin() {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
confirmText: '删除',
|
||||
content: '删除成功后,该账号的所有关联信息将被清空且无法找回,是否删除?',
|
||||
title: that.$t('msgTitle'),
|
||||
confirmText: that.$t('btnDelete'),
|
||||
content: that.$t('verifyDeleteAccount'),
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getdeleteAccount({}).then((res) => {
|
||||
if (res.code != 0) return
|
||||
that.$tools.msg("删除成功!");
|
||||
that.$tools.msg(that.$t('msgDelete'));
|
||||
uni.setStorageSync('token', null)
|
||||
uni.setStorageSync('aan_id', null)
|
||||
uni.clearStorageSync()
|
||||
|
|
@ -62,7 +68,7 @@
|
|||
}, 3000);
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
that.$tools.msg("您已取消操作!");
|
||||
that.$tools.msg(that.$t('msgCancel'));
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
|
|||
18
pages.json
|
|
@ -206,6 +206,12 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "营养分析"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "me/about",
|
||||
"style": {
|
||||
"navigationBarTitleText": "关于我们"
|
||||
}
|
||||
}
|
||||
]
|
||||
}],
|
||||
|
|
@ -225,18 +231,6 @@
|
|||
"selectedIconPath": "static/home01.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/search/search",
|
||||
"iconPath": "static/cai.png",
|
||||
"selectedIconPath": "static/cai01.png",
|
||||
"text": "教你做"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/add/add",
|
||||
"iconPath": "static/add.png",
|
||||
"selectedIconPath": "static/add.png",
|
||||
"text": ""
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/count/count",
|
||||
"iconPath": "static/ji.png",
|
||||
|
|
|
|||
|
|
@ -3,23 +3,23 @@
|
|||
<view v-if="!token" class="list2" @click="handleLogin()">
|
||||
<view class="nolist">
|
||||
<icon class="iconfont icon-zanwushuju"></icon>
|
||||
<text>登录后查看更多哦!</text>
|
||||
<text>{{$t('msgLoginTips')}}!</text>
|
||||
</view>
|
||||
<view class="btn">登录</view>
|
||||
<view class="btn">{{$t('titleLogin')}}</view>
|
||||
</view>
|
||||
<view v-else class="content_box">
|
||||
<!-- 称重 -->
|
||||
<view class="blue-tooth">
|
||||
<blue-tooth :btnType="'1'"></blue-tooth>
|
||||
<blue-tooth :btnType="btnType"></blue-tooth>
|
||||
</view>
|
||||
<!-- 每日摄入 -->
|
||||
<view class="box" v-if="user.aud_id!=''">
|
||||
<!-- 日期选择 -->
|
||||
<view class="data">
|
||||
<picker mode="date" :end="endDate" @change="changeClickDate"
|
||||
:value="foodInfo.date?foodInfo.date:endDate">
|
||||
:value="foodInfo.date?foodInfo.date:endDate" fields="day">
|
||||
<view>
|
||||
{{foodInfo.date?foodInfo.date:"请选择"}}
|
||||
{{foodInfo.date?foodInfo.date:$t('verifyPicker')}}
|
||||
<image src="/static/qie.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
<!-- 能量摄入 -->
|
||||
<view class="everyDay">
|
||||
<view class="title">
|
||||
<view>热量摄入</view>
|
||||
<view>{{$t('countCalorieIntake')}}</view>
|
||||
<view class="icon" @click="handleSet">
|
||||
<icon class="iconfont icon-shezhi1"></icon>
|
||||
</view>
|
||||
|
|
@ -35,16 +35,15 @@
|
|||
<view class="jishiqi">
|
||||
<view class="left">
|
||||
<view class="chart-wrap">
|
||||
<qiun-data-charts type="arcbar" :chartData="chartData" :cHeight="280" :cWidth="280"
|
||||
:canvas2d="true" canvasId="countCharts" v-if="handTrue" />
|
||||
<qiun-data-charts type="arcbar" :chartData="chartData" :cHeight="320" :cWidth="320" />
|
||||
<view class="center">
|
||||
摄入
|
||||
{{$t('countIntake')}}
|
||||
<text>{{foodInfo.nutrients_four[0].today_intake}}</text>
|
||||
<view class="unit">Kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mubiao">
|
||||
目标:<text>{{foodInfo.nutrients_four[0].suggestion}}</text>kcal
|
||||
{{$t('titleBody')}}:<text>{{foodInfo.nutrients_four[0].suggestion}}</text>kcal
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
|
|
@ -79,7 +78,7 @@
|
|||
<text>{{item.val}}{{item.unit}}</text>
|
||||
</view>
|
||||
<view class="detail">
|
||||
餐食详情
|
||||
{{$t('countMealdetails')}}
|
||||
<uni-icons type="forward" size="20" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -96,8 +95,8 @@
|
|||
</view>
|
||||
</uni-swipe-action-item>
|
||||
</uni-swipe-action>
|
||||
<view class="add" @click="handleAddFood(item.name)">
|
||||
<text>+</text>添加食物
|
||||
<view class="add" @click="handleAddFood(index)">
|
||||
<text>+</text>{{$t('countAddFood')}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -106,29 +105,29 @@
|
|||
<view v-else class="list2" @click="handleEditUser()">
|
||||
<view class="nolist">
|
||||
<image src="/static/none.png"></image>
|
||||
<text>完善资料后,记录更准确哦!</text>
|
||||
<text>{{$t('msgAddUser')}}</text>
|
||||
</view>
|
||||
<view class="btn">完善资料</view>
|
||||
<view class="btn">{{$t('ImproveInformation')}}</view>
|
||||
</view>
|
||||
<view class="fenxi" @click="navTo('/pageTwo/count/everyDay?page=count')">
|
||||
<image src="/static/fenxi.png"></image>
|
||||
营养分析
|
||||
{{$t('titleeveryDay')}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 营养含量分析 -->
|
||||
<uni-drawer ref="showRight" mode="right" width="300">
|
||||
<uni-drawer ref="showRight" mode="right">
|
||||
<scroll-view style="height: 100%;" scroll-y="true">
|
||||
<view class="foodDetail">
|
||||
<view class="foodInfo">
|
||||
<image :src="activeFoodDetail.pic_url" mode="aspectFill"></image>
|
||||
<view class="info">
|
||||
<view class="name">{{activeFoodDetail.name}}</view>
|
||||
<view class="kcal">{{activeFoodDetail.val}}千卡</view>
|
||||
<view class="kcal">{{activeFoodDetail.val}}kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="foodContent">
|
||||
<view class="title">热量和营养</view>
|
||||
<view class="title">{{$t('CaloriesAndnutrients')}}</view>
|
||||
<view class="progress">
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts type="ring" :opts="opts" :chartData="chartData2" :cHeight="280"
|
||||
|
|
@ -144,8 +143,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<text>营养素</text>
|
||||
<text>{{activeFoodDetail.weight}}含量</text>
|
||||
<text>{{$t('Nutrients')}}</text>
|
||||
<text>{{activeFoodDetail.weight}}{{$t('Content')}}</text>
|
||||
</view>
|
||||
<view class="foodDetailList">
|
||||
<view class="foodDetailItem" v-for="(item,index) in activeFoodDetail.nutrients_list"
|
||||
|
|
@ -167,12 +166,13 @@
|
|||
mapState
|
||||
} from "vuex";
|
||||
import blueTooth from "../../components/bluetooth_food.vue"
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
token: "",
|
||||
index: 0,
|
||||
btnType: 1,
|
||||
opts: {
|
||||
background: "transparent",
|
||||
title: {
|
||||
|
|
@ -190,7 +190,7 @@
|
|||
chartData2: {},
|
||||
activeFoodDetail: {},
|
||||
actionOptions: [{
|
||||
text: '删除',
|
||||
text: this.$t('btnDelete'),
|
||||
style: {
|
||||
backgroundColor: '#dd524d',
|
||||
borderRadius: '10rpx'
|
||||
|
|
@ -217,6 +217,11 @@
|
|||
return this.$tools.getDate("start")
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('titleCount')
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
that.token = uni.getStorageSync('token')
|
||||
|
|
@ -279,10 +284,10 @@
|
|||
})
|
||||
},
|
||||
// 添加食物
|
||||
handleAddFood(name) {
|
||||
handleAddFood(index) {
|
||||
this.isShow = false
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/count/search?name=" + name + "&time=" + this.foodInfo.date
|
||||
url: "/pageTwo/count/search?index=" + index + "&time=" + this.foodInfo.date
|
||||
})
|
||||
},
|
||||
// 去登录
|
||||
|
|
@ -301,7 +306,7 @@
|
|||
delAcitionItem(item) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
content: `是否删除[${item.name}]?`,
|
||||
content: that.$t('WhetherTodelete') + item.name,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.$model.delCEatAction({
|
||||
|
|
@ -384,9 +389,8 @@
|
|||
|
||||
.chart-wrap {
|
||||
position: relative;
|
||||
width: 250rpx;
|
||||
height: 250rpx;
|
||||
margin-top: -30rpx;
|
||||
width: 280rpx;
|
||||
height: 280rpx;
|
||||
margin-left: -5px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
|
@ -396,7 +400,7 @@
|
|||
width: 280rpx;
|
||||
height: 210rpx;
|
||||
position: absolute;
|
||||
top: 64rpx;
|
||||
top: 44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,18 +2,18 @@
|
|||
<view class="content">
|
||||
<view class="box1 box" v-if="!token" @click="handleLogin">
|
||||
<view class="info2">
|
||||
未登录,点击登录
|
||||
{{$t('msgLoginTips')}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 个人资料 -->
|
||||
<view v-if="token" class="content-box">
|
||||
<view class="box" v-if="info.aud_id!=''">
|
||||
<view class="info">
|
||||
<!-- /pageTwo/me/userEdit -->
|
||||
<view class="name" @click="navTo('/pageTwo/me/userEdit')">
|
||||
<image :src="info.head_pic"></image>
|
||||
<text class="bold">{{info.nickname}}</text>
|
||||
<text>{{info.gender=='1'?'男':'女'}}</text>
|
||||
<text>{{info.gender=='1'?$t('infoMan'):$t('infoWoman')}}</text>
|
||||
|
||||
</view>
|
||||
<view class="edit" @click="navTo('/pageTwo/me/userEdit')">
|
||||
<image src="/static/26.png"></image>
|
||||
|
|
@ -21,22 +21,22 @@
|
|||
</view>
|
||||
<view class="age">
|
||||
<view class="age-item">
|
||||
<view><text>{{info.age}}</text>岁</view>
|
||||
<view>年龄</view>
|
||||
<view><text>{{info.age}}</text></view>
|
||||
<view>{{$t("infoAge")}}</view>
|
||||
</view>
|
||||
<view class="age-item age-item2">
|
||||
<view><text>{{info.weight}}</text>kg</view>
|
||||
<view>体重</view>
|
||||
<view><text>{{info.weight}}</text></view>
|
||||
<view>{{$t("infoWeight")}}</view>
|
||||
</view>
|
||||
<view class="age-item">
|
||||
<view><text>{{info.height}}</text>cm</view>
|
||||
<view>身高</view>
|
||||
<view><text>{{info.height}}</text></view>
|
||||
<view>{{$t("infoHeight")}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box1 box" v-else @click="navTo('/pageTwo/me/userEdit')">
|
||||
<view class="info2">
|
||||
完善资料后,记录更准确哦!
|
||||
{{$t('msgAddUser')}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -46,21 +46,21 @@
|
|||
<view class="date">{{foodInfo.date}}</view>
|
||||
<view class="detail" @click="navTo('/pageTwo/count/everyDay?page=home')">
|
||||
<image src="/static/fenxi.png"></image>
|
||||
营养分析
|
||||
{{$t('titleeveryDay')}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="left">
|
||||
<view class="left" v-if="foodInfo.list.length">
|
||||
<view class="chart-wrap">
|
||||
<qiun-data-charts v-if="handTrue" type="arcbar" :chartData="chartData" :cHeight="280"
|
||||
:cWidth="280" />
|
||||
<qiun-data-charts v-if="handTrue" type="arcbar" :chartData="chartData" :cHeight="320"
|
||||
:cWidth="320" />
|
||||
<view class="center">
|
||||
摄入
|
||||
{{$t('countIntake')}}
|
||||
<text>{{foodInfo.nutrients_four[0].today_intake}}</text>
|
||||
<view class="unit">Kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mubiao">
|
||||
目标:<text>{{foodInfo.nutrients_four[0].suggestion}}</text>kcal
|
||||
{{$t('titleBody')}}:<text>{{foodInfo.nutrients_four[0].suggestion}}</text>kcal
|
||||
</view>
|
||||
</view>
|
||||
<view class="right" v-if="foodInfo.list.length">
|
||||
|
|
@ -94,8 +94,8 @@
|
|||
<view class="kcal">
|
||||
<text>{{ite.val}}</text>kcal
|
||||
</view>
|
||||
<view class="tools-btn" @click="navTo('/pageTwo/count/search?name='+ite.name+'&time='+foodInfo.date)">
|
||||
添加
|
||||
<view class="tools-btn" @click="navTo('/pageTwo/count/search?index='+ind+'&time='+foodInfo.date)">
|
||||
{{$t('btnAdd')}}
|
||||
</view>
|
||||
<view class="add" @click="navTo('/pageTwo/count/everyMeal?page=home&index='+ind)">
|
||||
<image src="/static/xiangqing.png"></image>
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 搜索 -->
|
||||
<view class="serachBox">
|
||||
<!-- <view class="serachBox">
|
||||
<view class="title">
|
||||
<view class="quan mr-5"></view>教你做
|
||||
</view>
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
<image src="/static/28.png"></image>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 轮播 -->
|
||||
<view class="f_banner footbox" v-if="configInfo.banner_data.length">
|
||||
|
|
@ -131,7 +131,7 @@
|
|||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -178,6 +178,9 @@
|
|||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleHome')
|
||||
})
|
||||
that.token = uni.getStorageSync('token')
|
||||
if (that.token) {
|
||||
that.$ble.openBluetoothAdapter()
|
||||
|
|
@ -210,14 +213,6 @@
|
|||
this.stopWatching()
|
||||
},
|
||||
methods: {
|
||||
handleInfo() {
|
||||
let that = this
|
||||
this.$nextTick(() => {
|
||||
that.chartData.series[0].data = that.user.aud_id == "" ? 0 : Number(that.user.food_count
|
||||
.nutrients_four[0]
|
||||
.proportion) / 100
|
||||
})
|
||||
},
|
||||
startWatching() {
|
||||
this.unwatch = this.$watch('bleValue', (newVal, oldVal) => {
|
||||
// 这里可以执行你的业务逻辑
|
||||
|
|
@ -247,7 +242,7 @@
|
|||
// 功能页面跳转
|
||||
navTo(url) {
|
||||
if (!this.token) {
|
||||
this.$tools.msg("登录后查看更多")
|
||||
this.$tools.msg(this.$t('msgLoginTips'))
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
|
|
@ -279,19 +274,18 @@
|
|||
|
||||
.chart-wrap {
|
||||
position: relative;
|
||||
width: 250rpx;
|
||||
height: 250rpx;
|
||||
margin-top: -30rpx;
|
||||
margin-left: -5px;
|
||||
width: 280rpx;
|
||||
height: 280rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-left: -5px;
|
||||
|
||||
.center {
|
||||
border: none;
|
||||
width: 280rpx;
|
||||
height: 210rpx;
|
||||
position: absolute;
|
||||
top: 64rpx;
|
||||
top: 44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
136
pages/me/me.vue
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view v-if="token" style="width: 100%;">
|
||||
<view class="head" v-if="info.aud_id" @tap="navTo('/pageTwo/setting/setting')">
|
||||
<view class="head" v-if="info.aud_id" @click="navTo('/pageTwo/setting/setting')">
|
||||
<view class="left">
|
||||
<image :src="info.head_pic"></image>
|
||||
<text>{{info.nickname}}</text>
|
||||
|
|
@ -11,49 +11,68 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="head " v-else @click="handleUserEdit">
|
||||
<text class="size22">完善资料后,记录更准确哦!</text>
|
||||
<text class="size22">{{$t('ImproveInformation')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list">
|
||||
<view class="item" @tap="navTo('/pageTwo/me/userEdit')">
|
||||
<view>
|
||||
<image src="/static/11.png" mode=""></image>个人资料
|
||||
<view class="item" @click="navTo('/pageTwo/me/userEdit')">
|
||||
<view class="left">
|
||||
<image src="/static/11.png" mode=""></image>{{$t('infoPersonalProfile')}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<view class="item" @tap="navTo('/pageTwo/me/mymenu?pageName=我的菜谱')">
|
||||
<view>
|
||||
<image src="/static/12.png" mode=""></image>我的菜谱
|
||||
<!-- <view class="item" @click="navTo('/pageTwo/me/mymenu?pageName=我的菜谱')">
|
||||
<view class="left">
|
||||
<image src="/static/12.png" mode=""></image>{{$t('infoMyRecipes')}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<view class="item" @tap="navTo('/pageTwo/me/mymenu?pageName=我的收藏')">
|
||||
<view>
|
||||
<image src="/static/27.png" mode=""></image>我的收藏
|
||||
<view class="item" @click="navTo('/pageTwo/me/mymenu?pageName=我的收藏')">
|
||||
<view class="left">
|
||||
<image src="/static/27.png" mode=""></image>{{$t('infoMyCollection')}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view> -->
|
||||
|
||||
<view class="item" @click="navTo('/pageTwo/me/record')">
|
||||
<view class="left">
|
||||
<image src="/static/13.png" mode=""></image>{{$t('titleHistory')}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
|
||||
<view class="item" @tap="navTo('/pageTwo/me/record')">
|
||||
<view>
|
||||
<image src="/static/13.png" mode=""></image>饮食记录
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view class="item" @click="navTo('/pageTwo/me/about')">
|
||||
<view class="left">
|
||||
<image src="/static/27.png" mode=""></image>{{$t('titleAboutUs')}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="item">
|
||||
<view class="left">
|
||||
<image src="/static/12.png" mode=""></image>{{$t('titleLanguage')}}
|
||||
</view>
|
||||
<view class="right">
|
||||
<picker mode="selector" @change="changeClickLanguage" :range="languageList" range-key="name"
|
||||
:value="levelInd">
|
||||
<view>
|
||||
{{languageList[levelInd].name}}
|
||||
<icon class="iconfont icon-arrow-down"></icon>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" @click="navTo('/pageTwo/webview/webview?url=' + configInfo.business_cooperation.jump_url)">
|
||||
<view>
|
||||
<image src="/static/14.png" mode=""></image>商务合作
|
||||
<view class="left">
|
||||
<image src="/static/14.png" mode=""></image>{{$t('BusinessCooperation')}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<!-- <view class="item" @tap="navTo('/pageTwo/me/feedBack')">
|
||||
<text>联系客服</text>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="btn" v-if="!token" @click="handleLogin">登录后查看更多</view>
|
||||
<view class="btn " v-if="token" @click="handleOutLogin">退出登录</view>
|
||||
<view class="btn" v-if="!token" @click="handleLogin">{{$t('msgLoginTips')}}</view>
|
||||
<view class="btn " v-if="token" @click="handleOutLogin">{{$t('btnLogOut')}}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -64,25 +83,34 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
token: null
|
||||
token: null,
|
||||
levelInd: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user",'configInfo']),
|
||||
...mapState(["user", 'configInfo']),
|
||||
info() {
|
||||
return this.user
|
||||
},
|
||||
languageList() {
|
||||
return this.configInfo.language_arr
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleMe')
|
||||
})
|
||||
console.log(uni.getStorageSync('language'))
|
||||
that.token = uni.getStorageSync('token')
|
||||
that.levelInd = that.languageList.findIndex(ite => ite.key == uni.getStorageSync('language'))
|
||||
},
|
||||
methods: {
|
||||
handleOutLogin() {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
content: '是否退出登录?',
|
||||
title: that.$t('msgTitle'),
|
||||
content: that.$t('verifyOutLogin'),
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getloginOut({}).then((res) => {
|
||||
|
|
@ -96,7 +124,7 @@
|
|||
})
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
that.$tools.msg("您已取消操作!");
|
||||
that.$tools.msg($t('msgCancel'));
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
@ -106,6 +134,44 @@
|
|||
url: "/pageTwo/login/login"
|
||||
})
|
||||
},
|
||||
// 语言切换
|
||||
changeClickLanguage(e) {
|
||||
let that = this
|
||||
let key = that.languageList[e.target.value].key
|
||||
let val = that.languageList[e.target.value].val
|
||||
that.levelInd = e.target.value
|
||||
|
||||
that.$model.getSetLanguage({
|
||||
language: val,
|
||||
}).then(res => {
|
||||
that.$i18n.locale = key
|
||||
uni.setStorageSync('language', key)
|
||||
that.$store.commit('changeLocale', key)
|
||||
that.$store.dispatch("getHomeConfig")
|
||||
that.handleTabBarItem()
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
handleTabBarItem() {
|
||||
let that = this
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
text: that.$t('titleHome')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 1,
|
||||
text: that.$t('titleCount')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 2,
|
||||
text: that.$t('titleMe')
|
||||
})
|
||||
},
|
||||
|
||||
//个人资料
|
||||
handleUserEdit() {
|
||||
uni.navigateTo({
|
||||
|
|
@ -114,7 +180,7 @@
|
|||
},
|
||||
navTo(url) {
|
||||
if (!uni.getStorageSync('token')) {
|
||||
this.$tools.msg("登录后查看等多!")
|
||||
this.$tools.msg(this.$t('msgLoginTips'))
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
|
|
@ -188,12 +254,22 @@
|
|||
margin-top: 30rpx;
|
||||
padding: 0 20rpx;
|
||||
|
||||
view {
|
||||
width: 80%;
|
||||
.left {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.right {
|
||||
width: 50%;
|
||||
|
||||
view {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,10 @@ export default new Vuex.Store({
|
|||
},
|
||||
cookbook_label: [],
|
||||
activity_level: [],
|
||||
default_count_foot: {},
|
||||
language_arr: [],
|
||||
default_count_foot: {
|
||||
list: [],
|
||||
},
|
||||
business_cooperation: {}
|
||||
},
|
||||
// 计食器
|
||||
|
|
@ -52,6 +55,11 @@ export default new Vuex.Store({
|
|||
nutrients_four: [],
|
||||
trace_elements_all_day: []
|
||||
},
|
||||
phoneInfo: {
|
||||
info: {},
|
||||
versionUrl: null,
|
||||
platform: ""
|
||||
},
|
||||
bleValue: {
|
||||
deviceId: "",
|
||||
serviceId: "",
|
||||
|
|
@ -64,9 +72,14 @@ export default new Vuex.Store({
|
|||
isConnectStatus: null,
|
||||
},
|
||||
isBluetoothTyle: false,
|
||||
setLocale: "zh"
|
||||
},
|
||||
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
|
||||
mutations: {
|
||||
// 版本信息
|
||||
changePhoneInfo(state, newData) {
|
||||
Object.assign(state.phoneInfo, newData)
|
||||
},
|
||||
/* 用户信息 */
|
||||
changeUserInfo(state, newData) {
|
||||
state.user = newData
|
||||
|
|
@ -82,6 +95,11 @@ export default new Vuex.Store({
|
|||
changeConfig(state, newData) {
|
||||
state.configInfo = newData
|
||||
},
|
||||
// 设置语言
|
||||
changeLocale(state, newData) {
|
||||
console.log("changeLocale", newData)
|
||||
state.setLocale = newData
|
||||
},
|
||||
// 计食器
|
||||
changeCountFoodInfo(state, newData) {
|
||||
state.countFoodInfo = newData
|
||||
|
|
|
|||
|
|
@ -1,19 +1,23 @@
|
|||
import $store from '@/store'
|
||||
import messages from '@/language/index.js'
|
||||
let searchTimer = null
|
||||
let devicesList = []
|
||||
// 初始化蓝牙
|
||||
|
||||
function openBluetoothAdapter() {
|
||||
let Language = $store.state.setLocale
|
||||
let $t = messages[Language]
|
||||
uni.openBluetoothAdapter({
|
||||
success: e => {
|
||||
$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "蓝牙搜索中",
|
||||
bleTipsText: $t.SearchBluetooth,
|
||||
isConnectStatus: 0
|
||||
})
|
||||
startBluetoothDeviceDiscovery()
|
||||
},
|
||||
fail: e => {
|
||||
$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
bleTipsText: $t.ConnectionTimeout,
|
||||
isConnectStatus: 1
|
||||
})
|
||||
}
|
||||
|
|
@ -21,6 +25,8 @@ function openBluetoothAdapter() {
|
|||
}
|
||||
// 开始搜寻附近的蓝牙外围设备
|
||||
function startBluetoothDeviceDiscovery() {
|
||||
let Language = $store.state.setLocale
|
||||
let $t = messages[Language]
|
||||
uni.startBluetoothDevicesDiscovery({
|
||||
allowDuplicatesKey: true,
|
||||
services: [],
|
||||
|
|
@ -31,7 +37,7 @@ function startBluetoothDeviceDiscovery() {
|
|||
if (!devicesList.length) {
|
||||
clearTimeout(searchTimer);
|
||||
$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
bleTipsText: $t.ConnectionTimeout,
|
||||
isConnectStatus: 1
|
||||
});
|
||||
}
|
||||
|
|
@ -39,7 +45,7 @@ function startBluetoothDeviceDiscovery() {
|
|||
},
|
||||
fail: res => {
|
||||
$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
bleTipsText: $t.ConnectionTimeout,
|
||||
isConnectStatus: 1
|
||||
})
|
||||
}
|
||||
|
|
@ -57,8 +63,8 @@ function onBluetoothDeviceFound() {
|
|||
if (!device.name && !device.localName) {
|
||||
return
|
||||
}
|
||||
if (device.name.indexOf('Chipsea-BLE') != -1 || (device.localName && device
|
||||
.localName.indexOf('Chipsea-BLE') != -1) || id == 'a5fe') {
|
||||
if (device.name.indexOf('G02') != -1 || (device.localName && device
|
||||
.localName.indexOf('G02') != -1) || id == 'a5fe') {
|
||||
clearTimeout(searchTimer);
|
||||
stopBluetoothDevicesDiscovery()
|
||||
Bluetoothfilter(device.deviceId)
|
||||
|
|
@ -143,6 +149,8 @@ function getBLEDeviceCharacteristics(deviceId, serviceId) {
|
|||
|
||||
function getBLECharacteristicValueChange(deviceId, serviceId, notify, write) {
|
||||
let that = this
|
||||
let Language = $store.state.setLocale
|
||||
let $t = messages[Language]
|
||||
uni.notifyBLECharacteristicValueChange({
|
||||
deviceId: deviceId,
|
||||
serviceId: serviceId,
|
||||
|
|
@ -156,10 +164,10 @@ function getBLECharacteristicValueChange(deviceId, serviceId, notify, write) {
|
|||
write: write,
|
||||
unit: "g",
|
||||
countWeight: "",
|
||||
bleTipsText: "测量中,请将食物放到秤上",
|
||||
bleTipsText: $t.Measuring,
|
||||
isConnectStatus: 0
|
||||
})
|
||||
const units = ['kg', '斤', 'st:lb', 'lb', 'g', 'ml', 'Waterml',
|
||||
const units = ['kg', 'g', 'st:lb', 'lb', 'g', 'ml', 'Waterml',
|
||||
'milkml', 'oz', 'floz', 'lboz'
|
||||
]
|
||||
uni.onBLECharacteristicValueChange(function(res) {
|
||||
|
|
@ -264,11 +272,13 @@ function closeBLEConnection(deviceId) {
|
|||
}
|
||||
// 监听蓝牙连接状态
|
||||
function onBLEConnectionStateChange() {
|
||||
let Language = $store.state.setLocale
|
||||
let $t = messages[Language]
|
||||
uni.onBLEConnectionStateChange(function(res) {
|
||||
console.log("监听蓝牙连接状态", res.connected)
|
||||
if (!res.connected) {
|
||||
$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
bleTipsText: $t.ConnectionTimeout,
|
||||
isConnectStatus: 1
|
||||
})
|
||||
closeBLEConnection()
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ const httpRequest = (url, method = "get", data) => {
|
|||
};
|
||||
|
||||
function uploadFile(url, filePath) {
|
||||
config.log
|
||||
let promise = new Promise((resolve, reject) => {
|
||||
uni.uploadFile({
|
||||
url: baseUrl + url,
|
||||
|
|
|
|||
|
|
@ -24,59 +24,70 @@ export default {
|
|||
})
|
||||
},
|
||||
getRegisterPhone(param) { // 手机号快捷登录
|
||||
return http.post("/kitchenscale2/wechat_quick_login", param).then(res => {
|
||||
return http.post("/kitchenscale3/wechat_quick_login", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getResetPassword(param) { // 重置密码
|
||||
return http.post("/kitchenscale2/reset_password", param).then(res => {
|
||||
return http.post("/kitchenscale3/reset_password", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getAccountPassword(param) { // 修改密码
|
||||
return http.post("/kitchenscale2/update_my_password", param).then(res => {
|
||||
return http.post("/kitchenscale3/update_my_password", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getAccountMsg(param) { // 邮箱/手机号绑定
|
||||
return http.post("/kitchenscale2/update_my_account_msg", param).then(res => {
|
||||
return http.post("/kitchenscale3/update_my_account_msg", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getloginversion(param) { // 版本信息
|
||||
return http.post("/kitchenscale3/login_invalid_version", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getSetLanguage(param) { // 语言设置
|
||||
return http.post("/kitchenscale3/update_language", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 首页
|
||||
getHomeInfo(param) { // 默认数据
|
||||
return http.post("/kitchenscale2/get_homepage_information", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_homepage_information", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getHomeUserInfo(param) { // 用户信息
|
||||
return http.post("/kitchenscale2/get_user_msg", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_user_msg", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getHomeConfig(param) { // 配置
|
||||
return http.post("/kitchenscale2/get_default_config", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_default_config", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getHomeSearch(param) { // 首页搜索
|
||||
return http.post("/kitchenscale2/search_column", param).then(res => {
|
||||
return http.post("/kitchenscale3/search_column", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getUserInfoEdit(param) { // 修改用户信息
|
||||
return http.post("/kitchenscale2/update_user_msg", param).then(res => {
|
||||
return http.post("/kitchenscale3/update_user_msg", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getSearchPopularFood(param) { //获取搜索页面常用食材
|
||||
return http.post("/kitchenscale2/get_search_food_page_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_search_food_page_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getFoodSearch(param) { //搜索食材
|
||||
return http.post("/kitchenscale2/get_food_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_food_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
|
@ -86,129 +97,129 @@ export default {
|
|||
})
|
||||
},
|
||||
getMenuSearchColumn(param) { //搜索菜谱2
|
||||
return http.post("/kitchenscale2/search_column", param).then(res => {
|
||||
return http.post("/kitchenscale3/search_column", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getPhotoSearch(param) { //图像识别
|
||||
return http.post("/kitchenscale2/baidu_identify_food", param).then(res => {
|
||||
return http.post("/kitchenscale3/baidu_identify_food", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
// 通用
|
||||
getUploadImg(param) { // 上传素材
|
||||
return http.upload("/kitchenscale2/pic_upload_one_action", param).then(res => {
|
||||
return http.upload("/kitchenscale3/pic_upload_one_action", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
// 菜谱
|
||||
getAddCookbook(param) { // 添加菜谱
|
||||
return http.post("/kitchenscale2/add_cookbook", param).then(res => {
|
||||
return http.post("/kitchenscale3/add_cookbook", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getEditCookbook(param) { // 修改菜谱
|
||||
return http.post("/kitchenscale2/update_cookbook", param).then(res => {
|
||||
return http.post("/kitchenscale3/update_cookbook", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookListLabel(param) { // 菜谱查询(根据菜谱标签拉取)
|
||||
return http.post("/kitchenscale2/find_by_cook_label", param).then(res => {
|
||||
return http.post("/kitchenscale3/find_by_cook_label", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookListFood(param) { // 菜谱列表(根据食材名称拉取)
|
||||
return http.post("/kitchenscale2/find_by_food", param).then(res => {
|
||||
return http.post("/kitchenscale3/find_by_food", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookListDetails(param) { // 查询菜谱详情
|
||||
return http.post("/kitchenscale2/cookbook_details", param).then(res => {
|
||||
return http.post("/kitchenscale3/cookbook_details", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookFollow(param) { // 关注行为
|
||||
return http.post("/kitchenscale2/cookbook_follow", param).then(res => {
|
||||
return http.post("/kitchenscale3/cookbook_follow", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookLike(param) { // 点赞收藏菜谱
|
||||
return http.post("/kitchenscale2/cookbook_like", param).then(res => {
|
||||
return http.post("/kitchenscale3/cookbook_like", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookKcal(param) { // 食材卡路里计算
|
||||
return http.post("/kitchenscale2/food_count_kcal", param).then(res => {
|
||||
return http.post("/kitchenscale3/food_count_kcal", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
// 食材
|
||||
getCookFoodList(param) { // 食材列表
|
||||
return http.post("/kitchenscale2/get_food_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_food_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookListSave(param) { // 食材列表查询
|
||||
return http.post("/kitchenscale2/save_food_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/save_food_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
// 计食器
|
||||
getAddIntakeFood(param) { // 添加每日摄入记录
|
||||
return http.post("/kitchenscale2/add_intake_food", param).then(res => {
|
||||
return http.post("/kitchenscale3/add_intake_food", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getAddEveryMealFood(param) { // 当次食材添加的卡路里摄入记录
|
||||
return http.post("/kitchenscale2/current_food_statistics", param).then(res => {
|
||||
return http.post("/kitchenscale3/current_food_statistics", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCountfootCon(param) { // 每日记食器板块详细内容
|
||||
return http.post("/kitchenscale2/get_countfoot_content", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_countfoot_content", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
delCEatAction(param) { // 删除餐饮食物
|
||||
return http.post("/kitchenscale2/del_user_eat_log", param).then(res => {
|
||||
return http.post("/kitchenscale3/del_user_eat_log", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getLogList(param) { // 记食器角色饮食记录列表
|
||||
return http.post("/kitchenscale2/get_log_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_log_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getSetUpContent(param) { // 计食器板块-设置里的内容
|
||||
return http.post("/kitchenscale2/set_up_content", param).then(res => {
|
||||
return http.post("/kitchenscale3/set_up_content", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getSetUserKcal(param) { // 设置用户的卡路里
|
||||
return http.post("/kitchenscale2/set_user_kcal", param).then(res => {
|
||||
return http.post("/kitchenscale3/set_user_kcal", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
// 个人中心
|
||||
getUserCollectList(param) { // 用户收藏点赞列表
|
||||
return http.post("/kitchenscale2/get_user_collect_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_user_collect_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getMyCookbook(param) { // 我的菜谱
|
||||
return http.post("/kitchenscale2/get_my_cookbook", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_my_cookbook", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getMyCookbookDel(param) { // 删除我的菜谱
|
||||
return http.post("/kitchenscale2/del_my_cookbook", param).then(res => {
|
||||
return http.post("/kitchenscale3/del_my_cookbook", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getMyLogList(param) { // 饮食列表
|
||||
return http.post("/kitchenscale2/get_log_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_log_list", param).then(res => {
|
||||
let pkList = {
|
||||
list: [],
|
||||
Dlist: []
|
||||
|
|
@ -227,22 +238,22 @@ export default {
|
|||
},
|
||||
// 计食器
|
||||
getAddIntakeFood(param) { // 添加每日摄入记录
|
||||
return http.post("/kitchenscale2/add_intake_food", param).then(res => {
|
||||
return http.post("/kitchenscale3/add_intake_food", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCountFoodInfo(param) { // 获取记食器板块详细内容
|
||||
return http.post("/kitchenscale2/get_countfoot_content", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_countfoot_content", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCountSetKcal(param) { // 获取记食器设置里的内容
|
||||
return http.post("/kitchenscale2/set_up_content", param).then(res => {
|
||||
return http.post("/kitchenscale3/set_up_content", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCountSetUserKcal(param) { // 获取记食器设置里的内容
|
||||
return http.post("/kitchenscale2/set_user_kcal", param).then(res => {
|
||||
return http.post("/kitchenscale3/set_user_kcal", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,8 +8,30 @@ export default {
|
|||
getMonth,
|
||||
GetDateStr,
|
||||
NewsPtype,
|
||||
compareVersions,
|
||||
mergeAndDeduplicate
|
||||
}
|
||||
// 版本对比
|
||||
function compareVersions(version1, version2) {
|
||||
console.log("版本对比", version1, version2)
|
||||
// 将版本号拆分成数字数组
|
||||
var arr1 = version1.split('.').map(Number);;
|
||||
var arr2 = version2.split('.').map(Number);;
|
||||
|
||||
// 遍历数字数组进行逐段比较
|
||||
for (var i = 0; i < Math.max(arr1.length, arr2.length); i++) {
|
||||
var num1 = parseInt(arr1[i] || 0); // 如果数组长度不够,则将缺失部分补0
|
||||
var num2 = parseInt(arr2[i] || 0);
|
||||
|
||||
if (num1 < num2) {
|
||||
return -1; // 版本1小于版本2
|
||||
} else if (num1 > num2) {
|
||||
return 1; // 版本1大于版本2
|
||||
}
|
||||
}
|
||||
|
||||
return 0; // 版本1等于版本2
|
||||
}
|
||||
|
||||
function NewsPtype(con) {
|
||||
if (con.type == "wechat") { //跳小程序
|
||||
|
|
|
|||
|
|
@ -1,579 +0,0 @@
|
|||
/*
|
||||
* uCharts®
|
||||
* 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
|
||||
* Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
|
||||
* Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
* 复制使用请保留本段注释,感谢支持开源!
|
||||
*
|
||||
* uCharts®官方网站
|
||||
* https://www.uCharts.cn
|
||||
*
|
||||
* 开源地址:
|
||||
* https://gitee.com/uCharts/uCharts
|
||||
*
|
||||
* uni-app插件市场地址:
|
||||
* http://ext.dcloud.net.cn/plugin?id=271
|
||||
*
|
||||
*/
|
||||
|
||||
// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
|
||||
const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
|
||||
|
||||
//事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
|
||||
const formatDateTime = (timeStamp, returnType) => {
|
||||
var date = new Date();
|
||||
date.setTime(timeStamp * 1000);
|
||||
var y = date.getFullYear();
|
||||
var m = date.getMonth() + 1;
|
||||
m = m < 10 ? ('0' + m) : m;
|
||||
var d = date.getDate();
|
||||
d = d < 10 ? ('0' + d) : d;
|
||||
var h = date.getHours();
|
||||
h = h < 10 ? ('0' + h) : h;
|
||||
var minute = date.getMinutes();
|
||||
var second = date.getSeconds();
|
||||
minute = minute < 10 ? ('0' + minute) : minute;
|
||||
second = second < 10 ? ('0' + second) : second;
|
||||
if (returnType == 'full') {
|
||||
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
|
||||
}
|
||||
if (returnType == 'y-m-d') {
|
||||
return y + '-' + m + '-' + d;
|
||||
}
|
||||
if (returnType == 'h:m') {
|
||||
return h + ':' + minute;
|
||||
}
|
||||
if (returnType == 'h:m:s') {
|
||||
return h + ':' + minute + ':' + second;
|
||||
}
|
||||
return [y, m, d, h, minute, second];
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
//demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
|
||||
"type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "area", "radar", "gauge",
|
||||
"candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype"
|
||||
],
|
||||
"range": ["饼状图", "圆环图", "玫瑰图", "词云图", "漏斗图", "地图", "圆弧进度条", "折线图", "柱状图", "区域图", "雷达图", "仪表盘", "K线图", "混合图",
|
||||
"时间轴折线", "时间轴区域", "散点图", "气泡图", "自定义类型"
|
||||
],
|
||||
//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
|
||||
//自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
|
||||
"categories": ["line", "column", "area", "radar", "gauge", "candle", "mix", "demotype"],
|
||||
//instance为实例变量承载属性,不要删除
|
||||
"instance": {},
|
||||
//option为opts及eopts承载属性,不要删除
|
||||
"option": {},
|
||||
//下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
|
||||
"formatter": {
|
||||
"yAxisDemo1": function(val) {
|
||||
return val + '元'
|
||||
},
|
||||
"yAxisDemo2": function(val) {
|
||||
return val.toFixed(2)
|
||||
},
|
||||
"xAxisDemo1": function(val) {
|
||||
return val + '年'
|
||||
},
|
||||
"xAxisDemo2": function(val) {
|
||||
return formatDateTime(val, 'h:m')
|
||||
},
|
||||
"seriesDemo1": function(val) {
|
||||
return val + '元'
|
||||
},
|
||||
"tooltipDemo1": function(item, category, index, opts) {
|
||||
if (index == 0) {
|
||||
return '随便用' + item.data + '年'
|
||||
} else {
|
||||
return '其他我没改' + item.data + '天'
|
||||
}
|
||||
},
|
||||
"pieDemo": function(val, index, series) {
|
||||
if (index !== undefined) {
|
||||
return series[index].name + ':' + series[index].data + '元'
|
||||
}
|
||||
},
|
||||
},
|
||||
//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
|
||||
"demotype": {
|
||||
//我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
|
||||
"type": "line",
|
||||
"color": color,
|
||||
"padding": [15, 10, 0, 15],
|
||||
"xAxis": {
|
||||
"disableGrid": true,
|
||||
},
|
||||
"yAxis": {
|
||||
"gridType": "dash",
|
||||
"dashLength": 2,
|
||||
},
|
||||
"legend": {},
|
||||
"extra": {
|
||||
"line": {
|
||||
"type": "curve",
|
||||
"width": 2
|
||||
},
|
||||
}
|
||||
},
|
||||
//下面是自定义配置,请添加项目所需的通用配置
|
||||
"pie": {
|
||||
"type": "pie",
|
||||
"color": color,
|
||||
"padding": [5, 5, 5, 5],
|
||||
"extra": {
|
||||
"pie": {
|
||||
"activeOpacity": 0.5,
|
||||
"activeRadius": 10,
|
||||
"offsetAngle": 0,
|
||||
"labelWidth": 15,
|
||||
"border": true,
|
||||
"borderWidth": 3,
|
||||
"borderColor": "#FFFFFF"
|
||||
},
|
||||
}
|
||||
},
|
||||
"ring": {
|
||||
"type": "ring",
|
||||
"color": color,
|
||||
"padding": [5, 5, 5, 5],
|
||||
"rotate": false,
|
||||
"dataLabel": false,
|
||||
"legend": {
|
||||
"show": false,
|
||||
"position": "right",
|
||||
"lineHeight": 25,
|
||||
},
|
||||
"title": {
|
||||
"name": "",
|
||||
"fontSize": 22,
|
||||
"color": "#666666"
|
||||
},
|
||||
"subtitle": {
|
||||
"name": "kcal",
|
||||
"fontSize": 14,
|
||||
"offsetY": 8,
|
||||
"color": "#888888"
|
||||
},
|
||||
"extra": {
|
||||
"ring": {
|
||||
"ringWidth": 10,
|
||||
"activeOpacity": 0.5,
|
||||
"activeRadius": 10,
|
||||
"offsetAngle": 0,
|
||||
"labelWidth": 0,
|
||||
"border": false,
|
||||
"borderWidth": 3,
|
||||
"borderColor": "#FFFFFF"
|
||||
},
|
||||
},
|
||||
},
|
||||
"rose": {
|
||||
"type": "rose",
|
||||
"color": color,
|
||||
"padding": [5, 5, 5, 5],
|
||||
"legend": {
|
||||
"show": true,
|
||||
"position": "left",
|
||||
"lineHeight": 25,
|
||||
},
|
||||
"extra": {
|
||||
"rose": {
|
||||
"type": "area",
|
||||
"minRadius": 50,
|
||||
"activeOpacity": 0.5,
|
||||
"activeRadius": 10,
|
||||
"offsetAngle": 0,
|
||||
"labelWidth": 15,
|
||||
"border": false,
|
||||
"borderWidth": 2,
|
||||
"borderColor": "#FFFFFF"
|
||||
},
|
||||
}
|
||||
},
|
||||
"word": {
|
||||
"type": "word",
|
||||
"color": color,
|
||||
"extra": {
|
||||
"word": {
|
||||
"type": "normal",
|
||||
"autoColors": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"funnel": {
|
||||
"type": "funnel",
|
||||
"color": color,
|
||||
"padding": [15, 15, 0, 15],
|
||||
"extra": {
|
||||
"funnel": {
|
||||
"activeOpacity": 0.3,
|
||||
"activeWidth": 10,
|
||||
"border": true,
|
||||
"borderWidth": 2,
|
||||
"borderColor": "#FFFFFF",
|
||||
"fillOpacity": 1,
|
||||
"labelAlign": "right"
|
||||
},
|
||||
}
|
||||
},
|
||||
"map": {
|
||||
"type": "map",
|
||||
"color": color,
|
||||
"padding": [0, 0, 0, 0],
|
||||
"dataLabel": true,
|
||||
"extra": {
|
||||
"map": {
|
||||
"border": true,
|
||||
"borderWidth": 1,
|
||||
"borderColor": "#666666",
|
||||
"fillOpacity": 0.6,
|
||||
"activeBorderColor": "#F04864",
|
||||
"activeFillColor": "#FACC14",
|
||||
"activeFillOpacity": 1
|
||||
},
|
||||
}
|
||||
},
|
||||
"arcbar": {
|
||||
"type": "arcbar",
|
||||
"color": color,
|
||||
"title": {
|
||||
"name": "",
|
||||
"fontSize": 25,
|
||||
"color": "#00FF00"
|
||||
},
|
||||
"subtitle": {
|
||||
"name": "",
|
||||
"fontSize": 15,
|
||||
"color": "#666666"
|
||||
},
|
||||
"extra": {
|
||||
"arcbar": {
|
||||
"type": "circle",
|
||||
"width": 8,
|
||||
"backgroundColor": "#E9E9E9",
|
||||
"startAngle": 0.75,
|
||||
"endAngle": 0.25,
|
||||
"gap": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"line": {
|
||||
"type": "line",
|
||||
"color": color,
|
||||
"padding": [15, 10, 0, 15],
|
||||
"xAxis": {
|
||||
"disableGrid": true,
|
||||
},
|
||||
"yAxis": {
|
||||
"gridType": "dash",
|
||||
"dashLength": 2,
|
||||
},
|
||||
"legend": {},
|
||||
"extra": {
|
||||
"line": {
|
||||
"type": "straight",
|
||||
"width": 2
|
||||
},
|
||||
}
|
||||
},
|
||||
"tline": {
|
||||
"type": "line",
|
||||
"color": color,
|
||||
"padding": [15, 10, 0, 15],
|
||||
"xAxis": {
|
||||
"disableGrid": false,
|
||||
"boundaryGap": "justify",
|
||||
},
|
||||
"yAxis": {
|
||||
"gridType": "dash",
|
||||
"dashLength": 2,
|
||||
"data": [{
|
||||
"min": 0,
|
||||
"max": 80
|
||||
}]
|
||||
},
|
||||
"legend": {},
|
||||
"extra": {
|
||||
"line": {
|
||||
"type": "curve",
|
||||
"width": 2
|
||||
},
|
||||
}
|
||||
},
|
||||
"tarea": {
|
||||
"type": "area",
|
||||
"color": color,
|
||||
"padding": [0, 15, 15, 5],
|
||||
"xAxis": {
|
||||
"disableGrid": true,
|
||||
"boundaryGap": "justify",
|
||||
},
|
||||
"yAxis": {
|
||||
"gridType": "dash",
|
||||
"dashLength": 2,
|
||||
"data": [{
|
||||
"min": 0,
|
||||
"max": 80
|
||||
}]
|
||||
},
|
||||
"legend": {},
|
||||
"extra": {
|
||||
"area": {
|
||||
"type": "curve",
|
||||
"opacity": 0.2,
|
||||
"addLine": true,
|
||||
"width": 2,
|
||||
"gradient": true
|
||||
},
|
||||
}
|
||||
},
|
||||
"column": {
|
||||
"type": "column",
|
||||
"color": color,
|
||||
"padding": [15, 15, 0, 5],
|
||||
"xAxis": {
|
||||
"disableGrid": true,
|
||||
},
|
||||
"yAxis": {
|
||||
"gridType": "dash",
|
||||
"disableGrid": true,
|
||||
"gridColor": '#ffffff',
|
||||
"data": [{
|
||||
"tofix": 1,
|
||||
"min": 0
|
||||
}],
|
||||
},
|
||||
"legend": {},
|
||||
"extra": {
|
||||
"column": {
|
||||
"type": "group",
|
||||
"width": 20,
|
||||
"seriesGap": 5,
|
||||
"meterFillColor": "#FFFFFF",
|
||||
"activeBgColor": "#000000",
|
||||
"activeBgOpacity": 0.5,
|
||||
"barBorderCircle": true,
|
||||
"linearType": "opacity",
|
||||
// "customColor": "#ff9f40",
|
||||
"linearOpacity": 1,
|
||||
},
|
||||
}
|
||||
},
|
||||
"area": {
|
||||
"type": "area",
|
||||
"color": color,
|
||||
"padding": [20, 15, 5, 10],
|
||||
"xAxis": {
|
||||
"disableGrid": true,
|
||||
},
|
||||
"yAxis": {
|
||||
"gridType": "dash",
|
||||
"disableGrid": true,
|
||||
"gridColor": '#ffffff',
|
||||
"data": [{
|
||||
"tofix": 1,
|
||||
"min": 0
|
||||
}],
|
||||
},
|
||||
"legend": {
|
||||
"show": false,
|
||||
},
|
||||
"extra": {
|
||||
"area": {
|
||||
"type": "curve",
|
||||
"opacity": 0.2,
|
||||
"addLine": true,
|
||||
"width": 1,
|
||||
"gradient": true
|
||||
},
|
||||
}
|
||||
},
|
||||
"radar": {
|
||||
"type": "radar",
|
||||
"color": color,
|
||||
"padding": [5, 5, 5, 5],
|
||||
"legend": {
|
||||
"show": true,
|
||||
"position": "right",
|
||||
"lineHeight": 25,
|
||||
},
|
||||
"extra": {
|
||||
"radar": {
|
||||
"gridType": "radar",
|
||||
"gridColor": "#CCCCCC",
|
||||
"gridCount": 3,
|
||||
"opacity": 0.2,
|
||||
"max": 200
|
||||
},
|
||||
}
|
||||
},
|
||||
"gauge": {
|
||||
"type": "gauge",
|
||||
"color": color,
|
||||
"title": {
|
||||
"name": "66Km/H",
|
||||
"fontSize": 25,
|
||||
"color": "#2fc25b",
|
||||
"offsetY": 50
|
||||
},
|
||||
"subtitle": {
|
||||
"name": "实时速度",
|
||||
"fontSize": 15,
|
||||
"color": "#1890ff",
|
||||
"offsetY": -50
|
||||
},
|
||||
"extra": {
|
||||
"gauge": {
|
||||
"type": "default",
|
||||
"width": 30,
|
||||
"labelColor": "#666666",
|
||||
"startAngle": 0.75,
|
||||
"endAngle": 0.25,
|
||||
"startNumber": 0,
|
||||
"endNumber": 100,
|
||||
"labelFormat": "",
|
||||
"splitLine": {
|
||||
"fixRadius": 0,
|
||||
"splitNumber": 10,
|
||||
"width": 30,
|
||||
"color": "#FFFFFF",
|
||||
"childNumber": 5,
|
||||
"childWidth": 12
|
||||
},
|
||||
"pointer": {
|
||||
"width": 24,
|
||||
"color": "auto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"candle": {
|
||||
"type": "candle",
|
||||
"color": color,
|
||||
"padding": [15, 15, 0, 15],
|
||||
"enableScroll": true,
|
||||
"enableMarkLine": true,
|
||||
"dataLabel": false,
|
||||
"xAxis": {
|
||||
"labelCount": 4,
|
||||
"itemCount": 40,
|
||||
"disableGrid": true,
|
||||
"gridColor": "#CCCCCC",
|
||||
"gridType": "solid",
|
||||
"dashLength": 4,
|
||||
"scrollShow": true,
|
||||
"scrollAlign": "left",
|
||||
"scrollColor": "#A6A6A6",
|
||||
"scrollBackgroundColor": "#EFEBEF"
|
||||
},
|
||||
"yAxis": {},
|
||||
"legend": {},
|
||||
"extra": {
|
||||
"candle": {
|
||||
"color": {
|
||||
"upLine": "#f04864",
|
||||
"upFill": "#f04864",
|
||||
"downLine": "#2fc25b",
|
||||
"downFill": "#2fc25b"
|
||||
},
|
||||
"average": {
|
||||
"show": true,
|
||||
"name": ["MA5", "MA10", "MA30"],
|
||||
"day": [5, 10, 20],
|
||||
"color": ["#1890ff", "#2fc25b", "#facc14"]
|
||||
}
|
||||
},
|
||||
"markLine": {
|
||||
"type": "dash",
|
||||
"dashLength": 5,
|
||||
"data": [{
|
||||
"value": 2150,
|
||||
"lineColor": "#f04864",
|
||||
"showLabel": true
|
||||
},
|
||||
{
|
||||
"value": 2350,
|
||||
"lineColor": "#f04864",
|
||||
"showLabel": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"mix": {
|
||||
"type": "mix",
|
||||
"color": color,
|
||||
"padding": [15, 15, 0, 15],
|
||||
"xAxis": {
|
||||
"disableGrid": true,
|
||||
},
|
||||
"yAxis": {
|
||||
"disabled": false,
|
||||
"disableGrid": false,
|
||||
"splitNumber": 5,
|
||||
"gridType": "dash",
|
||||
"dashLength": 4,
|
||||
"gridColor": "#CCCCCC",
|
||||
"padding": 10,
|
||||
"showTitle": true,
|
||||
"data": []
|
||||
},
|
||||
"legend": {},
|
||||
"extra": {
|
||||
"mix": {
|
||||
"column": {
|
||||
"width": 20
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
"scatter": {
|
||||
"type": "scatter",
|
||||
"color": color,
|
||||
"padding": [15, 15, 0, 15],
|
||||
"dataLabel": false,
|
||||
"xAxis": {
|
||||
"disableGrid": false,
|
||||
"gridType": "dash",
|
||||
"splitNumber": 5,
|
||||
"boundaryGap": "justify",
|
||||
"min": 0
|
||||
},
|
||||
"yAxis": {
|
||||
"disableGrid": false,
|
||||
"gridType": "dash",
|
||||
},
|
||||
"legend": {},
|
||||
"extra": {
|
||||
"scatter": {},
|
||||
}
|
||||
},
|
||||
"bubble": {
|
||||
"type": "bubble",
|
||||
"color": color,
|
||||
"padding": [15, 15, 0, 15],
|
||||
"xAxis": {
|
||||
"disableGrid": false,
|
||||
"gridType": "dash",
|
||||
"splitNumber": 5,
|
||||
"boundaryGap": "justify",
|
||||
"min": 0,
|
||||
"max": 250
|
||||
},
|
||||
"yAxis": {
|
||||
"disableGrid": false,
|
||||
"gridType": "dash",
|
||||
"data": [{
|
||||
"min": 0,
|
||||
"max": 150
|
||||
}]
|
||||
},
|
||||
"legend": {},
|
||||
"extra": {
|
||||
"bubble": {
|
||||
"border": 2,
|
||||
"opacity": 0.5,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
*/
|
||||
width: {
|
||||
type: Number,
|
||||
default: 220
|
||||
default: 300
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
showDrawer: false,
|
||||
rightMode: false,
|
||||
watchTimer: null,
|
||||
drawerWidth: 220
|
||||
drawerWidth: 300
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
<style lang="scss" scoped>
|
||||
$uni-mask: rgba($color: #000000, $alpha: 0.4) ;
|
||||
// 抽屉宽度
|
||||
$drawer-width: 240rpx;
|
||||
$drawer-width: 300rpx;
|
||||
|
||||
.uni-drawer {
|
||||
/* #ifndef APP-NVUE */
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
var isReady=false;var onReadyCallbacks=[];
|
||||
var isServiceReady=false;var onServiceReadyCallbacks=[];
|
||||
var __uniConfig = {"pages":["pages/index/index","pages/menu/menu","pages/add/add","pages/count/count","pages/me/me","pages/add/Preview","pages/search/search","pageTwo/login/forgetPassword","pageTwo/login/login","pageTwo/me/feedBack","pageTwo/me/userEdit","pageTwo/me/record","pageTwo/me/mymenu","pageTwo/me/menudetail","pageTwo/me/foodlist","pageTwo/count/setting","pageTwo/count/KcalEdit","pageTwo/count/food","pageTwo/webview/webview","pageTwo/setting/setting","pageTwo/setting/password","pageTwo/setting/email","pageTwo/setting/phone","pageTwo/me/menuEdit"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#efefef","backgroundColor":"#efefef"},"tabBar":{"color":"#333","selectedColor":"#ff4c4f","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/home.png","selectedIconPath":"static/home01.png","text":"首页"},{"pagePath":"pages/menu/menu","iconPath":"static/cai.png","selectedIconPath":"static/cai01.png","text":"菜谱"},{"pagePath":"pages/add/add","iconPath":"static/add.png","selectedIconPath":"static/add.png","text":""},{"pagePath":"pages/count/count","iconPath":"static/ji.png","selectedIconPath":"static/ji01.png","text":"计食器"},{"pagePath":"pages/me/me","iconPath":"static/me.png","selectedIconPath":"static/me01.png","text":"我的"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"kitchendDevice","compilerVersion":"4.76","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
||||
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"首页","enablePullDownRefresh":true}},{"path":"/pages/menu/menu","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"菜谱","enablePullDownRefresh":true}},{"path":"/pages/add/add","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"添加食谱","enablePullDownRefresh":false}},{"path":"/pages/count/count","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"计食器","enablePullDownRefresh":false}},{"path":"/pages/me/me","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"个人中心","enablePullDownRefresh":false}},{"path":"/pages/add/Preview","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/search/search","meta":{},"window":{"navigationBarTitleText":"搜索"}},{"path":"/pageTwo/login/forgetPassword","meta":{},"window":{"navigationBarTitleText":"密码","enablePullDownRefresh":false}},{"path":"/pageTwo/login/login","meta":{},"window":{"navigationBarTitleText":"登录","enablePullDownRefresh":false,"navigationStyle":"custom"}},{"path":"/pageTwo/me/feedBack","meta":{},"window":{"navigationBarTitleText":"意见反馈","navigationBarBackgroundColor":"#F9FAFC"}},{"path":"/pageTwo/me/userEdit","meta":{},"window":{"navigationBarTitleText":"个人资料","navigationBarBackgroundColor":"#F9FAFC"}},{"path":"/pageTwo/me/record","meta":{},"window":{"navigationBarTitleText":"饮食记录","enablePullDownRefresh":false}},{"path":"/pageTwo/me/mymenu","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pageTwo/me/menudetail","meta":{},"window":{"navigationBarTitleText":"详情","enablePullDownRefresh":false}},{"path":"/pageTwo/me/foodlist","meta":{},"window":{"navigationBarTitleText":"食材库","enablePullDownRefresh":true}},{"path":"/pageTwo/count/setting","meta":{},"window":{"navigationBarTitleText":"设置","enablePullDownRefresh":false}},{"path":"/pageTwo/count/KcalEdit","meta":{},"window":{"navigationBarTitleText":"自定义卡路里","enablePullDownRefresh":false}},{"path":"/pageTwo/count/food","meta":{},"window":{"navigationBarTitleText":"食材库","enablePullDownRefresh":false}},{"path":"/pageTwo/webview/webview","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/setting","meta":{},"window":{"navigationBarTitleText":"设置","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/password","meta":{},"window":{"navigationBarTitleText":"修改密码","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/email","meta":{},"window":{"navigationBarTitleText":"绑定邮箱","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/phone","meta":{},"window":{"navigationBarTitleText":"绑定手机号","enablePullDownRefresh":false}},{"path":"/pageTwo/me/menuEdit","meta":{},"window":{"navigationBarTitleText":""}}];
|
||||
var __uniConfig = {"pages":["pages/index/index","pages/menu/menu","pages/add/add","pages/count/count","pages/me/me","pages/add/Preview","pages/search/search","pages/search/list","pageTwo/login/forgetPassword","pageTwo/login/login","pageTwo/me/feedBack","pageTwo/me/userEdit","pageTwo/me/record","pageTwo/me/recordetail","pageTwo/me/mymenu","pageTwo/me/menudetail","pageTwo/me/foodlist","pageTwo/count/setting","pageTwo/count/KcalEdit","pageTwo/count/everyMeal","pageTwo/count/search","pageTwo/webview/webview","pageTwo/setting/setting","pageTwo/setting/password","pageTwo/setting/email","pageTwo/setting/phone","pageTwo/me/menuEdit","pageTwo/count/everyDay","pageTwo/me/about"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#3CB383","backgroundColor":"#f7f7f7"},"tabBar":{"color":"#333","selectedColor":"#3CB383","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/home.png","selectedIconPath":"static/home01.png","text":"首页"},{"pagePath":"pages/count/count","iconPath":"static/ji.png","selectedIconPath":"static/ji01.png","text":"计食"},{"pagePath":"pages/me/me","iconPath":"static/me.png","selectedIconPath":"static/me01.png","text":"我的"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"kitchendDevice","compilerVersion":"4.76","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
||||
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"首页","enablePullDownRefresh":true}},{"path":"/pages/menu/menu","meta":{},"window":{"navigationBarTitleText":"菜谱","enablePullDownRefresh":true}},{"path":"/pages/add/add","meta":{},"window":{"navigationBarTitleText":"添加食谱","enablePullDownRefresh":false}},{"path":"/pages/count/count","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"计食","enablePullDownRefresh":false}},{"path":"/pages/me/me","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"个人中心","enablePullDownRefresh":false}},{"path":"/pages/add/Preview","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/search/search","meta":{},"window":{"navigationBarTitleText":"搜索菜谱"}},{"path":"/pages/search/list","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pageTwo/login/forgetPassword","meta":{},"window":{"navigationBarTitleText":"密码","enablePullDownRefresh":false}},{"path":"/pageTwo/login/login","meta":{},"window":{"navigationBarTitleText":"登录","enablePullDownRefresh":false,"navigationStyle":"custom"}},{"path":"/pageTwo/me/feedBack","meta":{},"window":{"navigationBarTitleText":"意见反馈"}},{"path":"/pageTwo/me/userEdit","meta":{},"window":{"navigationBarTitleText":"个人资料"}},{"path":"/pageTwo/me/record","meta":{},"window":{"navigationBarTitleText":"饮食记录","enablePullDownRefresh":false}},{"path":"/pageTwo/me/recordetail","meta":{},"window":{"navigationBarTitleText":"饮食详情","enablePullDownRefresh":false}},{"path":"/pageTwo/me/mymenu","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pageTwo/me/menudetail","meta":{},"window":{"navigationBarTitleText":"详情","enablePullDownRefresh":false}},{"path":"/pageTwo/me/foodlist","meta":{},"window":{"navigationBarTitleText":"食材库","enablePullDownRefresh":true}},{"path":"/pageTwo/count/setting","meta":{},"window":{"navigationBarTitleText":"设置","enablePullDownRefresh":false,"popGesture":"none"}},{"path":"/pageTwo/count/KcalEdit","meta":{},"window":{"navigationBarTitleText":"自定义卡路里","enablePullDownRefresh":false}},{"path":"/pageTwo/count/everyMeal","meta":{},"window":{"navigationBarTitleText":"餐食详情","enablePullDownRefresh":false}},{"path":"/pageTwo/count/search","meta":{},"window":{"navigationBarTitleText":"食材搜索","enablePullDownRefresh":false}},{"path":"/pageTwo/webview/webview","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/setting","meta":{},"window":{"navigationBarTitleText":"设置","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/password","meta":{},"window":{"navigationBarTitleText":"修改密码","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/email","meta":{},"window":{"navigationBarTitleText":"绑定邮箱","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/phone","meta":{},"window":{"navigationBarTitleText":"绑定手机号","enablePullDownRefresh":false}},{"path":"/pageTwo/me/menuEdit","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pageTwo/count/everyDay","meta":{},"window":{"navigationBarTitleText":"营养分析"}},{"path":"/pageTwo/me/about","meta":{},"window":{"navigationBarTitleText":"关于我们"}}];
|
||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__9A0614A","name":"kitchendDevice","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#efefef"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"speech":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.76","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#ff4c4f","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/home.png","selectedIconPath":"static/home01.png","text":"首页"},{"pagePath":"pages/menu/menu","iconPath":"static/cai.png","selectedIconPath":"static/cai01.png","text":"菜谱"},{"pagePath":"pages/add/add","iconPath":"static/add.png","selectedIconPath":"static/add.png","text":""},{"pagePath":"pages/count/count","iconPath":"static/ji.png","selectedIconPath":"static/ji01.png","text":"计食器"},{"pagePath":"pages/me/me","iconPath":"static/me.png","selectedIconPath":"static/me01.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}}
|
||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__20604F1","name":"kitchendDevice","version":{"name":"1.1.1","code":111},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#3CB383"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"useOriginalMsgbox":true},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{"privacyDescription":{"NSBluetoothPeripheralUsageDescription":"使用蓝牙与外设通信","NSBluetoothAlwaysUsageDescription":"需要蓝牙权限来连接设备"}},"plugins":{"speech":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.76","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#3CB383","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/home.png","selectedIconPath":"static/home01.png","text":"首页"},{"pagePath":"pages/count/count","iconPath":"static/ji.png","selectedIconPath":"static/ji01.png","text":"计食"},{"pagePath":"pages/me/me","iconPath":"static/me.png","selectedIconPath":"static/me01.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"},"locale":"zh-Hans"}
|
||||
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 648 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 258 B |
|
|
@ -32,7 +32,8 @@
|
|||
"setting/email",
|
||||
"setting/phone",
|
||||
"me/menuEdit",
|
||||
"count/everyDay"
|
||||
"count/everyDay",
|
||||
"me/about"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -53,18 +54,6 @@
|
|||
"selectedIconPath": "static/home01.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/search/search",
|
||||
"iconPath": "static/cai.png",
|
||||
"selectedIconPath": "static/cai01.png",
|
||||
"text": "教你做"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/add/add",
|
||||
"iconPath": "static/add.png",
|
||||
"selectedIconPath": "static/add.png",
|
||||
"text": ""
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/count/count",
|
||||
"iconPath": "static/ji.png",
|
||||
|
|
|
|||