多语言(中文版)

This commit is contained in:
qiaocl 2025-04-18 14:53:38 +08:00
parent f00f9472b5
commit 323810464b
209 changed files with 5462 additions and 3426 deletions

194
App.vue
View File

@ -1,13 +1,14 @@
<script>
let platform = ""
let SystemVersion = ""
export default {
data() {
return {}
},
onLaunch: function() {
let that = this
// apk
// #ifdef APP-PLUS
//
uni.getSystemInfo({
success(e) {
platform = e.platform
@ -20,8 +21,6 @@
if (platform === 'ios') { // ios
uni.onNetworkStatusChange(function(res) {
if (res.isConnected == true) {
that.handleCityList()
that.handleCooperationUrl()
uni.reLaunch({
url: '/pageTwo/login/login'
})
@ -29,14 +28,43 @@
}
});
}
that.checkForUpdates()
plus.runtime.getProperty(plus.runtime.appid, function(info) {
uni.setStorageSync('VERSION', info.version)
SystemVersion = info.version
that.$store.commit('changePhoneInfo', {
info: info
})
console.log("222222222", info.version, SystemVersion)
})
// #endif
// #ifdef MP-WEIXIN
//
that.updataWeiXin() //
// #endif
//
uni.$on('login-sucesss', function() {
console.log('on login-sucesss')
that.handleUserList()
that.handleBannerList()
setTimeout(() => {
uni.reLaunch({
url: '/pages/home/home'
})
}, 500)
})
//
uni.$on('need-login', function() {
uni.setStorageSync('token', null)
uni.setStorageSync('aan_id', null)
uni.clearStorageSync()
setTimeout(() => {
uni.reLaunch({
url: '/pageTwo/login/login'
})
}, 500);
})
that.handleoginversion()
that.handleCityList()
that.handleCooperationUrl()
that.updataWeiXin()
// #endif
console.log('App Launch')
},
onShow: function() {
@ -51,39 +79,31 @@
// #endif
},
methods: {
//
checkForUpdates() {
let that = this
plus.runtime.getProperty(plus.runtime.appid, function(info) {
uni.setStorageSync('VERSION', info.version)
that.$store.commit('changePhoneInfo', {
info: info
})
console.log("当前应用版本号", info)
that.handleCityList()
that.handleCooperationUrl()
that.handleoginversion(info)
})
},
//
handleoginversion(info) {
handleoginversion() {
let that = this
that.$model.getloginversion({}).then(res => {
console.log("是否登录及版本号", res)
that.handleCancelUpdate(res.code)
let language = res.data.language == "zh" ? 'zh-Hans' : res.data.language
uni.setLocale(language)
uni.setStorageSync('language', res.data.language)
if (res.code == 0) {
uni.$emit('login-sucesss');
} else {
uni.$emit('need-login');
}
// #ifdef APP-PLUS||APP
let currentVersion = info.version;
let latestVersion = res.data.version
that.$store.commit('changePhoneInfo', {
versionUrl: res.data
})
//
let version = that.$tools.compareVersions(currentVersion, latestVersion)
let version = that.$tools.compareVersions(SystemVersion, res.data.version)
console.log("是否登录及版本号", res.data.version, SystemVersion, version)
if (version == -1) { // 01-1
uni.showModal({
title: '发现新版本',
content: '检查到新版本' + res.data.version + ',是否更新?',
cancelText: that.$t('tips.btnSancellation'),
confirmText: that.$t('tips.btnConfirm'),
success: (modalRes) => {
if (modalRes.confirm) { //
if (platform === 'android') { //
@ -91,39 +111,6 @@
uni.navigateTo({
url: "/pageTwo/my/about"
})
// let showLoading = plus.nativeUI.showWaiting('')
// const dtask = uni.downloadFile({
// url: res.data.url,
// success: (downloadRes) => {
// if (downloadRes.statusCode === 200) {
// plus.nativeUI.closeWaiting()
// plus.runtime.install(
// downloadRes.tempFilePath, {
// force: true
// },
// function() {
// plus.runtime.restart();
// console.log(
// 'install success...'
// );
// },
// function(e) {
// console.error(
// 'install fail...');
// });
// }
// },
// fail: () => {
// uni.showToast({
// title: '',
// icon: 'none'
// });
// }
// });
// dtask.onProgressUpdate((res) => {
// showLoading.setTitle(" " + res.progress +
// "% ");
// });
} else { //ios
plus.runtime.launchApplication({
action: `itms-apps://itunes.apple.com/cn/app/id6654906497?mt=8`
@ -138,26 +125,77 @@
// #endif
})
},
//
handleCancelUpdate(code) {
//
handleUserList() {
let that = this
if (code == 0) {
uni.reLaunch({
url: "/pages/home/home?type=1"
})
} else {
setTimeout(() => {
uni.reLaunch({
url: '/pageTwo/login/login'
that.$model.getUserList({
type: 2
}).then(res => {
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.$store.commit('changeFamilay', res.data)
if (res.data.length) {
let userid = ""
if (uni.getStorageSync('userid')) {
let found = res.data.find(e => e.id == uni.getStorageSync('userid'));
if (found !== undefined) {
userid = found.id
} else {
userid = res.data[0].id
uni.setStorageSync('userid', res.data[0].id)
}
} else {
userid = res.data[0].id
uni.setStorageSync('userid', res.data[0].id)
}
that.$store.dispatch('getUserInfo', {
aud_id: userid
})
}, 500);
}
that.$store.dispatch("getResult", {
aud_id: userid
})
that.handleLabelList(userid)
that.handlePublicRecord(userid)
}
})
},
//
handleLabelList(id) {
let that = this
that.$model.getLabelList({
aud_id: id
}).then(res => {
if (res.code == 0) {
that.$store.commit('changeLabelList', res.data)
}
})
},
//
handlePublicRecord(id) {
let that = this
that.$model.getPublicRecord({
aud_id: id
}).then(res => {
if (res.code == 0) {
that.$store.commit('changePublicRecord', res.data)
}
})
},
// banner
handleBannerList() {
let that = this
that.$model.getBannerList({}).then(res => {
if (res.code == 0) {
that.$store.commit('changeBannerAll', res.data)
}
})
},
//
handleCityList() {
let that = this
that.$model.getGradeList({}).then((res) => {
// console.log("|", res.data)
if (res.code != 0) return
that.$store.commit('changeCityList', res.data.area_list)
that.$store.commit('changeGradeList', res.data.grade_list)
@ -168,7 +206,6 @@
handleCooperationUrl() {
let that = this
that.$model.getCooperationUrl({}).then((res) => {
// console.log("", res.data)
if (res.code != 0) return
this.$store.commit("changeCooperationUrl", res.data);
})
@ -177,17 +214,14 @@
updataWeiXin() {
let that = this
const updateManager = uni.getUpdateManager()
//
updateManager.onCheckForUpdate(function(res) {
// console.log("", res.hasUpdate)
})
updateManager.onUpdateReady(function() {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
cancelText: that.$t('tips.btnSancellation'),
confirmText: that.$t('tips.btnConfirm'),
success: function(res) {
if (res.confirm) {
// applyUpdate
updateManager.applyUpdate()
}
}

View File

@ -15,11 +15,11 @@
<view class="overflow">
{{item.nickname}}
</view>
<view class="dangqian" v-if="item.id == userinfo.id">当前</view>
<view class="dangqian" v-if="item.id == userinfo.id">{{$t("common.infoNowUser")}}</view>
</view>
<view class="info">
<view>{{item.gender==1?'男':'女'}}</view>
<view>{{item.age}}</view>
<view>{{item.gender==1?$t("common.infoMan"):$t("common.infoWoman")}}</view>
<view>{{item.age}}{{$t("common.infoAgeunit")}}</view>
</view>
</view>
</view>

View File

@ -8,16 +8,16 @@
<view class="info" @click="handleAddUser(1)">
<view class="size18 bold">{{info.nickname}}</view>
<view class="mt-5">
<text class="mr-10">性别{{info.gender==1?'男':info.gender==2?'女':'未知'}}</text>
<text class="ml-10">年龄{{info.age}}</text>
<text class="mr-10">{{$t("common.infoGender")}}{{info.gender==1?$t("common.infoMan"):info.gender==2?$t("common.infoWoman"):$t("common.infoUnknown")}}</text>
<text class="ml-10">{{$t("common.infoAge")}}{{info.age}}{{$t("common.infoAgeunit")}}</text>
</view>
<view class="mt-5" v-if="info.measure_model==1">当前地区{{info.address}}</view>
<view class="mt-5" v-if="info.measure_model==1">{{$t("common.infoNowUser")}}{{$t("common.infoAddress")}}{{info.address}}</view>
</view>
<text class="t-icon t-icon-qiehuan1" @click="$store.commit('changeDrawe', true)" v-if="isLeft"></text>
</view>
<view class="top" v-else @click="handleAddUser(2)">
<view class="info">
暂无成员请先添加~
{{$t("tips.msgAddUser")}}
</view>
<view class="add">
+

View File

@ -1,434 +1,434 @@
<template>
<view class="calendar-wrapper">
<view class="header">
<view class="pre" @click="changeMonth('pre')">
<uni-icons type="back" size="26"></uni-icons>
</view>
<view>{{y+'年'+formatNum(m)+'月'}}</view>
<view class="next" @click="changeMonth('next')">
<uni-icons type="forward" size="26"></uni-icons>
</view>
</view>
<view class="week">
<view class="week-day" v-for="(item, index) in weekDay" :key="index">{{ item }}</view>
</view>
<view :class="{ hide: !monthOpen }" class="content0" :style="{ height: height }">
<view :style="{ top: positionTop + 'rpx' }" class="days">
<view class="item" v-for="(item, index) in dates" :key="index">
<view class="day" @click="selectOne(item, $event)" :class="{
<view class="calendar-wrapper">
<view class="header">
<view class="pre" @click="changeMonth('pre')">
<uni-icons type="back" size="26"></uni-icons>
</view>
<view>{{y+'-'+formatNum(m)}}</view>
<view class="next" @click="changeMonth('next')">
<uni-icons type="forward" size="26"></uni-icons>
</view>
</view>
<view class="week">
<view class="week-day" v-for="(item, index) in weekDay" :key="index">{{ item }}</view>
</view>
<view :class="{ hide: !monthOpen }" class="content0" :style="{ height: height }">
<view :style="{ top: positionTop + 'rpx' }" class="days">
<view class="item" v-for="(item, index) in dates" :key="index">
<view class="day" @click="selectOne(item, $event)" :class="{
choose: choose == `${item.year}-${item.month}-${item.date}`&&item.isCurM,
nolm: !item.isCurM,
today: isToday(item.year, item.month, item.date),
isWorkDay: isWorkDay(item.year, item.month, item.date)
}">
{{ Number(item.date) }}
</view>
<view class="markDay" v-if="isMarkDay(item.year, item.month, item.date)&&item.isCurM"></view>
<!-- <view class="today-text" v-if="isToday(item.year, item.month, item.date)"></view> -->
</view>
</view>
</view>
<image src="https://i.loli.net/2020/07/16/2MmZsucVTlRjSwK.png" mode="scaleToFill" v-if="collapsible"
@click="toggle" class="weektoggle" :class="{ down: monthOpen }"></image>
</view>
{{ Number(item.date) }}
</view>
<view class="markDay" v-if="isMarkDay(item.year, item.month, item.date)&&item.isCurM"></view>
<!-- <view class="today-text" v-if="isToday(item.year, item.month, item.date)"></view> -->
</view>
</view>
</view>
<image src="https://i.loli.net/2020/07/16/2MmZsucVTlRjSwK.png" mode="scaleToFill" v-if="collapsible"
@click="toggle" class="weektoggle" :class="{ down: monthOpen }"></image>
</view>
</template>
<script>
export default {
name: 'ren-calendar',
props: {
// (0)
weekstart: {
type: Number,
default: 0
},
//
markDays: {
type: Array,
default: () => {
return [];
}
},
//
headerBar: {
type: Boolean,
default: true
},
//
open: {
type: Boolean,
default: true
},
//
collapsible: {
type: Boolean,
default: true
},
//
disabledAfter: {
type: Boolean,
default: true
}
},
data() {
return {
weektext: ['日', '一', '二', '三', '四', '五', '六'],
y: new Date().getFullYear(), //
m: new Date().getMonth() + 1, //
dates: [], //
positionTop: 0,
monthOpen: true,
choose: '',
month: null,
};
},
created() {
this.dates = this.monthDay(this.y, this.m);
!this.open && this.toggle();
},
mounted() {
this.y = new Date().getFullYear()
this.m = new Date().getMonth() + 1
this.month = this.$tools.getDate("m")
this.choose = this.getToday().date;
},
computed: {
//
weekDay() {
return this.weektext.slice(this.weekstart).concat(this.weektext.slice(0, this.weekstart));
},
height() {
return (this.dates.length / 7) * 80 + 'rpx';
},
},
methods: {
formatNum(num) {
let res = Number(num);
return res < 10 ? '0' + res : res;
},
getToday() {
let date = new Date();
let y = date.getFullYear();
let m = date.getMonth();
let d = date.getDate();
let week = new Date().getDay();
let weekText = ['日', '一', '二', '三', '四', '五', '六'];
let formatWeek = '星期' + weekText[week];
let today = {
date: y + '-' + this.formatNum(m + 1) + '-' + this.formatNum(d),
week: formatWeek
};
return today;
},
//
monthDay(y, month) {
let dates = [];
let m = Number(month);
let firstDayOfMonth = new Date(y, m - 1, 1).getDay(); //
let lastDateOfMonth = new Date(y, m, 0).getDate(); //
let lastDayOfLastMonth = new Date(y, m - 1, 0).getDate(); //
let weekstart = this.weekstart == 7 ? 0 : this.weekstart;
let startDay = (() => {
//
if (firstDayOfMonth == weekstart) {
return 0;
} else if (firstDayOfMonth > weekstart) {
return firstDayOfMonth - weekstart;
} else {
return 7 - weekstart + firstDayOfMonth;
}
})();
let endDay = 7 - ((startDay + lastDateOfMonth) % 7); //
if (endDay == 7) {
endDay = 0;
}
for (let i = 1; i <= startDay; i++) {
dates.push({
date: this.formatNum(lastDayOfLastMonth - startDay + i),
day: weekstart + i - 1 || 7,
month: m - 1 >= 0 ? this.formatNum(m - 1) : 12,
year: m - 1 >= 0 ? y : y - 1
});
}
for (let j = 1; j <= lastDateOfMonth; j++) {
dates.push({
date: this.formatNum(j),
day: (j % 7) + firstDayOfMonth - 1 || 7,
month: this.formatNum(m),
year: y,
isCurM: true //
});
}
for (let k = 1; k <= endDay; k++) {
dates.push({
date: this.formatNum(k),
day: (lastDateOfMonth + startDay + weekstart + k - 1) % 7 || 7,
month: m + 1 <= 11 ? this.formatNum(m + 1) : 0,
year: m + 1 <= 11 ? y : y + 1
});
}
return dates;
},
isWorkDay(y, m, d) {
//
let ymd = `${y}/${m}/${d}`;
let formatDY = new Date(ymd.replace(/-/g, '/'));
let week = formatDY.getDay();
if (week == 0 || week == 6) {
return false;
} else {
return true;
}
},
isFutureDay(y, m, d) {
//
let ymd = `${y}/${m}/${d}`;
let formatDY = new Date(ymd.replace(/-/g, '/'));
let showTime = formatDY.getTime();
let curTime = new Date().getTime();
if (showTime > curTime) {
return true;
} else {
return false;
}
},
//
isMarkDay(y, m, d) {
let flag = false;
for (let i = 0; i < this.markDays.length; i++) {
let dy = `${y}-${m}-${d}`;
if (this.markDays[i] == dy) {
flag = true;
break;
}
}
return flag;
},
isToday(y, m, d) {
let checkD = y + '-' + m + '-' + d;
let today = this.getToday().date;
if (checkD == today) {
return true;
} else {
return false;
}
},
//
toggle() {
this.monthOpen = !this.monthOpen;
if (this.monthOpen) {
this.positionTop = 0;
} else {
let index = -1;
this.dates.forEach((i, x) => {
this.isToday(i.year, i.month, i.date) && (index = x);
});
this.positionTop = -((Math.ceil((index + 1) / 7) || 1) - 1) * 80;
}
},
//
selectOne(i, event) {
let date = `${i.year}-${i.month}-${i.date}`;
let selectD = new Date(date).getTime();
let curTime = new Date().getTime();
let week = new Date(date).getDay();
let weekText = ['日', '一', '二', '三', '四', '五', '六'];
let formatWeek = '星期' + weekText[week];
let response = {
date: date,
week: formatWeek
};
if (!i.isCurM) {
// console.log('');
return false;
}
if (selectD > curTime) {
if (this.disabledAfter) {
console.log('未来日期不可选');
return false;
} else {
this.choose = date;
this.$emit('onDayClick', response);
}
} else {
this.choose = date;
this.$emit('onDayClick', response);
}
console.log(response);
},
//
changYearMonth(y, m) {
this.dates = this.monthDay(y, m);
this.y = y;
this.m = m;
},
changeMonth(type) {
let that = this
if (type == 'pre') {
if (that.m + 1 == 2) {
that.m = 12;
that.y = that.y - 1;
} else {
that.m = that.m - 1;
}
that.month = this.$tools.getMonth(that.month, -1)
that.$emit('onMonthClickPre', that.month)
} else {
if (this.m + 1 == 13) {
this.m = 1;
this.y = this.y + 1;
} else {
this.m = this.m + 1;
}
that.month = this.$tools.getMonth(that.month, +1)
that.$emit('onMonthClickPre', that.month)
}
this.dates = this.monthDay(this.y, this.m);
}
}
};
export default {
name: 'ren-calendar',
props: {
// (0)
weekstart: {
type: Number,
default: 0
},
//
markDays: {
type: Array,
default: () => {
return [];
}
},
//
headerBar: {
type: Boolean,
default: true
},
//
open: {
type: Boolean,
default: true
},
//
collapsible: {
type: Boolean,
default: true
},
//
disabledAfter: {
type: Boolean,
default: true
}
},
data() {
return {
weektext: ['日', '一', '二', '三', '四', '五', '六'],
y: new Date().getFullYear(), //
m: new Date().getMonth() + 1, //
dates: [], //
positionTop: 0,
monthOpen: true,
choose: '',
month: null,
};
},
created() {
this.dates = this.monthDay(this.y, this.m);
!this.open && this.toggle();
},
mounted() {
this.y = new Date().getFullYear()
this.m = new Date().getMonth() + 1
this.month = this.$tools.getDate("m")
this.choose = this.getToday().date;
},
computed: {
//
weekDay() {
return this.weektext.slice(this.weekstart).concat(this.weektext.slice(0, this.weekstart));
},
height() {
return (this.dates.length / 7) * 80 + 'rpx';
},
},
methods: {
formatNum(num) {
let res = Number(num);
return res < 10 ? '0' + res : res;
},
getToday() {
let date = new Date();
let y = date.getFullYear();
let m = date.getMonth();
let d = date.getDate();
let week = new Date().getDay();
let weekText = ['日', '一', '二', '三', '四', '五', '六'];
let formatWeek = '星期' + weekText[week];
let today = {
date: y + '-' + this.formatNum(m + 1) + '-' + this.formatNum(d),
week: formatWeek
};
return today;
},
//
monthDay(y, month) {
let dates = [];
let m = Number(month);
let firstDayOfMonth = new Date(y, m - 1, 1).getDay(); //
let lastDateOfMonth = new Date(y, m, 0).getDate(); //
let lastDayOfLastMonth = new Date(y, m - 1, 0).getDate(); //
let weekstart = this.weekstart == 7 ? 0 : this.weekstart;
let startDay = (() => {
//
if (firstDayOfMonth == weekstart) {
return 0;
} else if (firstDayOfMonth > weekstart) {
return firstDayOfMonth - weekstart;
} else {
return 7 - weekstart + firstDayOfMonth;
}
})();
let endDay = 7 - ((startDay + lastDateOfMonth) % 7); //
if (endDay == 7) {
endDay = 0;
}
for (let i = 1; i <= startDay; i++) {
dates.push({
date: this.formatNum(lastDayOfLastMonth - startDay + i),
day: weekstart + i - 1 || 7,
month: m - 1 >= 0 ? this.formatNum(m - 1) : 12,
year: m - 1 >= 0 ? y : y - 1
});
}
for (let j = 1; j <= lastDateOfMonth; j++) {
dates.push({
date: this.formatNum(j),
day: (j % 7) + firstDayOfMonth - 1 || 7,
month: this.formatNum(m),
year: y,
isCurM: true //
});
}
for (let k = 1; k <= endDay; k++) {
dates.push({
date: this.formatNum(k),
day: (lastDateOfMonth + startDay + weekstart + k - 1) % 7 || 7,
month: m + 1 <= 11 ? this.formatNum(m + 1) : 0,
year: m + 1 <= 11 ? y : y + 1
});
}
return dates;
},
isWorkDay(y, m, d) {
//
let ymd = `${y}/${m}/${d}`;
let formatDY = new Date(ymd.replace(/-/g, '/'));
let week = formatDY.getDay();
if (week == 0 || week == 6) {
return false;
} else {
return true;
}
},
isFutureDay(y, m, d) {
//
let ymd = `${y}/${m}/${d}`;
let formatDY = new Date(ymd.replace(/-/g, '/'));
let showTime = formatDY.getTime();
let curTime = new Date().getTime();
if (showTime > curTime) {
return true;
} else {
return false;
}
},
//
isMarkDay(y, m, d) {
let flag = false;
for (let i = 0; i < this.markDays.length; i++) {
let dy = `${y}-${m}-${d}`;
if (this.markDays[i] == dy) {
flag = true;
break;
}
}
return flag;
},
isToday(y, m, d) {
let checkD = y + '-' + m + '-' + d;
let today = this.getToday().date;
if (checkD == today) {
return true;
} else {
return false;
}
},
//
toggle() {
this.monthOpen = !this.monthOpen;
if (this.monthOpen) {
this.positionTop = 0;
} else {
let index = -1;
this.dates.forEach((i, x) => {
this.isToday(i.year, i.month, i.date) && (index = x);
});
this.positionTop = -((Math.ceil((index + 1) / 7) || 1) - 1) * 80;
}
},
//
selectOne(i, event) {
let date = `${i.year}-${i.month}-${i.date}`;
let selectD = new Date(date).getTime();
let curTime = new Date().getTime();
let week = new Date(date).getDay();
let weekText = ['日', '一', '二', '三', '四', '五', '六'];
let formatWeek = '星期' + weekText[week];
let response = {
date: date,
week: formatWeek
};
if (!i.isCurM) {
// console.log('');
return false;
}
if (selectD > curTime) {
if (this.disabledAfter) {
console.log(that.$t("tips.verifyNotOptional"));
return false;
} else {
this.choose = date;
this.$emit('onDayClick', response);
}
} else {
this.choose = date;
this.$emit('onDayClick', response);
}
console.log(response);
},
//
changYearMonth(y, m) {
this.dates = this.monthDay(y, m);
this.y = y;
this.m = m;
},
changeMonth(type) {
let that = this
if (type == 'pre') {
if (that.m + 1 == 2) {
that.m = 12;
that.y = that.y - 1;
} else {
that.m = that.m - 1;
}
that.month = this.$tools.getMonth(that.month, -1)
that.$emit('onMonthClickPre', that.month)
} else {
if (this.m + 1 == 13) {
this.m = 1;
this.y = this.y + 1;
} else {
this.m = this.m + 1;
}
that.month = this.$tools.getMonth(that.month, +1)
that.$emit('onMonthClickPre', that.month)
}
this.dates = this.monthDay(this.y, this.m);
}
}
};
</script>
<style lang="scss" scoped>
.calendar-wrapper {
color: #bbb7b7;
border-radius: 10px;
font-size: 32rpx;
text-align: center;
background-color: #fff;
padding-bottom: 10rpx;
.calendar-wrapper {
color: #bbb7b7;
border-radius: 10px;
font-size: 32rpx;
text-align: center;
background-color: #fff;
padding-bottom: 10rpx;
.header {
display: flex;
align-items: center;
justify-content: center;
height: 88rpx;
color: #42464A;
font-size: 36rpx;
font-weight: bold;
justify-content: space-around;
.header {
display: flex;
align-items: center;
justify-content: center;
height: 88rpx;
color: #42464A;
font-size: 36rpx;
font-weight: bold;
justify-content: space-around;
.pre,
.next {
color: $btncolor;
font-size: 32rpx;
}
}
.pre,
.next {
color: $btncolor;
font-size: 32rpx;
}
}
.week {
display: flex;
align-items: center;
height: 80rpx;
line-height: 80rpx;
border-bottom: 1rpx solid rgba(255, 255, 255, 0.2);
.week {
display: flex;
align-items: center;
height: 80rpx;
line-height: 80rpx;
border-bottom: 1rpx solid rgba(255, 255, 255, 0.2);
view {
flex: 1;
}
}
view {
flex: 1;
}
}
.content0 {
position: relative;
overflow: hidden;
transition: height 0.4s ease;
.content0 {
position: relative;
overflow: hidden;
transition: height 0.4s ease;
.days {
transition: top 0.3s;
display: flex;
align-items: center;
flex-wrap: wrap;
position: relative;
.days {
transition: top 0.3s;
display: flex;
align-items: center;
flex-wrap: wrap;
position: relative;
.item {
position: relative;
display: block;
height: 80rpx;
line-height: 80rpx;
width: calc(100% / 7);
.item {
position: relative;
display: block;
height: 80rpx;
line-height: 80rpx;
width: calc(100% / 7);
.day {
font-style: normal;
display: inline-block;
vertical-align: middle;
width: 60rpx;
height: 60rpx;
line-height: 60rpx;
overflow: hidden;
border-radius: 60rpx;
.day {
font-style: normal;
display: inline-block;
vertical-align: middle;
width: 60rpx;
height: 60rpx;
line-height: 60rpx;
overflow: hidden;
border-radius: 60rpx;
&.choose {
background-color: $btncolor;
color: #fff;
}
&.choose {
background-color: $btncolor;
color: #fff;
}
&.nolm {
color: #fff;
opacity: 0.3;
}
}
&.nolm {
color: #fff;
opacity: 0.3;
}
}
.isWorkDay {
color: #42464a;
}
.isWorkDay {
color: #42464a;
}
.notSigned {
font-style: normal;
width: 8rpx;
height: 8rpx;
background: #fa7268;
border-radius: 10rpx;
position: absolute;
left: 50%;
bottom: 0;
pointer-events: none;
}
.notSigned {
font-style: normal;
width: 8rpx;
height: 8rpx;
background: #fa7268;
border-radius: 10rpx;
position: absolute;
left: 50%;
bottom: 0;
pointer-events: none;
}
.today {
color: #fff;
background-color: #a8c0ff;
}
.today {
color: #fff;
background-color: #a8c0ff;
}
.workDay {
font-style: normal;
width: 8rpx;
height: 8rpx;
background: #4d7df9;
border-radius: 10rpx;
position: absolute;
left: 50%;
bottom: 0;
pointer-events: none;
}
.workDay {
font-style: normal;
width: 8rpx;
height: 8rpx;
background: #4d7df9;
border-radius: 10rpx;
position: absolute;
left: 50%;
bottom: 0;
pointer-events: none;
}
.markDay {
font-style: normal;
width: 8rpx;
height: 8rpx;
background: #fa7268;
border-radius: 10rpx;
position: absolute;
left: 50%;
bottom: 0;
pointer-events: none;
}
}
}
}
.markDay {
font-style: normal;
width: 8rpx;
height: 8rpx;
background: #fa7268;
border-radius: 10rpx;
position: absolute;
left: 50%;
bottom: 0;
pointer-events: none;
}
}
}
}
.hide {
height: 80rpx !important;
}
.hide {
height: 80rpx !important;
}
.weektoggle {
width: 85rpx;
height: 32rpx;
position: relative;
bottom: -42rpx;
.weektoggle {
width: 85rpx;
height: 32rpx;
position: relative;
bottom: -42rpx;
&.down {
transform: rotate(180deg);
bottom: 0;
}
}
}
</style>
&.down {
transform: rotate(180deg);
bottom: 0;
}
}
}
</style>

View File

@ -2,24 +2,24 @@
<view v-if="isFirst" class="wrapper wrapperbg">
<view class="bg" @click="onTap">
<view class="edit" @click.stop>
<view class="title">{{type==1?'目标体重':'初始体重'}}</view>
<view class="title">{{type==1?$t("body.target_weight"):$t("body.initial_weight")}}</view>
<view class="editem" @click="hideKeyboard" v-if="type!=1">
<view class="name">日期</view>
<view class="name">{{$t("common.titleDate")}}</view>
<view class="right">
<picker mode="date" :end="endDate" @change="changeLog" :fields="fields">
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
<view class="uni-input">{{regTime?regTime:$t("tips.verifyPicker")}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
</view>
<view class="editem">
<view class="name">体重</view>
<view class="name">{{$t("common.infoWeight")}}</view>
<view class="right">
<input v-model="weight" type="digit" placeholder="请输入" />kg
<input v-model="weight" type="digit" :placeholder="$t('tips.verifyRecord')" />kg
</view>
</view>
<view class="btn close" @click="onTap()">取消</view>
<view class="btn" @click="handleTarget">确定</view>
<view class="btn close" @click="onTap()">{{$t("tips.btnSancellation")}}</view>
<view class="btn" @click="handleTarget">{{$t("tips.btnConfirm")}}</view>
</view>
</view>
</view>
@ -60,11 +60,11 @@
handleTarget() {
let that = this
if (that.type != 1 && !that.regTime) {
that.$tools.msg("请选择测量日期")
that.$tools.msg(that.$t("tips.verifyDate"))
return
}
if (!that.weight) {
that.$tools.msg("请输入测量体重")
that.$tools.msg(that.$t("tips.verifyWeight"))
return
}
that.$model.getfirstweight({
@ -73,7 +73,6 @@
weight: that.weight,
type: that.type
}).then(res => {
console.log("目标,", res)
that.$tools.msg(res.msg)
if (res.code == 0) {
that.$store.commit("changeFirst", false);

View File

@ -2,15 +2,15 @@
<view v-if="isTarget" class="wrapper">
<view class="bg" @click="onTap">
<view class="edit" @click.stop>
<view class="title">目标体重</view>
<view class="title">{$t("body.target_weight")}}</view>
<view class="editem">
<view class="left">目标体重</view>
<view class="left">{{$t("body.target_weight")}}</view>
<view class="right">
<input class="text" type="digit" placeholder="请输入" v-model="inputvalue" />kg
<input class="text" type="digit" :placeholder="$t("tips.verifyRecord")" v-model="inputvalue" />kg
</view>
</view>
<view class="btn close" @click="onTap()">取消</view>
<view class="btn" @click="handleWeight">确定</view>
<view class="btn close" @click="onTap()">{{$t("tips.btnSancellation")}}</view>
<view class="btn" @click="handleWeight">{{$t("tips.btnConfirm")}}</view>
</view>
</view>
</view>
@ -38,7 +38,7 @@
let that = this
console.log("startDate", that.startDate)
if (!that.inputvalue) {
that.$tools.msg("请输入目标体重")
that.$tools.msg(that.$t("tips.verifyWeight"))
return
}
that.$model.setTarget({

View File

@ -1,15 +0,0 @@
{
"index.title": "Hello i18n",
"index.home": "Home",
"index.component": "Component",
"index.api": "API",
"index.schema": "Schema",
"index.demo": "uni-app globalization",
"index.demo-description": "Include uni-framework, manifest.json, pages.json, tabbar, Page, Component, API, Schema",
"index.detail": "Detail",
"index.language": "Language",
"index.language-info": "Settings",
"index.system-language": "System language",
"index.application-language": "Application language",
"index.language-change-confirm": "Applying this setting will restart the app"
}

View File

@ -1,36 +0,0 @@
{
"common": {
"uni.app.quit": "もう一度押すと、アプリケーションが終了します",
"uni.async.error": "サーバーへの接続がタイムアウトしました。画面をクリックして再試行してください",
"uni.showActionSheet.cancel": "キャンセル",
"uni.showToast.unpaired": "使用するには、showToastとhideToastをペアにする必要があることに注意してください",
"uni.showLoading.unpaired": "使用するには、showLoadingとhideLoadingをペアにする必要があることに注意してください",
"uni.showModal.cancel": "キャンセル",
"uni.showModal.confirm": "OK",
"uni.chooseImage.cancel": "キャンセル",
"uni.chooseImage.sourceType.album": "アルバムから選択",
"uni.chooseImage.sourceType.camera": "カメラ",
"uni.chooseVideo.cancel": "キャンセル",
"uni.chooseVideo.sourceType.album": "アルバムから選択",
"uni.chooseVideo.sourceType.camera": "カメラ",
"uni.previewImage.cancel": "キャンセル",
"uni.previewImage.button.save": "画像を保存",
"uni.previewImage.save.success": "画像をアルバムに正常に保存します",
"uni.previewImage.save.fail": "画像をアルバムに保存できませんでした",
"uni.setClipboardData.success": "コンテンツがコピーされました",
"uni.scanCode.title": "スキャンコード",
"uni.scanCode.album": "アルバム",
"uni.scanCode.fail": "認識に失敗しました",
"uni.scanCode.flash.on": "タッチして点灯",
"uni.scanCode.flash.off": "タップして閉じる",
"uni.startSoterAuthentication.authContent": "指紋認識...",
"uni.picker.done": "完了",
"uni.picker.cancel": "キャンセル",
"uni.video.danmu": "「弾幕」",
"uni.video.volume": "ボリューム",
"uni.button.feedback.title": "質問のフィードバック",
"uni.button.feedback.send": "送信"
},
"ios": {},
"android": {}
}

View File

@ -1,111 +0,0 @@
{
"pageTitle.setLanguage": "语言设置",
"language": {
"zh": "中文",
"en": "英语",
"nowlanguage": "中文",
"confirmcontent": "确认切换该语言吗"
},
"public": {
"confirm": "确认",
"submit": "提交",
"cancellation": "取消"
},
"controls": {
"edit": "编辑",
"delete": "删除",
"add": "添加",
"details": "详情",
"unbind": "解绑"
},
"showModal": {
"title": "友情提示",
"outLoginContent": "是否退出登录",
"deleteUserContent": "是否删除该成员",
"deleteHistoryContent": "是否删除当前测量记录",
"unbindContent": "是否解绑该设备",
"deleteAccountContent": "删除成功后,该账号的所有关联信息将被清空且无法找回,是否删除"
},
"pageText": {
"skipping": "跳绳数据",
"vitalcapacity": "肺活量数据",
"charts": "运动曲线",
"detail": "详情",
"me": "我的",
"score": "分数评估",
"scoreHistory": "估分历史",
"scoreReport": "估分报告",
"contrast": "数据对比",
"body": "身体数据",
"history": "历史记录",
"cardSet": "卡片设置",
"business": "设备管理",
"businesAdd": "添加设备",
"businesSList": "设备列表",
"businesSearch": "搜索设备",
"inheritHeighet": "身高预测",
"bmi": "BMI测评",
"phone": "绑定手机号",
"email": "绑定邮箱",
"passwordEdit": "修改密码",
"setText": "设置",
"memberText": "资料",
"manage": "成员管理",
"AboutUs": "关于我们",
"cooperation": "商务合作意向登记表",
"logOut ": "退出登录"
},
"from": {
"mailbox": "邮箱",
"mailboxPlaceholder": "请输入邮箱",
"mailboxTips": "请输入正确的邮箱",
"mobile": "手机号",
"mobilePlaceholder": "请输入手机号",
"mobileTips": "请输入正确的手机号",
"password": "密码",
"passwordPlaceholder": "请输入密码",
"passwordTips": "请输入正确密码",
"confirmPassword": "确认密码",
"confirmPasswordPlaceholder": "请再次输入密码",
"forgotPassword": "忘记密码",
"code": "验证码",
"sendcode": "获取验证码",
"codeTips": "请输入验证码",
"deleteAccount": "删除账号",
"loginTitle": "登录",
"loginToggle": "切换登录",
"loginAccount": "手机号/邮箱",
"loginAgreement": "阅读并同意",
"loginAgreementContnt": "《隐私协议》",
"login.AgreementTips": "请先确认并勾选协议",
"loginBtn": "登录",
"loginRegisterntn": "注册",
"loginSuccessful": "登录成功"
},
"userInfo": {
"avatar": "头像",
"nickname": "昵称",
"phone": "手机号",
"setPassword": "设置密码",
"age": "年龄",
"ageunit": "岁",
"gender": "性别",
"man": "男",
"woman": "女",
"unknown": "未知",
"birthday": "出生日期",
"nowUser": "当前",
"height": "身高",
"weight": "体重",
"nowAddress": "当前地区"
},
"index.home": "主页",
"index.none": "暂无数据",
"index.region": "当前地区",
"index.body": "身体数据",
"index.height": "身高",
"index.weight": "体重",
"index.BMI": "BMI"
}

71
locale/en.json Normal file
View File

@ -0,0 +1,71 @@
{
"common": {
"titleSetLanguage": "语言设置",
"titleSkipping": "跳绳数据",
"titlevVitalcapacity": "肺活量数据",
"titleCharts": "运动曲线",
"titleMe": "我的",
"titleScore": "中招估分",
"titleScoreHistory": "估分历史",
"titleScoreReport": "估分报告",
"titleContrast": "数据对比",
"titleDetail": "详情",
"titleBody": "曲线/目标",
"titleHistory": "历史记录",
"titleCardSet": "卡片设置",
"titlebBusiness": "设备管理",
"titleBusinesAdd": "添加设备",
"titleBusinesSList": "设备列表",
"titleBusinesSearch": "搜索设备",
"titleInheritHeighet": "身高预测",
"titleBmi": "BMI测评",
"titlePhone": "绑定手机号",
"titleEmail": "绑定邮箱",
"titlePasswordEdit": "修改密码",
"titleSet": "设置",
"titleDate": "日期",
"titleMember": "资料",
"titleManage": "成员管理",
"titleManageAdd": "添加成员",
"titleAboutUs": "关于我们",
"titleSetPassword": "设置密码",
"titlePassword": "密码",
"titleConfirmPassword": "确认密码",
"titleForgotPassword": "忘记密码",
"titleCode": "验证码",
"titleSendCode": "获取验证码",
"titleSendCodeRetry": "S后重发",
"titleLogin": "登录",
"titleRegister": "注册",
"titleToggleLogin": "切换登录",
"titleAccountText": "手机号/邮箱",
"titleAgreementText": "阅读并同意",
"titleAgreementContntText": "《隐私协议》",
"infoAvatar": "头像",
"infoNickname": "昵称",
"infoMobile": "手机号",
"infoEmail": "邮箱",
"infoAge": "年龄",
"infoAgeunit": "岁",
"infoGender": "性别",
"infoMan": "男",
"infoWoman": "女",
"infoUnknown": "未知",
"infoBirthday": "出生日期",
"infoNowUser": "当前",
"infoHeight": "身高",
"infoHead": "头围",
"infoWeight": "体重",
"infoBMI": "BMI",
"infoAddress": "当前地区",
"btnEdit": "编辑",
"btnDelete": "删除",
"btnAdd": "添加",
"btnDetails": "详情",
"btnUnbind": "解绑",
"btnBMI": "立即计算",
"btnDeleteAccount": "删除账号",
"btnLogOut": "退出登录",
"btnContrast": "对比"
}
}

View File

@ -3,8 +3,9 @@ import zh from './zh.json'
import zhHant from './zh-Hant.json'
import ja from './ja.json'
export default {
zh,//中文
zh,
en, // 英语
ja,//日语
ja, //日语
"zh-Hans": zh, //中文
'zh-Hant': zhHant, //繁体
}
}

295
locale/zh.json Normal file
View File

@ -0,0 +1,295 @@
{
"language": {
"zh": "中文",
"en": "英语",
"es": "西班牙语",
"fr": "法语",
"pt": "葡萄牙语",
"dh": "阿拉伯语",
"ru": "俄语",
"de": "德语",
"nowlanguage": "中文",
"confirmcontent": "确认切换该语言吗"
},
"tips": {
"msgTitle": "友情提示",
"msgResetData": "数据重置中",
"msgSuccess": "测量成功!",
"msgFail": "测量失败!",
"msgUpgradeFail": "升级失败",
"msgDownloading": "正在下载",
"msgLatestVersion": "已经是最新版本了!",
"msgCancel": "您已取消操作!",
"msgLoginSuccess": "登录成功!",
"msgDelete": "删除成功",
"msgSetSuccess": "设置成功",
"msgbindt": "绑定成功!",
"msgUnBind": "解绑成功!",
"msgBottom": "到底了,看看别的吧",
"msgNoMoreData": "没有更多数据了!",
"msgCalculating": "计算中",
"msgSetPasswordSuccess": "密码设置成功,进入程序中!",
"msgAddUser": "暂无成员,请先添加",
"verifyNickName": "请输入昵称",
"verifyNotOptional": "未来日期不可选",
"verifyDate": "请选择测量日期",
"verifyBirthday": "请选择出生日期",
"verifyHeight": "请输入身高",
"verifyWeight": "请输入体重",
"verifyHead": "请输入头围",
"verifyHeightDad": "请输入爸爸身高",
"verifyHeightMom": "请输入妈妈身高",
"verifyGender": "请选择性别",
"verifyBontrast": "请选择数据",
"verifyBodyDate": "请选择正确的时间",
"verifyRecordType": "请选择测量项目",
"verifyRecordTime": "请输入时长",
"verifyRecordNumber": "请输入个数",
"verifyRecord": "请输入",
"verifyPicker": "请选择",
"verifyAccount": "请输入正确的手机号或邮箱",
"verifyEmail": "请输入邮箱",
"verifyEmailCorrect": "请输入正确的邮箱",
"verifyMobile": "请输入手机号",
"verifyMobileCorrect": "请输入正确的手机号",
"verifyCode": "请输入验证码",
"verifyPassword": "请输入密码",
"verifyPasswordTwo": "请输入确认密码",
"verifyPasswordCorrect": "请确认两次密码填写一致",
"verifyAgreement": "请先确认并勾选协议",
"verifyOutLogin": "是否退出登录?",
"verifyDeleteUser": "是否删除该成员?",
"verifyDeleteHistory": "是否删除当前测量记录?",
"verifyUnbindt": "是否解绑该设备?",
"verifybindt": "是否绑定该设备?",
"verifyDeleteAccount": "删除成功后,该账号的所有关联信息将被清空且无法找回,是否删除?",
"btnConfirm": "确认",
"btnSubmit": "提交",
"btnSancellation": "取消",
"btnContinue": "继续",
"btnBack": "返回",
"btnDelete": "删除"
},
"common": {
"titleSetLanguage": "语言设置",
"titleSkipping": "跳绳数据",
"titlevVitalcapacity": "肺活量数据",
"titleCharts": "运动曲线",
"titleHome": "记录",
"titleNews": "资讯",
"titleMe": "我的",
"titleScore": "中招估分",
"titleScoreHistory": "估分历史",
"titleScoreReport": "估分报告",
"titleContrast": "数据对比",
"titleDetail": "详情",
"titleBody": "曲线/目标",
"titleHistory": "历史记录",
"titleCardSet": "卡片设置",
"titlebBusiness": "设备管理",
"titleBusinesAdd": "添加设备",
"titleBusinesSList": "设备列表",
"titleBusinesSearch": "搜索设备",
"titleInheritHeighet": "身高预测",
"titleBmi": "BMI测评",
"titlePhone": "绑定手机号",
"titleEmail": "绑定邮箱",
"titlePasswordEdit": "修改密码",
"titleSet": "设置",
"titleDate": "日期",
"titleMember": "资料",
"titleManage": "成员管理",
"titleManageAdd": "添加成员",
"titleAboutUs": "关于我们",
"titleSetPassword": "设置密码",
"titlePassword": "密码",
"titleConfirmPassword": "确认密码",
"titleForgotPassword": "忘记密码",
"titleCode": "验证码",
"titleSendCode": "获取验证码",
"titleSendCodeRetry": "S后重发",
"titleLogin": "登录",
"titleRegister": "注册",
"titleToggleLogin": "切换登录",
"titleAccountText": "手机号/邮箱",
"titleAgreementText": "阅读并同意",
"titleAgreementContntText": "隐私协议",
"titleVersionUpdate": "版本更新",
"titleNewVersion": "新版本",
"infoAvatar": "头像",
"infoNickname": "昵称",
"infoMobile": "手机号",
"infoEmail": "邮箱",
"infoAge": "年龄",
"infoAgeunit": "岁",
"infoGender": "性别",
"infoMan": "男",
"infoWoman": "女",
"infoUnknown": "未知",
"infoBirthday": "出生日期",
"infoNowUser": "当前",
"infoHeight": "身高",
"infoHead": "头围",
"infoWeight": "体重",
"infoBMI": "BMI",
"infoAddress": "地区",
"btnEdit": "编辑",
"btnDelete": "删除",
"btnAdd": "添加",
"btnDetails": "详情",
"btnUnbind": "解绑",
"btnBMI": "立即计算",
"btnDeleteAccount": "删除账号",
"btnLogOut": "退出登录",
"btnContrast": "对比"
},
"linkBluetooth": {
"onBluetoothTips": "请在设备开机状态下,搜索设备",
"onBluetoothHaveFound": "已发现",
"onBluetoothDevice": "个设备",
"onBluetoothMac": "mac地址",
"onBluetoothBind": "设备绑定流程说明",
"onBluetoothSelect": "选择蓝牙进行绑定",
"onPhoneBluetoothTips": "手机蓝牙未打开",
"onDeviceBluetoothTips": "请确定设备是开机状态、手机蓝牙权限已打开!",
"accreditTips": "需要您授权使用手机蓝牙",
"openBluetoothSuccess": "蓝牙权限获取成功,重新连接蓝牙",
"openSettingFail": "获取权限失败,将无法使用手机蓝牙进行测量",
"isLinkBluetooth": "请先连接设备",
"startlinkBluetooth": "开始连接",
"linkBluetooth": "蓝牙连接中",
"anewlinkBluetooth": "重新连接",
"linkBluetoothFail": "设备连接失败,返回首页重新连接",
"linkBluetoothSuccess": "蓝牙连接成功,请开始测量",
"startSearchBluetooth": "开始搜索",
"searchBluetooth": "蓝牙搜索中",
"searchBluetoothFail": "重新搜索",
"Nodevicefound": "没有搜索到蓝牙设备",
"onDeviceMeasureTips": "请确定设备是开机状态",
"openDeviceeMeasureTips": "请确定手机蓝牙及位置信息已打开",
"deviceDisconnection": "测量过程中已与设备连接中断,请重新连接设备再开始测量",
"offBluetooth": "蓝牙已关闭,请重新打开蓝牙后再开始测量",
"remeasure": "重新测量",
"StableWeight": "稳定重量",
"StableWeightText": "您的稳定体重是",
"realTimeWeight": "实时重量",
"realTimeWeightText": "您的实时体重是",
"heightText": "您的身高是",
"zeroBtn": "清零",
"LockBtn": "锁定",
"SaveResult": "保存结果",
"measureResultTips": "测量结果提示",
"nowWeight": "本次测量体重是",
"lastHeight": "上次测量身高是",
"lastHead": "上次测量头围是",
"errorOperation": "操作错误,请重新测量"
},
"lung": {
"lungTitle": "肺活量测试",
"lungExplain0": "肺活量测试能让我们更好的了解您,为您生成详细的健康报告。",
"lungsuction": "吸气肺活量",
"lungsuctionspeed": "吸气速度",
"averagelungsuction": "平均吸气肺活量",
"isMarginal": "是否达标",
"lungHello": "您好!第",
"lungstart": "次测试开始",
"lungExplain1": "放下呼吸训练器,缓慢呼气,尽可能排空肺部气体",
"lungExplain2": "使用呼吸训练器,缓慢吸气,直至到达极限",
"lungExplain3": "根据您的个人信息,您的达标吸气肺活量为",
"nowlungsuctionspeed": "您本次测试吸气速度",
"lungresult": "肺活量测试结果",
"lungExplain4": "结合您的身体状态和改善目标,我们将为您生成详细的健康报告",
"lunglookreport": "查看本次报告",
"lunganewstart": "S后第",
"Marginal": "及格",
"oneNumberTips": "请输入第一次吸气值",
"twoNumberTips": "请输入第二次吸气值",
"threeNumberTips": "请输入第三次吸气值"
},
"skip": {
"today_jump_num": "今日个数",
"today_jump_time": "今日时长",
"today_jump_kcal": "卡路里",
"jumpFree": "自由跳",
"backwardCount": "倒计数",
"Countdown": "倒计时",
"jumpFreedom": "自由",
"jumpFreeDegree": "自由次数",
"jumpFreeNumber": "个数",
"jumpTargetDegree": "目标次数",
"jumpUnlimited": "无限制",
"jumpTarget": "调整目标",
"jumpTargetTime": "目标时长 分:秒",
"MinuteSecond ": "分:秒",
"Consumed": "消耗",
"LongpressEnd": "长按结束",
"AverageSpeed ": "平均速度",
"Unit": "个/分钟",
"Numberofinterrupts ": "中断次数",
"Times": "次",
"LongestConsecutive": "最长连续",
"Number": "个",
"trainingsNumber": "训练个数",
"complete": "完成",
"instructStart": "开始",
"instructContinuous": "连续",
"instructStop": "停止",
"instructEnd": "结束",
"instructContinue": "继续",
"instructPause": "暂停",
"linkBluetoothFail": "连接已断开",
"deviceDisconnection": "训练过程中已与设备连接中断,请重新连接设备再开始训练",
"ToggleTrainingsTips": "训练过程中请勿切换训练,返回训练",
"NOComplete": "本次跳绳时间低于10秒记录将不会被保存"
},
"index.home": "记录",
"index.skipping": "智能跳绳",
"index.vitalcapacity": "肺活训练",
"index.none": "暂无数据",
"index.body": "身体报告",
"index.BodyScore": "身体得分",
"index.BodyType": "身体类型",
"index.otherData ": "其他数据",
"index.dataReference": "数据参考",
"index.referencetips": "此测量数据仅供参考,不可代替医学专业测试!",
"index.growthAdvice ": "成长建议",
"index.nutrition": "营养",
"index.sleep": "睡眠",
"index.movement": "运动",
"index.emotion": "情绪",
"index.card": "卡片数据",
"index.cardSet": "设置数据页卡片",
"index.manualRecording": "手动记录",
"index.notice": "公告",
"index.browse": "浏览量",
"bmi.desc": "BMI是身体质量指数,是目前国际上常用的衡量人体胖瘦程度以及是否健康的一个标准",
"inheritHeighet.title": "成年身高预测",
"inheritHeighet.dad": "爸爸身高",
"inheritHeighet.mom": "妈妈身高",
"inheritHeighet.geneticheight": "当前标准身高",
"inheritHeighet.adultheight": "成年身高预测",
"inheritHeighet.tips0": "为保证数据准确定,请认真填写真实信息",
"inheritHeighet.tips1": "如果当前实际身高﹤当前标准身高",
"inheritHeighet.tips2": "孩子后天生长环境不利长高。请从饮食、睡眠、运动、情绪等方面排查。加强后天因素管理,让孩子处于最佳长高状态。",
"inheritHeighet.tips3": "如果当前实际身高﹥当前标准身高",
"inheritHeighet.tips4": "孩子后天生长环境有利长高。请继续保持加强后天因素管理孩子成年可比标准高10cm以上。",
"contrast.time": "时间(天)",
"contrast.weightdiff": "减重",
"contrast.weightdiffAugment": "增重",
"contrast.fatWdiff": "减脂",
"contrast.fatWdiffAugment": "增脂",
"contrast.changeData": "数据变化",
"contrast.trend": "趋势",
"contrast.before": "之前",
"contrast.after": "之后",
"body.target_weight": "目标体重",
"body.cumulative_weight": "累计减重",
"body.initial_weight": "初始体重",
"body.cumulative_day": "减重天数",
"chartsDay": "当天",
"chartsMonth": "月度",
"chartsYear": "年度",
"recordType": "项目",
"recordTime": "时长",
"recordNumber": "个数"
}

12
main.js
View File

@ -1,4 +1,5 @@
import App from './App'
import messages from '@/locale/index.js'
// vuex
import store from './store'
Vue.prototype.$store = store;
@ -15,17 +16,18 @@ Vue.prototype.$http = http;
import model from '@/toolJs/model.js'
Vue.prototype.$model = model;
// 语言
import messages from './language/index'
//模拟数据
import video from '@/video.json'
Vue.prototype.$video = video;
let i18nConfig = {
locale: uni.getLocale(),
messages
}
//模拟数据
import video from '@/video.json'
Vue.prototype.$video = video;
// #ifndef VUE3
import Vue from 'vue'
import VueI18n from 'vue-i18n'

View File

@ -32,7 +32,7 @@
<view v-else>
<view class="nolist">
<image src="../../static/none.png"></image>
<text>暂无数据请手动添加~</text>
<text>{{$t("index.none")}}</text>
</view>
<view class="title">
{{item.title}}
@ -100,12 +100,12 @@
let that = this
if (that.endTime) {
if (Date.parse(e.detail.value) > Date.parse(that.endTime)) {
that.$tools.msg("请选择正确的时间")
that.$tools.msg(that.$t("tips.verifyBodyDate"))
return
}
} else {
if (Date.parse(e.detail.value) > Date.parse(that.endDate)) {
that.$tools.msg("请选择正确的时间")
that.$tools.msg(that.$t("tips.verifyBodyDate"))
return
}
}
@ -116,12 +116,12 @@
let that = this
if (that.startTime) {
if (Date.parse(e.detail.value) < Date.parse(that.startTime)) {
that.$tools.msg("请选择正确的时间")
that.$tools.msg(that.$t("tips.verifyBodyDate"))
return
}
} else {
if (Date.parse(e.detail.value) < Date.parse(that.startDate)) {
that.$tools.msg("请选择正确的时间")
that.$tools.msg(that.$t("tips.verifyBodyDate"))
return
}
}

View File

@ -165,7 +165,7 @@
handlePK() {
let that = this
if (that.isActive.length != 2) {
that.$tools.msg("请先选择数据!")
that.$tools.msg(that.$t("tips.verifyBontrast"))
return
}
let info = {}
@ -211,8 +211,9 @@
color: $maincolor;
border-radius: 10px 10px 0 0;
}
/deep/uni-icons {
color: $maincolor;
color: $maincolor;
}
}

View File

@ -24,11 +24,11 @@
</view>
</uni-swipe-action-item>
</uni-swipe-action>
<view class="endtext" v-if="!lastPage || page >= lastPage"> 到底了看看别的吧 </view>
<view class="endtext" v-if="!lastPage || page >= lastPage"> {{$t("tips.msgBottom")}} </view>
</view>
<view class="nolist" v-if="!lastPage">
<image src="../../static/none.png"></image>
<text>暂无数据</text>
<text>{{$t("index.none")}}</text>
</view>
</view>
</template>
@ -235,6 +235,7 @@
font-weight: 500;
font-size: 28rpx;
}
view {
width: 28%;
display: flex;

View File

@ -7,30 +7,32 @@
<view class="right">
<view class="name">{{memInfo.name?memInfo.name:memInfo.nickname}}</view>
<view class="top">
<view>性别{{memInfo.gender=='0'?'未知':memInfo.gender=='1'?'男':'女'}}</view>
<view class="ml-15">年龄{{user.age}}</view>
<view>
{{$t("common.infoGender")}}{{memInfo.gender=='0'?$t("common.infoUnknown"):memInfo.gender=='1'?$t("common.infoMan"):$t("common.infoWoman")}}
</view>
<view class="ml-15">{{$t("common.infoAge")}}{{user.age}}{{$t("common.infoAgeunit")}}</view>
</view>
</view>
</view>
<view class="box" v-if="acd_id==2">
<view class="item">
<view>{{memInfo.day?memInfo.day:'0'}}</view>
<text>时间()</text>
<text>{{$t("contrast.time")}}</text>
</view>
<view class="item">
<view>{{memInfo.weightdiff?Math.abs(memInfo.weightdiff):0}}</view>
<text v-if="Number(memInfo.weightdiff)>0">增重(kg)</text>
<text v-else>减重(kg)</text>
<text v-if="Number(memInfo.weightdiff)>0">{{$t("contrast.weightdiffAugment")}}(kg)</text>
<text v-else>{{$t("contrast.weightdiff")}}(kg)</text>
</view>
<view class="item">
<view>{{memInfo.fat_wdiff?Math.abs(memInfo.fat_wdiff):0}}</view>
<text v-if="Number(memInfo.fat_wdiff)>0">增脂(kg)</text>
<text v-else>减脂(kg)</text>
<text v-if="Number(memInfo.fat_wdiff)>0">{{$t("contrast.fatWdiffAugment")}}(kg)</text>
<text v-else>{{$t("contrast.fatWdiff")}}(kg)</text>
</view>
<view class="time">
<view>
<uni-icons class="t-icon t-icon-shijian-mianxing-0"></uni-icons>{{memInfo.time}}
</view>数据变化
</view>{{$t("contrast.changeData")}}
</view>
</view>
<view class="boxTime" v-else>
@ -38,15 +40,15 @@
<uni-icons class="t-icon t-icon-shijian-mianxing-0 mr-10 size18"></uni-icons>
{{memInfo.time}}
</view>
数据变化
{{$t("contrast.changeData")}}
</view>
<view class="control">
<!-- 名称 -->
<view class="title">
<view class="name"></view>
<view>趋势</view>
<view>之前</view>
<view>之后</view>
<view>{{$t("contrast.trend")}}</view>
<view>{{$t("contrast.before")}}</view>
<view>{{$t("contrast.after")}}</view>
</view>
<view v-for="(ite,ind) in listStr" :key="ind" class="li">
<view class="name">

View File

@ -1,6 +1,6 @@
<template>
<view class="content">
<view class="add" @click="handleAddDevice()">添加设备</view>
<view class="add" @click="handleAddDevice()">{{$t("common.titleBusinesAdd")}}</view>
<view class="list">
<view class="item" v-for="(item,index) in list" @click="handleunbind(item,index)">
<view class="left">
@ -10,7 +10,7 @@
<text>{{item.bind_time}}</text>
</view>
</view>
<view class="bing">解绑</view>
<view class="bing">{{$t("common.btnUnbind")}}</view>
</view>
</view>
</view>
@ -47,8 +47,10 @@
handleunbind(item, index) {
let that = this
uni.showModal({
title: '友情提示',
content: '是否解绑该设备?',
title: that.$t('tips.msgTitle'),
content: that.$t('tips.verifyUnbindt'),
cancelText: that.$t('tips.btnSancellation'),
confirmText: that.$t('tips.btnConfirm'),
success: function(res) {
if (res.confirm) {
that.$model.getUnbinding({
@ -58,14 +60,14 @@
that.$tools.msg(res.msg)
return
}
that.$tools.msg("操作成功")
that.$tools.msg(that.$t("tips.msgUnBind"))
that.list.splice(index, 1)
that.$store.dispatch('getUserInfo', {
aud_id: uni.getStorageSync('userid')
})
})
} else if (res.cancel) {
that.$tools.msg("您已取消操作!");
that.$tools.msg(that.$t("tips.msgCancel"));
}
},
})

View File

@ -1,27 +1,28 @@
<template>
<view class="container">
<view class="tips">请在设备开机状态下搜索设备</view>
<view class="item" @click="openBluetoothAdapter">开始搜索设备</view>
<view class="devices_summary">已发现 {{devices.length}} 个设备</view>
<view class="tips">{{$t("linkBluetooth.onBluetoothTips")}}</view>
<view class="item" @click="openBluetoothAdapter">{{$t("linkBluetooth.startSearchBluetooth")}}</view>
<view class="devices_summary">{{$t("linkBluetooth.onBluetoothHaveFound")}}
{{devices.length}}{{$t("linkBluetooth.onBluetoothDevice")}}
</view>
<view>
<scroll-view class="device_list" scroll-y scroll-with-animation v-if="popup">
<view v-for="(item,index) in devices" :key="index" @tap="createBLEConnection(item)" class="device_item">
<view>
<text>{{item.localName ||item.name}}</text>
</view>
<view>mac地址:{{item.macAddr || item.deviceId}}</view>
<view>mac地址{{$t("linkBluetooth.onBluetoothMac")}}:{{item.macAddr || item.deviceId}}</view>
</view>
</scroll-view>
</view>
<view class="tishi">
<view class="text">
<icon class="t-icon t-icon-tishi"></icon> 设备绑定流程说明
<icon class="t-icon t-icon-tishi"></icon> {{$t("linkBluetooth.onBluetoothBind")}}
</view>
<view class="dv">
<text>1打开手机蓝牙和位置信息</text>
<text>2ios系统需打开设置>应用>微信里的蓝牙权限</text>
<text>3设备亮屏状态下搜索蓝牙</text>
<text>4选择蓝牙进行绑定</text>
<text class="size14">1{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
<text class="size14">2{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
<text class="size14">3{{$t("linkBluetooth.onBluetoothSelect")}}</text>
</view>
</view>
</view>
@ -54,7 +55,6 @@
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
console.log("搜索")
},
onUnload() {
console.log("onUnload")
@ -98,7 +98,7 @@
var that = this;
const foundDevices = []
wx.showLoading({
title: '设备搜索中',
title: that.$t("linkBluetooth.searchBluetooth"),
})
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
@ -148,7 +148,7 @@
myTime = setTimeout(function() {
if (!that.devices.length) {
that.islink = -1
that.$tools.showModal("没有查找到设备")
that.$tools.showModal(that.$t("linkBluetooth.Nodevicefound"))
}
uni.hideLoading()
clearTimeout(myTime);
@ -161,15 +161,15 @@
that.$Bluetooth.stopBluetoothDevicesDiscovery()
that.macAddr = e.macAddr
uni.showModal({
title: '提示',
content: '是否绑定该设备?',
cancelText: "取消",
confirmText: "确定",
title: that.$t("tips.msgTitle"),
content: that.$t("tips.verifybindt"),
cancelText: that.$t("tips.btnSancellation"),
confirmText: that.$t("tips.btnConfirm"),
success: (res) => {
if (res.confirm) {
that.getActive()
} else {
that.$tools.msg("您已取消操作")
that.$tools.msg(that.$t("tips.msgCancel"))
}
}
})
@ -183,7 +183,7 @@
that.$Bluetooth.closeBluetoothAdapter()
that.devices = []
if (res.code == 0) {
that.$tools.msg('绑定成功!')
that.$tools.msg(that.$t("tips.msgbind"))
that.$store.dispatch('getUserDeviceList')
that.$store.dispatch('getUserInfo', {
aud_id: uni.getStorageSync('userid')
@ -255,7 +255,6 @@
height: 40px;
line-height: 40px;
text-align: center;
font-size: 36rpx;
color: #666;
}

View File

@ -34,7 +34,7 @@
</view>
</view>
<view class="pkclass" v-if="length==2">vs</view>
<view :class="{'active':length!=2}" class="btn" @click="handlePK">对比</view>
<view :class="{'active':length!=2}" class="btn" @click="handlePK">{{$t("common.btnContrast")}}</view>
</view>
</view>
</view>
@ -102,7 +102,7 @@
that.infoList.push(res.data[i])
}
}
console.log("对比", res,)
console.log("对比", res, )
}
})
},
@ -144,7 +144,7 @@
handlePK() {
let that = this
if (that.isActive.length != 2) {
that.$tools.msg("请先选择数据!")
that.$tools.msg(that.$t("tips.verifyBontrast"))
return
}
let info = {}

View File

@ -7,30 +7,32 @@
<view class="right">
<view class="name">{{memInfo.name?memInfo.name:memInfo.nickname}}</view>
<view class="top">
<view>性别{{memInfo.gender=='0'?'未知':memInfo.gender=='1'?'男':'女'}}</view>
<view class="ml-15">年龄{{user.age}}</view>
<view>
{{$t("common.infoGender")}}{{memInfo.gender=='0'?$t("common.infoUnknown"):memInfo.gender=='1'?$t("common.infoMan"):$t("common.infoWoman")}}
</view>
<view class="ml-15">{{$t("common.infoAge")}}{{user.age}}{{$t("common.infoAgeunit")}}</view>
</view>
</view>
</view>
<view class="box" v-if="acd_id==2">
<view class="item">
<view>{{memInfo.day?memInfo.day:'0'}}</view>
<text>时间()</text>
<text>{{$t("contrast.time")}}</text>
</view>
<view class="item">
<view>{{memInfo.weightdiff?Math.abs(memInfo.weightdiff):0}}</view>
<text v-if="Number(memInfo.weightdiff)>0">增重(kg)</text>
<text v-else>减重(kg)</text>
<text v-if="Number(memInfo.weightdiff)>0">{{$t("contrast.weightdiffAugment")}}(kg)</text>
<text v-else>{{$t("contrast.weightdiff")}}(kg)</text>
</view>
<view class="item">
<view>{{memInfo.fat_wdiff?Math.abs(memInfo.fat_wdiff):0}}</view>
<text v-if="Number(memInfo.fat_wdiff)>0">增脂(kg)</text>
<text v-else>减脂(kg)</text>
<text v-if="Number(memInfo.fat_wdiff)>0">{{$t("contrast.fatWdiffAugment")}}(kg)</text>
<text v-else>{{$t("contrast.fatWdiff")}}(kg)</text>
</view>
<view class="time">
<view>
<uni-icons class="t-icon t-icon-shijian-mianxing-0"></uni-icons>{{memInfo.time}}
</view>数据变化
</view>{{$t("contrast.changeData")}}
</view>
</view>
<view class="boxTime" v-else>
@ -38,15 +40,15 @@
<uni-icons class="t-icon t-icon-shijian-mianxing-0 mr-10 size18"></uni-icons>
{{memInfo.time}}
</view>
数据变化
{{$t("contrast.changeData")}}
</view>
<view class="control">
<!-- 名称 -->
<view class="title">
<view class="name"></view>
<view>趋势</view>
<view>之前</view>
<view>之后</view>
<view>{{$t("contrast.trend")}}</view>
<view>{{$t("contrast.before")}}</view>
<view>{{$t("contrast.after")}}</view>
</view>
<view v-for="(ite,ind) in listStr" :key="ind" class="li">
<view class="name">

View File

@ -17,11 +17,11 @@
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<view class="endtext" v-if="!lastPage || page >= lastPage"> 到底了看看别的吧 </view>
<view class="endtext" v-if="!lastPage || page >= lastPage"> {{$t("tips.msgBottom")}} </view>
</view>
<view class="nolist" v-if="!ranklist.length||!lastPage">
<image src="../../static/none.png"></image>
<text>暂无数据</text>
<text>{{$t("index.none")}}</text>
</view>
</view>
</template>
@ -71,7 +71,7 @@
console.log("onReachBottom", this.lastPage)
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
title: '没有更多数据!',
title: that.$t("tips.msgNoMoreData"),
icon: 'none'
})
return
@ -84,8 +84,10 @@
let that = this
let id = that.ranklist[index].id
uni.showModal({
title: '友情提示',
content: '是否删除当前测量记录?',
title: that.$t("tips.msgTitle"),
content: that.$t("tips.verifyDeleteHistory"),
cancelText: that.$t("tips.btnSancellation"),
confirmText: that.$t("tips.btnConfirm"),
success: function(res) {
if (res.confirm) {
that.$model.gethistorydelete({
@ -110,10 +112,10 @@
that.isDelete = true
}
that.$tools.msg("删除成功")
that.$tools.msg(that.$t("tips.msgDelete"))
})
} else if (res.cancel) {
that.$tools.msg("您已取消操作!");
that.$tools.msg(that.$t("tips.msgCancel"));
}
},
})
@ -135,7 +137,7 @@
console.log("历史记录", res)
if (res.code != 0) return
let options = [{
text: '删除',
text: that.$t("tips.btnDelete"),
style: {
backgroundColor: '#dd524d'
}

View File

@ -1,39 +1,39 @@
<template>
<view class="content">
<view class="editem">
<view class="name">身高</view>
<view class="name">{{$t("common.infoHeight")}}</view>
<view class="right">
<input type="digit" v-model="PostData.height" placeholder="请输入身高"
<input type="digit" v-model="PostData.height" :placeholder="$t('tips.verifyHeight')"
placeholder-style="font-size:13px;color:#666" />cm
</view>
</view>
<view class="edit">
<view class="editem">
<view class="name">体重</view>
<view class="name">{{$t("common.infoWeight")}}</view>
<view class="right">
<input type="digit" v-model="PostData.weight" placeholder="请输入体重"
<input type="digit" v-model="PostData.weight" :placeholder="$t('tips.verifyWeight')"
placeholder-style="font-size:13px;color:#666" />kg
</view>
</view>
<view class="editem">
<view class="name">性别</view>
<view class="name">{{$t("common.infoGender")}}</view>
<view class="right radio2">
<view class="radio">
<uni-icons :type="PostData.sex==1?'checkbox-filled':'circle'" @click="PostData.sex=1" size="24"
:color="PostData.sex==1?'#fea606':'#dfdfdf'"></uni-icons>
:color="PostData.sex==1?'#fea606':'#dfdfdf'"></uni-icons>{{$t("common.infoMan")}}
</view>
<view class="radio ml-15">
<uni-icons :type="PostData.sex==2?'checkbox-filled':'circle'" @click="PostData.sex=2" size="24"
:color="PostData.sex==2?'#fea606':'#dfdfdf'"></uni-icons>
:color="PostData.sex==2?'#fea606':'#dfdfdf'"></uni-icons>{{$t("common.infoWoman")}}
</view>
</view>
</view>
<view class="editem">
<view class="name">出生日期</view>
<view class="name">{{$t("common.infoBirthday")}}</view>
<view class="right">
<picker mode="date" :value="PostData.birthday" :end="endDate" @change="bindDateChange"
:fields="fields">
<view class="text">{{PostData.birthday?PostData.birthday:"请选择出生日期"}}</view>
<view class="text">{{PostData.birthday?PostData.birthday:$t('tips.verifyBirthday')}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
@ -69,9 +69,9 @@
</view>
</view>
<view class="tip">
BMI是身体质量指数,是目前国际上常用的衡量人体胖瘦程度以及是否健康的一个标准
{{$t("bmi.desc")}}
</view>
<view class="btn mt-20" @click="submit"> 立即计算</view>
<view class="btn mt-20" @click="submit"> {{$t("common.btnBMI")}}</view>
</view>
</template>
@ -83,7 +83,7 @@
PostData: {
weight: '',
height: '',
sex: 0,
sex: 1,
birthday: null
},
resdata: {
@ -120,33 +120,25 @@
methods: {
//
onsexArr(e) {
this.PostData.sex = this.sexItem[e.target.value] == "男" ? 1 : 2
this.PostData.sex = this.sexItem[e.target.value] == this.$t("common.infoMan") ? 1 : 2
},
//
bindDateChange(e) {
this.PostData.birthday = e.target.value
},
hideKeyboard() {
console.log("隐藏软键盘")
uni.hideKeyboard()
},
//bmi
submit() {
var that = this;
if (!that.PostData.weight) {
this.$tools.msg("请输入体重")
return;
}
if (!that.PostData.height) {
this.$tools.msg("请输入身高")
this.$tools.msg(this.$t("tips.verifyHeight"))
return;
}
if (!that.PostData.sex) {
this.$tools.msg("请选择性别")
if (!that.PostData.weight) {
this.$tools.msg(this.$t("tips.verifyWeight"))
return;
}
if (!that.PostData.birthday) {
this.$tools.msg("请选择年龄")
this.$tools.msg(this.$t("tips.verifyBirthday"))
return;
}
that.$model.calcbmi(that.PostData).then(res => {
@ -224,7 +216,7 @@
/deep/input {
padding-left: 0px;
margin-top: 0px;
font-size:30rpx !important;
font-size: 30rpx !important;
height: 38px;
line-height: 38px;
}

View File

@ -1,51 +1,51 @@
<template>
<view class="content">
<view class="top">
<text>成年身高预测</text>
为保证数据准确定请认真填写真实信息
<text>{{$t("inheritHeighet.title")}}</text>
{{$t("inheritHeighet.tips0")}}
</view>
<view class="table">
<view class="tr">
<view class="text">性别</view>
<view class="text">{{$t("common.infoGender")}}</view>
<view class="td">
<view class="radio">
<uni-icons :type="sex==1?'checkbox-filled':'circle'" @click="sex=1" size="24"
:color="sex==1?'#fea606':'#dfdfdf'"></uni-icons>
:color="sex==1?'#fea606':'#dfdfdf'"></uni-icons>{{$t("common.infoMan")}}
</view>
<view class="radio ml-10">
<uni-icons :type="sex==2?'checkbox-filled':'circle'" @click="sex=2" size="24"
:color="sex==2?'#fea606':'#dfdfdf'"></uni-icons>
:color="sex==2?'#fea606':'#dfdfdf'"></uni-icons>{{$t("common.infoWoman")}}
</view>
</view>
</view>
<view class="tr">
<view class="text">出生日期</view>
<view class="text">{{$t("common.infoBirthday")}}</view>
<view class="td">
<picker mode="date" :end="endDate" @change="maskClick" :value="birthday?birthday:endDate"
:fields="fields">
<view class="uni-input">
{{birthday?birthday:'请选择'}}
{{birthday?birthday:$t('tips.verifyPicker')}}
<icon class="iconfont icon-arrow-down-bold"></icon>
</view>
</picker>
</view>
</view>
<view class="tr">
<view class="text">爸爸身高</view>
<view class="text">{{$t("inheritHeighet.dad")}}</view>
<view class="td">
<input class="input" type="digit" v-model="dadheight " placeholder="请输入">cm
<input class="input" type="digit" v-model="dadheight " :placeholder="$t('tips.verifyRecord')">cm
</view>
</view>
<view class="tr">
<view class="text">妈妈身高</view>
<view class="text">{{$t("inheritHeighet.mom")}}</view>
<view class="td">
<input class="input" type="digit" v-model="momheight" placeholder="请输入">cm
<input class="input" type="digit" v-model="momheight" :placeholder="$t('tips.verifyRecord')">cm
</view>
</view>
</view>
<view class="table table2">
<view class="text">当前标准身高</view>
<view class="text">成年身高预测</view>
<view class="text">{{$t("inheritHeighet.geneticheight")}}</view>
<view class="text">{{$t("inheritHeighet.adultheight")}}</view>
<view class="td">
<text>{{geneticheight}}</text>cm
</view>
@ -54,15 +54,15 @@
<text class="text2" v-if="errorvalue">±{{errorvalue}}</text> cm
</view>
</view>
<view class="btn mb-15" @click="handleClick">立即计算</view>
<view class="btn mb-15" @click="handleClick">{{$t("common.btnBMI")}}</view>
<!-- <button open-type="share" class="share">
<icon class="t-icon t-icon-fenxiang"></icon>分享朋友测一测
</button> -->
<view class="title mt-20">
<view class="h5">如果当前实际身高当前标准身高</view>
<view class="con">孩子后天生长环境不利长高请从饮食睡眠运动情绪等方面排查加强后天因素管理让孩子处于最佳长高状态</view>
<view class="h5">如果当前实际身高当前标准身高</view>
<view class="con">孩子后天生长环境有利长高请继续保持加强后天因素管理孩子成年可比标准高10cm以上</view>
<view class="h5">{{$t("inheritHeighet.tips1")}}</view>
<view class="con">{{$t("inheritHeighet.tips2")}}</view>
<view class="h5">{{$t("inheritHeighet.tips3")}}</view>
<view class="con">{{$t("inheritHeighet.tips4")}}</view>
</view>
</view>
</template>
@ -121,15 +121,15 @@
handleClick() {
let that = this
if (!that.dadheight) {
that.$tools.msg("请输入爸爸身高!");
that.$tools.msg(that.$t("tips.verifyHeightDad"));
return
}
if (!that.momheight) {
that.$tools.msg("请输入妈妈身高!");
that.$tools.msg(that.$t("tips.verifyHeightMom"));
return
}
uni.showLoading({
title: '计算中'
title: that.$t("tips.msgCalculating")
});
that.$model.GetPredictheight({
dadHeight: that.dadheight,

View File

@ -4,30 +4,30 @@
<view class="login">
<view class="editem">
<view class="item">
<view class="text">手机号/邮箱</view>
<view class="text">{{$t("common.titleAccountText")}}</view>
<view class="input">
<input v-model="phone" type="text"/>
<input v-model="phone" type="text" :placeholder="$t('common.titleAccountText')"/>
</view>
</view>
<view class="item ">
<view class="text">验证码</view>
<view class="text">{{$t("common.titleCode")}}</view>
<view class="input yanzhengma">
<input class="uni-input" v-model="code" />
<input class="uni-input" v-model="code" :placeholder="$t('common.titleCode')"/>
<button class="code" type="none" @click="handleCode" v-model="code"
:disabled="disabled">{{second<60 ? second+'S后重发':$t("from.sendcode")}}
:disabled="disabled">{{second<60 ? second+'$t("common.titleSendCodeRetry")':$t("common.titleSendCode")}}
</button>
</view>
</view>
<view class="item">
<view class="text">密码</view>
<view class="text">{{$t("common.titlePassword")}}</view>
<view class="input">
<input class="uni-input" v-model="password" />
<input class="uni-input" v-model="password" :placeholder="$t('common.titlePassword')"/>
</view>
</view>
<view class="item">
<view class="text">确认密码</view>
<view class="text">{{$t("common.titleConfirmPassword")}}</view>
<view class="input">
<input class="uni-input" v-model="password2" />
<input class="uni-input" v-model="password2" :placeholder="$t('common.titleConfirmPassword')"/>
</view>
</view>
</view>
@ -39,7 +39,7 @@
</label>
</checkbox-group>
</view> -->
<view class="btnlogin" @click="handleTelLogin">确认</view>
<view class="btnlogin" @click="handleTelLogin">{{$t("tips.btnSubmit")}}</view>
</view>
</view>
</template>
@ -69,32 +69,28 @@
handleTelLogin() {
let that = this
let phoneType = that.phone.indexOf("@") !== -1
if (that.value == 0) {
that.$tools.msg("请先确认勾选协议")
return
}
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号")
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg("请输入正确的邮箱")
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (!that.code) {
that.$tools.msg("请填写验证码")
that.$tools.msg(that.$t("tips.verifyCode"))
return
}
if (!that.password) {
that.$tools.msg("请填写密码")
that.$tools.msg(that.$t("tips.passwordTips"))
return
}
if (!that.password2) {
that.$tools.msg("请确认密码")
that.$tools.msg(that.$t("tips.verifyPasswordTwo"))
return
}
if (that.password2 != that.password) {
that.$tools.msg("请确认两次密码填写一致")
that.$tools.msg(that.$t("tips.verifyPasswordCorrect"))
return
}
let account = {
@ -113,11 +109,9 @@
}
uni.setStorageSync('token', res.data.token)
uni.setStorageSync('aan_id', res.data.aan_id)
that.$tools.msg("设置成功,进入程序中")
that.$tools.msg(that.$t("tips.msgSetPasswordSuccess"))
setTimeout(function() {
uni.reLaunch({
url: "/pages/home/home?type=1"
})
uni.$emit('login-sucesss');
}, 1000)
}).catch(err => {})
},
@ -126,11 +120,11 @@
let that = this
let phoneType = that.phone.indexOf("@") !== -1
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号")
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg("请输入正确的邮箱")
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
//
@ -193,7 +187,7 @@
.title {
text-align: left;
color: #333;
font-size: 40rpx;
font-size: 40rpx;
font-weight: bold;
margin-bottom: 15px;
}
@ -241,13 +235,13 @@
left: 10px;
right: 0px;
z-index: 88;
font-size:28rpx;
font-size: 28rpx;
}
.yanzhengma {
input {
right: 220rpx;
font-size:28rpx;
font-size: 28rpx;
}
}
}

View File

@ -1,58 +1,76 @@
<template>
<view class="content">
<view class="bg"></view>
<!-- #ifdef APP-PLUS||APP -->
<!-- 语言切换 -->
<view class="language">
<view class="nowlanguage" @click="Islanguage =!Islanguage">
{{nowlanguage}}
<uni-icons type="down" size="18"></uni-icons>
</view>
<view class="languageList" v-if="Islanguage">
<view class="item" v-for="(ite,ind) in languageList" :class="[nowlanguage==ite.name?'active':'']"
@click="handleSetlanguage(ite)">
{{ite.name}}
<image src="../../static/dui1.png" v-if="nowlanguage==ite.name"></image>
</view>
</view>
</view>
<!-- #endif -->
<view class="top">
<image src="../../static/logo2.png"></image>
<text>Reedaw</text>
</view>
<view class="login box_shadow">
<view class="title">登录</view>
<view class="title">{{$t("common.titleLogin")}}</view>
<view class="toggle cblue" @click="handleToggle">
切换登录
{{$t("common.titleToggleLogin")}}
</view>
<view class="editem">
<view class="item">
<view class="text">手机号/邮箱</view>
<view class="text">{{$t("common.titleAccountText")}}</view>
<view class="input">
<input v-model="phone" />
<input v-model="phone" :placeholder="$t('common.titleAccountText')"/>
</view>
</view>
<!-- 验证码登录 -->
<view class="item " v-if="isCode">
<view class="text">验证码</view>
<view class="text">{{$t("common.titleCode")}}</view>
<view class="input yanzhengma">
<input class="uni-input" v-model="code" />
<input class="uni-input" v-model="code" :placeholder="$t('common.titleCode')"/>
<button class="code" type="none" @click="handleCode" v-model="code"
:disabled="disabled">{{second<60 ? second+'S后重发':'获取验证码'}}
:disabled="disabled">{{second<60 ? second+'$t("common.titleSendCodeRetry")':$t("common.titleSendCode")}}
</button>
</view>
</view>
<!-- 密码登录 -->
<view class="item " v-else>
<view class="text">密码</view>
<view class="text">{{$t("common.titlePassword")}}</view>
<view class="input">
<input class="uni-input" v-model="password" />
<input class="uni-input" v-model="password" :placeholder="$t('common.titlePassword')"/>
</view>
</view>
<view class="forget " v-if="!isCode">
<text @click="handlePassword('forgetPassword')">忘记密码?</text>
<text @click="handlePassword('forgetPassword')">{{$t("common.titleForgotPassword")}}?</text>
</view>
</view>
<view class="xieyi">
<checkbox-group @change="checkboxChange" class="group">
<label>
<checkbox :value="1" style="transform:scale(0.7)" />阅读并同意
<!-- <text @click.stop @click="handleUserXieyi" class="blue">用户协议</text> -->
<text @click.stop @click="handlexieyi" class="blue">隐私协议</text>
<checkbox :value="1" style="transform:scale(0.7)" />{{$t("common.titleAgreementText")}}
<text @click.stop @click="handlexieyi"
class="blue">{{$t("common.titleAgreementContntText")}}</text>
</label>
</checkbox-group>
</view>
<view class="btnlogin" @click="handleTelLogin">登录</view>
<view class="btnlogin" @click="handleTelLogin">{{$t("common.titleLogin")}}</view>
<view class="btngroup" @click="handlePassword('register')">
<text>注册</text>
<text>{{$t("common.titleRegister")}}</text>
</view>
</view>
<!-- 语言切换 -->
<!-- #ifdef MP-WEIXIN -->
<view class="wxbtn">
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="value==1">
@ -84,13 +102,23 @@
second: 60,
value: 0,
isCode: true,
loginCode: ""
loginCode: "",
Islanguage: false,
language: "",
nowlanguage: "",
languageList: [],
componentKey: 1
}
},
onLoad() {
let that = this
// #ifdef MP-WEIXIN
this.login()
that.login()
// #endif
that.language = uni.getLocale()
that.languageList = that.$video.language
that.nowlanguage = that.languageList.find(ite => ite.key == that.language).name
console.log("that.nowlanguage", that.nowlanguage)
},
methods: {
//
@ -102,23 +130,23 @@
let that = this
let phoneType = that.phone.indexOf("@") !== -1
if (that.value == 0) {
that.$tools.msg("请先确认勾选协议")
that.$tools.msg(that.$t("tips.verifyAgreement"))
return
}
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号")
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg("请输入正确的邮箱")
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.isCode && !that.code) {
that.$tools.msg("请输入验证码")
that.$tools.msg(that.$t("tips.verifyCode"))
return
}
if (!that.isCode && !that.password) {
that.$tools.msg('请输入正确密码')
that.$tools.msg(that.$t("tips.verifyPassword"))
return
}
this.$model.getonlogin({
@ -129,13 +157,11 @@
console.log("data", res.data)
that.$tools.msg(res.msg)
if (res.code != 0) return
that.$tools.msg("登录成功")
that.$tools.msg(that.$t("tips.msgLoginSuccess"))
uni.setStorageSync('token', res.data.token)
uni.setStorageSync('aan_id', res.data.aan_id)
setTimeout(function() {
uni.reLaunch({
url: "/pages/home/home?type=1"
})
uni.$emit('login-sucesss');
}, 1000)
}).catch(err => {})
},
@ -144,11 +170,11 @@
let that = this
let phoneType = that.phone.indexOf("@") !== -1
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号")
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg("请输入正确的邮箱")
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
//
@ -175,7 +201,7 @@
//
handleIsTel() {
if (this.value == 0) {
this.$tools.msg("请先确认勾选协议")
this.$tools.msg(this.$t("tips.verifyAgreement"))
return
}
},
@ -206,13 +232,16 @@
uni.setStorageSync('token', res.data.token)
uni.setStorageSync('aan_id', res.data.aan_id)
setTimeout(function() {
uni.reLaunch({
url: "/pages/home/home?type=1"
})
uni.$emit('login-sucesss');
}, 1000)
})
}
},
//
handleSetlanguage(ite) {
uni.setLocale(ite.key)
this.nowlanguage = ite.name
},
handleToggle() {
this.phone = ""
this.isCode = !this.isCode
@ -303,4 +332,61 @@
border-radius: 50%;
}
}
.language {
position: fixed;
top: 25px;
z-index: 999;
left: 15px;
width: 80%;
.nowlanguage {
font-size: 14px;
background: #fff;
height: 30px;
border-radius: 5px;
text-align: center;
display: flex;
width: 120px;
align-items: center;
justify-content: space-around;
}
.languageList {
background: #fff;
line-height: 45px;
width: 120px;
border-radius: 10px;
padding: 0 10px;
position: absolute;
top: 42px;
view {
border-bottom: 1px solid #dfdfdf;
display: flex;
align-items: center;
justify-content: space-between;
}
image {
width: 24px;
height: 24px;
}
.active {
color: $btncolor;
font-weight: bold;
}
}
.languageList::after {
content: "";
position: absolute;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 8px solid #fff;
left: calc(50% - 8px);
top: -8px;
}
}
</style>

View File

@ -8,18 +8,26 @@
</view>
<view class="list">
<view class="item" @click="handleVersion">
<view class="left">版本更新</view>
<view class="left">{{$t("common.titleVersionUpdate")}}</view>
<view class="right">
<text class="new" v-if="version==-1">新版本{{phoneInfo.versionUrl.version}}</text>
<text class="new" v-if="version==-1">{{$t("common.titleNewVersion")}}{{phoneInfo.versionUrl.version}}</text>
<uni-icons type="right"></uni-icons>
</view>
</view>
<view class="item">
<a href="http://tc.pcxbc.com/technology/privacy_index" class="href">
<text class="left">隐私协议</text>
<text class="left">{{$t("common.titleAgreementContntText")}}</text>
<uni-icons type="right"></uni-icons>
</a>
</view>
<!-- <view class="item">
<view class="left">语言切换</text>
<view class="right">
{{nowlanguage}}
<uni-icons type="right"></uni-icons>
</view>
</view>
</view> -->
</view>
</view>
<!-- <view class="xieyi">
@ -46,10 +54,8 @@
onLoad() {
let that = this
if (!that.phoneInfo.versionUrl) {
console.log("111")
that.handleoginversion()
} else {
console.log("222")
that.version = that.$tools.compareVersions(that.phoneInfo.info.version, that.phoneInfo.versionUrl.version)
}
},
@ -69,7 +75,7 @@
if (that.version == -1) {
if (that.phoneInfo.platform === 'android') {
uni.setStorageSync('VERSION', that.phoneInfo.versionUrl.version)
let showLoading = plus.nativeUI.showWaiting('正在下载')
let showLoading = plus.nativeUI.showWaiting(that.$t("tips.msgDownloading"))
dtask = uni.downloadFile({
url: that.phoneInfo.versionUrl.url,
success: (downloadRes) => {
@ -90,13 +96,13 @@
},
fail: () => {
uni.showToast({
title: '升级失败',
title: that.$t("tips.msgUpgradeFail"),
icon: 'none'
});
}
});
dtask.onProgressUpdate((res) => {
showLoading.setTitle(" 正在下载" + res.progress + "% ");
showLoading.setTitle(that.$t("tips.msgDownloading") + res.progress + "% ");
// console.log('' + res.progress + '%');
});
} else {
@ -105,7 +111,7 @@
})
}
} else {
that.$tools.msg("已经是最新版本了!")
that.$tools.msg(that.$t("tips.msgLatestVersion"))
}
},
//

View File

@ -1,7 +1,7 @@
<template>
<view class="common">
<view class="add" @click="handleAddUser">
<icon class="iconfont icon-tianjia"></icon>添加成员
<icon class="iconfont icon-tianjia"></icon>{{$t("common.titleManageAdd")}}
</view>
<view class="box" v-if="familayList.lenght!=0">
<view class="list">
@ -16,13 +16,13 @@
{{item.nickname}}
</view>
<view class="title2">
<text>{{item.gender==1?'男':'女'}}</text>
<text>{{item.age}}</text>
<text>{{item.gender==1?$t('common.infoMan'):$t('common.infoWoman')}}</text>
<text>{{item.age}}{{$t('common.infoAgeunit')}}</text>
</view>
</view>
</view>
<view class="right" @click.stop>
<view class="blueBtn" @click="editorInfo(item)">编辑</view>
<view class="blueBtn" @click="editorInfo(item)">{{$t('common.btnEdit')}}</view>
</view>
</view>
</uni-swipe-action-item>
@ -44,7 +44,7 @@
</view>
</view>
<view v-else>
没有数据了
{{$t('index.none')}}
</view>
</view>
</template>
@ -58,12 +58,15 @@
return {
visible: false,
ranklist: [],
language: "",
}
},
computed: {
...mapState(["familayList", "user"])
},
onLoad() {},
onLoad() {
console.log("语言", uni.getLocale())
},
onPullDownRefresh() {
let that = this
that.handleUserList()
@ -77,20 +80,22 @@
let that = this
let id = that.familayList[ind].id
uni.showModal({
title: '友情提示',
content: '确定删除该成员吗',
title: that.$t("tips.msgTitle"),
content: that.$t("tips.verifyDeleteUser"),
cancelText: that.$t('tips.btnSancellation'),
confirmText: that.$t('tips.btnConfirm'),
success: function(res) {
if (res.confirm) {
that.$model.getDelUser({
id: id,
}).then(res => {
if (res.code != 0) return
that.$tools.msg("删除成功!");
that.$tools.msg(that.$t("tips.msgDelete"));
that.familayList.splice(ind, 1)
that.handleUserList()
})
} else if (res.cancel) {
that.$tools.msg("您已取消删除!");
that.$tools.msg(that.$t("tips.msgCancel"));
}
}
});

View File

@ -8,23 +8,26 @@
</view>
</view>
<view class="lan border-bottom">
<view class="left">姓名</view>
<view class="left">{{$t("common.infoNickname")}}</view>
<view class="right">
<input name="name" type="text" v-model="memInfo.nickname" placeholder="请输入姓名" />
<input name="name" type="text" v-model="memInfo.nickname"
:placeholder="$t('tips.verifyNickName')" />
<uni-icons type="clear" color="#999" v-if="memInfo.nickname" @click="memInfo.nickname=''"
size="20"></uni-icons>
</view>
</view>
<view class="lan border-bottom">
<view class="left">性别</view>
<view class="left">{{$t("common.infoGender")}}</view>
<view class="right">
<view class="radio">
<uni-icons :type="memInfo.gender==1?'checkbox-filled':'circle'" @click="memInfo.gender=1"
size="24" :color="memInfo.gender==1?'#fea606':'#dfdfdf'"></uni-icons>
size="24" :color="memInfo.gender==1?'#fea606':'#dfdfdf'"></uni-icons>
{{$t("common.infoMan")}}
</view>
<view class="radio ml-15">
<uni-icons :type="memInfo.gender==2?'checkbox-filled':'circle'" @click="memInfo.gender=2"
size="24" :color="memInfo.gender==2?'#fea606':'#dfdfdf'"></uni-icons>
size="24":color="memInfo.gender==2?'#fea606':'#dfdfdf'"></uni-icons>
{{$t("common.infoWoman")}}
</view>
<!-- <picker mode="selector" :range="sexItem" @change="onsexArr">
<view class="uni-input">{{memInfo.gender==0?'请选择':memInfo.gender==1?'男':'女'}}</view>
@ -33,33 +36,35 @@
</view>
</view>
<view class="lan border-bottom">
<view class="left">身高</view>
<view class="left">{{$t("common.infoHeight")}}</view>
<view class="right">
<input name="name" class="mr-5" type="digit" v-model="memInfo.height" placeholder="请输入身高" />CM
<input name="name" class="mr-5" type="digit" v-model="memInfo.height"
:placeholder="$t('tips.verifyHeight')" />CM
<uni-icons type="clear" color="#999" v-if="memInfo.height" @click="memInfo.height=''"
size="20"></uni-icons>
</view>
</view>
<view class="lan border-bottom">
<view class="left">体重</view>
<view class="left">{{$t("common.infoWeight")}}</view>
<view class="right">
<input name="name" type="digit" class="mr-5" v-model="memInfo.weight" placeholder="请输入体重" />KG
<input name="name" type="digit" class="mr-5" v-model="memInfo.weight"
:placeholder="$t('tips.verifyWeight')" />KG
<uni-icons type="clear" color="#999" v-if="memInfo.weight" @click="memInfo.weight=''"
size="20"></uni-icons>
</view>
</view>
<view class="lan border-bottom">
<view class="left">出生日期</view>
<view class="left">{{$t("common.infoBirthday")}}</view>
<view class="right">
<picker mode="date" :end="endDate" @change="maskClick"
:value="memInfo.birthday?memInfo.birthday:endDate" :fields="fields">
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:'请选择'}}</view>
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:$t("tips.verifyPicker")}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
</view>
<view class="lan border-bottom">
<view class="lan border-bottom" v-if="language=='zh-Hans'">
<view class="left">场景选择</view>
<view class="right">
<view class="radio">
@ -104,7 +109,7 @@
</view>
</view>
</view>
<view class="btn" @click="confirmInfo">提交</view>
<view class="btn" @click="confirmInfo">{{$t("tips.btnConfirm")}}</view>
<!-- 地区 -->
<view v-if="visible" class="visible" @click="visible=false">
<view @click.stop class="item">
@ -149,6 +154,7 @@
identity_name: "陌生人",
identity_id: "P0",
},
language: "",
visible: false,
province: [], //
city: [], //
@ -169,6 +175,9 @@
return this.$tools.GetDateStr(-90);
},
},
onReady() {
this.language = uni.getLocale()
},
onLoad(options) {
let that = this
that.handleIdentityList()
@ -196,19 +205,19 @@
confirmInfo() {
let that = this
if (!that.memInfo.nickname) {
that.$tools.msg("请输入姓名")
that.$tools.msg(that.$t("tips.verifyNickName"))
return;
}
if (!that.memInfo.height) {
that.$tools.msg("请选择身高")
that.$tools.msg(that.$t("tips.verifyHeight"))
return;
}
if (!that.memInfo.weight) {
that.$tools.msg("请选择体重")
that.$tools.msg(that.$t("tips.verifyWeight"))
return;
}
if (!that.memInfo.birthday) {
that.$tools.msg("请选择出生日期")
that.$tools.msg(that.$t("tips.verifyBirthday"))
return;
}
if (that.memInfo.measure_model == 1 && !that.memInfo.identity_id) {
@ -223,7 +232,7 @@
return https.then(res => {
console.log("成功", res)
if (res.code == 0) {
that.$tools.msg("提交成功");
that.$tools.msg(that.$t("tips.msgSetSuccess"));
that.handleUserList(res.data.aud_id)
} else {
that.$tools.msg(res.msg);
@ -290,7 +299,7 @@
},
//
onsexArr(e) {
this.memInfo.gender = this.sexItem[e.target.value] == "男" ? 1 : 2
this.memInfo.gender = this.sexItem[e.target.value] == that.$t("common.infoMan") ? 1 : 2
},
//
changegType(e) {

View File

@ -11,7 +11,7 @@
</view>
<view class="item">
<view class="time">
地区{{item.address}}
{{$t("index.infoNowUser")}}{{$t("index.infoAddress")}}{{item.address}}
</view>
<view class="number">
{{item.score}}
@ -19,11 +19,11 @@
</view>
</view>
</view>
<view class="endtext" v-if="!lastPage || page >= lastPage"> 到底了看看别的吧 </view>
<view class="endtext" v-if="!lastPage || page >= lastPage"> {{$t("tips.msgBottom")}} </view>
</view>
<view class="nolist" v-if="!lastPage">
<image src="../../static/none.png"></image>
<text>暂无数据</text>
<text>{{$t("index.none")}}</text>
</view>
</view>
</template>

View File

@ -3,22 +3,22 @@
<view class="login">
<view class="editem">
<view class="item">
<view class="text">邮箱</view>
<view class="text">{{$t("common.infoEmail")}}</view>
<view class="input">
<input v-model="phone" placeholder="请输入邮箱"/>
<input v-model="phone" :placeholder="$t('tips.verifyEmail')" />
</view>
</view>
<view class="item ">
<view class="text">验证码</view>
<view class="text">{{$t("common.titleCode")}}</view>
<view class="input yanzhengma">
<input class="uni-input" v-model="code" />
<input class="uni-input" v-model="code" :placeholder="$t('tips.verifyCode')"/>
<button class="code" type="none" @click="handleCode" v-model="code"
:disabled="disabled">{{second<60 ? second+'S后重发':$t("login.sendcode")}}
:disabled="disabled">{{second<60 ? second+"$t('common.titleSendCodeRetry')":$t("common.titleSendCode")}}
</button>
</view>
</view>
</view>
<view class="btnlogin" @click="handleTelLogin">确认</view>
<view class="btnlogin" @click="handleTelLogin">{{$t("tips.btnConfirm")}}</view>
</view>
</view>
</template>
@ -33,16 +33,25 @@
second: 60,
}
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleEmail'),
})
},
methods: {
//
handleTelLogin() {
let that = this
if (!that.phone) {
that.$tools.msg(that.$t("tips.verifyEmail"))
return
}
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg("请输入正确的邮箱")
that.$tools.msg(that.$t("tips.verifyEmailCorrect"))
return
}
if (!that.code) {
that.$tools.msg("请填写验证码")
that.$tools.msg(that.$t("tips.verifyCode"))
return
}
that.$model.getAccountMsg({
@ -53,7 +62,7 @@
that.$tools.msg(res.msg)
return
} else {
that.$tools.msg("设置成功!")
that.$tools.msg(that.$t("tips.msgSetSuccess"))
that.$store.commit('changeAccountNumber', {
my_email: that.phone
})
@ -67,11 +76,11 @@
handleCode() {
let that = this
if (!that.phone) {
that.$tools.msg("请输入邮箱")
that.$tools.msg(that.$t("tips.verifyEmail"))
return
}
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg("请输入正确的邮箱")
that.$tools.msg(that.$t("tips.verifyEmailCorrect"))
return
}
//

View File

@ -3,19 +3,19 @@
<view class="login">
<view class="editem">
<view class="item">
<view class="text">密码</view>
<view class="text">{{$t("common.titlePassword")}}</view>
<view class="input">
<input class="uni-input" v-model="password" placeholder="请输入密码"/>
<input class="uni-input" v-model="password" :placeholder="$t('tips.verifyPassword')"/>
</view>
</view>
<view class="item">
<view class="text">确认密码</view>
<view class="text">{{$t("common.titleConfirmPassword")}}</view>
<view class="input">
<input class="uni-input" v-model="password2" placeholder="请输入确认密码"/>
<input class="uni-input" v-model="password2" :placeholder="$t('tips.verifyPasswordTwo')"/>
</view>
</view>
</view>
<view class="btnlogin" @click="handleTelLogin">确认</view>
<view class="btnlogin" @click="handleTelLogin">{{$t("tips.btnConfirm")}}</view>
</view>
</view>
</template>
@ -34,15 +34,15 @@
handleTelLogin() {
let that = this
if (!that.password) {
that.$tools.msg("请填写密码")
that.$tools.msg(that.$t("tips.verifyPassword"))
return
}
if (!that.password2) {
that.$tools.msg("请确认密码")
that.$tools.msg(that.$t("tips.verifyPasswordTwo"))
return
}
if (that.password2 != that.password) {
that.$tools.msg("请确认两次密码填写一致")
that.$tools.msg(that.$t("tips.verifyPasswordCorrect"))
return
}
that.$model.getAccountPassword({
@ -53,7 +53,7 @@
if (res.code != 0) {
that.$tools.msg(res.msg)
} else {
that.$tools.msg("密码设置成功")
that.$tools.msg(that.$t("tips.msgSetSuccess"))
uni.navigateBack()
}
}).catch(err => {})

View File

@ -3,22 +3,22 @@
<view class="login">
<view class="editem">
<view class="item">
<view class="text">手机号</view>
<view class="text">{{$t("common.infoMobile")}}</view>
<view class="input">
<input v-model="phone" placeholder="请输入手机号" />
<input v-model="phone" :placeholder="$t('tips.verifyMobile')"/>
</view>
</view>
<view class="item ">
<view class="text">验证码</view>
<view class="text">{{$t("common.titleCode")}}</view>
<view class="input yanzhengma">
<input class="uni-input" v-model="code" />
<input class="uni-input" v-model="code" :placeholder="$t('tips.verifyCode')"/>
<button class="code" type="none" @click="handleCode" v-model="code"
:disabled="disabled">{{second<60 ? second+'S后重发':$t("login.sendcode")}}
:disabled="disabled">{{second<60 ? second+"$t('common.titleSendCodeRetry')":$t("common.titleSendCode")}}
</button>
</view>
</view>
</view>
<view class="btnlogin" @click="handleTelLogin">确认</view>
<view class="btnlogin" @click="handleTelLogin">{{$t("tips.btnConfirm")}}</view>
</view>
</view>
</template>
@ -33,16 +33,25 @@
second: 60,
}
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titlePhone'),
})
},
methods: {
//
handleTelLogin() {
let that = this
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号")
if (!that.phone) {
that.$tools.msg(that.$t("tips.verifyMobile"))
return
}
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyMobileCorrect"))
return
}
if (!that.code) {
that.$tools.msg("请填写验证码")
that.$tools.msg(that.$t("tips.verifyCode"))
return
}
that.$model.getAccountMsg({
@ -53,7 +62,7 @@
that.$tools.msg(res.msg)
return
} else {
that.$tools.msg("设置成功!")
that.$tools.msg(that.$t("tips.msgSetSuccess"))
that.$store.commit('changeAccountNumber', {
my_tel: that.phone
})
@ -67,17 +76,16 @@
handleCode() {
let that = this
if (!that.phone) {
that.$tools.msg("请输入手机号")
that.$tools.msg(that.$t("tips.verifyMobile"))
return
}
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号")
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyMobileCorrect"))
return
}
//
that.$model.getSendCode({
data: that.phone,
// type: that.type
}).then(res => {
console.log(res)
if (res.code != 0) {
@ -117,7 +125,7 @@
.title {
text-align: left;
color: #333;
font-size:40rpx;
font-size: 40rpx;
font-weight: bold;
margin-bottom: 15px;
}
@ -127,7 +135,7 @@
position: relative;
display: flex;
align-items: center;
font-size:28rpx;
font-size: 28rpx;
justify-content: space-between;
flex-wrap: wrap;
@ -143,7 +151,7 @@
width: 80px;
height: 40px;
line-height: 40px;
font-size:28rpx;
font-size: 28rpx;
}
.input {
@ -165,13 +173,12 @@
left: 10px;
right: 0px;
z-index: 88;
font-size:28rpx;
font-size: 28rpx;
}
.yanzhengma {
input {
right: 120px;
font-size: 32rpx;
}
}
}

View File

@ -1,11 +1,11 @@
<template>
<view class="content">
<view class="caritem">
<view class="text">头像</view>
<view class="text">{{$t("common.infoAvatar")}}</view>
<image :src="user.head_pic" class="image"></image>
</view>
<view class="caritem">
<view class="text">昵称</view>
<view class="text">{{$t("common.infoNickname")}}</view>
<view class="text_r">
<text v-if="!isEdit">{{user.nickname}}</text>
<input v-else type="text" v-model='nickname' @blur="handleBlur" />
@ -13,24 +13,24 @@
</view>
</view>
<view class="caritem" @click="navTo('/pageTwo/setting/phone')">
<view class="text">手机号</view>
<view class="text">{{$t("common.infoMobile")}}</view>
<view class="text_r">
<text>{{user.my_tel}}</text>
<uni-icons type="right"></uni-icons>
</view>
</view>
<view class="caritem" @click="navTo('/pageTwo/setting/email')">
<view class="text">邮箱</view>
<view class="text">{{$t("common.infoEmail")}}</view>
<view class="text_r">
<text>{{user.my_email}}</text>
<uni-icons type="right"></uni-icons>
</view>
</view>
<view class="caritem" @click="navTo('/pageTwo/setting/password')">
<view class="text">设置密码</view>
<view class="text">{{$t("common.titleSetPassword")}}</view>
<uni-icons type="right"></uni-icons>
</view>
<view class="btn mb-15" @click="handleOutLogin">删除账号</view>
<view class="btn mb-15" @click="handleOutLogin">{{$t("common.btnDeleteAccount")}}</view>
</view>
</template>
@ -56,25 +56,19 @@
handleOutLogin() {
let that = this
uni.showModal({
title: '友情提示',
confirmText: '删除',
content: '删除成功后,该账号的所有关联信息将被清空且无法找回,是否删除?',
title: that.$t('tips.msgTitle'),
content: that.$t('tips.verifyDeleteAccount'),
cancelText: that.$t('tips.btnSancellation'),
confirmText: that.$t('tips.btnDelete'),
success: function(res) {
if (res.confirm) {
that.$model.getdeleteAccount({}).then((res) => {
if (res.code != 0) return
that.$tools.msg("删除成功!");
uni.setStorageSync('token', null)
uni.setStorageSync('aan_id', null)
uni.clearStorageSync()
setTimeout(() => {
uni.reLaunch({
url: "/pageTwo/login/login"
})
}, 3000);
that.$tools.msg(that.$t("tips.msgDelete"));
uni.$emit('need-login');
})
} else if (res.cancel) {
that.$tools.msg("您已取消操作!");
that.$tools.msg(that.$t("tips.msgCancel"));
}
},
})
@ -149,11 +143,11 @@
display: flex;
align-items: center;
justify-content: space-between;
.uni-icons {
width: 30px;
text-align: right;
}
}
</style>

View File

@ -19,7 +19,7 @@
{
"path": "pages/skiping/charts",
"style": {
"navigationBarTitleText": "运动曲线",
"navigationBarTitleText": "%pageText.charts%",
"enablePullDownRefresh": false
}
@ -279,26 +279,23 @@
}
},
{
"path" : "devices/B20",
"style" :
{
"navigationBarTitleText" : "",
"path": "devices/B20",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "devices/PCL22",
"style" :
{
"navigationBarTitleText" : "",
"path": "devices/PCL22",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "devices/PCL22S",
"style" :
{
"navigationBarTitleText" : "",
"path": "devices/PCL22S",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
@ -346,7 +343,7 @@
"navigationBarTitleText": "身高预测"
}
},
{
"path": "home/bmi",
"style": {

View File

@ -42,7 +42,7 @@
<view class="box" v-else>
<view class="nolist">
<image src="../../static/none.png"></image>
<text>暂无数据</text>
<text>{{$t("index.none")}}</text>
</view>
</view>
</view>
@ -53,28 +53,28 @@
<view class="val">
{{userInfo.target_current?userInfo.target_current.target_weight:0}}<text>kg</text>
</view>
<view class="name">目标体重<uni-icons class="iconfont icon-bianji" color="#FEC407"></uni-icons>
<view class="name">{{$t("body.target_weight")}}<uni-icons class="iconfont icon-bianji" color="#FEC407"></uni-icons>
</view>
</view>
<view class="item">
<view class="val">
{{userInfo.target_current?Math.abs(userInfo.target_current.cumulative_weight):0}}<text>kg</text>
</view>
<view class="name" v-if="Number(userInfo.target_current.cumulative_weight)>0">累计增重</view>
<view class="name" v-else>累计减重</view>
<view class="name" v-if="Number(userInfo.target_current.cumulative_weight)>0">{{$t("body.Gain_weight")}}</view>
<view class="name" v-else>{{$t("body.cumulative_weight")}}</view>
</view>
<view class="item" @click="handleClick(2)">
<view class="val">
{{userInfo.target_current?userInfo.target_current.initial_weight:0}}<text>kg</text>
</view>
<view class="name">初始体重<uni-icons class="iconfont icon-bianji" color="#FEC407"></uni-icons>
<view class="name">{{$t("body.initial_weight")}}<uni-icons class="iconfont icon-bianji" color="#FEC407"></uni-icons>
</view>
</view>
<view class="item">
<view class="val">
{{userInfo.target_current?userInfo.target_current.cumulative_day:0}}<text></text>
{{userInfo.target_current?userInfo.target_current.cumulative_day:0}}<text></text>
</view>
<view class="name">减重天数</view>
<view class="name">{{$t("body.cumulative_day")}}</view>
</view>
</view>
</view>
@ -169,12 +169,12 @@
let that = this
if (that.endTime) {
if (Date.parse(e.detail.value) > Date.parse(that.endTime)) {
that.$tools.msg("请选择正确的时间")
that.$tools.msg(that.$t('tips.verifyBodyDate'))
return
}
} else {
if (Date.parse(e.detail.value) > Date.parse(that.endDate)) {
that.$tools.msg("请选择正确的时间")
that.$tools.msg(that.$t('tips.verifyBodyDate'))
return
}
}
@ -192,12 +192,12 @@
let that = this
if (that.startTime) {
if (Date.parse(e.detail.value) < Date.parse(that.startTime)) {
that.$tools.msg("请选择正确的时间")
that.$tools.msg(that.$t('tips.verifyBodyDate'))
return
}
} else {
if (Date.parse(e.detail.value) < Date.parse(that.startDate)) {
that.$tools.msg("请选择正确的时间")
that.$tools.msg(that.$t('tips.verifyBodyDate'))
return
}
}

View File

@ -179,7 +179,7 @@
</view>
<!-- 卡片 -->
<view class="list" v-if="user">
<view class="list" v-if="user&&language == 'zh-Hans'">
<view class="bold mt-10 ml-10" v-if="user.card_data_list.length">卡片数据</view>
<view v-for="(item,index) in user.card_data_list">
<!-- 标题 -->
@ -220,7 +220,7 @@
</view>
</view>
<!-- 设置数据卡片 -->
<view class="setcard" @click="handleCard" v-if="userList.length&&user.measure_model==1">
<view class="setcard" @click="handleCard" v-if="userList.length&&user.measure_model==1&&language == 'zh-Hans'">
设置数据页卡片
</view>
<!-- 弹框广告 -->
@ -272,66 +272,13 @@
serviceId: "",
write: "",
notify: "",
isCoupon: false,
notices: [],
banner: [],
pop: [],
devicesList: [],
islink: 0, //-1
textLink: "",
proposalnd: 1,
toollist: [{
icon: '/static/q2.png',
title: '中招估分',
path: "/pages/score/score"
}, {
icon: '/static/q4.png',
title: 'BMI测评',
path: "/pageTwo/home/bmi"
},
{
icon: '/static/q6.png',
title: '遗传身高',
path: "/pageTwo/home/inheritHeighet"
},
{
icon: '/static/q1.png',
title: '智能跳绳',
path: "/pages/skiping/skip?acd_id=6"
},
{
icon: '/static/q10.png',
title: '肺活训练',
path: "/pages/lunging/vitalcapacity?acd_id=8"
},
{
icon: '/static/q8.png',
title: '历史体重',
path: "/pageTwo/history/history?acd_id=2"
},
{
icon: '/static/q3.png',
title: '减脂对比',
path: "/pageTwo/compk/contrast?acd_id=2"
},
{
icon: '/static/q5.png',
title: '曲线/目标',
path: "/pages/body/body?acd_id=2"
},
{
icon: '/static/q7.png',
title: '手动记录',
path: ""
},
{
icon: '/static/q9.png',
title: '成员管理',
path: "/pageTwo/my/manage"
},
],
unit: ""
unit: "",
language: "",
// toollist: []
}
},
components: {
@ -339,7 +286,7 @@
headerIndex
},
computed: {
...mapState(["user", "familayList", 'MeasureResult', "isConnected", "isBluetoothTyle"]),
...mapState(["user", "familayList", 'MeasureResult', "bannerCon", "isConnected", "isBluetoothTyle"]),
userInfo() {
return this.user
},
@ -347,7 +294,6 @@
return this.familayList
},
cplist() {
console.log("this.MeasureResult.cplist", this.MeasureResult.cplist)
return this.MeasureResult.cplist
},
info() {
@ -356,28 +302,35 @@
that.activeHeight = 0
return that.MeasureResult
},
},
onLoad(options) {
let that = this
// #ifdef APP-PLUS
if (options && options.type == 1) {
that.handleUserList()
that.handleBannerList()
}
// #endif
// #ifndef APP-PLUS
that.handleoginversion()
// #endif
toollist() {
let list = this.$video.toolList
return uni.getLocale() == "zh-Hans" ? list : list.splice(1, 9)
},
isCoupon() {
return this.bannerCon.isCoupon
},
notices() {
return this.bannerCon.notices
},
banner() {
return this.bannerCon.banner
},
pop() {
return this.bannerCon.pop
},
},
onLoad() {
let that = this
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
that.openBluetoothAdapter()
that.onBLEConnectionStateChange()
},
onPullDownRefresh() {
let that = this
that.isShow = true
that.handleUserList()
that.onBLEConnectionStateChange()
uni.stopPullDownRefresh()
},
@ -401,7 +354,7 @@
},
onShow() {
let that = this
console.log("onShow", uni.getStorageSync('isBle'))
that.language = uni.getLocale()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
@ -412,102 +365,6 @@
}
},
methods: {
//
handleoginversion() {
let that = this
that.$model.getloginversion({}).then(res => {
if (res.code == 0) {
that.handleUserList()
that.handleBannerList()
} else {
uni.setStorageSync('token', null)
uni.setStorageSync('aan_id', null)
uni.clearStorageSync()
uni.reLaunch({
url: "/pageTwo/login/login"
})
}
})
},
//
handleUserList() {
let that = this
that.$model.getUserList({
type: 2
}).then(res => {
that.isShow = true
console.log("用户列表", res, uni.getStorageSync('userid'))
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.$store.commit('changeFamilay', res.data)
if (res.data.length) {
let userid = ""
if (uni.getStorageSync('userid')) {
let found = res.data.find(e => e.id == uni.getStorageSync('userid'));
if (found !== undefined) {
userid = found.id
} else {
userid = res.data[0].id
uni.setStorageSync('userid', res.data[0].id)
}
} else {
userid = res.data[0].id
uni.setStorageSync('userid', res.data[0].id)
}
console.log("正确userid", userid)
that.$store.dispatch('getUserInfo', {
aud_id: userid
})
that.$store.dispatch("getResult", {
aud_id: userid
})
that.handleLabelList(userid)
that.handlePublicRecord(userid)
that.openBluetoothAdapter()
}
}).catch(err => {})
},
//
handleLabelList(id) {
let that = this
that.$model.getLabelList({
aud_id: id
}).then(res => {
console.log("公共卡片项目", res)
if (res.code == 0) {
that.$store.commit('changeLabelList', res.data)
}
})
},
//
handlePublicRecord(id) {
let that = this
that.$model.getPublicRecord({
aud_id: id
}).then(res => {
console.log("公共手动记录", res)
if (res.code == 0) {
that.$store.commit('changePublicRecord', res.data)
}
})
},
// banner
handleBannerList() {
let that = this
that.$model.getBannerList({}).then(res => {
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.notices = res.data.notice
that.banner = res.data.banner
that.pop = res.data.pop
that.isCoupon = res.data.pop.length ? true : false
})
},
detail(ite) {
uni.navigateTo({
url: "/pageTwo/webview/webview?id=" + ite.id + '&url=' + ite.jump_url
@ -521,7 +378,8 @@
},
handleTool(ind, path) {
let that = this
if (ind == 8) {
console.log("path", path)
if (path == "") {
that.handlerRecord(2)
} else {
that.navTo(path)
@ -595,7 +453,7 @@
var that = this;
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
console.log("name",device.name)
console.log("name", device.name)
if (!device.name && !device.localName) {
device.advertisData = device.advertisData ? device.advertisData : ''
let value = that.$tools.ab2hex(device.advertisData, "")

View File

@ -13,27 +13,27 @@
<view class="list" @click="navTo('/pageTwo/my/manage')">
<view class="item border-bottom">
<view class="left">
<view class="name">成员管理</view>
<view class="name">{{$t("common.titleManage")}}</view>
</view>
<view class="right">
<uni-icons type="right"></uni-icons>
</view>
</view>
</view>
<view class="list" @click="navTo('/pageTwo/business/business')">
<!-- <view class="list" @click="navTo('/pageTwo/business/business')">
<view class="item border-bottom">
<view class="left">
<view class="name">设备管理</view>
<view class="name">{{$t("common.titlebBusiness")}}</view>
</view>
<view class="right">
<uni-icons type="right"></uni-icons>
</view>
</view>
</view>
<view class="list" @click="navTo('/pageTwo/score/history')">
</view> -->
<view class="list" @click="navTo('/pageTwo/score/history')" v-if="language== 'zh-Hans'">
<view class="item border-bottom">
<view class="left">
<view class="name">估分历史</view>
<view class="name">{{$t("common.titleScoreHistory")}}</view>
</view>
<view class="right">
<uni-icons type="right"></uni-icons>
@ -44,7 +44,7 @@
<view class="list" @click="navTo('/pageTwo/my/about')">
<view class="item border-bottom">
<view class="left">
<view class="name">关于我们</view>
<view class="name">{{$t("common.titleAboutUs")}}</view>
</view>
<view class="right">
<uni-icons type="right"></uni-icons>
@ -63,7 +63,7 @@
</view>
</view>
</view>
<view class="btn mb-15" v-if="token" @click="handleOutLogin">退出登录</view>
<view class="btn mb-15" v-if="token" @click="handleOutLogin">{{$t("common.btnLogOut")}}</view>
</view>
</template>
@ -76,7 +76,8 @@
data() {
return {
token: "",
user: {}
user: {},
language: ""
}
},
components: {
@ -93,9 +94,15 @@
},
onLoad() {
let that = this
that.language = uni.getLocale()
that.token = uni.getStorageSync('token')
that.handleAccountNumber()
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleMe'),
})
},
watch: {
nickname() {
this.user = {}
@ -126,22 +133,18 @@
handleOutLogin() {
let that = this
uni.showModal({
title: '友情提示',
content: '是否退出登录?',
title: that.$t('tips.msgTitle'),
content: that.$t('tips.verifyOutLogin'),
cancelText: that.$t('tips.btnSancellation'),
confirmText: that.$t('tips.btnConfirm'),
success: function(res) {
if (res.confirm) {
that.$model.getloginOut({}).then((res) => {
if (res.code != 0) return
console.log('确定退出', res)
uni.setStorageSync('token', null)
uni.setStorageSync('aan_id', null)
uni.clearStorageSync()
uni.reLaunch({
url: "/pageTwo/login/login"
})
uni.$emit('need-login');
})
} else if (res.cancel) {
that.$tools.msg("您已取消操作!");
that.$tools.msg(that.$t('tips.msgCancel'));
}
},
})

View File

@ -30,7 +30,7 @@
<view class="time">
<view class="size14 c999">
<icon class="iconfont icon-icon-test"></icon>
{{item.reading}}次浏览
{{$t("index.browse")}}{{item.reading}}
</view>
<view class="size14 c999">
<icon class="iconfont icon-icon-test1"></icon>
@ -69,7 +69,7 @@
let that = this
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
title: '没有更多数据!',
title: that.$t("tips.msgNoMoreData"),
icon: 'none'
})
return

View File

@ -1 +1 @@
卡片的小程序
语言小程序,新增英文(无卡片,无估分)

View File

@ -61,14 +61,13 @@
.toggle {
position: absolute;
right: 15px;
top: 20px;
top: 12px;
}
.editem {
position: relative;
display: flex;
align-items: center;
font-size: 32rpx;
margin: 0 15px;
justify-content: space-between;
flex-wrap: wrap;
@ -84,8 +83,8 @@
}
.input {
height: 35px;
line-height: 35px;
height: 40px;
line-height: 40px;
display: flex;
position: relative;
border: #dfdfdf 1px solid;
@ -100,13 +99,13 @@
left: 10px;
right: 0px;
z-index: 88;
font-size: 32rpx;
// font-size: 32rpx;
}
.yanzhengma {
input {
right: 240rpx;
font-size: 32rpx;
// font-size: 32rpx;
}
}
}

BIN
static/dui1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
static/en.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -87,7 +87,13 @@ export default new Vuex.Store({
},
cityList: [],
gradeList: [],
identityList: []
identityList: [],
bannerCon:{
notices:[],
banner:[],
pop:[],
isCoupon:false
}
},
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
mutations: {
@ -208,6 +214,13 @@ export default new Vuex.Store({
changeLabelList(state, newData) {
state.labelList = newData
},
// 公告
changeBannerAll(state, newData) {
state.bannerCon.notices = newData.notice
state.bannerCon.banner = newData.banner
state.bannerCon.pop = newData.pop
state.bannerCon.isCoupon = newData.pop.length ? true : false
},
// 城市
changeCityList(state, newData) {
state.cityList = newData

View File

@ -16,16 +16,8 @@ const httpRequest = (url, method = "get", data) => {
uni.request(httpDefaultOpts).then(
(res) => {
uni.hideLoading()
console.log("request", url, res,)
if (res[1].data.code == 20001) {
uni.clearStorageSync()
uni.setStorageSync('token', null)
uni.setStorageSync('aan_id', null)
setTimeout(function() {
uni.reLaunch({
url: "/pageTwo/login/login"
})
}, 2000)
uni.$emit('need-login');
return
}
if (res[1].statusCode != 200) {
@ -47,12 +39,14 @@ const httpRequest = (url, method = "get", data) => {
const get = (url, data) => {
data.token = uni.getStorageSync('token')
data.aan_id = uni.getStorageSync('aan_id')
data.language = uni.getLocale() == 'zh-Hans' ? "zh" : uni.getLocale()
return httpRequest(url, 'get', data)
}
const post = (url, data) => {
data.token = uni.getStorageSync('token')
data.aan_id = uni.getStorageSync('aan_id')
data.language = uni.getLocale() == 'zh-Hans' ? "zh" : uni.getLocale()
return httpRequest(url, 'post', data)
}
export default {

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

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

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