|
@@ -6,7 +6,7 @@
|
|
|
</div>
|
|
|
<div class="main">
|
|
|
<p>{{ detailData.zz_name }}</p>
|
|
|
- <div style="display: flex; justify-content: space-between">
|
|
|
+ <div style="display: flex; ">
|
|
|
<div class="left">
|
|
|
<img class="avatar" src="@/assets/img/zhjy/main_3.png" alt="" />
|
|
|
|
|
@@ -29,18 +29,23 @@
|
|
|
<span class="posiA posi4">{{ loveNum }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- <img src="@/assets/img/zhjy/bluezan.png" @click="finger" />
|
|
|
- {{ detailData.zz_like_num }}
|
|
|
- <img src="@/assets/img/zhjy/bluexin.png" alt="" @click="loveIcon" />{{
|
|
|
- detailData.zz_fav_num
|
|
|
- }} -->
|
|
|
<div class="right">
|
|
|
- <span @click="attention">关注</span>
|
|
|
+ <el-button type="primary" :plain="isFocus" @click="handleFocus">{{
|
|
|
+ !isFocus ? "关注" : "已关注"
|
|
|
+ }}</el-button>
|
|
|
</div>
|
|
|
+ <!-- <div class="right" @click="handleFocus">
|
|
|
+ <el-button type="primary" v-if="attentionSwitch == '0'">
|
|
|
+ 关注
|
|
|
+ </el-button>
|
|
|
+ <el-button :plain="isFocus" v-else>
|
|
|
+ 已关注
|
|
|
+ </el-button>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
|
|
|
<div class=" docx">
|
|
|
- <div>{{ detailData.zz_fj }}</div>
|
|
|
+ <div>{{ detailData.zz_fj_name }}</div>
|
|
|
<span v-if="detailData.zz_fj" @click="download(detailData.zz_fj)">下载附件</span>
|
|
|
</div>
|
|
|
<p class="jieshao">
|
|
@@ -77,6 +82,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { getAvatarUrl } from "@/utils/helper";
|
|
|
import {
|
|
|
zxxx_detail,
|
|
|
zxxx_evaluate_add,
|
|
@@ -101,11 +107,11 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ isFocus: true,
|
|
|
detailData: {},
|
|
|
evaluateInfo: {},
|
|
|
evaluateListData: [],
|
|
|
https: window.GLOBAL_CONFIG.api,
|
|
|
-
|
|
|
pjInfo: {
|
|
|
ke_star: "",
|
|
|
ke_user_realname: "",
|
|
@@ -113,17 +119,60 @@ export default {
|
|
|
kf_id: "",
|
|
|
},
|
|
|
zz_id: "",
|
|
|
- fingerNum: "0", //点赞数
|
|
|
+ fingerNum: 0, //点赞数
|
|
|
fingerSwitch: 0, //0:关 1:开
|
|
|
- loveNum: "0", //收藏
|
|
|
+ loveNum: 0, //收藏
|
|
|
loveSwitch: 0, //0:关 1:开
|
|
|
+ attentionSwitch: 0,
|
|
|
limit: 10,
|
|
|
total: 0,
|
|
|
cur_page: 1,
|
|
|
- listData: []
|
|
|
+ listData: [],
|
|
|
+ attention: "",
|
|
|
+ uw_user_id: ""
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleFocus() {
|
|
|
+ this.isFocus = !this.isFocus;
|
|
|
+ // // /**增加关注或取消*/
|
|
|
+ // if (this.attentionSwitch == 1) {//关注
|
|
|
+ // let transObj = {
|
|
|
+ // uw_user_id: this.uw_user_id,
|
|
|
+ // };
|
|
|
+ // zxxx_attention_del(transObj)
|
|
|
+ // .then(res => {
|
|
|
+ // console.log(res);
|
|
|
+ // })
|
|
|
+ // .catch(error => {
|
|
|
+ // console.log(error)
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // let transObj = {
|
|
|
+ // uw_user_id: this.uw_user_id,
|
|
|
+ // };
|
|
|
+ // zxxx_attention_add(transObj)
|
|
|
+ // .then((res) => {
|
|
|
+ // if (res.code == "1") {
|
|
|
+ // ElMessage({
|
|
|
+ // message: res.msg,
|
|
|
+ // type: "success",
|
|
|
+ // });
|
|
|
+ // this.getListData();
|
|
|
+ // } else {
|
|
|
+ // ElMessage({
|
|
|
+ // message: res.msg,
|
|
|
+ // type: "waring",
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch((error) => {
|
|
|
+ // console.log(error);
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // this.getDetailData();
|
|
|
+
|
|
|
+ },
|
|
|
/**增加赞或取消*/
|
|
|
finger() {
|
|
|
if (this.fingerSwitch == "1") {//去掉赞
|
|
@@ -137,6 +186,7 @@ export default {
|
|
|
message: res.msg,
|
|
|
type: "success",
|
|
|
});
|
|
|
+ this.getDetailData();
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
message: res.msg,
|
|
@@ -146,9 +196,9 @@ export default {
|
|
|
|
|
|
})
|
|
|
.catch(error => { console.log(error) })
|
|
|
+ this.getDetailData();
|
|
|
} else {
|
|
|
let transObj = {
|
|
|
-
|
|
|
zz_id: this.zz_id,
|
|
|
|
|
|
};
|
|
@@ -159,6 +209,7 @@ export default {
|
|
|
message: res.msg,
|
|
|
type: "success",
|
|
|
});
|
|
|
+ this.getDetailData();
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
message: res.msg,
|
|
@@ -176,19 +227,28 @@ export default {
|
|
|
loveIcon() {
|
|
|
if (this.loveSwitch == 1) {//去掉收藏
|
|
|
let transObj = {
|
|
|
- zzf_id: this.zzf_id,
|
|
|
+ zz_id: this.zz_id,
|
|
|
};
|
|
|
zxxx_fav_del(transObj)
|
|
|
.then(res => {
|
|
|
- console.log(res);
|
|
|
+ if (res.code == "1") {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.getDetailData();
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: "waring",
|
|
|
+ });
|
|
|
+ }
|
|
|
})
|
|
|
.catch(error => {
|
|
|
console.log(error)
|
|
|
});
|
|
|
} else {
|
|
|
let transObj = {
|
|
|
-
|
|
|
-
|
|
|
zz_id: this.zz_id,
|
|
|
|
|
|
};
|
|
@@ -199,6 +259,7 @@ export default {
|
|
|
message: res.msg,
|
|
|
type: "success",
|
|
|
});
|
|
|
+ this.getDetailData();
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
message: res.msg,
|
|
@@ -227,45 +288,7 @@ export default {
|
|
|
this.total = Number(res.data.total_rows);
|
|
|
});
|
|
|
},
|
|
|
- /**增加关注或取消*/
|
|
|
- attention() {
|
|
|
- // if (this.loveSwitch == 1) {//关注
|
|
|
- // let transObj = {
|
|
|
- // uw_user_id: this.uw_user_id,
|
|
|
- // };
|
|
|
- // zxxx_attention_del(transObj)
|
|
|
- // .then(res => {
|
|
|
- // console.log(res);
|
|
|
- // })
|
|
|
- // .catch(error => {
|
|
|
- // console.log(error)
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- let transObj = {
|
|
|
- uw_user_id: this.uw_user_id,
|
|
|
|
|
|
- };
|
|
|
- zxxx_attention_add(transObj)
|
|
|
- .then((res) => {
|
|
|
- if (res.code == "1") {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.getListData();
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: "waring",
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- // .catch((error) => {
|
|
|
- // console.log(error);
|
|
|
- // });
|
|
|
- // }
|
|
|
- this.getDetailData();
|
|
|
- },
|
|
|
|
|
|
getDetailData() {
|
|
|
let data = {
|
|
@@ -278,6 +301,8 @@ export default {
|
|
|
this.fingerSwitch = res.data.one_info.is_like; //0:关 1:开
|
|
|
this.loveNum = res.data.one_info.zz_fav_num; //收藏
|
|
|
this.loveSwitch = res.data.one_info.is_fav; //0:关 1:开
|
|
|
+ this.attentionSwitch = res.data.one_info.is_watch; //关注
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
|
|
@@ -559,33 +584,17 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.right {
|
|
|
- width: 400px;
|
|
|
height: 100px;
|
|
|
line-height: 100px;
|
|
|
- font-size: 14px;
|
|
|
- color: #00a3ff;
|
|
|
- display: flex;
|
|
|
- padding-left: 20px;
|
|
|
- border-radius: 0px 12px 0px 12px;
|
|
|
- img {
|
|
|
- display: inline-block;
|
|
|
- width: 17px;
|
|
|
- height: 16px;
|
|
|
- margin: 40px 5px 0 20px;
|
|
|
- }
|
|
|
- span {
|
|
|
+ .el-button {
|
|
|
width: 100px;
|
|
|
height: 40px;
|
|
|
- background: rgba(0, 131, 197, 0.8);
|
|
|
- border-radius: 6px;
|
|
|
- font-size: 16px;
|
|
|
- font-family: PingFangSC, PingFangSC-Regular;
|
|
|
- font-weight: 400;
|
|
|
text-align: center;
|
|
|
- color: #ffffff;
|
|
|
- line-height: 40px;
|
|
|
- margin: 30px 20px;
|
|
|
- cursor: pointer;
|
|
|
+
|
|
|
+ &.el-button--primary.is-plain {
|
|
|
+ background: transparent;
|
|
|
+ color: #409eff;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.docx {
|