Compare commits
22 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
00aa0903ac | |
|
|
67624ac297 | |
|
|
e6ece87ac2 | |
|
|
61a28bfcc1 | |
|
|
428718a1ad | |
|
|
f8f8616221 | |
|
|
277f8641e0 | |
|
|
103667340a | |
|
|
b94025cef6 | |
|
|
606aff2b23 | |
|
|
7bc22592b5 | |
|
|
39bcc4e763 | |
|
|
a9c95cc56c | |
|
|
7a38ec0e62 | |
|
|
f51d077a57 | |
|
|
7a89cab579 | |
|
|
8a796cbe3f | |
|
|
4c9e7954b8 | |
|
|
6c6e82e095 | |
|
|
4005c9fcc5 | |
|
|
9fdbf90924 | |
|
|
8259a02c95 |
|
|
@ -1,16 +1,25 @@
|
|||
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version": "0.0",
|
||||
"configurations": [{
|
||||
"default" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"mp-weixin" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
}
|
||||
{
|
||||
// launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version" : "0.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"default" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"mp-weixin" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
},
|
||||
{
|
||||
"customPlaygroundType" : "local",
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-ios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
122
App.vue
122
App.vue
|
|
@ -1,27 +1,129 @@
|
|||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
let platform = ""
|
||||
let SystemVersion = ""
|
||||
export default {
|
||||
computed: {
|
||||
...mapState(["bleValue"]),
|
||||
},
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
let that = this
|
||||
// #ifdef APP-PLUS
|
||||
uni.getSystemInfo({
|
||||
success(e) {
|
||||
platform = e.platform
|
||||
that.$store.commit('changePhoneInfo', {
|
||||
platform: e.platform
|
||||
})
|
||||
}
|
||||
})
|
||||
if (platform === 'ios') { // ios首次安装没有网络
|
||||
uni.onNetworkStatusChange(function(res) {
|
||||
if (res.isConnected == true) {
|
||||
that.handleoginversion()
|
||||
}
|
||||
});
|
||||
}
|
||||
plus.runtime.getProperty(plus.runtime.appid, function(info) {
|
||||
uni.setStorageSync('VERSION', info.version)
|
||||
SystemVersion = info.version
|
||||
that.$store.commit('changePhoneInfo', {
|
||||
info: info
|
||||
})
|
||||
})
|
||||
// #endif
|
||||
that.handleoginversion()
|
||||
// that.$store.dispatch("getHomeConfig")
|
||||
},
|
||||
onHide: function() {
|
||||
// #ifdef APP-PLUS
|
||||
uni.offNetworkStatusChange(function(res) {
|
||||
console.log("取消网络监听")
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
onShow: function() {
|
||||
let that = this
|
||||
that.handleTabBarItem()
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function() {
|
||||
// this.$ble.closeBLEConnection(this.bleValue.deviceId)
|
||||
// this.$ble.closeBluetoothAdapter()
|
||||
console.log('App Hide')
|
||||
},
|
||||
methods: {}
|
||||
methods: {
|
||||
// 版本信息
|
||||
handleoginversion() {
|
||||
let that = this
|
||||
that.$model.getloginversion({}).then(res => {
|
||||
let language = res.data.language == "zh" ? 'zh-Hans' : res.data.language
|
||||
console.log("res.data", res.data.language, language, res)
|
||||
uni.setLocale(language)
|
||||
that.$i18n.locale = language
|
||||
that.$store.commit('changeLocale', res.data.language)
|
||||
uni.setStorageSync('language', res.data.language)
|
||||
that.$store.dispatch("getHomeConfig")
|
||||
if (res.code == 0) {
|
||||
that.$store.dispatch("getUserInfo")
|
||||
} else {
|
||||
uni.setStorageSync('token', null)
|
||||
uni.setStorageSync('aan_id', null)
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pageTwo/login/login',
|
||||
})
|
||||
}, 500);
|
||||
}
|
||||
// #ifdef APP-PLUS||APP
|
||||
that.$store.commit('changePhoneInfo', {
|
||||
versionUrl: res.data
|
||||
})
|
||||
// 比对版本号
|
||||
let version = that.$tools.compareVersions(SystemVersion, res.data.version)
|
||||
console.log("是否登录及版本号", res, res.data.version, SystemVersion, version)
|
||||
if (version == -1) { // 0版本号相通,1,:第一个版本号大于第二个版本号,-1:第一个版本号小于第二个版本号
|
||||
uni.showModal({
|
||||
title: '发现新版本',
|
||||
content: '检查到新版本' + res.data.version + ',是否更新?',
|
||||
cancelText: that.$t('btnSancellation'),
|
||||
confirmText: that.$t('btnConfirm'),
|
||||
success: (modalRes) => {
|
||||
if (modalRes.confirm) { //确定更新
|
||||
if (platform === 'android') { //安卓更新
|
||||
uni.setStorageSync('VERSION', res.data.version)
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/me/about"
|
||||
})
|
||||
} else { //ios跳转
|
||||
plus.runtime.launchApplication({
|
||||
action: `itms-apps://itunes.apple.com/cn/app/id6654906497?mt=8`
|
||||
})
|
||||
}
|
||||
} else {
|
||||
that.$tools.msg("稍后可在'关于我们'内更新程序!")
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
})
|
||||
},
|
||||
handleTabBarItem() {
|
||||
let that = this
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
text: that.$t('titleHome')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 1,
|
||||
text: that.$t('titleCount')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 2,
|
||||
text: that.$t('titleMe')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/*每个页面公共css */
|
||||
/* #ifndef APP-NVUE */
|
||||
@import "/assets/common.scss";
|
||||
@import "/assets/iconfont.css";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"version": "1",
|
||||
"prompt": "template",
|
||||
"title": "服务协议和隐私政策",
|
||||
"message": " 请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"http://tc.pcxbc.com/technology/privacy_index\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
|
||||
"buttonAccept": "同意并接受",
|
||||
"buttonRefuse": "暂不同意",
|
||||
"hrefLoader": "system",
|
||||
"backToExit": "false",
|
||||
"second": {
|
||||
"title": "确认提示",
|
||||
"message": " 进入应用前,你需先同意<a href=\"http://tc.pcxbc.com/technology/privacy_index\">《隐私政策》</a>,否则将退出应用。",
|
||||
"buttonAccept": "同意并继续",
|
||||
"buttonRefuse": "退出应用"
|
||||
},
|
||||
"styles": {
|
||||
"buttonAccept": {
|
||||
"color": "#327FE8"
|
||||
},
|
||||
"buttonRefuse": {
|
||||
"color": "#666"
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -844,7 +844,7 @@ page {
|
|||
|
||||
.mubiao {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
// margin-top: 32rpx;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
|
||||
|
|
@ -964,38 +964,4 @@ page {
|
|||
height: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.drawerVisible {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
z-index: 999;
|
||||
|
||||
.bgVisible {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
|
||||
.infoVisible {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 300px;
|
||||
bottom: 0;
|
||||
background-color: #ffffff;
|
||||
transition: -webkit-transform 0.3s ease;
|
||||
transition: transform 0.3s ease;
|
||||
transition: transform 0.3s ease, -webkit-transform 0.3s ease;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
}
|
||||
|
||||
.login {
|
||||
width: 86%;
|
||||
width: 94%;
|
||||
height: auto;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
background-color: #fff;
|
||||
z-index: 99;
|
||||
position: absolute;
|
||||
left: 7%;
|
||||
left: 3%;
|
||||
top: 28%;
|
||||
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
||||
|
||||
|
|
@ -105,14 +105,15 @@
|
|||
|
||||
.yanzhengma {
|
||||
input {
|
||||
right: 240rpx;
|
||||
right: 180px;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.code {
|
||||
width: 220rpx;
|
||||
color: #333;
|
||||
width: 180px;
|
||||
background: #dfdfdf;
|
||||
font-size: 28rpx;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -5,16 +5,13 @@
|
|||
<image src="/static/zhong.png"></image>
|
||||
<text @click="openBluetoothAdapter">{{bleTipsText}}</text>
|
||||
</view>
|
||||
<view class="duan" @click="handleBack" v-if="isShow&&isConnection == 2">
|
||||
断开连接
|
||||
</view>
|
||||
</view>
|
||||
<view class="name">{{name}}</view>
|
||||
<!-- 蓝牙称重 -->
|
||||
<view class="weight-wrap">
|
||||
<view class="weight" @click="inputDialogToggle">
|
||||
<text class="val">{{weight == '' ? '0.0':weight}}</text>
|
||||
<text class="unit">{{unitConversion(unit)}}</text>
|
||||
<text class="unit">{{unit}}</text>
|
||||
</view>
|
||||
<view class="weight">
|
||||
<text class="val">{{kcal?kcal:0}}</text>
|
||||
|
|
@ -25,7 +22,7 @@
|
|||
<view class="btn danwei">
|
||||
<view class="lan border-bottom">
|
||||
<view class="right">
|
||||
<picker mode="selector" :range="unitA" range-key="name" @change="changleUnits"
|
||||
<picker mode="selector" :range="unitList" range-key="name" @change="changleUnits"
|
||||
:value="unitListIndex">
|
||||
<view class="uni-input">
|
||||
单位
|
||||
|
|
@ -55,12 +52,26 @@
|
|||
data() {
|
||||
return {
|
||||
kcal: "",
|
||||
// weight: "",
|
||||
weightALL: "",
|
||||
bleTipsText: "",
|
||||
unit: 'g',
|
||||
unitA: [],
|
||||
weight0: 0,
|
||||
stopblue: false,
|
||||
devicesList: [],
|
||||
unitList: [{
|
||||
name: "克",
|
||||
id: '00',
|
||||
unit: "g"
|
||||
}, {
|
||||
name: "盎司",
|
||||
id: "08",
|
||||
unit: "oz"
|
||||
}],
|
||||
unitListIndex: 0,
|
||||
units: ['kg', '斤', 'st:lb', 'lb', 'g', 'ml', 'Waterml',
|
||||
'milkml', 'oz', 'floz', 'lboz'
|
||||
]
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
|
@ -80,18 +91,15 @@
|
|||
computed: {
|
||||
...mapState(["user", "isBluetoothTyle", "bleValue"]),
|
||||
weight() {
|
||||
let weightNew = this.convertToGrams(this.bleValue.countWeight, this.bleValue.unit)
|
||||
this.kcal = (Number(this.weightKcal) * weightNew).toFixed(1)
|
||||
this.unit = this.bleValue.unit
|
||||
let kcal = (Number(this.weightKcal) * this.bleValue.countWeight).toFixed(2)
|
||||
this.unit = this.unitConversion(this.bleValue.unit)
|
||||
this.kcal = this.convertToGrams(kcal, this.bleValue.unit).toFixed(2)
|
||||
return this.bleValue.countWeight
|
||||
},
|
||||
isConnection() {
|
||||
this.bleTipsText = this.bleValue.bleTipsText
|
||||
return this.bleValue.isConnectStatus
|
||||
},
|
||||
isShow() {
|
||||
return this.bleValue.serviceId != '' ? true : false
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
|
|
@ -106,22 +114,10 @@
|
|||
that.handleBack()
|
||||
}
|
||||
},
|
||||
isLast: {
|
||||
handler(newVal, oldVal) {
|
||||
this.stopblue = newVal
|
||||
},
|
||||
// deep: true,
|
||||
immediate: true
|
||||
|
||||
},
|
||||
bleValue: {
|
||||
handler(newVal, oldVal) {
|
||||
this.unitA = newVal.unitList
|
||||
this.unitListIndex = newVal.unitList.findIndex(ite => ite.unit == newVal.unit)
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
isLast: function() {
|
||||
let that = this
|
||||
that.stopblue = that.isLast
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 初始化蓝牙
|
||||
|
|
@ -135,8 +131,6 @@
|
|||
notify: '',
|
||||
write: '',
|
||||
unit: "g",
|
||||
type: 1,
|
||||
unitList: that.$json.unitMinus,
|
||||
countWeight: "",
|
||||
bleTipsText: "蓝牙搜索中",
|
||||
isConnectStatus: 0,
|
||||
|
|
@ -145,63 +139,17 @@
|
|||
},
|
||||
changleUnits(e) {
|
||||
let that = this
|
||||
let name = that.unitA[e.detail.value].name
|
||||
let val = that.unitA[e.detail.value].unit
|
||||
if (that.isShow && that.unit != name) {
|
||||
that.handletoggleUnit(that.unitConversion2(val))
|
||||
let name = that.unitList[e.detail.value].name
|
||||
console.log("单位切换", name, that.unit)
|
||||
if (that.unit != name) {
|
||||
that.handletoggleUnit(name == '盎司' ? 0x08 : 0x04)
|
||||
}
|
||||
if (that.bleValue.serviceId == '') {
|
||||
that.unitListIndex = [e.detail.value]
|
||||
that.$store.commit('changeBluetoothValue', {
|
||||
unit: that.unitA[e.detail.value].unit,
|
||||
})
|
||||
}
|
||||
},
|
||||
convertToGrams(value, fromUnit) {
|
||||
const conversionFactors = {
|
||||
'lb': 453.59237, // 1磅 = 453.59237克
|
||||
'oz': 28.349523125, // 1盎司 = 28.349523125克
|
||||
'kg': 1000, // 1公斤 = 1000克
|
||||
'g': 1,
|
||||
'ml': 1,
|
||||
'斤': 500,
|
||||
'Waterml': 1,
|
||||
'milkml': 1.03
|
||||
};
|
||||
that.unitListIndex = [e.detail.value]
|
||||
that.$store.commit('changeBluetoothValue', {
|
||||
unit: that.unitList[e.detail.value].unit
|
||||
})
|
||||
|
||||
if (!conversionFactors.hasOwnProperty(fromUnit)) {
|
||||
return ''
|
||||
}
|
||||
|
||||
return value * conversionFactors[fromUnit];
|
||||
},
|
||||
unitConversion2(unit) {
|
||||
if (unit == 'kg') {
|
||||
return 0x00
|
||||
} else if (unit == '斤') {
|
||||
return 0x01
|
||||
} else if (unit == 'st:lb') {
|
||||
return 0x02
|
||||
} else if (unit == 'lb') {
|
||||
return 0x03
|
||||
} else if (unit == 'g') {
|
||||
return 0x04
|
||||
} else if (unit == 'ml') {
|
||||
return 0x05
|
||||
} else if (unit == 'Waterml') {
|
||||
return 0x06
|
||||
} else if (unit == 'milkml') {
|
||||
return 0x07
|
||||
} else if (unit == 'oz') {
|
||||
return 0x08
|
||||
} else if (unit == 'floz') {
|
||||
return 0x09
|
||||
} else if (unit == 'lboz') {
|
||||
return 0x0A
|
||||
}
|
||||
return unit
|
||||
},
|
||||
// 下发单位
|
||||
handletoggleUnit(unit) {
|
||||
let that = this
|
||||
let checksum = 0;
|
||||
|
|
@ -236,43 +184,30 @@
|
|||
},
|
||||
})
|
||||
},
|
||||
handleBack() {
|
||||
// 保存测量结果
|
||||
handlesub() {
|
||||
let that = this
|
||||
that.$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "连接失败,点击重新连接",
|
||||
unitList: that.$json.unitMinus,
|
||||
isConnectStatus: 1,
|
||||
})
|
||||
that.$ble.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
that.$ble.closeBLEConnection(that.bleValue.deviceId)
|
||||
that.$ble.closeBluetoothAdapter()
|
||||
},
|
||||
|
||||
unitConversion(unit) {
|
||||
if (unit == 'kg') {
|
||||
return '千克'
|
||||
} else if (unit == '斤') {
|
||||
return '斤'
|
||||
} else if (unit == 'stlb') {
|
||||
return 'stlb'
|
||||
} else if (unit == 'lb') {
|
||||
return '磅'
|
||||
} else if (unit == 'g') {
|
||||
return '克'
|
||||
} else if (unit == 'ml') {
|
||||
return '毫升'
|
||||
} else if (unit == 'Waterml') {
|
||||
return 'Waterml'
|
||||
} else if (unit == 'milkml') {
|
||||
return 'milkml'
|
||||
} else if (unit == 'oz') {
|
||||
return '盎司'
|
||||
} else if (unit == 'floz') {
|
||||
return 'floz'
|
||||
} else if (unit == 'lboz') {
|
||||
return 'lboz'
|
||||
console.log("测量保存", that.weight, that.unit, that.kcal)
|
||||
if (Number(that.weight) > 0) {
|
||||
that.$emit("handleBle", that.weight, that.unit, that.kcal)
|
||||
} else {
|
||||
that.$tools.msg("数据异常,请清零后重新测量!")
|
||||
}
|
||||
return unit
|
||||
|
||||
},
|
||||
convertToGrams(value, fromUnit) {
|
||||
const conversionFactors = {
|
||||
'lb': 453.59, // 1磅 = 453.59237克
|
||||
'oz': 28.35, // 1盎司 = 28.349523125克
|
||||
'kg': 1000, // 1公斤 = 1000克
|
||||
'g': 1
|
||||
};
|
||||
|
||||
if (!conversionFactors.hasOwnProperty(fromUnit)) {
|
||||
return ''
|
||||
}
|
||||
|
||||
return value * conversionFactors[fromUnit];
|
||||
},
|
||||
// 备料完成
|
||||
handleDetailSub() {
|
||||
|
|
@ -280,7 +215,7 @@
|
|||
if (Number(that.weight) > 0) {
|
||||
that.$emit("handleDetailSub", that.weight, that.unit, that.kcal)
|
||||
} else {
|
||||
that.$tools.msg("数据异常,请清零后重新测量!")
|
||||
that.$tools.msg("数据异常,请重新测量!")
|
||||
}
|
||||
},
|
||||
//备料下一个
|
||||
|
|
@ -292,12 +227,33 @@
|
|||
that.$tools.msg("数据异常,请清零后重新测量!")
|
||||
}
|
||||
},
|
||||
confirm(value) {
|
||||
console.log(value)
|
||||
unitConversion(unit) {
|
||||
if (unit == 'kcal') {
|
||||
return '千卡'
|
||||
} else if (unit == 'g') {
|
||||
return '克'
|
||||
} else if (unit == 'lb') {
|
||||
return '磅'
|
||||
} else if (unit == 'oz') {
|
||||
return '盎司'
|
||||
}
|
||||
return unit
|
||||
},
|
||||
handleBack() {
|
||||
let that = this
|
||||
that.$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "连接失败,点击重新连接",
|
||||
isConnectStatus: 1
|
||||
})
|
||||
that.$ble.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
that.$ble.closeBLEConnection(that.bleValue.deviceId)
|
||||
that.$ble.closeBluetoothAdapter()
|
||||
},
|
||||
confirm(value) {
|
||||
console.log("手动输入", value)
|
||||
this.$store.commit("changeBluetoothValue", {
|
||||
countWeight: value,
|
||||
unit: this.unitA[this.unitListIndex].unit
|
||||
unit: this.unitList[this.unitListIndex].unit
|
||||
})
|
||||
this.$refs.popup.close()
|
||||
},
|
||||
|
|
@ -439,15 +395,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.duan {
|
||||
width: fit-content;
|
||||
background: linear-gradient(-90deg, #d4f5c4, #a7d5e4 80%, );
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
padding: 3px 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
<view class="table">
|
||||
<view class="text">
|
||||
<image src="/static/zhong.png"></image>
|
||||
<text @click="openBluetoothAdapter">{{bleTipsText}}</text>
|
||||
<text @click="openBluetoothAdapter">{{bletipstext}}</text>
|
||||
</view>
|
||||
<view class="duan" @click="handleBack" v-if="isShow&&isConnection == 2">
|
||||
断开连接
|
||||
{{$t('Disconnect')}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
|
|
@ -22,23 +22,23 @@
|
|||
<view class="btn danwei">
|
||||
<view class="lan border-bottom">
|
||||
<view class="right">
|
||||
<picker mode="selector" :range="unitA" range-key="name" @change="changleUnits"
|
||||
<picker mode="selector" :range="unitList" range-key="name" @change="changleUnits"
|
||||
:value="unitListIndex">
|
||||
<view class="uni-input">
|
||||
单位
|
||||
{{$t('UnitBtn')}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn addbtn size14" @click="handlesub" v-if="btnType==2">保存</view>
|
||||
<view class="btn addbtn size14" @click="handlesub" v-if="btnType==2">{{$t('Save')}}</view>
|
||||
<view class="btn addbtn" @click="handleAddFood" v-if="btnType==1">+</view>
|
||||
<view class="btn qingling" @click="handleqingling">清零</view>
|
||||
<view class="btn qingling" @click="handleqingling">{{$t('resetBtn')}}</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view>
|
||||
<uni-popup ref="popup" type="dialog">
|
||||
<uni-popup-dialog mode="input" title="重量" placeholder="请输入食物重量" @close="close"
|
||||
<uni-popup-dialog mode="input" :title="$t('Weight')" :placeholder="$t('RecordWeight')" @close="close"
|
||||
@confirm="confirm"></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
|
@ -56,10 +56,31 @@
|
|||
return {
|
||||
kcal: 0,
|
||||
unit: '',
|
||||
bleTipsText: "",
|
||||
// weight: "",
|
||||
inputDialog: false,
|
||||
unitA: [],
|
||||
unitList: [{
|
||||
name: this.$t("g"),
|
||||
id: '00',
|
||||
unit: "g"
|
||||
}, {
|
||||
name: this.$t("oz"),
|
||||
id: "08",
|
||||
unit: "oz"
|
||||
},
|
||||
{
|
||||
name: this.$t("lb"),
|
||||
id: "03",
|
||||
unit: "lb"
|
||||
}, {
|
||||
name: this.$t("ml"),
|
||||
id: "05",
|
||||
unit: "ml"
|
||||
}
|
||||
],
|
||||
unitListIndex: 0,
|
||||
units: ['kg', 'g', 'st:lb', 'lb', 'g', 'ml', 'Waterml',
|
||||
'milkml', 'oz', 'floz', 'lboz'
|
||||
]
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
|
@ -70,23 +91,27 @@
|
|||
btnType: {
|
||||
type: Number,
|
||||
default: 1 //1添加食材,2保存测量
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(["bleValue", "isBluetoothTyle", "countFoodInfo"]),
|
||||
weight() {
|
||||
let weightNew = this.convertToGrams(this.bleValue.countWeight, this.bleValue.unit)
|
||||
this.kcal = (Number(this.weightKcal) / 100 * weightNew).toFixed(1)
|
||||
this.unit = this.bleValue.unit
|
||||
let that = this
|
||||
let kcal = (Number(that.weightKcal) / 100 * that.bleValue.countWeight).toFixed(2)
|
||||
that.unit = that.bleValue.unit
|
||||
that.kcal = that.convertToGrams(kcal, that.bleValue.unit).toFixed(2)
|
||||
return this.bleValue.countWeight
|
||||
},
|
||||
isConnection() {
|
||||
this.bleTipsText = this.bleValue.bleTipsText
|
||||
return this.bleValue.isConnectStatus
|
||||
return this.bleValue.isConnectStatus ? this.bleValue.isConnectStatus : 1
|
||||
},
|
||||
isShow() {
|
||||
return this.bleValue.serviceId != '' ? true : false
|
||||
},
|
||||
bletipstext() {
|
||||
return this.bleValue.bleTipsText ? this.bleValue.bleTipsText : this.$t('ConnectionTimeout')
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
|
|
@ -105,21 +130,13 @@
|
|||
if (!that.isBluetoothTyle) {
|
||||
that.handleBack()
|
||||
}
|
||||
},
|
||||
bleValue: {
|
||||
handler(newVal, oldVal) {
|
||||
this.unitA = newVal.unitList
|
||||
this.unitListIndex = newVal.unitList.findIndex(ite => ite.unit == newVal.unit)
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 初始化蓝牙
|
||||
openBluetoothAdapter() {
|
||||
let that = this
|
||||
if (that.isConnection == 2) return
|
||||
if (that.isConnection == 0) return
|
||||
that.kcal = ""
|
||||
that.$store.commit('changeBluetoothValue', {
|
||||
deviceId: "",
|
||||
|
|
@ -128,45 +145,24 @@
|
|||
write: '',
|
||||
unit: "g",
|
||||
type: 1,
|
||||
unitList: that.$json.unitMinus,
|
||||
countWeight: 0,
|
||||
oldCountWeight: 0,
|
||||
bleTipsText: "蓝牙搜索中",
|
||||
countWeight: "",
|
||||
bleTipsText: that.$t('SearchBluetooth'),
|
||||
isConnectStatus: 0,
|
||||
})
|
||||
that.$ble.openBluetoothAdapter()
|
||||
},
|
||||
|
||||
changleUnits(e) {
|
||||
let that = this
|
||||
let name = that.unitA[e.detail.value].name
|
||||
let val = that.unitA[e.detail.value].unit
|
||||
if (that.isShow && that.unit != name) {
|
||||
that.handletoggleUnit(that.unitConversion2(val))
|
||||
let unit = that.unitList[e.detail.value].unit
|
||||
if (that.isShow && that.unit != unit) {
|
||||
that.handletoggleUnit(that.unitConversion2(unit))
|
||||
}
|
||||
if (that.bleValue.serviceId == '') {
|
||||
that.unitListIndex = [e.detail.value]
|
||||
that.$store.commit('changeBluetoothValue', {
|
||||
unit: that.unitA[e.detail.value].unit,
|
||||
})
|
||||
}
|
||||
},
|
||||
convertToGrams(value, fromUnit) {
|
||||
const conversionFactors = {
|
||||
'lb': 453.59237, // 1磅 = 453.59237克
|
||||
'oz': 28.349523125, // 1盎司 = 28.349523125克
|
||||
'kg': 1000, // 1公斤 = 1000克
|
||||
'g': 1,
|
||||
'ml': 1,
|
||||
'斤': 500,
|
||||
'Waterml': 1,
|
||||
'milkml': 1.03
|
||||
// "stlb": "floz": "lboz":
|
||||
};
|
||||
|
||||
if (!conversionFactors.hasOwnProperty(fromUnit)) {
|
||||
return ''
|
||||
}
|
||||
return value * conversionFactors[fromUnit];
|
||||
that.unitListIndex = [e.detail.value]
|
||||
that.$store.commit('changeBluetoothValue', {
|
||||
unit: unit
|
||||
})
|
||||
console.log("单位切换", unit, that.unit, that.unitListIndex)
|
||||
},
|
||||
unitConversion2(unit) {
|
||||
if (unit == 'kg') {
|
||||
|
|
@ -194,7 +190,6 @@
|
|||
}
|
||||
return unit
|
||||
},
|
||||
// 下发单位
|
||||
handletoggleUnit(unit) {
|
||||
let that = this
|
||||
let checksum = 0;
|
||||
|
|
@ -206,7 +201,6 @@
|
|||
bytes[5] = checksum
|
||||
that.sendData(new Uint8Array(bytes).buffer)
|
||||
},
|
||||
// 清零
|
||||
handleqingling() {
|
||||
let that = this
|
||||
let str = "C503071100D0"
|
||||
|
|
@ -237,63 +231,63 @@
|
|||
if (Number(that.weight) > 0) {
|
||||
that.$emit("handleBle", that.weight, that.unit, that.kcal)
|
||||
} else {
|
||||
that.$tools.msg("数据异常,请清零后重新测量!")
|
||||
that.$tools.msg(that.$t('reset'))
|
||||
}
|
||||
},
|
||||
handleBack() {
|
||||
let that = this
|
||||
that.$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "连接失败,点击重新连接",
|
||||
unitList: that.$json.unitMinus,
|
||||
isConnectStatus: 1,
|
||||
bleTipsText: that.$t('ConnectionTimeout'),
|
||||
isConnectStatus: 1
|
||||
})
|
||||
that.$ble.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
that.$ble.closeBLEConnection(that.bleValue.deviceId)
|
||||
that.$ble.closeBluetoothAdapter()
|
||||
},
|
||||
convertToGrams(value, fromUnit) {
|
||||
const conversionFactors = {
|
||||
'lb': 453.59237, // 1磅 = 453.59237克
|
||||
'oz': 28.349523125, // 1盎司 = 28.349523125克
|
||||
'kg': 1000, // 1公斤 = 1000克
|
||||
'g': 1,
|
||||
'ml': 1,
|
||||
};
|
||||
|
||||
if (!conversionFactors.hasOwnProperty(fromUnit)) {
|
||||
return ''
|
||||
}
|
||||
|
||||
return value * conversionFactors[fromUnit];
|
||||
},
|
||||
|
||||
unitConversion(unit) {
|
||||
if (unit == 'kg') {
|
||||
return '千克'
|
||||
} else if (unit == '斤') {
|
||||
return '斤'
|
||||
} else if (unit == 'stlb') {
|
||||
return 'stlb'
|
||||
} else if (unit == 'lb') {
|
||||
return '磅'
|
||||
return this.$t("kg")
|
||||
} else if (unit == 'g') {
|
||||
return '克'
|
||||
} else if (unit == 'ml') {
|
||||
return '毫升'
|
||||
} else if (unit == 'Waterml') {
|
||||
return 'Waterml'
|
||||
} else if (unit == 'milkml') {
|
||||
return 'milkml'
|
||||
return this.$t("g")
|
||||
} else if (unit == 'lb') {
|
||||
return this.$t("lb")
|
||||
} else if (unit == 'oz') {
|
||||
return '盎司'
|
||||
} else if (unit == 'floz') {
|
||||
return 'floz'
|
||||
} else if (unit == 'lboz') {
|
||||
return 'lboz'
|
||||
return this.$t("oz")
|
||||
} else if (unit == 'ml') {
|
||||
return this.$t("ml")
|
||||
}
|
||||
return unit
|
||||
},
|
||||
// 添加食物
|
||||
handleAddFood() {
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/count/search?name=早餐&time=" + this.countFoodInfo.date
|
||||
url: "/pageTwo/count/search?index=0&time=" + this.countFoodInfo.date
|
||||
})
|
||||
},
|
||||
inputDialogToggle() {
|
||||
this.$refs.popup.open()
|
||||
},
|
||||
// 手动输入
|
||||
confirm(value) {
|
||||
console.log(value)
|
||||
let that = this
|
||||
this.$store.commit("changeBluetoothValue", {
|
||||
countWeight: value,
|
||||
unit: this.unitA[this.unitListIndex].unit
|
||||
unit: this.unitList[this.unitListIndex].unit
|
||||
})
|
||||
this.$refs.popup.close()
|
||||
},
|
||||
|
|
@ -410,12 +404,14 @@
|
|||
.text {
|
||||
color: #8284f0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
margin-right: 5px;
|
||||
margin-left: -5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
80
content.json
80
content.json
|
|
@ -1,80 +0,0 @@
|
|||
{
|
||||
"addfoodList": [{
|
||||
"name": "早加餐",
|
||||
"id": 3
|
||||
},
|
||||
{
|
||||
"name": "午加餐",
|
||||
"id": 4
|
||||
}, {
|
||||
"name": "晚加餐",
|
||||
"id": 5
|
||||
}
|
||||
],
|
||||
"unitArray": [{
|
||||
"name": "千克",
|
||||
"unit": "kg"
|
||||
},
|
||||
{
|
||||
"name": "斤",
|
||||
"unit": "斤"
|
||||
},
|
||||
{
|
||||
"name": "stlb",
|
||||
"unit": "stlb"
|
||||
},
|
||||
{
|
||||
"name": "磅",
|
||||
"unit": "lb"
|
||||
}, {
|
||||
"name": "克",
|
||||
"unit": "g"
|
||||
}, {
|
||||
"name": "毫升",
|
||||
"unit": "ml"
|
||||
},
|
||||
{
|
||||
"name": "Waterml",
|
||||
"unit": "Waterml"
|
||||
},
|
||||
{
|
||||
"name": "milkml",
|
||||
"unit": "milkml"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "盎司",
|
||||
"unit": "oz"
|
||||
},
|
||||
{
|
||||
"name": "floz",
|
||||
"unit": "floz"
|
||||
},
|
||||
{
|
||||
"name": "lboz",
|
||||
"unit": "lboz"
|
||||
}
|
||||
],
|
||||
"unitMinus": [{
|
||||
"name": "千克",
|
||||
"unit": "kg"
|
||||
},
|
||||
{
|
||||
"name": "磅",
|
||||
"unit": "lb"
|
||||
}, {
|
||||
"name": "克",
|
||||
"unit": "g"
|
||||
}, {
|
||||
"name": "毫升",
|
||||
"unit": "ml"
|
||||
},
|
||||
{
|
||||
"name": "盎司",
|
||||
"unit": "oz"
|
||||
}
|
||||
|
||||
],
|
||||
"units": ["kg", "斤", "stlb", "lb", "g", "ml", "Waterml", "milkml", "oz", "floz", "lboz"]
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
{
|
||||
|
||||
"msgTitle": "نصيحة ودية",
|
||||
"msgUpgradeFail": "فشل الترقية",
|
||||
"msgDownloading": "جاري التحميل",
|
||||
"msgLatestVersion": "هي بالفعل أحدث إصدار!",
|
||||
"msgCancel": "لقد ألغيت العملية!",
|
||||
"msgLoginSuccess": "تم تسجيل الدخول بنجاح!",
|
||||
"msgDelete": "تم الحذف بنجاح",
|
||||
"msgSetSuccess": "تم الإعداد بنجاح",
|
||||
"msgBottom": "النهاية، انتقل إلى شيء آخر",
|
||||
"msgNoMoreData": "لا توجد المزيد من البيانات!",
|
||||
"msgSetPasswordSuccess": "تم تعيين كلمة المرور بنجاح، ادخل إلى البرنامج!",
|
||||
"msgAddUser": "لا يوجد أعضاء حالياً، يرجى إضافتهم أولاً",
|
||||
"verifyNickName": "الرجاء إدخال الاسم المستعار",
|
||||
"verifyNotOptional": "التاريخ المستقبلي غير قابل للاختيار",
|
||||
"verifyDate": "يرجى اختيار تاريخ القياس",
|
||||
"verifyBirthday": "الرجاء اختيار تاريخ الميلاد",
|
||||
"verifyHeight": "من فضلك أدخل الطول",
|
||||
"verifyWeight": "الرجاء إدخال الوزن",
|
||||
"verifyGender": "الرجاء اختيار الجنس",
|
||||
"verifyBontrast": "يرجى اختيار البيانات",
|
||||
"verifyBodyDate": "الرجاء اختيار الوقت الصحيح",
|
||||
"verifyRecord": "الرجاء إدخال",
|
||||
"verifyPicker": "الرجاء الاختيار",
|
||||
"verifyAccount": "يرجى إدخال رقم الهاتف أو البريد الإلكتروني الصحيح",
|
||||
"verifyEmail": "الرجاء إدخال البريد الإلكتروني",
|
||||
"verifyEmailCorrect": "من فضلك أدخل البريد الإلكتروني الصحيح",
|
||||
"verifyMobile": "الرجاء إدخال رقم الهاتف",
|
||||
"verifyMobileCorrect": "الرجاء إدخال رقم الهاتف الصحيح",
|
||||
"verifyCode": "กรุณาป้อนรหัสยืนยัน",
|
||||
"verifyPassword": "الرجاء إدخال كلمة المرور",
|
||||
"verifyPasswordTwo": "الرجاء إدخال كلمة المرور المؤكدة",
|
||||
"verifyPasswordCorrect": "يرجى التأكد من أن كلمة المرور المكتوبة مطابقة في المرةين",
|
||||
"verifyAgreement": "يرجى تأكيد واختيار الاتفاقية أولاً",
|
||||
"verifyOutLogin": "هل ترغب في تسجيل الخروج؟",
|
||||
"verifyDeleteUser": "هل تريد حذف هذا العضو؟",
|
||||
"verifyDeleteHistory": "هل تريد حذف سجل القياس الحالي؟",
|
||||
"verifyDeleteAccount": "بعد الحذف بنجاح، سيتم مسح جميع المعلومات المرتبطة بهذه الحساب ولا يمكن استعادتها، هل ترغب في الحذف؟",
|
||||
"btnConfirm": "تأكيد",
|
||||
"btnSubmit": "إرسال",
|
||||
"btnSancellation": "إلغاء",
|
||||
"btnContinue": "استمر",
|
||||
"btnBack": "عودة",
|
||||
"btnDelete": "حذف",
|
||||
"ConnectionTimeout": "انتهت مهلة الاتصال، انقر لإعادة الاتصال",
|
||||
"Measuring": "في القياس، يرجى وضع الطعام على الميزان",
|
||||
"Weight": "الوزن",
|
||||
"RecordWeight": "يرجى إدخال وزن الطعام",
|
||||
"SearchBluetooth": "البحث عن البلوتوث جاري",
|
||||
"Remeasure": "البيانات غير طبيعية، يرجى إعادة القياس!",
|
||||
"reset": "البيانات غير طبيعية، يرجى إعادة القياس بعد معاودة الصفر!",
|
||||
"Disconnect": "قطع الاتصال",
|
||||
"remeasure": "إعادة القياس",
|
||||
"resetBtn": "إعادة الضبط",
|
||||
"UnitBtn": "وحدة",
|
||||
"SaveResult": "حفظ",
|
||||
"titleHome": "الصفحة الرئيسية",
|
||||
"titleMenu": "وصفة",
|
||||
"titleMenuAdd": "إضافة الوصفة",
|
||||
"titleMenuSearch": "البحث عن وصفات",
|
||||
"titleCount": "حساب الطعام",
|
||||
"titleCountList": "مستودع المكونات",
|
||||
"titleCustomKcal": "سعرات حرارية مخصصة",
|
||||
"titleEveryMeal": "تفاصيل الوجبة",
|
||||
"titleCountSearch": "البحث عن المكونات",
|
||||
"titleeveryDay": "تحليل التغذية",
|
||||
"titleMe": "لي",
|
||||
"titleDetail": "التفاصيل",
|
||||
"titleBody": "الهدف",
|
||||
"titleHistory": "سجل الأكل",
|
||||
"titlePhone": "ربط رقم الهاتف",
|
||||
"titleEmail": "ربط البريد الإلكتروني",
|
||||
"titlePasswordEdit": "تغيير كلمة المرور",
|
||||
"titleSet": "إعداد",
|
||||
"titleDate": "تاريخ",
|
||||
"titleMember": "المواد",
|
||||
"titleManage": "إدارة الأعضاء",
|
||||
"titleManageAdd": "إضافة عضو",
|
||||
"titleAboutUs": "معلومات عنا",
|
||||
"titleSetPassword": "تعيين كلمة المرور",
|
||||
"titlePassword": "كلمة المرور",
|
||||
"titleConfirmPassword": "تأكيد كلمة المرور",
|
||||
"titleForgotPassword": "نسيت كلمة المرور",
|
||||
"titleCode": "رمز التحقق",
|
||||
"titleLanguage": "اللغة",
|
||||
"titleSendCode": "الحصول على رمز التحقق",
|
||||
"titleSendCodeRetry": "إعادة إرسال بعد S",
|
||||
"titleLogin": "تسجيل الدخول",
|
||||
"titleRegister": "التسجيل",
|
||||
"titleToggleLogin": "التبديل إلى تسجيل الدخول",
|
||||
"titleAccountText": "رقم الهاتف/البريد الإلكتروني",
|
||||
"titleAgreementText": "القراءة والموافقة",
|
||||
"titleAgreementContntText": "اتفاقية الخصوصية",
|
||||
"titleVersionUpdate": "تحديث الإصدار",
|
||||
"titleNewVersion": "النسخة الجديدة",
|
||||
"infoActivityCoefficient": "معامل النشاط",
|
||||
"infoPersonalProfile": "الملف الشخصي",
|
||||
"infoMyRecipes": "وصفاتي",
|
||||
"infoMyCollection": "مجموعتي",
|
||||
"infoAvatar": "صورة الملف الشخصي",
|
||||
"infoNickname": "الاسم المستعار",
|
||||
"infoMobile": "رقم الهاتف",
|
||||
"infoEmail": "البريد الإلكتروني",
|
||||
"infoAge": "العمر",
|
||||
"infoAgeunit": "سنة",
|
||||
"infoGender": "الجنس",
|
||||
"infoMan": "رجل",
|
||||
"infoWoman": "أنثى",
|
||||
"infoUnknown": "مجهول",
|
||||
"infoBirthday": "تاريخ الميلاد",
|
||||
"infoHeight": "الطول",
|
||||
"infoWeight": "الوزن",
|
||||
"btnEdit": "تحرير",
|
||||
"btnAdd": "إضافة",
|
||||
"btnDetail": "عرض التفاصيل",
|
||||
"btnDeleteAccount": "حذف الحساب",
|
||||
"btnLogOut": "تسجيل الخروج",
|
||||
"countIntake": "الاستهلاك",
|
||||
"countCalorieIntake": "معدل استهلاك السعرات الحرارية",
|
||||
"countMealdetails": "تفاصيل الوجبة",
|
||||
"countAddFood": "إضافة الطعام",
|
||||
"countNutritionalProportion": "نسبة التغذية",
|
||||
"countComponentStatistics": "إحصاء المكونات",
|
||||
"countCalorieAnalysis": "تحليل السعرات الحرارية",
|
||||
"countNutrientElementEnergyProportion": "نسبة الطاقة للمغذيات",
|
||||
"countNutritionClassification": "تصنيف التغذية",
|
||||
"countNutritionElementRankingList": "ترتيب العناصر الغذائية",
|
||||
"countFoodTypes": "أنواع الطعام",
|
||||
|
||||
"total": "ما مجموعه",
|
||||
"records": "السجلات",
|
||||
"Search": "البحث",
|
||||
"VoiceSearch": "بحث صوتي",
|
||||
"Save": "حفظ",
|
||||
"noMoreData": "لا مزيد من البيانات",
|
||||
"HistoricalSearch": "بحث تاريخي",
|
||||
"wantSearch": "أعتقد أنك تريد تفتيش",
|
||||
"verifyCalorie": "يرجى إدخال السعرات الحرارية",
|
||||
"kcal": "السعرات الحرارية",
|
||||
"countNoFood": "لا يوجد طعام",
|
||||
"msgLoginTips": "انظر المزيد بعد تسجيل الدخول",
|
||||
"Nutrients": "مغذيات",
|
||||
"Content": "المحتوى",
|
||||
"CaloriesAndnutrients": "السعرات الحرارية والتغذية",
|
||||
"ImproveInformation": "تحسين المعلومات",
|
||||
"WhetherTodelete": "هل حذف",
|
||||
"BusinessCooperation": "التعاون التجاري",
|
||||
"verifyActivityCoefficient": "يرجى تحديد معامل النشاط",
|
||||
"devicesTips":"لم يتم تسجيل الجهاز، يرجى التواصل مع البائع لإجراء التحقق من النظام",
|
||||
|
||||
"kg": "kg",
|
||||
"g": "g",
|
||||
"oz": "oz",
|
||||
"ml": "ml",
|
||||
"lb": "lb",
|
||||
"milkml": "milkml",
|
||||
"Waterml": "Waterml",
|
||||
"floz": "floz",
|
||||
"lboz": "lboz",
|
||||
"st": "st:lb"
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
{
|
||||
"msgTitle": "Freundlicher Hinweis",
|
||||
"msgUpgradeFail": "Aktualisierung fehlgeschlagen",
|
||||
"msgDownloading": "Wird heruntergeladen",
|
||||
"msgLatestVersion": "Es ist bereits die neueste Version!",
|
||||
"msgCancel": "Sie haben die Aktion abgebrochen!",
|
||||
"msgLoginSuccess": "Anmeldung erfolgreich!",
|
||||
"msgDelete": "Erfolgreich gelöscht",
|
||||
"msgSetSuccess": "Erfolgreich eingestellt",
|
||||
"msgBottom": "Ende, schau dir etwas anderes an.",
|
||||
"msgNoMoreData": "Keine weiteren Daten mehr!",
|
||||
"msgSetPasswordSuccess": "Passwort erfolgreich gesetzt, gehen Sie in das Programm!",
|
||||
"msgAddUser": "Keine Mitglieder vorhanden, bitte fügen Sie zunächst hinzu",
|
||||
"verifyNickName": "Bitte geben Sie einen Spitznamen ein",
|
||||
"verifyNotOptional": "Zukünftige Daten können nicht ausgewählt werden",
|
||||
"verifyDate": "Bitte wählen Sie das Messdatum aus",
|
||||
"verifyBirthday": "Bitte wählen Sie das Geburtsdatum aus",
|
||||
"verifyHeight": "Bitte geben Sie Ihre Körpergröße ein.",
|
||||
"verifyWeight": "Geben Sie Ihr Gewicht ein.",
|
||||
"verifyGender": "Bitte wählen Sie Ihr Geschlecht",
|
||||
"verifyBontrast": "Bitte wählen Sie Daten aus",
|
||||
"verifyBodyDate": "Bitte wählen Sie die richtige Zeit aus",
|
||||
"verifyRecord": "Bitte eingeben",
|
||||
"verifyPicker": "Bitte wählen Sie",
|
||||
"verifyAccount": "Bitte geben Sie eine korrekte Handynummer oder E-Mail-Adresse ein",
|
||||
"verifyEmail": "Bitte geben Sie Ihre E-Mail ein",
|
||||
"verifyEmailCorrect": "Bitte geben Sie eine korrekte E-Mail-Adresse ein.",
|
||||
"verifyMobile": "Bitte geben Sie die Handynummer ein.",
|
||||
"verifyMobileCorrect": "Bitte geben Sie die korrekte Handynummer ein.",
|
||||
"verifyCode": "Bitte geben Sie den Sicherheitscode ein.",
|
||||
"verifyPassword": "Bitte geben Sie das Passwort ein",
|
||||
"verifyPasswordTwo": "Bitte geben Sie das Passwort zur Bestätigung ein",
|
||||
"verifyPasswordCorrect": "Bitte bestätigen Sie, dass die beiden Passwörter übereinstimmen.",
|
||||
"verifyAgreement": "Bitte bestätigen und das Abkommen ankreuzen.",
|
||||
"verifyOutLogin": "Sollen Sie sich abmelden?",
|
||||
"verifyDeleteUser": "Soll dieser Mitglied gelöscht werden?",
|
||||
"verifyDeleteHistory": "Sollen die aktuellen Messaufzeichnungen gelöscht werden?",
|
||||
"verifyDeleteAccount": "Nach erfolgreicher Löschung werden alle mit diesem Konto verbundenen Informationen gelöscht und können nicht wiederhergestellt werden. Möchten Sie das Konto löschen?",
|
||||
"btnConfirm": "Bestätigung",
|
||||
"btnSubmit": "einreichen",
|
||||
"btnSancellation": "stornieren",
|
||||
"btnContinue": "fortsetzen",
|
||||
"btnBack": "Zurückkehren",
|
||||
"btnDelete": "löschen",
|
||||
"ConnectionTimeout": "Verbindungszeitüberschreitung, klicken Sie auf erneute Verbindung",
|
||||
"Measuring": "Während der Messung, legen Sie das Essen auf die Waage.",
|
||||
"Weight": "Gewicht",
|
||||
"RecordWeight": "Geben Sie das Gewicht der Lebensmittel ein.",
|
||||
"SearchBluetooth": "Bluetooth-Suche läuft",
|
||||
"Remeasure": "Daten sind abnorm, bitte messen Sie neu!",
|
||||
"reset": "Datenanomalie, bitte zählen Sie zurück und messen Sie neu!",
|
||||
"Disconnect": "Verbindung trennen",
|
||||
"remeasure": "Neue Messung",
|
||||
"resetBtn": "Nullsetzen",
|
||||
"UnitBtn": "Einheit",
|
||||
"SaveResult": "speichern",
|
||||
"titleHome": "Startseite",
|
||||
"titleMenu": "Rezept",
|
||||
"titleMenuAdd": "Rezept hinzufügen",
|
||||
"titleMenuSearch": "Rezepte suchen",
|
||||
"titleCount": "Essensplanung",
|
||||
"titleCountList": "Zutatenlager",
|
||||
"titleCustomKcal": "Benutzerdefinierte Kalorien",
|
||||
"titleEveryMeal": "Detaillierte Speiseinformationen",
|
||||
"titleCountSearch": "Zutaten-Suche",
|
||||
"titleeveryDay": "Ernährungsanalyse",
|
||||
"titleMe": "mein",
|
||||
"titleDetail": "Einzelheiten",
|
||||
"titleBody": "Ziel",
|
||||
"titleHistory": "Essensaufzeichnung",
|
||||
"titlePhone": "Handynummer binden",
|
||||
"titleEmail": "E-Mail-Bindung",
|
||||
"titlePasswordEdit": "Passwort ändern",
|
||||
"titleSet": "Einstellung",
|
||||
"titleDate": "Datum",
|
||||
"titleMember": "Daten",
|
||||
"titleManage": "Mitgliedermanagement",
|
||||
"titleManageAdd": "Mitglied hinzufügen",
|
||||
"titleAboutUs": "Über uns",
|
||||
"titleSetPassword": "Passwort festlegen",
|
||||
"titlePassword": "Passwort",
|
||||
"titleConfirmPassword": "Passwort bestätigen",
|
||||
"titleForgotPassword": "Passwort vergessen",
|
||||
"titleCode": "Bestätigungscode",
|
||||
"titleLanguage": "Sprache.",
|
||||
"titleSendCode": "CAPTCHA-Code abrufen",
|
||||
"titleSendCodeRetry": "Nach S erneut senden",
|
||||
"titleLogin": "Anmelden",
|
||||
"titleRegister": "Registrierung",
|
||||
"titleToggleLogin": "Anmeldungswechsel",
|
||||
"titleAccountText": "Handynummer/E-Mail",
|
||||
"titleAgreementText": "Lesen und zustimmen",
|
||||
"titleAgreementContntText": "Datenschutzrichtlinie",
|
||||
"titleVersionUpdate": "Versionsupdate",
|
||||
"titleNewVersion": "Neue Version",
|
||||
"infoActivityCoefficient": "Aktivitätskoeffizient",
|
||||
"infoPersonalProfile": "Persönliche Daten",
|
||||
"infoMyRecipes": "Mein Rezeptbuch",
|
||||
"infoMyCollection": "Meine Sammlung",
|
||||
"infoAvatar": "Profilbild",
|
||||
"infoNickname": "Spitzname",
|
||||
"infoMobile": "Handynummer",
|
||||
"infoEmail": "E-Mail",
|
||||
"infoAge": "Alter",
|
||||
"infoAgeunit": "Jahr",
|
||||
"infoGender": "Geschlecht",
|
||||
"infoMan": "Mann",
|
||||
"infoWoman": "Frau",
|
||||
"infoUnknown": "Unbekannt",
|
||||
"infoBirthday": "Geburtsdatum",
|
||||
"infoHeight": "Körpergröße",
|
||||
"infoWeight": "Körpergewicht",
|
||||
"btnEdit": "Redaktion",
|
||||
"btnDelete": "löschen",
|
||||
"btnAdd": "hinzufügen",
|
||||
"btnDetail": "Details anzeigen",
|
||||
"btnDeleteAccount": "Konto löschen",
|
||||
"btnLogOut": "Ausloggen",
|
||||
"countIntake": "Aufnahme",
|
||||
"countCalorieIntake": "Wärmeaufnahme",
|
||||
"countMealdetails": "Essensdetails",
|
||||
"countAddFood": "Futtermittel hinzufügen",
|
||||
"countNutritionalProportion": "Anteil der Nährstoffe",
|
||||
"countComponentStatistics": "Zusammensetzung statistik",
|
||||
"countCalorieAnalysis": "Kalorienanalyse",
|
||||
"countNutrientElementEnergyProportion": "Anteil der Nährstoffenergie",
|
||||
"countNutritionClassification": "Ernährungsgruppeneinteilung",
|
||||
"countNutritionElementRankingList": "Ranking der Nährstoffe",
|
||||
"countFoodTypes": "Lebensmitteltyp",
|
||||
|
||||
"total": "mit",
|
||||
"records": "Notiert",
|
||||
"Search": "Suche läuft.",
|
||||
"VoiceSearch": "Jetzt die suche.",
|
||||
"Save": "Intakt",
|
||||
"noMoreData": "Keine weiteren daten",
|
||||
"HistoricalSearch": "Suche in der geschichte",
|
||||
"wantSearch": "Durchsuch das ziel",
|
||||
"verifyCalorie": "Geben sie kalorien ein.",
|
||||
"kcal": "Kalorien",
|
||||
"countNoFood": "Vorübergehende lebensmittelknappheit.",
|
||||
"msgLoginTips": "Loggen sie sich ein und sehen sie mehr nach",
|
||||
"Nutrients": "Spender",
|
||||
"Content": "Hüllen",
|
||||
"CaloriesAndnutrients": "Kalorien und ernährung",
|
||||
"ImproveInformation": "Nachrichten verbessern.",
|
||||
"WhetherTodelete": "Ist sie gelöscht",
|
||||
"BusinessCooperation": "Kooperation seitens der händler",
|
||||
"verifyActivityCoefficient": "Bitte wählen sie die multiplikatoren",
|
||||
"devicesTips":"Gerät nicht registriert. Bitte wenden Sie sich an den Verkäufer zur Systemzertifizierung.",
|
||||
"kg": "kg",
|
||||
"g": "g",
|
||||
"oz": "oz",
|
||||
"ml": "ml",
|
||||
"lb": "lb",
|
||||
"milkml": "milkml",
|
||||
"Waterml": "Waterml",
|
||||
"floz": "floz",
|
||||
"lboz": "lboz",
|
||||
"st": "st:lb"
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
{
|
||||
"msgTitle": "Friendly Reminder",
|
||||
"msgUpgradeFail": "Upgrade failed",
|
||||
"msgDownloading": "Downloading",
|
||||
"msgLatestVersion": "It's already the latest version!",
|
||||
"msgCancel": "You have canceled the operation!",
|
||||
"msgLoginSuccess": "Login successful!",
|
||||
"msgDelete": "Deleted successfully",
|
||||
"msgSetSuccess": "Setup successful",
|
||||
"msgBottom": "That's it, let's look at something else",
|
||||
"msgNoMoreData": "No more data available!",
|
||||
"msgSetPasswordSuccess": "Password set successfully, entering the program!",
|
||||
"msgAddUser": "Currently, there are no members. Please add one first",
|
||||
"verifyNickName": "Please enter a nickname",
|
||||
"verifyNotOptional": "Future dates are not selectable",
|
||||
"verifyDate": "Please select the measurement date",
|
||||
"verifyBirthday": "Please select your date of birth",
|
||||
"verifyHeight": "Please enter your height",
|
||||
"verifyWeight": "Please enter your weight",
|
||||
"verifyGender": "Please select gender",
|
||||
"verifyBontrast": "Please select data",
|
||||
"verifyBodyDate": "Please choose the correct time",
|
||||
"verifyRecord": "Please enter",
|
||||
"verifyPicker": "Please select",
|
||||
"verifyAccount": "Please enter a correct phone number or email address",
|
||||
"verifyEmail": "Please enter your email",
|
||||
"verifyEmailCorrect": "Please enter a correct email address",
|
||||
"verifyMobile": "Please enter your phone number",
|
||||
"verifyMobileCorrect": "Please enter a correct phone number",
|
||||
"verifyCode": "Please enter the verification code",
|
||||
"verifyPassword": "Please enter the password",
|
||||
"verifyPasswordTwo": "Please enter the confirmation password",
|
||||
"verifyPasswordCorrect": "Please confirm that the passwords entered are identical",
|
||||
"verifyAgreement": "Please confirm and check the agreement first",
|
||||
"verifyOutLogin": "Are you sure you want to log out?",
|
||||
"verifyDeleteUser": "Should this member be deleted?",
|
||||
"verifyDeleteHistory": "Do you want to delete the current measurement record?",
|
||||
"verifyDeleteAccount": "After successful deletion, all associated information of the account will be cleared and cannot be retrieved. Are you sure you want to delete?",
|
||||
"btnConfirm": "confirm",
|
||||
"btnSubmit": "submit",
|
||||
"btnSancellation": "Cancel",
|
||||
"btnContinue": "continue",
|
||||
"btnBack": "return",
|
||||
"ConnectionTimeout": "Connection timed out, click to reconnect",
|
||||
"Measuring": "During the measurement, please place the food on the scale",
|
||||
"Weight": "weight",
|
||||
"RecordWeight": "Please enter food weight",
|
||||
"SearchBluetooth": "In Bluetooth search",
|
||||
"Remeasure": "Data anomaly, please re-measure!",
|
||||
"reset": "Data anomaly, please reset and measure again!",
|
||||
"Disconnect": "Disconnect",
|
||||
"remeasure": "remeasure",
|
||||
"resetBtn": "Tare",
|
||||
"UnitBtn": "unit",
|
||||
"SaveResult": "save",
|
||||
"titleHome": "home",
|
||||
"titleMenu": "recipe",
|
||||
"titleMenuAdd": "Add recipe",
|
||||
"titleMenuSearch": "Search for recipes",
|
||||
"titleCount": "Count food",
|
||||
"titleCountList": "Ingredient library",
|
||||
"titleCustomKcal": "Custom calorie",
|
||||
"titleEveryMeal": "Meal details",
|
||||
"titleCountSearch": "Ingredient search",
|
||||
"titleeveryDay": "Nutritional Analysis",
|
||||
"titleMe": "my",
|
||||
"titleDetail": "Details",
|
||||
"titleBody": "target",
|
||||
"titleHistory": "Diet record",
|
||||
"titlePhone": "Bind mobile number",
|
||||
"titleEmail": "Bind email",
|
||||
"titlePasswordEdit": "Change password",
|
||||
"titleSet": "Settings",
|
||||
"titleDate": "date",
|
||||
"titleMember": "data",
|
||||
"titleManage": "Member Management",
|
||||
"titleManageAdd": "Add member",
|
||||
"titleAboutUs": "About Us",
|
||||
"titleSetPassword": "set password",
|
||||
"titlePassword": "password",
|
||||
"titleConfirmPassword": "Confirm Password",
|
||||
"titleForgotPassword": "Forgot password",
|
||||
"titleCode": "CAPTCHA",
|
||||
"titleLanguage": "Language",
|
||||
"titleSendCode": "Get Verification code",
|
||||
"titleSendCodeRetry": "Resend after S",
|
||||
"titleLogin": "login",
|
||||
"titleRegister": "register",
|
||||
"titleToggleLogin": "Switch login",
|
||||
"titleAccountText": "Mobile phone number/Email",
|
||||
"titleAgreementText": "Read and agree",
|
||||
"titleAgreementContntText": "Privacy Policy",
|
||||
"titleVersionUpdate": "Version Update",
|
||||
"titleNewVersion": "new version",
|
||||
"infoActivityCoefficient": "Activity coefficient",
|
||||
"infoPersonalProfile": "Personal Profile",
|
||||
"infoMyRecipes": "My recipe",
|
||||
"infoMyCollection": "My Collection",
|
||||
"infoAvatar": "avatar",
|
||||
"infoNickname": "nickname",
|
||||
"infoMobile": "mobile phone number",
|
||||
"infoEmail": "email",
|
||||
"infoAge": "age",
|
||||
"infoAgeunit": "year",
|
||||
"infoGender": "gender",
|
||||
"infoMan": "male",
|
||||
"infoWoman": "female",
|
||||
"infoUnknown": "unknown",
|
||||
"infoBirthday": "Birthday",
|
||||
"infoHeight": "height",
|
||||
"infoWeight": "weight",
|
||||
"btnEdit": "edit",
|
||||
"btnDelete": "delete",
|
||||
"btnAdd": "add",
|
||||
"btnDetail": "View details",
|
||||
"btnDeleteAccount": "Delete account",
|
||||
"btnLogOut": "Log out",
|
||||
"countIntake": "intake",
|
||||
"countCalorieIntake": "caloric intake",
|
||||
"countMealdetails": "Meal details",
|
||||
"countAddFood": "Add food",
|
||||
"countNutritionalProportion": "Nutrient composition",
|
||||
"countComponentStatistics": "Ingredient statistics",
|
||||
"countCalorieAnalysis": "Calorie analysis",
|
||||
"countNutrientElementEnergyProportion": "Energy proportion",
|
||||
"countNutritionClassification": "Nutrition classification",
|
||||
"countNutritionElementRankingList": "Nutrient Rankings",
|
||||
"countFoodTypes": "Food type",
|
||||
|
||||
"total": "Total of",
|
||||
"records": "records",
|
||||
"Search": "Search",
|
||||
"VoiceSearch": "VoiceSearch",
|
||||
"Save": "Save",
|
||||
"noMoreData": "There is no more data",
|
||||
"HistoricalSearch": "Historical search",
|
||||
"wantSearch": "I guess you want to search",
|
||||
"verifyCalorie": "Please enter calories",
|
||||
"kcal": "Calorie",
|
||||
"countNoFood": "NO Food Yet",
|
||||
"msgLoginTips": "Log in to view more",
|
||||
"Nutrients": "Nutrients",
|
||||
"Content": "Content",
|
||||
"CaloriesAndnutrients": "Calories and nutrients",
|
||||
"ImproveInformation": "Improve information",
|
||||
"WhetherTodelete": "Whether to delete",
|
||||
"BusinessCooperation": "Businesscooperation",
|
||||
"verifyActivityCoefficient": "Please select the activity coefficient",
|
||||
"devicesTips":"The equipment has not been registered. Please contact the seller for system certification.",
|
||||
"kg": "kg",
|
||||
"g": "g",
|
||||
"oz": "oz",
|
||||
"ml": "ml",
|
||||
"lb": "lb",
|
||||
"milkml": "milkml",
|
||||
"Waterml": "Waterml",
|
||||
"floz": "floz",
|
||||
"lboz": "lboz",
|
||||
"st": "st:lb"
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
{
|
||||
|
||||
"msgTitle": "Consejo amistoso",
|
||||
"msgUpgradeFail": "Actualización fallida",
|
||||
"msgDownloading": "Descargando",
|
||||
"msgLatestVersion": "Ya es la versión más reciente!",
|
||||
"msgCancel": "Ha cancelado la operación!",
|
||||
"msgLoginSuccess": "Inicio de sesión exitoso!",
|
||||
"msgDelete": "Eliminado con éxito",
|
||||
"msgSetSuccess": "Configuración exitosa",
|
||||
"msgBottom": "Hasta aquí, veamos algo más",
|
||||
"msgNoMoreData": "No hay más datos disponibles!",
|
||||
"msgSetPasswordSuccess": "La configuración de la contraseña ha tenido éxito, entra en el programa!",
|
||||
"msgAddUser": "No hay miembros por el momento, por favor añádelos primero.",
|
||||
"verifyNickName": "Por favor, ingrese un nombre de usuario",
|
||||
"verifyNotOptional": "No se puede seleccionar una fecha futura",
|
||||
"verifyDate": "Por favor, seleccione la fecha de medición",
|
||||
"verifyBirthday": "Por favor, seleccione la fecha de nacimiento",
|
||||
"verifyHeight": "Por favor, ingrese su altura",
|
||||
"verifyWeight": "Por favor, ingrese su peso",
|
||||
"verifyGender": "Por favor, seleccione el género",
|
||||
"verifyBontrast": "Por favor, seleccione los datos",
|
||||
"verifyBodyDate": "Por favor, seleccione la hora correcta",
|
||||
"verifyRecord": "Por favor, ingrese",
|
||||
"verifyPicker": "Por favor, elija",
|
||||
"verifyAccount": "Por favor, ingrese un número de teléfono o correo electrónico correcto",
|
||||
"verifyEmail": "Por favor, introduzca el correo electrónico",
|
||||
"verifyEmailCorrect": "Por favor, ingrese un correo electrónico válido",
|
||||
"verifyMobile": "Por favor, ingrese su número de teléfono",
|
||||
"verifyMobileCorrect": "Por favor, ingrese el número de teléfono correcto.",
|
||||
"verifyCode": "Por favor, ingrese el código de verificación",
|
||||
"verifyPassword": "Por favor, introduzca la contraseña",
|
||||
"verifyPasswordTwo": "Por favor, ingrese la contraseña de confirmación",
|
||||
"verifyPasswordCorrect": "Por favor, confirme que las contraseñas ingresadas coinciden.",
|
||||
"verifyAgreement": "Por favor, confirme y marque el acuerdo primero.",
|
||||
"verifyOutLogin": "¿Deseas cerrar sesión?",
|
||||
"verifyDeleteUser": "¿Eliminar a este miembro?",
|
||||
"verifyDeleteHistory": "¿Eliminar el registro de medición actual?",
|
||||
"verifyDeleteAccount": "Una vez eliminado, toda la información asociada a esta cuenta se borrará y no se podrá recuperar. ¿Desea eliminarla?",
|
||||
"btnConfirm": "confirmar",
|
||||
"btnSubmit": "enviar",
|
||||
"btnSancellation": "Cancelar",
|
||||
"btnContinue": "Continuar",
|
||||
"btnBack": "volver",
|
||||
"btnDelete": "eliminar",
|
||||
"ConnectionTimeout": "Tiempo de espera de conexión agotado, haga clic para reconectar",
|
||||
"Measuring": "Durante la medición, coloque la comida en la báscula.",
|
||||
"Weight": "peso",
|
||||
"RecordWeight": "Ingrese el peso de la comida",
|
||||
"SearchBluetooth": "Buscando Bluetooth",
|
||||
"Remeasure": "Los datos son anómalos, vuelva a medirlos!",
|
||||
"reset": "Los datos son anómalos, por favor reinicie y vuelva a medir!",
|
||||
"Disconnect": "Desconectar",
|
||||
"remeasure": "Volver a medir",
|
||||
"resetBtn": "eliminación",
|
||||
"UnitBtn": "unidad",
|
||||
"SaveResult": "guardar",
|
||||
"titleHome": "Página de inicio",
|
||||
"titleMenu": "Receta",
|
||||
"titleMenuAdd": "Añadir receta",
|
||||
"titleMenuSearch": "Buscar recetas",
|
||||
"titleCount": "Control de alimentos",
|
||||
"titleCountList": "Almacén de ingredientes",
|
||||
"titleCustomKcal": "Calorías personalizadas",
|
||||
"titleEveryMeal": "Detalles de la comida",
|
||||
"titleCountSearch": "Búsqueda de ingredientes",
|
||||
"titleeveryDay": "Análisis nutricional",
|
||||
"titleMe": "mi",
|
||||
"titleDetail": "detalles",
|
||||
"titleBody": "Objetivo",
|
||||
"titleHistory": "Registro de la dieta",
|
||||
"titlePhone": "Vincular número de teléfono",
|
||||
"titleEmail": "Vincular correo electrónico",
|
||||
"titlePasswordEdit": "cambiar la contraseña",
|
||||
"titleSet": "configuración",
|
||||
"titleDate": "fecha",
|
||||
"titleMember": "Materiales",
|
||||
"titleManage": "Gestión de miembros",
|
||||
"titleManageAdd": "Añadir miembros",
|
||||
"titleAboutUs": "Sobre nosotros",
|
||||
"titleSetPassword": "Establecer contraseña",
|
||||
"titlePassword": "contraseña",
|
||||
"titleConfirmPassword": "Confirmar contraseña",
|
||||
"titleForgotPassword": "Olvidé la contraseña",
|
||||
"titleCode": "código de verificación",
|
||||
"titleLanguage": "El lenguaje",
|
||||
"titleSendCode": "Obtener código de verificación",
|
||||
"titleSendCodeRetry": "Reenvío posterior a S",
|
||||
"titleLogin": "Iniciar sesión",
|
||||
"titleRegister": "registro",
|
||||
"titleToggleLogin": "Cambiar de inicio de sesión",
|
||||
"titleAccountText": "Número de teléfono/correo electrónico",
|
||||
"titleAgreementText": "Leer y aceptar",
|
||||
"titleAgreementContntText": "Acuerdo de privacidad",
|
||||
"titleVersionUpdate": "Actualización de versión",
|
||||
"titleNewVersion": "Nueva versión",
|
||||
"infoActivityCoefficient": "factor de actividad",
|
||||
"infoPersonalProfile": "Perfil personal",
|
||||
"infoMyRecipes": "Mi recetario",
|
||||
"infoMyCollection": "Mi colección",
|
||||
"infoAvatar": "Avatar",
|
||||
"infoNickname": "Apodo",
|
||||
"infoMobile": "número de teléfono móvil",
|
||||
"infoEmail": "correo electrónico",
|
||||
"infoAge": "edad",
|
||||
"infoAgeunit": "año",
|
||||
"infoGender": "Género",
|
||||
"infoMan": "hombre",
|
||||
"infoWoman": "mujer",
|
||||
"infoUnknown": "desconocido",
|
||||
"infoBirthday": "Fecha de nacimiento",
|
||||
"infoHeight": "altura",
|
||||
"infoWeight": "Peso",
|
||||
"btnEdit": "editar",
|
||||
"btnDelete": "eliminar",
|
||||
"btnAdd": "añadir",
|
||||
"btnDetail": "Ver detalles",
|
||||
"btnDeleteAccount": "Eliminar la cuenta",
|
||||
"btnLogOut": "Cerrar sesión",
|
||||
"countIntake": "Ingestión",
|
||||
"countCalorieIntake": "Ingesta de calorías",
|
||||
"countMealdetails": "Detalles de la comida",
|
||||
"countAddFood": "Añadir alimentos",
|
||||
"countNutritionalProportion": "Proporción de nutrientes",
|
||||
"countComponentStatistics": "Estadística de componentes",
|
||||
"countCalorieAnalysis": "Análisis de calorías",
|
||||
"countNutrientElementEnergyProportion": "Proporción de energía de los nutrientes",
|
||||
"countNutritionClassification": "Clasificación nutricional",
|
||||
"countNutritionElementRankingList": "Ranking de elementos nutricionales",
|
||||
"countFoodTypes": "Tipo de alimento",
|
||||
|
||||
"total": "total",
|
||||
"records": "Los registros",
|
||||
"Search": "búsqueda",
|
||||
"VoiceSearch": "Búsqueda por voz",
|
||||
"Save": "guardar",
|
||||
"noMoreData": "No hay más datos",
|
||||
"HistoricalSearch": "Búsqueda en historia",
|
||||
"wantSearch": "Supongo que quieres buscar",
|
||||
"verifyCalorie": "Por favor, introduzca calorías",
|
||||
"kcal": "caloría",
|
||||
"countNoFood": "No hay comida todavía",
|
||||
"msgLoginTips": "Iniciar sesión para ver más",
|
||||
"Nutrients": "nutriente",
|
||||
"Content": "Elcontenido",
|
||||
"CaloriesAndnutrients": "Calorías y nutrición",
|
||||
"ImproveInformation": "Perfeccionando el mensaje",
|
||||
"WhetherTodelete": "Eliminar sí no",
|
||||
"BusinessCooperation": "Cooperación empresarial",
|
||||
"verifyActivityCoefficient": "Por favor seleccione el coeficiente de actividad",
|
||||
"devicesTips":"El equipo no está registrado. Por favor, contacte al vendedor para realizar la autenticación del sistema.",
|
||||
"kg": "kg",
|
||||
"g": "g",
|
||||
"oz": "oz",
|
||||
"ml": "ml",
|
||||
"lb": "lb",
|
||||
"milkml": "milkml",
|
||||
"Waterml": "Waterml",
|
||||
"floz": "floz",
|
||||
"lboz": "lboz",
|
||||
"st": "st:lb"
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
{
|
||||
"msgTitle": "Conseil amical",
|
||||
"msgUpgradeFail": "Mise à niveau échouée",
|
||||
"msgDownloading": "En cours de téléchargement",
|
||||
"msgLatestVersion": "C'est déjà la dernière version !",
|
||||
"msgCancel": "Vous avez annulé l'opération !",
|
||||
"msgLoginSuccess": "Connexion réussie !",
|
||||
"msgDelete": "Suppression réussie",
|
||||
"msgSetSuccess": "Paramètres réussis",
|
||||
"msgBottom": "C'est la fin, regarde quelque chose d'autre.",
|
||||
"msgNoMoreData": "Plus de données disponibles !",
|
||||
"msgSetPasswordSuccess": "Mot de passe configuré avec succès, accédez au programme !",
|
||||
"msgAddUser": "Aucun membre pour le moment, veuillez en ajouter d'abord.",
|
||||
"verifyNickName": "Veuillez entrer un pseudonyme",
|
||||
"verifyNotOptional": "La date future ne peut pas être sélectionnée",
|
||||
"verifyDate": "Veuillez sélectionner la date de mesure",
|
||||
"verifyBirthday": "Veuillez sélectionner la date de naissance",
|
||||
"verifyHeight": "Veuillez entrer votre taille",
|
||||
"verifyWeight": "Veuillez entrer votre poids",
|
||||
"verifyGender": "Veuillez choisir le sexe",
|
||||
"verifyBontrast": "Veuillez sélectionner les données",
|
||||
"verifyBodyDate": "Veuillez choisir l'heure correcte",
|
||||
"verifyRecord": "Veuillez entrer",
|
||||
"verifyPicker": "Veuillez choisir",
|
||||
"verifyAccount": "Veuillez saisir un numéro de téléphone ou une adresse e-mail corrects",
|
||||
"verifyEmail": "Veuillez saisir une adresse e-mail",
|
||||
"verifyEmailCorrect": "Veuillez entrer une adresse e-mail valide.",
|
||||
"verifyMobile": "Veuillez entrer votre numéro de téléphone",
|
||||
"verifyMobileCorrect": "Veuillez saisir un numéro de téléphone correct",
|
||||
"verifyCode": "Veuillez entrer le code de vérification",
|
||||
"verifyPassword": "Veuillez entrer le mot de passe",
|
||||
"verifyPasswordTwo": "Veuillez saisir le mot de passe de confirmation",
|
||||
"verifyPasswordCorrect": "Veuillez confirmer que les deux mots de passe saisis sont identiques.",
|
||||
"verifyAgreement": "Veuillez d'abord confirmer et cocher l'accord.",
|
||||
"verifyOutLogin": "Voulez-vous vous déconnecter ?",
|
||||
"verifyDeleteUser": "Voulez-vous supprimer ce membre ?",
|
||||
"verifyDeleteHistory": "Voulez-vous supprimer l'enregistrement de mesure actuel ?",
|
||||
"verifyDeleteAccount": "Après la suppression réussie, toutes les informations associées à ce compte seront effacées et ne pourront pas être récupérées. Voulez-vous vraiment supprimer ?",
|
||||
"btnConfirm": "confirmer",
|
||||
"btnSubmit": "Soumettre",
|
||||
"btnSancellation": "Annuler",
|
||||
"btnContinue": "Continuer",
|
||||
"btnBack": "retourner",
|
||||
"btnDelete": "supprimer",
|
||||
"ConnectionTimeout": "Déconnexion, cliquez pour se reconnecter",
|
||||
"Measuring": "En cours de mesure, veuillez placer la nourriture sur la balance.",
|
||||
"Weight": "poids",
|
||||
"RecordWeight": "Veuillez entrer le poids de la nourriture",
|
||||
"SearchBluetooth": "Recherche Bluetooth en cours",
|
||||
"Remeasure": "Données anormales, veuillez reprendre la mesure !",
|
||||
"reset": "Données anormales, veuillez les réinitialiser et recommencer la mesure !",
|
||||
"Disconnect": "Déconnexion",
|
||||
"remeasure": "Re-mesurer",
|
||||
"resetBtn": "Réinitialisation",
|
||||
"UnitBtn": "unité",
|
||||
"SaveResult": "sauvegarder",
|
||||
"titleHome": "Page d'accueil",
|
||||
"titleMenu": "Recette",
|
||||
"titleMenuAdd": "Ajouter une recette",
|
||||
"titleMenuSearch": "Rechercher des recettes",
|
||||
"titleCount": "Compter les calories",
|
||||
"titleCountList": "Répertoire des ingrédients",
|
||||
"titleCustomKcal": "Calories personnalisées",
|
||||
"titleEveryMeal": "Détails du repas",
|
||||
"titleCountSearch": "Recherche d'ingrédients",
|
||||
"titleeveryDay": "Analyse nutritionnelle",
|
||||
"titleMe": "mon",
|
||||
"titleDetail": "Détails",
|
||||
"titleBody": "Objectif",
|
||||
"titleHistory": "Journal alimentaire",
|
||||
"titlePhone": "Lier un numéro de téléphone",
|
||||
"titleEmail": "Lier une adresse e-mail",
|
||||
"titlePasswordEdit": "Modifier le mot de passe",
|
||||
"titleSet": "Paramétrage",
|
||||
"titleDate": "date",
|
||||
"titleMember": "Données",
|
||||
"titleManage": "Gestion des membres",
|
||||
"titleManageAdd": "Ajouter un membre",
|
||||
"titleAboutUs": "À propos de nous",
|
||||
"titleSetPassword": "Définir un mot de passe",
|
||||
"titlePassword": "mot de passe",
|
||||
"titleConfirmPassword": "Confirmer le mot de passe",
|
||||
"titleForgotPassword": "Mot de passe oublié",
|
||||
"titleCode": "Code de vérification",
|
||||
"titleLanguage": "Langue (S)",
|
||||
"titleSendCode": "Obtenir le code de vérification",
|
||||
"titleSendCodeRetry": "Réémission après S",
|
||||
"titleLogin": "Connexion",
|
||||
"titleRegister": "Inscription",
|
||||
"titleToggleLogin": "Changer de connexion",
|
||||
"titleAccountText": "Numéro de téléphone / Adresse e-mail",
|
||||
"titleAgreementText": "Lire et accepter",
|
||||
"titleAgreementContntText": "Politique de confidentialité",
|
||||
"titleVersionUpdate": "Mise à jour de version",
|
||||
"titleNewVersion": "Nouvelle version",
|
||||
"infoActivityCoefficient": "Coefficient d'activité",
|
||||
"infoPersonalProfile": "Profil personnel",
|
||||
"infoMyRecipes": "Ma recette",
|
||||
"infoMyCollection": "Ma collection",
|
||||
"infoAvatar": "Avatar",
|
||||
"infoNickname": "Pseudonyme",
|
||||
"infoMobile": "numéro de téléphone portable",
|
||||
"infoEmail": "boîte aux lettres",
|
||||
"infoAge": "Âge",
|
||||
"infoAgeunit": "Année",
|
||||
"infoGender": "Genre",
|
||||
"infoMan": "homme",
|
||||
"infoWoman": "femme",
|
||||
"infoUnknown": "Inconnu",
|
||||
"infoBirthday": "Date de naissance",
|
||||
"infoHeight": "taille",
|
||||
"infoWeight": "poids",
|
||||
"btnEdit": "Éditer",
|
||||
"btnDelete": "supprimer",
|
||||
"btnAdd": "Ajouter",
|
||||
"btnDetail": "Voir les détails",
|
||||
"btnDeleteAccount": "Supprimer le compte",
|
||||
"btnLogOut": "Se déconnecter",
|
||||
"countIntake": "Absorption",
|
||||
"countCalorieIntake": "L'apport calorique",
|
||||
"countMealdetails": "Détails du repas",
|
||||
"countAddFood": "Ajouter des aliments",
|
||||
"countNutritionalProportion": "Proportion nutritionnelle",
|
||||
"countComponentStatistics": "Statistiques des composants",
|
||||
"countCalorieAnalysis": "Analyse des calories",
|
||||
"countNutrientElementEnergyProportion": "La proportion d'énergie des éléments nutritifs",
|
||||
"countNutritionClassification": "Classification nutritionnelle",
|
||||
"countNutritionElementRankingList": "Classement des éléments nutritifs",
|
||||
"countFoodTypes": "Type d'alimentation",
|
||||
|
||||
"total ": "total",
|
||||
"Records ": " un enregistrement",
|
||||
"Search": "rechercher ",
|
||||
"VoiceSearch": "recherche vocale",
|
||||
"Save": "Save",
|
||||
"NoMoreData ": "plus de données",
|
||||
"HistoricalSearch": "recherche historique",
|
||||
"WantSearch ": "devinez que vous voulez rechercher",
|
||||
"VerifyCalorie ": "s’il vous plaît entrer des calories ",
|
||||
"Kcal ": "calories",
|
||||
"CountNoFood ": "pas de nourriture pour le moment ",
|
||||
"MsgLoginTips ": "voir plus après connexion ",
|
||||
"Nutriments ": "nutriments ",
|
||||
"Content": "contenu ",
|
||||
"CaloriesAndnutrients": "calories et nutrition ",
|
||||
"Améliorer l’information ": " améliorer l’information ",
|
||||
"WhetherTodelete": "supprimer ou non ",
|
||||
"BusinessCooperation": "coopération commerciale ",
|
||||
"verifyActivityCoefficient ": "veuillez sélectionner des coefficients d’activité.",
|
||||
"devicesTips":"L'équipement n'est pas enregistré. Veuillez contacter le vendeur pour une authentification du système.",
|
||||
"kg": "kg",
|
||||
"g": "g",
|
||||
"oz": "oz",
|
||||
"ml": "ml",
|
||||
"lb": "lb",
|
||||
"milkml": "milkml",
|
||||
"Waterml": "Waterml",
|
||||
"floz": "floz",
|
||||
"lboz": "lboz",
|
||||
"st": "st:lb"
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
import en from './en.json'
|
||||
import zh from './zh.json'
|
||||
import zhHant from './zh-Hant.json'
|
||||
import ja from './ja.json'
|
||||
import fr from './fr.json'
|
||||
import de from './de.json'
|
||||
import ko from './ko.json'
|
||||
import ru from './ru.json'
|
||||
import pt from './pt.json'
|
||||
import es from './es.json'
|
||||
import ar from './ar.json'
|
||||
export default {
|
||||
zh, //中文
|
||||
ar, //阿拉伯
|
||||
de, //德语
|
||||
en, // 英语
|
||||
es, //西班牙
|
||||
fr, //法语
|
||||
ja, //日语
|
||||
ko, //韩语
|
||||
pt, //葡萄牙
|
||||
ru, //俄语
|
||||
"zh-Hans": zh, //中文
|
||||
'zh-Hant': zhHant, //繁体
|
||||
"en-CN": en,
|
||||
"jp":ja,
|
||||
"fra":fr,
|
||||
"kor":ko,
|
||||
"spa":es,
|
||||
"ara":ar,
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
{
|
||||
|
||||
"msgTitle": "友情のヒント",
|
||||
"msgUpgradeFail": "アップグレード失敗",
|
||||
"msgDownloading": "ダウンロード中",
|
||||
"msgLatestVersion": "最新バージョンですよ!",
|
||||
"msgCancel": "操作をキャンセルしました!",
|
||||
"msgLoginSuccess": "ログイン成功!",
|
||||
"msgDelete": "削除に成功しました",
|
||||
"msgSetSuccess": "設定完了",
|
||||
"msgBottom": "これ以上ありません。他のものを見てみましょう",
|
||||
"msgNoMoreData": "これ以上データはありません!",
|
||||
"msgSetPasswordSuccess": "パスワード設定完了、プログラムに入ります!",
|
||||
"msgAddUser": "メンバーがまだいません。まず追加してください",
|
||||
"verifyNickName": "ニックネームを入力してください",
|
||||
"verifyNotOptional": "将来の日付は選択できません",
|
||||
"verifyDate": "測定日を選択してください",
|
||||
"verifyBirthday": "生年月日を選択してください",
|
||||
"verifyHeight": "身長を入力してください",
|
||||
"verifyWeight": "体重を入力してください",
|
||||
"verifyGender": "性別を選択してください",
|
||||
"verifyBontrast": "データを選択してください",
|
||||
"verifyBodyDate": "正しい時間を選択してください",
|
||||
"verifyRecord": "入力してください",
|
||||
"verifyPicker": "選択してください",
|
||||
"verifyAccount": "正しい携帯電話番号またはメールアドレスを入力してください",
|
||||
"verifyEmail": "メールアドレスを入力してください",
|
||||
"verifyEmailCorrect": "正しいメールアドレスを入力してください",
|
||||
"verifyMobile": "携帯電話番号を入力してください",
|
||||
"verifyMobileCorrect": "正しい携帯電話番号を入力してください",
|
||||
"verifyCode": "認証コードを入力してください",
|
||||
"verifyPassword": "パスワードを入力してください",
|
||||
"verifyPasswordTwo": "確認用パスワードを入力してください",
|
||||
"verifyPasswordCorrect": "パスワードが一致しているか確認してください",
|
||||
"verifyAgreement": "まず、同意書を確認してチェックしてください",
|
||||
"verifyOutLogin": "ログアウトしますか?",
|
||||
"verifyDeleteUser": "このメンバーを削除しますか?",
|
||||
"verifyDeleteHistory": "現在の測定記録を削除しますか?",
|
||||
"verifyDeleteAccount": "削除に成功すると、そのアカウントに関連するすべての情報が消去され、復元できません。削除しますか?",
|
||||
"btnConfirm": "確認",
|
||||
"btnSubmit": "提出",
|
||||
"btnSancellation": "キャンセル",
|
||||
"btnContinue": "続ける",
|
||||
"btnBack": "戻る",
|
||||
"ConnectionTimeout": "接続タイムアウト、再接続をクリックしてください",
|
||||
"Measuring": "測定中は、食べ物をはかりの上に置いてください",
|
||||
"Weight": "重量",
|
||||
"RecordWeight": "食品の重量を入力してください",
|
||||
"SearchBluetooth": "Bluetooth検索中",
|
||||
"Remeasure": "データに異常があります。再度計測してください!",
|
||||
"reset": "データ異常です。ゼロにしてから再度測定してください!",
|
||||
"Disconnect": "接続を切断",
|
||||
"remeasure": "再測定",
|
||||
"resetBtn": "ゼロクリア",
|
||||
"UnitBtn": "単位",
|
||||
"SaveResult": "保存",
|
||||
"titleHome": "ホームページ",
|
||||
"titleMenu": "レシシピ",
|
||||
"titleMenuAdd": "レシピを追加",
|
||||
"titleMenuSearch": "レシピ検索",
|
||||
"titleCount": "食事の計算",
|
||||
"titleCountList": "食材庫(しょかいく)",
|
||||
"titleCustomKcal": "カスタムカロリー",
|
||||
"titleEveryMeal": "食事の詳細",
|
||||
"titleCountSearch": "食材検索",
|
||||
"titleeveryDay": "栄養分析",
|
||||
"titleMe": "私の",
|
||||
"titleDetail": "詳細",
|
||||
"titleBody": "目標",
|
||||
"titleHistory": "食事記録",
|
||||
"titlePhone": "携帯電話番号の紐付け",
|
||||
"titleEmail": "メールアドレスの紐付け",
|
||||
"titlePasswordEdit": "パスワードを変更する",
|
||||
"titleSet": "設定",
|
||||
"titleDate": "日付",
|
||||
"titleMember": "資料",
|
||||
"titleManage": "メンバー管理",
|
||||
"titleManageAdd": "メンバー追加",
|
||||
"titleAboutUs": "私たちについて",
|
||||
"titleSetPassword": "パスワードを設定する",
|
||||
"titlePassword": "パスワード",
|
||||
"titleConfirmPassword": "確認用パスワード",
|
||||
"titleForgotPassword": "パスワードを忘れた",
|
||||
"titleCode": "認証コード",
|
||||
"titleLanguage": "言語です",
|
||||
"titleSendCode": "認証コードを取得する",
|
||||
"titleSendCodeRetry": "S後再送",
|
||||
"titleLogin": "ログイン",
|
||||
"titleRegister": "登録",
|
||||
"titleToggleLogin": "ログイン切り替え",
|
||||
"titleAccountText": "携帯電話番号/メールアドレス",
|
||||
"titleAgreementText": "読み、同意する",
|
||||
"titleAgreementContntText": "プライバシーポリシー",
|
||||
"titleVersionUpdate": "バージョンアップデート",
|
||||
"titleNewVersion": "新バージョン",
|
||||
"infoActivityCoefficient": "活動係数",
|
||||
"infoPersonalProfile": "個人情報",
|
||||
"infoMyRecipes": "私のレシピ",
|
||||
"infoMyCollection": "私のコレクション",
|
||||
"infoAvatar": "アバター",
|
||||
"infoNickname": "ニックネーム",
|
||||
"infoMobile": "携帯電話番号",
|
||||
"infoEmail": "メールボックス",
|
||||
"infoAge": "年齢",
|
||||
"infoAgeunit": "歳",
|
||||
"infoGender": "性別",
|
||||
"infoMan": "男",
|
||||
"infoWoman": "女(おんな)",
|
||||
"infoUnknown": "未知(みちゅう)",
|
||||
"infoBirthday": "生年月日",
|
||||
"infoHeight": "身長",
|
||||
"infoWeight": "体重",
|
||||
"btnEdit": "編集",
|
||||
"btnDelete": "削除",
|
||||
"btnAdd": "追加",
|
||||
"btnDetail": "詳細を見る",
|
||||
"btnDeleteAccount": "アカウント削除",
|
||||
"btnLogOut": "ログアウト",
|
||||
"countIntake": "摂取",
|
||||
"countCalorieIntake": "熱量摂取",
|
||||
"countMealdetails": "食事の詳細",
|
||||
"countAddFood": "食品を追加する",
|
||||
"countNutritionalProportion": "栄養の割合",
|
||||
"countComponentStatistics": "成分統計",
|
||||
"countCalorieAnalysis": "カロリー分析",
|
||||
"countNutrientElementEnergyProportion": "栄養素のエネルギー割合",
|
||||
"countNutritionClassification": "栄養分類",
|
||||
"countNutritionElementRankingList": "栄養素ランキング",
|
||||
"countFoodTypes": "食品タイプ",
|
||||
|
||||
"total": "共です",
|
||||
"records": "記録します",
|
||||
"Search": "検索します",
|
||||
"VoiceSearch": "音声検索です",
|
||||
"Save": "保存します",
|
||||
"noMoreData": "これ以上のデータはありません",
|
||||
"HistoricalSearch": "履歴検索です",
|
||||
"wantSearch": "あなたが探していると思います",
|
||||
"verifyCalorie": "カロリー入力お願いします。",
|
||||
"kcal": "カロリーです",
|
||||
"countNoFood": "しばらく食べ物がありません",
|
||||
"msgLoginTips": "ログインしてもっと見ます",
|
||||
"Nutrients": "栄養素です",
|
||||
"Content": "含有量です",
|
||||
"CaloriesAndnutrients": "カロリーと栄養です",
|
||||
"ImproveInformation": "情報を補完します",
|
||||
"WhetherTodelete": "削除しますか",
|
||||
"BusinessCooperation": "ビジネス提携です",
|
||||
"verifyActivityCoefficient": "活動係数を選択します",
|
||||
"devicesTips":"機器は登録されていません。販売者に連絡してシステム認証を行ってください。",
|
||||
"kg": "kg",
|
||||
"g": "g",
|
||||
"oz": "oz",
|
||||
"ml": "ml",
|
||||
"lb": "lb",
|
||||
"milkml": "milkml",
|
||||
"Waterml": "Waterml",
|
||||
"floz": "floz",
|
||||
"lboz": "lboz",
|
||||
"st": "st:lb"
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
{
|
||||
"msgTitle": "친절한 안내",
|
||||
"msgUpgradeFail": "업그레이드 실패",
|
||||
"msgDownloading": "다운로드 중입니다",
|
||||
"msgLatestVersion": "이미 최신 버전입니다!",
|
||||
"msgCancel": "작업을 취소하셨습니다!",
|
||||
"msgLoginSuccess": "로그인 성공!",
|
||||
"msgDelete": "삭제 성공",
|
||||
"msgSetSuccess": "설정 성공",
|
||||
"msgBottom": "끝이에요, 다른 걸 봐요",
|
||||
"msgNoMoreData": "더 이상의 데이터가 없습니다!",
|
||||
"msgSetPasswordSuccess": "비밀번호 설정이 성공적으로 완료되었습니다. 프로그램으로 들어가세요!",
|
||||
"msgAddUser": "멤버가 없습니다. 먼저 추가해 주세요.",
|
||||
"verifyNickName": "닉네임을 입력해 주세요",
|
||||
"verifyNotOptional": "미래 날짜는 선택할 수 없습니다.",
|
||||
"verifyDate": "측정 날짜를 선택해 주세요",
|
||||
"verifyBirthday": "생년월일을 선택해 주세요",
|
||||
"verifyHeight": "키를 입력해 주세요",
|
||||
"verifyWeight": "체중을 입력해 주세요",
|
||||
"verifyGender": "성별을 선택해 주세요",
|
||||
"verifyBontrast": "데이터를 선택해 주세요",
|
||||
"verifyBodyDate": "올바른 시간을 선택해 주세요",
|
||||
"verifyRecord": "입력해 주세요",
|
||||
"verifyPicker": "선택해 주세요",
|
||||
"verifyAccount": "올바른 휴대폰 번호 또는 이메일을 입력해 주세요.",
|
||||
"verifyEmail": "이메일을 입력해 주세요",
|
||||
"verifyEmailCorrect": "올바른 이메일을 입력해 주세요.",
|
||||
"verifyMobile": "휴대폰 번호를 입력해 주세요",
|
||||
"verifyMobileCorrect": "올바른 휴대폰 번호를 입력해 주세요.",
|
||||
"verifyCode": "인증번호를 입력해 주세요",
|
||||
"verifyPassword": "비밀번호를 입력하세요",
|
||||
"verifyPasswordTwo": "비밀번호를 다시 입력해 주세요",
|
||||
"verifyPasswordCorrect": "비밀번호가 일치하는지 확인해 주세요.",
|
||||
"verifyAgreement": "먼저 약관을 확인하고 체크해 주세요.",
|
||||
"verifyOutLogin": "로그아웃 하시겠습니까?",
|
||||
"verifyDeleteUser": "해당 멤버를 삭제하시겠습니까?",
|
||||
"verifyDeleteHistory": "현재 측정 기록을 삭제하시겠습니까?",
|
||||
"verifyDeleteAccount": "삭제 성공 후, 해당 계정의 모든 연관 정보가 지워지고 복구할 수 없으니, 정말로 삭제하시겠습니까?",
|
||||
"btnConfirm": "확인",
|
||||
"btnSubmit": "제출",
|
||||
"btnSancellation": "취소",
|
||||
"btnContinue": "계속",
|
||||
"btnBack": "돌아가다",
|
||||
"btnDelete": "삭제",
|
||||
"ConnectionTimeout": "연결 시간 초과, 재연결을 클릭하세요",
|
||||
"Measuring": "측정 중, 음식을 저울 위에 놓아주세요.",
|
||||
"Weight": "무게",
|
||||
"RecordWeight": "음식 무게를 입력해 주세요",
|
||||
"SearchBluetooth": "블루투스 검색 중",
|
||||
"Remeasure": "데이터 이상, 재측정해 주세요!",
|
||||
"reset": "데이터 이상, 초기화 후 재측정해 주세요!",
|
||||
"Disconnect": "연결 끊기",
|
||||
"remeasure": "재측정",
|
||||
"resetBtn": "제로화",
|
||||
"UnitBtn": "단위",
|
||||
"SaveResult": "저장",
|
||||
"titleHome": "홈페이지",
|
||||
"titleMenu": "레시피",
|
||||
"titleMenuAdd": "레시피 추가",
|
||||
"titleMenuSearch": "레시피 검색",
|
||||
"titleCount": "계식",
|
||||
"titleCountList": "재료 창고",
|
||||
"titleCustomKcal": "사용자 정의 칼로리",
|
||||
"titleEveryMeal": "식사 상세",
|
||||
"titleCountSearch": "재료 검색",
|
||||
"titleeveryDay": "영양 분석",
|
||||
"titleMe": "나의",
|
||||
"titleDetail": "상세",
|
||||
"titleBody": "목표",
|
||||
"titleHistory": "식단 기록",
|
||||
"titlePhone": "휴대폰 번호 바인딩",
|
||||
"titleEmail": "이메일 바인딩",
|
||||
"titlePasswordEdit": "비밀번호 변경",
|
||||
"titleSet": "설정",
|
||||
"titleDate": "날짜",
|
||||
"titleMember": "자료",
|
||||
"titleManage": "멤버 관리",
|
||||
"titleManageAdd": "멤버 추가",
|
||||
"titleAboutUs": "회사 소개",
|
||||
"titleSetPassword": "비밀번호 설정",
|
||||
"titlePassword": "비밀번호",
|
||||
"titleConfirmPassword": "비밀번호 확인",
|
||||
"titleForgotPassword": "비밀번호를 잊어버렸어요",
|
||||
"titleCode": "인증 코드",
|
||||
"titleLanguage": "언어",
|
||||
"titleSendCode": "인증번호 받기",
|
||||
"titleSendCodeRetry": "S 후 재발송",
|
||||
"titleLogin": "로그인",
|
||||
"titleRegister": "등록",
|
||||
"titleToggleLogin": "로그인 전환",
|
||||
"titleAccountText": "휴대폰 번호/이메일",
|
||||
"titleAgreementText": "읽고 동의합니다",
|
||||
"titleAgreementContntText": "개인정보 처리방침",
|
||||
"titleVersionUpdate": "버전 업데이트",
|
||||
"titleNewVersion": "새 버전",
|
||||
"infoActivityCoefficient": "활동 계수",
|
||||
"infoPersonalProfile": "개인 정보",
|
||||
"infoMyRecipes": "내 레시피",
|
||||
"infoMyCollection": "내 컬렉션",
|
||||
"infoAvatar": "프로필 사진",
|
||||
"infoNickname": "별명",
|
||||
"infoMobile": "휴대폰 번호",
|
||||
"infoEmail": "이메일",
|
||||
"infoAge": "나이",
|
||||
"infoAgeunit": "살",
|
||||
"infoGender": "성별",
|
||||
"infoMan": "남자",
|
||||
"infoWoman": "여자",
|
||||
"infoUnknown": "미지",
|
||||
"infoBirthday": "생년월일",
|
||||
"infoHeight": "키",
|
||||
"infoWeight": "체중",
|
||||
"btnEdit": "편집",
|
||||
"btnAdd": "추가",
|
||||
"btnDetail": "상세 내용 확인",
|
||||
"btnDeleteAccount": "계정 삭제",
|
||||
"btnLogOut": "로그아웃",
|
||||
"countIntake": "섭취",
|
||||
"countCalorieIntake": "열량 섭취",
|
||||
"countMealdetails": "식사 상세",
|
||||
"countAddFood": "음식 추가",
|
||||
"countNutritionalProportion": "영양 비율",
|
||||
"countComponentStatistics": "성분 통계",
|
||||
"countCalorieAnalysis": "칼로리 분석",
|
||||
"countNutrientElementEnergyProportion": "영양소 에너지 비율",
|
||||
"countNutritionClassification": "영양 분류",
|
||||
"countNutritionElementRankingList": "영양소 순위표",
|
||||
"countFoodTypes": "음식 유형",
|
||||
|
||||
"total": "모두",
|
||||
"records": "조목 기록",
|
||||
"Search": "검색",
|
||||
"VoiceSearch": "음성 검색",
|
||||
"Save": "저장",
|
||||
"noMoreData": "더 이상 자료가 없습니다",
|
||||
"HistoricalSearch": "과거 기록 검색",
|
||||
"wantSearch": "검색해 보세요",
|
||||
"verifyCalorie": "칼로리를 입력하십시오",
|
||||
"kcal": "칼로리",
|
||||
"countNoFood": "잠시 음식물이 없다.",
|
||||
"msgLoginTips": "로그인 후 더 많은 것을 볼 수 있습니다",
|
||||
"Nutrients": "영양소",
|
||||
"Content": "함량이",
|
||||
"CaloriesAndnutrients": "열량과 영양",
|
||||
"ImproveInformation": "정보를 완벽하게하다.",
|
||||
"WhetherTodelete": "삭제할지 여부",
|
||||
"BusinessCooperation": "상무 합작",
|
||||
"verifyActivityCoefficient": "활동지수를 선택하십시오",
|
||||
"devicesTips":"장비 등록이 되지 않았습니다. 판매자에게 연락하여 시스템 인증을 진행해 주세요.",
|
||||
"kg": "kg",
|
||||
"g": "g",
|
||||
"oz": "oz",
|
||||
"ml": "ml",
|
||||
"lb": "lb",
|
||||
"milkml": "milkml",
|
||||
"Waterml": "Waterml",
|
||||
"floz": "floz",
|
||||
"lboz": "lboz",
|
||||
"st": "st:lb"
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
{
|
||||
"msgTitle": "Aviso Amigo",
|
||||
"msgUpgradeFail": "Falha na atualização",
|
||||
"msgDownloading": "Em download",
|
||||
"msgLatestVersion": "Já é a versão mais recente!",
|
||||
"msgCancel": "Você cancelou a operação!",
|
||||
"msgLoginSuccess": "Login efetuado com sucesso!",
|
||||
"msgDelete": "Excluir com sucesso",
|
||||
"msgSetSuccess": "Configurações bem-sucedidas",
|
||||
"msgBottom": "Fim da linha, veja outro",
|
||||
"msgNoMoreData": "Não há mais dados!",
|
||||
"msgSetPasswordSuccess": "Senha definida com sucesso,entre no programa!",
|
||||
"msgAddUser": "Nenhum membro por enquanto, adicione um",
|
||||
"verifyNickName": "Por favor insira um apelido",
|
||||
"verifyNotOptional": "Futuras datas não podem ser selecionadas",
|
||||
"verifyDate": "Por favor selecione a data da medição",
|
||||
"verifyBirthday": "Por favor selecione a data de nascimento",
|
||||
"verifyHeight": "Por favor, insira a altura",
|
||||
"verifyWeight": "Digite seu peso",
|
||||
"verifyGender": "Por favor selecione o género",
|
||||
"verifyBontrast": "Por favor selecione dados",
|
||||
"verifyBodyDate": "Por favor selecione o horário correto",
|
||||
"verifyRecord": "Por favor, insira",
|
||||
"verifyPicker": "Por favor, escolha",
|
||||
"verifyAccount": "Por favor insira o número de telemóvel ou e-mail correto",
|
||||
"verifyEmail": "Insira o e-mail",
|
||||
"verifyEmailCorrect": "Insira um e-mail válido",
|
||||
"verifyMobile": "Por favor insira o número de telemóvel",
|
||||
"verifyMobileCorrect": "Por favor insira um número de telemóvel correto",
|
||||
"verifyCode": "Por favor insira o código de verificação",
|
||||
"verifyPassword": "Por favor, insira a senha",
|
||||
"verifyPasswordTwo": "Por favor insira a confirmação da palavra-passe",
|
||||
"verifyPasswordCorrect": "Por favor, confirme que as duas senhas escritas estão iguais",
|
||||
"verifyAgreement": "Por favor, confirme e marque o acordo",
|
||||
"verifyOutLogin": "Sair da sessão?",
|
||||
"verifyDeleteUser": "Tem certeza que deseja excluir o membro?",
|
||||
"verifyDeleteHistory": "Excluir a medida atual?",
|
||||
"verifyDeleteAccount": "Após a exclusão, todos os dados vinculados a esta conta serão apagados e não poderá recuperá-los. Excluir?",
|
||||
"btnConfirm": "confirmar",
|
||||
"btnSubmit": "Enviar a sua candidatura",
|
||||
"btnSancellation": "cancelar",
|
||||
"btnContinue": "Continuar",
|
||||
"btnBack": "Voltar",
|
||||
"btnDelete": "excluir",
|
||||
"ConnectionTimeout": "Tempo de conexão esgotado, clique para reconectar",
|
||||
"Measuring": "Medindo, coloque o alimento na balança",
|
||||
"Weight": "peso",
|
||||
"RecordWeight": "Informe o peso do alimento",
|
||||
"SearchBluetooth": "Pesquisa Bluetooth em",
|
||||
"Remeasure": "Dados anormais, faça a medição novamente!",
|
||||
"reset": "Dados anormais, por favor zerar e medir novamente!",
|
||||
"Disconnect": "Desconectar",
|
||||
"remeasure": "Re-Medir a",
|
||||
"resetBtn": "reinicialização",
|
||||
"UnitBtn": "unidade",
|
||||
"SaveResult": "guardar",
|
||||
"titleHome": "Página inicial",
|
||||
"titleMenu": "receitas de pratos",
|
||||
"titleMenuAdd": "Adicionar Receita",
|
||||
"titleMenuSearch": "Pesquisa de Receitas",
|
||||
"titleCount": "contagem de alimentos",
|
||||
"titleCountList": "Banco de Ingredientes",
|
||||
"titleCustomKcal": "Calorias Personalizadas",
|
||||
"titleEveryMeal": "Detalhes do Almoço",
|
||||
"titleCountSearch": "Busca de Ingredientes",
|
||||
"titleeveryDay": "Análise Nutricional",
|
||||
"titleMe": "meu",
|
||||
"titleDetail": "Detalhes",
|
||||
"titleBody": "Objetivos",
|
||||
"titleHistory": "Registo de dietas e alimentação",
|
||||
"titlePhone": "Vincular o número de telefone",
|
||||
"titleEmail": "Vincular e-mail",
|
||||
"titlePasswordEdit": "Alterar a palavra-passe",
|
||||
"titleSet": "configuração",
|
||||
"titleDate": "data",
|
||||
"titleMember": "Documentos para o",
|
||||
"titleManage": "Administração de Membros",
|
||||
"titleManageAdd": "Adicionar um membro",
|
||||
"titleAboutUs": "Sobre nós",
|
||||
"titleSetPassword": "Definir uma senha",
|
||||
"titlePassword": "Senha",
|
||||
"titleConfirmPassword": "Confirme a Senha",
|
||||
"titleForgotPassword": "Esqueceu a senha",
|
||||
"titleCode": "código de verificação",
|
||||
"titleLanguage": "línguas",
|
||||
"titleSendCode": "Obter código de verificação",
|
||||
"titleSendCodeRetry": "Reenvio posterior S",
|
||||
"titleLogin": "Iniciar sessão",
|
||||
"titleRegister": "Registre-se",
|
||||
"titleToggleLogin": "Alterar o login",
|
||||
"titleAccountText": "Número de celular/email",
|
||||
"titleAgreementText": "Ler e aceitar",
|
||||
"titleAgreementContntText": "Termo de privacidade",
|
||||
"titleVersionUpdate": "Atualização de versão",
|
||||
"titleNewVersion": "nova versão",
|
||||
"infoActivityCoefficient": "Fator de atividade",
|
||||
"infoPersonalProfile": "Perfil",
|
||||
"infoMyRecipes": "As minhas receitas",
|
||||
"infoMyCollection": "Minha Coleção",
|
||||
"infoAvatar": "Foto de perfil",
|
||||
"infoNickname": "Nome do apelido",
|
||||
"infoMobile": "Nº de Telefone",
|
||||
"infoEmail": "caixa de correio",
|
||||
"infoAge": "idade",
|
||||
"infoAgeunit": "Ano",
|
||||
"infoGender": "Gênero",
|
||||
"infoMan": "homem",
|
||||
"infoWoman": "Mulher",
|
||||
"infoUnknown": "Desconhecido",
|
||||
"infoBirthday": "Data de nascimento",
|
||||
"infoHeight": "altura",
|
||||
"infoWeight": "Peso corporal",
|
||||
"btnEdit": "Editores",
|
||||
"btnDelete": "excluir",
|
||||
"btnAdd": "Adicionar",
|
||||
"btnDetail": "Detalhes de Visualização",
|
||||
"btnDeleteAccount": "Excluir conta",
|
||||
"btnLogOut": "Sair",
|
||||
"countIntake": "ingestão",
|
||||
"countCalorieIntake": "intake de calorias",
|
||||
"countMealdetails": "Detalhes dos pratos",
|
||||
"countAddFood": "Adicionar alimentos",
|
||||
"countNutritionalProportion": "Contribuição percentual de nutrientes",
|
||||
"countComponentStatistics": "Estatística de Ingredientes",
|
||||
"countCalorieAnalysis": "Análise de calorias",
|
||||
"countNutrientElementEnergyProportion": "Porcentagem de energia dos nutrientes",
|
||||
"countNutritionClassification": "Classificação nutricional",
|
||||
"countNutritionElementRankingList": "Ranking de nutrientes",
|
||||
"countFoodTypes": "Tipos de alimentos",
|
||||
|
||||
"total": "total",
|
||||
"records": "Um registo",
|
||||
"Search": "busca",
|
||||
"VoiceSearch": "Pesquisa por voz",
|
||||
"Save": "conservação",
|
||||
"noMoreData": "Não há mais dados",
|
||||
"HistoricalSearch": "Pesquisa no histórico",
|
||||
"wantSearch": "Acho que você quer pesquisar",
|
||||
"verifyCalorie": "Por favor, insira calorias",
|
||||
"kcal": "Caloria em calorias",
|
||||
"countNoFood": "Sem comida ainda",
|
||||
"msgLoginTips": "Faça login para ver mais",
|
||||
"Nutrients": "nutriente",
|
||||
"Content": "conteúdo",
|
||||
"CaloriesAndnutrients": "Calorias e nutrição",
|
||||
"ImproveInformation": "Aperfeiçoe a mensagem",
|
||||
"WhetherTodelete": "Apagar sim não",
|
||||
"BusinessCooperation": "Cooperação de negócios",
|
||||
"verifyActivityCoefficient": "Por favor, selecione o coeficiente de atividade",
|
||||
"devicesTips":"O equipamento não foi registrado. Por favor, entre em contato com o vendedor para realizar a autenticação no sistema.",
|
||||
"kg": "kg",
|
||||
"g": "g",
|
||||
"oz": "oz",
|
||||
"ml": "ml",
|
||||
"lb": "lb",
|
||||
"milkml": "milkml",
|
||||
"Waterml": "Waterml",
|
||||
"floz": "floz",
|
||||
"lboz": "lboz",
|
||||
"st": "st:lb"
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
{
|
||||
"msgTitle": "Дружеское напоминание",
|
||||
"msgUpgradeFail": "Обновление не удалось",
|
||||
"msgDownloading": "Скачивается",
|
||||
"msgLatestVersion": "Это уже самая новая версия!",
|
||||
"msgCancel": "Вы отменили операцию!",
|
||||
"msgLoginSuccess": "Вход выполнен успешно!",
|
||||
"msgDelete": "Удаление успешно",
|
||||
"msgSetSuccess": "Настройка успешно завершена",
|
||||
"msgBottom": "Вот и конец, посмотрим что-то другое.",
|
||||
"msgNoMoreData": "Больше данных нет!",
|
||||
"msgSetPasswordSuccess": "Пароль успешно установлен, вход в программу!",
|
||||
"msgAddUser": "Пока нет участников, сначала добавьте",
|
||||
"verifyNickName": "Введите никнейм",
|
||||
"verifyNotOptional": "Будущие даты нельзя выбрать",
|
||||
"verifyDate": "Пожалуйста, выберите дату измерения",
|
||||
"verifyBirthday": "Пожалуйста, выберите дату рождения",
|
||||
"verifyHeight": "Введите рост",
|
||||
"verifyWeight": "Введите вес",
|
||||
"verifyGender": "Пожалуйста, выберите пол",
|
||||
"verifyBontrast": "Пожалуйста, выберите данные",
|
||||
"verifyBodyDate": "Пожалуйста, выберите правильное время",
|
||||
"verifyRecord": "Пожалуйста, введите",
|
||||
"verifyPicker": "Пожалуйста, выберите",
|
||||
"verifyAccount": "Введите правильный номер телефона или электронную почту",
|
||||
"verifyEmail": "Введите электронную почту",
|
||||
"verifyEmailCorrect": "Введите правильный адрес электронной почты",
|
||||
"verifyMobile": "Введите номер телефона",
|
||||
"verifyMobileCorrect": "Введите правильный номер телефона",
|
||||
"verifyCode": "Введите код подтверждения",
|
||||
"verifyPassword": "Введите пароль",
|
||||
"verifyPasswordTwo": "Пожалуйста, введите подтверждение пароля",
|
||||
"verifyPasswordCorrect": "Пожалуйста, убедитесь, что пароли введены одинаково.",
|
||||
"verifyAgreement": "Пожалуйста, сначала подтвердите и отметьте соглашение.",
|
||||
"verifyOutLogin": "Выйти из учетной записи?",
|
||||
"verifyDeleteUser": "Удалить этого участника?",
|
||||
"verifyDeleteHistory": "Удалить текущую запись измерений?",
|
||||
"verifyDeleteAccount": "После успешного удаления все связанная информация с этого аккаунта будет очищена и не будет восстановлена. Удалить?",
|
||||
"btnConfirm": "подтверждение",
|
||||
"btnSubmit": "отправить",
|
||||
"btnSancellation": "отменить",
|
||||
"btnContinue": "продолжать",
|
||||
"btnBack": "возвращаться",
|
||||
"btnDelete": "удалить",
|
||||
"ConnectionTimeout": "Тайм-аут подключения, нажмите для повторного подключения",
|
||||
"Measuring": "При измерении, пожалуйста, положите еду на весы.",
|
||||
"Weight": "вес",
|
||||
"RecordWeight": "Введите вес еды",
|
||||
"SearchBluetooth": "Поиск Bluetooth",
|
||||
"Remeasure": "Аномальные данные, проведите повторное измерение!",
|
||||
"reset": "Аномальные данные, очистите и проведите повторное измерение!",
|
||||
"Disconnect": "Отключение",
|
||||
"remeasure": "Пересчитать",
|
||||
"resetBtn": "обнуление",
|
||||
"UnitBtn": "единица",
|
||||
"SaveResult": "сохранить",
|
||||
"titleHome": "Главная страница",
|
||||
"titleMenu": "рецепт",
|
||||
"titleMenuAdd": "Добавить рецепт",
|
||||
"titleMenuSearch": "Поиск рецептов",
|
||||
"titleCount": "Планирование питания",
|
||||
"titleCountList": "Склад продуктов",
|
||||
"titleCustomKcal": "Пользовательские калории",
|
||||
"titleEveryMeal": "Детали питания",
|
||||
"titleCountSearch": "Поиск ингредиентов",
|
||||
"titleeveryDay": "анализ питательных веществ",
|
||||
"titleMe": "Мой",
|
||||
"titleDetail": "подробности",
|
||||
"titleBody": "цель",
|
||||
"titleHistory": "Пищевой дневник",
|
||||
"titlePhone": "Привязка номера телефона",
|
||||
"titleEmail": "Привязать электронную почту",
|
||||
"titlePasswordEdit": "изменить пароль",
|
||||
"titleSet": "настройка",
|
||||
"titleDate": "дата",
|
||||
"titleMember": "материалы",
|
||||
"titleManage": "Управление участниками",
|
||||
"titleManageAdd": "Добавить участника",
|
||||
"titleAboutUs": "О нас",
|
||||
"titleSetPassword": "Установить пароль",
|
||||
"titlePassword": "пароль",
|
||||
"titleConfirmPassword": "Подтверждение пароля",
|
||||
"titleForgotPassword": "Забыли пароль",
|
||||
"titleCode": "капча",
|
||||
"titleLanguage": "язык",
|
||||
"titleSendCode": "Получить код подтверждения",
|
||||
"titleSendCodeRetry": "S повторная отправка",
|
||||
"titleLogin": "Войти",
|
||||
"titleRegister": "регистрация",
|
||||
"titleToggleLogin": "Переключение входа",
|
||||
"titleAccountText": "Мобильный номер/электронная почта",
|
||||
"titleAgreementText": "Прочитать и согласиться",
|
||||
"titleAgreementContntText": "Политика конфиденциальности",
|
||||
"titleVersionUpdate": "Обновление версии",
|
||||
"titleNewVersion": "Новая версия",
|
||||
"infoActivityCoefficient": "коэффициент активности",
|
||||
"infoPersonalProfile": "Личные данные",
|
||||
"infoMyRecipes": "Мои рецепты",
|
||||
"infoMyCollection": "Моя коллекция",
|
||||
"infoAvatar": "аватар",
|
||||
"infoNickname": "никнейм",
|
||||
"infoMobile": "номер телефона",
|
||||
"infoEmail": "почта",
|
||||
"infoAge": "возраст",
|
||||
"infoAgeunit": "год",
|
||||
"infoGender": "пол",
|
||||
"infoMan": "мужчина",
|
||||
"infoWoman": "женщина",
|
||||
"infoUnknown": "неизвестный",
|
||||
"infoBirthday": "Дата рождения",
|
||||
"infoHeight": "рост",
|
||||
"infoWeight": "вес",
|
||||
"btnEdit": "редактировать",
|
||||
"btnAdd": "добавить",
|
||||
"btnDetail": "Подробнее",
|
||||
"btnDeleteAccount": "Удалить аккаунт",
|
||||
"btnLogOut": "Выйти из системы",
|
||||
"countIntake": "Потребление",
|
||||
"countCalorieIntake": "Потребление калорий",
|
||||
"countMealdetails": "Детали питания",
|
||||
"countAddFood": "Добавить еду",
|
||||
"countNutritionalProportion": "доля питательных веществ",
|
||||
"countComponentStatistics": "статистика компонентов",
|
||||
"countCalorieAnalysis": "Анализ калорий",
|
||||
"countNutrientElementEnergyProportion": "Доля энергии питательных веществ",
|
||||
"countNutritionClassification": "Классификация питательных веществ",
|
||||
"countNutritionElementRankingList": "Рейтинг питательных элементов",
|
||||
"countFoodTypes": "Типы пищи",
|
||||
|
||||
"total": "на",
|
||||
"records": "Запись.",
|
||||
"Search": "поиск",
|
||||
"VoiceSearch": "Поиск голоса",
|
||||
"Save": "сохран",
|
||||
"noMoreData": "Больше данных нет",
|
||||
"HistoricalSearch": "Поиск истории",
|
||||
"wantSearch": "Полагаю, вы хотите обыскать",
|
||||
"verifyCalorie": "Введите калории.",
|
||||
"kcal": "Калории.",
|
||||
"countNoFood": "Пока нет еды.",
|
||||
"msgLoginTips": "Проверьте больше после входа",
|
||||
"Nutrients": "Питательные вещества.",
|
||||
"Content": "содержан",
|
||||
"CaloriesAndnutrients": "Тепло и питание",
|
||||
"ImproveInformation": "Усовершенствовать информацию",
|
||||
"WhetherTodelete": "Удалить",
|
||||
"BusinessCooperation": "Деловое сотрудничество.",
|
||||
"verifyActivityCoefficient": "Пожалуйста, выберите коэффициент активности",
|
||||
"devicesTips":"Устройство не зарегистрировано, пожалуйста, свяжитесь с продавцом для системной аутентификации",
|
||||
"kg": "kg",
|
||||
"g": "g",
|
||||
"oz": "oz",
|
||||
"ml": "ml",
|
||||
"lb": "lb",
|
||||
"milkml": "milkml",
|
||||
"Waterml": "Waterml",
|
||||
"floz": "floz",
|
||||
"lboz": "lboz",
|
||||
"st": "st:lb"
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"index.title": "Hello i18n",
|
||||
"index.home": "主頁",
|
||||
"index.component": "組件",
|
||||
"index.api": "API",
|
||||
"index.schema": "Schema",
|
||||
"index.demo": "uni-app 國際化演示",
|
||||
"index.demo-description": "包含 uni-framework、manifest.json、pages.json、tabbar、頁面、組件、API、Schema",
|
||||
"index.detail": "詳情",
|
||||
"index.language": "語言",
|
||||
"index.language-info": "語言信息",
|
||||
"index.system-language": "系統語言",
|
||||
"index.application-language": "應用語言",
|
||||
"index.language-change-confirm": "應用此設置將重啟App"
|
||||
}
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
{
|
||||
"msgTitle": "友情提示",
|
||||
"msgUpgradeFail": "升级失败",
|
||||
"msgDownloading": "正在下载",
|
||||
"msgLatestVersion": "已经是最新版本了!",
|
||||
"msgCancel": "您已取消操作!",
|
||||
"msgLoginSuccess": "登录成功!",
|
||||
"msgDelete": "删除成功",
|
||||
"msgSetSuccess": "设置成功",
|
||||
"msgBottom": "到底了,看看别的吧",
|
||||
"msgNoMoreData": "暂无数据!",
|
||||
"msgSetPasswordSuccess": "密码设置成功,进入程序中!",
|
||||
"msgAddUser": "暂无成员,请先添加",
|
||||
"verifyNickName": "请输入昵称",
|
||||
"verifyNotOptional": "未来日期不可选",
|
||||
"verifyDate": "请选择测量日期",
|
||||
"verifyBirthday": "请选择出生日期",
|
||||
"verifyHeight": "请输入身高",
|
||||
"verifyWeight": "请输入体重",
|
||||
"verifyGender": "请选择性别",
|
||||
"verifyBontrast": "请选择数据",
|
||||
"verifyBodyDate": "请选择正确的时间",
|
||||
"verifyRecord": "请输入",
|
||||
"verifyPicker": "请选择",
|
||||
"verifyAccount": "请输入正确的手机号或邮箱",
|
||||
"verifyEmail": "请输入邮箱",
|
||||
"verifyEmailCorrect": "请输入正确的邮箱",
|
||||
"verifyMobile": "请输入手机号",
|
||||
"verifyMobileCorrect": "请输入正确的手机号",
|
||||
"verifyCode": "请输入验证码",
|
||||
"verifyPassword": "请输入密码",
|
||||
"verifyPasswordTwo": "请输入确认密码",
|
||||
"verifyPasswordCorrect": "请确认两次密码填写一致",
|
||||
"verifyAgreement": "请先确认并勾选协议",
|
||||
"verifyOutLogin": "是否退出登录?",
|
||||
"verifyDeleteUser": "是否删除该成员?",
|
||||
"verifyDeleteHistory": "是否删除当前测量记录?",
|
||||
"verifyDeleteAccount": "删除成功后,该账号的所有关联信息将被清空且无法找回,是否删除?",
|
||||
"btnConfirm": "确认",
|
||||
"btnSubmit": "提交",
|
||||
"btnSancellation": "取消",
|
||||
"btnContinue": "继续",
|
||||
"btnBack": "返回",
|
||||
"btnDelete": "删除",
|
||||
"ConnectionTimeout": "连接超时,点击重新连接",
|
||||
"Measuring": "测量中,请将食物放到秤上",
|
||||
"Weight": "重量",
|
||||
"RecordWeight": "请输入食物重量",
|
||||
"SearchBluetooth": "蓝牙搜索中",
|
||||
"Remeasure": "数据异常,请重新测量!",
|
||||
"reset": "数据异常,请清零后重新测量!",
|
||||
"Disconnect": "断开连接",
|
||||
"remeasure": "重新测量",
|
||||
"resetBtn": "清零",
|
||||
"UnitBtn": "单位",
|
||||
"titleHome": "首页",
|
||||
"titleMenu": "菜谱",
|
||||
"titleMenuAdd": "添加食谱",
|
||||
"titleMenuSearch": "搜索菜谱",
|
||||
"titleCount": "计食",
|
||||
"titleCountList": "食材库",
|
||||
"titleCustomKcal": "自定义卡路里",
|
||||
"titleEveryMeal": "餐食详情",
|
||||
"titleCountSearch": "食材搜索",
|
||||
"titleeveryDay": "营养分析",
|
||||
"titleMe": "我的",
|
||||
"titleDetail": "详情",
|
||||
"titleBody": "目标",
|
||||
"titleHistory": "饮食记录",
|
||||
"titlePhone": "绑定手机号",
|
||||
"titleEmail": "绑定邮箱",
|
||||
"titlePasswordEdit": "修改密码",
|
||||
"titleSet": "设置",
|
||||
"titleDate": "日期",
|
||||
"titleMember": "资料",
|
||||
"titleManage": "成员管理",
|
||||
"titleManageAdd": "添加成员",
|
||||
"titleAboutUs": "关于我们",
|
||||
"titleSetPassword": "设置密码",
|
||||
"titlePassword": "密码",
|
||||
"titleConfirmPassword": "确认密码",
|
||||
"titleForgotPassword": "忘记密码",
|
||||
"titleCode": "验证码",
|
||||
"titleLanguage": "语言",
|
||||
"titleSendCode": "获取验证码",
|
||||
"titleSendCodeRetry": "S后重发",
|
||||
"titleLogin": "登录",
|
||||
"titleRegister": "注册",
|
||||
"titleToggleLogin": "切换登录",
|
||||
"titleAccountText": "手机号/邮箱",
|
||||
"titleAgreementText": "阅读并同意",
|
||||
"titleAgreementContntText": "隐私协议",
|
||||
"titleVersionUpdate": "版本更新",
|
||||
"titleNewVersion": "新版本",
|
||||
"infoActivityCoefficient": "活动系数",
|
||||
"infoPersonalProfile": "个人资料",
|
||||
"infoMyRecipes": "我的菜谱",
|
||||
"infoMyCollection": "我的收藏",
|
||||
"infoAvatar": "头像",
|
||||
"infoNickname": "昵称",
|
||||
"infoMobile": "手机号",
|
||||
"infoEmail": "邮箱",
|
||||
"infoAge": "年龄",
|
||||
"infoAgeunit": "岁",
|
||||
"infoGender": "性别",
|
||||
"infoMan": "男",
|
||||
"infoWoman": "女",
|
||||
"infoUnknown": "未知",
|
||||
"infoBirthday": "出生日期",
|
||||
"infoHeight": "身高",
|
||||
"infoWeight": "体重",
|
||||
"btnEdit": "编辑",
|
||||
"btnAdd": "添加",
|
||||
"btnDetail": "查看详情",
|
||||
"btnDeleteAccount": "删除账号",
|
||||
"btnLogOut": "退出登录",
|
||||
"countIntake": "摄入",
|
||||
"countCalorieIntake": "热量摄入",
|
||||
"countMealdetails": "餐食详情",
|
||||
"countAddFood": "添加食物",
|
||||
"countNutritionalProportion": "营养占比",
|
||||
"countComponentStatistics": "成分统计",
|
||||
"countCalorieAnalysis": "卡路里分析",
|
||||
"countNutrientElementEnergyProportion": "营养元素能量占比",
|
||||
"countNutritionClassification": "营养分类",
|
||||
"countNutritionElementRankingList": "营养元素排行榜",
|
||||
"countFoodTypes": "食物类型",
|
||||
|
||||
"total": "共",
|
||||
"records": "条记录",
|
||||
"Search": "搜索",
|
||||
"VoiceSearch": "语音搜索",
|
||||
"Save": "保存",
|
||||
"noMoreData": "没有更多数据了",
|
||||
"HistoricalSearch": "历史搜索",
|
||||
"wantSearch": "猜你想搜",
|
||||
"verifyCalorie": "请输入卡路里",
|
||||
"kcal": "卡路里",
|
||||
"countNoFood": "暂无食物",
|
||||
"msgLoginTips": "登录后查看更多",
|
||||
"Nutrients": "营养素",
|
||||
"Content": "含量",
|
||||
"CaloriesAndnutrients": "热量和营养",
|
||||
"ImproveInformation": "完善信息",
|
||||
"WhetherTodelete": "是否删除",
|
||||
"BusinessCooperation": "商务合作",
|
||||
"verifyActivityCoefficient": "请选择活动系数",
|
||||
"devicesTips":"设备未登记,请联系出售方进行系统认证",
|
||||
"kg": "千克",
|
||||
"g": "克",
|
||||
"oz": "盎司",
|
||||
"ml": "毫升",
|
||||
"lb": "磅",
|
||||
"milkml": "milkml",
|
||||
"Waterml": "Waterml",
|
||||
"floz": "floz",
|
||||
"lboz": "lboz",
|
||||
"st": "st:lb"
|
||||
}
|
||||
22
main.js
22
main.js
|
|
@ -13,16 +13,25 @@ Vue.prototype.$http = http;
|
|||
//接口
|
||||
import model from '@/tools/model.js'
|
||||
Vue.prototype.$model = model;
|
||||
//模拟数据
|
||||
import json from '@/content.json'
|
||||
Vue.prototype.$json = json;
|
||||
// 语言
|
||||
import messages from '@/language/index.js'
|
||||
|
||||
|
||||
let i18nConfig = {
|
||||
locale: uni.getLocale(),
|
||||
messages
|
||||
}
|
||||
|
||||
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
Vue.use(VueI18n)
|
||||
const i18n = new VueI18n(i18nConfig)
|
||||
Vue.config.productionTip = false
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
i18n,
|
||||
...App
|
||||
})
|
||||
app.$mount()
|
||||
|
|
@ -32,10 +41,15 @@ app.$mount()
|
|||
import {
|
||||
createSSRApp
|
||||
} from 'vue'
|
||||
import {
|
||||
createI18n
|
||||
} from 'vue-i18n'
|
||||
const i18n = createI18n(i18nConfig)
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
app.use(i18n)
|
||||
return {
|
||||
app
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
// #endif
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"name" : "kitchendDevice",
|
||||
"name" : "Wendu",
|
||||
"appid" : "__UNI__20604F1",
|
||||
"description" : "",
|
||||
"versionName" : "2.0.0",
|
||||
"versionCode" : 200,
|
||||
"versionName" : "1.1.1",
|
||||
"versionCode" : 111,
|
||||
"transformPx" : false,
|
||||
"sassImplementationName" : "node-sass",
|
||||
/* 5+App特有相关 */
|
||||
|
|
@ -18,7 +18,9 @@
|
|||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {},
|
||||
"modules" : {
|
||||
"Bluetooth" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
|
|
@ -42,10 +44,51 @@
|
|||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
"ios" : {
|
||||
"privacyDescription" : {
|
||||
"NSBluetoothPeripheralUsageDescription" : "使用蓝牙与外设通信",
|
||||
"NSBluetoothAlwaysUsageDescription" : "需要蓝牙权限来连接设备"
|
||||
},
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"speech" : {}
|
||||
},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||
"ipad" : {
|
||||
"app" : "unpackage/res/icons/76x76.png",
|
||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||
"notification" : "unpackage/res/icons/20x20.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||
"settings" : "unpackage/res/icons/29x29.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone" : {
|
||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen" : {
|
||||
"useOriginalMsgbox" : true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -84,5 +127,10 @@
|
|||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "2"
|
||||
"vueVersion" : "2",
|
||||
"locale" : "zh-Hans",
|
||||
"fallbackLocale" : "zh-Hans",
|
||||
"h5" : {
|
||||
"template" : "index.html"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="title">
|
||||
自定义卡路里量
|
||||
{{$t('titleCustomKcal')}}
|
||||
<text class="desc">{{suggestion_kcal_range_val}}</text>
|
||||
</view>
|
||||
<view class="input">
|
||||
<input type="digit" placeholder="请输入" v-model="kcal" />
|
||||
<text>千卡</text>
|
||||
<input type="digit" :placeholder="$t('verifyCalorie')" v-model="kcal" />
|
||||
<text>kcal</text>
|
||||
</view>
|
||||
<view class="btn" @click="handlesub">确认修改</view>
|
||||
<view class="btn" @click="handlesub">{{$t('btnSubmit')}}</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -28,13 +28,16 @@
|
|||
...mapState(["user"]),
|
||||
},
|
||||
onLoad(options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('titleSet')
|
||||
})
|
||||
this.suggestion_kcal_range_val = options.suggestion_kcal_range_val
|
||||
},
|
||||
methods: {
|
||||
handlesub() {
|
||||
let that = this
|
||||
if (that.kcal == '' || Number(that.kcal) <= 0) {
|
||||
that.$tools.msg("请输入卡路里")
|
||||
that.$tools.msg(that.$t('verifyCalorie'))
|
||||
return
|
||||
}
|
||||
that.$model.getCountSetUserKcal({
|
||||
|
|
@ -42,7 +45,7 @@
|
|||
set_kcal: that.kcal
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
that.$tools.msg("设置成功")
|
||||
that.$tools.msg(that.$t('msgSetSuccess'))
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
url: '/pages/count/count'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<!-- 早午晚餐 -->
|
||||
<view class="everyDay">
|
||||
<view class="title">
|
||||
<view><text class="quan"></text>卡路里分析</view>
|
||||
<view><text class="quan"></text>{{$t("countCalorieAnalysis")}}</view>
|
||||
</view>
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts type="ring" :opts="opts" :chartData="chartData" :cHeight="320" :cWidth="320" />
|
||||
|
|
@ -23,15 +23,15 @@
|
|||
<!--营养元素分析 -->
|
||||
<view class="everyDay">
|
||||
<view class="title">
|
||||
<view><text class="quan"></text>营养元素能量占比</view>
|
||||
<view><text class="quan"></text>{{$t("countNutrientElementEnergyProportion")}}</view>
|
||||
</view>
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts type="ring" :opts="opts2" :chartData="chartData2" :cHeight="320" :cWidth="320" />
|
||||
</div>
|
||||
<view class="foodtools">
|
||||
<view class="top">
|
||||
<view>营养分类</view>
|
||||
<view>摄入</view>
|
||||
<view>{{$t("countNutritionClassification")}}</view>
|
||||
<view>{{$t("countIntake")}}</view>
|
||||
</view>
|
||||
<view class="type">
|
||||
<view class="name">
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
<!--营养元素排行榜 -->
|
||||
<view class="everyDay">
|
||||
<view class="title">
|
||||
<view><text class="quan"></text>营养元素排行榜</view>
|
||||
<view><text class="quan"></text>{{$t("countNutritionElementRankingList")}}</view>
|
||||
</view>
|
||||
<view class="foodtools rank_list">
|
||||
<view class="topname">{{details.carbohydrate.name}}</view>
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
<view class="name">
|
||||
<image :src="item.icon"></image>
|
||||
<image :src="item.pic_url" class="pic" v-if="item.pic_url"></image>
|
||||
<view>{{item.name?item.name:'--'}}</view>
|
||||
<view class="date overflow">{{item.name?item.name:'--'}}</view>
|
||||
</view>
|
||||
<view>{{item.weight||0}}g</view>
|
||||
</view>
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
<view class="name">
|
||||
<image :src="item.icon"></image>
|
||||
<image :src="item.pic_url" class="pic" v-if="item.pic_url"></image>
|
||||
<view>{{item.name?item.name:'--'}}</view>
|
||||
<view class="date overflow">{{item.name?item.name:'--'}}</view>
|
||||
</view>
|
||||
<view>{{item.weight||0}}g</view>
|
||||
</view>
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
<view class="name">
|
||||
<image :src="item.icon"></image>
|
||||
<image :src="item.pic_url" class="pic" v-if="item.pic_url"></image>
|
||||
<view>{{item.name?item.name:'--'}}</view>
|
||||
<view class="date overflow">{{item.name?item.name:'--'}}</view>
|
||||
</view>
|
||||
<view>{{item.weight||0}}g</view>
|
||||
</view>
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -170,6 +170,9 @@
|
|||
onLoad(options) {
|
||||
let that = this
|
||||
that.page = options.page
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('titleeveryDay')
|
||||
})
|
||||
that.handleList()
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -320,6 +323,10 @@
|
|||
border-bottom: none;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.date {
|
||||
width: calc(100% - 30px);
|
||||
}
|
||||
}
|
||||
|
||||
.top {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="content" >
|
||||
<view class="content">
|
||||
<view class="content_box">
|
||||
<view class="box">
|
||||
<!-- 类型 -->
|
||||
|
|
@ -12,12 +12,11 @@
|
|||
<!-- 成分统计 -->
|
||||
<view class="everyDay">
|
||||
<view class="title">
|
||||
<view><text class="quan"></text>成分统计</view>
|
||||
<view><text class="quan"></text>{{$t('countComponentStatistics')}}</view>
|
||||
</view>
|
||||
<view class="progress">
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts type="ring" :opts="opts" canvasId="foodCharts" :chartData="chartData"
|
||||
:cHeight="280" :cWidth="280" :canvas2d="true" />
|
||||
<qiun-data-charts type="ring" :opts="opts" canvasId="foodCharts" :chartData="chartData" :canvas2d="true" />
|
||||
</div>
|
||||
<view class="info" v-if="info.nutrients_four">
|
||||
<view class="info-item" v-for="(item,index) in info.nutrients_four.slice(1)" :key="index">
|
||||
|
|
@ -25,8 +24,10 @@
|
|||
<view class="color" :style="{'background-color':`${item.color}`}"></view>
|
||||
<view>{{item.name}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>{{item.value}}{{item.unit}}<text>|</text>{{item.proportion}}%</view>
|
||||
<view class="value">
|
||||
<text>{{item.value}}{{item.unit}}</text>
|
||||
<text>|</text>
|
||||
<text>{{item.proportion}}%</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -36,7 +37,7 @@
|
|||
<view class="foodtools">
|
||||
<view class="type">
|
||||
<view class="title">
|
||||
<view><text class="quan"></text>食物类型</view>
|
||||
<view><text class="quan"></text>{{$t('countFoodTypes')}}</view>
|
||||
</view>
|
||||
<view class="list" v-if="info.list.length">
|
||||
<uni-swipe-action>
|
||||
|
|
@ -45,7 +46,7 @@
|
|||
<view class="item" @click="showFoodDetail(ite)">
|
||||
<image :src="ite.pic_url" mode="aspectFill"></image>
|
||||
<view class="weight">
|
||||
<view>{{ite.name}}</view>
|
||||
<view class="overflow bold">{{ite.name}}</view>
|
||||
<view class="size12 c999">{{ite.weight}}<text>|</text>{{ite.val}}kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -54,62 +55,58 @@
|
|||
</view>
|
||||
<view v-else class="nolist">
|
||||
<image src="/static/none.png"></image>
|
||||
<view>暂无食物</view>
|
||||
<view>{{$t('countNoFood')}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 添加食物 -->
|
||||
<view class="add" @click="handleAddFood()">
|
||||
<text>+</text>添加食物
|
||||
<text>+</text>{{$t('countAddFood')}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 营养含量分析 -->
|
||||
<view v-if="drawerVisible" class="drawerVisible">
|
||||
<view class="bgVisible" @click="handleDrawerClose"></view>
|
||||
<view class="infoVisible">
|
||||
<scroll-view style="height: 100%;" scroll-y="true">
|
||||
<view class="foodDetail">
|
||||
<view class="foodInfo">
|
||||
<image :src="activeFoodDetail.pic_url" mode="aspectFill"></image>
|
||||
<view class="info">
|
||||
<view class="name">{{activeFoodDetail.name}}</view>
|
||||
<view class="kcal">{{activeFoodDetail.val}}千卡</view>
|
||||
<uni-drawer ref="showRight" mode="right">
|
||||
<scroll-view style="height: 100%;" scroll-y="true">
|
||||
<view class="foodDetail">
|
||||
<view class="foodInfo">
|
||||
<image :src="activeFoodDetail.pic_url" mode="aspectFill"></image>
|
||||
<view class="info">
|
||||
<view class="name">{{activeFoodDetail.name}}</view>
|
||||
<view class="kcal">{{activeFoodDetail.val}}kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="foodContent">
|
||||
<view class="title">{{$t('CaloriesAndnutrients')}}</view>
|
||||
<view class="progress">
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts type="ring" :opts="opts2" :chartData="chartData2" :cHeight="280"
|
||||
:cWidth="280" />
|
||||
</div>
|
||||
<view class="info" v-if="activeFoodDetail.nutrients_four">
|
||||
<view class="info-item" v-for="(item,index) in activeFoodDetail.nutrients_four.slice(1)"
|
||||
:key="index">
|
||||
<view class="color" :style="{'background-color':`${item.color}`}">
|
||||
</view>
|
||||
<view>{{item.name}}:{{item.proportion}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="foodContent">
|
||||
<view class="title">热量和营养</view>
|
||||
<view class="progress">
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts v-if="chartVisible" type="ring" :opts="opts2"
|
||||
:chartData="chartData2" :cHeight="280" :cWidth="280" />
|
||||
</div>
|
||||
<view class="info" v-if="activeFoodDetail.nutrients_four">
|
||||
<view class="info-item"
|
||||
v-for="(item,index) in activeFoodDetail.nutrients_four.slice(1)" :key="index">
|
||||
<view class="color" :style="{'background-color':`${item.color}`}">
|
||||
</view>
|
||||
<view>{{item.name}}:{{item.proportion}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<text>营养素</text>
|
||||
<text>{{activeFoodDetail.weight}}含量</text>
|
||||
</view>
|
||||
<view class="foodDetailList">
|
||||
<view class="foodDetailItem" v-for="(item,index) in activeFoodDetail.nutrients_list"
|
||||
:key="index">
|
||||
<view class="name">{{item.name_ch}}</view>
|
||||
<view class="value">{{item.value}}{{item.unit}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<text>{{$t('Nutrients')}}</text>
|
||||
<text>{{activeFoodDetail.weight}}{{$t('Content')}}</text>
|
||||
</view>
|
||||
<view class="foodDetailList">
|
||||
<view class="foodDetailItem" v-for="(item,index) in activeFoodDetail.nutrients_list"
|
||||
:key="index">
|
||||
<view class="name">{{item.name_ch}}</view>
|
||||
<view class="value">{{item.value}}{{item.unit}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</uni-drawer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -118,7 +115,7 @@
|
|||
mapState
|
||||
} from "vuex";
|
||||
let next = 0
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -137,10 +134,8 @@
|
|||
chartData: {},
|
||||
chartData2: {},
|
||||
activeFoodDetail: {},
|
||||
drawerVisible: false,
|
||||
chartVisible: false, // 单独控制图表显示
|
||||
actionOptions: [{
|
||||
text: '删除',
|
||||
text: this.$t('btnDelete'),
|
||||
style: {
|
||||
backgroundColor: '#dd524d',
|
||||
borderRadius: '10rpx'
|
||||
|
|
@ -171,6 +166,9 @@
|
|||
that.page = options.page
|
||||
that.index = options.index
|
||||
that.bgimage = that.foodItem[options.index].icon_bg
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('titleEveryMeal')
|
||||
})
|
||||
that.handleInfo()
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -209,7 +207,7 @@
|
|||
let that = this
|
||||
let chart_data = []
|
||||
this.activeFoodDetail = item
|
||||
this.drawerVisible = true;
|
||||
this.$refs.showRight.open();
|
||||
this.opts2.color = []
|
||||
for (let i = 1; i < item.nutrients_four.length; ++i) {
|
||||
this.opts2.color.push(item.nutrients_four[i].color)
|
||||
|
|
@ -224,29 +222,21 @@
|
|||
data: chart_data
|
||||
}]
|
||||
}));
|
||||
that.$nextTick(() => {
|
||||
// 延迟显示图表,确保容器已渲染
|
||||
setTimeout(() => {
|
||||
that.chartVisible = true
|
||||
}, 100)
|
||||
})
|
||||
},
|
||||
handleDrawerClose() {
|
||||
// 先隐藏图表,再隐藏抽屉
|
||||
this.chartVisible = false
|
||||
this.drawerVisible = false;
|
||||
},
|
||||
// 添加食物
|
||||
handleAddFood() {
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/count/search?name=" + this.info.name + "&time=" + this.time
|
||||
url: "/pageTwo/count/search?index=" + this.index + "&time=" + this.time
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url: "/pageTwo/count/search?name=" + this.info.name + "&time=" + this.time
|
||||
// })
|
||||
},
|
||||
// 删除食材
|
||||
delAcitionItem(item) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
content: `是否删除[${item.name}]?`,
|
||||
content: that.$t("WhetherTodelete") + item.name,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.$model.delCEatAction({
|
||||
|
|
@ -319,7 +309,7 @@
|
|||
|
||||
.everyDay {
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
padding: 10px 0 10px;
|
||||
border-radius: 10px;
|
||||
margin-top: 15px;
|
||||
height: auto;
|
||||
|
|
@ -333,8 +323,7 @@
|
|||
position: relative;
|
||||
width: 280rpx;
|
||||
height: 280rpx;
|
||||
margin-top: -30rpx;
|
||||
margin-left: -15px;
|
||||
margin-left: -5px;
|
||||
}
|
||||
|
||||
.info {
|
||||
|
|
@ -342,7 +331,7 @@
|
|||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
font-size: 24rpx;
|
||||
width: calc(100% - 270rpx);
|
||||
width: calc(100% - 300rpx);
|
||||
height: 200rpx;
|
||||
|
||||
.info-item {
|
||||
|
|
@ -356,11 +345,25 @@
|
|||
align-items: center;
|
||||
}
|
||||
|
||||
text {
|
||||
color: #ccc;
|
||||
margin: 0px 5px;
|
||||
.value {
|
||||
:nth-child(1) {
|
||||
width: 50px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
:nth-child(2) {
|
||||
color: #ccc;
|
||||
margin: 0px 2px;
|
||||
}
|
||||
|
||||
:nth-child(3) {
|
||||
width: 50px;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.color {
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
|
|
@ -431,7 +434,8 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-left: 10px;
|
||||
width: calc(100% - 110rpx);
|
||||
margin-left: 20rpx;
|
||||
|
||||
text {
|
||||
margin: 0 10px;
|
||||
|
|
@ -465,9 +469,4 @@
|
|||
font-weight: bold;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
|
||||
.no-scroll {
|
||||
height: 80vh !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -248,7 +248,7 @@
|
|||
import blueTooth from "../../components/bluetooth_food.vue"
|
||||
import FoodItem from "../../components/food_item.vue"
|
||||
// import ruler from "../../components/select-ruler/select-ruler.vue"
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
const plugin = requirePlugin("WechatSI")
|
||||
export default {
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<view class="serachBox">
|
||||
<view class="type">
|
||||
<picker mode="selector" @change="changeClickType" :range="foodItem" range-key="name">
|
||||
<picker mode="selector" @change="changeClickType" :range="foodItem" range-key="name" :value="index">
|
||||
<view>
|
||||
{{foodName}}
|
||||
<image src="/static/arrow-down.png"></image>
|
||||
|
|
@ -13,11 +13,11 @@
|
|||
</view>
|
||||
<view class="serach-box">
|
||||
<view class="searchInput">
|
||||
<input placeholder="请输入..." class="city-serach-input" v-model="search_value" />
|
||||
<input :placeholder="$t('verifyRecord')" class="city-serach-input" v-model="search_value" />
|
||||
<icon v-if="search_value" class="iconfont icon-error" @click="handlecolse" size="30"></icon>
|
||||
</view>
|
||||
<view class="searchBtn">
|
||||
<view @click="handleSerach">搜索</view>
|
||||
<view @click="handleSerach">{{$t("Search")}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<view class="content-box" v-if="!search_list.length">
|
||||
<view v-if="history_food.length" class="search-history">
|
||||
<view class="title">
|
||||
<view class="quan mr-5"></view>历史搜索
|
||||
<view class="quan mr-5"></view>{{$t("HistoricalSearch")}}
|
||||
</view>
|
||||
<view class="button-container" @click="showAll =! showAll" v-if="history_food.length>10">
|
||||
<image :src="showAll?'/static/arrow-up.png':'/static/arrow-down.png'"></image>
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
</view>
|
||||
<view class="popular-container">
|
||||
<view class="title">
|
||||
<view class="quan mr-5"></view>猜你想搜
|
||||
<view class="quan mr-5"></view>{{$t("wantSearch")}}
|
||||
</view>
|
||||
<view class="popular-food-item" v-for="(ite,index) in popular_food" :key="index">
|
||||
<view class="food-title">{{ite.title}}</view>
|
||||
|
|
@ -64,15 +64,11 @@
|
|||
<image src="/static/arrow-down.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mic-icon" @touchstart="onVoiceTouchStart" @touchend="onVoiceTouchEnd"
|
||||
<!-- <view class="mic-icon" @touchstart="onVoiceTouchStart" @touchend="onVoiceTouchEnd"
|
||||
@touchcancel="cancelRecording">
|
||||
<uni-icons type="mic-filled" size="20" color="#fff"></uni-icons>
|
||||
语音搜索
|
||||
</view>
|
||||
<view class="mic-icon mic-icon2" @click="scanCode">
|
||||
<uni-icons type="scan" size="20" color="#fff"></uni-icons>
|
||||
扫一扫
|
||||
</view>
|
||||
{{$t("VoiceSearch")}}
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 搜索列表 -->
|
||||
<view class="search_list" v-if="search_list.length">
|
||||
|
|
@ -83,7 +79,7 @@
|
|||
<text>100g/{{ite.kcal}}kcal</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="endtext" v-if="!lastPage || page >= lastPage">—— 到底了,看看别的吧 ——</view>
|
||||
<view class="endtext" v-if="!lastPage || page >= lastPage">—— {{$t("msgBottom")}} ——</view>
|
||||
</view>
|
||||
<!-- 购物车弹框 -->
|
||||
<view class="wrapper activeList" v-if="isShop">
|
||||
|
|
@ -94,16 +90,15 @@
|
|||
<view class="jishiqi">
|
||||
<view class="left">
|
||||
<view class="chart-wrap">
|
||||
<qiun-data-charts type="arcbar" :chartData="chartData" :cHeight="280" :cWidth="280"
|
||||
:canvas2d="true" canvasId="searchCharts" />
|
||||
<qiun-data-charts type="arcbar" :chartData="chartData" :cHeight="320" :cWidth="320" />
|
||||
<view class="center">
|
||||
摄入
|
||||
{{$t("countIntake")}}
|
||||
<text>{{foodInfo[0].today_intake}}</text>
|
||||
<view class="unit">Kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mubiao">
|
||||
目标:<text>{{foodInfo[0].suggestion}}</text>kcal
|
||||
{{$t("titleBody")}}:<text>{{foodInfo[0].suggestion}}</text>kcal
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
|
|
@ -136,8 +131,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="box_list_item" v-if="ActiveList.length">
|
||||
<view class="length">共<text
|
||||
class="red">{{ActiveList.filter(ite => ite.meals_type == foodName).length}}</text>条记录
|
||||
<view class="length">{{$t("total")}}<text
|
||||
class="red">{{ActiveList.filter(ite => ite.meals_type == foodName).length}}</text>{{$t("records")}}
|
||||
</view>
|
||||
<view class="item" v-for="(ite,ind) in ActiveList" :key="ind"
|
||||
v-if="ite.meals_type==foodName">
|
||||
|
|
@ -154,7 +149,7 @@
|
|||
</view>
|
||||
<view v-else class="nolist list">
|
||||
<icon class="iconfont icon-wancan"></icon>
|
||||
<text>还没有添加食物</text>
|
||||
<text>{{$t('countNoFood')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -172,7 +167,7 @@
|
|||
<image :src="activeType.pic_url" mode="aspectFill"></image>
|
||||
<view class="info">
|
||||
<view class="name">{{activeType.name}}</view>
|
||||
<view class="kcal">{{activeType.kcal}}千卡/100克</view>
|
||||
<view class="kcal">{{activeType.kcal}}kcal/100g</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -184,33 +179,38 @@
|
|||
v-if="item.color != ''"></view>
|
||||
<text>{{item.name}}({{unitConversion(item.unit)}})</text>
|
||||
</view>
|
||||
<view class="value">
|
||||
{{Number((activeType.weight)/100 * item.value).toFixed(1) }}
|
||||
<view class="value">{{ Number(activeType.weight/100 * item.value).toFixed(1) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 蓝牙称重 -->
|
||||
<view class="blue-tooth" v-if="isBle">
|
||||
<blue-tooth @handleBle="handleBle" :weightKcal="weightKcal"
|
||||
@realTimeWeight="realTimeWeight" :btnType="'2'"></blue-tooth>
|
||||
@realTimeWeight="realTimeWeight" :btnType="btnType"></blue-tooth>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 营养分析 -->
|
||||
<view class="foodDetail">
|
||||
<view class="foodContent">
|
||||
<view class="tips">
|
||||
<text>营养素</text>
|
||||
<text>{{(activeType.weight).toFixed(1)}}克含量</text>
|
||||
<text>{{$t('Nutrients')}}</text>
|
||||
<text>{{Math.floor(activeType.weight)}}g{{$t('Content')}}</text>
|
||||
</view>
|
||||
<view class="foodDetailList">
|
||||
<view class="foodDetailItem" v-for="(item,index) in activeType.nutrients_list"
|
||||
:key="index">
|
||||
<view class="name">{{item.name_ch}}</view>
|
||||
<view class="value">
|
||||
{{Number((activeType.weight)/100 * item.value).toFixed(1)}}{{item.unit}}
|
||||
{{Number(item.value*activeType.weight/100).toFixed(2)}}{{item.unit}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 数据来源 -->
|
||||
<view class="text">
|
||||
<view v-for="(item,index) in configInfo.source_quote.food_details">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
|
@ -232,15 +232,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- s扫一扫弹框 -->
|
||||
<view class="wrapper wrapperScan" v-if="showScanCodeDlg">
|
||||
<view class="auto-search-dialog" @click="showScanCodeDlg = false">
|
||||
<view class="auto-search-inner">
|
||||
<text>提示</text>
|
||||
{{ScanCodeMsg}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -248,10 +239,10 @@
|
|||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
const plugin = requirePlugin("WechatSI")
|
||||
// const plugin = requirePlugin("WechatSI")
|
||||
import search from "../../components/search.vue"
|
||||
import blueTooth from "../../components/bluetooth_food.vue"
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -263,6 +254,7 @@
|
|||
},
|
||||
foodInfo: [],
|
||||
time: "",
|
||||
btnType: 2,
|
||||
page: 1,
|
||||
foodName: "",
|
||||
showAll: false,
|
||||
|
|
@ -271,14 +263,13 @@
|
|||
isShop: false,
|
||||
lastPage: "",
|
||||
isBle: true,
|
||||
weightKcal: "",
|
||||
weightKcal: 0,
|
||||
search_value: '',
|
||||
ActiveList: [],
|
||||
activeType: {},
|
||||
voiceManager: null,
|
||||
ScanCodeMsg: "",
|
||||
showAutoSearchDlg: false,
|
||||
showScanCodeDlg: false
|
||||
index: 0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -301,7 +292,11 @@
|
|||
onLoad(options) {
|
||||
let that = this
|
||||
that.time = options.time
|
||||
that.foodName = options.name
|
||||
that.index = options.index
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('titleCountSearch')
|
||||
})
|
||||
that.foodName = that.foodItem[that.index].name
|
||||
},
|
||||
watch: {
|
||||
bleValue: {
|
||||
|
|
@ -312,25 +307,25 @@
|
|||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
that.voiceManager = plugin.getRecordRecognitionManager()
|
||||
that.voiceManager.onStop = function(res) {
|
||||
that.search_value = res.result.replace('。', '')
|
||||
that.handleSerach()
|
||||
}
|
||||
that.voiceManager.onError = function(res) {
|
||||
console.error("error msg", res.retcode)
|
||||
}
|
||||
that.voiceManager.stop()
|
||||
// that.voiceManager = plugin.getRecordRecognitionManager()
|
||||
// that.voiceManager.onStop = function(res) {
|
||||
// that.search_value = res.result.replace('。', '')
|
||||
// that.handleSerach()
|
||||
// }
|
||||
// that.voiceManager.onError = function(res) {
|
||||
// console.error("error msg", res.retcode)
|
||||
// }
|
||||
// that.voiceManager.stop()
|
||||
},
|
||||
onReachBottom() {
|
||||
let that = this
|
||||
if (!this.lastPage || this.page >= this.lastPage) {
|
||||
uni.showToast({
|
||||
title: '没有更多数据!',
|
||||
title: this.$t('noMoreData'),
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
|
|
@ -364,34 +359,6 @@
|
|||
}
|
||||
// #endif
|
||||
},
|
||||
scanCode() {
|
||||
let that = this
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
success: function(res) {
|
||||
console.log('条码类型:' + res.scanType);
|
||||
console.log('条码内容:' + res.result);
|
||||
uni.showLoading({
|
||||
title: '搜索中'
|
||||
});
|
||||
that.$model.getPhotoSearch({
|
||||
barcode: res.result,
|
||||
}).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.code != 0) {
|
||||
that.ScanCodeMsg = res.msg
|
||||
that.showScanCodeDlg = true
|
||||
return
|
||||
}
|
||||
that.handleDetail(res.data)
|
||||
})
|
||||
},
|
||||
fail: res => {
|
||||
that.$api.msg("您已取消操作")
|
||||
return
|
||||
}
|
||||
});
|
||||
},
|
||||
// 购物车早午晚餐切换
|
||||
handleToggle(name) {
|
||||
this.search_value = ""
|
||||
|
|
@ -406,24 +373,26 @@
|
|||
})
|
||||
},
|
||||
unitConversion(unit) {
|
||||
if (unit == 'kcal') {
|
||||
return '千卡'
|
||||
if (unit == 'kg') {
|
||||
return this.$t("kg")
|
||||
} else if (unit == 'g') {
|
||||
return '克'
|
||||
return this.$t("g")
|
||||
} else if (unit == 'lb') {
|
||||
return this.$t("lb")
|
||||
} else if (unit == 'oz') {
|
||||
return this.$t("oz")
|
||||
} else if (unit == 'ml') {
|
||||
return this.$t("ml")
|
||||
}
|
||||
return unit
|
||||
},
|
||||
convertToGrams(value, fromUnit) {
|
||||
const conversionFactors = {
|
||||
'lb': 453.59237, // 1磅 = 453.59237克
|
||||
'oz': 28.349523125, // 1盎司 = 28.349523125克
|
||||
'lb': 453.59, // 1磅 = 453.59237克
|
||||
'oz': 28.35, // 1盎司 = 28.349523125克
|
||||
'kg': 1000, // 1公斤 = 1000克
|
||||
'g': 1,
|
||||
'ml': 1,
|
||||
'斤': 500,
|
||||
'Waterml': 1,
|
||||
'milkml': 1.03
|
||||
// "stlb": "floz": "lboz":
|
||||
'ml': 1
|
||||
};
|
||||
|
||||
if (!conversionFactors.hasOwnProperty(fromUnit)) {
|
||||
|
|
@ -438,22 +407,20 @@
|
|||
that.isBle = true
|
||||
that.isShop = false
|
||||
that.IsWeight = true
|
||||
that.showScanCodeDlg = false
|
||||
that.showAutoSearchDlg = false
|
||||
that.activeType = ite
|
||||
that.weightKcal = ite.kcal
|
||||
that.weightKcal = Number(ite.kcal)
|
||||
if (that.bleValue.serviceId != "") {
|
||||
that.realTimeWeight(that.bleValue.countWeight, that.bleValue.unit)
|
||||
if (that.bleValue.type == 2 && Number(that.bleValue.countWeight) > 0) {
|
||||
that.handletoggleUnit(that.bleValue.countWeight, that.bleValue.unit, ite.nutrients_four)
|
||||
}
|
||||
} else {
|
||||
let weight = Number(that.bleValue.countWeight) > 0 ? Number(that.bleValue.countWeight) : 100
|
||||
that.$store.commit("changeBluetoothValue", {
|
||||
countWeight: weight,
|
||||
countWeight: 100,
|
||||
unit: that.bleValue.unit
|
||||
})
|
||||
that.realTimeWeight(weight, that.bleValue.unit)
|
||||
that.realTimeWeight(100, that.bleValue.unit)
|
||||
}
|
||||
},
|
||||
// 下发营养含量
|
||||
|
|
@ -472,7 +439,7 @@
|
|||
dataArray.forEach((value, index) => {
|
||||
uint8Array[index] = value;
|
||||
});
|
||||
console.log("营养数据", arrayBuffer)
|
||||
console.log("arrayBuffer", arrayBuffer)
|
||||
that.sendArrayBuffer(arrayBuffer);
|
||||
},
|
||||
// 构建营养成分数据包
|
||||
|
|
@ -561,11 +528,13 @@
|
|||
that.activeType.weight = weight
|
||||
that.activeType.meals_type = that.foodName
|
||||
list.push(that.activeType)
|
||||
console.log("保存", that.user.aud_id, list, that.time)
|
||||
that.$model.getAddIntakeFood({
|
||||
aud_id: that.user.aud_id,
|
||||
food_list: list,
|
||||
time: that.time
|
||||
}).then(res => {
|
||||
console.log("33333333333", res)
|
||||
if (res.code != 0) return
|
||||
if (that.time == that.user.food_count.date) {
|
||||
that.$store.dispatch("getUserInfo")
|
||||
|
|
@ -623,7 +592,7 @@
|
|||
let that = this
|
||||
that.search_list = []
|
||||
if (that.search_value == "") {
|
||||
that.$tools.msg("输入关键字后搜索")
|
||||
that.$tools.msg(this.$t('searchkeywords'))
|
||||
return
|
||||
}
|
||||
that.$model.getFoodSearch({
|
||||
|
|
@ -661,7 +630,7 @@
|
|||
handledelactive(ite) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
content: `是否删除[${ite.name}]?`,
|
||||
content: this.$t('WhetherTodelete') + ite.name,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.$model.delCEatAction({
|
||||
|
|
@ -695,7 +664,7 @@
|
|||
left: 0;
|
||||
right: 0;
|
||||
padding: 30rpx 20rpx;
|
||||
z-index: 9;
|
||||
z-index: 11;
|
||||
background-color: #f7f7f7;
|
||||
|
||||
.type {
|
||||
|
|
@ -746,7 +715,7 @@
|
|||
text-align: center;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
right: 30px;
|
||||
border-radius: 20rpx;
|
||||
|
||||
}
|
||||
|
|
@ -793,18 +762,24 @@
|
|||
}
|
||||
|
||||
.history-list {
|
||||
width: calc(100% - 40rpx);
|
||||
margin: 20rpx 20rpx 0;
|
||||
width: 97%;
|
||||
margin-left: 3%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
overflow: hidden;
|
||||
|
||||
.history-list-item {
|
||||
border: 1px solid #dfdfdf;
|
||||
padding: 3px 24rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
width: 30.3%;
|
||||
height: 30px;
|
||||
overflow: hidden;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
padding: 0px 1%;
|
||||
box-sizing: border-box;
|
||||
float: left;
|
||||
margin-right: 3%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -841,19 +816,23 @@
|
|||
.popular-food-inner {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.popular-food-subitem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
background-color: #fff;
|
||||
margin-right: 20rpx;
|
||||
border: 1px solid #dfdfdf;
|
||||
border-radius: 20rpx;
|
||||
border: 1px solid #f7f7f7;
|
||||
margin-bottom: 20rpx;
|
||||
width: 27%;
|
||||
height: 30px;
|
||||
overflow: hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
padding: 0 2%;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -884,6 +863,10 @@
|
|||
border: 1px solid #f7f7f7;
|
||||
}
|
||||
|
||||
view {
|
||||
width: calc(100% - 130rpx);
|
||||
}
|
||||
|
||||
text {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
|
|
@ -967,17 +950,15 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 20rpx;
|
||||
position: fixed;
|
||||
bottom: 0rpx;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 60px;
|
||||
padding-bottom: 15px;
|
||||
height: 120rpx;
|
||||
z-index: 15;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
||||
width: 100%;
|
||||
|
||||
.subbtn {
|
||||
color: #fff;
|
||||
|
|
@ -990,14 +971,16 @@
|
|||
}
|
||||
|
||||
.left {
|
||||
width: 31%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
.che {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
margin-left: 10px;
|
||||
margin-bottom: 25px;
|
||||
position: relative;
|
||||
|
||||
text {
|
||||
|
|
@ -1011,8 +994,8 @@
|
|||
line-height: 30rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
right: 0;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
image,
|
||||
|
|
@ -1024,6 +1007,11 @@
|
|||
}
|
||||
|
||||
.type {
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
margin-left: 10px;
|
||||
|
||||
image {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
|
|
@ -1033,7 +1021,7 @@
|
|||
|
||||
.mic-icon {
|
||||
color: #fff;
|
||||
width: 31%;
|
||||
width: calc(100% - 120px);
|
||||
padding: 8px 0;
|
||||
background: $maincolor;
|
||||
display: flex;
|
||||
|
|
@ -1041,10 +1029,6 @@
|
|||
justify-content: center;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.mic-icon2 {
|
||||
background: $yellowcolor ;
|
||||
}
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
|
|
@ -1106,7 +1090,7 @@
|
|||
|
||||
|
||||
.left {
|
||||
width: 65%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
|
@ -1122,8 +1106,10 @@
|
|||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-left: 30rpx;
|
||||
width: calc(100% - 120rpx);
|
||||
|
||||
.name {
|
||||
width: 100%;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
text-align: left;
|
||||
|
|
@ -1178,6 +1164,13 @@
|
|||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.text {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
line-height: 28px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.foodContent {
|
||||
|
|
@ -1236,8 +1229,9 @@
|
|||
justify-content: space-between;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
padding: 16rpx 0;
|
||||
font-size: 24rpx;
|
||||
font-size: 32rpx;
|
||||
margin-top: 10rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.foodDetailList {
|
||||
|
|
@ -1296,18 +1290,24 @@
|
|||
border-radius: 10px;
|
||||
height: 340rpx;
|
||||
|
||||
|
||||
.chart-wrap {
|
||||
margin-top: -15px;
|
||||
position: relative;
|
||||
width: 280rpx;
|
||||
height: 280rpx;
|
||||
margin-left: -5px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.center {
|
||||
border: none;
|
||||
width: 280rpx;
|
||||
height: 210rpx;
|
||||
position: absolute;
|
||||
top: 44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.center {
|
||||
height: 270rpx;
|
||||
top: 80rpx;
|
||||
}
|
||||
|
||||
.mubiao {
|
||||
margin-top: 10px
|
||||
}
|
||||
}
|
||||
|
||||
.box_list {
|
||||
|
|
@ -1392,12 +1392,15 @@
|
|||
margin-left: 10px;
|
||||
height: 40px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
justify-content: space-between;
|
||||
|
||||
text {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1462,17 +1465,4 @@
|
|||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.wrapperScan {
|
||||
.auto-search-dialog {
|
||||
bottom: 0;
|
||||
|
||||
text {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -3,7 +3,8 @@
|
|||
<!-- -->
|
||||
<view class="kcal">
|
||||
<view class="set">
|
||||
<input type="digit" v-model="weight" placeholder="请输入" :focus="focus" @blur="handleBlur">
|
||||
<input type="digit" v-model="weight" :placeholder="$t('verifyRecord')" :focus="focus"
|
||||
@blur="handleBlur">
|
||||
<uni-icons v-if="weight!=''" type="close" size="24" class="uni-iocns" color="#999"
|
||||
@click="handleclear"></uni-icons>
|
||||
<view class="num">
|
||||
|
|
@ -17,9 +18,9 @@
|
|||
<!-- -->
|
||||
<view class="kcal">
|
||||
<view class="text">
|
||||
营养占比
|
||||
{{$t('countNutritionalProportion')}}
|
||||
</view>
|
||||
<view class="slider">
|
||||
<view class="slider" v-if="isShow">
|
||||
<llt-slider-range :model-value="rangeValue" @change="handleChange" />
|
||||
</view>
|
||||
<view class="list">
|
||||
|
|
@ -36,7 +37,7 @@
|
|||
<text>{{ite}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="subbtn" @click="handleEditKcal">保存</view>
|
||||
<view class="subbtn" @click="handleEditKcal">{{$t('btnSubmit')}}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -58,7 +59,8 @@
|
|||
carbohydrate_p: 0,
|
||||
protein_p: 0,
|
||||
fat_p: 0,
|
||||
rangeValue: [0, 0]
|
||||
isShow: true,
|
||||
rangeValue: [0, 0],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -69,6 +71,9 @@
|
|||
},
|
||||
onLoad() {
|
||||
this.handleList()
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('titleSet')
|
||||
})
|
||||
},
|
||||
components: {
|
||||
lltSliderRange
|
||||
|
|
@ -81,13 +86,17 @@
|
|||
aud_id: that.userInfo.aud_id
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
that.isShow = false
|
||||
that.kcal = res.data.kcal
|
||||
that.nutrition = res.data.nutrition
|
||||
that.weight = res.data.kcal.suggestion_kcal_val
|
||||
that.rangeValue[0] = Number(that.nutrition.list[0].proportion)
|
||||
that.rangeValue[1] = Number(that.nutrition.list[0].proportion) + Number(that.nutrition.list[1].proportion)
|
||||
console.log("that.rangeValue", that.rangeValue)
|
||||
that.handleProportion()
|
||||
that.$nextTick(() => {
|
||||
that.isShow = true
|
||||
that.rangeValue[0] = Number(that.nutrition.list[0].proportion)
|
||||
that.rangeValue[1] = Number(that.nutrition.list[0].proportion) + Number(that.nutrition.list[1].proportion)
|
||||
that.handleProportion()
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
@ -105,20 +114,20 @@
|
|||
handleProportion() {
|
||||
let that = this
|
||||
that.nutrition.list.forEach(ite => {
|
||||
if (ite.name.indexOf('碳水') != -1) {
|
||||
if (ite.key_v == "carbohydrate") {
|
||||
ite.proportion = that.rangeValue[0]
|
||||
ite.val = Number(that.weight * ite.proportion / 100 / 4).toFixed(2)
|
||||
that.carbohydrate_v = ite.val
|
||||
that.carbohydrate_p = ite.proportion
|
||||
}
|
||||
if (ite.name.indexOf('蛋白') != -1) {
|
||||
if (ite.key_v == "protein") {
|
||||
ite.proportion = that.rangeValue[1] - that.rangeValue[0]
|
||||
ite.val = Number(that.weight * ite.proportion / 100 / 4).toFixed(2)
|
||||
that.protein_v = ite.val
|
||||
that.protein_p = ite.proportion
|
||||
|
||||
}
|
||||
if (ite.name.indexOf('脂肪') != -1) {
|
||||
if (ite.key_v == "fat") {
|
||||
ite.proportion = 100 - that.rangeValue[1]
|
||||
ite.val = Number(that.weight * ite.proportion / 100 / 9).toFixed(2)
|
||||
that.fat_v = ite.val
|
||||
|
|
@ -134,7 +143,7 @@
|
|||
handleEditKcal() {
|
||||
let that = this
|
||||
if (that.weight == '' || Number(that.weight) <= 0) {
|
||||
that.$tools.msg("请输入卡路里")
|
||||
that.$tools.msg(that.$t('verifyCalorie'))
|
||||
return
|
||||
}
|
||||
that.$model.getCountSetUserKcal({
|
||||
|
|
@ -148,7 +157,7 @@
|
|||
fat_p: that.fat_p,
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
that.$tools.msg("设置成功")
|
||||
that.$tools.msg(that.$t('msgSetSuccess'))
|
||||
that.$store.dispatch("getUserInfo")
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
|
|
|
|||
|
|
@ -4,28 +4,28 @@
|
|||
<view class="login">
|
||||
<view class="editem">
|
||||
<view class="item">
|
||||
<view class="text">手机号/邮箱</view>
|
||||
<view class="text">{{$t("infoEmail")}}</view>
|
||||
<view class="input">
|
||||
<input v-model="phone" type="text"/>
|
||||
<input v-model="phone" type="text" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item ">
|
||||
<view class="text">验证码</view>
|
||||
<view class="text">{{$t("titleCode")}}</view>
|
||||
<view class="input yanzhengma">
|
||||
<input class="uni-input" v-model="code" />
|
||||
<button class="code" type="none" @click="handleCode" v-model="code"
|
||||
:disabled="disabled">{{second<60 ? second+'S后重发':'获取验证码'}}
|
||||
:disabled="disabled">{{second<60 ? second+$t("titleSendCodeRetry"):$t("titleSendCode")}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="text">密码</view>
|
||||
<view class="text">{{$t("titlePassword")}}</view>
|
||||
<view class="input">
|
||||
<input class="uni-input" v-model="password" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="text">确认密码</view>
|
||||
<view class="text">{{$t("titleConfirmPassword")}}</view>
|
||||
<view class="input">
|
||||
<input class="uni-input" v-model="password2" />
|
||||
</view>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
</label>
|
||||
</checkbox-group>
|
||||
</view> -->
|
||||
<view class="btnlogin" @click="handleTelLogin">确认</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">{{$t("titleRegister")}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -59,6 +59,10 @@
|
|||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleLogin')
|
||||
})
|
||||
this.type = options.type //1
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -68,40 +72,36 @@
|
|||
// 登录、
|
||||
handleTelLogin() {
|
||||
let that = this
|
||||
let phoneType = that.phone.indexOf("@") !== -1
|
||||
if (that.value == 0) {
|
||||
that.$tools.msg("请先确认勾选协议")
|
||||
that.$tools.msg(that.$t("verifyAgreement"))
|
||||
return
|
||||
}
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
return
|
||||
}
|
||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
if (!that.code) {
|
||||
that.$tools.msg("请填写验证码")
|
||||
that.$tools.msg(that.$t("verifyCode"))
|
||||
return
|
||||
}
|
||||
if (!that.password) {
|
||||
that.$tools.msg("请填写密码")
|
||||
that.$tools.msg(that.$t("verifyPassword"))
|
||||
return
|
||||
}
|
||||
if (!that.password2) {
|
||||
that.$tools.msg("请确认密码")
|
||||
that.$tools.msg(that.$t("verifyPassword"))
|
||||
return
|
||||
}
|
||||
if (that.password2 != that.password) {
|
||||
that.$tools.msg("请确认两次密码填写一致")
|
||||
that.$tools.msg(that.$t("verifyPasswordCorrect"))
|
||||
return
|
||||
}
|
||||
let account = {
|
||||
data: that.phone,
|
||||
password: that.password,
|
||||
c_password: that.password2,
|
||||
code: that.code
|
||||
confirm_password: that.password2,
|
||||
code: that.code,
|
||||
language: uni.getStorageSync('language')
|
||||
}
|
||||
let https = that.type == 'register' ? that.$model.getregister(account) : that.$model.getResetPassword(
|
||||
account)
|
||||
|
|
@ -113,7 +113,8 @@
|
|||
}
|
||||
uni.setStorageSync('token', res.data.token)
|
||||
uni.setStorageSync('aan_id', res.data.aan_id)
|
||||
that.$tools.msg("设置成功,进入程序中")
|
||||
that.$store.dispatch("getUserInfo")
|
||||
that.$tools.msg(that.$t("msgSetPasswordSuccess"))
|
||||
setTimeout(function() {
|
||||
uni.reLaunch({
|
||||
url: "/pages/index/index"
|
||||
|
|
@ -124,19 +125,13 @@
|
|||
// 获取验证码
|
||||
handleCode() {
|
||||
let that = this
|
||||
let phoneType = that.phone.indexOf("@") !== -1
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
return
|
||||
}
|
||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
//
|
||||
that.$model.getSendCode({
|
||||
data: that.phone,
|
||||
type: that.type
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code != 0) {
|
||||
|
|
@ -194,7 +189,7 @@
|
|||
.title {
|
||||
text-align: left;
|
||||
color: #333;
|
||||
font-size: 40rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
|
@ -214,17 +209,19 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.text {
|
||||
width: 240rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: calc(100% - 240rpx);
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
display: flex;
|
||||
|
|
@ -242,19 +239,20 @@
|
|||
left: 20rpx;
|
||||
right: 0px;
|
||||
z-index: 88;
|
||||
font-size:28rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.yanzhengma {
|
||||
input {
|
||||
right: 220rpx;
|
||||
font-size:28rpx;
|
||||
right: 180px;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.code {
|
||||
width: 220rpx;
|
||||
color: #333;
|
||||
width: 180px;
|
||||
background: #dfdfdf;
|
||||
font-size: 28rpx;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -1,76 +1,77 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="bg"></view>
|
||||
|
||||
<view class="top">
|
||||
<image></image>
|
||||
<text>轻厨记</text>
|
||||
<view class="language">
|
||||
<picker mode="selector" @change="changeClickLanguage" :range="languageList" range-key="name"
|
||||
:value="levelInd">
|
||||
<view>
|
||||
{{$t('titleLanguage')}}
|
||||
<icon class="iconfont icon-arrow-down"></icon>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="logo">
|
||||
<image></image>
|
||||
<text>Wendu</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="login box_shadow">
|
||||
<view class="title">登录</view>
|
||||
<view class="title">{{$t("titleLogin")}}</view>
|
||||
<view class="toggle cblue" @click="handleToggle">
|
||||
切换登录
|
||||
{{$t("titleToggleLogin")}}
|
||||
</view>
|
||||
<view class="editem">
|
||||
<view class="item">
|
||||
<view class="text">手机号/邮箱</view>
|
||||
<view class="text">{{$t("infoEmail")}}</view>
|
||||
<view class="input">
|
||||
<input v-model="phone" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 验证码登录 -->
|
||||
<view class="item " v-if="isCode">
|
||||
<view class="text">验证码</view>
|
||||
<view class="text">{{$t("titleCode")}}</view>
|
||||
<view class="input yanzhengma">
|
||||
<input class="uni-input" v-model="code" />
|
||||
<button class="code" type="none" @click="handleCode" v-model="code"
|
||||
:disabled="disabled">{{second<60 ? second+'S后重发':'获取验证码'}}
|
||||
:disabled="disabled">{{second<60 ? second+$t("titleSendCodeRetry"):$t("titleSendCode")}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 密码登录 -->
|
||||
<view class="item " v-else>
|
||||
<view class="text">密码</view>
|
||||
<view class="text">{{$t("titlePassword")}}</view>
|
||||
<view class="input">
|
||||
<input class="uni-input" v-model="password" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="forget " v-if="!isCode">
|
||||
<text @click="handlePassword('forgetPassword')">忘记密码?</text>
|
||||
<text @click="handlePassword('forgetPassword')">{{$t("titleForgotPassword")}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="xieyi">
|
||||
<checkbox-group @change="checkboxChange" class="group">
|
||||
<label>
|
||||
<checkbox :value="1" style="transform:scale(0.7)" />阅读并同意
|
||||
<checkbox :value="1" style="transform:scale(0.7)" />{{$t("titleAgreementText")}}
|
||||
<!-- <text @click.stop @click="handleUserXieyi" class="blue">《用户协议》</text>和 -->
|
||||
<text @click.stop @click="handlexieyi" class="blue">《隐私协议》</text>
|
||||
<text @click.stop @click="handlexieyi" class="blue">《{{$t("titleAgreementContntText")}}》</text>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">登录</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">{{$t("titleLogin")}}</view>
|
||||
<view class="btngroup" @click="handlePassword('register')">
|
||||
<text>注册</text>
|
||||
<text>{{$t("titleRegister")}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wxbtn">
|
||||
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="value==1">
|
||||
<view>
|
||||
<image src="../../static/phone.png"></image>
|
||||
</view>
|
||||
<text>手机号快捷登录</text>
|
||||
</button>
|
||||
<button v-else @click="handleIsTel">
|
||||
<view>
|
||||
<image src="../../static/phone.png"></image>
|
||||
</view>
|
||||
<text>手机号快捷登录</text>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -82,49 +83,91 @@
|
|||
value: 0,
|
||||
isCode: true,
|
||||
loginCode: "",
|
||||
levelInd: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", 'configInfo', "setLocale"]),
|
||||
languageList() {
|
||||
let that = this
|
||||
let languageList = this.configInfo.language_arr
|
||||
that.levelInd = languageList.findIndex(ite => ite.key == this.setLocale)
|
||||
return languageList
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.login()
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleLogin')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
checkboxChange(e) {
|
||||
this.value = e.detail.value.length ? e.detail.value[0] : "0"
|
||||
},
|
||||
// 语言切换
|
||||
changeClickLanguage(e) {
|
||||
let that = this
|
||||
let key = that.languageList[e.target.value].key
|
||||
let val = that.languageList[e.target.value].val
|
||||
that.levelInd = e.target.value
|
||||
that.$model.getSetLanguage({
|
||||
language: val,
|
||||
}).then(res => {
|
||||
that.$i18n.locale = key
|
||||
uni.setStorageSync('language', key)
|
||||
that.$store.commit('changeLocale', key)
|
||||
that.$store.dispatch("getHomeConfig")
|
||||
that.handleTabBarItem()
|
||||
})
|
||||
},
|
||||
handleTabBarItem() {
|
||||
let that = this
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
text: that.$t('titleHome')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 1,
|
||||
text: that.$t('titleCount')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 2,
|
||||
text: that.$t('titleMe')
|
||||
})
|
||||
},
|
||||
// 登录、
|
||||
handleTelLogin() {
|
||||
let that = this
|
||||
let phoneType = that.phone.indexOf("@") !== -1
|
||||
if (that.value == 0) {
|
||||
that.$tools.msg("请先确认勾选协议")
|
||||
that.$tools.msg(that.$t("verifyAgreement"))
|
||||
return
|
||||
}
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
return
|
||||
}
|
||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
if (that.isCode && !that.code) {
|
||||
that.$tools.msg("请输入验证码")
|
||||
that.$tools.msg(that.$t("verifyCode"))
|
||||
return
|
||||
}
|
||||
if (!that.isCode && !that.password) {
|
||||
that.$tools.msg('请输入正确密码')
|
||||
that.$tools.msg(that.$t("verifyPassword"))
|
||||
return
|
||||
}
|
||||
let val = that.languageList[that.levelInd].val
|
||||
this.$model.getonlogin({
|
||||
data: that.phone,
|
||||
validate_data: that.isCode ? that.code : that.password,
|
||||
validate_type: that.isCode ? 'code' : 'password'
|
||||
validate_type: that.isCode ? 'code' : 'password',
|
||||
language: val
|
||||
}).then(res => {
|
||||
console.log("data", res.data)
|
||||
that.$tools.msg(res.msg)
|
||||
if (res.code != 0) return
|
||||
that.$tools.msg("登录成功")
|
||||
that.$tools.msg(that.$t("msgLoginSuccess"))
|
||||
uni.setStorageSync('token', res.data.token)
|
||||
that.$store.dispatch("getUserInfo")
|
||||
setTimeout(function() {
|
||||
uni.reLaunch({
|
||||
url: "/pages/index/index"
|
||||
|
|
@ -135,19 +178,13 @@
|
|||
// 获取验证码
|
||||
handleCode() {
|
||||
let that = this
|
||||
let phoneType = that.phone.indexOf("@") !== -1
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
return
|
||||
}
|
||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
//
|
||||
that.$model.getSendCode({
|
||||
data: that.phone,
|
||||
type: "login"
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code != 0) {
|
||||
|
|
@ -165,42 +202,9 @@
|
|||
}, 60000)
|
||||
}).catch(err => {})
|
||||
},
|
||||
// 获取code
|
||||
login() {
|
||||
let that = this
|
||||
uni.login({
|
||||
success(res) {
|
||||
if (res.code) {
|
||||
if (res.errMsg = "login:ok") {
|
||||
that.loginCode = res.code
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 授权
|
||||
getPhoneNumber(res) {
|
||||
const that = this
|
||||
if (res.detail.errMsg == 'getPhoneNumber:ok') {
|
||||
this.$model.getRegisterPhone({
|
||||
code: that.loginCode,
|
||||
encryptedData: res.detail.encryptedData,
|
||||
iv: res.detail.iv,
|
||||
}).then(res => {
|
||||
if (res.code != 0) return
|
||||
that.value = 1
|
||||
uni.setStorageSync('token', res.data.token)
|
||||
setTimeout(function() {
|
||||
uni.reLaunch({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
},
|
||||
handleIsTel() {
|
||||
if (this.value == 0) {
|
||||
this.$tools.msg("请先确认勾选协议")
|
||||
this.$tools.msg(that.$t("verifyAgreement"))
|
||||
return
|
||||
}
|
||||
},
|
||||
|
|
@ -249,6 +253,24 @@
|
|||
width: auto;
|
||||
}
|
||||
|
||||
.language {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 15px;
|
||||
background: #fff;
|
||||
padding: 5px 20px;
|
||||
border-radius: 10px;
|
||||
|
||||
picker {
|
||||
width: 100%;
|
||||
|
||||
view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wxbtn {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,195 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="info">
|
||||
<view class="logo">
|
||||
<image src="../../static/logo2.png"></image>
|
||||
<view>Reedaw</view>
|
||||
<text>V{{phoneInfo.info.version}}</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item" @click="handleVersion">
|
||||
<view class="left">{{$t("titleVersionUpdate")}}</view>
|
||||
<view class="right">
|
||||
<text class="new" v-if="version==-1">{{$t("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">{{$t("titleAgreementContntText")}}</text>
|
||||
<uni-icons type="right"></uni-icons>
|
||||
</a>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
let dtask;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 0版本号相通,1,:第一个版本号大于第二个版本号,-1:第一个版本号小于第二个版本号
|
||||
version: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["phoneInfo"]),
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
if (!that.phoneInfo.versionUrl) {
|
||||
that.handleoginversion()
|
||||
} else {
|
||||
that.version = that.$tools.compareVersions(that.phoneInfo.info.version, that.phoneInfo.versionUrl.version)
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('titleAboutUs'),
|
||||
})
|
||||
},
|
||||
onBackPress() {
|
||||
console.log("dtask", dtask)
|
||||
if (dtask != undefined) {
|
||||
dtask.onProgressUpdate((res) => {
|
||||
if (res.progress != 100) {
|
||||
dtask.abort();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleVersion() {
|
||||
let that = this
|
||||
if (that.version == -1) {
|
||||
if (that.phoneInfo.platform === 'android') {
|
||||
uni.setStorageSync('VERSION', that.phoneInfo.versionUrl.version)
|
||||
let showLoading = plus.nativeUI.showWaiting(that.$t("msgDownloading"))
|
||||
dtask = uni.downloadFile({
|
||||
url: that.phoneInfo.versionUrl.url,
|
||||
success: (downloadRes) => {
|
||||
if (downloadRes.statusCode === 200) {
|
||||
plus.nativeUI.closeWaiting()
|
||||
plus.runtime.install(
|
||||
downloadRes.tempFilePath, {
|
||||
force: false
|
||||
},
|
||||
function() {
|
||||
console.log('install success...');
|
||||
plus.runtime.restart();
|
||||
},
|
||||
function(e) {
|
||||
console.error('install fail...');
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: that.$t("msgUpgradeFail"),
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
dtask.onProgressUpdate((res) => {
|
||||
showLoading.setTitle(that.$t("msgDownloading") + res.progress + "% ");
|
||||
// console.log('下载进度' + res.progress + '%');
|
||||
});
|
||||
} else {
|
||||
plus.runtime.launchApplication({
|
||||
action: `itms-apps://itunes.apple.com/cn/app/id6654906497?mt=8`
|
||||
})
|
||||
}
|
||||
} else {
|
||||
that.$tools.msg(that.$t("msgLatestVersion"))
|
||||
}
|
||||
},
|
||||
// 版本信息
|
||||
handleoginversion() {
|
||||
let that = this
|
||||
that.$model.getloginversion({}).then(res => {
|
||||
that.version = that.$tools.compareVersions(that.phoneInfo.info.version, res.data.version)
|
||||
that.$store.commit('changePhoneInfo', {
|
||||
versionUrl: res.data
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
min-height: calc(100vh - 30px);
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 40rpx;
|
||||
line-height: 35px;
|
||||
|
||||
image {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
text {
|
||||
display: block;
|
||||
font-size: 32rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
width: calc(100% - 20px);
|
||||
margin: 50px 0;
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 0 10px;
|
||||
justify-content: space-between;
|
||||
|
||||
.new {
|
||||
color: #fff;
|
||||
background-color: red;
|
||||
font-size: 32rpx;
|
||||
border-radius: 10px;
|
||||
padding: 3px 5px;
|
||||
}
|
||||
|
||||
.href {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.xieyi {
|
||||
color: $textcolor;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
</view>
|
||||
<view class="mic-icon" @touchstart="onVoiceTouchStart" @touchend="onVoiceTouchEnd"
|
||||
@touchcancel="cancelRecording">
|
||||
<uni-icons type="mic-filled" size="20" color="#fff"></uni-icons>
|
||||
<uni-icons type="mic-filled" size="20" :color="mic_touch ? '#777777' : '#fff'"></uni-icons>
|
||||
语音搜索
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -131,6 +131,7 @@
|
|||
search_value: '',
|
||||
mic_touch: false,
|
||||
voiceManager: null,
|
||||
autoSearchContent: "",
|
||||
showAutoSearchDlg: false
|
||||
};
|
||||
},
|
||||
|
|
@ -150,8 +151,7 @@
|
|||
let that = this
|
||||
that.voiceManager = plugin.getRecordRecognitionManager()
|
||||
that.voiceManager.onStop = function(res) {
|
||||
that.search_value = res.result.replace('。', '')
|
||||
that.handleSerach()
|
||||
that.autoSearchContent = res.result.replace('。', '')
|
||||
}
|
||||
that.voiceManager.onError = function(res) {
|
||||
console.error("error msg", res.retcode)
|
||||
|
|
@ -175,13 +175,11 @@
|
|||
handleDetail(ite, ind) {
|
||||
let that = this
|
||||
let list = []
|
||||
let pages = getCurrentPages()
|
||||
let prevPage = pages[pages.length - 2]
|
||||
if (ind == 1) {
|
||||
list.push(ite)
|
||||
that.ActiveList = that.$tools.mergeAndDeduplicate(that.ActiveList, list, 'name')
|
||||
that.$tools.msg("添加成功")
|
||||
that.search_value = ""
|
||||
that.search_list = []
|
||||
that.isShop = true
|
||||
} else {
|
||||
for (var n = 0; n < that.ActiveList.length; n++) {
|
||||
if (ite.name == that.ActiveList[n].name) {
|
||||
|
|
@ -189,8 +187,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
let pages = getCurrentPages()
|
||||
let prevPage = pages[pages.length - 2]
|
||||
prevPage.$vm.getAddFood(that.ActiveList)
|
||||
},
|
||||
// 搜索
|
||||
|
|
@ -225,13 +221,13 @@
|
|||
let that = this
|
||||
that.search_value = text
|
||||
that.showAutoSearchDlg = false
|
||||
that.autoSearchContent = ''
|
||||
that.handleSerach()
|
||||
},
|
||||
// 开始说话
|
||||
onVoiceTouchStart() {
|
||||
let that = this
|
||||
that.showAutoSearchDlg = true
|
||||
that.isShop = false
|
||||
that.voiceManager.start({
|
||||
duration: 60000,
|
||||
lang: "zh_CN"
|
||||
|
|
@ -282,7 +278,7 @@
|
|||
left: 0;
|
||||
right: 0;
|
||||
padding: 30rpx 20rpx;
|
||||
z-index: 9;
|
||||
z-index: 19;
|
||||
background-color: #efefef;
|
||||
|
||||
.serach-box {
|
||||
|
|
|
|||
|
|
@ -28,21 +28,19 @@
|
|||
添加食材
|
||||
<text class="close" @click="handleClose" v-if="info.tags.length">清空</text>
|
||||
</view>
|
||||
<view v-if="info.tags.length">
|
||||
<view class="foodlist" v-for="(ite,ind) in info.tags[0].list" :key="ind">
|
||||
<view class="item">
|
||||
<view class="name">{{ite.name}}</view>
|
||||
<view class="input">
|
||||
<input class="text" placeholder="请输入用量" v-model="ite.weight" type="digit" />{{ite.unit}}
|
||||
</view>
|
||||
<view class="edit">
|
||||
<icon class="iconfont icon-ashbin" @click="handledel(ind,'food')"></icon>
|
||||
<image src="../../static/xia.png" @click="handleMove(ind,0,'food')" class="xia"></image>
|
||||
<image src="../../static/xia.png" @click="handleMove(ind,1,'food')" class="shang xia">
|
||||
</image>
|
||||
</view>
|
||||
<view class="foodlist" v-for="(ite,ind) in info.tags[0].list" :key="ind" v-if="info.tags.length">
|
||||
<view class="item">
|
||||
<view class="name">{{ite.name}}</view>
|
||||
<view class="input">
|
||||
<input class="text" placeholder="请输入用量" v-model="ite.weight" type="digit" />{{ite.unit}}
|
||||
</view>
|
||||
<view class="edit">
|
||||
<icon class="iconfont icon-ashbin" @click="handledel(ind,'food')"></icon>
|
||||
<image src="../../static/xia.png" @click="handleMove(ind,0,'food')" class="xia"></image>
|
||||
<image src="../../static/xia.png" @click="handleMove(ind,1,'food')" class="shang xia"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="add" @click="handleAddfood()">+添加食材</view>
|
||||
</view>
|
||||
|
|
@ -93,10 +91,10 @@
|
|||
cook_label: null,
|
||||
title: "",
|
||||
description: "",
|
||||
tags: [],
|
||||
food_list: [],
|
||||
cover: null, //封面id
|
||||
step_list: [],
|
||||
cookbook_id: null,
|
||||
cookbook_id: null
|
||||
},
|
||||
FMimg: "",
|
||||
edit: false,
|
||||
|
|
@ -127,30 +125,28 @@
|
|||
// 食材列表返回
|
||||
getAddFood(list) {
|
||||
let that = this
|
||||
console.log("list", list)
|
||||
list.forEach(ite => {
|
||||
ite.weight = null
|
||||
})
|
||||
console.log("222222222", that.info.tags[0].list, list)
|
||||
that.info.tags[0].list = that.$tools.mergeAndDeduplicate(that.info.tags[0].list, list, 'name')
|
||||
that.info.food_list = that.$tools.mergeAndDeduplicate(that.info.food_list, list, 'name')
|
||||
},
|
||||
// 清空食材
|
||||
handleClose() {
|
||||
let that = this
|
||||
that.info.tags[0].list = []
|
||||
that.info.food_list = []
|
||||
},
|
||||
// 添加食材
|
||||
handleAddfood() {
|
||||
let that = this
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/me/foodlist?list=" + JSON.stringify(that.info.tags[0].list)
|
||||
url: "/pageTwo/me/foodlist?list=" + JSON.stringify(that.info.food_list)
|
||||
})
|
||||
},
|
||||
// 删除指定食材/菜谱
|
||||
handledel(id, type) {
|
||||
let that = this
|
||||
let name = type == 'step' ? '步骤' : '食材'
|
||||
let list = type == 'step' ? that.info.step_list : that.info.tags[0].list
|
||||
let list = type == 'step' ? that.info.step_list : that.info.food_list
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
content: '是否删除当前' + name,
|
||||
|
|
@ -166,9 +162,9 @@
|
|||
// 上下移动食材
|
||||
handleMove(ind, dir, type) {
|
||||
let that = this
|
||||
let list = type == 'step' ? that.info.step_list : that.info.tags[0].list
|
||||
let list = type == 'step' ? that.info.step_list : that.info.food_list
|
||||
let moveComm = (curIndex, nextIndex) => {
|
||||
let arr = type == 'step' ? that.info.step_list : that.info.tags[0].list
|
||||
let arr = type == 'step' ? that.info.step_list : that.info.food_list
|
||||
arr[curIndex] = arr.splice(nextIndex, 1, arr[curIndex])[0]
|
||||
return arr
|
||||
}
|
||||
|
|
@ -300,17 +296,17 @@
|
|||
that.$tools.msg("请输入菜谱简介!")
|
||||
return
|
||||
}
|
||||
if (!that.info.tags[0].list.length) {
|
||||
if (!that.info.food_list.length) {
|
||||
that.$tools.msg("请添加食材!")
|
||||
return
|
||||
}
|
||||
let array = []
|
||||
that.info.tags[0].list.forEach(ite => {
|
||||
that.info.food_list.forEach(ite => {
|
||||
if (ite.weight != null || ite.weight > 0) {
|
||||
array.push(ite.weight)
|
||||
}
|
||||
})
|
||||
if (array.length != that.info.tags[0].list.length) {
|
||||
if (array.length != that.info.food_list.length) {
|
||||
that.$tools.msg("请输入食材重量!")
|
||||
return
|
||||
}
|
||||
|
|
@ -335,16 +331,11 @@
|
|||
that.info.token = uni.getStorageSync('token')
|
||||
console.log("修改", that.info)
|
||||
that.$model.getEditCookbook(that.info).then(res2 => {
|
||||
if (res2.code != 0) {
|
||||
that.$tools.msg(res.msg)
|
||||
return
|
||||
}
|
||||
if (res2.code == 0) {
|
||||
that.$tools.msg("修改成功")
|
||||
setTimeout(function() {
|
||||
uni.redirectTo({
|
||||
url: "/pageTwo/me/menudetail?id=" + that.info.id +
|
||||
'&title=我的菜谱'
|
||||
url: "/pageTwo/me/menudetail?id=" + that.info.id + '&title=我的菜谱'
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
</view>
|
||||
<view class="kcal" v-else>
|
||||
<view class="num" v-if="ite.newweight">
|
||||
{{ite.newweight}}{{ite.newunit}}
|
||||
{{ite.newweight}}{{ite.newunit=="oz"?'盎司':'克'}}
|
||||
</view>
|
||||
<view class="num" v-if="ite.newkcal">
|
||||
{{ite.newkcal}}
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
<view class="title">是否保存至“计食”为今日饮食?</view>
|
||||
<view class="types">
|
||||
<view class="type-item" :class="{'active':selectSaveType == index}"
|
||||
v-for="(item,index) in foodItem" :key="index" @click="selectSaveType=index">{{item.name}}</view>
|
||||
v-for="(item,index) in saveFoodTypes" :key="index" @click="selectSaveType=index">{{item}}</view>
|
||||
</view>
|
||||
<view class="btn-wrap">
|
||||
<view class="confirm" @click="confirmSaveFood">确定</view>
|
||||
|
|
@ -179,9 +179,6 @@
|
|||
menu() {
|
||||
return this.configInfo.cookbook_label
|
||||
},
|
||||
foodItem() {
|
||||
return this.configInfo.meal_list
|
||||
},
|
||||
endDate() {
|
||||
return this.$tools.getDate("start")
|
||||
},
|
||||
|
|
@ -232,7 +229,6 @@
|
|||
that.isWeightType = false
|
||||
that.activeType = that.info.tags[0].list[0]
|
||||
that.weightKcal = Number(Number(that.activeType.kcal) / 100).toFixed(2)
|
||||
console.log("222222222",that.info.tags[0].list)
|
||||
if (that.info.tags[0].list.length == 1) {
|
||||
that.isLast = true
|
||||
}
|
||||
|
|
@ -289,10 +285,10 @@
|
|||
for (let i = 0; i < that.info.tags[0].list.length; ++i) {
|
||||
if (that.info.tags[0].list[i].newweight) {
|
||||
newFoodList.push({
|
||||
meals_type: that.foodItem[that.selectSaveType].name,
|
||||
meals_type: that.saveFoodTypes[that.selectSaveType],
|
||||
id: that.info.tags[0].list[i].id,
|
||||
weight: that.info.tags[0].list[i].newweight,
|
||||
unit: that.info.tags[0].list[i].newunit
|
||||
unit: that.info.tags[0].list[i].newunit == '克' ? '克' : '盎司'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<text class="overflow">{{it.create_user_nickname}}</text>
|
||||
</view>
|
||||
<view class="zan" @click="handleZan(it)">
|
||||
<icon class="t-icon mr-5" :class="[it.is_me_like_it=='yes'?'t-icon-icon3':'t-icon-icon_collect']">
|
||||
<icon class="t-icon" :class="[it.is_me_like_it=='yes'?'t-icon-icon3':'t-icon-icon_collect']">
|
||||
</icon>
|
||||
<text>{{it.likes_num}}</text>
|
||||
</view>
|
||||
|
|
@ -51,10 +51,6 @@
|
|||
onLoad(option) {
|
||||
let that = this
|
||||
that.type = option.pageName
|
||||
uni.setNavigationBarTitle({
|
||||
title: option.pageName
|
||||
});
|
||||
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
|
|
|
|||
|
|
@ -3,20 +3,25 @@
|
|||
<!-- 列表 -->
|
||||
<view class="box">
|
||||
<view class="list" v-for="(item,ind) in infoList" :key="ind" @click="handleDetail(item)">
|
||||
<view class="time">{{item.time}}</view>
|
||||
<view class="time">
|
||||
<view class="date size14">{{item.time}}</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<view class="kcal">
|
||||
<view>摄入卡路里<text>{{item.val}}</text>{{item.unit}}</view>
|
||||
<view class="intake">
|
||||
{{$t('countIntake')}}{{$t('kcal')}}
|
||||
<text>{{item.val}}</text>{{item.unit}}
|
||||
</view>
|
||||
<view class="status">
|
||||
<text class="quan0" :style="'background:'+item.color"></text>
|
||||
{{item.describe}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="endtext" v-if="!lastPage || page >= lastPage">—— 到底了,看看别的吧 ——</view>
|
||||
<view class="endtext" v-if="!lastPage || page >= lastPage">—— {{$t('msgBottom')}} ——</view>
|
||||
<view v-if="!infoList.length" class="nolist">
|
||||
<icon class="iconfont icon-wancan"></icon>
|
||||
<text>还没有记录哦</text>
|
||||
<text>{{$t('msgNoMoreData')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -46,6 +51,9 @@
|
|||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleHistory')
|
||||
})
|
||||
that.page = 1
|
||||
that.handleList()
|
||||
},
|
||||
|
|
@ -53,7 +61,7 @@
|
|||
let that = this
|
||||
if (!this.lastPage || this.page >= this.lastPage) {
|
||||
uni.showToast({
|
||||
title: '没有更多数据!',
|
||||
title: that.$t('noMoreData'),
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
|
|
@ -68,6 +76,7 @@
|
|||
aud_id: that.user.aud_id,
|
||||
page: that.page,
|
||||
}).then(res => {
|
||||
console.log('aud_id', res)
|
||||
if (res.code == 0) {
|
||||
that.infoList = that.infoList.concat(res.data.content_list)
|
||||
that.lastPage = res.data.page_total
|
||||
|
|
@ -124,6 +133,18 @@
|
|||
width: 100%;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.quan0 {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
background: $uni-color-warning;
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.kcal {
|
||||
|
|
@ -138,17 +159,8 @@
|
|||
color: #000;
|
||||
}
|
||||
|
||||
.status {
|
||||
width: 85px;
|
||||
}
|
||||
|
||||
.quan0 {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
background: $uni-color-warning;
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
.intake {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,52 +67,48 @@
|
|||
</view>
|
||||
<!-- 加餐 -->
|
||||
<!-- 营养含量分析 -->
|
||||
<view v-if="drawerVisible" class="drawerVisible">
|
||||
<view class="bgVisible" @click="handleDrawerClose"></view>
|
||||
<view class="infoVisible">
|
||||
<scroll-view style="height: 100%;" scroll-y="true">
|
||||
<view class="foodDetail">
|
||||
<view class="foodInfo">
|
||||
<image :src="activeFoodDetail.pic_url" mode="aspectFill"></image>
|
||||
<view class="info">
|
||||
<view class="name">{{activeFoodDetail.name}}</view>
|
||||
<view class="kcal">{{activeFoodDetail.val}}千卡</view>
|
||||
</view>
|
||||
<uni-drawer ref="showRight" mode="right" width="300">
|
||||
<scroll-view style="height: 100%;" scroll-y="true">
|
||||
<view class="foodDetail">
|
||||
<view class="foodInfo">
|
||||
<image :src="activeFoodDetail.pic_url" mode="aspectFill"></image>
|
||||
<view class="info">
|
||||
<view class="name">{{activeFoodDetail.name}}</view>
|
||||
<view class="kcal">{{activeFoodDetail.val}}千卡</view>
|
||||
</view>
|
||||
<view class="foodContent">
|
||||
<view class="title">热量和营养</view>
|
||||
<view class="progress">
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts type="ring" :opts="opts" :canvas2d="true" v-if="chartVisible"
|
||||
canvasId="recordetailCharts" :chartData="chartData2" :cHeight="250"
|
||||
:cWidth="250" />
|
||||
<view class="uchart-kcal">{{activeFoodDetail.val}}</view>
|
||||
</div>
|
||||
<view class="info" v-if="activeFoodDetail.nutrients_four">
|
||||
<view class="info-item"
|
||||
v-for="(item,index) in activeFoodDetail.nutrients_four.slice(1)" :key="index">
|
||||
<view class="color" :style="{'background-color':`${item.color}`}"></view>
|
||||
<view>{{item.name}}:{{item.proportion}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="foodContent">
|
||||
<view class="title">热量和营养</view>
|
||||
<view class="progress">
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts type="ring" :opts="opts" :canvas2d="true" canvasId="recordetailCharts"
|
||||
:chartData="chartData2" :cHeight="250" :cWidth="250" />
|
||||
<view class="uchart-kcal">{{activeFoodDetail.val}}</view>
|
||||
</div>
|
||||
<view class="info" v-if="activeFoodDetail.nutrients_four">
|
||||
<view class="info-item" v-for="(item,index) in activeFoodDetail.nutrients_four.slice(1)"
|
||||
:key="index">
|
||||
<view class="color" :style="{'background-color':`${item.color}`}"></view>
|
||||
<view>{{item.name}}:{{item.proportion}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<text>营养素</text>
|
||||
<text>{{activeFoodDetail.weight}}含量</text>
|
||||
</view>
|
||||
<view class="foodDetailList">
|
||||
<view class="foodDetailItem" v-for="(item,index) in activeFoodDetail.nutrients_list"
|
||||
:key="index">
|
||||
<view class="name">{{item.name_ch}}</view>
|
||||
<view class="value">{{item.value}}{{item.unit}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<text>营养素</text>
|
||||
<text>{{activeFoodDetail.weight}}含量</text>
|
||||
</view>
|
||||
<view class="foodDetailList">
|
||||
<view class="foodDetailItem" v-for="(item,index) in activeFoodDetail.nutrients_list"
|
||||
:key="index">
|
||||
<view class="name">{{item.name_ch}}</view>
|
||||
<view class="value">{{item.value}}{{item.unit}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</uni-drawer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -121,14 +117,12 @@
|
|||
mapState
|
||||
} from "vuex";
|
||||
let next = 0
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
token: "",
|
||||
index: 0,
|
||||
drawerVisible: false,
|
||||
chartVisible: false, // 单独控制图表显示
|
||||
opts: {
|
||||
dataLabel: false,
|
||||
color: ["#5180D8", "#ED7886", "#FFB169"],
|
||||
|
|
@ -204,17 +198,6 @@
|
|||
data: chart_data
|
||||
}]
|
||||
}));
|
||||
that.$nextTick(() => {
|
||||
// 延迟显示图表,确保容器已渲染
|
||||
setTimeout(() => {
|
||||
that.chartVisible = true
|
||||
}, 100)
|
||||
})
|
||||
},
|
||||
handleDrawerClose() {
|
||||
// 先隐藏图表,再隐藏抽屉
|
||||
this.chartVisible = false
|
||||
this.drawerVisible = false;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,28 +10,31 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom">
|
||||
<view class="left">昵称</view>
|
||||
<view class="left">{{$t('infoNickname')}}</view>
|
||||
<view class="right">
|
||||
<input name="name" type="text" v-model="memInfo.nickname" placeholder="请输入" class="name" />
|
||||
<input name="name" type="text" v-model="memInfo.nickname" :placeholder="$t('verifyRecord')"
|
||||
class="name" />
|
||||
<icon class="iconfont icon-bianji" v-if="!memInfo.nickname"></icon>
|
||||
<icon class="iconfont icon-error" v-else @click="memInfo.nickname=''"></icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom">
|
||||
<view class="left">性别</view>
|
||||
<view class="left">{{$t('infoGender')}}</view>
|
||||
<view class="right">
|
||||
<picker mode="selector" :range="sexItem" @change="onsexArr">
|
||||
<view class="uni-input">{{memInfo.gender==0?'请选择':memInfo.gender==1?'男':'女'}}</view>
|
||||
<view class="uni-input">
|
||||
{{memInfo.gender==0?$t('verifyPicker'):memInfo.gender==1? $t('infoMan'):$t('infoWoman')}}
|
||||
</view>
|
||||
<icon class="iconfont icon-arrow-down"></icon>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom">
|
||||
<view class="left">出生日期</view>
|
||||
<view class="left">{{$t('infoBirthday')}}</view>
|
||||
<view class="right">
|
||||
<picker mode="date" :end="endDate" @change="maskClick"
|
||||
:value="memInfo.birthday?memInfo.birthday:endDate">
|
||||
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:"请选择"}}</view>
|
||||
:value="memInfo.birthday?memInfo.birthday:endDate" fields="day">
|
||||
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:$t('verifyPicker')}}</view>
|
||||
<icon class="iconfont icon-arrow-down"></icon>
|
||||
</picker>
|
||||
</view>
|
||||
|
|
@ -46,26 +49,26 @@
|
|||
</view>
|
||||
</view> -->
|
||||
<view class="lan border-bottom">
|
||||
<view class="left">身高</view>
|
||||
<view class="left">{{$t('infoHeight')}}</view>
|
||||
<view class="right">
|
||||
<input type="digit" v-model="memInfo.height" placeholder="请输入" />
|
||||
<input type="digit" v-model="memInfo.height" :placeholder="$t('verifyRecord')" />
|
||||
<text>cm</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom">
|
||||
<view class="left">体重</view>
|
||||
<view class="left">{{$t('infoWeight')}}</view>
|
||||
<view class="right">
|
||||
<input type="digit" v-model="memInfo.weight" placeholder="请输入" />
|
||||
<input type="digit" v-model="memInfo.weight" :placeholder="$t('verifyRecord')" />
|
||||
<text>kg</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom">
|
||||
<view class="left">活动系数</view>
|
||||
<view class="left">{{$t('infoActivityCoefficient')}}</view>
|
||||
<view class="right">
|
||||
<picker mode="selector" @change="changeClickType" :range="activityLevel" range-key="name"
|
||||
:value="levelInd">
|
||||
<view>
|
||||
{{memInfo.activity_level?activityLevel[levelInd].name:'请选择'}}
|
||||
{{memInfo.activity_level?activityLevel[levelInd].name:$t('verifyRecord')}}
|
||||
<icon class="iconfont icon-arrow-down"></icon>
|
||||
</view>
|
||||
</picker>
|
||||
|
|
@ -73,7 +76,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn" @click="confirmInfo">提交</view>
|
||||
<view class="btn" @click="confirmInfo">{{$t('btnSubmit')}}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -85,8 +88,8 @@
|
|||
data() {
|
||||
return {
|
||||
sexItem: [
|
||||
"男",
|
||||
"女"
|
||||
this.$t("infoMan"),
|
||||
this.$t("infoWoman")
|
||||
],
|
||||
levelInd: 0,
|
||||
isEdit: false,
|
||||
|
|
@ -111,6 +114,10 @@
|
|||
},
|
||||
onLoad(options) {
|
||||
// 编辑
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('infoPersonalProfile')
|
||||
})
|
||||
if (options.familayData) {
|
||||
let info = options.familayData
|
||||
this.memInfo = JSON.parse(info)
|
||||
|
|
@ -118,6 +125,7 @@
|
|||
} else if (this.user.aud_id) {
|
||||
this.memInfo = this.user
|
||||
this.levelInd = this.activityLevel.findIndex(ite => ite.val == this.memInfo.activity_level)
|
||||
console.log("11111", this.levelInd, this.activityLevel, this.memInfo)
|
||||
if (this.memInfo.activity_level == null) {
|
||||
this.levelInd = 0
|
||||
this.memInfo.activity_level = this.activityLevel[0].val
|
||||
|
|
@ -131,36 +139,35 @@
|
|||
let that = this
|
||||
console.log("activity_level", this.memInfo)
|
||||
if (!this.memInfo.nickname) {
|
||||
this.$tools.msg("请输入昵称")
|
||||
this.$tools.msg(that.$t('verifyNickName'))
|
||||
return;
|
||||
}
|
||||
if (!this.memInfo.gender) {
|
||||
this.$tools.msg("请选择性别")
|
||||
this.$tools.msg(that.$t('verifyGender'))
|
||||
return;
|
||||
}
|
||||
if (!this.memInfo.birthday) {
|
||||
this.$tools.msg("请选择出生日期")
|
||||
this.$tools.msg(that.$t('verifyBirthday'))
|
||||
return;
|
||||
}
|
||||
if (!this.memInfo.height) {
|
||||
this.$tools.msg("请输入身高")
|
||||
this.$tools.msg(that.$t('verifyHeight'))
|
||||
return;
|
||||
}
|
||||
if (!this.memInfo.weight) {
|
||||
this.$tools.msg("请输入体重")
|
||||
return;
|
||||
}
|
||||
if (!this.memInfo.activity_level) {
|
||||
this.$tools.msg("请选择活动系数")
|
||||
this.$tools.msg(that.$t('verifyWeight'))
|
||||
return;
|
||||
}
|
||||
// if (!this.memInfo.activity_level) {
|
||||
// this.$tools.msg(that.$t('verifyActivityCoefficient'))
|
||||
// return;
|
||||
// }
|
||||
that.subInfo(this.memInfo)
|
||||
},
|
||||
subInfo(data) {
|
||||
let that = this
|
||||
that.$model.getUserInfoEdit(data).then(res => {
|
||||
if (res.code == 0) {
|
||||
that.$tools.msg("提交成功");
|
||||
that.$store.dispatch("getUserInfo")
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
|
|
@ -172,12 +179,11 @@
|
|||
},
|
||||
//确定年龄
|
||||
maskClick(e) {
|
||||
console.log("出生日期", e.detail.value)
|
||||
this.memInfo.birthday = e.detail.value
|
||||
},
|
||||
//确定性别
|
||||
onsexArr(e) {
|
||||
this.memInfo.gender = this.sexItem[e.target.value] == "男" ? 1 : 2
|
||||
this.memInfo.gender = this.sexItem[e.target.value] == this.$t("infoMan") ? 1 : 2
|
||||
},
|
||||
changeClickType(e) {
|
||||
this.levelInd = e.target.value
|
||||
|
|
@ -219,14 +225,14 @@
|
|||
|
||||
.lan {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
|
||||
.left {
|
||||
width: 24%;
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
|
@ -235,15 +241,13 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
width: 76%;
|
||||
height: 100rpx;
|
||||
width: 75%;
|
||||
position: relative;
|
||||
text-align: right;
|
||||
|
||||
|
||||
/deep/input {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
height: 70rpx;
|
||||
border: none;
|
||||
background: inherit;
|
||||
width: 100%;
|
||||
|
|
@ -255,9 +259,13 @@
|
|||
|
||||
picker {
|
||||
width: 100%;
|
||||
min-height: 70rpx;
|
||||
text-align: right;
|
||||
border: none;
|
||||
margin-right: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
view {
|
||||
padding-right: 18px;
|
||||
|
|
@ -277,7 +285,7 @@
|
|||
color: #828282;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0;
|
||||
top: 10px;
|
||||
width: 60rpx;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,22 +3,22 @@
|
|||
<view class="login">
|
||||
<view class="editem">
|
||||
<view class="item">
|
||||
<view class="text">邮箱</view>
|
||||
<view class="text">{{$t("infoEmail")}}</view>
|
||||
<view class="input">
|
||||
<input v-model="phone" placeholder="请输入邮箱"/>
|
||||
<input v-model="phone" :placeholder="$t('verifyEmail')" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item ">
|
||||
<view class="text">验证码</view>
|
||||
<view class="text">{{$t("titleCode")}}</view>
|
||||
<view class="input yanzhengma">
|
||||
<input class="uni-input" v-model="code" />
|
||||
<button class="code" type="none" @click="handleCode" v-model="code"
|
||||
:disabled="disabled">{{second<60 ? second+'S后重发':'获取验证码'}}
|
||||
:disabled="disabled">{{second<60 ? second+$t("titleSendCodeRetry"):$t("titleSendCode")}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">确认</view>
|
||||
<view class="btnlogin" @click="handleOutLogin">{{$t("btnConfirm")}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -33,47 +33,50 @@
|
|||
second: 60,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('btnDeleteAccount')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 登录、
|
||||
handleTelLogin() {
|
||||
handleOutLogin() {
|
||||
let that = this
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
return
|
||||
}
|
||||
if (!that.code) {
|
||||
that.$tools.msg("请填写验证码")
|
||||
return
|
||||
}
|
||||
that.$model.getAccountMsg({
|
||||
data: that.phone,
|
||||
code: that.code,
|
||||
}).then(res => {
|
||||
if (res.code != 0) {
|
||||
that.$tools.msg(res.msg)
|
||||
return
|
||||
} else {
|
||||
that.$tools.msg("设置成功!")
|
||||
that.$store.commit('changeAccountNumber', {
|
||||
my_email: that.phone
|
||||
})
|
||||
setTimeout(function() {
|
||||
uni.redirectTo({
|
||||
url: "/pageTwo/setting/setting"
|
||||
uni.showModal({
|
||||
title: that.$t("msgTitle"),
|
||||
confirmText: that.$t("btnDelete"),
|
||||
content: that.$t("verifyDeleteAccount"),
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getDeleteAccount({
|
||||
code: that.code
|
||||
}).then((res) => {
|
||||
if (res.code != 0) return
|
||||
that.$tools.msg(that.$t('msgDelete'));
|
||||
uni.setStorageSync('token', null)
|
||||
uni.setStorageSync('aan_id', null)
|
||||
uni.clearStorageSync()
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: "/pageTwo/login/login"
|
||||
})
|
||||
}, 3000);
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
}).catch(err => {})
|
||||
} else if (res.cancel) {
|
||||
that.$tools.msg(that.$t("msgCancel"));
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
// 获取验证码
|
||||
handleCode() {
|
||||
let that = this
|
||||
if (!that.phone) {
|
||||
that.$tools.msg("请输入邮箱")
|
||||
that.$tools.msg(that.$t("verifyEmail"))
|
||||
return
|
||||
}
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
//
|
||||
|
|
@ -114,7 +117,7 @@
|
|||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
|
||||
|
||||
z-index: 99;
|
||||
|
||||
.title {
|
||||
|
|
@ -138,19 +141,21 @@
|
|||
.item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.text {
|
||||
width: 80px;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: calc(100% - 100px);
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
display: flex;
|
||||
|
|
@ -173,14 +178,15 @@
|
|||
|
||||
.yanzhengma {
|
||||
input {
|
||||
right: 140rpx;
|
||||
right: 180px;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.code {
|
||||
width: 120rpx;
|
||||
color: #333;
|
||||
width: 180px;
|
||||
background: #dfdfdf;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -3,19 +3,34 @@
|
|||
<view class="login">
|
||||
<view class="editem">
|
||||
<view class="item">
|
||||
<view class="text">密码</view>
|
||||
<view class="text">{{$t("infoEmail")}}</view>
|
||||
<view class="input">
|
||||
<input class="uni-input" v-model="password" placeholder="请输入密码" />
|
||||
<input v-model="phone" :placeholder="$t('verifyEmail')" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item ">
|
||||
<view class="text">{{$t("titleCode")}}</view>
|
||||
<view class="input yanzhengma">
|
||||
<input class="uni-input" v-model="code" />
|
||||
<button class="code" type="none" @click="handleCode" v-model="code"
|
||||
:disabled="disabled">{{second<60 ? second+$t("titleSendCodeRetry"):$t("titleSendCode")}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="text">确认密码</view>
|
||||
<view class="text">{{$t('titlePassword')}}</view>
|
||||
<view class="input">
|
||||
<input class="uni-input" v-model="password2" placeholder="请输入确认密码" />
|
||||
<input class="uni-input" v-model="password" :placeholder="$t('verifyPassword')" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="text">{{$t('titleConfirmPassword')}}</view>
|
||||
<view class="input">
|
||||
<input class="uni-input" v-model="password2" :placeholder="$t('verifyPasswordTwo')" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">确认</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">{{$t('btnSubmit')}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -26,26 +41,45 @@
|
|||
return {
|
||||
password: "",
|
||||
password2: "",
|
||||
phone: "",
|
||||
code: "",
|
||||
disabled: false,
|
||||
second: 60,
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titlePasswordEdit')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 登录、
|
||||
handleTelLogin() {
|
||||
let that = this
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
if (!that.code) {
|
||||
that.$tools.msg(that.$t("verifyCode"))
|
||||
return
|
||||
}
|
||||
if (!that.password) {
|
||||
that.$tools.msg("请填写密码")
|
||||
that.$tools.msg(that.$t('verifyPassword'))
|
||||
return
|
||||
}
|
||||
if (!that.password2) {
|
||||
that.$tools.msg("请确认密码")
|
||||
that.$tools.msg(that.$t('verifyPasswordTwo'))
|
||||
return
|
||||
}
|
||||
if (that.password2 != that.password) {
|
||||
that.$tools.msg("请确认两次密码填写一致")
|
||||
that.$tools.msg(that.$t('verifyPasswordCorrect'))
|
||||
return
|
||||
}
|
||||
that.$model.getAccountPassword({
|
||||
data: that.phone,
|
||||
code: that.code,
|
||||
password: that.password,
|
||||
c_password: that.password2,
|
||||
}).then(res => {
|
||||
|
|
@ -53,13 +87,45 @@
|
|||
if (res.code != 0) {
|
||||
that.$tools.msg(res.msg)
|
||||
} else {
|
||||
that.$tools.msg("密码设置成功")
|
||||
that.$tools.msg(that.$t('msgSetSuccess'))
|
||||
setTimeout(function() {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}
|
||||
}).catch(err => {})
|
||||
},
|
||||
// 获取验证码
|
||||
handleCode() {
|
||||
let that = this
|
||||
if (!that.phone) {
|
||||
that.$tools.msg(that.$t("verifyEmail"))
|
||||
return
|
||||
}
|
||||
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t("verifyEmailCorrect"))
|
||||
return
|
||||
}
|
||||
//
|
||||
that.$model.getSendCode({
|
||||
data: that.phone,
|
||||
// type: that.type
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code != 0) {
|
||||
that.$tools.msg(res.msg)
|
||||
return
|
||||
}
|
||||
that.disabled = true
|
||||
let interval = setInterval(() => {
|
||||
--that.second
|
||||
}, 1000)
|
||||
setTimeout(() => {
|
||||
clearInterval(interval)
|
||||
that.disabled = false
|
||||
that.second = 60
|
||||
}, 60000)
|
||||
}).catch(err => {})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -91,19 +157,21 @@
|
|||
.item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.text {
|
||||
width: 80px;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: calc(100% - 100px);
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
display: flex;
|
||||
|
|
@ -123,9 +191,28 @@
|
|||
z-index: 88;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.yanzhengma {
|
||||
input {
|
||||
right: 180px;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.code {
|
||||
color: #333;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 35px;
|
||||
font-size: 14px;
|
||||
box-sizing: border-box;
|
||||
width: 180px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.btnlogin {
|
||||
width: 100%;
|
||||
margin: 30rpx 0;
|
||||
|
|
|
|||
|
|
@ -3,22 +3,22 @@
|
|||
<view class="login">
|
||||
<view class="editem">
|
||||
<view class="item">
|
||||
<view class="text">手机号</view>
|
||||
<view class="text">{{$t('infoMobile')}}</view>
|
||||
<view class="input">
|
||||
<input v-model="phone" placeholder="请输入手机号" />
|
||||
<input v-model="phone" :placeholder="$t('verifyMobile')" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item ">
|
||||
<view class="text">验证码</view>
|
||||
<view class="text">{{$t('titleCode')}}</view>
|
||||
<view class="input yanzhengma">
|
||||
<input class="uni-input" v-model="code" />
|
||||
<button class="code" type="none" @click="handleCode" v-model="code"
|
||||
:disabled="disabled">{{second<60 ? second+'S后重发':'获取验证码'}}
|
||||
:disabled="disabled">{{second<60 ? second+$t('titleSendCodeRetry'):$t('titleSendCode')}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">确认</view>
|
||||
<view class="btnlogin" @click="handleTelLogin">{{$t('btnSubmit')}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -33,16 +33,22 @@
|
|||
second: 60,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titlePhone')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 登录、
|
||||
handleTelLogin() {
|
||||
let that = this
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t('verifyMobileCorrect'))
|
||||
return
|
||||
}
|
||||
if (!that.code) {
|
||||
that.$tools.msg("请填写验证码")
|
||||
that.$tools.msg(that.$t('verifyCode'))
|
||||
return
|
||||
}
|
||||
that.$model.getAccountMsg({
|
||||
|
|
@ -53,7 +59,7 @@
|
|||
that.$tools.msg(res.msg)
|
||||
return
|
||||
} else {
|
||||
that.$tools.msg("设置成功!")
|
||||
that.$tools.msg(that.$t('msgSetSuccess'))
|
||||
that.$store.commit('changeAccountNumber', {
|
||||
my_tel: that.phone
|
||||
})
|
||||
|
|
@ -69,11 +75,11 @@
|
|||
handleCode() {
|
||||
let that = this
|
||||
if (!that.phone) {
|
||||
that.$tools.msg("请输入手机号")
|
||||
that.$tools.msg(that.$t('verifyMobile'))
|
||||
return
|
||||
}
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
that.$tools.msg(that.$t('verifyMobileCorrect'))
|
||||
return
|
||||
}
|
||||
//
|
||||
|
|
@ -179,7 +185,7 @@
|
|||
}
|
||||
|
||||
.code {
|
||||
width: 120rpx;
|
||||
width: auto;
|
||||
background: #dfdfdf;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -1,24 +1,29 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="caritem" @click="navTo('/pageTwo/setting/phone')">
|
||||
<view class="text">手机号</view>
|
||||
<!-- <view class="caritem" @click="navTo('/pageTwo/setting/phone')">
|
||||
<view class="text">{{$t('infoMobile')}}</view>
|
||||
<view class="text_r">
|
||||
<text>{{userinfo.tel?userinfo.tel:''}}</text>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="caritem" @click="navTo('/pageTwo/setting/email')">
|
||||
<view class="text">邮箱</view>
|
||||
<view class="text">{{$t('infoEmail')}}</view>
|
||||
<view class="text_r">
|
||||
<text>{{userinfo.email}}</text>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="caritem" @click="navTo('/pageTwo/setting/password')">
|
||||
<view class="text">设置密码</view>
|
||||
<view class="text">{{$t('titleSetPassword')}}</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<view class="caritem" @click="navTo('/pageTwo/setting/email')">
|
||||
<view class="text">{{$t('btnDeleteAccount')}}</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<!-- <view class="btn mb-15" @click="handleOutLogin">删除账号</view> -->
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -40,18 +45,24 @@
|
|||
return this.user
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleSet')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleOutLogin() {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
confirmText: '删除',
|
||||
content: '删除成功后,该账号的所有关联信息将被清空且无法找回,是否删除?',
|
||||
title: that.$t('msgTitle'),
|
||||
confirmText: that.$t('btnDelete'),
|
||||
content: that.$t('verifyDeleteAccount'),
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getdeleteAccount({}).then((res) => {
|
||||
that.$model.getDeleteAccount({}).then((res) => {
|
||||
if (res.code != 0) return
|
||||
that.$tools.msg("删除成功!");
|
||||
that.$tools.msg(that.$t('msgDelete'));
|
||||
uni.setStorageSync('token', null)
|
||||
uni.setStorageSync('aan_id', null)
|
||||
uni.clearStorageSync()
|
||||
|
|
@ -62,7 +73,7 @@
|
|||
}, 3000);
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
that.$tools.msg("您已取消操作!");
|
||||
that.$tools.msg(that.$t('msgCancel'));
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
@ -123,7 +134,7 @@
|
|||
}
|
||||
|
||||
.btn {
|
||||
width: auto;
|
||||
width: 90%;
|
||||
background: #999;
|
||||
margin: 100rpx 30rpx 0 30rpx;
|
||||
}
|
||||
|
|
|
|||
24
pages.json
24
pages.json
|
|
@ -24,14 +24,14 @@
|
|||
}, {
|
||||
"path": "pages/count/count",
|
||||
"style": {
|
||||
"navigationBarTitleText": "计食",
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "pages/me/me",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"navigationBarTitleText": " ",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
|
|
@ -182,7 +182,7 @@
|
|||
{
|
||||
"path": "setting/email",
|
||||
"style": {
|
||||
"navigationBarTitleText": "绑定邮箱",
|
||||
"navigationBarTitleText": "删除账号",
|
||||
"enablePullDownRefresh": false
|
||||
|
||||
}
|
||||
|
|
@ -206,6 +206,12 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "营养分析"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "me/about",
|
||||
"style": {
|
||||
"navigationBarTitleText": "关于我们"
|
||||
}
|
||||
}
|
||||
]
|
||||
}],
|
||||
|
|
@ -225,18 +231,6 @@
|
|||
"selectedIconPath": "static/home01.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/search/search",
|
||||
"iconPath": "static/cai.png",
|
||||
"selectedIconPath": "static/cai01.png",
|
||||
"text": "教你做"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/add/add",
|
||||
"iconPath": "static/add.png",
|
||||
"selectedIconPath": "static/add.png",
|
||||
"text": ""
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/count/count",
|
||||
"iconPath": "static/ji.png",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
所需食材
|
||||
</view>
|
||||
<view class="foodlist">
|
||||
<view class="item" v-for="(ite,ind) in info.tags[0].list" :key="ind" v-if="info.tags[0].list.length">
|
||||
<view class="item" v-for="(ite,ind) in info.food_list" :key="ind" v-if="info.food_list.length">
|
||||
<view class="name">{{ite.name}}</view>
|
||||
<view class="weight">
|
||||
{{ite.weight}}{{ite.unit}}
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
cook_label: null,
|
||||
title: "",
|
||||
description: "",
|
||||
tags: [],
|
||||
food_list: [],
|
||||
cover: null, //封面id
|
||||
step_list: []
|
||||
},
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["configInfo","user"]),
|
||||
...mapState(["configInfo"]),
|
||||
menu() {
|
||||
return this.configInfo.cookbook_label
|
||||
},
|
||||
|
|
@ -270,10 +270,6 @@
|
|||
that.$tools.msg("登录后查看等多!")
|
||||
return
|
||||
}
|
||||
if (that.user.aud_id == '') {
|
||||
that.$tools.msg("完善资料后查看更多")
|
||||
return
|
||||
}
|
||||
if (!that.info.cover) {
|
||||
that.$tools.msg("请上传封面图!")
|
||||
return
|
||||
|
|
@ -338,8 +334,8 @@
|
|||
that.FMimg = ""
|
||||
that.cookIndex = null
|
||||
setTimeout(function() {
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/me/mymenu?pageName=我的菜谱"
|
||||
uni.switchTab({
|
||||
url: "/pages/menu/menu"
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
<template>
|
||||
<view class="content" >
|
||||
<view class="content">
|
||||
<view v-if="!token" class="list2" @click="handleLogin()">
|
||||
<view class="nolist">
|
||||
<icon class="iconfont icon-zanwushuju"></icon>
|
||||
<text>登录后查看更多哦!</text>
|
||||
<text>{{$t('msgLoginTips')}}!</text>
|
||||
</view>
|
||||
<view class="btn">登录</view>
|
||||
<view class="btn">{{$t('titleLogin')}}</view>
|
||||
</view>
|
||||
<view v-else class="content_box">
|
||||
<!-- 称重 -->
|
||||
<view class="blue-tooth" v-if="user.aud_id!=''">
|
||||
<blue-tooth :btnType="'1'"></blue-tooth>
|
||||
<view class="blue-tooth" v-if="user.aud_id && isBle">
|
||||
<blue-tooth :btnType="btnType"></blue-tooth>
|
||||
</view>
|
||||
<!-- 每日摄入 -->
|
||||
<view class="box" v-if="user.aud_id!=''">
|
||||
<!-- 日期选择 -->
|
||||
<view class="data">
|
||||
<picker mode="date" :end="endDate" @change="changeClickDate"
|
||||
:value="foodInfo.date?foodInfo.date:endDate">
|
||||
:value="foodInfo.date?foodInfo.date:endDate" fields="day">
|
||||
<view>
|
||||
{{foodInfo.date?foodInfo.date:"请选择"}}
|
||||
{{foodInfo.date?foodInfo.date:$t('verifyPicker')}}
|
||||
<image src="/static/qie.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
|
|
@ -27,27 +27,26 @@
|
|||
<!-- 能量摄入 -->
|
||||
<view class="everyDay">
|
||||
<view class="title">
|
||||
<view>热量摄入</view>
|
||||
<view>{{$t('countCalorieIntake')}}</view>
|
||||
<view class="icon" @click="handleSet">
|
||||
<icon class="iconfont icon-shezhi1"></icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="jishiqi">
|
||||
<view class="left">
|
||||
<view class="left" v-if="foodInfo.list.length">
|
||||
<view class="chart-wrap">
|
||||
<qiun-data-charts type="arcbar" :chartData="chartData" :cHeight="280" :cWidth="280"
|
||||
:canvas2d="true" canvasId="countCharts" v-if="handTrue" />
|
||||
<qiun-data-charts type="arcbar" :chartData="chartData" />
|
||||
<view class="center">
|
||||
摄入
|
||||
{{$t('countIntake')}}
|
||||
<text>{{foodInfo.nutrients_four[0].today_intake}}</text>
|
||||
<view class="unit">Kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mubiao">
|
||||
目标:<text>{{foodInfo.nutrients_four[0].suggestion}}</text>kcal
|
||||
{{$t('titleBody')}}:<text>{{foodInfo.nutrients_four[0].suggestion}}</text>kcal
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="right" v-if="foodInfo.list.length">
|
||||
<view class="item" v-for="(ite,ind) in foodInfo.nutrients_four.slice(1)">
|
||||
<view class="left-icon">
|
||||
<image :src="ite.icon"></image>
|
||||
|
|
@ -61,7 +60,8 @@
|
|||
</text>
|
||||
</view>
|
||||
<view class="right-info-bottom">
|
||||
<view class="val" :style="{ width: ite.proportion + '%',background:ite.color}">
|
||||
<view class="val"
|
||||
:style="{ width: Number(ite.proportion) + '%',background:ite.color}">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 早午晚餐 -->
|
||||
<view class="foodtools">
|
||||
<view class="foodtools" v-if="foodInfo.list.length">
|
||||
<view class="type" v-for="(item,index) in foodInfo.list">
|
||||
<view class="title" @click="handledetail(index)">
|
||||
<view class="text">
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
<text>{{item.val}}{{item.unit}}</text>
|
||||
</view>
|
||||
<view class="detail">
|
||||
餐食详情
|
||||
{{$t('countMealdetails')}}
|
||||
<uni-icons type="forward" size="20" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -90,78 +90,74 @@
|
|||
<view class="item" @click="showFoodDetail(ite)">
|
||||
<image :src="ite.pic_url" mode="aspectFill"></image>
|
||||
<view class="weight">
|
||||
<view>{{ite.name}}</view>
|
||||
<view class="overflow bold">{{ite.name}}</view>
|
||||
<view class="size12 c999">{{ite.weight}}<text>|</text>{{ite.val}}kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-swipe-action-item>
|
||||
</uni-swipe-action>
|
||||
<view class="add" @click="handleAddFood(item.name)">
|
||||
<text>+</text>添加食物
|
||||
<view class="add" @click="handleAddFood(index)">
|
||||
<text>+</text>{{$t('countAddFood')}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fenxi" @click="navTo('/pageTwo/count/everyDay?page=count')">
|
||||
<image src="/static/fenxi.png"></image>
|
||||
营养分析
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="list2" @click="handleEditUser()">
|
||||
<view class="nolist">
|
||||
<image src="/static/none.png"></image>
|
||||
<text>完善资料后,记录更准确哦!</text>
|
||||
<text>{{$t('msgAddUser')}}</text>
|
||||
</view>
|
||||
<view class="btn">完善资料</view>
|
||||
<view class="btn">{{$t('ImproveInformation')}}</view>
|
||||
</view>
|
||||
<view class="fenxi" @click="navTo('/pageTwo/count/everyDay?page=count')" v-if="user.aud_id!=''">
|
||||
<image src="/static/fenxi.png"></image>
|
||||
{{$t('titleeveryDay')}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 营养含量分析 -->
|
||||
<view v-if="drawerVisible" class="drawerVisible">
|
||||
<view class="bgVisible" @click="handleDrawerClose"></view>
|
||||
<view class="infoVisible">
|
||||
<scroll-view style="height: 100%;" scroll-y="true">
|
||||
<view class="foodDetail">
|
||||
<view class="foodInfo">
|
||||
<image :src="activeFoodDetail.pic_url" mode="aspectFill"></image>
|
||||
<view class="info">
|
||||
<view class="name">{{activeFoodDetail.name}}</view>
|
||||
<view class="kcal">{{activeFoodDetail.val}}千卡</view>
|
||||
</view>
|
||||
<uni-drawer ref="showRight" mode="right">
|
||||
<scroll-view style="height: 100%;" scroll-y="true">
|
||||
<view class="foodDetail">
|
||||
<view class="foodInfo">
|
||||
<image :src="activeFoodDetail.pic_url" mode="aspectFill"></image>
|
||||
<view class="info">
|
||||
<view class="name">{{activeFoodDetail.name}}</view>
|
||||
<view class="kcal">{{activeFoodDetail.val}}kcal</view>
|
||||
</view>
|
||||
<view class="foodContent">
|
||||
<view class="title">热量和营养</view>
|
||||
<view class="progress">
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts v-if="chartVisible" type="ring" :opts="opts"
|
||||
:chartData="chartData2" :cHeight="280" :cWidth="280" />
|
||||
</div>
|
||||
<view class="info" v-if="activeFoodDetail.nutrients_four">
|
||||
<view class="info-item"
|
||||
v-for="(item,index) in activeFoodDetail.nutrients_four.slice(1)" :key="index">
|
||||
<view class="color" :style="{'background-color':`${item.color}`}">
|
||||
</view>
|
||||
<view>{{item.name}}:{{item.proportion}}%</view>
|
||||
</view>
|
||||
<view class="foodContent">
|
||||
<view class="title">{{$t('CaloriesAndnutrients')}}</view>
|
||||
<view class="progress">
|
||||
<div class="chart-wrap">
|
||||
<qiun-data-charts type="ring" :opts="opts" :chartData="chartData2" />
|
||||
</div>
|
||||
<view class="info" v-if="activeFoodDetail.nutrients_four">
|
||||
<view class="info-item" v-for="(item,index) in activeFoodDetail.nutrients_four.slice(1)"
|
||||
:key="index">
|
||||
<view class="color" :style="{'background-color':`${item.color}`}">
|
||||
</view>
|
||||
<view>{{item.name}}:{{item.proportion}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<text>营养素</text>
|
||||
<text>{{activeFoodDetail.weight}}含量</text>
|
||||
</view>
|
||||
<view class="foodDetailList">
|
||||
<view class="foodDetailItem" v-for="(item,index) in activeFoodDetail.nutrients_list"
|
||||
:key="index">
|
||||
<view class="name">{{item.name_ch}}</view>
|
||||
<view class="value">{{item.value}}{{item.unit}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<text>{{$t('Nutrients')}}</text>
|
||||
<text>{{activeFoodDetail.weight}}{{$t('Content')}}</text>
|
||||
</view>
|
||||
<view class="foodDetailList">
|
||||
<view class="foodDetailItem" v-for="(item,index) in activeFoodDetail.nutrients_list"
|
||||
:key="index">
|
||||
<view class="name">{{item.name_ch}}</view>
|
||||
<view class="value">{{item.value}}{{item.unit}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</uni-drawer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -170,12 +166,13 @@
|
|||
mapState
|
||||
} from "vuex";
|
||||
import blueTooth from "../../components/bluetooth_food.vue"
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
token: "",
|
||||
index: 0,
|
||||
btnType: 1,
|
||||
opts: {
|
||||
background: "transparent",
|
||||
title: {
|
||||
|
|
@ -188,14 +185,12 @@
|
|||
color: "#3CB383"
|
||||
}]
|
||||
},
|
||||
isBle: true,
|
||||
isBle: false,
|
||||
handTrue: false,
|
||||
chartData2: {},
|
||||
activeFoodDetail: {},
|
||||
drawerVisible: false,
|
||||
chartVisible: false, // 单独控制图表显示
|
||||
actionOptions: [{
|
||||
text: '删除',
|
||||
text: this.$t('btnDelete'),
|
||||
style: {
|
||||
backgroundColor: '#dd524d',
|
||||
borderRadius: '10rpx'
|
||||
|
|
@ -211,17 +206,22 @@
|
|||
...mapState(["user", "countFoodInfo"]),
|
||||
foodInfo() {
|
||||
let that = this
|
||||
that.handTrue = false
|
||||
this.$nextTick(() => {
|
||||
that.handTrue = true
|
||||
that.chartData.series[0].data = Number(that.countFoodInfo.nutrients_four[0].proportion) / 100
|
||||
let info = that.countFoodInfo
|
||||
that.$nextTick(() => {
|
||||
that.isBle = true
|
||||
that.chartData.series[0].data = info.remaining_kcal ? Number(info.nutrients_four[0].proportion) / 100 : 0
|
||||
})
|
||||
return that.countFoodInfo
|
||||
return info
|
||||
},
|
||||
endDate() {
|
||||
return this.$tools.getDate("start")
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
// uni.setNavigationBarTitle({
|
||||
// title: this.$t('titleCount')
|
||||
// })
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
that.token = uni.getStorageSync('token')
|
||||
|
|
@ -239,10 +239,9 @@
|
|||
methods: {
|
||||
// 详情
|
||||
showFoodDetail(item) {
|
||||
console.log("item", item)
|
||||
let that = this
|
||||
let chart_data = []
|
||||
this.drawerVisible = true;
|
||||
this.$refs.showRight.open();
|
||||
that.opts.color = []
|
||||
that.activeFoodDetail = item
|
||||
for (let i = 1; i < item.nutrients_four.length; ++i) {
|
||||
|
|
@ -258,17 +257,6 @@
|
|||
data: chart_data
|
||||
}]
|
||||
}));
|
||||
that.$nextTick(() => {
|
||||
// 延迟显示图表,确保容器已渲染
|
||||
setTimeout(() => {
|
||||
that.chartVisible = true
|
||||
}, 100)
|
||||
})
|
||||
},
|
||||
handleDrawerClose() {
|
||||
// 先隐藏图表,再隐藏抽屉
|
||||
this.chartVisible = false
|
||||
this.drawerVisible = false;
|
||||
},
|
||||
changeClickDate(e) {
|
||||
this.$store.dispatch("getCountFoodInfo", {
|
||||
|
|
@ -295,10 +283,10 @@
|
|||
})
|
||||
},
|
||||
// 添加食物
|
||||
handleAddFood(name) {
|
||||
handleAddFood(index) {
|
||||
this.isShow = false
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/count/search?name=" + name + "&time=" + this.foodInfo.date
|
||||
url: "/pageTwo/count/search?index=" + index + "&time=" + this.foodInfo.date
|
||||
})
|
||||
},
|
||||
// 去登录
|
||||
|
|
@ -317,7 +305,7 @@
|
|||
delAcitionItem(item) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
content: `是否删除[${item.name}]?`,
|
||||
content: that.$t('WhetherTodelete') + item.name,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.$model.delCEatAction({
|
||||
|
|
@ -400,9 +388,8 @@
|
|||
|
||||
.chart-wrap {
|
||||
position: relative;
|
||||
width: 250rpx;
|
||||
height: 250rpx;
|
||||
margin-top: -30rpx;
|
||||
width: 280rpx;
|
||||
height: 280rpx;
|
||||
margin-left: -5px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
|
@ -412,7 +399,7 @@
|
|||
width: 280rpx;
|
||||
height: 210rpx;
|
||||
position: absolute;
|
||||
top: 64rpx;
|
||||
top: 44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -456,7 +443,7 @@
|
|||
}
|
||||
|
||||
.text {
|
||||
width: 50%;
|
||||
width: 65%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
|
@ -495,6 +482,7 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: calc(100% - 110rpx);
|
||||
margin-left: 20rpx;
|
||||
|
||||
text {
|
||||
|
|
@ -618,10 +606,4 @@
|
|||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.no-scroll {
|
||||
height: 80vh !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<view class="content">
|
||||
<view class="box1 box" v-if="!token" @click="handleLogin">
|
||||
<view class="info2">
|
||||
未登录,点击登录
|
||||
{{$t('msgLoginTips')}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 个人资料 -->
|
||||
|
|
@ -12,7 +12,8 @@
|
|||
<view class="name" @click="handleUserEdit">
|
||||
<image :src="info.head_pic"></image>
|
||||
<text class="bold">{{info.nickname}}</text>
|
||||
<text>{{info.gender=='1'?'男':'女'}}</text>
|
||||
<text>{{info.gender=='1'?$t('infoMan'):$t('infoWoman')}}</text>
|
||||
|
||||
</view>
|
||||
<view class="edit" @click="handleUserEdit">
|
||||
<image src="/static/26.png"></image>
|
||||
|
|
@ -20,22 +21,22 @@
|
|||
</view>
|
||||
<view class="age">
|
||||
<view class="age-item">
|
||||
<view><text>{{info.age}}</text>岁</view>
|
||||
<view>年龄</view>
|
||||
<view><text>{{info.age}}</text></view>
|
||||
<view>{{$t("infoAge")}}</view>
|
||||
</view>
|
||||
<view class="age-item age-item2">
|
||||
<view><text>{{info.weight}}</text>kg</view>
|
||||
<view>体重</view>
|
||||
<view><text>{{info.weight}}</text></view>
|
||||
<view>{{$t("infoWeight")}}</view>
|
||||
</view>
|
||||
<view class="age-item">
|
||||
<view><text>{{info.height}}</text>cm</view>
|
||||
<view>身高</view>
|
||||
<view><text>{{info.height}}</text></view>
|
||||
<view>{{$t("infoHeight")}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box1 box" v-else @click="handleUserEdit">
|
||||
<view class="info2">
|
||||
完善资料后,记录更准确哦!
|
||||
{{$t('msgAddUser')}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -45,21 +46,21 @@
|
|||
<view class="date">{{foodInfo.date}}</view>
|
||||
<view class="detail" @click="navTo('/pageTwo/count/everyDay?page=home')">
|
||||
<image src="/static/fenxi.png"></image>
|
||||
营养分析
|
||||
{{$t('titleeveryDay')}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="left">
|
||||
<view class="left" v-if="foodInfo.list.length">
|
||||
<view class="chart-wrap">
|
||||
<qiun-data-charts v-if="handTrue" type="arcbar" :chartData="chartData" :cHeight="280"
|
||||
:cWidth="280" />
|
||||
<qiun-data-charts v-if="handTrue" type="arcbar" :chartData="chartData" :cHeight="320"
|
||||
:cWidth="320" />
|
||||
<view class="center">
|
||||
摄入
|
||||
{{$t('countIntake')}}
|
||||
<text>{{foodInfo.nutrients_four[0].today_intake}}</text>
|
||||
<view class="unit">Kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mubiao">
|
||||
目标:<text>{{foodInfo.nutrients_four[0].suggestion}}</text>kcal
|
||||
{{$t('titleBody')}}:<text>{{foodInfo.nutrients_four[0].suggestion}}</text>kcal
|
||||
</view>
|
||||
</view>
|
||||
<view class="right" v-if="foodInfo.list.length">
|
||||
|
|
@ -93,8 +94,8 @@
|
|||
<view class="kcal">
|
||||
<text>{{ite.val}}</text>kcal
|
||||
</view>
|
||||
<view class="tools-btn" @click="navTo('/pageTwo/count/search?name='+ite.name+'&time='+foodInfo.date)">
|
||||
添加
|
||||
<view class="tools-btn" @click="navTo('/pageTwo/count/search?index='+ind+'&time='+foodInfo.date)">
|
||||
{{$t('btnAdd')}}
|
||||
</view>
|
||||
<view class="add" @click="navTo('/pageTwo/count/everyMeal?page=home&index='+ind)">
|
||||
<image src="/static/xiangqing.png"></image>
|
||||
|
|
@ -103,7 +104,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 搜索 -->
|
||||
<view class="serachBox">
|
||||
<!-- <view class="serachBox">
|
||||
<view class="title">
|
||||
<view class="quan mr-5"></view>教你做
|
||||
</view>
|
||||
|
|
@ -113,7 +114,7 @@
|
|||
<image src="/static/28.png"></image>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 轮播 -->
|
||||
<view class="f_banner footbox" v-if="configInfo.banner_data.length">
|
||||
|
|
@ -130,20 +131,12 @@
|
|||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
token: "",
|
||||
handTrue: false,
|
||||
// foodInfo: {
|
||||
// date: "",
|
||||
// list: [],
|
||||
// details: {},
|
||||
// remaining_kcal: 0,
|
||||
// nutrients_four: [],
|
||||
// trace_elements_all_day: []
|
||||
// },
|
||||
unwatch: null,
|
||||
chartData: {
|
||||
series: [{
|
||||
|
|
@ -167,9 +160,9 @@
|
|||
foodInfo() {
|
||||
let that = this
|
||||
this.handTrue = false
|
||||
that.$nextTick(() => {
|
||||
that.handTrue = true
|
||||
that.chartData.series[0].data = that.user.aud_id ? Number(that.user.food_count
|
||||
this.$nextTick(() => {
|
||||
this.handTrue = true
|
||||
that.chartData.series[0].data = this.user.aud_id ? Number(this.user.food_count
|
||||
.nutrients_four[0].proportion) / 100 : 0
|
||||
})
|
||||
return this.user.aud_id ? this.user.food_count : this.configInfo.default_count_foot
|
||||
|
|
@ -177,15 +170,12 @@
|
|||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.setNavigationBarTitle({
|
||||
title: that.$t('titleHome')
|
||||
})
|
||||
that.token = uni.getStorageSync('token')
|
||||
that.$store.dispatch("getHomeConfig")
|
||||
if (that.token) {
|
||||
console.log("首页搜索蓝牙",that.bleValue)
|
||||
that.$ble.closeBLEConnection(that.bleValue.deviceId)
|
||||
that.$ble.closeBluetoothAdapter()
|
||||
setTimeout(function() {
|
||||
that.$ble.openBluetoothAdapter()
|
||||
}, 500);
|
||||
that.$ble.openBluetoothAdapter()
|
||||
}
|
||||
that.$ble.onBLEConnectionStateChange()
|
||||
uni.onBluetoothAdapterStateChange(function(res) {
|
||||
|
|
@ -196,8 +186,7 @@
|
|||
let that = this
|
||||
that.index = 0
|
||||
that.footlist = []
|
||||
that.chartData.series[0].data = 0
|
||||
that.$store.dispatch("getHomeConfig")
|
||||
that.$store.dispatch("getUserInfo")
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 500);
|
||||
|
|
@ -216,16 +205,7 @@
|
|||
this.stopWatching()
|
||||
},
|
||||
methods: {
|
||||
handleInfo() {
|
||||
let that = this
|
||||
this.$nextTick(() => {
|
||||
that.chartData.series[0].data = that.user.aud_id ? 0 : Number(that.user.food_count
|
||||
.nutrients_four[0]
|
||||
.proportion) / 100
|
||||
})
|
||||
},
|
||||
startWatching() {
|
||||
console.log("99999999",this.bleValue)
|
||||
this.unwatch = this.$watch('bleValue', (newVal, oldVal) => {
|
||||
// 这里可以执行你的业务逻辑
|
||||
if (newVal.serviceId != '' && newVal.oldCountWeight != newVal.countWeight) {
|
||||
|
|
@ -257,30 +237,15 @@
|
|||
url: "/pageTwo/me/userEdit"
|
||||
})
|
||||
},
|
||||
handleAddFood(name) {
|
||||
let that = this
|
||||
if (!that.token) {
|
||||
that.$tools.msg("登录后查看更多")
|
||||
return
|
||||
}
|
||||
if (that.info.aud_id == '') {
|
||||
that.$tools.msg("完善资料后查看更多")
|
||||
return
|
||||
}
|
||||
unwatch();
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/count/search?name=" + name + "&time=" + this.foodInfo.date
|
||||
})
|
||||
},
|
||||
// 功能页面跳转
|
||||
navTo(url) {
|
||||
let that = this
|
||||
if (!this.token) {
|
||||
this.$tools.msg("登录后查看更多")
|
||||
this.$tools.msg(this.$t('msgLoginTips'))
|
||||
return
|
||||
}
|
||||
if (that.info.aud_id == '') {
|
||||
that.$tools.msg("完善资料后查看更多")
|
||||
that.$tools.msg(that.$t('msgAddUser'))
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
|
|
@ -312,19 +277,18 @@
|
|||
|
||||
.chart-wrap {
|
||||
position: relative;
|
||||
width: 250rpx;
|
||||
height: 250rpx;
|
||||
margin-top: -30rpx;
|
||||
margin-left: -5px;
|
||||
width: 280rpx;
|
||||
height: 280rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-left: -5px;
|
||||
|
||||
.center {
|
||||
border: none;
|
||||
width: 280rpx;
|
||||
height: 210rpx;
|
||||
position: absolute;
|
||||
top: 64rpx;
|
||||
top: 44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
137
pages/me/me.vue
137
pages/me/me.vue
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view v-if="token" style="width: 100%;">
|
||||
<view class="head" v-if="info.aud_id" @tap="navTo('/pageTwo/setting/setting')">
|
||||
<view class="head" v-if="info.aud_id" @click="navTo('/pageTwo/setting/setting')">
|
||||
<view class="left">
|
||||
<image :src="info.head_pic"></image>
|
||||
<text>{{info.nickname}}</text>
|
||||
|
|
@ -11,49 +11,66 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="head " v-else @click="handleUserEdit">
|
||||
<text class="size22">完善资料后,记录更准确哦!</text>
|
||||
<text class="size22">{{$t('msgAddUser')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list">
|
||||
<view class="item" @tap="navTo('/pageTwo/me/userEdit')">
|
||||
<view>
|
||||
<image src="/static/11.png" mode=""></image>个人资料
|
||||
<view class="item" @click="navTo('/pageTwo/me/userEdit')">
|
||||
<view class="left">
|
||||
<image src="/static/11.png" mode=""></image>{{$t('infoPersonalProfile')}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<view class="item" @tap="navTo('/pageTwo/me/mymenu?pageName=我的菜谱')">
|
||||
<view>
|
||||
<image src="/static/12.png" mode=""></image>我的菜谱
|
||||
<!-- <view class="item" @click="navTo('/pageTwo/me/mymenu?pageName=我的菜谱')">
|
||||
<view class="left">
|
||||
<image src="/static/12.png" mode=""></image>{{$t('infoMyRecipes')}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<view class="item" @tap="navTo('/pageTwo/me/mymenu?pageName=我的收藏')">
|
||||
<view>
|
||||
<image src="/static/27.png" mode=""></image>我的收藏
|
||||
<view class="item" @click="navTo('/pageTwo/me/mymenu?pageName=我的收藏')">
|
||||
<view class="left">
|
||||
<image src="/static/27.png" mode=""></image>{{$t('infoMyCollection')}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="item" @tap="navTo('/pageTwo/me/record')">
|
||||
<view>
|
||||
<image src="/static/13.png" mode=""></image>饮食记录
|
||||
<view class="item" @click="navTo('/pageTwo/me/record')">
|
||||
<view class="left">
|
||||
<image src="/static/13.png" mode=""></image>{{$t('titleHistory')}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<view class="item" @click="navTo('/pageTwo/webview/webview?url=' + configInfo.business_cooperation.jump_url)">
|
||||
<view>
|
||||
<image src="/static/14.png" mode=""></image>商务合作
|
||||
<view class="item">
|
||||
<view class="left">
|
||||
<image src="/static/12.png" mode=""></image>{{$t('titleLanguage')}}
|
||||
</view>
|
||||
<view class="right">
|
||||
<picker mode="selector" @change="changeClickLanguage" :range="languageList" range-key="name"
|
||||
:value="levelInd">
|
||||
<view>
|
||||
{{languageList[levelInd].name}}
|
||||
<icon class="iconfont icon-arrow-down"></icon>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" @click="navTo('/pageTwo/me/about')">
|
||||
<view class="left">
|
||||
<image src="/static/27.png" mode=""></image>{{$t('titleAboutUs')}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view>
|
||||
<!-- <view class="item" @tap="navTo('/pageTwo/me/feedBack')">
|
||||
<text>联系客服</text>
|
||||
<!-- <view class="item"
|
||||
@click="navTo('/pageTwo/webview/webview?url=' + configInfo.business_cooperation.jump_url)">
|
||||
<view class="left">
|
||||
<image src="/static/14.png" mode=""></image>{{$t('BusinessCooperation')}}
|
||||
</view>
|
||||
<uni-icons type="forward" size="20" color="#666"></uni-icons>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="btn" v-if="!token" @click="handleLogin">登录后查看更多</view>
|
||||
<view class="btn " v-if="token" @click="handleOutLogin">退出登录</view>
|
||||
<view class="btn" v-if="!token" @click="handleLogin">{{$t('msgLoginTips')}}</view>
|
||||
<view class="btn " v-if="token" @click="handleOutLogin">{{$t('btnLogOut')}}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -64,25 +81,33 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
token: null
|
||||
token: null,
|
||||
levelInd: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user",'configInfo']),
|
||||
...mapState(["user", 'configInfo', "setLocale"]),
|
||||
info() {
|
||||
return this.user
|
||||
},
|
||||
languageList() {
|
||||
let that = this
|
||||
let languageList = this.configInfo.language_arr
|
||||
that.levelInd = languageList.findIndex(ite => ite.key == this.setLocale)
|
||||
return this.configInfo.language_arr
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onShow() {
|
||||
let that = this
|
||||
console.log(that.languageList, that.setLocale)
|
||||
that.token = uni.getStorageSync('token')
|
||||
},
|
||||
methods: {
|
||||
handleOutLogin() {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
content: '是否退出登录?',
|
||||
title: that.$t('msgTitle'),
|
||||
content: that.$t('verifyOutLogin'),
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getloginOut({}).then((res) => {
|
||||
|
|
@ -90,13 +115,12 @@
|
|||
if (res.code != 0) return
|
||||
that.token = null
|
||||
uni.setStorageSync('token', null)
|
||||
uni.clearStorageSync()
|
||||
uni.reLaunch({
|
||||
url: "/pageTwo/login/login"
|
||||
})
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
that.$tools.msg("您已取消操作!");
|
||||
that.$tools.msg($t('msgCancel'));
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
@ -106,6 +130,45 @@
|
|||
url: "/pageTwo/login/login"
|
||||
})
|
||||
},
|
||||
// 语言切换
|
||||
changeClickLanguage(e) {
|
||||
let that = this
|
||||
let key = that.languageList[e.target.value].key
|
||||
let val = that.languageList[e.target.value].val
|
||||
that.levelInd = e.target.value
|
||||
|
||||
that.$model.getSetLanguage({
|
||||
language: val,
|
||||
}).then(res => {
|
||||
that.$i18n.locale = key
|
||||
uni.setStorageSync('language', key)
|
||||
that.$store.commit('changeLocale', key)
|
||||
that.$store.dispatch("getHomeConfig")
|
||||
that.$store.dispatch("getUserInfo")
|
||||
that.handleTabBarItem()
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
handleTabBarItem() {
|
||||
let that = this
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
text: that.$t('titleHome')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 1,
|
||||
text: that.$t('titleCount')
|
||||
})
|
||||
uni.setTabBarItem({
|
||||
index: 2,
|
||||
text: that.$t('titleMe')
|
||||
})
|
||||
},
|
||||
|
||||
//个人资料
|
||||
handleUserEdit() {
|
||||
uni.navigateTo({
|
||||
|
|
@ -114,7 +177,7 @@
|
|||
},
|
||||
navTo(url) {
|
||||
if (!uni.getStorageSync('token')) {
|
||||
this.$tools.msg("登录后查看等多!")
|
||||
this.$tools.msg(this.$t('msgLoginTips'))
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
|
|
@ -188,12 +251,22 @@
|
|||
margin-top: 30rpx;
|
||||
padding: 0 20rpx;
|
||||
|
||||
view {
|
||||
width: 80%;
|
||||
.left {
|
||||
// width: 70%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.right {
|
||||
width: 50%;
|
||||
|
||||
view {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@
|
|||
food_search_list: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
|
|
@ -52,9 +55,6 @@
|
|||
components: {
|
||||
search
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
},
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
that.search_value = options.name
|
||||
|
|
@ -88,10 +88,6 @@
|
|||
// 商品详情
|
||||
handleDetail(id) {
|
||||
let that = this
|
||||
if (that.user.aud_id == '') {
|
||||
that.$tools.msg("完善资料后查看更多")
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/me/menudetail?id=" + id
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"appid": "wx1f32af4f93c913f6",
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "3.14.0",
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"setting": {
|
||||
"coverView": true,
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true,
|
||||
"enhance": true,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"packNpmRelationList": [],
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
"condition": false
|
||||
},
|
||||
"condition": {},
|
||||
"editorSetting": {
|
||||
"tabIndent": "insertSpaces",
|
||||
"tabSize": 2
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"projectname": "kitchendDevice",
|
||||
"setting": {
|
||||
"compileHotReLoad": true
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
|
|
@ -8,9 +8,11 @@ export default {
|
|||
commit,
|
||||
dispatch
|
||||
}) {
|
||||
return model.getHomeConfig({}).then(res => {
|
||||
return model.getHomeConfig({
|
||||
time: tools.getDate("start")
|
||||
}).then(res => {
|
||||
console.log("配置接口", res.data)
|
||||
commit('changeConfig', res.data)
|
||||
dispatch("getUserInfo")
|
||||
return res.data
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import actions from './actions.js'
|
||||
import json from '@/content.json'
|
||||
Vue.use(Vuex)
|
||||
export default new Vuex.Store({
|
||||
// state: 存储基本数据
|
||||
|
|
@ -13,6 +12,7 @@ export default new Vuex.Store({
|
|||
gender: "",
|
||||
head_pic: "",
|
||||
height: 0,
|
||||
isEditInfo: false,
|
||||
is_use_set_kcal: "",
|
||||
nickname: "",
|
||||
set_kcal: "",
|
||||
|
|
@ -41,13 +41,12 @@ export default new Vuex.Store({
|
|||
},
|
||||
cookbook_label: [],
|
||||
activity_level: [],
|
||||
language_arr: [],
|
||||
default_count_foot: {
|
||||
date: "",
|
||||
list: [],
|
||||
details: {},
|
||||
nutrients_four: [],
|
||||
remaining_kcal: "",
|
||||
trace_elements_all_day: []
|
||||
},
|
||||
source_quote: {
|
||||
food_details: []
|
||||
},
|
||||
business_cooperation: {}
|
||||
},
|
||||
|
|
@ -60,6 +59,11 @@ export default new Vuex.Store({
|
|||
nutrients_four: [],
|
||||
trace_elements_all_day: []
|
||||
},
|
||||
phoneInfo: {
|
||||
info: {},
|
||||
versionUrl: null,
|
||||
platform: ""
|
||||
},
|
||||
bleValue: {
|
||||
deviceId: "",
|
||||
serviceId: "",
|
||||
|
|
@ -67,17 +71,20 @@ export default new Vuex.Store({
|
|||
write: "",
|
||||
unit: "g",
|
||||
type: 1,
|
||||
unitList: json.unitArray,
|
||||
isSendVal: false,
|
||||
oldCountWeight: 0,
|
||||
countWeight: 100,
|
||||
bleTipsText: "",
|
||||
isConnectStatus: 0,
|
||||
},
|
||||
isBluetoothTyle: false,
|
||||
setLocale: "zh"
|
||||
},
|
||||
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
|
||||
mutations: {
|
||||
// 版本信息
|
||||
changePhoneInfo(state, newData) {
|
||||
Object.assign(state.phoneInfo, newData)
|
||||
},
|
||||
/* 用户信息 */
|
||||
changeUserInfo(state, newData) {
|
||||
state.user = newData
|
||||
|
|
@ -93,6 +100,11 @@ export default new Vuex.Store({
|
|||
changeConfig(state, newData) {
|
||||
state.configInfo = newData
|
||||
},
|
||||
// 设置语言
|
||||
changeLocale(state, newData) {
|
||||
console.log("changeLocale", newData)
|
||||
state.setLocale = newData
|
||||
},
|
||||
// 计食器
|
||||
changeCountFoodInfo(state, newData) {
|
||||
state.countFoodInfo = newData
|
||||
|
|
|
|||
|
|
@ -1,37 +1,36 @@
|
|||
import $store from '@/store'
|
||||
import $model from '@/tools/model.js'
|
||||
import $tools from '@/tools/tools.js'
|
||||
import $data from '@/content.json'
|
||||
let unitList = []
|
||||
let devicesList = []
|
||||
import messages from '@/language/index.js'
|
||||
let searchTimer = null
|
||||
let UNIT_MAP = $data.units
|
||||
|
||||
let devicesList = []
|
||||
// 初始化蓝牙
|
||||
|
||||
function openBluetoothAdapter() {
|
||||
devicesList = []
|
||||
unitList = []
|
||||
let Language = $store.state.setLocale
|
||||
let $t = messages[Language]
|
||||
clearTimeout(searchTimer);
|
||||
uni.openBluetoothAdapter({
|
||||
success: e => {
|
||||
$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "蓝牙搜索中",
|
||||
isConnectStatus: 0,
|
||||
unitList: $data.unitMinus,
|
||||
bleTipsText: $t.SearchBluetooth,
|
||||
isConnectStatus: 0
|
||||
})
|
||||
startBluetoothDeviceDiscovery()
|
||||
},
|
||||
fail: e => {
|
||||
$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
isConnectStatus: 1,
|
||||
unitList: $data.unitMinus,
|
||||
bleTipsText: $t.ConnectionTimeout,
|
||||
isConnectStatus: 1
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
// 开始搜寻附近的蓝牙外围设备
|
||||
function startBluetoothDeviceDiscovery() {
|
||||
let Language = $store.state.setLocale
|
||||
let $t = messages[Language]
|
||||
uni.startBluetoothDevicesDiscovery({
|
||||
allowDuplicatesKey: true,
|
||||
interval: 200,
|
||||
|
|
@ -42,7 +41,7 @@ function startBluetoothDeviceDiscovery() {
|
|||
if (!devicesList.length) {
|
||||
clearTimeout(searchTimer);
|
||||
$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
bleTipsText: $t.ConnectionTimeout,
|
||||
isConnectStatus: 1
|
||||
});
|
||||
}
|
||||
|
|
@ -50,7 +49,7 @@ function startBluetoothDeviceDiscovery() {
|
|||
},
|
||||
fail: res => {
|
||||
$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
bleTipsText: $t.ConnectionTimeout,
|
||||
isConnectStatus: 1
|
||||
})
|
||||
}
|
||||
|
|
@ -62,19 +61,13 @@ function startBluetoothDeviceDiscovery() {
|
|||
function onBluetoothDeviceFound() {
|
||||
uni.onBluetoothDeviceFound(res => {
|
||||
res.devices.forEach(device => {
|
||||
device.advertisData = device.advertisData ? device.advertisData : ''
|
||||
let value = ab2hex(device.advertisData, "")
|
||||
let id = value.substring(0, 4)
|
||||
console.log("name", device.name)
|
||||
if (!device.name && !device.localName) {
|
||||
return
|
||||
}
|
||||
if (device.name.toLowerCase().indexOf('pc-c06pro') != -1 ||
|
||||
device.name.toLowerCase().indexOf('pc-c02pro') != -1 ||
|
||||
device.name.toLowerCase().indexOf('pc-c09pro') != -1 ||
|
||||
device.name.toLowerCase().indexOf('pc-c10pro') != -1 ||
|
||||
device.name.toLowerCase().indexOf('pc-c07pro') != -1 ||
|
||||
(device.localName && device.localName.toLowerCase().indexOf('pc-c07pro') != -1) ||
|
||||
(device.localName && device.localName.toLowerCase().indexOf('pc-c10pro') != -1) ||
|
||||
(device.localName && device.localName.toLowerCase().indexOf('pc-c06pro') != -1) ||
|
||||
(device.localName && device.localName.toLowerCase().indexOf('pc-c02pro') != -1) ||
|
||||
(device.localName && device.localName.toLowerCase().indexOf('pc-c09pro') != -1)) {
|
||||
|
|
@ -95,12 +88,13 @@ function Bluetoothfilter(device) {
|
|||
const idx = inArray(foundDevices, "deviceId", device.deviceId)
|
||||
if (idx === -1) {
|
||||
devicesList.push(device);
|
||||
// handleDevType(device)
|
||||
connectDevice(device.deviceId)
|
||||
handleDevType(device)
|
||||
}
|
||||
}
|
||||
// 排查设备
|
||||
function handleDevType(device) {
|
||||
let Language = $store.state.setLocale
|
||||
let $t = messages[Language]
|
||||
$model.getCheckDevice({
|
||||
mac: device.macAddr,
|
||||
}).then(res => {
|
||||
|
|
@ -109,11 +103,11 @@ function handleDevType(device) {
|
|||
connectDevice(device.deviceId)
|
||||
} else {
|
||||
devicesList = []
|
||||
$tools.msg('设备未登记,请联系出售方进行系统认证')
|
||||
$tools.msg(res.msg)
|
||||
$store.commit("changeBluetoothValue", {
|
||||
type: 1,
|
||||
isConnectStatus: 1,
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
bleTipsText: $t.ConnectionTimeout,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
@ -121,6 +115,8 @@ function handleDevType(device) {
|
|||
|
||||
//连接设备
|
||||
function connectDevice(device_id) {
|
||||
let Language = $store.state.setLocale
|
||||
let $t = messages[Language]
|
||||
uni.createBLEConnection({
|
||||
deviceId: device_id,
|
||||
success: res => {
|
||||
|
|
@ -132,8 +128,9 @@ function connectDevice(device_id) {
|
|||
$store.commit("changeBluetoothValue", {
|
||||
type: 1,
|
||||
isConnectStatus: 1,
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
bleTipsText: $t.ConnectionTimeout,
|
||||
})
|
||||
console.log("连接失败,点击重新连接", res);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -142,15 +139,17 @@ function connectDevice(device_id) {
|
|||
*/
|
||||
function getBLEDeviceServices(device_id) {
|
||||
let serviceList = [];
|
||||
let Language = $store.state.setLocale
|
||||
let $t = messages[Language]
|
||||
uni.getBLEDeviceServices({
|
||||
deviceId: device_id,
|
||||
success: res => {
|
||||
console.log("获取设备的UUID成功", res)
|
||||
stopBluetoothDevicesDiscovery();
|
||||
serviceList = res.services;
|
||||
for (let i = 0; i < serviceList.length; i++) {
|
||||
let service = serviceList[i];
|
||||
if (service.uuid.indexOf("FFF0") != -1) {
|
||||
stopBluetoothDevicesDiscovery()
|
||||
getBLEDeviceCharacteristics(device_id, service.uuid);
|
||||
break;
|
||||
}
|
||||
|
|
@ -160,7 +159,7 @@ function getBLEDeviceServices(device_id) {
|
|||
$store.commit("changeBluetoothValue", {
|
||||
type: 1,
|
||||
isConnectStatus: 1,
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
bleTipsText: $t.ConnectionTimeout,
|
||||
})
|
||||
console.log('获取设备的UUID失败:', res)
|
||||
}
|
||||
|
|
@ -171,6 +170,8 @@ function getBLEDeviceServices(device_id) {
|
|||
* 获取指定服务的特征值
|
||||
*/
|
||||
function getBLEDeviceCharacteristics(deviceId, serviceId) {
|
||||
let Language = $store.state.setLocale
|
||||
let $t = messages[Language]
|
||||
let characteristicsList = [];
|
||||
uni.getBLEDeviceCharacteristics({
|
||||
deviceId: deviceId,
|
||||
|
|
@ -191,7 +192,7 @@ function getBLEDeviceCharacteristics(deviceId, serviceId) {
|
|||
$store.commit("changeBluetoothValue", {
|
||||
type: 1,
|
||||
isConnectStatus: 1,
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
bleTipsText: $t.ConnectionTimeout,
|
||||
})
|
||||
console.log('获取特征值失败:', JSON.stringify(res))
|
||||
}
|
||||
|
|
@ -200,6 +201,8 @@ function getBLEDeviceCharacteristics(deviceId, serviceId) {
|
|||
|
||||
function getBLECharacteristicValueChange(deviceId, serviceId, notify, write) {
|
||||
let that = this
|
||||
let Language = $store.state.setLocale
|
||||
let $t = messages[Language]
|
||||
uni.notifyBLECharacteristicValueChange({
|
||||
deviceId: deviceId,
|
||||
serviceId: serviceId,
|
||||
|
|
@ -213,11 +216,13 @@ function getBLECharacteristicValueChange(deviceId, serviceId, notify, write) {
|
|||
write: write,
|
||||
unit: "g",
|
||||
type: 1,
|
||||
countWeight: 0,
|
||||
oldCountWeight: 0,
|
||||
bleTipsText: "测量中,请将食物放到秤上",
|
||||
countWeight: "",
|
||||
bleTipsText: $t.Measuring,
|
||||
isConnectStatus: 2
|
||||
})
|
||||
const units = ['kg', 'g', 'st:lb', 'lb', 'g', 'ml', 'Waterml',
|
||||
'milkml', 'oz', 'floz', 'lboz'
|
||||
]
|
||||
uni.onBLECharacteristicValueChange(function(res) {
|
||||
const value = res.value
|
||||
const dataView = new DataView(value)
|
||||
|
|
@ -245,42 +250,16 @@ function getBLECharacteristicValueChange(deviceId, serviceId, notify, write) {
|
|||
|
||||
// 计算实际重量
|
||||
let finalWeight = weightValue / Math.pow(10, precision)
|
||||
console.log("类型:", cmd, "重量",
|
||||
finalWeight, "小数点", precision, "单位", UNIT_MAP[unitIndex])
|
||||
|
||||
if (isNegative) finalWeight = -finalWeight
|
||||
$store.commit("changeBluetoothValue", {
|
||||
countWeight: finalWeight,
|
||||
unit: UNIT_MAP[unitIndex],
|
||||
unit: units[unitIndex],
|
||||
type: statusType
|
||||
})
|
||||
break
|
||||
|
||||
case 0x03:
|
||||
break
|
||||
case 0x08:
|
||||
const start0 = []
|
||||
const value2 = $tools.ab2hex(res.value, "");
|
||||
const start = parseUnitMask(value2.substring(8, 10), UNIT_MAP.slice(0,
|
||||
7))
|
||||
const start1 = parseUnitMask(value2.substring(10, 12), UNIT_MAP.slice(8,
|
||||
10))
|
||||
start.push.apply(start, start1)
|
||||
if (start.length) {
|
||||
$data.unitMinus.forEach(item => {
|
||||
start.forEach(item2 => {
|
||||
if (item.unit == item2) {
|
||||
start0.push(item)
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
$store.commit("changeBluetoothValue", {
|
||||
unitList: start0.length ? start0 : $data.unitMinus
|
||||
})
|
||||
console.log("2222222", start, start0)
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -322,19 +301,14 @@ function ab2hex(buffer, split) {
|
|||
function closeBluetoothAdapter() {
|
||||
uni.closeBluetoothAdapter({
|
||||
success: res => {
|
||||
clearTimeout(searchTimer);
|
||||
$store.commit("changeBluetoothValue", {
|
||||
deviceId: "",
|
||||
serviceId: "",
|
||||
notify: "",
|
||||
write: "",
|
||||
unit: "g",
|
||||
countWeight: 0,
|
||||
oldCountWeight: 0,
|
||||
countWeight: '',
|
||||
type: 1,
|
||||
unitList: $data.unitMinus,
|
||||
isConnectStatus: 1,
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
})
|
||||
console.log('蓝牙模块关闭成功');
|
||||
}
|
||||
|
|
@ -353,12 +327,13 @@ function closeBLEConnection(deviceId) {
|
|||
}
|
||||
// 监听蓝牙连接状态
|
||||
function onBLEConnectionStateChange() {
|
||||
let Language = $store.state.setLocale
|
||||
let $t = messages[Language]
|
||||
uni.onBLEConnectionStateChange(function(res) {
|
||||
console.log("监听蓝牙连接状态", res.connected)
|
||||
if (!res.connected) {
|
||||
$store.commit("changeBluetoothValue", {
|
||||
bleTipsText: "连接超时,点击重新连接",
|
||||
unitList: $data.unitMinus,
|
||||
bleTipsText: $t.ConnectionTimeout,
|
||||
isConnectStatus: 1,
|
||||
type: 1,
|
||||
})
|
||||
|
|
@ -378,38 +353,9 @@ function stopBluetoothDevicesDiscovery() {
|
|||
},
|
||||
});
|
||||
}
|
||||
|
||||
//@param {number|string} hexValue - 16进制值,如 0x19 或 '0x19'
|
||||
// @returns {Array} 使用的单位列表
|
||||
|
||||
|
||||
function parseUnitMask(hexValue, UNIT_MAP) {
|
||||
// 转换为数字
|
||||
const mask = typeof hexValue === 'string' ? parseInt(hexValue, 16) : hexValue;
|
||||
|
||||
// 验证输入
|
||||
if (isNaN(mask) || mask < 0 || mask > 0xFF) {
|
||||
console.error('无效的位掩码值');
|
||||
return [];
|
||||
}
|
||||
|
||||
// 存储结果
|
||||
const usedUnits = [];
|
||||
|
||||
// 遍历每一位
|
||||
for (let i = 0; i < 8; i++) {
|
||||
// 使用位运算检查第 i 位是否为 1
|
||||
if (mask & (1 << i)) {
|
||||
usedUnits.push(UNIT_MAP[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return usedUnits;
|
||||
}
|
||||
export default {
|
||||
ab2hex,
|
||||
inArray,
|
||||
unitList,
|
||||
openBluetoothAdapter,
|
||||
startBluetoothDeviceDiscovery,
|
||||
onBluetoothDeviceFound,
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ const httpRequest = (url, method = "get", data) => {
|
|||
uni.request(httpDefaultOpts).then(
|
||||
(res) => {
|
||||
uni.hideLoading()
|
||||
console.log("接口", url, res)
|
||||
if (res[1].data.code == 20001) {
|
||||
uni.clearStorageSync()
|
||||
uni.setStorageSync('token', null)
|
||||
|
|
@ -44,7 +45,6 @@ const httpRequest = (url, method = "get", data) => {
|
|||
};
|
||||
|
||||
function uploadFile(url, filePath) {
|
||||
config.log
|
||||
let promise = new Promise((resolve, reject) => {
|
||||
uni.uploadFile({
|
||||
url: baseUrl + url,
|
||||
|
|
@ -68,11 +68,13 @@ function uploadFile(url, filePath) {
|
|||
};
|
||||
const get = (url, data) => {
|
||||
data.token = uni.getStorageSync('token') || ''
|
||||
console.log("22222", url, data)
|
||||
return httpRequest(url, 'get', data)
|
||||
}
|
||||
|
||||
const post = (url, data) => {
|
||||
data.token = uni.getStorageSync('token')|| ''
|
||||
data.token = uni.getStorageSync('token') || ''
|
||||
console.log("22222", url, data)
|
||||
return httpRequest(url, 'post', data)
|
||||
}
|
||||
const upload = (url, filePath) => {
|
||||
|
|
|
|||
112
tools/model.js
112
tools/model.js
|
|
@ -4,84 +4,100 @@ import store from '@/store'
|
|||
export default {
|
||||
// 登录
|
||||
getonlogin(param) { // 登录
|
||||
return http.post("/login_action", param).then(res => {
|
||||
return http.post("/kitchenscale3/login_action", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getSendCode(param) { // 验证码
|
||||
return http.post("/send_phone_email_code", param).then(res => {
|
||||
return http.post("/kitchenscale3/send_phone_email_code", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getregister(param) { // 注册
|
||||
return http.post("/register_action", param).then(res => {
|
||||
return http.post("/kitchenscale3/register_action", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getloginOut(param) { // 退出登录
|
||||
return http.post("/user_quit_account", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCheckDevice(param) { // 设备过滤
|
||||
return http.post("/de/check_device_msg", param).then(res => {
|
||||
return http.post("/kitchenscale3/user_quit_account", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getRegisterPhone(param) { // 手机号快捷登录
|
||||
return http.post("/kitchenscale2/wechat_quick_login", param).then(res => {
|
||||
return http.post("/kitchenscale3/wechat_quick_login", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getResetPassword(param) { // 重置密码
|
||||
return http.post("/kitchenscale2/reset_password", param).then(res => {
|
||||
return http.post("/kitchenscale3/reset_password", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getAccountPassword(param) { // 修改密码
|
||||
return http.post("/kitchenscale2/update_my_password", param).then(res => {
|
||||
return http.post("/kitchenscale3/reset_password", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getAccountMsg(param) { // 邮箱/手机号绑定
|
||||
return http.post("/kitchenscale2/update_my_account_msg", param).then(res => {
|
||||
return http.post("/kitchenscale3/update_my_account_msg", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getloginversion(param) { // 版本信息
|
||||
return http.post("/kitchenscale3/login_invalid_version", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getSetLanguage(param) { // 语言设置
|
||||
return http.post("/kitchenscale3/update_language", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCheckDevice(param) { // 设备过滤
|
||||
return http.post("/de/check_device_msg", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
getDeleteAccount(param) { // 账号注销
|
||||
return http.post("/kitchenscale3/delete_account", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
// 首页
|
||||
getHomeInfo(param) { // 默认数据
|
||||
return http.post("/kitchenscale2/get_homepage_information", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_homepage_information", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getHomeUserInfo(param) { // 用户信息
|
||||
return http.post("/kitchenscale2/get_user_msg", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_user_msg", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getHomeConfig(param) { // 配置
|
||||
return http.post("/kitchenscale2/get_default_config", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_default_config", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getHomeSearch(param) { // 首页搜索
|
||||
return http.post("/kitchenscale2/search_column", param).then(res => {
|
||||
return http.post("/kitchenscale3/search_column", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getUserInfoEdit(param) { // 修改用户信息
|
||||
return http.post("/kitchenscale2/update_user_msg", param).then(res => {
|
||||
return http.post("/kitchenscale3/update_user_msg", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getSearchPopularFood(param) { //获取搜索页面常用食材
|
||||
return http.post("/kitchenscale2/get_search_food_page_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_search_food_page_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getFoodSearch(param) { //搜索食材
|
||||
return http.post("/kitchenscale2/get_food_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_food_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
|
@ -91,129 +107,129 @@ export default {
|
|||
})
|
||||
},
|
||||
getMenuSearchColumn(param) { //搜索菜谱2
|
||||
return http.post("/kitchenscale2/search_column", param).then(res => {
|
||||
return http.post("/kitchenscale3/search_column", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getPhotoSearch(param) { //图像识别
|
||||
return http.post("/kitchenscale2/search_food_barcode", param).then(res => {
|
||||
return http.post("/kitchenscale3/baidu_identify_food", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
// 通用
|
||||
getUploadImg(param) { // 上传素材
|
||||
return http.upload("/kitchenscale2/pic_upload_one_action", param).then(res => {
|
||||
return http.upload("/kitchenscale3/pic_upload_one_action", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
// 菜谱
|
||||
getAddCookbook(param) { // 添加菜谱
|
||||
return http.post("/kitchenscale2/add_cookbook", param).then(res => {
|
||||
return http.post("/kitchenscale3/add_cookbook", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getEditCookbook(param) { // 修改菜谱
|
||||
return http.post("/kitchenscale2/update_cookbook", param).then(res => {
|
||||
return http.post("/kitchenscale3/update_cookbook", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookListLabel(param) { // 菜谱查询(根据菜谱标签拉取)
|
||||
return http.post("/kitchenscale2/find_by_cook_label", param).then(res => {
|
||||
return http.post("/kitchenscale3/find_by_cook_label", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookListFood(param) { // 菜谱列表(根据食材名称拉取)
|
||||
return http.post("/kitchenscale2/find_by_food", param).then(res => {
|
||||
return http.post("/kitchenscale3/find_by_food", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookListDetails(param) { // 查询菜谱详情
|
||||
return http.post("/kitchenscale2/cookbook_details", param).then(res => {
|
||||
return http.post("/kitchenscale3/cookbook_details", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookFollow(param) { // 关注行为
|
||||
return http.post("/kitchenscale2/cookbook_follow", param).then(res => {
|
||||
return http.post("/kitchenscale3/cookbook_follow", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookLike(param) { // 点赞收藏菜谱
|
||||
return http.post("/kitchenscale2/cookbook_like", param).then(res => {
|
||||
return http.post("/kitchenscale3/cookbook_like", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookKcal(param) { // 食材卡路里计算
|
||||
return http.post("/kitchenscale2/food_count_kcal", param).then(res => {
|
||||
return http.post("/kitchenscale3/food_count_kcal", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
// 食材
|
||||
getCookFoodList(param) { // 食材列表
|
||||
return http.post("/kitchenscale2/get_food_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_food_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCookListSave(param) { // 食材列表查询
|
||||
return http.post("/kitchenscale2/save_food_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/save_food_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
// 计食器
|
||||
getAddIntakeFood(param) { // 添加每日摄入记录
|
||||
return http.post("/kitchenscale2/add_intake_food", param).then(res => {
|
||||
return http.post("/kitchenscale3/add_intake_food", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getAddEveryMealFood(param) { // 当次食材添加的卡路里摄入记录
|
||||
return http.post("/kitchenscale2/current_food_statistics", param).then(res => {
|
||||
return http.post("/kitchenscale3/current_food_statistics", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCountfootCon(param) { // 每日记食器板块详细内容
|
||||
return http.post("/kitchenscale2/get_countfoot_content", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_countfoot_content", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
delCEatAction(param) { // 删除餐饮食物
|
||||
return http.post("/kitchenscale2/del_user_eat_log", param).then(res => {
|
||||
return http.post("/kitchenscale3/del_user_eat_log", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getLogList(param) { // 记食器角色饮食记录列表
|
||||
return http.post("/kitchenscale2/get_log_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_log_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getSetUpContent(param) { // 计食器板块-设置里的内容
|
||||
return http.post("/kitchenscale2/set_up_content", param).then(res => {
|
||||
return http.post("/kitchenscale3/set_up_content", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getSetUserKcal(param) { // 设置用户的卡路里
|
||||
return http.post("/kitchenscale2/set_user_kcal", param).then(res => {
|
||||
return http.post("/kitchenscale3/set_user_kcal", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
// 个人中心
|
||||
getUserCollectList(param) { // 用户收藏点赞列表
|
||||
return http.post("/kitchenscale2/get_user_collect_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_user_collect_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getMyCookbook(param) { // 我的菜谱
|
||||
return http.post("/kitchenscale2/get_my_cookbook", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_my_cookbook", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getMyCookbookDel(param) { // 删除我的菜谱
|
||||
return http.post("/kitchenscale2/del_my_cookbook", param).then(res => {
|
||||
return http.post("/kitchenscale3/del_my_cookbook", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getMyLogList(param) { // 饮食列表
|
||||
return http.post("/kitchenscale2/get_log_list", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_log_list", param).then(res => {
|
||||
// let pkList = {
|
||||
// list: [],
|
||||
// Dlist: []
|
||||
|
|
@ -232,22 +248,22 @@ export default {
|
|||
},
|
||||
// 计食器
|
||||
getAddIntakeFood(param) { // 添加每日摄入记录
|
||||
return http.post("/kitchenscale2/add_intake_food", param).then(res => {
|
||||
return http.post("/kitchenscale3/add_intake_food", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCountFoodInfo(param) { // 获取记食器板块详细内容
|
||||
return http.post("/kitchenscale2/get_countfoot_content", param).then(res => {
|
||||
return http.post("/kitchenscale3/get_countfoot_content", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCountSetKcal(param) { // 获取记食器设置里的内容
|
||||
return http.post("/kitchenscale2/set_up_content", param).then(res => {
|
||||
return http.post("/kitchenscale3/set_up_content", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getCountSetUserKcal(param) { // 获取记食器设置里的内容
|
||||
return http.post("/kitchenscale2/set_user_kcal", param).then(res => {
|
||||
return http.post("/kitchenscale3/set_user_kcal", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,8 +8,30 @@ export default {
|
|||
getMonth,
|
||||
GetDateStr,
|
||||
NewsPtype,
|
||||
compareVersions,
|
||||
mergeAndDeduplicate
|
||||
}
|
||||
// 版本对比
|
||||
function compareVersions(version1, version2) {
|
||||
console.log("版本对比", version1, version2)
|
||||
// 将版本号拆分成数字数组
|
||||
var arr1 = version1.split('.').map(Number);;
|
||||
var arr2 = version2.split('.').map(Number);;
|
||||
|
||||
// 遍历数字数组进行逐段比较
|
||||
for (var i = 0; i < Math.max(arr1.length, arr2.length); i++) {
|
||||
var num1 = parseInt(arr1[i] || 0); // 如果数组长度不够,则将缺失部分补0
|
||||
var num2 = parseInt(arr2[i] || 0);
|
||||
|
||||
if (num1 < num2) {
|
||||
return -1; // 版本1小于版本2
|
||||
} else if (num1 > num2) {
|
||||
return 1; // 版本1大于版本2
|
||||
}
|
||||
}
|
||||
|
||||
return 0; // 版本1等于版本2
|
||||
}
|
||||
|
||||
function NewsPtype(con) {
|
||||
if (con.type == "wechat") { //跳小程序
|
||||
|
|
|
|||
|
|
@ -0,0 +1,320 @@
|
|||
## 2.5.0-20230101(2023-01-01)
|
||||
- 秋云图表组件 修改条件编译顺序,确保uniapp的cli方式的项目依赖不完整时可以正常显示
|
||||
- 秋云图表组件 恢复props属性directory的使用,以修复vue3项目中,开启echarts后,echarts目录识别错误的bug
|
||||
- uCharts.js 修复区域图、混合图只有一个数据时图表显示不正确的bug
|
||||
- uCharts.js 修复折线图、区域图中时间轴类别图表tooltip指示点显示不正确的bug
|
||||
- uCharts.js 修复x轴使用labelCount时,并且boundaryGap = 'justify' 并且关闭Y轴显示的时候,最后一个坐标值不显示的bug
|
||||
- uCharts.js 修复折线图只有一组数据时 ios16 渲染颜色不正确的bug
|
||||
- uCharts.js 修复玫瑰图半径显示不正确的bug
|
||||
- uCharts.js 柱状图、山峰图增加正负图功能,y轴网格如果需要显示0轴则由 min max 及 splitNumber 确定,后续版本优化自动显示0轴
|
||||
- uCharts.js 柱状图column增加 opts.extra.column.labelPosition,数据标签位置,有效值为 outside外部, insideTop内顶部, center内中间, bottom内底部
|
||||
- uCharts.js 雷达图radar增加 opts.extra.radar.labelShow,否显示各项标识文案是,默认true
|
||||
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.boxPadding,提示窗边框填充距离,默认3px
|
||||
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.fontSize,提示窗字体大小配置,默认13px
|
||||
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.lineHeight,提示窗文字行高,默认20px
|
||||
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.legendShow,是否显示左侧图例,默认true
|
||||
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.legendShape,图例形状,图例标识样式,有效值为 auto自动跟随图例, diamond◆, circle●, triangle▲, square■, rect▬, line-
|
||||
- uCharts.js 标记线markLine增加 opts.extra.markLine.labelFontSize,字体大小配置,默认13px
|
||||
- uCharts.js 标记线markLine增加 opts.extra.markLine.labelPadding,标签边框内填充距离,默认6px
|
||||
- uCharts.js 折线图line增加 opts.extra.line.linearType,渐变色类型,可选值 none关闭渐变色,custom 自定义渐变色。使用自定义渐变色时请赋值serie.linearColor作为颜色值
|
||||
- uCharts.js 折线图line增加 serie.linearColor,渐变色数组,格式为2维数组[起始位置,颜色值],例如[[0,'#0EE2F8'],[0.3,'#2BDCA8'],[0.6,'#1890FF'],[1,'#9A60B4']]
|
||||
- uCharts.js 折线图line增加 opts.extra.line.onShadow,是否开启折线阴影,开启后请赋值serie.setShadow阴影设置
|
||||
- uCharts.js 折线图line增加 serie.setShadow,阴影配置,格式为4位数组:[offsetX,offsetY,blur,color]
|
||||
- uCharts.js 折线图line增加 opts.extra.line.animation,动画效果方向,可选值为vertical 垂直动画效果,horizontal 水平动画效果
|
||||
- uCharts.js X轴xAxis增加 opts.xAxis.lineHeight,X轴字体行高,默认20px
|
||||
- uCharts.js X轴xAxis增加 opts.xAxis.marginTop,X轴文字距离轴线的距离,默认0px
|
||||
- uCharts.js X轴xAxis增加 opts.xAxis.title,当前X轴标题
|
||||
- uCharts.js X轴xAxis增加 opts.xAxis.titleFontSize,标题字体大小,默认13px
|
||||
- uCharts.js X轴xAxis增加 opts.xAxis.titleOffsetY,标题纵向偏移距离,负数为向上偏移,正数向下偏移
|
||||
- uCharts.js X轴xAxis增加 opts.xAxis.titleOffsetX,标题横向偏移距离,负数为向左偏移,正数向右偏移
|
||||
- uCharts.js X轴xAxis增加 opts.xAxis.titleFontColor,标题字体颜色,默认#666666
|
||||
|
||||
## 报错TypeError: Cannot read properties of undefined (reading 'length')
|
||||
- 如果是uni-modules版本组件,请先登录HBuilderX账号;
|
||||
- 在HBuilderX中的manifest.json,点击重新获取uniapp的appid,或者删除appid重新粘贴,重新运行;
|
||||
- 如果是cli项目请使用码云上的非uniCloud版本组件;
|
||||
- 或者添加uniCloud的依赖;
|
||||
- 或者使用原生uCharts;
|
||||
## 2.4.5-20221130(2022-11-30)
|
||||
- uCharts.js 优化tooltip当文字很多变为左侧显示时,如果画布仍显显示不下,提示框错位置变为以左侧0位置起画
|
||||
- uCharts.js 折线图修复特殊情况下只有单点数据,并改变线宽后点变为圆形的bug
|
||||
- uCharts.js 修复Y轴disabled启用后无效并报错的bug
|
||||
- uCharts.js 修复仪表盘起始结束角度特殊情况下显示不正确的bug
|
||||
- uCharts.js 雷达图新增参数 opts.extra.radar.radius , 自定义雷达图半径
|
||||
- uCharts.js 折线图、区域图增加tooltip指示点,opts.extra.line.activeType/opts.extra.area.activeType,可选值"none"不启用激活指示点,"hollow"空心点模式,"solid"实心点模式
|
||||
## 2.4.4-20221102(2022-11-02)
|
||||
- 秋云图表组件 修复使用echarts时reload、reshow无法调用重新渲染的bug,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/40)
|
||||
- 秋云图表组件 修复使用echarts时,初始化时宽高不正确的bug,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/42)
|
||||
- 秋云图表组件 修复uniapp的h5使用history模式时,无法加载echarts的bug
|
||||
- 秋云图表组件 小程序端@complete、@scrollLeft、@scrollRight、@getTouchStart、@getTouchMove、@getTouchEnd事件增加opts参数传出,方便一些特殊需求的交互获取数据。
|
||||
|
||||
- uCharts.js 修复calTooltipYAxisData方法内formatter格式化方法未与y轴方法同步的问题,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/43)
|
||||
- uCharts.js 地图新增参数opts.series[i].fillOpacity,以透明度方式来设置颜色过度效果,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/38)
|
||||
- uCharts.js 地图新增参数opts.extra.map.active,是否启用点击激活变色
|
||||
- uCharts.js 地图新增参数opts.extra.map.activeTextColor,是否启用点击激活变色
|
||||
- uCharts.js 地图新增渲染完成事件renderComplete
|
||||
- uCharts.js 漏斗图修复当部分数据相同时tooltip提示窗点击错误的bug
|
||||
- uCharts.js 漏斗图新增参数series.data[i].centerText 居中标签文案
|
||||
- uCharts.js 漏斗图新增参数series.data[i].centerTextSize 居中标签文案字体大小,默认opts.fontSize
|
||||
- uCharts.js 漏斗图新增参数series.data[i].centerTextColor 居中标签文案字体颜色,默认#FFFFFF
|
||||
- uCharts.js 漏斗图新增参数opts.extra.funnel.minSize 最小值的最小宽度,默认0
|
||||
- uCharts.js 进度条新增参数opts.extra.arcbar.direction,动画方向,可选值为cw顺时针、ccw逆时针
|
||||
- uCharts.js 混合图新增参数opts.extra.mix.line.width,折线的宽度,默认2
|
||||
- uCharts.js 修复tooltip开启horizentalLine水平横线标注时,图表显示错位的bug
|
||||
- uCharts.js 优化tooltip当文字很多变为左侧显示时,如果画布仍显显示不下,提示框错位置变为以左侧0位置起画
|
||||
- uCharts.js 修复开启滚动条后X轴文字超出绘图区域后的隐藏逻辑
|
||||
- uCharts.js 柱状图、条状图修复堆叠模式不能通过{value,color}赋值单个柱子颜色的问题
|
||||
- uCharts.js 气泡图修复不识别series.textSize和series.textColor的bug
|
||||
|
||||
## 报错TypeError: Cannot read properties of undefined (reading 'length')
|
||||
1. 如果是uni-modules版本组件,请先登录HBuilderX账号;
|
||||
2. 在HBuilderX中的manifest.json,点击重新获取uniapp的appid,或者删除appid重新粘贴,重新运行;
|
||||
3. 如果是cli项目请使用码云上的非uniCloud版本组件;
|
||||
4. 或者添加uniCloud的依赖;
|
||||
5. 或者使用原生uCharts;
|
||||
## 2.4.3-20220505(2022-05-05)
|
||||
- 秋云图表组件 修复开启canvas2d后将series赋值为空数组显示加载图标时,再次赋值后画布闪动的bug
|
||||
- 秋云图表组件 修复升级hbx最新版后ECharts的highlight方法报错的bug
|
||||
- uCharts.js 雷达图新增参数opts.extra.radar.gridEval,数据点位网格抽希,默认1
|
||||
- uCharts.js 雷达图新增参数opts.extra.radar.axisLabel, 是否显示刻度点值,默认false
|
||||
- uCharts.js 雷达图新增参数opts.extra.radar.axisLabelTofix,刻度点值小数位数,默认0
|
||||
- uCharts.js 雷达图新增参数opts.extra.radar.labelPointShow,是否显示末端刻度圆点,默认false
|
||||
- uCharts.js 雷达图新增参数opts.extra.radar.labelPointRadius,刻度圆点的半径,默认3
|
||||
- uCharts.js 雷达图新增参数opts.extra.radar.labelPointColor,刻度圆点的颜色,默认#cccccc
|
||||
- uCharts.js 雷达图新增参数opts.extra.radar.linearType,渐变色类型,可选值"none"关闭渐变,"custom"开启渐变
|
||||
- uCharts.js 雷达图新增参数opts.extra.radar.customColor,自定义渐变颜色,数组类型对应series的数组长度以匹配不同series颜色的不同配色方案,例如["#FA7D8D", "#EB88E2"]
|
||||
- uCharts.js 雷达图优化支持series.textColor、series.textSize属性
|
||||
- uCharts.js 柱状图中温度计式图标,优化支持全圆角类型,修复边框有缝隙的bug,详见官网【演示】中的温度计图表
|
||||
- uCharts.js 柱状图新增参数opts.extra.column.activeWidth,当前点击柱状图的背景宽度,默认一个单元格单位
|
||||
- uCharts.js 混合图增加opts.extra.mix.area.gradient 区域图是否开启渐变色
|
||||
- uCharts.js 混合图增加opts.extra.mix.area.opacity 区域图透明度,默认0.2
|
||||
- uCharts.js 饼图、圆环图、玫瑰图、漏斗图,增加opts.series[0].data[i].labelText,自定义标签文字,避免formatter格式化的繁琐,详见官网【演示】中的饼图
|
||||
- uCharts.js 饼图、圆环图、玫瑰图、漏斗图,增加opts.series[0].data[i].labelShow,自定义是否显示某一个指示标签,避免因饼图类别太多导致标签重复或者居多导致图形变形的问题,详见官网【演示】中的饼图
|
||||
- uCharts.js 增加opts.series[i].legendText/opts.series[0].data[i].legendText(与series.name同级)自定义图例显示文字的方法
|
||||
- uCharts.js 优化X轴、Y轴formatter格式化方法增加形参,统一为fromatter:function(value,index,opts){}
|
||||
- uCharts.js 修复横屏模式下无法使用双指缩放方法的bug
|
||||
- uCharts.js 修复当只有一条数据或者多条数据值相等的时候Y轴自动计算的最大值错误的bug
|
||||
- 【官网模板】增加外部自定义图例与图表交互的例子,[点击跳转](https://www.ucharts.cn/v2/#/layout/info?id=2)
|
||||
|
||||
## 注意:非unimodules 版本如因更新 hbx 至 3.4.7 导致报错如下,请到码云更新非 unimodules 版本组件,[点击跳转](https://gitee.com/uCharts/uCharts/tree/master/uni-app/uCharts-%E7%BB%84%E4%BB%B6)
|
||||
> Error in callback for immediate watcher "uchartsOpts": "SyntaxError: Unexpected token u in JSON at position 0"
|
||||
## 2.4.2-20220421(2022-04-21)
|
||||
- 秋云图表组件 修复HBX升级3.4.6.20220420版本后echarts报错的问题
|
||||
## 2.4.2-20220420(2022-04-20)
|
||||
## 重要!此版本uCharts新增了很多功能,修复了诸多已知问题
|
||||
- 秋云图表组件 新增onzoom开启双指缩放功能(仅uCharts),前提需要直角坐标系类图表类型,并且ontouch为true、opts.enableScroll为true,详见实例项目K线图
|
||||
- 秋云图表组件 新增optsWatch是否监听opts变化,关闭optsWatch后,动态修改opts不会触发图表重绘
|
||||
- 秋云图表组件 修复开启canvas2d功能后,动态更新数据后画布闪动的bug
|
||||
- 秋云图表组件 去除directory属性,改为自动获取echarts.min.js路径(升级不受影响)
|
||||
- 秋云图表组件 增加getImage()方法及@getImage事件,通过ref调用getImage()方法获,触发@getImage事件获取当前画布的base64图片文件流。
|
||||
- 秋云图表组件 支付宝、字节跳动、飞书、快手小程序支持开启canvas2d同层渲染设置。
|
||||
- 秋云图表组件 新增加【非uniCloud】版本组件,避免有些不需要uniCloud的使用组件发布至小程序需要提交隐私声明问题,请到码云[【非uniCloud版本】](https://gitee.com/uCharts/uCharts/tree/master/uni-app/uCharts-%E7%BB%84%E4%BB%B6),或npm[【非uniCloud版本】](https://www.npmjs.com/package/@qiun/uni-ucharts)下载使用。
|
||||
- uCharts.js 新增dobuleZoom双指缩放功能
|
||||
- uCharts.js 新增山峰图type="mount",数据格式为饼图类格式,不需要传入categories,具体详见新版官网在线演示
|
||||
- uCharts.js 修复折线图当数据中存在null时tooltip报错的bug
|
||||
- uCharts.js 修复饼图类当画布比较小时自动计算的半径是负数报错的bug
|
||||
- uCharts.js 统一各图表类型的series.formatter格式化方法的形参为(val, index, series, opts),方便格式化时有更多参数可用
|
||||
- uCharts.js 标记线功能增加labelText自定义显示文字,增加labelAlign标签显示位置(左侧或右侧),增加标签显示位置微调labelOffsetX、labelOffsetY
|
||||
- uCharts.js 修复条状图当数值很小时开启圆角后样式错误的bug
|
||||
- uCharts.js 修复X轴开启disabled后,X轴仍占用空间的bug
|
||||
- uCharts.js 修复X轴开启滚动条并且开启rotateLabel后,X轴文字与滚动条重叠的bug
|
||||
- uCharts.js 增加X轴rotateAngle文字旋转自定义角度,取值范围(-90至90)
|
||||
- uCharts.js 修复地图文字标签层级显示不正确的bug
|
||||
- uCharts.js 修复饼图、圆环图、玫瑰图当数据全部为0的时候不显示数据标签的bug
|
||||
- uCharts.js 修复当opts.padding上边距为0时,Y轴顶部刻度标签位置不正确的bug
|
||||
|
||||
## 另外我们还开发了各大原生小程序组件,已发布至码云和npm
|
||||
[https://gitee.com/uCharts/uCharts](https://gitee.com/uCharts/uCharts)
|
||||
[https://www.npmjs.com/~qiun](https://www.npmjs.com/~qiun)
|
||||
|
||||
## 对于原生uCharts文档我们已上线新版官方网站,详情点击下面链接进入官网
|
||||
[https://www.uCharts.cn/v2/](https://www.ucharts.cn/v2/)
|
||||
## 2.3.7-20220122(2022-01-22)
|
||||
## 重要!使用vue3编译,请使用cli模式并升级至最新依赖,HbuilderX编译需要使用3.3.8以上版本
|
||||
- uCharts.js 修复uni-app平台组件模式使用vue3编译到小程序报错的bug。
|
||||
## 2.3.7-20220118(2022-01-18)
|
||||
## 注意,使用vue3的前提是需要3.3.8.20220114-alpha版本的HBuilder!
|
||||
## 2.3.67-20220118(2022-01-18)
|
||||
- 秋云图表组件 组件初步支持vue3,全端编译会有些问题,具体详见下面修改:
|
||||
1. 小程序端运行时,在uni_modules文件夹的qiun-data-charts.js中搜索 new uni_modules_qiunDataCharts_js_sdk_uCharts_uCharts.uCharts,将.uCharts去掉。
|
||||
2. 小程序端发行时,在uni_modules文件夹的qiun-data-charts.js中搜索 new e.uCharts,将.uCharts去掉,变为 new e。
|
||||
3. 如果觉得上述步骤比较麻烦,如果您的项目只编译到小程序端,可以修改u-charts.js最后一行导出方式,将 export default uCharts;变更为 export default { uCharts: uCharts }; 这样变更后,H5和App端的renderjs会有问题,请开发者自行选择。(此问题非组件问题,请等待DC官方修复Vue3的小程序端)
|
||||
## 2.3.6-20220111(2022-01-11)
|
||||
- 秋云图表组件 修改组件 props 属性中的 background 默认值为 rgba(0,0,0,0)
|
||||
## 2.3.6-20211201(2021-12-01)
|
||||
- uCharts.js 修复bar条状图开启圆角模式时,值很小时圆角渲染错误的bug
|
||||
## 2.3.5-20211014(2021-10-15)
|
||||
- uCharts.js 增加vue3的编译支持(仅原生uCharts,qiun-data-charts组件后续会支持,请关注更新)
|
||||
## 2.3.4-20211012(2021-10-12)
|
||||
- 秋云图表组件 修复 mac os x 系统 mouseover 事件丢失的 bug
|
||||
## 2.3.3-20210706(2021-07-06)
|
||||
- uCharts.js 增加雷达图开启数据点值(opts.dataLabel)的显示
|
||||
## 2.3.2-20210627(2021-06-27)
|
||||
- 秋云图表组件 修复tooltipCustom个别情况下传值不正确报错TypeError: Cannot read property 'name' of undefined的bug
|
||||
## 2.3.1-20210616(2021-06-16)
|
||||
- uCharts.js 修复圆角柱状图使用4角圆角时,当数值过大时不正确的bug
|
||||
## 2.3.0-20210612(2021-06-12)
|
||||
- uCharts.js 【重要】uCharts增加nvue兼容,可在nvue项目中使用gcanvas组件渲染uCharts,[详见码云uCharts-demo-nvue](https://gitee.com/uCharts/uCharts)
|
||||
- 秋云图表组件 增加tapLegend属性,是否开启图例点击交互事件
|
||||
- 秋云图表组件 getIndex事件中增加返回uCharts实例中的opts参数,以便在页面中调用参数
|
||||
- 示例项目 pages/other/other.vue增加app端自定义tooltip的方法,详见showOptsTooltip方法
|
||||
## 2.2.1-20210603(2021-06-03)
|
||||
- uCharts.js 修复饼图、圆环图、玫瑰图,当起始角度不为0时,tooltip位置不准确的bug
|
||||
- uCharts.js 增加温度计式柱状图开启顶部半圆形的配置
|
||||
## 2.2.0-20210529(2021-05-29)
|
||||
- uCharts.js 增加条状图type="bar"
|
||||
- 示例项目 pages/ucharts/ucharts.vue增加条状图的demo
|
||||
## 2.1.7-20210524(2021-05-24)
|
||||
- uCharts.js 修复大数据量模式下曲线图不平滑的bug
|
||||
## 2.1.6-20210523(2021-05-23)
|
||||
- 秋云图表组件 修复小程序端开启滚动条更新数据后滚动条位置不符合预期的bug
|
||||
## 2.1.5-2021051702(2021-05-17)
|
||||
- uCharts.js 修复自定义Y轴min和max值为0时不能正确显示的bug
|
||||
## 2.1.5-20210517(2021-05-17)
|
||||
- uCharts.js 修复Y轴自定义min和max时,未按指定的最大值最小值显示坐标轴刻度的bug
|
||||
## 2.1.4-20210516(2021-05-16)
|
||||
- 秋云图表组件 优化onWindowResize防抖方法
|
||||
- 秋云图表组件 修复APP端uCharts更新数据时,清空series显示loading图标后再显示图表,图表抖动的bug
|
||||
- uCharts.js 修复开启canvas2d后,x轴、y轴、series自定义字体大小未按比例缩放的bug
|
||||
- 示例项目 修复format-e.vue拼写错误导致app端使用uCharts渲染图表
|
||||
## 2.1.3-20210513(2021-05-13)
|
||||
- 秋云图表组件 修改uCharts变更chartData数据为updateData方法,支持带滚动条的数据动态打点
|
||||
- 秋云图表组件 增加onWindowResize防抖方法 fix by ど誓言,如尘般染指流年づ
|
||||
- 秋云图表组件 H5或者APP变更chartData数据显示loading图表时,原数据闪现的bug
|
||||
- 秋云图表组件 props增加errorReload禁用错误点击重新加载的方法
|
||||
- uCharts.js 增加tooltip显示category(x轴对应点位)标题的功能,opts.extra.tooltip.showCategory,默认为false
|
||||
- uCharts.js 修复mix混合图只有柱状图时,tooltip的分割线显示位置不正确的bug
|
||||
- uCharts.js 修复开启滚动条,图表在拖动中动态打点,滚动条位置不正确的bug
|
||||
- uCharts.js 修复饼图类数据格式为echarts数据格式,series为空数组报错的bug
|
||||
- 示例项目 修改uCharts.js更新到v2.1.2版本后,@getIndex方法获取索引值变更为e.currentIndex.index
|
||||
- 示例项目 pages/updata/updata.vue增加滚动条拖动更新(数据动态打点)的demo
|
||||
- 示例项目 pages/other/other.vue增加errorReload禁用错误点击重新加载的demo
|
||||
## 2.1.2-20210509(2021-05-09)
|
||||
秋云图表组件 修复APP端初始化时就传入chartData或lacaldata不显示图表的bug
|
||||
## 2.1.1-20210509(2021-05-09)
|
||||
- 秋云图表组件 变更ECharts的eopts配置在renderjs内执行,支持在config-echarts.js配置文件内写function配置。
|
||||
- 秋云图表组件 修复APP端报错Prop being mutated: "onmouse"错误的bug。
|
||||
- 秋云图表组件 修复APP端报错Error: Not Found:Page[6][-1,27] at view.umd.min.js:1的bug。
|
||||
## 2.1.0-20210507(2021-05-07)
|
||||
- 秋云图表组件 修复初始化时就有数据或者数据更新的时候loading加载动画闪动的bug
|
||||
- uCharts.js 修复x轴format方法categories为字符串类型时返回NaN的bug
|
||||
- uCharts.js 修复series.textColor、legend.fontColor未执行全局默认颜色的bug
|
||||
## 2.1.0-20210506(2021-05-06)
|
||||
- 秋云图表组件 修复极个别情况下报错item.properties undefined的bug
|
||||
- 秋云图表组件 修复极个别情况下关闭加载动画reshow不起作用,无法显示图表的bug
|
||||
- 示例项目 pages/ucharts/ucharts.vue 增加时间轴折线图(type="tline")、时间轴区域图(type="tarea")、散点图(type="scatter")、气泡图demo(type="bubble")、倒三角形漏斗图(opts.extra.funnel.type="triangle")、金字塔形漏斗图(opts.extra.funnel.type="pyramid")
|
||||
- 示例项目 pages/format-u/format-u.vue 增加X轴format格式化示例
|
||||
- uCharts.js 升级至v2.1.0版本
|
||||
- uCharts.js 修复 玫瑰图面积模式点击tooltip位置不正确的bug
|
||||
- uCharts.js 修复 玫瑰图点击图例,只剩一个类别显示空白的bug
|
||||
- uCharts.js 修复 饼图类图点击图例,其他图表tooltip位置某些情况下不准的bug
|
||||
- uCharts.js 修复 x轴为矢量轴(时间轴)情况下,点击tooltip位置不正确的bug
|
||||
- uCharts.js 修复 词云图获取点击索引偶尔不准的bug
|
||||
- uCharts.js 增加 直角坐标系图表X轴format格式化方法(原生uCharts.js用法请使用formatter)
|
||||
- uCharts.js 增加 漏斗图扩展配置,倒三角形(opts.extra.funnel.type="triangle"),金字塔形(opts.extra.funnel.type="pyramid")
|
||||
- uCharts.js 增加 散点图(opts.type="scatter")、气泡图(opts.type="bubble")
|
||||
- 后期计划 完善散点图、气泡图,增加markPoints标记点,增加横向条状图。
|
||||
## 2.0.0-20210502(2021-05-02)
|
||||
- uCharts.js 修复词云图获取点击索引不正确的bug
|
||||
## 2.0.0-20210501(2021-05-01)
|
||||
- 秋云图表组件 修复QQ小程序、百度小程序在关闭动画效果情况下,v-for循环使用图表,显示不正确的bug
|
||||
## 2.0.0-20210426(2021-04-26)
|
||||
- 秋云图表组件 修复QQ小程序不支持canvas2d的bug
|
||||
- 秋云图表组件 修复钉钉小程序某些情况点击坐标计算错误的bug
|
||||
- uCharts.js 增加 extra.column.categoryGap 参数,柱状图类每个category点位(X轴点)柱子组之间的间距
|
||||
- uCharts.js 增加 yAxis.data[i].titleOffsetY 参数,标题纵向偏移距离,负数为向上偏移,正数向下偏移
|
||||
- uCharts.js 增加 yAxis.data[i].titleOffsetX 参数,标题横向偏移距离,负数为向左偏移,正数向右偏移
|
||||
- uCharts.js 增加 extra.gauge.labelOffset 参数,仪表盘标签文字径向便宜距离,默认13px
|
||||
## 2.0.0-20210422-2(2021-04-22)
|
||||
秋云图表组件 修复 formatterAssign 未判断 args[key] == null 的情况导致栈溢出的 bug
|
||||
## 2.0.0-20210422(2021-04-22)
|
||||
- 秋云图表组件 修复H5、APP、支付宝小程序、微信小程序canvas2d模式下横屏模式的bug
|
||||
## 2.0.0-20210421(2021-04-21)
|
||||
- uCharts.js 修复多行图例的情况下,图例在上方或者下方时,图例float为左侧或者右侧时,第二行及以后的图例对齐方式不正确的bug
|
||||
## 2.0.0-20210420(2021-04-20)
|
||||
- 秋云图表组件 修复微信小程序开启canvas2d模式后,windows版微信小程序不支持canvas2d模式的bug
|
||||
- 秋云图表组件 修改非uni_modules版本为v2.0版本qiun-data-charts组件
|
||||
## 2.0.0-20210419(2021-04-19)
|
||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
||||
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,如仍不好用,请重启电脑;
|
||||
## 如果是cli项目,请尝试清理node_modules,重新install,还不行就删除项目,再重新install。
|
||||
## 此问题已于DCloud官方确认,HBuilderX下个版本会修复。
|
||||
## 其他图表不显示问题详见[常见问题选项卡](https://demo.ucharts.cn)
|
||||
## <font color=#FF0000> 新手请先完整阅读帮助文档及常见问题3遍,右侧蓝色按钮示例项目请看2遍! </font>
|
||||
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||
## [图表组件在项目中的应用参见 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||
- uCharts.js 修复混合图中柱状图单独设置颜色不生效的bug
|
||||
- uCharts.js 修复多Y轴单独设置fontSize时,开启canvas2d后,未对应放大字体的bug
|
||||
## 2.0.0-20210418(2021-04-18)
|
||||
- 秋云图表组件 增加directory配置,修复H5端history模式下如果发布到二级目录无法正确加载echarts.min.js的bug
|
||||
## 2.0.0-20210416(2021-04-16)
|
||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
||||
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,如仍不好用,请重启电脑;
|
||||
## 如果是cli项目,请尝试清理node_modules,重新install,还不行就删除项目,再重新install。
|
||||
## 此问题已于DCloud官方确认,HBuilderX下个版本会修复。
|
||||
## 其他图表不显示问题详见[常见问题选项卡](https://demo.ucharts.cn)
|
||||
## <font color=#FF0000> 新手请先完整阅读帮助文档及常见问题3遍,右侧蓝色按钮示例项目请看2遍! </font>
|
||||
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||
## [图表组件在项目中的应用参见 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||
- 秋云图表组件 修复APP端某些情况下报错`Not Found Page`的bug,fix by 高级bug开发技术员
|
||||
- 示例项目 修复APP端v-for循环某些情况下报错`Not Found Page`的bug,fix by 高级bug开发技术员
|
||||
- uCharts.js 修复非直角坐标系tooltip提示窗右侧超出未变换方向显示的bug
|
||||
## 2.0.0-20210415(2021-04-15)
|
||||
- 秋云图表组件 修复H5端发布到二级目录下echarts无法加载的bug
|
||||
- 秋云图表组件 修复某些情况下echarts.off('finished')移除监听事件报错的bug
|
||||
## 2.0.0-20210414(2021-04-14)
|
||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
||||
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,如仍不好用,请重启电脑;
|
||||
## 如果是cli项目,请尝试清理node_modules,重新install,还不行就删除项目,再重新install。
|
||||
## 此问题已于DCloud官方确认,HBuilderX下个版本会修复。
|
||||
## 其他图表不显示问题详见[常见问题选项卡](https://demo.ucharts.cn)
|
||||
## <font color=#FF0000> 新手请先完整阅读帮助文档及常见问题3遍,右侧蓝色按钮示例项目请看2遍! </font>
|
||||
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||
## [图表组件在项目中的应用参见 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||
- 秋云图表组件 修复H5端在cli项目下ECharts引用地址错误的bug
|
||||
- 示例项目 增加ECharts的formatter用法的示例(详见示例项目format-e.vue)
|
||||
- uCharts.js 增加圆环图中心背景色的配置extra.ring.centerColor
|
||||
- uCharts.js 修复微信小程序安卓端柱状图开启透明色后显示不正确的bug
|
||||
## 2.0.0-20210413(2021-04-13)
|
||||
- 秋云图表组件 修复百度小程序多个图表真机未能正确获取根元素dom尺寸的bug
|
||||
- 秋云图表组件 修复百度小程序横屏模式方向不正确的bug
|
||||
- 秋云图表组件 修改ontouch时,@getTouchStart@getTouchMove@getTouchEnd的触发条件
|
||||
- uCharts.js 修复饼图类数据格式series属性不生效的bug
|
||||
- uCharts.js 增加时序区域图 详见示例项目中ucharts.vue
|
||||
## 2.0.0-20210412-2(2021-04-12)
|
||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
||||
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX。如仍不好用,请重启电脑,此问题已于DCloud官方确认,HBuilderX下个版本会修复。
|
||||
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||
## [图表组件在uniCloudAdmin中的应用 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||
- 秋云图表组件 修复uCharts在APP端横屏模式下不能正确渲染的bug
|
||||
- 示例项目 增加ECharts柱状图渐变色、圆角柱状图、横向柱状图(条状图)的示例
|
||||
## 2.0.0-20210412(2021-04-12)
|
||||
- 秋云图表组件 修复created中判断echarts导致APP端无法识别,改回mounted中判断echarts初始化
|
||||
- uCharts.js 修复2d模式下series.textOffset未乘像素比的bug
|
||||
## 2.0.0-20210411(2021-04-11)
|
||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
||||
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,并清空小程序开发者工具缓存。
|
||||
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||
## [图表组件在uniCloudAdmin中的应用 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||
- uCharts.js 折线图区域图增加connectNulls断点续连的功能,详见示例项目中ucharts.vue
|
||||
- 秋云图表组件 变更初始化方法为created,变更type2d默认值为true,优化2d模式下组件初始化后dom获取不到的bug
|
||||
- 秋云图表组件 修复左右布局时,右侧图表点击坐标错误的bug,修复tooltip柱状图自定义颜色显示object的bug
|
||||
## 2.0.0-20210410(2021-04-10)
|
||||
- 修复左右布局时,右侧图表点击坐标错误的bug,修复柱状图自定义颜色tooltip显示object的bug
|
||||
- 增加标记线及柱状图自定义颜色的demo
|
||||
## 2.0.0-20210409(2021-04-08)
|
||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧【使用HBuilderX导入插件】即可体验,DEMO演示及在线生成工具(v2.0文档)[https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||
## 图表组件在uniCloudAdmin中的应用 [UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||
- uCharts.js 修复钉钉小程序百度小程序measureText不准确的bug,修复2d模式下饼图类activeRadius为按比例放大的bug
|
||||
- 修复组件在支付宝小程序端点击位置不准确的bug
|
||||
## 2.0.0-20210408(2021-04-07)
|
||||
- 修复组件在支付宝小程序端不能显示的bug(目前支付宝小程不能点击交互,后续修复)
|
||||
- uCharts.js 修复高分屏下柱状图类,圆弧进度条 自定义宽度不能按比例放大的bug
|
||||
## 2.0.0-20210407(2021-04-06)
|
||||
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧【使用HBuilderX导入插件】即可体验,DEMO演示及在线生成工具(v2.0文档)[https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||
## 增加 通过tofix和unit快速格式化y轴的demo add by `howcode`
|
||||
## 增加 图表组件在uniCloudAdmin中的应用 [UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||
## 2.0.0-20210406(2021-04-05)
|
||||
# 秋云图表组件+uCharts v2.0版本同步上线,使用方法详见https://demo.ucharts.cn帮助页
|
||||
## 2.0.0(2021-04-05)
|
||||
# 秋云图表组件+uCharts v2.0版本同步上线,使用方法详见https://demo.ucharts.cn帮助页
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,162 @@
|
|||
<template>
|
||||
<view class="container loading1">
|
||||
<view class="shape shape1"></view>
|
||||
<view class="shape shape2"></view>
|
||||
<view class="shape shape3"></view>
|
||||
<view class="shape shape4"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'loading1',
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped="true">
|
||||
.container {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
}
|
||||
.container.loading1 {
|
||||
-webkit-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.container .shape {
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 1px;
|
||||
}
|
||||
.container .shape.shape1 {
|
||||
left: 0;
|
||||
background-color: #1890FF;
|
||||
}
|
||||
.container .shape.shape2 {
|
||||
right: 0;
|
||||
background-color: #91CB74;
|
||||
}
|
||||
.container .shape.shape3 {
|
||||
bottom: 0;
|
||||
background-color: #FAC858;
|
||||
}
|
||||
.container .shape.shape4 {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: #EE6666;
|
||||
}
|
||||
|
||||
.loading1 .shape1 {
|
||||
-webkit-animation: animation1shape1 0.5s ease 0s infinite alternate;
|
||||
animation: animation1shape1 0.5s ease 0s infinite alternate;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation1shape1 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(16px, 16px);
|
||||
transform: translate(16px, 16px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation1shape1 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(16px, 16px);
|
||||
transform: translate(16px, 16px);
|
||||
}
|
||||
}
|
||||
.loading1 .shape2 {
|
||||
-webkit-animation: animation1shape2 0.5s ease 0s infinite alternate;
|
||||
animation: animation1shape2 0.5s ease 0s infinite alternate;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation1shape2 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(-16px, 16px);
|
||||
transform: translate(-16px, 16px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation1shape2 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(-16px, 16px);
|
||||
transform: translate(-16px, 16px);
|
||||
}
|
||||
}
|
||||
.loading1 .shape3 {
|
||||
-webkit-animation: animation1shape3 0.5s ease 0s infinite alternate;
|
||||
animation: animation1shape3 0.5s ease 0s infinite alternate;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation1shape3 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(16px, -16px);
|
||||
transform: translate(16px, -16px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation1shape3 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(16px, -16px);
|
||||
transform: translate(16px, -16px);
|
||||
}
|
||||
}
|
||||
.loading1 .shape4 {
|
||||
-webkit-animation: animation1shape4 0.5s ease 0s infinite alternate;
|
||||
animation: animation1shape4 0.5s ease 0s infinite alternate;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation1shape4 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(-16px, -16px);
|
||||
transform: translate(-16px, -16px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation1shape4 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(-16px, -16px);
|
||||
transform: translate(-16px, -16px);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
<template>
|
||||
<view class="container loading2">
|
||||
<view class="shape shape1"></view>
|
||||
<view class="shape shape2"></view>
|
||||
<view class="shape shape3"></view>
|
||||
<view class="shape shape4"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'loading2',
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped="true">
|
||||
.container {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.container.loading2 {
|
||||
-webkit-transform: rotate(10deg);
|
||||
transform: rotate(10deg);
|
||||
}
|
||||
.container.loading2 .shape {
|
||||
border-radius: 5px;
|
||||
}
|
||||
.container.loading2{
|
||||
-webkit-animation: rotation 1s infinite;
|
||||
animation: rotation 1s infinite;
|
||||
}
|
||||
|
||||
.container .shape {
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 1px;
|
||||
}
|
||||
.container .shape.shape1 {
|
||||
left: 0;
|
||||
background-color: #1890FF;
|
||||
}
|
||||
.container .shape.shape2 {
|
||||
right: 0;
|
||||
background-color: #91CB74;
|
||||
}
|
||||
.container .shape.shape3 {
|
||||
bottom: 0;
|
||||
background-color: #FAC858;
|
||||
}
|
||||
.container .shape.shape4 {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: #EE6666;
|
||||
}
|
||||
|
||||
|
||||
.loading2 .shape1 {
|
||||
-webkit-animation: animation2shape1 0.5s ease 0s infinite alternate;
|
||||
animation: animation2shape1 0.5s ease 0s infinite alternate;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation2shape1 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(20px, 20px);
|
||||
transform: translate(20px, 20px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation2shape1 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(20px, 20px);
|
||||
transform: translate(20px, 20px);
|
||||
}
|
||||
}
|
||||
.loading2 .shape2 {
|
||||
-webkit-animation: animation2shape2 0.5s ease 0s infinite alternate;
|
||||
animation: animation2shape2 0.5s ease 0s infinite alternate;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation2shape2 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(-20px, 20px);
|
||||
transform: translate(-20px, 20px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation2shape2 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(-20px, 20px);
|
||||
transform: translate(-20px, 20px);
|
||||
}
|
||||
}
|
||||
.loading2 .shape3 {
|
||||
-webkit-animation: animation2shape3 0.5s ease 0s infinite alternate;
|
||||
animation: animation2shape3 0.5s ease 0s infinite alternate;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation2shape3 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(20px, -20px);
|
||||
transform: translate(20px, -20px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation2shape3 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(20px, -20px);
|
||||
transform: translate(20px, -20px);
|
||||
}
|
||||
}
|
||||
.loading2 .shape4 {
|
||||
-webkit-animation: animation2shape4 0.5s ease 0s infinite alternate;
|
||||
animation: animation2shape4 0.5s ease 0s infinite alternate;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation2shape4 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(-20px, -20px);
|
||||
transform: translate(-20px, -20px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation2shape4 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(-20px, -20px);
|
||||
transform: translate(-20px, -20px);
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,173 @@
|
|||
<template>
|
||||
<view class="container loading3">
|
||||
<view class="shape shape1"></view>
|
||||
<view class="shape shape2"></view>
|
||||
<view class="shape shape3"></view>
|
||||
<view class="shape shape4"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'loading3',
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped="true">
|
||||
.container {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.container.loading3 {
|
||||
-webkit-animation: rotation 1s infinite;
|
||||
animation: rotation 1s infinite;
|
||||
}
|
||||
.container.loading3 .shape1 {
|
||||
border-top-left-radius: 10px;
|
||||
}
|
||||
.container.loading3 .shape2 {
|
||||
border-top-right-radius: 10px;
|
||||
}
|
||||
.container.loading3 .shape3 {
|
||||
border-bottom-left-radius: 10px;
|
||||
}
|
||||
.container.loading3 .shape4 {
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
|
||||
.container .shape {
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 1px;
|
||||
}
|
||||
.container .shape.shape1 {
|
||||
left: 0;
|
||||
background-color: #1890FF;
|
||||
}
|
||||
.container .shape.shape2 {
|
||||
right: 0;
|
||||
background-color: #91CB74;
|
||||
}
|
||||
.container .shape.shape3 {
|
||||
bottom: 0;
|
||||
background-color: #FAC858;
|
||||
}
|
||||
.container .shape.shape4 {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: #EE6666;
|
||||
}
|
||||
|
||||
.loading3 .shape1 {
|
||||
-webkit-animation: animation3shape1 0.5s ease 0s infinite alternate;
|
||||
animation: animation3shape1 0.5s ease 0s infinite alternate;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation3shape1 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(5px, 5px);
|
||||
transform: translate(5px, 5px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation3shape1 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(5px, 5px);
|
||||
transform: translate(5px, 5px);
|
||||
}
|
||||
}
|
||||
.loading3 .shape2 {
|
||||
-webkit-animation: animation3shape2 0.5s ease 0s infinite alternate;
|
||||
animation: animation3shape2 0.5s ease 0s infinite alternate;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation3shape2 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(-5px, 5px);
|
||||
transform: translate(-5px, 5px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation3shape2 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(-5px, 5px);
|
||||
transform: translate(-5px, 5px);
|
||||
}
|
||||
}
|
||||
.loading3 .shape3 {
|
||||
-webkit-animation: animation3shape3 0.5s ease 0s infinite alternate;
|
||||
animation: animation3shape3 0.5s ease 0s infinite alternate;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation3shape3 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(5px, -5px);
|
||||
transform: translate(5px, -5px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation3shape3 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(5px, -5px);
|
||||
transform: translate(5px, -5px);
|
||||
}
|
||||
}
|
||||
.loading3 .shape4 {
|
||||
-webkit-animation: animation3shape4 0.5s ease 0s infinite alternate;
|
||||
animation: animation3shape4 0.5s ease 0s infinite alternate;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation3shape4 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(-5px, -5px);
|
||||
transform: translate(-5px, -5px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation3shape4 {
|
||||
from {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: translate(-5px, -5px);
|
||||
transform: translate(-5px, -5px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,222 @@
|
|||
<template>
|
||||
<view class="container loading5">
|
||||
<view class="shape shape1"></view>
|
||||
<view class="shape shape2"></view>
|
||||
<view class="shape shape3"></view>
|
||||
<view class="shape shape4"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'loading5',
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped="true">
|
||||
.container {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.container.loading5 .shape {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.container .shape {
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 1px;
|
||||
}
|
||||
.container .shape.shape1 {
|
||||
left: 0;
|
||||
background-color: #1890FF;
|
||||
}
|
||||
.container .shape.shape2 {
|
||||
right: 0;
|
||||
background-color: #91CB74;
|
||||
}
|
||||
.container .shape.shape3 {
|
||||
bottom: 0;
|
||||
background-color: #FAC858;
|
||||
}
|
||||
.container .shape.shape4 {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: #EE6666;
|
||||
}
|
||||
|
||||
.loading5 .shape1 {
|
||||
animation: animation5shape1 2s ease 0s infinite reverse;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation5shape1 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(0, 15px);
|
||||
transform: translate(0, 15px);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(15px, 15px);
|
||||
transform: translate(15px, 15px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(15px, 0);
|
||||
transform: translate(15px, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation5shape1 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(0, 15px);
|
||||
transform: translate(0, 15px);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(15px, 15px);
|
||||
transform: translate(15px, 15px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(15px, 0);
|
||||
transform: translate(15px, 0);
|
||||
}
|
||||
}
|
||||
.loading5 .shape2 {
|
||||
animation: animation5shape2 2s ease 0s infinite reverse;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation5shape2 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(-15px, 0);
|
||||
transform: translate(-15px, 0);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(-15px, 15px);
|
||||
transform: translate(-15px, 15px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(0, 15px);
|
||||
transform: translate(0, 15px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation5shape2 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(-15px, 0);
|
||||
transform: translate(-15px, 0);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(-15px, 15px);
|
||||
transform: translate(-15px, 15px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(0, 15px);
|
||||
transform: translate(0, 15px);
|
||||
}
|
||||
}
|
||||
.loading5 .shape3 {
|
||||
animation: animation5shape3 2s ease 0s infinite reverse;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation5shape3 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(15px, 0);
|
||||
transform: translate(15px, 0);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(15px, -15px);
|
||||
transform: translate(15px, -15px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(0, -15px);
|
||||
transform: translate(0, -15px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation5shape3 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(15px, 0);
|
||||
transform: translate(15px, 0);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(15px, -15px);
|
||||
transform: translate(15px, -15px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(0, -15px);
|
||||
transform: translate(0, -15px);
|
||||
}
|
||||
}
|
||||
.loading5 .shape4 {
|
||||
animation: animation5shape4 2s ease 0s infinite reverse;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation5shape4 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(0, -15px);
|
||||
transform: translate(0, -15px);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(-15px, -15px);
|
||||
transform: translate(-15px, -15px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(-15px, 0);
|
||||
transform: translate(-15px, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation5shape4 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(0, -15px);
|
||||
transform: translate(0, -15px);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(-15px, -15px);
|
||||
transform: translate(-15px, -15px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(-15px, 0);
|
||||
transform: translate(-15px, 0);
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
<template>
|
||||
<view class="container loading6">
|
||||
<view class="shape shape1"></view>
|
||||
<view class="shape shape2"></view>
|
||||
<view class="shape shape3"></view>
|
||||
<view class="shape shape4"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'loading6',
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped="true">
|
||||
.container {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.container.loading6 {
|
||||
-webkit-animation: rotation 1s infinite;
|
||||
animation: rotation 1s infinite;
|
||||
}
|
||||
.container.loading6 .shape {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.container .shape {
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 1px;
|
||||
}
|
||||
.container .shape.shape1 {
|
||||
left: 0;
|
||||
background-color: #1890FF;
|
||||
}
|
||||
.container .shape.shape2 {
|
||||
right: 0;
|
||||
background-color: #91CB74;
|
||||
}
|
||||
.container .shape.shape3 {
|
||||
bottom: 0;
|
||||
background-color: #FAC858;
|
||||
}
|
||||
.container .shape.shape4 {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: #EE6666;
|
||||
}
|
||||
|
||||
|
||||
.loading6 .shape1 {
|
||||
-webkit-animation: animation6shape1 2s linear 0s infinite normal;
|
||||
animation: animation6shape1 2s linear 0s infinite normal;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation6shape1 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(0, 18px);
|
||||
transform: translate(0, 18px);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(18px, 18px);
|
||||
transform: translate(18px, 18px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(18px, 0);
|
||||
transform: translate(18px, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation6shape1 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(0, 18px);
|
||||
transform: translate(0, 18px);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(18px, 18px);
|
||||
transform: translate(18px, 18px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(18px, 0);
|
||||
transform: translate(18px, 0);
|
||||
}
|
||||
}
|
||||
.loading6 .shape2 {
|
||||
-webkit-animation: animation6shape2 2s linear 0s infinite normal;
|
||||
animation: animation6shape2 2s linear 0s infinite normal;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation6shape2 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(-18px, 0);
|
||||
transform: translate(-18px, 0);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(-18px, 18px);
|
||||
transform: translate(-18px, 18px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(0, 18px);
|
||||
transform: translate(0, 18px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation6shape2 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(-18px, 0);
|
||||
transform: translate(-18px, 0);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(-18px, 18px);
|
||||
transform: translate(-18px, 18px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(0, 18px);
|
||||
transform: translate(0, 18px);
|
||||
}
|
||||
}
|
||||
.loading6 .shape3 {
|
||||
-webkit-animation: animation6shape3 2s linear 0s infinite normal;
|
||||
animation: animation6shape3 2s linear 0s infinite normal;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation6shape3 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(18px, 0);
|
||||
transform: translate(18px, 0);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(18px, -18px);
|
||||
transform: translate(18px, -18px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(0, -18px);
|
||||
transform: translate(0, -18px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation6shape3 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(18px, 0);
|
||||
transform: translate(18px, 0);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(18px, -18px);
|
||||
transform: translate(18px, -18px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(0, -18px);
|
||||
transform: translate(0, -18px);
|
||||
}
|
||||
}
|
||||
.loading6 .shape4 {
|
||||
-webkit-animation: animation6shape4 2s linear 0s infinite normal;
|
||||
animation: animation6shape4 2s linear 0s infinite normal;
|
||||
}
|
||||
|
||||
@-webkit-keyframes animation6shape4 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(0, -18px);
|
||||
transform: translate(0, -18px);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(-18px, -18px);
|
||||
transform: translate(-18px, -18px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(-18px, 0);
|
||||
transform: translate(-18px, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation6shape4 {
|
||||
0% {
|
||||
-webkit-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: translate(0, -18px);
|
||||
transform: translate(0, -18px);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: translate(-18px, -18px);
|
||||
transform: translate(-18px, -18px);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: translate(-18px, 0);
|
||||
transform: translate(-18px, 0);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<template>
|
||||
<view>
|
||||
<Loading1 v-if="loadingType==1"/>
|
||||
<Loading2 v-if="loadingType==2"/>
|
||||
<Loading3 v-if="loadingType==3"/>
|
||||
<Loading4 v-if="loadingType==4"/>
|
||||
<Loading5 v-if="loadingType==5"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Loading1 from "./loading1.vue";
|
||||
import Loading2 from "./loading2.vue";
|
||||
import Loading3 from "./loading3.vue";
|
||||
import Loading4 from "./loading4.vue";
|
||||
import Loading5 from "./loading5.vue";
|
||||
export default {
|
||||
components:{Loading1,Loading2,Loading3,Loading4,Loading5},
|
||||
name: 'qiun-loading',
|
||||
props: {
|
||||
loadingType: {
|
||||
type: Number,
|
||||
default: 2
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,422 @@
|
|||
/*
|
||||
* uCharts®
|
||||
* 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
|
||||
* Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
|
||||
* Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
* 复制使用请保留本段注释,感谢支持开源!
|
||||
*
|
||||
* uCharts®官方网站
|
||||
* https://www.uCharts.cn
|
||||
*
|
||||
* 开源地址:
|
||||
* https://gitee.com/uCharts/uCharts
|
||||
*
|
||||
* uni-app插件市场地址:
|
||||
* http://ext.dcloud.net.cn/plugin?id=271
|
||||
*
|
||||
*/
|
||||
|
||||
// 通用配置项
|
||||
|
||||
// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
|
||||
const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
|
||||
|
||||
const cfe = {
|
||||
//demotype为自定义图表类型
|
||||
"type": ["pie", "ring", "rose", "funnel", "line", "column", "area", "radar", "gauge","candle","demotype"],
|
||||
//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型例如最后的"demotype"
|
||||
"categories": ["line", "column", "area", "radar", "gauge", "candle","demotype"],
|
||||
//instance为实例变量承载属性,option为eopts承载属性,不要删除
|
||||
"instance": {},
|
||||
"option": {},
|
||||
//下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
|
||||
"formatter":{
|
||||
"tooltipDemo1":function(res){
|
||||
let result = ''
|
||||
for (let i in res) {
|
||||
if (i == 0) {
|
||||
result += res[i].axisValueLabel + '年销售额'
|
||||
}
|
||||
let value = '--'
|
||||
if (res[i].data !== null) {
|
||||
value = res[i].data
|
||||
}
|
||||
// #ifdef H5
|
||||
result += '\n' + res[i].seriesName + ':' + value + ' 万元'
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
result += '<br/>' + res[i].marker + res[i].seriesName + ':' + value + ' 万元'
|
||||
// #endif
|
||||
}
|
||||
return result;
|
||||
},
|
||||
legendFormat:function(name){
|
||||
return "自定义图例+"+name;
|
||||
},
|
||||
yAxisFormatDemo:function (value, index) {
|
||||
return value + '元';
|
||||
},
|
||||
seriesFormatDemo:function(res){
|
||||
return res.name + '年' + res.value + '元';
|
||||
}
|
||||
},
|
||||
//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在eopts参数,会将demotype与eopts中option合并后渲染图表。
|
||||
"demotype":{
|
||||
"color": color,
|
||||
//在这里填写echarts的option即可
|
||||
|
||||
},
|
||||
//下面是自定义配置,请添加项目所需的通用配置
|
||||
"column": {
|
||||
"color": color,
|
||||
"title": {
|
||||
"text": ''
|
||||
},
|
||||
"tooltip": {
|
||||
"trigger": 'axis'
|
||||
},
|
||||
"grid": {
|
||||
"top": 30,
|
||||
"bottom": 50,
|
||||
"right": 15,
|
||||
"left": 40
|
||||
},
|
||||
"legend": {
|
||||
"bottom": 'left',
|
||||
},
|
||||
"toolbox": {
|
||||
"show": false,
|
||||
},
|
||||
"xAxis": {
|
||||
"type": 'category',
|
||||
"axisLabel": {
|
||||
"color": '#666666'
|
||||
},
|
||||
"axisLine": {
|
||||
"lineStyle": {
|
||||
"color": '#CCCCCC'
|
||||
}
|
||||
},
|
||||
"boundaryGap": true,
|
||||
"data": []
|
||||
},
|
||||
"yAxis": {
|
||||
"type": 'value',
|
||||
"axisTick": {
|
||||
"show": false,
|
||||
},
|
||||
"axisLabel": {
|
||||
"color": '#666666'
|
||||
},
|
||||
"axisLine": {
|
||||
"lineStyle": {
|
||||
"color": '#CCCCCC'
|
||||
}
|
||||
},
|
||||
},
|
||||
"seriesTemplate": {
|
||||
"name": '',
|
||||
"type": 'bar',
|
||||
"data": [],
|
||||
"barwidth": 20,
|
||||
"label": {
|
||||
"show": true,
|
||||
"color": "#666666",
|
||||
"position": 'top',
|
||||
},
|
||||
},
|
||||
},
|
||||
"line": {
|
||||
"color": color,
|
||||
"title": {
|
||||
"text": ''
|
||||
},
|
||||
"tooltip": {
|
||||
"trigger": 'axis'
|
||||
},
|
||||
"grid": {
|
||||
"top": 30,
|
||||
"bottom": 50,
|
||||
"right": 15,
|
||||
"left": 40
|
||||
},
|
||||
"legend": {
|
||||
"bottom": 'left',
|
||||
},
|
||||
"toolbox": {
|
||||
"show": false,
|
||||
},
|
||||
"xAxis": {
|
||||
"type": 'category',
|
||||
"axisLabel": {
|
||||
"color": '#666666'
|
||||
},
|
||||
"axisLine": {
|
||||
"lineStyle": {
|
||||
"color": '#CCCCCC'
|
||||
}
|
||||
},
|
||||
"boundaryGap": true,
|
||||
"data": []
|
||||
},
|
||||
"yAxis": {
|
||||
"type": 'value',
|
||||
"axisTick": {
|
||||
"show": false,
|
||||
},
|
||||
"axisLabel": {
|
||||
"color": '#666666'
|
||||
},
|
||||
"axisLine": {
|
||||
"lineStyle": {
|
||||
"color": '#CCCCCC'
|
||||
}
|
||||
},
|
||||
},
|
||||
"seriesTemplate": {
|
||||
"name": '',
|
||||
"type": 'line',
|
||||
"data": [],
|
||||
"barwidth": 20,
|
||||
"label": {
|
||||
"show": true,
|
||||
"color": "#666666",
|
||||
"position": 'top',
|
||||
},
|
||||
},
|
||||
},
|
||||
"area": {
|
||||
"color": color,
|
||||
"title": {
|
||||
"text": ''
|
||||
},
|
||||
"tooltip": {
|
||||
"trigger": 'axis'
|
||||
},
|
||||
"grid": {
|
||||
"top": 30,
|
||||
"bottom": 50,
|
||||
"right": 15,
|
||||
"left": 40
|
||||
},
|
||||
"legend": {
|
||||
"bottom": 'left',
|
||||
},
|
||||
"toolbox": {
|
||||
"show": false,
|
||||
},
|
||||
"xAxis": {
|
||||
"type": 'category',
|
||||
"axisLabel": {
|
||||
"color": '#666666'
|
||||
},
|
||||
"axisLine": {
|
||||
"lineStyle": {
|
||||
"color": '#CCCCCC'
|
||||
}
|
||||
},
|
||||
"boundaryGap": true,
|
||||
"data": []
|
||||
},
|
||||
"yAxis": {
|
||||
"type": 'value',
|
||||
"axisTick": {
|
||||
"show": false,
|
||||
},
|
||||
"axisLabel": {
|
||||
"color": '#666666'
|
||||
},
|
||||
"axisLine": {
|
||||
"lineStyle": {
|
||||
"color": '#CCCCCC'
|
||||
}
|
||||
},
|
||||
},
|
||||
"seriesTemplate": {
|
||||
"name": '',
|
||||
"type": 'line',
|
||||
"data": [],
|
||||
"areaStyle": {},
|
||||
"label": {
|
||||
"show": true,
|
||||
"color": "#666666",
|
||||
"position": 'top',
|
||||
},
|
||||
},
|
||||
},
|
||||
"pie": {
|
||||
"color": color,
|
||||
"title": {
|
||||
"text": ''
|
||||
},
|
||||
"tooltip": {
|
||||
"trigger": 'item'
|
||||
},
|
||||
"grid": {
|
||||
"top": 40,
|
||||
"bottom": 30,
|
||||
"right": 15,
|
||||
"left": 15
|
||||
},
|
||||
"legend": {
|
||||
"bottom": 'left',
|
||||
},
|
||||
"seriesTemplate": {
|
||||
"name": '',
|
||||
"type": 'pie',
|
||||
"data": [],
|
||||
"radius": '50%',
|
||||
"label": {
|
||||
"show": true,
|
||||
"color": "#666666",
|
||||
"position": 'top',
|
||||
},
|
||||
},
|
||||
},
|
||||
"ring": {
|
||||
"color": color,
|
||||
"title": {
|
||||
"text": ''
|
||||
},
|
||||
"tooltip": {
|
||||
"trigger": 'item'
|
||||
},
|
||||
"grid": {
|
||||
"top": 40,
|
||||
"bottom": 30,
|
||||
"right": 15,
|
||||
"left": 15
|
||||
},
|
||||
"legend": {
|
||||
"bottom": 'left',
|
||||
},
|
||||
"seriesTemplate": {
|
||||
"name": '',
|
||||
"type": 'pie',
|
||||
"data": [],
|
||||
"radius": ['40%', '70%'],
|
||||
"avoidLabelOverlap": false,
|
||||
"label": {
|
||||
"show": true,
|
||||
"color": "#666666",
|
||||
"position": 'top',
|
||||
},
|
||||
"labelLine": {
|
||||
"show": true
|
||||
},
|
||||
},
|
||||
},
|
||||
"rose": {
|
||||
"color": color,
|
||||
"title": {
|
||||
"text": ''
|
||||
},
|
||||
"tooltip": {
|
||||
"trigger": 'item'
|
||||
},
|
||||
"legend": {
|
||||
"top": 'bottom'
|
||||
},
|
||||
"seriesTemplate": {
|
||||
"name": '',
|
||||
"type": 'pie',
|
||||
"data": [],
|
||||
"radius": "55%",
|
||||
"center": ['50%', '50%'],
|
||||
"roseType": 'area',
|
||||
},
|
||||
},
|
||||
"funnel": {
|
||||
"color": color,
|
||||
"title": {
|
||||
"text": ''
|
||||
},
|
||||
"tooltip": {
|
||||
"trigger": 'item',
|
||||
"formatter": "{b} : {c}%"
|
||||
},
|
||||
"legend": {
|
||||
"top": 'bottom'
|
||||
},
|
||||
"seriesTemplate": {
|
||||
"name": '',
|
||||
"type": 'funnel',
|
||||
"left": '10%',
|
||||
"top": 60,
|
||||
"bottom": 60,
|
||||
"width": '80%',
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"minSize": '0%',
|
||||
"maxSize": '100%',
|
||||
"sort": 'descending',
|
||||
"gap": 2,
|
||||
"label": {
|
||||
"show": true,
|
||||
"position": 'inside'
|
||||
},
|
||||
"labelLine": {
|
||||
"length": 10,
|
||||
"lineStyle": {
|
||||
"width": 1,
|
||||
"type": 'solid'
|
||||
}
|
||||
},
|
||||
"itemStyle": {
|
||||
"bordercolor": '#fff',
|
||||
"borderwidth": 1
|
||||
},
|
||||
"emphasis": {
|
||||
"label": {
|
||||
"fontSize": 20
|
||||
}
|
||||
},
|
||||
"data": [],
|
||||
},
|
||||
},
|
||||
"gauge": {
|
||||
"color": color,
|
||||
"tooltip": {
|
||||
"formatter": '{a} <br/>{b} : {c}%'
|
||||
},
|
||||
"seriesTemplate": {
|
||||
"name": '业务指标',
|
||||
"type": 'gauge',
|
||||
"detail": {"formatter": '{value}%'},
|
||||
"data": [{"value": 50, "name": '完成率'}]
|
||||
},
|
||||
},
|
||||
"candle": {
|
||||
"xAxis": {
|
||||
"data": []
|
||||
},
|
||||
"yAxis": {},
|
||||
"color": color,
|
||||
"title": {
|
||||
"text": ''
|
||||
},
|
||||
"dataZoom": [{
|
||||
"type": 'inside',
|
||||
"xAxisIndex": [0, 1],
|
||||
"start": 10,
|
||||
"end": 100
|
||||
},
|
||||
{
|
||||
"show": true,
|
||||
"xAxisIndex": [0, 1],
|
||||
"type": 'slider',
|
||||
"bottom": 10,
|
||||
"start": 10,
|
||||
"end": 100
|
||||
}
|
||||
],
|
||||
"seriesTemplate": {
|
||||
"name": '',
|
||||
"type": 'k',
|
||||
"data": [],
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export default cfe;
|
||||
|
|
@ -135,7 +135,6 @@ module.exports = {
|
|||
"ring": {
|
||||
"type": "ring",
|
||||
"color": color,
|
||||
"animation": false,
|
||||
"padding": [5, 5, 5, 5],
|
||||
"rotate": false,
|
||||
"dataLabel": false,
|
||||
|
|
@ -366,6 +365,7 @@ module.exports = {
|
|||
"padding": [20, 15, 5, 10],
|
||||
"xAxis": {
|
||||
"disableGrid": true,
|
||||
"axisLine": false,
|
||||
},
|
||||
"yAxis": {
|
||||
"gridType": "dash",
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# uCharts JSSDK说明
|
||||
1、如不使用uCharts组件,可直接引用u-charts.js,打包编译后会`自动压缩`,压缩后体积约为`120kb`。
|
||||
2、如果120kb的体积仍需压缩,请手到uCharts官网通过在线定制选择您需要的图表。
|
||||
3、config-ucharts.js为uCharts组件的用户配置文件,升级前请`自行备份config-ucharts.js`文件,以免被强制覆盖。
|
||||
4、config-echarts.js为ECharts组件的用户配置文件,升级前请`自行备份config-echarts.js`文件,以免被强制覆盖。
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
"id": "qiun-data-charts",
|
||||
"displayName": "秋云 ucharts echarts 高性能跨全端图表组件",
|
||||
"version": "2.5.0-20230101",
|
||||
"description": "uCharts 新增正负柱状图!支持H5及APP用 ucharts echarts 渲染图表,uniapp可视化首选组件",
|
||||
"keywords": [
|
||||
"ucharts",
|
||||
"echarts",
|
||||
"f2",
|
||||
"图表",
|
||||
"可视化"
|
||||
],
|
||||
"repository": "https://gitee.com/uCharts/uCharts",
|
||||
"engines": {
|
||||
},
|
||||
"dcloudext": {
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": "474119"
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "插件不采集任何数据",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": "https://www.npmjs.com/~qiun",
|
||||
"type": "component-vue"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y"
|
||||
},
|
||||
"client": {
|
||||
"App": {
|
||||
"app-vue": "y",
|
||||
"app-nvue": "y"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "y",
|
||||
"Android Browser": "y",
|
||||
"微信浏览器(Android)": "y",
|
||||
"QQ浏览器(Android)": "y"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "y",
|
||||
"IE": "y",
|
||||
"Edge": "y",
|
||||
"Firefox": "y",
|
||||
"Safari": "y"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "y",
|
||||
"阿里": "y",
|
||||
"百度": "y",
|
||||
"字节跳动": "y",
|
||||
"QQ": "y"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "y",
|
||||
"联盟": "y"
|
||||
},
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||

|
||||
|
||||
|
||||
[](https://gitee.com/uCharts/uCharts/stargazers)
|
||||
[](https://gitee.com/uCharts/uCharts/members)
|
||||
[](https://www.apache.org/licenses/LICENSE-2.0.html)
|
||||
[](https://www.npmjs.com/~qiun)
|
||||
|
||||
|
||||
## uCharts简介
|
||||
|
||||
`uCharts`是一款基于`canvas API`开发的适用于所有前端应用的图表库,开发者编写一套代码,可运行到 Web、iOS、Android(基于 uni-app / taro )、以及各种小程序(微信/支付宝/百度/头条/飞书/QQ/快手/钉钉/淘宝)、快应用等更多支持 canvas API 的平台。
|
||||
|
||||
## 官方网站
|
||||
|
||||
## [https://www.ucharts.cn](https://www.ucharts.cn)
|
||||
|
||||
## 快速体验
|
||||
|
||||
一套代码编到多个平台,依次扫描二维码,亲自体验uCharts图表跨平台效果!其他平台请自行编译。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 致开发者
|
||||
|
||||
感谢各位开发者`五年`来对秋云及uCharts的支持,uCharts的进步离不开各位开发者的鼓励与贡献。为更好的帮助各位开发者使用图表工具,我们推出了新版官网,增加了在线定制、问答社区、在线配置等一些增值服务,为确保您能更好的应用图表组件,建议您先`仔细阅读官网指南`以及`常见问题`,而不是下载下来`直接使用`。如仍然不能解决,请到`官网社区`或开通会员后加入`专属VIP会员群`提问将会很快得到回答。
|
||||
|
||||
## 视频教程
|
||||
|
||||
## [uCharts新手入门教程](https://www.bilibili.com/video/BV1qA411Q7se/?share_source=copy_web&vd_source=42a1242f9aaade6427736af69eb2e1d9)
|
||||
|
||||
|
||||
## 社群支持
|
||||
|
||||
uCharts官方拥有5个2000人的QQ群及专属VIP会员群支持,庞大的用户量证明我们一直在努力,请各位放心使用!uCharts的开源图表组件的开发,团队付出了大量的时间与精力,经过四来的考验,不会有比较明显的bug,请各位放心使用。如果您有更好的想法,可以在`码云提交Pull Requests`以帮助更多开发者完成需求,再次感谢各位对uCharts的鼓励与支持!
|
||||
|
||||
#### 官方交流群
|
||||
- 交流群1:371774600(已满)
|
||||
- 交流群2:619841586(已满)
|
||||
- 交流群3:955340127(已满)
|
||||
- 交流群4:641669795(已满)
|
||||
- 交流群5:236294809(只能扫码加入)
|
||||
|
||||

|
||||
|
||||
- 口令`uniapp`
|
||||
|
||||
#### 专属VIP会员群
|
||||
- 开通会员后详见【账号详情】页面中顶部的滚动通知
|
||||
- 口令`您的用户ID`
|
||||
|
||||
## 版权信息
|
||||
|
||||
uCharts始终坚持开源,遵循 [Apache Licence 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) 开源协议,意味着您无需支付任何费用,即可将uCharts应用到您的产品中。
|
||||
|
||||
注意:这并不意味着您可以将uCharts应用到非法的领域,比如涉及赌博,暴力等方面。如因此产生纠纷或法律问题,uCharts相关方及秋云科技不承担任何责任。
|
||||
|
||||
## 合作伙伴
|
||||
|
||||
[](https://www.diygw.com/)
|
||||
[](https://gitee.com/howcode/has-chat)
|
||||
[](https://www.uviewui.com/)
|
||||
[](https://ext.dcloud.net.cn/plugin?id=7088)
|
||||
[](https://ext.dcloud.net.cn/publisher?id=202)
|
||||
[](https://www.firstui.cn/)
|
||||
[](https://ext.dcloud.net.cn/plugin?id=5169)
|
||||
[](https://www.graceui.com/)
|
||||
|
||||
|
||||
## 更新记录
|
||||
|
||||
详见官网指南中说明,[点击此处查看](https://www.ucharts.cn/v2/#/guide/index?id=100)
|
||||
|
||||
|
||||
## 相关链接
|
||||
- [uCharts官网](https://www.ucharts.cn)
|
||||
- [DCloud插件市场地址](https://ext.dcloud.net.cn/plugin?id=271)
|
||||
- [uCharts码云开源托管地址](https://gitee.com/uCharts/uCharts) [](https://gitee.com/uCharts/uCharts/stargazers)
|
||||
- [uCharts npm开源地址](https://www.ucharts.cn)
|
||||
- [ECharts官网](https://echarts.apache.org/zh/index.html)
|
||||
- [ECharts配置手册](https://echarts.apache.org/zh/option.html)
|
||||
- [图表组件在项目中的应用 ReportPlus数据报表](https://www.ucharts.cn/v2/#/layout/info?id=1)
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -61,7 +61,7 @@
|
|||
*/
|
||||
width: {
|
||||
type: Number,
|
||||
default: 220
|
||||
default: 300
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
showDrawer: false,
|
||||
rightMode: false,
|
||||
watchTimer: null,
|
||||
drawerWidth: 220
|
||||
drawerWidth: 300
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
<style lang="scss" scoped>
|
||||
$uni-mask: rgba($color: #000000, $alpha: 0.4) ;
|
||||
// 抽屉宽度
|
||||
$drawer-width: 240rpx;
|
||||
$drawer-width: 300rpx;
|
||||
|
||||
.uni-drawer {
|
||||
/* #ifndef APP-NVUE */
|
||||
|
|
|
|||
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
Loading…
Reference in New Issue