Commit 2cf53fdb authored by godwithdh's avatar godwithdh

time

parent 125fe87a
...@@ -186,7 +186,6 @@ export default { ...@@ -186,7 +186,6 @@ export default {
}) })
}, },
async activated(){ async activated(){
window.d = this;
this.status = this.$route.query.readOnly == 'true' ? 2 : 0; this.status = this.$route.query.readOnly == 'true' ? 2 : 0;
if(this.$route.query.readOnly == 'true'){ if(this.$route.query.readOnly == 'true'){
this.status=2 this.status=2
...@@ -195,7 +194,6 @@ export default { ...@@ -195,7 +194,6 @@ export default {
this.status=1 this.status=1
} }
} }
this.status==1&&(this.value.iStatus=2)
this.value.sCreateAppid=this.$route.params.openId this.value.sCreateAppid=this.$route.params.openId
if(this.status>0){ if(this.status>0){
await this.getHealthDate(); await this.getHealthDate();
...@@ -245,13 +243,14 @@ export default { ...@@ -245,13 +243,14 @@ export default {
}, },
async upData(){//保存数据 async upData(){//保存数据
if(this.checkData()){ if(this.checkData()){
this.value.iStatus=this.status>0?2:1
var value=await this.request("saveHealth",{ var value=await this.request("saveHealth",{
data:this.value, data:this.value,
},"加载中",{}) },"加载中",{})
if(/^\d+$/.test(value)){ if(/^\d+$/.test(value)){
wx.miniProgram.navigateBack() wx.miniProgram.navigateBack()
}else{ }else{
this.$vux.toast.text('保存失败!', 'middle'); this.$vux.toast.text(this.status>0?'修改失败!':'保存失败!', 'middle');
} }
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment