多语言配置
This commit is contained in:
parent
7a89cab579
commit
f51d077a57
5
App.vue
5
App.vue
|
|
@ -51,10 +51,11 @@
|
||||||
handleoginversion() {
|
handleoginversion() {
|
||||||
let that = this
|
let that = this
|
||||||
that.$model.getloginversion({}).then(res => {
|
that.$model.getloginversion({}).then(res => {
|
||||||
console.log("res.data", res)
|
|
||||||
let language = res.data.language == "zh" ? 'zh-Hans' : res.data.language
|
let language = res.data.language == "zh" ? 'zh-Hans' : res.data.language
|
||||||
|
console.log("res.data",res.data.language, language, res)
|
||||||
uni.setLocale(language)
|
uni.setLocale(language)
|
||||||
that.$i18n.locale = language
|
that.$i18n.locale =language
|
||||||
|
that.$store.commit('changeLocale', res.data.language)
|
||||||
uni.setStorageSync('language', res.data.language)
|
uni.setStorageSync('language', res.data.language)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
that.$store.dispatch("getHomeConfig")
|
that.$store.dispatch("getHomeConfig")
|
||||||
|
|
|
||||||
|
|
@ -59,11 +59,11 @@
|
||||||
// weight: "",
|
// weight: "",
|
||||||
inputDialog: false,
|
inputDialog: false,
|
||||||
unitList: [{
|
unitList: [{
|
||||||
name: "克",
|
name: this.$t("g"),
|
||||||
id: '00',
|
id: '00',
|
||||||
unit: "g"
|
unit: "g"
|
||||||
}, {
|
}, {
|
||||||
name: "盎司",
|
name: this.$t("oz"),
|
||||||
id: "08",
|
id: "08",
|
||||||
unit: "oz"
|
unit: "oz"
|
||||||
}],
|
}],
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
"titleConfirmPassword": "تأكيد كلمة المرور",
|
"titleConfirmPassword": "تأكيد كلمة المرور",
|
||||||
"titleForgotPassword": "نسيت كلمة المرور",
|
"titleForgotPassword": "نسيت كلمة المرور",
|
||||||
"titleCode": "رمز التحقق",
|
"titleCode": "رمز التحقق",
|
||||||
"titleLanguage": "إعدادات اللغة",
|
"titleLanguage": "اللغة",
|
||||||
"titleSendCode": "الحصول على رمز التحقق",
|
"titleSendCode": "الحصول على رمز التحقق",
|
||||||
"titleSendCodeRetry": "إعادة إرسال بعد S",
|
"titleSendCodeRetry": "إعادة إرسال بعد S",
|
||||||
"titleLogin": "تسجيل الدخول",
|
"titleLogin": "تسجيل الدخول",
|
||||||
|
|
@ -146,6 +146,9 @@
|
||||||
"ImproveInformation": "تحسين المعلومات",
|
"ImproveInformation": "تحسين المعلومات",
|
||||||
"WhetherTodelete": "هل حذف",
|
"WhetherTodelete": "هل حذف",
|
||||||
"BusinessCooperation": "التعاون التجاري",
|
"BusinessCooperation": "التعاون التجاري",
|
||||||
"verifyActivityCoefficient": "يرجى تحديد معامل النشاط"
|
"verifyActivityCoefficient": "يرجى تحديد معامل النشاط",
|
||||||
|
|
||||||
|
"g": "g",
|
||||||
|
"oz": "oz"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
"titleConfirmPassword": "Passwort bestätigen",
|
"titleConfirmPassword": "Passwort bestätigen",
|
||||||
"titleForgotPassword": "Passwort vergessen",
|
"titleForgotPassword": "Passwort vergessen",
|
||||||
"titleCode": "Bestätigungscode",
|
"titleCode": "Bestätigungscode",
|
||||||
"titleLanguage": "Spracheinstellung",
|
"titleLanguage": "Sprache.",
|
||||||
"titleSendCode": "CAPTCHA-Code abrufen",
|
"titleSendCode": "CAPTCHA-Code abrufen",
|
||||||
"titleSendCodeRetry": "Nach S erneut senden",
|
"titleSendCodeRetry": "Nach S erneut senden",
|
||||||
"titleLogin": "Anmelden",
|
"titleLogin": "Anmelden",
|
||||||
|
|
@ -146,6 +146,8 @@
|
||||||
"ImproveInformation": "Nachrichten verbessern.",
|
"ImproveInformation": "Nachrichten verbessern.",
|
||||||
"WhetherTodelete": "Ist sie gelöscht",
|
"WhetherTodelete": "Ist sie gelöscht",
|
||||||
"BusinessCooperation": "Kooperation seitens der händler",
|
"BusinessCooperation": "Kooperation seitens der händler",
|
||||||
"verifyActivityCoefficient": "Bitte wählen sie die multiplikatoren"
|
"verifyActivityCoefficient": "Bitte wählen sie die multiplikatoren",
|
||||||
|
"g": "g",
|
||||||
|
"oz": "oz"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
"titleConfirmPassword": "Confirm Password",
|
"titleConfirmPassword": "Confirm Password",
|
||||||
"titleForgotPassword": "Forgot password",
|
"titleForgotPassword": "Forgot password",
|
||||||
"titleCode": "CAPTCHA",
|
"titleCode": "CAPTCHA",
|
||||||
"titleLanguage": "Language settings",
|
"titleLanguage": "Language",
|
||||||
"titleSendCode": "Get verification code",
|
"titleSendCode": "Get verification code",
|
||||||
"titleSendCodeRetry": "Resend after S",
|
"titleSendCodeRetry": "Resend after S",
|
||||||
"titleLogin": "login",
|
"titleLogin": "login",
|
||||||
|
|
@ -145,6 +145,8 @@
|
||||||
"ImproveInformation": "Improve information",
|
"ImproveInformation": "Improve information",
|
||||||
"WhetherTodelete": "Whether to delete",
|
"WhetherTodelete": "Whether to delete",
|
||||||
"BusinessCooperation": "Businesscooperation",
|
"BusinessCooperation": "Businesscooperation",
|
||||||
"verifyActivityCoefficient": "Please select the activity coefficient"
|
"verifyActivityCoefficient": "Please select the activity coefficient",
|
||||||
|
"g": "g",
|
||||||
|
"oz": "oz"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
"titleConfirmPassword": "Confirmar contraseña",
|
"titleConfirmPassword": "Confirmar contraseña",
|
||||||
"titleForgotPassword": "Olvidé la contraseña",
|
"titleForgotPassword": "Olvidé la contraseña",
|
||||||
"titleCode": "código de verificación",
|
"titleCode": "código de verificación",
|
||||||
"titleLanguage": "Configuración de idioma",
|
"titleLanguage": "El lenguaje",
|
||||||
"titleSendCode": "Obtener código de verificación",
|
"titleSendCode": "Obtener código de verificación",
|
||||||
"titleSendCodeRetry": "Reenvío posterior a S",
|
"titleSendCodeRetry": "Reenvío posterior a S",
|
||||||
"titleLogin": "Iniciar sesión",
|
"titleLogin": "Iniciar sesión",
|
||||||
|
|
@ -147,6 +147,8 @@
|
||||||
"ImproveInformation": "Perfeccionando el mensaje",
|
"ImproveInformation": "Perfeccionando el mensaje",
|
||||||
"WhetherTodelete": "Eliminar sí no",
|
"WhetherTodelete": "Eliminar sí no",
|
||||||
"BusinessCooperation": "Cooperación empresarial",
|
"BusinessCooperation": "Cooperación empresarial",
|
||||||
"verifyActivityCoefficient": "Por favor seleccione el coeficiente de actividad"
|
"verifyActivityCoefficient": "Por favor seleccione el coeficiente de actividad",
|
||||||
|
"g": "g",
|
||||||
|
"oz": "oz"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
"titleConfirmPassword": "Confirmer le mot de passe",
|
"titleConfirmPassword": "Confirmer le mot de passe",
|
||||||
"titleForgotPassword": "Mot de passe oublié",
|
"titleForgotPassword": "Mot de passe oublié",
|
||||||
"titleCode": "Code de vérification",
|
"titleCode": "Code de vérification",
|
||||||
"titleLanguage": "Paramètres de langue",
|
"titleLanguage": "Langue (S)",
|
||||||
"titleSendCode": "Obtenir le code de vérification",
|
"titleSendCode": "Obtenir le code de vérification",
|
||||||
"titleSendCodeRetry": "Réémission après S",
|
"titleSendCodeRetry": "Réémission après S",
|
||||||
"titleLogin": "Connexion",
|
"titleLogin": "Connexion",
|
||||||
|
|
@ -146,5 +146,7 @@
|
||||||
"Améliorer l’information ": " améliorer l’information ",
|
"Améliorer l’information ": " améliorer l’information ",
|
||||||
"WhetherTodelete": "supprimer ou non ",
|
"WhetherTodelete": "supprimer ou non ",
|
||||||
"BusinessCooperation": "coopération commerciale ",
|
"BusinessCooperation": "coopération commerciale ",
|
||||||
"verifyActivityCoefficient ": "veuillez sélectionner des coefficients d’activité."
|
"verifyActivityCoefficient ": "veuillez sélectionner des coefficients d’activité.",
|
||||||
|
"g": "g",
|
||||||
|
"oz": "oz"
|
||||||
}
|
}
|
||||||
|
|
@ -11,15 +11,15 @@ import es from './es.json'
|
||||||
import ar from './ar.json'
|
import ar from './ar.json'
|
||||||
export default {
|
export default {
|
||||||
zh, //中文
|
zh, //中文
|
||||||
en, // 英语
|
|
||||||
ja, //日语
|
|
||||||
fr, //法语
|
|
||||||
de, //德语
|
|
||||||
ko, //韩语
|
|
||||||
ru, //俄语
|
|
||||||
pt, //葡萄牙
|
|
||||||
es, //西班牙
|
|
||||||
ar, //阿拉伯
|
ar, //阿拉伯
|
||||||
|
de, //德语
|
||||||
|
en, // 英语
|
||||||
|
es, //西班牙
|
||||||
|
fr, //法语
|
||||||
|
ja, //日语
|
||||||
|
ko, //韩语
|
||||||
|
pt, //葡萄牙
|
||||||
|
ru, //俄语
|
||||||
"zh-Hans": zh, //中文
|
"zh-Hans": zh, //中文
|
||||||
'zh-Hant': zhHant, //繁体
|
'zh-Hant': zhHant, //繁体
|
||||||
"en-CN": en,
|
"en-CN": en,
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
"titleConfirmPassword": "確認用パスワード",
|
"titleConfirmPassword": "確認用パスワード",
|
||||||
"titleForgotPassword": "パスワードを忘れた",
|
"titleForgotPassword": "パスワードを忘れた",
|
||||||
"titleCode": "認証コード",
|
"titleCode": "認証コード",
|
||||||
"titleLanguage": "言語設定",
|
"titleLanguage": "言語です",
|
||||||
"titleSendCode": "認証コードを取得する",
|
"titleSendCode": "認証コードを取得する",
|
||||||
"titleSendCodeRetry": "S後再送",
|
"titleSendCodeRetry": "S後再送",
|
||||||
"titleLogin": "ログイン",
|
"titleLogin": "ログイン",
|
||||||
|
|
@ -146,6 +146,8 @@
|
||||||
"ImproveInformation": "情報を補完します",
|
"ImproveInformation": "情報を補完します",
|
||||||
"WhetherTodelete": "削除しますか",
|
"WhetherTodelete": "削除しますか",
|
||||||
"BusinessCooperation": "ビジネス提携です",
|
"BusinessCooperation": "ビジネス提携です",
|
||||||
"verifyActivityCoefficient": "活動係数を選択します"
|
"verifyActivityCoefficient": "活動係数を選択します",
|
||||||
|
"g": "g",
|
||||||
|
"oz": "oz"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
"titleConfirmPassword": "비밀번호 확인",
|
"titleConfirmPassword": "비밀번호 확인",
|
||||||
"titleForgotPassword": "비밀번호를 잊어버렸어요",
|
"titleForgotPassword": "비밀번호를 잊어버렸어요",
|
||||||
"titleCode": "인증 코드",
|
"titleCode": "인증 코드",
|
||||||
"titleLanguage": "언어 설정",
|
"titleLanguage": "언어",
|
||||||
"titleSendCode": "인증번호 받기",
|
"titleSendCode": "인증번호 받기",
|
||||||
"titleSendCodeRetry": "S 후 재발송",
|
"titleSendCodeRetry": "S 후 재발송",
|
||||||
"titleLogin": "로그인",
|
"titleLogin": "로그인",
|
||||||
|
|
@ -145,6 +145,8 @@
|
||||||
"ImproveInformation": "정보를 완벽하게하다.",
|
"ImproveInformation": "정보를 완벽하게하다.",
|
||||||
"WhetherTodelete": "삭제할지 여부",
|
"WhetherTodelete": "삭제할지 여부",
|
||||||
"BusinessCooperation": "상무 합작",
|
"BusinessCooperation": "상무 합작",
|
||||||
"verifyActivityCoefficient": "활동지수를 선택하십시오"
|
"verifyActivityCoefficient": "활동지수를 선택하십시오",
|
||||||
|
"g": "g",
|
||||||
|
"oz": "oz"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
"titleConfirmPassword": "Confirme a Senha",
|
"titleConfirmPassword": "Confirme a Senha",
|
||||||
"titleForgotPassword": "Esqueceu a senha",
|
"titleForgotPassword": "Esqueceu a senha",
|
||||||
"titleCode": "código de verificação",
|
"titleCode": "código de verificação",
|
||||||
"titleLanguage": "Configuração de Idioma",
|
"titleLanguage": "línguas",
|
||||||
"titleSendCode": "Obter código de verificação",
|
"titleSendCode": "Obter código de verificação",
|
||||||
"titleSendCodeRetry": "Reenvio posterior S",
|
"titleSendCodeRetry": "Reenvio posterior S",
|
||||||
"titleLogin": "Iniciar sessão",
|
"titleLogin": "Iniciar sessão",
|
||||||
|
|
@ -146,6 +146,8 @@
|
||||||
"ImproveInformation": "Aperfeiçoe a mensagem",
|
"ImproveInformation": "Aperfeiçoe a mensagem",
|
||||||
"WhetherTodelete": "Apagar sim não",
|
"WhetherTodelete": "Apagar sim não",
|
||||||
"BusinessCooperation": "Cooperação de negócios",
|
"BusinessCooperation": "Cooperação de negócios",
|
||||||
"verifyActivityCoefficient": "Por favor, selecione o coeficiente de atividade"
|
"verifyActivityCoefficient": "Por favor, selecione o coeficiente de atividade",
|
||||||
|
"g": "g",
|
||||||
|
"oz": "oz"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
"titleConfirmPassword": "Подтверждение пароля",
|
"titleConfirmPassword": "Подтверждение пароля",
|
||||||
"titleForgotPassword": "Забыли пароль",
|
"titleForgotPassword": "Забыли пароль",
|
||||||
"titleCode": "капча",
|
"titleCode": "капча",
|
||||||
"titleLanguage": "Языковые настройки",
|
"titleLanguage": "язык",
|
||||||
"titleSendCode": "Получить код подтверждения",
|
"titleSendCode": "Получить код подтверждения",
|
||||||
"titleSendCodeRetry": "S повторная отправка",
|
"titleSendCodeRetry": "S повторная отправка",
|
||||||
"titleLogin": "Войти",
|
"titleLogin": "Войти",
|
||||||
|
|
@ -145,6 +145,8 @@
|
||||||
"ImproveInformation": "Усовершенствовать информацию",
|
"ImproveInformation": "Усовершенствовать информацию",
|
||||||
"WhetherTodelete": "Удалить",
|
"WhetherTodelete": "Удалить",
|
||||||
"BusinessCooperation": "Деловое сотрудничество.",
|
"BusinessCooperation": "Деловое сотрудничество.",
|
||||||
"verifyActivityCoefficient": "Пожалуйста, выберите коэффициент активности"
|
"verifyActivityCoefficient": "Пожалуйста, выберите коэффициент активности",
|
||||||
|
"g": "g",
|
||||||
|
"oz": "oz"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
"titleConfirmPassword": "确认密码",
|
"titleConfirmPassword": "确认密码",
|
||||||
"titleForgotPassword": "忘记密码",
|
"titleForgotPassword": "忘记密码",
|
||||||
"titleCode": "验证码",
|
"titleCode": "验证码",
|
||||||
"titleLanguage": "语言设置",
|
"titleLanguage": "语言",
|
||||||
"titleSendCode": "获取验证码",
|
"titleSendCode": "获取验证码",
|
||||||
"titleSendCodeRetry": "S后重发",
|
"titleSendCodeRetry": "S后重发",
|
||||||
"titleLogin": "登录",
|
"titleLogin": "登录",
|
||||||
|
|
@ -144,5 +144,7 @@
|
||||||
"ImproveInformation": "完善信息",
|
"ImproveInformation": "完善信息",
|
||||||
"WhetherTodelete": "是否删除",
|
"WhetherTodelete": "是否删除",
|
||||||
"BusinessCooperation": "商务合作",
|
"BusinessCooperation": "商务合作",
|
||||||
"verifyActivityCoefficient": "请选择活动系数"
|
"verifyActivityCoefficient": "请选择活动系数",
|
||||||
|
"g": "克",
|
||||||
|
"oz": "盎司"
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name" : "kitchendDevice",
|
"name" : "Wendu",
|
||||||
"appid" : "__UNI__20604F1",
|
"appid" : "__UNI__20604F1",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.1.1",
|
"versionName" : "1.1.1",
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<image :src="item.icon"></image>
|
<image :src="item.icon"></image>
|
||||||
<image :src="item.pic_url" class="pic" v-if="item.pic_url"></image>
|
<image :src="item.pic_url" class="pic" v-if="item.pic_url"></image>
|
||||||
<view>{{item.name?item.name:'--'}}</view>
|
<view class="date overflow">{{item.name?item.name:'--'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>{{item.weight||0}}g</view>
|
<view>{{item.weight||0}}g</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<image :src="item.icon"></image>
|
<image :src="item.icon"></image>
|
||||||
<image :src="item.pic_url" class="pic" v-if="item.pic_url"></image>
|
<image :src="item.pic_url" class="pic" v-if="item.pic_url"></image>
|
||||||
<view>{{item.name?item.name:'--'}}</view>
|
<view class="date overflow">{{item.name?item.name:'--'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>{{item.weight||0}}g</view>
|
<view>{{item.weight||0}}g</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -92,7 +92,7 @@
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<image :src="item.icon"></image>
|
<image :src="item.icon"></image>
|
||||||
<image :src="item.pic_url" class="pic" v-if="item.pic_url"></image>
|
<image :src="item.pic_url" class="pic" v-if="item.pic_url"></image>
|
||||||
<view>{{item.name?item.name:'--'}}</view>
|
<view class="date overflow">{{item.name?item.name:'--'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>{{item.weight||0}}g</view>
|
<view>{{item.weight||0}}g</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -323,6 +323,10 @@
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.date {
|
||||||
|
width: calc(100% - 30px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,10 @@
|
||||||
<view class="color" :style="{'background-color':`${item.color}`}"></view>
|
<view class="color" :style="{'background-color':`${item.color}`}"></view>
|
||||||
<view>{{item.name}}</view>
|
<view>{{item.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view class="value">
|
||||||
<view>{{item.value}}{{item.unit}}<text>|</text>{{item.proportion}}%</view>
|
<text>{{item.value}}{{item.unit}}</text>
|
||||||
|
<text>|</text>
|
||||||
|
<text>{{item.proportion}}%</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -45,7 +47,7 @@
|
||||||
<view class="item" @click="showFoodDetail(ite)">
|
<view class="item" @click="showFoodDetail(ite)">
|
||||||
<image :src="ite.pic_url" mode="aspectFill"></image>
|
<image :src="ite.pic_url" mode="aspectFill"></image>
|
||||||
<view class="weight">
|
<view class="weight">
|
||||||
<view>{{ite.name}}</view>
|
<view class="overflow bold">{{ite.name}}</view>
|
||||||
<view class="size12 c999">{{ite.weight}}<text>|</text>{{ite.val}}kcal</view>
|
<view class="size12 c999">{{ite.weight}}<text>|</text>{{ite.val}}kcal</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -99,8 +101,7 @@
|
||||||
<view class="foodDetailItem" v-for="(item,index) in activeFoodDetail.nutrients_list"
|
<view class="foodDetailItem" v-for="(item,index) in activeFoodDetail.nutrients_list"
|
||||||
:key="index">
|
:key="index">
|
||||||
<view class="name">{{item.name_ch}}</view>
|
<view class="name">{{item.name_ch}}</view>
|
||||||
<view class="value">{{item.value}}{{item.unit}}
|
<view class="value">{{item.value}}{{item.unit}}</view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -226,8 +227,11 @@
|
||||||
// 添加食物
|
// 添加食物
|
||||||
handleAddFood() {
|
handleAddFood() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pageTwo/count/search?name=" + this.info.name + "&time=" + this.time
|
url: "/pageTwo/count/search?index=" + this.index + "&time=" + this.time
|
||||||
})
|
})
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: "/pageTwo/count/search?name=" + this.info.name + "&time=" + this.time
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
// 删除食材
|
// 删除食材
|
||||||
delAcitionItem(item) {
|
delAcitionItem(item) {
|
||||||
|
|
@ -306,7 +310,7 @@
|
||||||
|
|
||||||
.everyDay {
|
.everyDay {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 10px;
|
padding: 10px 0 10px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|
@ -328,7 +332,7 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
width: calc(100% - 270rpx);
|
width: 100%;
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
|
|
||||||
.info-item {
|
.info-item {
|
||||||
|
|
@ -342,11 +346,25 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
text {
|
.value {
|
||||||
color: #ccc;
|
:nth-child(1) {
|
||||||
margin: 0px 5px;
|
width: 50px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
:nth-child(2) {
|
||||||
|
color: #ccc;
|
||||||
|
margin: 0px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:nth-child(3) {
|
||||||
|
width: 50px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.color {
|
.color {
|
||||||
width: 10rpx;
|
width: 10rpx;
|
||||||
height: 10rpx;
|
height: 10rpx;
|
||||||
|
|
@ -417,7 +435,8 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-left: 10px;
|
width: calc(100% - 110rpx);
|
||||||
|
margin-left: 20rpx;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<view class="serachBox">
|
<view class="serachBox">
|
||||||
<view class="type">
|
<view class="type">
|
||||||
<picker mode="selector" @change="changeClickType" :range="foodItem" range-key="name">
|
<picker mode="selector" @change="changeClickType" :range="foodItem" range-key="name" :value="index">
|
||||||
<view>
|
<view>
|
||||||
{{foodName}}
|
{{foodName}}
|
||||||
<image src="/static/arrow-down.png"></image>
|
<image src="/static/arrow-down.png"></image>
|
||||||
|
|
@ -414,11 +414,13 @@
|
||||||
that.activeType.weight = weight
|
that.activeType.weight = weight
|
||||||
that.activeType.meals_type = that.foodName
|
that.activeType.meals_type = that.foodName
|
||||||
list.push(that.activeType)
|
list.push(that.activeType)
|
||||||
|
console.log("保存", that.user.aud_id, list, that.time)
|
||||||
that.$model.getAddIntakeFood({
|
that.$model.getAddIntakeFood({
|
||||||
aud_id: that.user.aud_id,
|
aud_id: that.user.aud_id,
|
||||||
food_list: list,
|
food_list: list,
|
||||||
time: that.time
|
time: that.time
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
console.log("33333333333", res)
|
||||||
if (res.code != 0) return
|
if (res.code != 0) return
|
||||||
if (that.time == that.user.food_count.date) {
|
if (that.time == that.user.food_count.date) {
|
||||||
that.$store.dispatch("getUserInfo")
|
that.$store.dispatch("getUserInfo")
|
||||||
|
|
@ -599,7 +601,7 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
right: 0px;
|
right: 30px;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -651,13 +653,20 @@
|
||||||
height: auto;
|
height: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
.history-list-item {
|
.history-list-item {
|
||||||
border: 1px solid #dfdfdf;
|
border: 1px solid #dfdfdf;
|
||||||
padding: 3px 24rpx;
|
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
margin-right: 20rpx;
|
width: 27%;
|
||||||
|
height: 30px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 2%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -694,19 +703,23 @@
|
||||||
.popular-food-inner {
|
.popular-food-inner {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: flex-start;
|
justify-content: space-between;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
|
||||||
.popular-food-subitem {
|
.popular-food-subitem {
|
||||||
display: flex;
|
border: 1px solid #dfdfdf;
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
padding: 10rpx 20rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
border: 1px solid #f7f7f7;
|
margin-bottom: 20rpx;
|
||||||
|
width: 27%;
|
||||||
|
height: 30px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 2%;
|
||||||
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -737,6 +750,10 @@
|
||||||
border: 1px solid #f7f7f7;
|
border: 1px solid #f7f7f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
view {
|
||||||
|
width: calc(100% - 90rpx);
|
||||||
|
}
|
||||||
|
|
||||||
text {
|
text {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
@ -820,17 +837,15 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 20rpx;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0rpx;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
height: 120rpx;
|
||||||
height: 60px;
|
|
||||||
padding-bottom: 15px;
|
|
||||||
z-index: 15;
|
z-index: 15;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
.subbtn {
|
.subbtn {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
@ -843,14 +858,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 110px;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
|
||||||
.che {
|
.che {
|
||||||
width: 80rpx;
|
width: 120rpx;
|
||||||
height: 80rpx;
|
height: 120rpx;
|
||||||
|
margin-left: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
|
|
@ -864,8 +880,8 @@
|
||||||
line-height: 30rpx;
|
line-height: 30rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
right: 0;
|
right: 5px;
|
||||||
top: 5px;
|
top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
image,
|
image,
|
||||||
|
|
@ -877,6 +893,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.type {
|
.type {
|
||||||
|
text-align: left;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-left: 10px;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
|
|
@ -955,7 +976,7 @@
|
||||||
|
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 65%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
|
@ -971,8 +992,10 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
|
width: calc(100% - 120rpx);
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
|
width: 100%;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
@ -1085,8 +1108,9 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
border-bottom: 1px solid #f1f1f1;
|
border-bottom: 1px solid #f1f1f1;
|
||||||
padding: 16rpx 0;
|
padding: 16rpx 0;
|
||||||
font-size: 24rpx;
|
font-size: 32rpx;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.foodDetailList {
|
.foodDetailList {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<view class="login">
|
<view class="login">
|
||||||
<view class="editem">
|
<view class="editem">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="text">{{$t("infoMobile")}}</view>
|
<view class="text">{{$t("infoEmail")}}</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input v-model="phone" type="text" />
|
<input v-model="phone" type="text" />
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -72,16 +72,11 @@
|
||||||
// 登录、
|
// 登录、
|
||||||
handleTelLogin() {
|
handleTelLogin() {
|
||||||
let that = this
|
let that = this
|
||||||
let phoneType = that.phone.indexOf("@") !== -1
|
|
||||||
if (that.value == 0) {
|
if (that.value == 0) {
|
||||||
that.$tools.msg(that.$t("verifyAgreement"))
|
that.$tools.msg(that.$t("verifyAgreement"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||||
that.$tools.msg(that.$t("verifyMobileCorrect"))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
|
||||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -104,8 +99,9 @@
|
||||||
let account = {
|
let account = {
|
||||||
data: that.phone,
|
data: that.phone,
|
||||||
password: that.password,
|
password: that.password,
|
||||||
c_password: that.password2,
|
confirm_password: that.password2,
|
||||||
code: that.code
|
code: that.code,
|
||||||
|
language: uni.getStorageSync('language')
|
||||||
}
|
}
|
||||||
let https = that.type == 'register' ? that.$model.getregister(account) : that.$model.getResetPassword(
|
let https = that.type == 'register' ? that.$model.getregister(account) : that.$model.getResetPassword(
|
||||||
account)
|
account)
|
||||||
|
|
@ -117,7 +113,7 @@
|
||||||
}
|
}
|
||||||
uni.setStorageSync('token', res.data.token)
|
uni.setStorageSync('token', res.data.token)
|
||||||
uni.setStorageSync('aan_id', res.data.aan_id)
|
uni.setStorageSync('aan_id', res.data.aan_id)
|
||||||
that.$store.dispatch("getUserInfo")
|
that.$store.dispatch("getHomeConfig")
|
||||||
that.$tools.msg(that.$t("msgSetPasswordSuccess"))
|
that.$tools.msg(that.$t("msgSetPasswordSuccess"))
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
|
|
@ -129,19 +125,13 @@
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
handleCode() {
|
handleCode() {
|
||||||
let that = this
|
let that = this
|
||||||
let phoneType = that.phone.indexOf("@") !== -1
|
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
|
||||||
that.$tools.msg(that.$t("verifyMobileCorrect"))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
|
||||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
that.$model.getSendCode({
|
that.$model.getSendCode({
|
||||||
data: that.phone,
|
data: that.phone,
|
||||||
type: that.type
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<view class="bg"></view>
|
<view class="bg"></view>
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<image></image>
|
<image></image>
|
||||||
<text>轻厨记</text>
|
<text>Wendu</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="login box_shadow">
|
<view class="login box_shadow">
|
||||||
<view class="title">{{$t("titleLogin")}}</view>
|
<view class="title">{{$t("titleLogin")}}</view>
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="editem">
|
<view class="editem">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="text">{{$t("titleAccountText")}}</view>
|
<view class="text">{{$t("infoEmail")}}</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input v-model="phone" />
|
<input v-model="phone" />
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -53,23 +53,6 @@
|
||||||
<text>{{$t("titleRegister")}}</text>
|
<text>{{$t("titleRegister")}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<!-- <view class="wxbtn">
|
|
||||||
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="value==1">
|
|
||||||
<view>
|
|
||||||
<image src="../../static/phone.png"></image>
|
|
||||||
</view>
|
|
||||||
<text>手机号快捷登录</text>
|
|
||||||
</button>
|
|
||||||
<button v-else @click="handleIsTel">
|
|
||||||
<view>
|
|
||||||
<image src="../../static/phone.png"></image>
|
|
||||||
</view>
|
|
||||||
<text>手机号快捷登录</text>
|
|
||||||
</button>
|
|
||||||
</view> -->
|
|
||||||
<!-- #endif -->
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -92,7 +75,6 @@
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: that.$t('titleLogin')
|
title: that.$t('titleLogin')
|
||||||
})
|
})
|
||||||
this.login()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkboxChange(e) {
|
checkboxChange(e) {
|
||||||
|
|
@ -101,16 +83,11 @@
|
||||||
// 登录、
|
// 登录、
|
||||||
handleTelLogin() {
|
handleTelLogin() {
|
||||||
let that = this
|
let that = this
|
||||||
let phoneType = that.phone.indexOf("@") !== -1
|
|
||||||
if (that.value == 0) {
|
if (that.value == 0) {
|
||||||
that.$tools.msg(that.$t("verifyAgreement"))
|
that.$tools.msg(that.$t("verifyAgreement"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||||
that.$tools.msg(that.$t("verifyMobileCorrect"))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
|
||||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -143,19 +120,13 @@
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
handleCode() {
|
handleCode() {
|
||||||
let that = this
|
let that = this
|
||||||
let phoneType = that.phone.indexOf("@") !== -1
|
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
|
||||||
that.$tools.msg(that.$t("verifyMobileCorrect"))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
|
||||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
that.$model.getSendCode({
|
that.$model.getSendCode({
|
||||||
data: that.phone,
|
data: that.phone,
|
||||||
// type: "login"
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
|
|
@ -173,40 +144,6 @@
|
||||||
}, 60000)
|
}, 60000)
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
},
|
},
|
||||||
// 获取code
|
|
||||||
login() {
|
|
||||||
let that = this
|
|
||||||
uni.login({
|
|
||||||
success(res) {
|
|
||||||
if (res.code) {
|
|
||||||
if (res.errMsg = "login:ok") {
|
|
||||||
that.loginCode = res.code
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 授权
|
|
||||||
getPhoneNumber(res) {
|
|
||||||
const that = this
|
|
||||||
if (res.detail.errMsg == 'getPhoneNumber:ok') {
|
|
||||||
this.$model.getRegisterPhone({
|
|
||||||
code: that.loginCode,
|
|
||||||
encryptedData: res.detail.encryptedData,
|
|
||||||
iv: res.detail.iv,
|
|
||||||
}).then(res => {
|
|
||||||
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"
|
|
||||||
})
|
|
||||||
}, 1000)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleIsTel() {
|
handleIsTel() {
|
||||||
if (this.value == 0) {
|
if (this.value == 0) {
|
||||||
this.$tools.msg(that.$t("verifyAgreement"))
|
this.$tools.msg(that.$t("verifyAgreement"))
|
||||||
|
|
|
||||||
|
|
@ -157,10 +157,10 @@
|
||||||
this.$tools.msg(that.$t('verifyWeight'))
|
this.$tools.msg(that.$t('verifyWeight'))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.memInfo.activity_level) {
|
// if (!this.memInfo.activity_level) {
|
||||||
this.$tools.msg(that.$t('verifyActivityCoefficient'))
|
// this.$tools.msg(that.$t('verifyActivityCoefficient'))
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
that.subInfo(this.memInfo)
|
that.subInfo(this.memInfo)
|
||||||
},
|
},
|
||||||
subInfo(data) {
|
subInfo(data) {
|
||||||
|
|
@ -232,16 +232,15 @@
|
||||||
|
|
||||||
.lan {
|
.lan {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
height: 100rpx;
|
padding: 10px 0;
|
||||||
line-height: 100rpx;
|
|
||||||
border-bottom: 1px solid #f7f7f7;
|
border-bottom: 1px solid #f7f7f7;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 24%;
|
width: 25%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
line-height: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -249,15 +248,13 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
width: 76%;
|
width: 75%;
|
||||||
height: 100rpx;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
||||||
|
|
||||||
/deep/input {
|
/deep/input {
|
||||||
height: 100rpx;
|
height: 70rpx;
|
||||||
line-height: 100rpx;
|
|
||||||
border: none;
|
border: none;
|
||||||
background: inherit;
|
background: inherit;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -269,9 +266,13 @@
|
||||||
|
|
||||||
picker {
|
picker {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
min-height: 70rpx;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
border: none;
|
border: none;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
view {
|
view {
|
||||||
padding-right: 18px;
|
padding-right: 18px;
|
||||||
|
|
@ -291,7 +292,7 @@
|
||||||
color: #828282;
|
color: #828282;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
top: 0;
|
top: 10px;
|
||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,19 +96,20 @@
|
||||||
.item {
|
.item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
width: 80px;
|
width: 100%;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
width: calc(100% - 100px);
|
width: 100%;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="caritem" @click="navTo('/pageTwo/setting/phone')">
|
<!-- <view class="caritem" @click="navTo('/pageTwo/setting/phone')">
|
||||||
<view class="text">{{$t('infoMobile')}}</view>
|
<view class="text">{{$t('infoMobile')}}</view>
|
||||||
<view class="text_r">
|
<view class="text_r">
|
||||||
<text>{{userinfo.tel?userinfo.tel:''}}</text>
|
<text>{{userinfo.tel?userinfo.tel:''}}</text>
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<text>{{userinfo.email}}</text>
|
<text>{{userinfo.email}}</text>
|
||||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="caritem" @click="navTo('/pageTwo/setting/password')">
|
<view class="caritem" @click="navTo('/pageTwo/setting/password')">
|
||||||
<view class="text">{{$t('titleSetPassword')}}</view>
|
<view class="text">{{$t('titleSetPassword')}}</view>
|
||||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||||
|
|
|
||||||
|
|
@ -24,14 +24,14 @@
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/count/count",
|
"path": "pages/count/count",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "计食",
|
"navigationBarTitleText": "",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/me/me",
|
"path": "pages/me/me",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "个人中心",
|
"navigationBarTitleText": " ",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="content_box">
|
<view v-else class="content_box">
|
||||||
<!-- 称重 -->
|
<!-- 称重 -->
|
||||||
<view class="blue-tooth">
|
<view class="blue-tooth" v-if="user.aud_id!=''">
|
||||||
<blue-tooth :btnType="btnType"></blue-tooth>
|
<blue-tooth :btnType="btnType"></blue-tooth>
|
||||||
</view>
|
</view>
|
||||||
<!-- 每日摄入 -->
|
<!-- 每日摄入 -->
|
||||||
|
|
@ -60,7 +60,8 @@
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-info-bottom">
|
<view class="right-info-bottom">
|
||||||
<view class="val" :style="{ width: ite.proportion + '%',background:ite.color}">
|
<view class="val"
|
||||||
|
:style="{ width: Number(ite.proportion) + '%',background:ite.color}">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -89,7 +90,7 @@
|
||||||
<view class="item" @click="showFoodDetail(ite)">
|
<view class="item" @click="showFoodDetail(ite)">
|
||||||
<image :src="ite.pic_url" mode="aspectFill"></image>
|
<image :src="ite.pic_url" mode="aspectFill"></image>
|
||||||
<view class="weight">
|
<view class="weight">
|
||||||
<view>{{ite.name}}</view>
|
<view class="overflow bold">{{ite.name}}</view>
|
||||||
<view class="size12 c999">{{ite.weight}}<text>|</text>{{ite.val}}kcal</view>
|
<view class="size12 c999">{{ite.weight}}<text>|</text>{{ite.val}}kcal</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -109,7 +110,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">{{$t('ImproveInformation')}}</view>
|
<view class="btn">{{$t('ImproveInformation')}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fenxi" @click="navTo('/pageTwo/count/everyDay?page=count')">
|
<view class="fenxi" @click="navTo('/pageTwo/count/everyDay?page=count')" v-if="user.aud_id!=''">
|
||||||
<image src="/static/fenxi.png"></image>
|
<image src="/static/fenxi.png"></image>
|
||||||
{{$t('titleeveryDay')}}
|
{{$t('titleeveryDay')}}
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -218,9 +219,9 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
uni.setNavigationBarTitle({
|
// uni.setNavigationBarTitle({
|
||||||
title: this.$t('titleCount')
|
// title: this.$t('titleCount')
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -483,6 +484,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
width: calc(100% - 110rpx);
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- 个人资料 -->
|
<!-- 个人资料 -->
|
||||||
<view v-if="token" class="content-box">
|
<view v-if="token" class="content-box">
|
||||||
<view class="box" v-if="info.aud_id!=''">
|
<view class="box" v-if="info.aud_id">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="name" @click="navTo('/pageTwo/me/userEdit')">
|
<view class="name" @click="navTo('/pageTwo/me/userEdit')">
|
||||||
<image :src="info.head_pic"></image>
|
<image :src="info.head_pic"></image>
|
||||||
|
|
@ -170,10 +170,10 @@
|
||||||
this.handTrue = false
|
this.handTrue = false
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.handTrue = true
|
this.handTrue = true
|
||||||
that.chartData.series[0].data = this.user.aud_id != "" ? Number(this.user.food_count
|
that.chartData.series[0].data = this.user.aud_id ? Number(this.user.food_count
|
||||||
.nutrients_four[0].proportion) / 100 : 0
|
.nutrients_four[0].proportion) / 100 : 0
|
||||||
})
|
})
|
||||||
return this.user.aud_id != "" ? this.user.food_count : this.configInfo.default_count_foot
|
return this.user.aud_id ? this.user.food_count : this.configInfo.default_count_foot
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -204,7 +204,7 @@
|
||||||
that.handTrue = false
|
that.handTrue = false
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
that.handTrue = true
|
that.handTrue = true
|
||||||
that.chartData.series[0].data = that.user.aud_id != "" ? Number(that.user.food_count
|
that.chartData.series[0].data = that.user.aud_id ? Number(that.user.food_count
|
||||||
.nutrients_four[0].proportion) / 100 : 0
|
.nutrients_four[0].proportion) / 100 : 0
|
||||||
})
|
})
|
||||||
this.startWatching()
|
this.startWatching()
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="head " v-else @click="handleUserEdit">
|
<view class="head " v-else @click="handleUserEdit">
|
||||||
<text class="size22">{{$t('ImproveInformation')}}</text>
|
<text class="size22">{{$t('msgAddUser')}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -64,7 +64,8 @@
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="navTo('/pageTwo/webview/webview?url=' + configInfo.business_cooperation.jump_url)">
|
<view class="item"
|
||||||
|
@click="navTo('/pageTwo/webview/webview?url=' + configInfo.business_cooperation.jump_url)">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image src="/static/14.png" mode=""></image>{{$t('BusinessCooperation')}}
|
<image src="/static/14.png" mode=""></image>{{$t('BusinessCooperation')}}
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -88,22 +89,21 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["user", 'configInfo']),
|
...mapState(["user", 'configInfo', "setLocale"]),
|
||||||
info() {
|
info() {
|
||||||
return this.user
|
return this.user
|
||||||
},
|
},
|
||||||
languageList() {
|
languageList() {
|
||||||
|
let that = this
|
||||||
|
let languageList = this.configInfo.language_arr
|
||||||
|
that.levelInd = languageList.findIndex(ite => ite.key == this.setLocale)
|
||||||
return this.configInfo.language_arr
|
return this.configInfo.language_arr
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onShow() {
|
||||||
let that = this
|
let that = this
|
||||||
uni.setNavigationBarTitle({
|
console.log(that.languageList, that.setLocale)
|
||||||
title: that.$t('titleMe')
|
|
||||||
})
|
|
||||||
console.log(uni.getStorageSync('language'))
|
|
||||||
that.token = uni.getStorageSync('token')
|
that.token = uni.getStorageSync('token')
|
||||||
that.levelInd = that.languageList.findIndex(ite => ite.key == uni.getStorageSync('language'))
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleOutLogin() {
|
handleOutLogin() {
|
||||||
|
|
@ -118,7 +118,6 @@
|
||||||
if (res.code != 0) return
|
if (res.code != 0) return
|
||||||
that.token = null
|
that.token = null
|
||||||
uni.setStorageSync('token', null)
|
uni.setStorageSync('token', null)
|
||||||
uni.clearStorageSync()
|
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/pageTwo/login/login"
|
url: "/pageTwo/login/login"
|
||||||
})
|
})
|
||||||
|
|
@ -255,7 +254,7 @@
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 50%;
|
// width: 70%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ export default {
|
||||||
dispatch
|
dispatch
|
||||||
}) {
|
}) {
|
||||||
return model.getHomeConfig({}).then(res => {
|
return model.getHomeConfig({}).then(res => {
|
||||||
|
console.log("配置接口", res.data)
|
||||||
commit('changeConfig', res.data)
|
commit('changeConfig', res.data)
|
||||||
dispatch("getUserInfo")
|
dispatch("getUserInfo")
|
||||||
return res.data
|
return res.data
|
||||||
|
|
@ -21,12 +22,14 @@ export default {
|
||||||
}) {
|
}) {
|
||||||
return model.getHomeUserInfo({}).then(res => {
|
return model.getHomeUserInfo({}).then(res => {
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
commit('changeUserInfo', {
|
tools.msg(res.msg)
|
||||||
aud_id: ""
|
|
||||||
})
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
commit('changeUserInfo', res.data)
|
if (res.data.weight == 0 || res.data.weight == null || res.data.weight == "") {
|
||||||
|
commit('changeUserInfo', {isEditInfo: true})
|
||||||
|
}else{
|
||||||
|
commit('changeUserInfo', res.data)
|
||||||
|
}
|
||||||
dispatch("getCountFoodInfo", {
|
dispatch("getCountFoodInfo", {
|
||||||
aud_id: res.data.aud_id,
|
aud_id: res.data.aud_id,
|
||||||
time: tools.getDate("start")
|
time: tools.getDate("start")
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ export default new Vuex.Store({
|
||||||
gender: "",
|
gender: "",
|
||||||
head_pic: "",
|
head_pic: "",
|
||||||
height: 0,
|
height: 0,
|
||||||
|
isEditInfo: false,
|
||||||
is_use_set_kcal: "",
|
is_use_set_kcal: "",
|
||||||
nickname: "",
|
nickname: "",
|
||||||
set_kcal: "",
|
set_kcal: "",
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ const httpRequest = (url, method = "get", data) => {
|
||||||
uni.request(httpDefaultOpts).then(
|
uni.request(httpDefaultOpts).then(
|
||||||
(res) => {
|
(res) => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
console.log("接口", url, res)
|
||||||
if (res[1].data.code == 20001) {
|
if (res[1].data.code == 20001) {
|
||||||
uni.clearStorageSync()
|
uni.clearStorageSync()
|
||||||
uni.setStorageSync('token', null)
|
uni.setStorageSync('token', null)
|
||||||
|
|
@ -67,11 +68,13 @@ function uploadFile(url, filePath) {
|
||||||
};
|
};
|
||||||
const get = (url, data) => {
|
const get = (url, data) => {
|
||||||
data.token = uni.getStorageSync('token') || ''
|
data.token = uni.getStorageSync('token') || ''
|
||||||
|
console.log("22222", url, data)
|
||||||
return httpRequest(url, 'get', data)
|
return httpRequest(url, 'get', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
const post = (url, data) => {
|
const post = (url, data) => {
|
||||||
data.token = uni.getStorageSync('token')|| ''
|
data.token = uni.getStorageSync('token') || ''
|
||||||
|
console.log("22222", url, data)
|
||||||
return httpRequest(url, 'post', data)
|
return httpRequest(url, 'post', data)
|
||||||
}
|
}
|
||||||
const upload = (url, filePath) => {
|
const upload = (url, filePath) => {
|
||||||
|
|
|
||||||
|
|
@ -62,26 +62,26 @@
|
||||||
<block v-if="type2d">
|
<block v-if="type2d">
|
||||||
<view v-if="ontouch" @tap="_tap">
|
<view v-if="ontouch" @tap="_tap">
|
||||||
<canvas :id="cid" :canvasId="cid"
|
<canvas :id="cid" :canvasId="cid"
|
||||||
:style="{ width: cWidth + 'rpx', height: cHeight + 'rpx', background: background }" type="2d"
|
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" type="2d"
|
||||||
:disable-scroll="disScroll" @touchstart="_touchStart" @touchmove="_touchMove" @touchend="_touchEnd"
|
:disable-scroll="disScroll" @touchstart="_touchStart" @touchmove="_touchMove" @touchend="_touchEnd"
|
||||||
@error="_error" v-show="showchart" />
|
@error="_error" v-show="showchart" />
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!ontouch" @tap="_tap">
|
<view v-if="!ontouch" @tap="_tap">
|
||||||
<canvas :id="cid" :canvasId="cid"
|
<canvas :id="cid" :canvasId="cid"
|
||||||
:style="{ width: cWidth + 'rpx', height: cHeight + 'rpx', background: background }" type="2d"
|
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" type="2d"
|
||||||
:disable-scroll="disScroll" @error="_error" v-show="showchart" />
|
:disable-scroll="disScroll" @error="_error" v-show="showchart" />
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-if="!type2d">
|
<block v-if="!type2d">
|
||||||
<view v-if="ontouch" @tap="_tap">
|
<view v-if="ontouch" @tap="_tap">
|
||||||
<canvas :id="cid" :canvasId="cid"
|
<canvas :id="cid" :canvasId="cid"
|
||||||
:style="{ width: cWidth + 'rpx', height: cHeight + 'rpx', background: background }"
|
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
||||||
@touchstart="_touchStart" @touchmove="_touchMove" @touchend="_touchEnd" :disable-scroll="disScroll"
|
@touchstart="_touchStart" @touchmove="_touchMove" @touchend="_touchEnd" :disable-scroll="disScroll"
|
||||||
@error="_error" v-if="showchart" />
|
@error="_error" v-if="showchart" />
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!ontouch">
|
<view v-if="!ontouch">
|
||||||
<canvas :id="cid" :canvasId="cid"
|
<canvas :id="cid" :canvasId="cid"
|
||||||
:style="{ width: cWidth + 'rpx', height: cHeight + 'rpx', background: background }"
|
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
||||||
:disable-scroll="disScroll" @tap="_tap" @error="_error" v-if="showchart" />
|
:disable-scroll="disScroll" @tap="_tap" @error="_error" v-if="showchart" />
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
var isReady=false;var onReadyCallbacks=[];
|
var isReady=false;var onReadyCallbacks=[];
|
||||||
var isServiceReady=false;var onServiceReadyCallbacks=[];
|
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","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 __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":"Wendu","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":"关于我们"}}];
|
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.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()})}});
|
__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}}}});
|
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}}}});
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
||||||
{"@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"}
|
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__20604F1","name":"Wendu","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"}
|
||||||
|
|
@ -152,10 +152,11 @@ var _default = (_onLaunch$onHide$onSh = {
|
||||||
handleoginversion: function handleoginversion() {
|
handleoginversion: function handleoginversion() {
|
||||||
var that = this;
|
var that = this;
|
||||||
that.$model.getloginversion({}).then(function (res) {
|
that.$model.getloginversion({}).then(function (res) {
|
||||||
console.log("res.data", res);
|
|
||||||
var language = res.data.language == "zh" ? 'zh-Hans' : res.data.language;
|
var language = res.data.language == "zh" ? 'zh-Hans' : res.data.language;
|
||||||
|
console.log("res.data", res.data.language, language, res);
|
||||||
uni.setLocale(language);
|
uni.setLocale(language);
|
||||||
that.$i18n.locale = language;
|
that.$i18n.locale = language;
|
||||||
|
that.$store.commit('changeLocale', res.data.language);
|
||||||
uni.setStorageSync('language', res.data.language);
|
uni.setStorageSync('language', res.data.language);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
that.$store.dispatch("getHomeConfig");
|
that.$store.dispatch("getHomeConfig");
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -182,11 +182,11 @@ var _default = {
|
||||||
// weight: "",
|
// weight: "",
|
||||||
inputDialog: false,
|
inputDialog: false,
|
||||||
unitList: [{
|
unitList: [{
|
||||||
name: "克",
|
name: this.$t("g"),
|
||||||
id: '00',
|
id: '00',
|
||||||
unit: "g"
|
unit: "g"
|
||||||
}, {
|
}, {
|
||||||
name: "盎司",
|
name: this.$t("oz"),
|
||||||
id: "08",
|
id: "08",
|
||||||
unit: "oz"
|
unit: "oz"
|
||||||
}],
|
}],
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -112,6 +112,9 @@
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
|
.everyDay .rank_list .date.data-v-69887c21 {
|
||||||
|
width: calc(100% - 30px);
|
||||||
|
}
|
||||||
.everyDay .top.data-v-69887c21 {
|
.everyDay .top.data-v-69887c21 {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
|
||||||
|
|
@ -321,8 +321,11 @@ var _default = {
|
||||||
// 添加食物
|
// 添加食物
|
||||||
handleAddFood: function handleAddFood() {
|
handleAddFood: function handleAddFood() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pageTwo/count/search?name=" + this.info.name + "&time=" + this.time
|
url: "/pageTwo/count/search?index=" + this.index + "&time=" + this.time
|
||||||
});
|
});
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: "/pageTwo/count/search?name=" + this.info.name + "&time=" + this.time
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
// 删除食材
|
// 删除食材
|
||||||
delAcitionItem: function delAcitionItem(item) {
|
delAcitionItem: function delAcitionItem(item) {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -63,7 +63,7 @@
|
||||||
}
|
}
|
||||||
.everyDay.data-v-1c5f368e {
|
.everyDay.data-v-1c5f368e {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 10px;
|
padding: 10px 0 10px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
width: calc(100% - 270rpx);
|
width: 100%;
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
}
|
}
|
||||||
.everyDay .progress .info .info-item.data-v-1c5f368e {
|
.everyDay .progress .info .info-item.data-v-1c5f368e {
|
||||||
|
|
@ -97,9 +97,17 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.everyDay .progress .info .info-item text.data-v-1c5f368e {
|
.everyDay .progress .info .info-item .value.data-v-1c5f368e :nth-child(1) {
|
||||||
|
width: 50px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.everyDay .progress .info .info-item .value.data-v-1c5f368e :nth-child(2) {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
margin: 0px 5px;
|
margin: 0px 2px;
|
||||||
|
}
|
||||||
|
.everyDay .progress .info .info-item .value.data-v-1c5f368e :nth-child(3) {
|
||||||
|
width: 50px;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
.everyDay .progress .info .info-item .color.data-v-1c5f368e {
|
.everyDay .progress .info .info-item .color.data-v-1c5f368e {
|
||||||
width: 10rpx;
|
width: 10rpx;
|
||||||
|
|
@ -160,7 +168,8 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-left: 10px;
|
width: calc(100% - 110rpx);
|
||||||
|
margin-left: 20rpx;
|
||||||
}
|
}
|
||||||
.foodtools .type .list .item .weight text.data-v-1c5f368e {
|
.foodtools .type .list .item .weight text.data-v-1c5f368e {
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
|
|
|
||||||
|
|
@ -469,11 +469,13 @@ var _default = {
|
||||||
that.activeType.weight = weight;
|
that.activeType.weight = weight;
|
||||||
that.activeType.meals_type = that.foodName;
|
that.activeType.meals_type = that.foodName;
|
||||||
list.push(that.activeType);
|
list.push(that.activeType);
|
||||||
|
console.log("保存", that.user.aud_id, list, that.time);
|
||||||
that.$model.getAddIntakeFood({
|
that.$model.getAddIntakeFood({
|
||||||
aud_id: that.user.aud_id,
|
aud_id: that.user.aud_id,
|
||||||
food_list: list,
|
food_list: list,
|
||||||
time: that.time
|
time: that.time
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
|
console.log("33333333333", res);
|
||||||
if (res.code != 0) return;
|
if (res.code != 0) return;
|
||||||
if (that.time == that.user.food_count.date) {
|
if (that.time == that.user.food_count.date) {
|
||||||
that.$store.dispatch("getUserInfo");
|
that.$store.dispatch("getUserInfo");
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -77,7 +77,7 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
right: 0px;
|
right: 30px;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
.serachBox .icon.data-v-d4f38c70 {
|
.serachBox .icon.data-v-d4f38c70 {
|
||||||
|
|
@ -120,13 +120,20 @@
|
||||||
height: auto;
|
height: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.history-list .history-list-item.data-v-d4f38c70 {
|
.history-list .history-list-item.data-v-d4f38c70 {
|
||||||
border: 1px solid #dfdfdf;
|
border: 1px solid #dfdfdf;
|
||||||
padding: 3px 24rpx;
|
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
margin-right: 20rpx;
|
width: 27%;
|
||||||
|
height: 30px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 2%;
|
||||||
}
|
}
|
||||||
.title.data-v-d4f38c70 {
|
.title.data-v-d4f38c70 {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
|
|
@ -159,19 +166,23 @@
|
||||||
.popular-container .popular-food-item .popular-food-inner.data-v-d4f38c70 {
|
.popular-container .popular-food-item .popular-food-inner.data-v-d4f38c70 {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: flex-start;
|
justify-content: space-between;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
.popular-container .popular-food-item .popular-food-inner .popular-food-subitem.data-v-d4f38c70 {
|
.popular-container .popular-food-item .popular-food-inner .popular-food-subitem.data-v-d4f38c70 {
|
||||||
display: flex;
|
border: 1px solid #dfdfdf;
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
padding: 10rpx 20rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
border: 1px solid #f7f7f7;
|
margin-bottom: 20rpx;
|
||||||
|
width: 27%;
|
||||||
|
height: 30px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 2%;
|
||||||
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
.search_list.data-v-d4f38c70 {
|
.search_list.data-v-d4f38c70 {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -197,6 +208,9 @@
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 1px solid #f7f7f7;
|
border: 1px solid #f7f7f7;
|
||||||
}
|
}
|
||||||
|
.search_list .search_list_item view.data-v-d4f38c70 {
|
||||||
|
width: calc(100% - 90rpx);
|
||||||
|
}
|
||||||
.search_list .search_list_item text.data-v-d4f38c70 {
|
.search_list .search_list_item text.data-v-d4f38c70 {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
@ -265,17 +279,15 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 20rpx;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0rpx;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
height: 120rpx;
|
||||||
height: 60px;
|
|
||||||
padding-bottom: 15px;
|
|
||||||
z-index: 15;
|
z-index: 15;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
.groupbtn .subbtn.data-v-d4f38c70 {
|
.groupbtn .subbtn.data-v-d4f38c70 {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
@ -287,13 +299,14 @@
|
||||||
background-color: #f0ae43;
|
background-color: #f0ae43;
|
||||||
}
|
}
|
||||||
.groupbtn .left.data-v-d4f38c70 {
|
.groupbtn .left.data-v-d4f38c70 {
|
||||||
width: 110px;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.groupbtn .left .che.data-v-d4f38c70 {
|
.groupbtn .left .che.data-v-d4f38c70 {
|
||||||
width: 80rpx;
|
width: 120rpx;
|
||||||
height: 80rpx;
|
height: 120rpx;
|
||||||
|
margin-left: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.groupbtn .left .che text.data-v-d4f38c70 {
|
.groupbtn .left .che text.data-v-d4f38c70 {
|
||||||
|
|
@ -307,8 +320,8 @@
|
||||||
line-height: 30rpx;
|
line-height: 30rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
right: 0;
|
right: 5px;
|
||||||
top: 5px;
|
top: 10px;
|
||||||
}
|
}
|
||||||
.groupbtn .left .che image.data-v-d4f38c70,
|
.groupbtn .left .che image.data-v-d4f38c70,
|
||||||
.groupbtn .left .che .t-icon.data-v-d4f38c70 {
|
.groupbtn .left .che .t-icon.data-v-d4f38c70 {
|
||||||
|
|
@ -316,6 +329,12 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
.groupbtn .left .type.data-v-d4f38c70 {
|
||||||
|
text-align: left;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
.groupbtn .left .type image.data-v-d4f38c70 {
|
.groupbtn .left .type image.data-v-d4f38c70 {
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
|
|
@ -379,7 +398,7 @@
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
}
|
}
|
||||||
.wrapper .foodItem .left.data-v-d4f38c70 {
|
.wrapper .foodItem .left.data-v-d4f38c70 {
|
||||||
width: 65%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
@ -394,8 +413,10 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
|
width: calc(100% - 120rpx);
|
||||||
}
|
}
|
||||||
.wrapper .foodItem .left .info .name.data-v-d4f38c70 {
|
.wrapper .foodItem .left .info .name.data-v-d4f38c70 {
|
||||||
|
width: 100%;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
@ -488,8 +509,9 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
border-bottom: 1px solid #f1f1f1;
|
border-bottom: 1px solid #f1f1f1;
|
||||||
padding: 16rpx 0;
|
padding: 16rpx 0;
|
||||||
font-size: 24rpx;
|
font-size: 32rpx;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.wrapper .foodContent .foodDetailList.data-v-d4f38c70 {
|
.wrapper .foodContent .foodDetailList.data-v-d4f38c70 {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ var render = function () {
|
||||||
var _vm = this
|
var _vm = this
|
||||||
var _h = _vm.$createElement
|
var _h = _vm.$createElement
|
||||||
var _c = _vm._self._c || _h
|
var _c = _vm._self._c || _h
|
||||||
var m0 = _vm.$t("infoMobile")
|
var m0 = _vm.$t("infoEmail")
|
||||||
var m1 = _vm.$t("titleCode")
|
var m1 = _vm.$t("titleCode")
|
||||||
var m2 = _vm.second < 60 ? _vm.$t("titleSendCodeRetry") : null
|
var m2 = _vm.second < 60 ? _vm.$t("titleSendCodeRetry") : null
|
||||||
var m3 = !(_vm.second < 60) ? _vm.$t("titleSendCode") : null
|
var m3 = !(_vm.second < 60) ? _vm.$t("titleSendCode") : null
|
||||||
|
|
@ -236,16 +236,11 @@ var _default = {
|
||||||
// 登录、
|
// 登录、
|
||||||
handleTelLogin: function handleTelLogin() {
|
handleTelLogin: function handleTelLogin() {
|
||||||
var that = this;
|
var that = this;
|
||||||
var phoneType = that.phone.indexOf("@") !== -1;
|
|
||||||
if (that.value == 0) {
|
if (that.value == 0) {
|
||||||
that.$tools.msg(that.$t("verifyAgreement"));
|
that.$tools.msg(that.$t("verifyAgreement"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!phoneType && !/^1[3456789]\d{9}$/.test(that.phone)) {
|
if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone)) {
|
||||||
that.$tools.msg(that.$t("verifyMobileCorrect"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (phoneType && !/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone)) {
|
|
||||||
that.$tools.msg(that.$t("verifyEmailCorrect"));
|
that.$tools.msg(that.$t("verifyEmailCorrect"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -268,8 +263,9 @@ var _default = {
|
||||||
var account = {
|
var account = {
|
||||||
data: that.phone,
|
data: that.phone,
|
||||||
password: that.password,
|
password: that.password,
|
||||||
c_password: that.password2,
|
confirm_password: that.password2,
|
||||||
code: that.code
|
code: that.code,
|
||||||
|
language: uni.getStorageSync('language')
|
||||||
};
|
};
|
||||||
var https = that.type == 'register' ? that.$model.getregister(account) : that.$model.getResetPassword(account);
|
var https = that.type == 'register' ? that.$model.getregister(account) : that.$model.getResetPassword(account);
|
||||||
return https.then(function (res) {
|
return https.then(function (res) {
|
||||||
|
|
@ -280,7 +276,7 @@ var _default = {
|
||||||
}
|
}
|
||||||
uni.setStorageSync('token', res.data.token);
|
uni.setStorageSync('token', res.data.token);
|
||||||
uni.setStorageSync('aan_id', res.data.aan_id);
|
uni.setStorageSync('aan_id', res.data.aan_id);
|
||||||
that.$store.dispatch("getUserInfo");
|
that.$store.dispatch("getHomeConfig");
|
||||||
that.$tools.msg(that.$t("msgSetPasswordSuccess"));
|
that.$tools.msg(that.$t("msgSetPasswordSuccess"));
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
|
|
@ -292,19 +288,13 @@ var _default = {
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
handleCode: function handleCode() {
|
handleCode: function handleCode() {
|
||||||
var that = this;
|
var that = this;
|
||||||
var phoneType = that.phone.indexOf("@") !== -1;
|
if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone)) {
|
||||||
if (!phoneType && !/^1[3456789]\d{9}$/.test(that.phone)) {
|
|
||||||
that.$tools.msg(that.$t("verifyMobileCorrect"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (phoneType && !/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone)) {
|
|
||||||
that.$tools.msg(that.$t("verifyEmailCorrect"));
|
that.$tools.msg(that.$t("verifyEmailCorrect"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
that.$model.getSendCode({
|
that.$model.getSendCode({
|
||||||
data: that.phone,
|
data: that.phone
|
||||||
type: that.type
|
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ var render = function () {
|
||||||
var _c = _vm._self._c || _h
|
var _c = _vm._self._c || _h
|
||||||
var m0 = _vm.$t("titleLogin")
|
var m0 = _vm.$t("titleLogin")
|
||||||
var m1 = _vm.$t("titleToggleLogin")
|
var m1 = _vm.$t("titleToggleLogin")
|
||||||
var m2 = _vm.$t("titleAccountText")
|
var m2 = _vm.$t("infoEmail")
|
||||||
var m3 = _vm.isCode ? _vm.$t("titleCode") : null
|
var m3 = _vm.isCode ? _vm.$t("titleCode") : null
|
||||||
var m4 = _vm.isCode && _vm.second < 60 ? _vm.$t("titleSendCodeRetry") : null
|
var m4 = _vm.isCode && _vm.second < 60 ? _vm.$t("titleSendCodeRetry") : null
|
||||||
var m5 = _vm.isCode && !(_vm.second < 60) ? _vm.$t("titleSendCode") : null
|
var m5 = _vm.isCode && !(_vm.second < 60) ? _vm.$t("titleSendCode") : null
|
||||||
|
|
@ -230,23 +230,6 @@ exports.default = void 0;
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
var _default = {
|
var _default = {
|
||||||
data: function data() {
|
data: function data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -265,7 +248,6 @@ var _default = {
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: that.$t('titleLogin')
|
title: that.$t('titleLogin')
|
||||||
});
|
});
|
||||||
this.login();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkboxChange: function checkboxChange(e) {
|
checkboxChange: function checkboxChange(e) {
|
||||||
|
|
@ -274,16 +256,11 @@ var _default = {
|
||||||
// 登录、
|
// 登录、
|
||||||
handleTelLogin: function handleTelLogin() {
|
handleTelLogin: function handleTelLogin() {
|
||||||
var that = this;
|
var that = this;
|
||||||
var phoneType = that.phone.indexOf("@") !== -1;
|
|
||||||
if (that.value == 0) {
|
if (that.value == 0) {
|
||||||
that.$tools.msg(that.$t("verifyAgreement"));
|
that.$tools.msg(that.$t("verifyAgreement"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!phoneType && !/^1[3456789]\d{9}$/.test(that.phone)) {
|
if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone)) {
|
||||||
that.$tools.msg(that.$t("verifyMobileCorrect"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (phoneType && !/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone)) {
|
|
||||||
that.$tools.msg(that.$t("verifyEmailCorrect"));
|
that.$tools.msg(that.$t("verifyEmailCorrect"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -316,19 +293,13 @@ var _default = {
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
handleCode: function handleCode() {
|
handleCode: function handleCode() {
|
||||||
var that = this;
|
var that = this;
|
||||||
var phoneType = that.phone.indexOf("@") !== -1;
|
if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone)) {
|
||||||
if (!phoneType && !/^1[3456789]\d{9}$/.test(that.phone)) {
|
|
||||||
that.$tools.msg(that.$t("verifyMobileCorrect"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (phoneType && !/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone)) {
|
|
||||||
that.$tools.msg(that.$t("verifyEmailCorrect"));
|
that.$tools.msg(that.$t("verifyEmailCorrect"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
that.$model.getSendCode({
|
that.$model.getSendCode({
|
||||||
data: that.phone
|
data: that.phone
|
||||||
// type: "login"
|
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
|
|
@ -346,40 +317,6 @@ var _default = {
|
||||||
}, 60000);
|
}, 60000);
|
||||||
}).catch(function (err) {});
|
}).catch(function (err) {});
|
||||||
},
|
},
|
||||||
// 获取code
|
|
||||||
login: function login() {
|
|
||||||
var that = this;
|
|
||||||
uni.login({
|
|
||||||
success: function success(res) {
|
|
||||||
if (res.code) {
|
|
||||||
if (res.errMsg = "login:ok") {
|
|
||||||
that.loginCode = res.code;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 授权
|
|
||||||
getPhoneNumber: function getPhoneNumber(res) {
|
|
||||||
var that = this;
|
|
||||||
if (res.detail.errMsg == 'getPhoneNumber:ok') {
|
|
||||||
this.$model.getRegisterPhone({
|
|
||||||
code: that.loginCode,
|
|
||||||
encryptedData: res.detail.encryptedData,
|
|
||||||
iv: res.detail.iv
|
|
||||||
}).then(function (res) {
|
|
||||||
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"
|
|
||||||
});
|
|
||||||
}, 1000);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleIsTel: function handleIsTel() {
|
handleIsTel: function handleIsTel() {
|
||||||
if (this.value == 0) {
|
if (this.value == 0) {
|
||||||
this.$tools.msg(that.$t("verifyAgreement"));
|
this.$tools.msg(that.$t("verifyAgreement"));
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<view class="content data-v-111bb4d3"><view class="bg data-v-111bb4d3"></view><view class="top data-v-111bb4d3"><image class="data-v-111bb4d3"></image><text class="data-v-111bb4d3">轻厨记</text></view><view class="login box_shadow data-v-111bb4d3"><view class="title data-v-111bb4d3">{{$root.m0}}</view><view data-event-opts="{{[['tap',[['handleToggle',['$event']]]]]}}" class="toggle cblue data-v-111bb4d3" bindtap="__e">{{''+$root.m1+''}}</view><view class="editem data-v-111bb4d3"><view class="item data-v-111bb4d3"><view class="text data-v-111bb4d3">{{$root.m2}}</view><view class="input data-v-111bb4d3"><input data-event-opts="{{[['input',[['__set_model',['','phone','$event',[]]]]]]}}" value="{{phone}}" bindinput="__e" class="data-v-111bb4d3"/></view></view><block wx:if="{{isCode}}"><view class="item data-v-111bb4d3"><view class="text data-v-111bb4d3">{{$root.m3}}</view><view class="input yanzhengma data-v-111bb4d3"><input data-event-opts="{{[['input',[['__set_model',['','code','$event',[]]]]]]}}" class="uni-input data-v-111bb4d3" value="{{code}}" bindinput="__e"/><button class="code data-v-111bb4d3" type="none" disabled="{{disabled}}" value="{{code}}" data-event-opts="{{[['tap',[['handleCode',['$event']]]],['input',[['__set_model',['','code','$event',[]]]]]]}}" bindtap="__e" bindinput="__e">{{(second<60?second+$root.m4:$root.m5)+''}}</button></view></view></block><block wx:else><view class="item data-v-111bb4d3"><view class="text data-v-111bb4d3">{{$root.m6}}</view><view class="input data-v-111bb4d3"><input data-event-opts="{{[['input',[['__set_model',['','password','$event',[]]]]]]}}" class="uni-input data-v-111bb4d3" value="{{password}}" bindinput="__e"/></view></view></block><block wx:if="{{!isCode}}"><view class="forget data-v-111bb4d3"><text data-event-opts="{{[['tap',[['handlePassword',['forgetPassword']]]]]}}" bindtap="__e" class="data-v-111bb4d3">{{$root.m7}}</text></view></block></view><view class="xieyi data-v-111bb4d3"><checkbox-group data-event-opts="{{[['change',[['checkboxChange',['$event']]]]]}}" class="group data-v-111bb4d3" bindchange="__e"><label class="data-v-111bb4d3"><checkbox style="transform:scale(0.7);" value="{{1}}" class="data-v-111bb4d3"></checkbox>{{$root.m8+''}}<text data-event-opts="{{[['tap',[['',['$event']],['handlexieyi',['$event']]]]]}}" class="blue data-v-111bb4d3" catchtap="__e">{{"《"+$root.m9+"》"}}</text></label></checkbox-group></view><view data-event-opts="{{[['tap',[['handleTelLogin',['$event']]]]]}}" class="btnlogin data-v-111bb4d3" bindtap="__e">{{$root.m10}}</view><view data-event-opts="{{[['tap',[['handlePassword',['register']]]]]}}" class="btngroup data-v-111bb4d3" bindtap="__e"><text class="data-v-111bb4d3">{{$root.m11}}</text></view></view></view>
|
<view class="content data-v-111bb4d3"><view class="bg data-v-111bb4d3"></view><view class="top data-v-111bb4d3"><image class="data-v-111bb4d3"></image><text class="data-v-111bb4d3">Wendu</text></view><view class="login box_shadow data-v-111bb4d3"><view class="title data-v-111bb4d3">{{$root.m0}}</view><view data-event-opts="{{[['tap',[['handleToggle',['$event']]]]]}}" class="toggle cblue data-v-111bb4d3" bindtap="__e">{{''+$root.m1+''}}</view><view class="editem data-v-111bb4d3"><view class="item data-v-111bb4d3"><view class="text data-v-111bb4d3">{{$root.m2}}</view><view class="input data-v-111bb4d3"><input data-event-opts="{{[['input',[['__set_model',['','phone','$event',[]]]]]]}}" value="{{phone}}" bindinput="__e" class="data-v-111bb4d3"/></view></view><block wx:if="{{isCode}}"><view class="item data-v-111bb4d3"><view class="text data-v-111bb4d3">{{$root.m3}}</view><view class="input yanzhengma data-v-111bb4d3"><input data-event-opts="{{[['input',[['__set_model',['','code','$event',[]]]]]]}}" class="uni-input data-v-111bb4d3" value="{{code}}" bindinput="__e"/><button class="code data-v-111bb4d3" type="none" disabled="{{disabled}}" value="{{code}}" data-event-opts="{{[['tap',[['handleCode',['$event']]]],['input',[['__set_model',['','code','$event',[]]]]]]}}" bindtap="__e" bindinput="__e">{{(second<60?second+$root.m4:$root.m5)+''}}</button></view></view></block><block wx:else><view class="item data-v-111bb4d3"><view class="text data-v-111bb4d3">{{$root.m6}}</view><view class="input data-v-111bb4d3"><input data-event-opts="{{[['input',[['__set_model',['','password','$event',[]]]]]]}}" class="uni-input data-v-111bb4d3" value="{{password}}" bindinput="__e"/></view></view></block><block wx:if="{{!isCode}}"><view class="forget data-v-111bb4d3"><text data-event-opts="{{[['tap',[['handlePassword',['forgetPassword']]]]]}}" bindtap="__e" class="data-v-111bb4d3">{{$root.m7}}</text></view></block></view><view class="xieyi data-v-111bb4d3"><checkbox-group data-event-opts="{{[['change',[['checkboxChange',['$event']]]]]}}" class="group data-v-111bb4d3" bindchange="__e"><label class="data-v-111bb4d3"><checkbox style="transform:scale(0.7);" value="{{1}}" class="data-v-111bb4d3"></checkbox>{{$root.m8+''}}<text data-event-opts="{{[['tap',[['',['$event']],['handlexieyi',['$event']]]]]}}" class="blue data-v-111bb4d3" catchtap="__e">{{"《"+$root.m9+"》"}}</text></label></checkbox-group></view><view data-event-opts="{{[['tap',[['handleTelLogin',['$event']]]]]}}" class="btnlogin data-v-111bb4d3" bindtap="__e">{{$root.m10}}</view><view data-event-opts="{{[['tap',[['handlePassword',['register']]]]]}}" class="btngroup data-v-111bb4d3" bindtap="__e"><text class="data-v-111bb4d3">{{$root.m11}}</text></view></view></view>
|
||||||
|
|
@ -263,10 +263,10 @@ var _default = {
|
||||||
this.$tools.msg(that.$t('verifyWeight'));
|
this.$tools.msg(that.$t('verifyWeight'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.memInfo.activity_level) {
|
// if (!this.memInfo.activity_level) {
|
||||||
this.$tools.msg(that.$t('verifyActivityCoefficient'));
|
// this.$tools.msg(that.$t('verifyActivityCoefficient'))
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
that.subInfo(this.memInfo);
|
that.subInfo(this.memInfo);
|
||||||
},
|
},
|
||||||
subInfo: function subInfo(data) {
|
subInfo: function subInfo(data) {
|
||||||
|
|
|
||||||
|
|
@ -51,29 +51,26 @@
|
||||||
}
|
}
|
||||||
.lan.data-v-0838061c {
|
.lan.data-v-0838061c {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
height: 100rpx;
|
padding: 10px 0;
|
||||||
line-height: 100rpx;
|
|
||||||
border-bottom: 1px solid #f7f7f7;
|
border-bottom: 1px solid #f7f7f7;
|
||||||
}
|
}
|
||||||
.lan .left.data-v-0838061c {
|
.lan .left.data-v-0838061c {
|
||||||
width: 24%;
|
width: 25%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
line-height: 20px;
|
|
||||||
}
|
}
|
||||||
.lan .right.data-v-0838061c {
|
.lan .right.data-v-0838061c {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
width: 76%;
|
width: 75%;
|
||||||
height: 100rpx;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
.lan .right.data-v-0838061c input {
|
.lan .right.data-v-0838061c input {
|
||||||
height: 100rpx;
|
height: 70rpx;
|
||||||
line-height: 100rpx;
|
|
||||||
border: none;
|
border: none;
|
||||||
background: inherit;
|
background: inherit;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -83,9 +80,13 @@
|
||||||
}
|
}
|
||||||
.lan .right picker.data-v-0838061c {
|
.lan .right picker.data-v-0838061c {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
min-height: 70rpx;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
border: none;
|
border: none;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
.lan .right picker view.data-v-0838061c {
|
.lan .right picker view.data-v-0838061c {
|
||||||
padding-right: 18px;
|
padding-right: 18px;
|
||||||
|
|
@ -102,7 +103,7 @@
|
||||||
color: #828282;
|
color: #828282;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
top: 0;
|
top: 10px;
|
||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,18 +48,19 @@
|
||||||
.login .editem .item.data-v-02e9ad9a {
|
.login .editem .item.data-v-02e9ad9a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
}
|
}
|
||||||
.login .editem .item .text.data-v-02e9ad9a {
|
.login .editem .item .text.data-v-02e9ad9a {
|
||||||
width: 80px;
|
width: 100%;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.login .editem .item .input.data-v-02e9ad9a {
|
.login .editem .item .input.data-v-02e9ad9a {
|
||||||
width: calc(100% - 100px);
|
width: 100%;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -125,16 +125,12 @@ var render = function () {
|
||||||
var _vm = this
|
var _vm = this
|
||||||
var _h = _vm.$createElement
|
var _h = _vm.$createElement
|
||||||
var _c = _vm._self._c || _h
|
var _c = _vm._self._c || _h
|
||||||
var m0 = _vm.$t("infoMobile")
|
var m0 = _vm.$t("titleSetPassword")
|
||||||
var m1 = _vm.$t("infoEmail")
|
|
||||||
var m2 = _vm.$t("titleSetPassword")
|
|
||||||
_vm.$mp.data = Object.assign(
|
_vm.$mp.data = Object.assign(
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
$root: {
|
$root: {
|
||||||
m0: m0,
|
m0: m0,
|
||||||
m1: m1,
|
|
||||||
m2: m2,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<view class="content data-v-4a3c3a21"><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/setting/phone']]]]]}}" class="caritem data-v-4a3c3a21" bindtap="__e"><view class="text data-v-4a3c3a21">{{$root.m0}}</view><view class="text_r data-v-4a3c3a21"><text class="data-v-4a3c3a21">{{userinfo.tel?userinfo.tel:''}}</text><uni-icons vue-id="0568e9f6-1" type="forward" size="20" color="#666" class="data-v-4a3c3a21" bind:__l="__l"></uni-icons></view></view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/setting/email']]]]]}}" class="caritem data-v-4a3c3a21" bindtap="__e"><view class="text data-v-4a3c3a21">{{$root.m1}}</view><view class="text_r data-v-4a3c3a21"><text class="data-v-4a3c3a21">{{userinfo.email}}</text><uni-icons vue-id="0568e9f6-2" type="forward" size="20" color="#666" class="data-v-4a3c3a21" bind:__l="__l"></uni-icons></view></view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/setting/password']]]]]}}" class="caritem data-v-4a3c3a21" bindtap="__e"><view class="text data-v-4a3c3a21">{{$root.m2}}</view><uni-icons vue-id="0568e9f6-3" type="forward" size="20" color="#666" class="data-v-4a3c3a21" bind:__l="__l"></uni-icons></view></view>
|
<view class="content data-v-4a3c3a21"><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/setting/password']]]]]}}" class="caritem data-v-4a3c3a21" bindtap="__e"><view class="text data-v-4a3c3a21">{{$root.m0}}</view><uni-icons vue-id="0568e9f6-1" type="forward" size="20" color="#666" class="data-v-4a3c3a21" bind:__l="__l"></uni-icons></view></view>
|
||||||
|
|
@ -149,33 +149,41 @@ var render = function () {
|
||||||
var m5 = !!_vm.token && _vm.user.aud_id != "" ? _vm.$t("titleBody") : null
|
var m5 = !!_vm.token && _vm.user.aud_id != "" ? _vm.$t("titleBody") : null
|
||||||
var l0 =
|
var l0 =
|
||||||
!!_vm.token && _vm.user.aud_id != ""
|
!!_vm.token && _vm.user.aud_id != ""
|
||||||
? _vm.foodInfo.nutrients_four.slice(1)
|
? _vm.__map(_vm.foodInfo.nutrients_four.slice(1), function (ite, ind) {
|
||||||
|
var $orig = _vm.__get_orig(ite)
|
||||||
|
var m6 = Number(ite.proportion)
|
||||||
|
return {
|
||||||
|
$orig: $orig,
|
||||||
|
m6: m6,
|
||||||
|
}
|
||||||
|
})
|
||||||
: null
|
: null
|
||||||
var l1 =
|
var l1 =
|
||||||
!!_vm.token && _vm.user.aud_id != ""
|
!!_vm.token && _vm.user.aud_id != ""
|
||||||
? _vm.__map(_vm.foodInfo.list, function (item, index) {
|
? _vm.__map(_vm.foodInfo.list, function (item, index) {
|
||||||
var $orig = _vm.__get_orig(item)
|
var $orig = _vm.__get_orig(item)
|
||||||
var m6 = _vm.$t("countMealdetails")
|
var m7 = _vm.$t("countMealdetails")
|
||||||
var m7 = _vm.$t("countAddFood")
|
var m8 = _vm.$t("countAddFood")
|
||||||
return {
|
return {
|
||||||
$orig: $orig,
|
$orig: $orig,
|
||||||
m6: m6,
|
|
||||||
m7: m7,
|
m7: m7,
|
||||||
|
m8: m8,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
: null
|
: null
|
||||||
var m8 = !!_vm.token && !(_vm.user.aud_id != "") ? _vm.$t("msgAddUser") : null
|
var m9 = !!_vm.token && !(_vm.user.aud_id != "") ? _vm.$t("msgAddUser") : null
|
||||||
var m9 =
|
var m10 =
|
||||||
!!_vm.token && !(_vm.user.aud_id != "")
|
!!_vm.token && !(_vm.user.aud_id != "")
|
||||||
? _vm.$t("ImproveInformation")
|
? _vm.$t("ImproveInformation")
|
||||||
: null
|
: null
|
||||||
var m10 = !!_vm.token ? _vm.$t("titleeveryDay") : null
|
var m11 =
|
||||||
var m11 = _vm.$t("CaloriesAndnutrients")
|
!!_vm.token && _vm.user.aud_id != "" ? _vm.$t("titleeveryDay") : null
|
||||||
|
var m12 = _vm.$t("CaloriesAndnutrients")
|
||||||
var l2 = _vm.activeFoodDetail.nutrients_four
|
var l2 = _vm.activeFoodDetail.nutrients_four
|
||||||
? _vm.activeFoodDetail.nutrients_four.slice(1)
|
? _vm.activeFoodDetail.nutrients_four.slice(1)
|
||||||
: null
|
: null
|
||||||
var m12 = _vm.$t("Nutrients")
|
var m13 = _vm.$t("Nutrients")
|
||||||
var m13 = _vm.$t("Content")
|
var m14 = _vm.$t("Content")
|
||||||
_vm.$mp.data = Object.assign(
|
_vm.$mp.data = Object.assign(
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
|
|
@ -188,13 +196,13 @@ var render = function () {
|
||||||
m5: m5,
|
m5: m5,
|
||||||
l0: l0,
|
l0: l0,
|
||||||
l1: l1,
|
l1: l1,
|
||||||
m8: m8,
|
|
||||||
m9: m9,
|
m9: m9,
|
||||||
m10: m10,
|
m10: m10,
|
||||||
m11: m11,
|
m11: m11,
|
||||||
l2: l2,
|
|
||||||
m12: m12,
|
m12: m12,
|
||||||
|
l2: l2,
|
||||||
m13: m13,
|
m13: m13,
|
||||||
|
m14: m14,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -302,9 +310,9 @@ var _default = {
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
onLoad: function onLoad() {
|
onLoad: function onLoad() {
|
||||||
uni.setNavigationBarTitle({
|
// uni.setNavigationBarTitle({
|
||||||
title: this.$t('titleCount')
|
// title: this.$t('titleCount')
|
||||||
});
|
// })
|
||||||
},
|
},
|
||||||
onShow: function onShow() {
|
onShow: function onShow() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText": "计食",
|
"navigationBarTitleText": "",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"qiun-data-charts": "/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts",
|
"qiun-data-charts": "/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts",
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -156,6 +156,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
width: calc(100% - 110rpx);
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
}
|
}
|
||||||
.foodtools .type .list .item .weight text.data-v-378efeb4 {
|
.foodtools .type .list .item .weight text.data-v-378efeb4 {
|
||||||
|
|
|
||||||
|
|
@ -127,17 +127,17 @@ var render = function () {
|
||||||
var _c = _vm._self._c || _h
|
var _c = _vm._self._c || _h
|
||||||
var m0 = !_vm.token ? _vm.$t("msgLoginTips") : null
|
var m0 = !_vm.token ? _vm.$t("msgLoginTips") : null
|
||||||
var m1 =
|
var m1 =
|
||||||
_vm.token && _vm.info.aud_id != "" && _vm.info.gender == "1"
|
_vm.token && _vm.info.aud_id && _vm.info.gender == "1"
|
||||||
? _vm.$t("infoMan")
|
? _vm.$t("infoMan")
|
||||||
: null
|
: null
|
||||||
var m2 =
|
var m2 =
|
||||||
_vm.token && _vm.info.aud_id != "" && !(_vm.info.gender == "1")
|
_vm.token && _vm.info.aud_id && !(_vm.info.gender == "1")
|
||||||
? _vm.$t("infoWoman")
|
? _vm.$t("infoWoman")
|
||||||
: null
|
: null
|
||||||
var m3 = _vm.token && _vm.info.aud_id != "" ? _vm.$t("infoAge") : null
|
var m3 = _vm.token && _vm.info.aud_id ? _vm.$t("infoAge") : null
|
||||||
var m4 = _vm.token && _vm.info.aud_id != "" ? _vm.$t("infoWeight") : null
|
var m4 = _vm.token && _vm.info.aud_id ? _vm.$t("infoWeight") : null
|
||||||
var m5 = _vm.token && _vm.info.aud_id != "" ? _vm.$t("infoHeight") : null
|
var m5 = _vm.token && _vm.info.aud_id ? _vm.$t("infoHeight") : null
|
||||||
var m6 = _vm.token && !(_vm.info.aud_id != "") ? _vm.$t("msgAddUser") : null
|
var m6 = _vm.token && !_vm.info.aud_id ? _vm.$t("msgAddUser") : null
|
||||||
var m7 = _vm.$t("titleeveryDay")
|
var m7 = _vm.$t("titleeveryDay")
|
||||||
var g0 = _vm.foodInfo.list.length
|
var g0 = _vm.foodInfo.list.length
|
||||||
var m8 = g0 ? _vm.$t("countIntake") : null
|
var m8 = g0 ? _vm.$t("countIntake") : null
|
||||||
|
|
@ -275,9 +275,9 @@ var _default = {
|
||||||
this.handTrue = false;
|
this.handTrue = false;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
_this.handTrue = true;
|
_this.handTrue = true;
|
||||||
that.chartData.series[0].data = _this.user.aud_id != "" ? Number(_this.user.food_count.nutrients_four[0].proportion) / 100 : 0;
|
that.chartData.series[0].data = _this.user.aud_id ? Number(_this.user.food_count.nutrients_four[0].proportion) / 100 : 0;
|
||||||
});
|
});
|
||||||
return this.user.aud_id != "" ? this.user.food_count : this.configInfo.default_count_foot;
|
return this.user.aud_id ? this.user.food_count : this.configInfo.default_count_foot;
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
onLoad: function onLoad() {
|
onLoad: function onLoad() {
|
||||||
|
|
@ -308,7 +308,7 @@ var _default = {
|
||||||
that.handTrue = false;
|
that.handTrue = false;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
that.handTrue = true;
|
that.handTrue = true;
|
||||||
that.chartData.series[0].data = that.user.aud_id != "" ? Number(that.user.food_count.nutrients_four[0].proportion) / 100 : 0;
|
that.chartData.series[0].data = that.user.aud_id ? Number(that.user.food_count.nutrients_four[0].proportion) / 100 : 0;
|
||||||
});
|
});
|
||||||
this.startWatching();
|
this.startWatching();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<view class="content data-v-57280228"><block wx:if="{{!token}}"><view data-event-opts="{{[['tap',[['handleLogin',['$event']]]]]}}" class="box1 box data-v-57280228" bindtap="__e"><view class="info2 data-v-57280228">{{''+$root.m0+''}}</view></view></block><block wx:if="{{token}}"><view class="content-box data-v-57280228"><block wx:if="{{info.aud_id!=''}}"><view class="box data-v-57280228"><view class="info data-v-57280228"><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/me/userEdit']]]]]}}" class="name data-v-57280228" bindtap="__e"><image src="{{info.head_pic}}" class="data-v-57280228"></image><text class="bold data-v-57280228">{{info.nickname}}</text><text class="data-v-57280228">{{info.gender=='1'?$root.m1:$root.m2}}</text></view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/me/userEdit']]]]]}}" class="edit data-v-57280228" bindtap="__e"><image src="/static/26.png" class="data-v-57280228"></image></view></view><view class="age data-v-57280228"><view class="age-item data-v-57280228"><view class="data-v-57280228"><text class="data-v-57280228">{{info.age}}</text></view><view class="data-v-57280228">{{$root.m3}}</view></view><view class="age-item age-item2 data-v-57280228"><view class="data-v-57280228"><text class="data-v-57280228">{{info.weight}}</text></view><view class="data-v-57280228">{{$root.m4}}</view></view><view class="age-item data-v-57280228"><view class="data-v-57280228"><text class="data-v-57280228">{{info.height}}</text></view><view class="data-v-57280228">{{$root.m5}}</view></view></view></view></block><block wx:else><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/me/userEdit']]]]]}}" class="box1 box data-v-57280228" bindtap="__e"><view class="info2 data-v-57280228">{{''+$root.m6+''}}</view></view></block></view></block><view class="jishiqi data-v-57280228"><view class="top data-v-57280228"><view class="date data-v-57280228">{{foodInfo.date}}</view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/count/everyDay?page=home']]]]]}}" class="detail data-v-57280228" bindtap="__e"><image src="/static/fenxi.png" class="data-v-57280228"></image>{{''+$root.m7+''}}</view></view><block wx:if="{{$root.g0}}"><view class="left data-v-57280228"><view class="chart-wrap data-v-57280228"><block wx:if="{{handTrue}}"><qiun-data-charts vue-id="8dd740cc-1" type="arcbar" chartData="{{chartData}}" cHeight="{{320}}" cWidth="{{320}}" class="data-v-57280228" bind:__l="__l"></qiun-data-charts></block><view class="center data-v-57280228">{{''+$root.m8+''}}<text class="data-v-57280228">{{foodInfo.nutrients_four[0].today_intake}}</text><view class="unit data-v-57280228">Kcal</view></view></view><view class="mubiao data-v-57280228">{{''+$root.m9+":"}}<text class="data-v-57280228">{{foodInfo.nutrients_four[0].suggestion}}</text>kcal</view></view></block><block wx:if="{{$root.g1}}"><view class="right data-v-57280228"><block wx:for="{{$root.l0}}" wx:for-item="ite" wx:for-index="ind"><view class="item data-v-57280228"><view class="left-icon data-v-57280228"><image src="{{ite.icon}}" class="data-v-57280228"></image><view class="val data-v-57280228" style="{{'color:'+(ite.color)+';'}}">{{(ite.proportion_fp||0)+"%"}}</view></view><view class="right-info data-v-57280228"><view class="right-info-top data-v-57280228"><text class="name data-v-57280228">{{ite.name}}</text><text class="data-v-57280228">{{''+(ite.today_intake||0)+"/"+(ite.suggestion||0)+'g'}}</text></view><view class="right-info-bottom data-v-57280228"><view class="val data-v-57280228" style="{{'width:'+(ite.proportion+'%')+';'+('background:'+(ite.color)+';')}}"></view></view></view></view></block></view></block></view><block wx:if="{{$root.g2}}"><view class="tools data-v-57280228"><block wx:for="{{$root.l1}}" wx:for-item="ite" wx:for-index="ind"><view class="tools-item data-v-57280228"><view class="title data-v-57280228"><image src="{{ite.$orig.icon}}" class="data-v-57280228"></image><text class="data-v-57280228">{{ite.$orig.name}}</text></view><view class="kcal data-v-57280228"><text class="data-v-57280228">{{ite.$orig.val}}</text>kcal</view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/count/search?index='+ind+'&time='+foodInfo.date]]]]]}}" class="tools-btn data-v-57280228" bindtap="__e">{{''+ite.m10+''}}</view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/count/everyMeal?page=home&index='+ind]]]]]}}" class="add data-v-57280228" bindtap="__e"><image src="/static/xiangqing.png" class="data-v-57280228"></image></view></view></block></view></block><block wx:if="{{$root.g3}}"><view class="f_banner footbox data-v-57280228"><swiper class="swiper data-v-57280228" circular="true"><block wx:for="{{configInfo.banner_data}}" wx:for-item="ite" wx:for-index="index"><swiper-item data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" data-event-params="{{({ite})}}" bindtap="__e" class="data-v-57280228"><image src="{{ite.pic}}" mode="aspectFill" class="data-v-57280228"></image></swiper-item></block></swiper></view></block></view>
|
<view class="content data-v-57280228"><block wx:if="{{!token}}"><view data-event-opts="{{[['tap',[['handleLogin',['$event']]]]]}}" class="box1 box data-v-57280228" bindtap="__e"><view class="info2 data-v-57280228">{{''+$root.m0+''}}</view></view></block><block wx:if="{{token}}"><view class="content-box data-v-57280228"><block wx:if="{{info.aud_id}}"><view class="box data-v-57280228"><view class="info data-v-57280228"><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/me/userEdit']]]]]}}" class="name data-v-57280228" bindtap="__e"><image src="{{info.head_pic}}" class="data-v-57280228"></image><text class="bold data-v-57280228">{{info.nickname}}</text><text class="data-v-57280228">{{info.gender=='1'?$root.m1:$root.m2}}</text></view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/me/userEdit']]]]]}}" class="edit data-v-57280228" bindtap="__e"><image src="/static/26.png" class="data-v-57280228"></image></view></view><view class="age data-v-57280228"><view class="age-item data-v-57280228"><view class="data-v-57280228"><text class="data-v-57280228">{{info.age}}</text></view><view class="data-v-57280228">{{$root.m3}}</view></view><view class="age-item age-item2 data-v-57280228"><view class="data-v-57280228"><text class="data-v-57280228">{{info.weight}}</text></view><view class="data-v-57280228">{{$root.m4}}</view></view><view class="age-item data-v-57280228"><view class="data-v-57280228"><text class="data-v-57280228">{{info.height}}</text></view><view class="data-v-57280228">{{$root.m5}}</view></view></view></view></block><block wx:else><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/me/userEdit']]]]]}}" class="box1 box data-v-57280228" bindtap="__e"><view class="info2 data-v-57280228">{{''+$root.m6+''}}</view></view></block></view></block><view class="jishiqi data-v-57280228"><view class="top data-v-57280228"><view class="date data-v-57280228">{{foodInfo.date}}</view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/count/everyDay?page=home']]]]]}}" class="detail data-v-57280228" bindtap="__e"><image src="/static/fenxi.png" class="data-v-57280228"></image>{{''+$root.m7+''}}</view></view><block wx:if="{{$root.g0}}"><view class="left data-v-57280228"><view class="chart-wrap data-v-57280228"><block wx:if="{{handTrue}}"><qiun-data-charts vue-id="8dd740cc-1" type="arcbar" chartData="{{chartData}}" cHeight="{{320}}" cWidth="{{320}}" class="data-v-57280228" bind:__l="__l"></qiun-data-charts></block><view class="center data-v-57280228">{{''+$root.m8+''}}<text class="data-v-57280228">{{foodInfo.nutrients_four[0].today_intake}}</text><view class="unit data-v-57280228">Kcal</view></view></view><view class="mubiao data-v-57280228">{{''+$root.m9+":"}}<text class="data-v-57280228">{{foodInfo.nutrients_four[0].suggestion}}</text>kcal</view></view></block><block wx:if="{{$root.g1}}"><view class="right data-v-57280228"><block wx:for="{{$root.l0}}" wx:for-item="ite" wx:for-index="ind"><view class="item data-v-57280228"><view class="left-icon data-v-57280228"><image src="{{ite.icon}}" class="data-v-57280228"></image><view class="val data-v-57280228" style="{{'color:'+(ite.color)+';'}}">{{(ite.proportion_fp||0)+"%"}}</view></view><view class="right-info data-v-57280228"><view class="right-info-top data-v-57280228"><text class="name data-v-57280228">{{ite.name}}</text><text class="data-v-57280228">{{''+(ite.today_intake||0)+"/"+(ite.suggestion||0)+'g'}}</text></view><view class="right-info-bottom data-v-57280228"><view class="val data-v-57280228" style="{{'width:'+(ite.proportion+'%')+';'+('background:'+(ite.color)+';')}}"></view></view></view></view></block></view></block></view><block wx:if="{{$root.g2}}"><view class="tools data-v-57280228"><block wx:for="{{$root.l1}}" wx:for-item="ite" wx:for-index="ind"><view class="tools-item data-v-57280228"><view class="title data-v-57280228"><image src="{{ite.$orig.icon}}" class="data-v-57280228"></image><text class="data-v-57280228">{{ite.$orig.name}}</text></view><view class="kcal data-v-57280228"><text class="data-v-57280228">{{ite.$orig.val}}</text>kcal</view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/count/search?index='+ind+'&time='+foodInfo.date]]]]]}}" class="tools-btn data-v-57280228" bindtap="__e">{{''+ite.m10+''}}</view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/count/everyMeal?page=home&index='+ind]]]]]}}" class="add data-v-57280228" bindtap="__e"><image src="/static/xiangqing.png" class="data-v-57280228"></image></view></view></block></view></block><block wx:if="{{$root.g3}}"><view class="f_banner footbox data-v-57280228"><swiper class="swiper data-v-57280228" circular="true"><block wx:for="{{configInfo.banner_data}}" wx:for-item="ite" wx:for-index="index"><swiper-item data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" data-event-params="{{({ite})}}" bindtap="__e" class="data-v-57280228"><image src="{{ite.pic}}" mode="aspectFill" class="data-v-57280228"></image></swiper-item></block></swiper></view></block></view>
|
||||||
|
|
@ -125,7 +125,7 @@ var render = function () {
|
||||||
var _vm = this
|
var _vm = this
|
||||||
var _h = _vm.$createElement
|
var _h = _vm.$createElement
|
||||||
var _c = _vm._self._c || _h
|
var _c = _vm._self._c || _h
|
||||||
var m0 = _vm.token && !_vm.info.aud_id ? _vm.$t("ImproveInformation") : null
|
var m0 = _vm.token && !_vm.info.aud_id ? _vm.$t("msgAddUser") : null
|
||||||
var m1 = _vm.$t("infoPersonalProfile")
|
var m1 = _vm.$t("infoPersonalProfile")
|
||||||
var m2 = _vm.$t("titleHistory")
|
var m2 = _vm.$t("titleHistory")
|
||||||
var m3 = _vm.$t("titleLanguage")
|
var m3 = _vm.$t("titleLanguage")
|
||||||
|
|
@ -197,24 +197,24 @@ var _default = {
|
||||||
levelInd: 0
|
levelInd: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["user", 'configInfo'])), {}, {
|
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["user", 'configInfo', "setLocale"])), {}, {
|
||||||
info: function info() {
|
info: function info() {
|
||||||
return this.user;
|
return this.user;
|
||||||
},
|
},
|
||||||
languageList: function languageList() {
|
languageList: function languageList() {
|
||||||
|
var _this = this;
|
||||||
|
var that = this;
|
||||||
|
var languageList = this.configInfo.language_arr;
|
||||||
|
that.levelInd = languageList.findIndex(function (ite) {
|
||||||
|
return ite.key == _this.setLocale;
|
||||||
|
});
|
||||||
return this.configInfo.language_arr;
|
return this.configInfo.language_arr;
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
onLoad: function onLoad() {
|
onShow: function onShow() {
|
||||||
var that = this;
|
var that = this;
|
||||||
uni.setNavigationBarTitle({
|
console.log(that.languageList, that.setLocale);
|
||||||
title: that.$t('titleMe')
|
|
||||||
});
|
|
||||||
console.log(uni.getStorageSync('language'));
|
|
||||||
that.token = uni.getStorageSync('token');
|
that.token = uni.getStorageSync('token');
|
||||||
that.levelInd = that.languageList.findIndex(function (ite) {
|
|
||||||
return ite.key == uni.getStorageSync('language');
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleOutLogin: function handleOutLogin() {
|
handleOutLogin: function handleOutLogin() {
|
||||||
|
|
@ -229,7 +229,6 @@ var _default = {
|
||||||
if (res.code != 0) return;
|
if (res.code != 0) return;
|
||||||
that.token = null;
|
that.token = null;
|
||||||
uni.setStorageSync('token', null);
|
uni.setStorageSync('token', null);
|
||||||
uni.clearStorageSync();
|
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/pageTwo/login/login"
|
url: "/pageTwo/login/login"
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText": "个人中心",
|
"navigationBarTitleText": " ",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue