bug
This commit is contained in:
parent
ad5d8b35e5
commit
85e7a0b34b
|
|
@ -38,10 +38,15 @@ export const getDeviceListDays = (data) => {
|
|||
export const getVersion = (data) => {
|
||||
return post('watch/version/index', data)
|
||||
}
|
||||
// 获取版本号
|
||||
// 获取首页数据
|
||||
export const getIndexData = (data) => {
|
||||
return post('watch/device/getIndexData', data)
|
||||
}
|
||||
// 忘记密码
|
||||
export const forgotPassword = (data) => {
|
||||
return post('watch/login/forgotPassword', data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
|
|
@ -53,5 +58,6 @@ export default {
|
|||
getDayInfo,
|
||||
getDeviceListDays,
|
||||
getVersion,
|
||||
getIndexData
|
||||
getIndexData,
|
||||
forgotPassword
|
||||
}
|
||||
|
|
@ -10,12 +10,12 @@
|
|||
<punch-calendar @switchMonth="switchMonth" @chooseDay="chooseDay" :errorList="errorList" :successList="successList" ref="calendar"></punch-calendar>
|
||||
</view>
|
||||
<view class="list" v-if="dataList.length">
|
||||
<view class="row" v-for="(item, index) in dataList" :key="index">
|
||||
<view class="row" v-for="(item, index) in dataList" :key="index" >
|
||||
<view class="data">
|
||||
<image src="https://img.agrimedia.cn/apptest/%E6%89%8B%E8%A1%A8-%E7%BA%BF%E6%80%A73-0.png" mode="widthFix"></image>
|
||||
<view v-if="type == 'step'">
|
||||
疲劳:{{item.data_msg.wear}}
|
||||
运动量:{{item.data_msg.amountOfExercise}}
|
||||
<!-- 疲劳:{{item.data_msg.wear}} -->
|
||||
运动量:{{item.data_msg.stepCount}}
|
||||
</view>
|
||||
<view v-if="type == 'bloodPressure'">
|
||||
{{item.data_msg.bloodPressureHigh}}/{{item.data_msg.bloodPressureLow}} mmHg
|
||||
|
|
@ -47,9 +47,9 @@
|
|||
<view v-if="type == 'meiTuo'">
|
||||
{{item.data_msg[0] / 10}} MET
|
||||
</view>
|
||||
<view v-if="type == 'bloodLiquid' && desc !== 'uricAcidVal'" style="font-size: 24rpx;">
|
||||
<view v-if="type == 'bloodLiquid' && desc !== 'uricAcidVal'" style="font-size: 24rpx;" >
|
||||
<view>总胆固醇:{{item.data_msg.cholesterol/100}} 甘油三脂:{{item.data_msg.triacylglycerol/100}}</view>
|
||||
<view>高密度脂蛋白:{{item.data_msg.highDensity/100}}低密度脂蛋白:{{item.data_msg.lowDensity}}</view>
|
||||
<view>密度脂蛋白:高-{{item.data_msg.highDensity/100}} 低-{{item.data_msg.lowDensity/100}}</view>
|
||||
</view>
|
||||
<!-- <view v-if="Array.isArray(type)">
|
||||
{{item.data_msg[0]}}
|
||||
|
|
@ -144,8 +144,38 @@
|
|||
device_real_time: this.time,
|
||||
device_id:this.getActiceDevice.device_id
|
||||
}).then(res => {
|
||||
console.log('res',res)
|
||||
this.$refs.paging.completeByTotal(res.data,res.last_page);
|
||||
let arrData = []
|
||||
let a = res.data.filter((v) => {
|
||||
return v.data_msg.stepCount > 0;
|
||||
if(this.type == 'step'){
|
||||
|
||||
// if(v.data_msg.stepCount > 0){
|
||||
// console.log(v)
|
||||
// return v;
|
||||
|
||||
// // arrData = [...arrData,v]
|
||||
// // console.log(arrData)
|
||||
// }
|
||||
}else{
|
||||
return v;
|
||||
// arrData.push(v)
|
||||
}
|
||||
})
|
||||
// res.data.map((v,i) => {
|
||||
// if(this.type == 'step'){
|
||||
// if(v.data_msg.stepCount > 0){
|
||||
|
||||
// arrData = [...arrData,v]
|
||||
// console.log(arrData)
|
||||
// }
|
||||
// }else{
|
||||
// arrData.push(v)
|
||||
// }
|
||||
|
||||
// })
|
||||
// // arrData = [...arrData,11]
|
||||
console.log(a)
|
||||
this.$refs.paging.completeByTotal(arrData,res.last_page);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="forget">
|
||||
<tm-nav-bar left-icon="arrow-left" title="修改密码" @clickLeft="back" />
|
||||
<tm-nav-bar left-icon="arrow-left" title="忘记密码" @clickLeft="back" />
|
||||
<view class="content">
|
||||
<!-- 主体 -->
|
||||
<view class="main">
|
||||
|
|
@ -17,7 +17,13 @@
|
|||
maxlength="11"
|
||||
placeholder="请输入新密码"
|
||||
isShowPass
|
||||
></wInput>
|
||||
></wInput>
|
||||
<view class="main-list oBorder">
|
||||
<view class="" style="color: red;">
|
||||
</view>
|
||||
<input class="main-input" v-model="imgCode" placeholder="请输入图形验证码"/>
|
||||
<image @click="reset()" style="width: 200rpx; height: 40rpx" :src="img64" mode=""></image>
|
||||
</view>
|
||||
|
||||
<wInput
|
||||
v-model="verCode"
|
||||
|
|
@ -54,7 +60,10 @@
|
|||
phoneData: "", //电话
|
||||
passData: "", //密码
|
||||
verCode:"", //验证码
|
||||
isRotate: false, //是否加载旋转
|
||||
isRotate: false, //是否加载旋转
|
||||
imgCode: '',
|
||||
captcha_id: '',
|
||||
img64:'',
|
||||
}
|
||||
},
|
||||
components:{
|
||||
|
|
@ -62,35 +71,57 @@
|
|||
wButton
|
||||
},
|
||||
mounted() {
|
||||
_this= this;
|
||||
_this= this;
|
||||
this.getImgcode()
|
||||
},
|
||||
methods: {
|
||||
getVerCode(){
|
||||
//获取验证码
|
||||
if (_this.phoneData.length != 11) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
position: 'bottom',
|
||||
title: '手机号不正确'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
console.log("获取验证码")
|
||||
this.$refs.runCode.$emit('runCode'); //触发倒计时(一般用于请求成功验证码后调用)
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
position: 'bottom',
|
||||
title: '模拟倒计时触发'
|
||||
});
|
||||
|
||||
setTimeout(function(){
|
||||
_this.$refs.runCode.$emit('runCode',0); //假装模拟下需要 终止倒计时
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
position: 'bottom',
|
||||
title: '模拟倒计时终止'
|
||||
});
|
||||
},3000)
|
||||
methods: {
|
||||
// 刷新二维码
|
||||
reset() {
|
||||
this.getImgcode()
|
||||
},
|
||||
getImgcode() {
|
||||
this.$store.dispatch('api/code',{
|
||||
'type' :2
|
||||
}).then(res => {
|
||||
this.img64 = res.captcha_src;
|
||||
this.captcha_id = res.captcha_id
|
||||
})
|
||||
},
|
||||
getVerCode(){
|
||||
if (!this.imgCode) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
position: 'bottom',
|
||||
title: '请输入图形验证码'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
//获取验证码
|
||||
if (_this.phoneData == '') {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
position: 'bottom',
|
||||
title: '手机号不能为空'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
position: 'bottom',
|
||||
title: '验证码发送中'
|
||||
});
|
||||
|
||||
this.$store.dispatch('api/sendSms', {
|
||||
type:2,
|
||||
mobile: this.phoneData,
|
||||
captcha_id: this.captcha_id,
|
||||
captcha_code: this.imgCode
|
||||
}).then(res => {
|
||||
this.$refs.runCode.$emit('runCode'); //触发倒计时(一般用于请求成功验证码后调用)
|
||||
})
|
||||
|
||||
},
|
||||
startRePass() {
|
||||
//重置密码
|
||||
|
|
@ -122,11 +153,18 @@
|
|||
});
|
||||
return false;
|
||||
}
|
||||
console.log("重置密码成功")
|
||||
|
||||
_this.isRotate=true
|
||||
setTimeout(function(){
|
||||
_this.isRotate=false
|
||||
},3000)
|
||||
},3000)
|
||||
this.$store.dispatch('api/forgotPassword', {
|
||||
mobile: this.phoneData,
|
||||
password: this.passData,
|
||||
code: this.verCode
|
||||
}).then(res => {
|
||||
this.back()
|
||||
})
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack({
|
||||
|
|
@ -139,6 +177,43 @@
|
|||
|
||||
<style>
|
||||
@import url("../../components/watch-login/css/icon.css");
|
||||
@import url("./css/main.css");
|
||||
@import url("./css/main.css");
|
||||
.main-list{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
/* height: 36rpx; */ /* Input 高度 */
|
||||
color: #333333;
|
||||
padding: 40rpx 32rpx;
|
||||
margin:32rpx 0;
|
||||
}
|
||||
.img{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.main-input{
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
font-size: 28rpx;
|
||||
/* line-height: 100rpx; */
|
||||
padding-right: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.vercode {
|
||||
color: rgba(0,0,0,0.7);
|
||||
font-size: 24rpx;
|
||||
/* line-height: 100rpx; */
|
||||
}
|
||||
.vercode-run {
|
||||
color: rgba(0,0,0,0.4) !important;
|
||||
}
|
||||
.oBorder{
|
||||
border: none;
|
||||
border-radius: 2.5rem ;
|
||||
-webkit-box-shadow: 0 0 60rpx 0 rgba(43,86,112,.1) ;
|
||||
box-shadow: 0 0 60rpx 0 rgba(43,86,112,.1) ;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@
|
|||
|
||||
// 刷新二维码
|
||||
reset() {
|
||||
|
||||
this.getImgcode()
|
||||
},
|
||||
|
||||
// 获取验证码
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ import {
|
|||
getDayInfo,
|
||||
getDeviceListDays,
|
||||
getVersion,
|
||||
getIndexData
|
||||
getIndexData,
|
||||
forgotPassword
|
||||
} from '@/common/api.js';
|
||||
|
||||
let state = {
|
||||
|
|
@ -81,6 +82,10 @@ let state = {
|
|||
const res = await getIndexData(data)
|
||||
return res
|
||||
},
|
||||
async forgotPassword({commit}, data) {
|
||||
const res = await forgotPassword(data)
|
||||
return res
|
||||
},
|
||||
|
||||
}
|
||||
export default {
|
||||
|
|
|
|||
Loading…
Reference in New Issue