|
|
@@ -153,11 +153,13 @@
|
|
|
<section class="developer-tab">
|
|
|
<div class="developer-tab-title-list">
|
|
|
<!-- cur -->
|
|
|
- <div v-for="typeItem in typeList" :key="typeItem.typeId" :data-typeid="typeItem.typeId" class="developer-tab-title-item ">
|
|
|
+ <div v-for="typeItem in typeList" :key="typeItem.typeId" @click="reset(typeItem.typeId)" :data-typeid="typeItem.typeId" :class="tid == typeItem.typeId ? 'cur' : ''" class="developer-tab-title-item">
|
|
|
{{ typeItem.name }}
|
|
|
</div>
|
|
|
|
|
|
- <div class="developer-tab-title-line"></div>
|
|
|
+ <div :style="{
|
|
|
+ transform: 'translateX(' + dynamicTranlate + 'px)'
|
|
|
+ }" class="developer-tab-title-line"></div>
|
|
|
</div>
|
|
|
|
|
|
<div class="developer-tab-main">
|
|
|
@@ -165,7 +167,7 @@
|
|
|
PC端圈子发布功能尚未上线,可下载APP体验哦~
|
|
|
</p>
|
|
|
|
|
|
- <ul class="developer-dynamic-list">
|
|
|
+ <ul class="developer-dynamic-list" v-if="list.length > 0">
|
|
|
<li v-for="dynamic in list" :key="dynamic.dynamicId" class="developer-dynamic-item">
|
|
|
<div class="dynamic-user">
|
|
|
<div class="dynamic-user-avatar">
|
|
|
@@ -187,9 +189,11 @@
|
|
|
<div class="dynamic-type-list dynamic-margin">
|
|
|
<span class="dynamic-type-item">{{ dynamic.type_text }}</span>
|
|
|
</div>
|
|
|
- <div class="dynamic-img-area dynamic-margin" v-if="dynamic.img.length > 0">
|
|
|
+ <div class="dynamic-img-area dynamic-margin" v-if="dynamic.img && dynamic.img.length > 0">
|
|
|
<div class="dynamic-img-item" v-for="d_img in dynamic.img" :key="d_img.img">
|
|
|
- <img :src="d_img.img" />
|
|
|
+ <!-- <img :src="d_img.img" /> -->
|
|
|
+ <el-image style="width:90px;height:90px" fit="cover" :src="d_img.img" :preview-src-list="dynamic.imgList">
|
|
|
+ </el-image>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="dynamic-link-area dynamic-margin">
|
|
|
@@ -204,12 +208,17 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="dynamic-control">
|
|
|
- <div class="dynamic-control-item">分享</div>
|
|
|
- <div class="dynamic-control-item">评论</div>
|
|
|
- <div class="dynamic-control-item">赞</div>
|
|
|
+ <div class="dynamic-control-item" @click="gotoAppTips">分享</div>
|
|
|
+ <div class="dynamic-control-item" @click="gotoAppTips">评论</div>
|
|
|
+ <div class="dynamic-control-item" @click="gotoAppTips">赞</div>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
+
|
|
|
+ <div class="dynamic-empty" v-else>
|
|
|
+ <Empty></Empty>
|
|
|
+ <p>暂无动态</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</section>
|
|
|
<!-- 推荐tab:start -->
|
|
|
@@ -239,9 +248,9 @@
|
|
|
<div class="developer-work-tips">待办</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="developer-work-item" @click="gotoApp">
|
|
|
+ <div class="developer-work-item" @click="gotoAppTips">
|
|
|
<div class="developer-work-count">
|
|
|
- {{ workPlatInfo.hireDeveloperProjectNumber }}
|
|
|
+ {{ workPlatInfo.recruitDeveloperCount }}
|
|
|
</div>
|
|
|
<div class="developer-work-tips">沟通</div>
|
|
|
</div>
|
|
|
@@ -302,16 +311,16 @@
|
|
|
<!-- 收入:end -->
|
|
|
|
|
|
<div class="developer-skill block">
|
|
|
- <div class="developer-skill-item" @click="goto('/workbench/skill/index')">
|
|
|
+ <div class="developer-skill-item" :class="userInfo.is_open_kill == 1 ? 'cur':''" @click="goto('/workbench/skill/index')">
|
|
|
<span class="developer-skill-icon icon1"></span>发布技能
|
|
|
</div>
|
|
|
- <div class="developer-skill-item" @click="goto('/workbench/consult/index')">
|
|
|
+ <div class="developer-skill-item" :class="userInfo.is_open_consult == 1 ? 'cur':''" @click="goto('/workbench/consult/index')">
|
|
|
<span class="developer-skill-icon icon2"></span>发布咨询
|
|
|
</div>
|
|
|
- <div class="developer-skill-item" @click="goto('/workbench/learn/index')">
|
|
|
+ <div class="developer-skill-item" :class="userInfo.is_open_mall == 1 ? 'cur':''" @click="goto('/workbench/learn/index')">
|
|
|
<span class="developer-skill-icon icon3"></span>上传课程
|
|
|
</div>
|
|
|
- <div class="developer-skill-item" @click="goto('/otherpage/works/create')">
|
|
|
+ <div class="developer-skill-item" :class="userInfo.is_open_kc == 1 ? 'cur':''" @click="goto('/otherpage/works/create')">
|
|
|
<span class="developer-skill-icon icon4"></span>上传资源
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -326,8 +335,12 @@ import {
|
|
|
} from "vuex";
|
|
|
import qs from "qs";
|
|
|
import DeveloperSeoData from "./developData";
|
|
|
+import Empty from "./empty";
|
|
|
export default {
|
|
|
name: "SeoLearnList",
|
|
|
+ components: {
|
|
|
+ Empty
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
baseUrl: "",
|
|
|
@@ -407,6 +420,20 @@ export default {
|
|
|
// 是否签约
|
|
|
isSign() {
|
|
|
return this.userInfo["realname_re"] == 2 ? true : false;
|
|
|
+ },
|
|
|
+ dynamicTranlate() {
|
|
|
+ let typeList = this.typeList;
|
|
|
+ let total = 730;
|
|
|
+ let block = parseInt(total / typeList.length);
|
|
|
+ let half = parseInt(block / 2);
|
|
|
+ let line = 24 / 2;
|
|
|
+ let curIndex = this.typeList.findIndex(item => {
|
|
|
+ return item.typeId == this.tid;
|
|
|
+ });
|
|
|
+ curIndex = curIndex ? curIndex : 0;
|
|
|
+
|
|
|
+ let result = curIndex * block + half - line;
|
|
|
+ return result;
|
|
|
}
|
|
|
},
|
|
|
async asyncData({
|
|
|
@@ -436,8 +463,8 @@ export default {
|
|
|
this.list = [...this.dynamicList];
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
- this.listenToEnd()
|
|
|
- })
|
|
|
+ this.listenToEnd();
|
|
|
+ });
|
|
|
},
|
|
|
destroy: function () {
|
|
|
window.onscroll = null;
|
|
|
@@ -446,6 +473,9 @@ export default {
|
|
|
gotoApp() {
|
|
|
this.$message("请前往APP完成实名");
|
|
|
},
|
|
|
+ gotoAppTips() {
|
|
|
+ this.$message("请前往APP查看");
|
|
|
+ },
|
|
|
goto(url) {
|
|
|
location.href = url;
|
|
|
},
|
|
|
@@ -474,19 +504,21 @@ export default {
|
|
|
listenToEnd() {
|
|
|
let that = this;
|
|
|
window.onscroll = function () {
|
|
|
- var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
- var windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
|
|
- var scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
|
|
|
+ var scrollTop =
|
|
|
+ document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
+ var windowHeight =
|
|
|
+ document.documentElement.clientHeight || document.body.clientHeight;
|
|
|
+ var scrollHeight =
|
|
|
+ document.documentElement.scrollHeight || document.body.scrollHeight;
|
|
|
|
|
|
if (scrollHeight - scrollTop - windowHeight < 400) {
|
|
|
- console.log(1231)
|
|
|
- that.fetchDynamicData()
|
|
|
+ that.fetchDynamicData();
|
|
|
}
|
|
|
-
|
|
|
- }
|
|
|
+ };
|
|
|
},
|
|
|
reset(type_id) {
|
|
|
- this.page = 1;
|
|
|
+ if (this.pageLoading) return;
|
|
|
+ this.page = 0;
|
|
|
this.isMore = true;
|
|
|
this.tid = type_id;
|
|
|
this.list = [];
|
|
|
@@ -494,22 +526,38 @@ export default {
|
|
|
this.fetchDynamicData();
|
|
|
},
|
|
|
async fetchDynamicData() {
|
|
|
- if (this.pageLoading || !this.isMore) return
|
|
|
+ if (this.pageLoading || !this.isMore) return;
|
|
|
this.pageLoading = true;
|
|
|
let page = this.page + 1;
|
|
|
+ let type_id = this.tid
|
|
|
let res = await this.$axios.$post("/uapi/dynamic/get_dynamic_detail", {
|
|
|
- type_id: this.tid,
|
|
|
+ type_id: type_id,
|
|
|
page: page,
|
|
|
pagesize: this.pageSize
|
|
|
});
|
|
|
|
|
|
setTimeout(() => {
|
|
|
this.pageLoading = false;
|
|
|
- }, 300)
|
|
|
+ }, 100);
|
|
|
|
|
|
if (Number(res.status) === 1) {
|
|
|
+
|
|
|
+ // if (type_id != this.tid) {
|
|
|
+ // return
|
|
|
+ // }
|
|
|
let info = res.data.list;
|
|
|
- this.page = page
|
|
|
+ info = info.map((item) => {
|
|
|
+ let imgList = item.img
|
|
|
+ imgList = imgList.map(item => {
|
|
|
+ return item.img
|
|
|
+ })
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ imgList
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ this.page = page;
|
|
|
this.list = [...this.list, ...info];
|
|
|
this.isMore = info.length < this.pageSize ? false : true;
|
|
|
} else if (Number(res.status) === 40001) {
|