取消用户信息授权
This commit is contained in:
parent
d49728a139
commit
ddca27c8ed
|
|
@ -1,104 +1,110 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="header-con">
|
<view class="header-con">
|
||||||
<view class="header" v-if="token">
|
<view class="header" v-if="token">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image :src="user.headimg" class="headimage mr-10" @click="handleDrawer"></image>
|
<image :src="user.headimg" class="headimage mr-10" @click="handleDrawer"></image>
|
||||||
<view>
|
<view>
|
||||||
<view class="name" @click="handleDrawer">
|
<view class="name" @click="handleDrawer">
|
||||||
<text class="overflow">{{user.name}}</text>
|
<text class="overflow">{{user.name}}</text>
|
||||||
<icon class="iconfont icon-yqfqiehuan"></icon>
|
<icon class="iconfont icon-yqfqiehuan"></icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="age">
|
<view class="age">
|
||||||
<view>
|
<view>
|
||||||
性别:{{!user.sex?"未知":user.sex==1?'男':'女'}}
|
性别:{{!user.sex?"未知":user.sex==1?'男':'女'}}
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
年龄:{{user.mage?user.mage:"0岁"}}
|
年龄:{{user.mage?user.mage:"0岁"}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="celiang_r" @click="handleBluetoothClick">
|
<view class="celiang_r" @click="handleBluetoothClick">
|
||||||
<icon class="t-icon t-icon-tizhongcheng"></icon>
|
<icon class="t-icon t-icon-tizhongcheng"></icon>
|
||||||
<text>上秤测量</text>
|
<text>上秤测量</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="header2" v-else @click="handleLogin">
|
<view class="header2" v-else @click="handleLogin">
|
||||||
<view class="text"><text>登录</text>查看更多信息</view>
|
<view class="text"><text>登录</text>查看更多信息</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- denglu -->
|
<!-- denglu -->
|
||||||
<userLogin></userLogin>
|
<userLogin></userLogin>
|
||||||
<!-- 左侧 -->
|
<!-- 左侧 -->
|
||||||
<leftdrawer></leftdrawer>
|
<leftdrawer></leftdrawer>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
mapState
|
mapState
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
import userLogin from '@/components/userLogin.vue'
|
import userLogin from '@/components/userLogin.vue'
|
||||||
import leftdrawer from "@/components/drawer/drawer.vue"
|
import leftdrawer from "@/components/drawer/drawer.vue"
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
userLogin,
|
userLogin,
|
||||||
leftdrawer
|
leftdrawer
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
devType: "",
|
devType: "",
|
||||||
deviceId: ""
|
deviceId: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
token: {
|
token: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["user"]),
|
...mapState(["user"]),
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.token = uni.getStorageSync('token')
|
// this.token = uni.getStorageSync('token')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 上称测量
|
// 上称测量
|
||||||
handleBluetoothClick() {
|
handleBluetoothClick() {
|
||||||
let that = this
|
let that = this
|
||||||
if (!that.token) {
|
if (!that.token) {
|
||||||
that.$store.commit("changeUserLogin", true)
|
uni.redirectTo({
|
||||||
return
|
url: '/pageTwo/login/login'
|
||||||
}
|
})
|
||||||
uni.openBluetoothAdapter({
|
// that.$store.commit("changeUserLogin", true)
|
||||||
success: e => {
|
return
|
||||||
that.$store.commit("changeBluetooth", true);
|
}
|
||||||
if (that.devType && that.deviceId) {
|
uni.openBluetoothAdapter({
|
||||||
that.$tools.handlePages(that.devType, that.deviceId)
|
success: e => {
|
||||||
return
|
that.$store.commit("changeBluetooth", true);
|
||||||
}
|
if (that.devType && that.deviceId) {
|
||||||
uni.navigateTo({
|
that.$tools.handlePages(that.devType, that.deviceId)
|
||||||
url: "/pages/search/devType"
|
return
|
||||||
})
|
}
|
||||||
console.log('初始化蓝牙成功:' + e.errMsg);
|
uni.navigateTo({
|
||||||
},
|
url: "/pages/search/devType"
|
||||||
fail: err => {
|
})
|
||||||
console.log('初始化蓝牙失败:' + err.errMsg);
|
console.log('初始化蓝牙成功:' + e.errMsg);
|
||||||
return this.$tools.getBluetoothAdapter(err)
|
},
|
||||||
}
|
fail: err => {
|
||||||
});
|
console.log('初始化蓝牙失败:' + err.errMsg);
|
||||||
},
|
return this.$tools.getBluetoothAdapter(err)
|
||||||
// 登录
|
}
|
||||||
handleLogin() {
|
});
|
||||||
this.$store.commit("changeUserLogin", true);
|
},
|
||||||
},
|
// 登录
|
||||||
handleDrawer() {
|
handleLogin() {
|
||||||
this.$store.commit("changeDrawe", true);
|
uni.redirectTo({
|
||||||
},
|
url: '/pageTwo/login/login'
|
||||||
}
|
})
|
||||||
}
|
// that.$store.commit("changeUserLogin", true)
|
||||||
|
},
|
||||||
|
handleDrawer() {
|
||||||
|
this.$store.commit("changeDrawe", true);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -265,7 +265,10 @@
|
||||||
changeMonth(type) {
|
changeMonth(type) {
|
||||||
let that = this
|
let that = this
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
})
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (type == 'pre') {
|
if (type == 'pre') {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,10 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onTap() {
|
onTap() {
|
||||||
this.$store.commit("changeUserLogin", false);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
})
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
},
|
},
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
|
||||||
|
|
@ -110,8 +110,8 @@
|
||||||
phone: that.phone,
|
phone: that.phone,
|
||||||
tenantId: uni.getStorageSync('tenantid'),
|
tenantId: uni.getStorageSync('tenantid'),
|
||||||
sessionId: uni.getStorageSync('sessionid'),
|
sessionId: uni.getStorageSync('sessionid'),
|
||||||
name: that.infoRes.name,
|
name: "",
|
||||||
headImg: that.infoRes.headimg,
|
headImg: "",
|
||||||
code: that.code,
|
code: that.code,
|
||||||
isvrcode: true,
|
isvrcode: true,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,10 @@
|
||||||
handlePK() {
|
handlePK() {
|
||||||
let that = this
|
let that = this
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
})
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (that.isActive.length != 2) {
|
if (that.isActive.length != 2) {
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,10 @@
|
||||||
let that = this
|
let that = this
|
||||||
that.devices = []
|
that.devices = []
|
||||||
if (!that.token) {
|
if (!that.token) {
|
||||||
that.$store.commit("changeUserLogin", true)
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login?url=active' + '&code=' + that.code
|
||||||
|
})
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.openBluetoothAdapter({
|
uni.openBluetoothAdapter({
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,10 @@
|
||||||
handleBluetoothClick() {
|
handleBluetoothClick() {
|
||||||
let that = this
|
let that = this
|
||||||
if (!that.token) {
|
if (!that.token) {
|
||||||
that.$store.commit("changeUserLogin", true)
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
})
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.openBluetoothAdapter({
|
uni.openBluetoothAdapter({
|
||||||
|
|
@ -416,7 +419,10 @@
|
||||||
clickTool(ind) {
|
clickTool(ind) {
|
||||||
let that = this
|
let that = this
|
||||||
if (!that.token) {
|
if (!that.token) {
|
||||||
that.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
})
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (ind == 0) {
|
if (ind == 0) {
|
||||||
|
|
@ -472,7 +478,10 @@
|
||||||
},
|
},
|
||||||
// 登录
|
// 登录
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
})
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
},
|
},
|
||||||
handleDrawer() {
|
handleDrawer() {
|
||||||
this.$store.commit("changeDrawe", true);
|
this.$store.commit("changeDrawe", true);
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,10 @@
|
||||||
methods: {
|
methods: {
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
})
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -170,7 +173,10 @@
|
||||||
handleClick(ind) {
|
handleClick(ind) {
|
||||||
let that = this
|
let that = this
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
})
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (ind == 'adult' && that.configBox.referappid) {
|
if (ind == 'adult' && that.configBox.referappid) {
|
||||||
|
|
@ -193,7 +199,10 @@
|
||||||
},
|
},
|
||||||
navTo(url) {
|
navTo(url) {
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
})
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
@ -202,7 +211,10 @@
|
||||||
},
|
},
|
||||||
handleEditClick() {
|
handleEditClick() {
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
})
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$store.commit("changeEdit", true);
|
this.$store.commit("changeEdit", true);
|
||||||
|
|
|
||||||
|
|
@ -1,319 +1,325 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<!-- 时间选择 -->
|
<!-- 时间选择 -->
|
||||||
<view class="TrendPage">
|
<view class="TrendPage">
|
||||||
<view class="TrendTime">
|
<view class="TrendTime">
|
||||||
<view class="boxTime">
|
<view class="boxTime">
|
||||||
<view class="one">
|
<view class="one">
|
||||||
<picker mode="date" class="f-l" :value="startTime?startTime:startDate" @change="handStartTimeH">
|
<picker mode="date" class="f-l" :value="startTime?startTime:startDate" @change="handStartTimeH">
|
||||||
<view class="uni-input">{{startTime?startTime:startDate}}
|
<view class="uni-input">{{startTime?startTime:startDate}}
|
||||||
<icon class="iconfont iconDown"></icon>
|
<icon class="iconfont iconDown"></icon>
|
||||||
</view>
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
|
|
||||||
<picker mode="date" :end="endDate" class="f-r" :value="endDate" @change="handEndTimeH">
|
<picker mode="date" :end="endDate" class="f-r" :value="endDate" @change="handEndTimeH">
|
||||||
<view class="uni-input">~ {{endTime?endTime:endDate}}
|
<view class="uni-input">~ {{endTime?endTime:endDate}}
|
||||||
<icon class="iconfont iconDown"></icon>
|
<icon class="iconfont iconDown"></icon>
|
||||||
</view>
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
<view class="tow" @click="handAllTime(0)" :class="{style:active==0}">
|
<view class="tow" @click="handAllTime(0)" :class="{style:active==0}">
|
||||||
近3月
|
近3月
|
||||||
</view>
|
</view>
|
||||||
<view class="tow" @click="handAllTime(1)" :class="{style:active==1}">
|
<view class="tow" @click="handAllTime(1)" :class="{style:active==1}">
|
||||||
近半年
|
近半年
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 曲线图 -->
|
<!-- 曲线图 -->
|
||||||
<view class="box boxList">
|
<view class="box boxList">
|
||||||
<view class="listC">
|
<view class="listC">
|
||||||
<view :class="{active:index==active1}" class="name" v-for="(item,index) in weightList" :key="index"
|
<view :class="{active:index==active1}" class="name" v-for="(item,index) in weightList" :key="index"
|
||||||
@click="showbox(index)">
|
@click="showbox(index)">
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="blockC">
|
<view class="blockC">
|
||||||
<view v-if="lineData&&lineData.categories.length&&handTrue">
|
<view v-if="lineData&&lineData.categories.length&&handTrue">
|
||||||
<qiun-data-charts type="area" :chartData="lineData" :canvas2d="true" canvasId="charts09" :cHeight="480"
|
<qiun-data-charts type="area" :chartData="lineData" :canvas2d="true" canvasId="charts09"
|
||||||
:cWidth="680" :animation="false" :opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}"
|
:cHeight="480" :cWidth="680" :animation="false"
|
||||||
:ontouch="true" />
|
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
|
||||||
</view>
|
</view>
|
||||||
<view class="nolist" v-else>
|
<view class="nolist" v-else>
|
||||||
<icon class="iconfont icon-zanwu"></icon>
|
<icon class="iconfont icon-zanwu"></icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 目标-->
|
<!-- 目标-->
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class="data">
|
<view class="data">
|
||||||
<view class="item" @click="handleClick(0)">
|
<view class="item" @click="handleClick(0)">
|
||||||
<view class="val">{{userInfo.targetweight?userInfo.targetweight:0}}<text>kg</text>
|
<view class="val">{{userInfo.targetweight?userInfo.targetweight:0}}<text>kg</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="name">目标体重<icon class="t-icon t-icon-bianji3"></icon>
|
<view class="name">目标体重<icon class="t-icon t-icon-bianji3"></icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="val">{{userInfo.totalweight?Math.abs(userInfo.totalweight):0}}<text>kg</text>
|
<view class="val">{{userInfo.totalweight?Math.abs(userInfo.totalweight):0}}<text>kg</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="name" v-if="Number(userInfo.totalweight)<0">累计增重</view>
|
<view class="name" v-if="Number(userInfo.totalweight)<0">累计增重</view>
|
||||||
<view class="name" v-else>累计减重</view>
|
<view class="name" v-else>累计减重</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="handleClick(1)">
|
<view class="item" @click="handleClick(1)">
|
||||||
<view class="val">{{userInfo.firstweight?userInfo.firstweight:0}}<text>kg</text>
|
<view class="val">{{userInfo.firstweight?userInfo.firstweight:0}}<text>kg</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="name">初始体重<icon class="t-icon t-icon-bianji3"></icon>
|
<view class="name">初始体重<icon class="t-icon t-icon-bianji3"></icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="val">{{userInfo.day?userInfo.day:0}}<text>天</text></view>
|
<view class="val">{{userInfo.day?userInfo.day:0}}<text>天</text></view>
|
||||||
<view class="name">减重天数</view>
|
<view class="name">减重天数</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="handleClick(2)">
|
<view class="item" @click="handleClick(2)">
|
||||||
<view class="val"></view>
|
<view class="val"></view>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<icon class="iconfont icon-tianjia">手动记录</icon>
|
<icon class="iconfont icon-tianjia">手动记录</icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 手动 -->
|
<!-- 手动 -->
|
||||||
<manuaRecord @getList="getList"></manuaRecord>
|
<manuaRecord @getList="getList"></manuaRecord>
|
||||||
<!-- 初始 -->
|
<!-- 初始 -->
|
||||||
<firstweight></firstweight>
|
<firstweight></firstweight>
|
||||||
<!-- 目标 -->
|
<!-- 目标 -->
|
||||||
<targetWeight></targetWeight>
|
<targetWeight></targetWeight>
|
||||||
<!-- 登录 -->
|
<!-- 登录 -->
|
||||||
<userPopup></userPopup>
|
<userPopup></userPopup>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
mapState
|
mapState
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
import userPopup from '@/components/userLogin.vue'
|
import userPopup from '@/components/userLogin.vue'
|
||||||
import targetWeight from '@/components/target/targetWeight.vue';
|
import targetWeight from '@/components/target/targetWeight.vue';
|
||||||
import firstweight from '@/components/target/firstweight.vue';
|
import firstweight from '@/components/target/firstweight.vue';
|
||||||
import manuaRecord from '@/components/target/manuaRecord.vue';
|
import manuaRecord from '@/components/target/manuaRecord.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.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
targetWeight,
|
targetWeight,
|
||||||
firstweight,
|
firstweight,
|
||||||
manuaRecord,
|
manuaRecord,
|
||||||
userPopup,
|
userPopup,
|
||||||
qiunDataCharts,
|
qiunDataCharts,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["user", "Trend", "appTheme"]),
|
...mapState(["user", "Trend", "appTheme"]),
|
||||||
userInfo: function() {
|
userInfo: function() {
|
||||||
return this.user
|
return this.user
|
||||||
},
|
},
|
||||||
endDate() {
|
endDate() {
|
||||||
return this.$tools.getDate("start")
|
return this.$tools.getDate("start")
|
||||||
},
|
},
|
||||||
startDate() {
|
startDate() {
|
||||||
return this.$tools.GetDateStr(-90);
|
return this.$tools.GetDateStr(-90);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// 导航栏颜色
|
// 导航栏颜色
|
||||||
uni.setNavigationBarColor({
|
uni.setNavigationBarColor({
|
||||||
frontColor: '#ffffff',
|
frontColor: '#ffffff',
|
||||||
backgroundColor: this.appTheme,
|
backgroundColor: this.appTheme,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let that = this
|
let that = this
|
||||||
this.token = uni.getStorageSync('token')
|
this.token = uni.getStorageSync('token')
|
||||||
this.active = 0
|
this.active = 0
|
||||||
this.startTime = ""
|
this.startTime = ""
|
||||||
this.endTime = ""
|
this.endTime = ""
|
||||||
that.getList(this.startDate, this.endDate)
|
that.getList(this.startDate, this.endDate)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList(start, end) {
|
getList(start, end) {
|
||||||
console.log("fanhui", start, end)
|
console.log("fanhui", start, end)
|
||||||
let that = this
|
let that = this
|
||||||
that.$model.getTrendList({
|
that.$model.getTrendList({
|
||||||
familyid: uni.getStorageSync('familyid'),
|
familyid: uni.getStorageSync('familyid'),
|
||||||
starttime: start,
|
starttime: start,
|
||||||
endtime: end,
|
endtime: end,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
for (var i = 0; i < that.weightList.length; i++) {
|
for (var i = 0; i < that.weightList.length; i++) {
|
||||||
that.weightList[i].Line = res[that.weightList[i].key];
|
that.weightList[i].Line = res[that.weightList[i].key];
|
||||||
}
|
}
|
||||||
that.showbox(0)
|
that.showbox(0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showbox(index) {
|
showbox(index) {
|
||||||
let that = this
|
let that = this
|
||||||
that.handTrue = false
|
that.handTrue = false
|
||||||
this.$nextTick(function() {
|
this.$nextTick(function() {
|
||||||
that.handTrue = true
|
that.handTrue = true
|
||||||
that.lineData = that.weightList[index].Line
|
that.lineData = that.weightList[index].Line
|
||||||
})
|
})
|
||||||
that.active1 = index
|
that.active1 = index
|
||||||
},
|
},
|
||||||
//开始
|
//开始
|
||||||
handStartTimeH(e) {
|
handStartTimeH(e) {
|
||||||
let that = this
|
let that = this
|
||||||
if (this.endTime) {
|
if (this.endTime) {
|
||||||
if (Date.parse(e.target.value) > Date.parse(this.endTime)) {
|
if (Date.parse(e.target.value) > Date.parse(this.endTime)) {
|
||||||
this.$tools.msg("请选择正确的时间")
|
this.$tools.msg("请选择正确的时间")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Date.parse(e.target.value) > Date.parse(this.endDate)) {
|
if (Date.parse(e.target.value) > Date.parse(this.endDate)) {
|
||||||
this.$tools.msg("请选择正确的时间")
|
this.$tools.msg("请选择正确的时间")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.startTime = e.target.value
|
this.startTime = e.target.value
|
||||||
let endtime = that.endTime ? that.endTime : that.endDate
|
let endtime = that.endTime ? that.endTime : that.endDate
|
||||||
this.getList(that.startTime, endtime)
|
this.getList(that.startTime, endtime)
|
||||||
},
|
},
|
||||||
// 结束
|
// 结束
|
||||||
handEndTimeH(e) {
|
handEndTimeH(e) {
|
||||||
let that = this
|
let that = this
|
||||||
if (this.startTime) {
|
if (this.startTime) {
|
||||||
if (Date.parse(e.target.value) < Date.parse(this.startTime)) {
|
if (Date.parse(e.target.value) < Date.parse(this.startTime)) {
|
||||||
this.$tools.msg("请选择正确的时间")
|
this.$tools.msg("请选择正确的时间")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Date.parse(e.target.value) < Date.parse(this.startDate)) {
|
if (Date.parse(e.target.value) < Date.parse(this.startDate)) {
|
||||||
this.$tools.msg("请选择正确的时间")
|
this.$tools.msg("请选择正确的时间")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.endTime = e.target.value
|
this.endTime = e.target.value
|
||||||
let startTime = that.startTime ? that.startTime : that.startDate
|
let startTime = that.startTime ? that.startTime : that.startDate
|
||||||
this.getList(startTime, this.endTime)
|
this.getList(startTime, this.endTime)
|
||||||
},
|
},
|
||||||
// 日期
|
// 日期
|
||||||
handAllTime(ind) {
|
handAllTime(ind) {
|
||||||
let that = this
|
let that = this
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
return
|
url: '/pageTwo/login/login'
|
||||||
}
|
})
|
||||||
this.active = ind
|
// that.$store.commit("changeUserLogin", true)
|
||||||
if (ind == 0) {
|
return
|
||||||
this.startTime = that.$tools.GetDateStr(-90)
|
}
|
||||||
} else {
|
this.active = ind
|
||||||
this.startTime = that.$tools.GetDateStr(-180)
|
if (ind == 0) {
|
||||||
}
|
this.startTime = that.$tools.GetDateStr(-90)
|
||||||
this.getList(this.startTime, this.endDate)
|
} else {
|
||||||
},
|
this.startTime = that.$tools.GetDateStr(-180)
|
||||||
handleClick(ind) {
|
}
|
||||||
if (!uni.getStorageSync('token')) {
|
this.getList(this.startTime, this.endDate)
|
||||||
this.$store.commit("changeUserLogin", true);
|
},
|
||||||
return
|
handleClick(ind) {
|
||||||
}
|
if (!uni.getStorageSync('token')) {
|
||||||
if (ind == 0) {
|
uni.redirectTo({
|
||||||
this.$store.commit("changeTarget", true);
|
url: '/pageTwo/login/login'
|
||||||
return
|
})
|
||||||
}
|
// that.$store.commit("changeUserLogin", true)
|
||||||
if (ind == 1) {
|
return
|
||||||
this.$store.commit("changeFirst", true);
|
}
|
||||||
return
|
if (ind == 0) {
|
||||||
}
|
this.$store.commit("changeTarget", true);
|
||||||
if (ind == 2) {
|
return
|
||||||
this.$store.commit("changeRecord", true);
|
}
|
||||||
return
|
if (ind == 1) {
|
||||||
}
|
this.$store.commit("changeFirst", true);
|
||||||
},
|
return
|
||||||
},
|
}
|
||||||
data() {
|
if (ind == 2) {
|
||||||
return {
|
this.$store.commit("changeRecord", true);
|
||||||
lineData: null,
|
return
|
||||||
type: null,
|
}
|
||||||
active1: 0,
|
},
|
||||||
weight: "",
|
},
|
||||||
startTime: "",
|
data() {
|
||||||
endTime: "",
|
return {
|
||||||
active: 0,
|
lineData: null,
|
||||||
token: null,
|
type: null,
|
||||||
handTrue: true,
|
active1: 0,
|
||||||
weightList: [{
|
weight: "",
|
||||||
title: '体重',
|
startTime: "",
|
||||||
key: 'weight',
|
endTime: "",
|
||||||
showCon: false,
|
active: 0,
|
||||||
Line: {
|
token: null,
|
||||||
"categories": [],
|
handTrue: true,
|
||||||
"series": [{
|
weightList: [{
|
||||||
"color": "#fb7b92",
|
title: '体重',
|
||||||
"name": "体重",
|
key: 'weight',
|
||||||
"data": []
|
showCon: false,
|
||||||
}]
|
Line: {
|
||||||
},
|
"categories": [],
|
||||||
},
|
"series": [{
|
||||||
{
|
"color": "#fb7b92",
|
||||||
title: 'BMI',
|
"name": "体重",
|
||||||
key: 'bmi',
|
"data": []
|
||||||
Line: {
|
}]
|
||||||
"categories": [],
|
},
|
||||||
"series": [{
|
},
|
||||||
"color": "#6bb0fe",
|
{
|
||||||
"name": "bmi",
|
title: 'BMI',
|
||||||
"data": []
|
key: 'bmi',
|
||||||
}]
|
Line: {
|
||||||
},
|
"categories": [],
|
||||||
}, {
|
"series": [{
|
||||||
title: '肌肉',
|
"color": "#6bb0fe",
|
||||||
key: 'muscle',
|
"name": "bmi",
|
||||||
showCon: false,
|
"data": []
|
||||||
Line: {
|
}]
|
||||||
"categories": [],
|
},
|
||||||
"series": [{
|
}, {
|
||||||
"color": "#ff9f40",
|
title: '肌肉',
|
||||||
"name": "肌肉率",
|
key: 'muscle',
|
||||||
"data": []
|
showCon: false,
|
||||||
}]
|
Line: {
|
||||||
},
|
"categories": [],
|
||||||
},
|
"series": [{
|
||||||
{
|
"color": "#ff9f40",
|
||||||
title: '脂肪',
|
"name": "肌肉率",
|
||||||
key: 'fat_r',
|
"data": []
|
||||||
showCon: false,
|
}]
|
||||||
Line: {
|
},
|
||||||
"categories": [],
|
},
|
||||||
"series": [{
|
{
|
||||||
"color": "#3fcba7",
|
title: '脂肪',
|
||||||
"name": "脂肪率",
|
key: 'fat_r',
|
||||||
"data": []
|
showCon: false,
|
||||||
}]
|
Line: {
|
||||||
},
|
"categories": [],
|
||||||
}
|
"series": [{
|
||||||
],
|
"color": "#3fcba7",
|
||||||
};
|
"name": "脂肪率",
|
||||||
}
|
"data": []
|
||||||
}
|
}]
|
||||||
|
},
|
||||||
|
}
|
||||||
|
],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.TrendTime {
|
.TrendTime {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.listC {
|
.listC {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.boxList {
|
.boxList {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -415,7 +415,10 @@ var _default2 = {
|
||||||
changeMonth: function changeMonth(type) {
|
changeMonth: function changeMonth(type) {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type == 'pre') {
|
if (type == 'pre') {
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,10 @@ var _default = {
|
||||||
computed: _objectSpread({}, (0, _vuex.mapState)(["user", "isLogin"])),
|
computed: _objectSpread({}, (0, _vuex.mapState)(["user", "isLogin"])),
|
||||||
methods: {
|
methods: {
|
||||||
onTap: function onTap() {
|
onTap: function onTap() {
|
||||||
this.$store.commit("changeUserLogin", false);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
},
|
},
|
||||||
getUserInfo: function getUserInfo() {
|
getUserInfo: function getUserInfo() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
|
||||||
|
|
@ -199,8 +199,8 @@ var _default = {
|
||||||
phone: that.phone,
|
phone: that.phone,
|
||||||
tenantId: uni.getStorageSync('tenantid'),
|
tenantId: uni.getStorageSync('tenantid'),
|
||||||
sessionId: uni.getStorageSync('sessionid'),
|
sessionId: uni.getStorageSync('sessionid'),
|
||||||
name: that.infoRes.name,
|
name: "",
|
||||||
headImg: that.infoRes.headimg,
|
headImg: "",
|
||||||
code: that.code,
|
code: that.code,
|
||||||
isvrcode: true
|
isvrcode: true
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
|
|
|
||||||
|
|
@ -291,7 +291,10 @@ var _default = {
|
||||||
handlePK: function handlePK() {
|
handlePK: function handlePK() {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (that.isActive.length != 2) {
|
if (that.isActive.length != 2) {
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,10 @@ var _default = {
|
||||||
var that = this;
|
var that = this;
|
||||||
that.devices = [];
|
that.devices = [];
|
||||||
if (!that.token) {
|
if (!that.token) {
|
||||||
that.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login?url=active' + '&code=' + that.code
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uni.openBluetoothAdapter({
|
uni.openBluetoothAdapter({
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,10 @@ var _default = {
|
||||||
var _this3 = this;
|
var _this3 = this;
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!that.token) {
|
if (!that.token) {
|
||||||
that.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uni.openBluetoothAdapter({
|
uni.openBluetoothAdapter({
|
||||||
|
|
@ -466,7 +469,10 @@ var _default = {
|
||||||
clickTool: function clickTool(ind) {
|
clickTool: function clickTool(ind) {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!that.token) {
|
if (!that.token) {
|
||||||
that.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ind == 0) {
|
if (ind == 0) {
|
||||||
|
|
@ -520,7 +526,10 @@ var _default = {
|
||||||
},
|
},
|
||||||
// 登录
|
// 登录
|
||||||
handleLogin: function handleLogin() {
|
handleLogin: function handleLogin() {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
},
|
},
|
||||||
handleDrawer: function handleDrawer() {
|
handleDrawer: function handleDrawer() {
|
||||||
this.$store.commit("changeDrawe", true);
|
this.$store.commit("changeDrawe", true);
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,10 @@ var _default = {
|
||||||
methods: {
|
methods: {
|
||||||
handleLogin: function handleLogin() {
|
handleLogin: function handleLogin() {
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -215,7 +218,10 @@ var _default = {
|
||||||
handleClick: function handleClick(ind) {
|
handleClick: function handleClick(ind) {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ind == 'adult' && that.configBox.referappid) {
|
if (ind == 'adult' && that.configBox.referappid) {
|
||||||
|
|
@ -238,7 +244,10 @@ var _default = {
|
||||||
},
|
},
|
||||||
navTo: function navTo(url) {
|
navTo: function navTo(url) {
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
@ -247,7 +256,10 @@ var _default = {
|
||||||
},
|
},
|
||||||
handleEditClick: function handleEditClick() {
|
handleEditClick: function handleEditClick() {
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$store.commit("changeEdit", true);
|
this.$store.commit("changeEdit", true);
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,10 @@ var _default = {
|
||||||
handAllTime: function handAllTime(ind) {
|
handAllTime: function handAllTime(ind) {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.active = ind;
|
this.active = ind;
|
||||||
|
|
@ -307,7 +310,10 @@ var _default = {
|
||||||
},
|
},
|
||||||
handleClick: function handleClick(ind) {
|
handleClick: function handleClick(ind) {
|
||||||
if (!uni.getStorageSync('token')) {
|
if (!uni.getStorageSync('token')) {
|
||||||
this.$store.commit("changeUserLogin", true);
|
uni.redirectTo({
|
||||||
|
url: '/pageTwo/login/login'
|
||||||
|
});
|
||||||
|
// that.$store.commit("changeUserLogin", true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ind == 0) {
|
if (ind == 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue