|
@@ -11,7 +11,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="info">
|
|
|
<!--<claimForm :ruleForm="ruleForm" @submitForm="submitForm" @resetForm="resetForm"></claimForm>-->
|
|
|
- <claimForm :ruleForm="claimForm" @fallow = "fallow"></claimForm>
|
|
|
+ <claimForm :ruleForm="claimForm" :saw="saw" @fallow = "fallow"></claimForm>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -40,9 +40,11 @@
|
|
|
charList: {
|
|
|
name: '10',
|
|
|
},
|
|
|
+ saw:'1' //1是显示 0是显示已关注
|
|
|
}),
|
|
|
created() {
|
|
|
this.searchInfo();
|
|
|
+ this.safollow();
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
@@ -58,30 +60,17 @@
|
|
|
this.$set(this, `claimForm`, res.data);
|
|
|
}
|
|
|
},
|
|
|
- // 提交
|
|
|
- // async submitForm({ data }) {
|
|
|
- // let res;
|
|
|
- // if (this.id) {
|
|
|
- // res = await this.update(data);
|
|
|
- // if (res.errcode === 0) {
|
|
|
- // this.$message({
|
|
|
- // message: '信息修改成功',
|
|
|
- // type: 'success',
|
|
|
- // });
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // res = await this.create(data);
|
|
|
- // if (res.errcode === 0) {
|
|
|
- // this.$message({
|
|
|
- // message: '信息创建成功',
|
|
|
- // type: 'success',
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (this.$checkRes(res)) this.resetForm();
|
|
|
- //
|
|
|
- // console.log(res.data);
|
|
|
- // },
|
|
|
+ async safollow() {
|
|
|
+ if (this.id) {
|
|
|
+ var userid = this.user.userid;
|
|
|
+ const ress = await this.beforFollow({ finceId: this.id, userid: userid });
|
|
|
+ if (ress.data.finstatus == 'SUCCESS') {
|
|
|
+ this.$set(this, `saw`, '0');
|
|
|
+ }else{
|
|
|
+ this.$set(this, `saw`, '1');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 关注
|
|
|
async fallow({ data }) {
|
|
|
var finceId=data._id;
|
|
@@ -106,6 +95,7 @@
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+ this.goBack();
|
|
|
},
|
|
|
// 返回
|
|
|
goBack() {
|