|
|
@@ -1,103 +1,320 @@
|
|
|
<template>
|
|
|
-<div :class="mobile ? 'mobileMain' : ''" :style="{marginTop: mainMarginTop, marginBottom: mobile ? '0px' : '30px !important'}">
|
|
|
-
|
|
|
+<div :class="mobile ? 'mobileMain' : ''" :style="{
|
|
|
+ marginTop: mainMarginTop,
|
|
|
+ marginBottom: mobile ? '0px' : '30px !important'
|
|
|
+ }">
|
|
|
<div class="developer-container" v-if="!mobile">
|
|
|
<div class="developer-left">
|
|
|
<!-- 接单流程:start -->
|
|
|
- <div class="developer-process block">
|
|
|
+ <section class="developer-process block">
|
|
|
<h3 class="title">接单流程</h3>
|
|
|
<div class="developer-process-list">
|
|
|
- <div class="developer-process-item">
|
|
|
- <div class="developer-process-step cur">
|
|
|
+ <article class="developer-process-item cur">
|
|
|
+ <div class="developer-process-step line">
|
|
|
<div class="developer-process-step-icon icon-1"></div>
|
|
|
<div class="developer-process-step-content">注册</div>
|
|
|
</div>
|
|
|
<div class="developer-process-tips">成为客栈注册用户</div>
|
|
|
- </div>
|
|
|
+ </article>
|
|
|
|
|
|
- <div class="developer-process-item">
|
|
|
- <div class="developer-process-step normal">
|
|
|
- <div class="developer-process-step-icon icon-2"></div>
|
|
|
+ <article class="developer-process-item" :class="isRealName ? '' : ''">
|
|
|
+ <div class="developer-process-step normal line">
|
|
|
+ <div class="developer-process-step-icon icon-2" :class="isRealName ? 'icon-1' : 'icon-2'"></div>
|
|
|
<div class="developer-process-step-content">实名认证</div>
|
|
|
</div>
|
|
|
<div class="developer-process-tips">
|
|
|
- <p>按国家相关规定,用户需实名,目前尚未实名</p>
|
|
|
- <p><a href="">立即使命</a></p>
|
|
|
+ <p>
|
|
|
+ 按国家相关规定,用户需实名,目前{{
|
|
|
+ isRealName ? "已实名" : "尚未实名"
|
|
|
+ }}
|
|
|
+ </p>
|
|
|
+ <p v-if="!isRealName">
|
|
|
+ <a href="" @click.prevent="gotoApp">立即实名</a>
|
|
|
+ </p>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </article>
|
|
|
|
|
|
- <div class="developer-process-item">
|
|
|
- <div class="developer-process-step normal">
|
|
|
+ <article class="developer-process-item" :class="isSign ? '' : ''">
|
|
|
+ <div class="developer-process-step normal line">
|
|
|
<div class="developer-process-step-icon icon-3"></div>
|
|
|
<div class="developer-process-step-content">签约开发者</div>
|
|
|
</div>
|
|
|
<div class="developer-process-tips">
|
|
|
- <p>尚未签约 <a href="">立即签约</a></p>
|
|
|
+ <p v-if="!isSign">尚未签约 <a href="/sign/new">立即签约</a></p>
|
|
|
+ <p v-else>已签约</p>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </article>
|
|
|
|
|
|
- <div class="developer-process-item">
|
|
|
+ <article class="developer-process-item" :class="isSign ? '' : ''">
|
|
|
<div class="developer-process-step normal">
|
|
|
<div class="developer-process-step-icon icon-4"></div>
|
|
|
<div class="developer-process-step-content">开始接单</div>
|
|
|
</div>
|
|
|
<div class="developer-process-tips">内容已通过</div>
|
|
|
- </div>
|
|
|
+ </article>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </section>
|
|
|
<!-- 接单流程:end -->
|
|
|
|
|
|
<!-- 新人如何接单:start -->
|
|
|
- <div class="developer-order block">
|
|
|
+ <section class="developer-order block">
|
|
|
<h3 class="title">新人如何接单</h3>
|
|
|
- <p class="tips">客栈接单采用智能对接池匹配原则,权重越高优先匹配。当前在“前端”对接池的排名100,影响对接池的因素有以下几点:</p>
|
|
|
- <div class="develop-order-list">
|
|
|
- <div class="develop-order-item">
|
|
|
- <div class="develop-order-title-area">
|
|
|
- <div class="develop-order-icon icon-1"></div>
|
|
|
- <h5 class="develop-order-title">完善个人资料</h5>
|
|
|
- <div class="develop-order-link"><a href="">立即完善</a></div>
|
|
|
- </div>
|
|
|
- <p class="develop-order-tips">账号信息完善度(个人信息+简历+作品)越高,客户信任感更高,也更容易为您精准匹配。</p>
|
|
|
+ <p class="tips">
|
|
|
+ 客栈接单采用智能对接池匹配原则,权重越高优先匹配。当前在“前端”对接池的排名100,影响对接池的因素有以下几点:
|
|
|
+ </p>
|
|
|
+ <div class="developer-order-list">
|
|
|
+ <article class="developer-order-item">
|
|
|
+ <div class="developer-order-title-area">
|
|
|
+ <div class="developer-order-icon icon-1"></div>
|
|
|
+ <h5 class="developer-order-title">完善个人资料</h5>
|
|
|
+ <div class="developer-order-link">
|
|
|
+ <a href="/setting/work">立即完善</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <p class="developer-order-tips">
|
|
|
+ 账号信息完善度(个人信息+简历+作品)越高,客户信任感更高,也更容易为您精准匹配。
|
|
|
+ </p>
|
|
|
+ </article>
|
|
|
+ <article class="developer-order-item">
|
|
|
+ <div class="developer-order-title-area">
|
|
|
+ <div class="developer-order-icon icon-2"></div>
|
|
|
+ <h5 class="developer-order-title">技术等级认证</h5>
|
|
|
+ <div class="developer-order-link">
|
|
|
+ <a href="/frontend/skill_cert/profile">立即认证</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <p class="developer-order-tips">
|
|
|
+ 我们会优先匹配进行过技术认证的开发者,如果您是自由职业者还可以进行自由工作者认证。
|
|
|
+ </p>
|
|
|
+ </article>
|
|
|
+ <article class="developer-order-item">
|
|
|
+ <div class="developer-order-title-area">
|
|
|
+ <div class="developer-order-icon icon-3"></div>
|
|
|
+ <h5 class="developer-order-title">Ping一下</h5>
|
|
|
+ <div class="developer-order-link">
|
|
|
+ <a href="" @click.prevent="ping">Ping一下</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <p class="developer-order-tips">
|
|
|
+ 每日Ping一下,表达你的接单意愿,将提升你的对接池权重。
|
|
|
+ </p>
|
|
|
+ </article>
|
|
|
+ <article class="developer-order-item">
|
|
|
+ <div class="developer-order-title-area">
|
|
|
+ <div class="developer-order-icon icon-4"></div>
|
|
|
+ <h5 class="developer-order-title">客户好评</h5>
|
|
|
+ <!-- <div class="developer-order-link"><a href="">立即完善</a></div> -->
|
|
|
+ </div>
|
|
|
+ <p class="developer-order-tips">
|
|
|
+ 成功接单后,服务质量优秀,之后会多多派单哦!
|
|
|
+ </p>
|
|
|
+ </article>
|
|
|
+ <article class="developer-order-item">
|
|
|
+ <div class="developer-order-title-area">
|
|
|
+ <div class="developer-order-icon icon-5"></div>
|
|
|
+ <h5 class="developer-order-title">开通开发者会员</h5>
|
|
|
+ <div class="developer-order-link">
|
|
|
+ <a href="/type/vip/developer">查看会员介绍</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <p class="developer-order-tips">
|
|
|
+ 开发者会员出来提高权重,还有更多权益!
|
|
|
+ </p>
|
|
|
+ </article>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ <!-- 新人如何接单:end -->
|
|
|
+
|
|
|
+ <!-- 热门课程:start -->
|
|
|
+ <section class="developer-hot block">
|
|
|
+ <article class="developer-hot-class">
|
|
|
+ <h3 class="title">热门课程</h3>
|
|
|
+ <ul class="developer-hot-list">
|
|
|
+ <li v-for="(learnItem, index) in hotInfo['learn']" :key="learnItem.link" class="developer-hot-item text-line-1">
|
|
|
+ <span class="index">{{ index + 1 }}</span>
|
|
|
+ <a :href="learnItem.link">{{ learnItem.title }}</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </article>
|
|
|
+ <article class="developer-hot-resource">
|
|
|
+ <h3 class="title">热门资源</h3>
|
|
|
+ <ul class="developer-hot-list">
|
|
|
+ <li v-for="(workItem, index2) in hotInfo['works']" :key="workItem.link" class="developer-hot-item text-line-1">
|
|
|
+ <span class="index">{{ index2 + 1 }}</span>
|
|
|
+ <a :href="workItem.link">{{ workItem.title }}</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </article>
|
|
|
+ </section>
|
|
|
+ <!-- 热门课程:end -->
|
|
|
+
|
|
|
+ <!-- 推荐tab:start -->
|
|
|
+
|
|
|
+ <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 ">
|
|
|
+ {{ typeItem.name }}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="developer-tab-title-line"></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="developer-tab-main">
|
|
|
+ <p class="developer-tab-tips">
|
|
|
+ PC端圈子发布功能尚未上线,可下载APP体验哦~
|
|
|
+ </p>
|
|
|
+
|
|
|
+ <ul class="developer-dynamic-list">
|
|
|
+ <li v-for="dynamic in list" :key="dynamic.dynamicId" class="developer-dynamic-item">
|
|
|
+ <div class="dynamic-user">
|
|
|
+ <div class="dynamic-user-avatar">
|
|
|
+ <img :src="dynamic.user_info.icon_url" />
|
|
|
+ </div>
|
|
|
+ <div class="dynamic-user-info">
|
|
|
+ <p class="dynamic-user-nickname text-line-1">
|
|
|
+ <span>{{ dynamic.user_info.nickname }}</span><span v-if="dynamic.user_info.freework_level > 2" class="dynamic-level">F{{ dynamic.user_info.freework_level }}</span>
|
|
|
+ </p>
|
|
|
+ <p class="dynamic-job">
|
|
|
+ {{ dynamic.user_info.tag[0].name }} ·
|
|
|
+ {{ dynamic.user_info.tag[1].name }}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="dynamic-title dynamic-margin">
|
|
|
+ {{ dynamic.title }}
|
|
|
+ </div>
|
|
|
+ <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-item" v-for="d_img in dynamic.img" :key="d_img.img">
|
|
|
+ <img :src="d_img.img" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="dynamic-link-area dynamic-margin">
|
|
|
+ <div class="dynamic-link-img-area">
|
|
|
+ <img :src="dynamic.resources.resources_img" />
|
|
|
+ </div>
|
|
|
+ <div class="dynamic-link-content text-line-1">
|
|
|
+ <a :href="dynamic.resources.resources_url">{{
|
|
|
+ dynamic.resources.resources_title
|
|
|
+ }}</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="dynamic-control">
|
|
|
+ <div class="dynamic-control-item">分享</div>
|
|
|
+ <div class="dynamic-control-item">评论</div>
|
|
|
+ <div class="dynamic-control-item">赞</div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ <!-- 推荐tab:start -->
|
|
|
+ </div>
|
|
|
+ <div class="developer-right">
|
|
|
+ <!-- 工作台:start -->
|
|
|
+ <section class="developer-workbench block">
|
|
|
+ <div class="developer-workbench-user">
|
|
|
+ <div class="developer-user-avatar">
|
|
|
+ <img :src="userInfo.icon_url" />
|
|
|
</div>
|
|
|
- <div class="develop-order-item">
|
|
|
- <div class="develop-order-title-area">
|
|
|
- <div class="develop-order-icon icon-2"></div>
|
|
|
- <h5 class="develop-order-title">技术等级认证</h5>
|
|
|
- <div class="develop-order-link"><a href="">立即认证</a></div>
|
|
|
+ <div class="developer-user-info">
|
|
|
+ <div class="developer-user-name text-line-1">
|
|
|
+ {{ userInfo.nickname }}
|
|
|
+ </div>
|
|
|
+ <div class="developer-user-level">
|
|
|
+ 当前等级Lv.{{ userInfo.freework_level }}
|
|
|
</div>
|
|
|
- <p class="develop-order-tips">我们会优先匹配进行过技术认证的开发者,如果您是自由职业者还可以进行自由工作者认证。</p>
|
|
|
</div>
|
|
|
- <div class="develop-order-item">
|
|
|
- <div class="develop-order-title-area">
|
|
|
- <div class="develop-order-icon icon-3"></div>
|
|
|
- <h5 class="develop-order-title">Ping一下</h5>
|
|
|
- <div class="develop-order-link"><a href="">Ping一下</a></div>
|
|
|
+ </div>
|
|
|
+ <h5 class="user-title">工作台</h5>
|
|
|
+ <div class="developer-work-list">
|
|
|
+ <div class="developer-work-item" @click="goto('/wo/work_todo')">
|
|
|
+ <div class="developer-work-count">
|
|
|
+ {{ workPlatInfo.pendingNumber }}
|
|
|
+ </div>
|
|
|
+ <div class="developer-work-tips">待办</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="developer-work-item" @click="gotoApp">
|
|
|
+ <div class="developer-work-count">
|
|
|
+ {{ workPlatInfo.hireDeveloperProjectNumber }}
|
|
|
</div>
|
|
|
- <p class="develop-order-tips">每日Ping一下,表达你的接单意愿,将提升你的对接池权重。</p>
|
|
|
+ <div class="developer-work-tips">沟通</div>
|
|
|
</div>
|
|
|
- <div class="develop-order-item">
|
|
|
- <div class="develop-order-title-area">
|
|
|
- <div class="develop-order-icon icon-4"></div>
|
|
|
- <h5 class="develop-order-title">客户好评</h5>
|
|
|
- <!-- <div class="develop-order-link"><a href="">立即完善</a></div> -->
|
|
|
+ <div class="developer-work-item" @click="goto('/wo/work_hire')">
|
|
|
+ <div class="developer-work-count">
|
|
|
+ {{ workPlatInfo.developerWorkNumber }}
|
|
|
</div>
|
|
|
- <p class="develop-order-tips">成功接单后,服务质量优秀,之后会多多派单哦!</p>
|
|
|
+ <div class="developer-work-tips">工作</div>
|
|
|
</div>
|
|
|
- <div class="develop-order-item">
|
|
|
- <div class="develop-order-title-area">
|
|
|
- <div class="develop-order-icon icon-5"></div>
|
|
|
- <h5 class="develop-order-title">开通开发者会员</h5>
|
|
|
- <div class="develop-order-link"><a href="">查看会员介绍</a></div>
|
|
|
+ <div class="developer-work-item" @click="goto('/wo/work_platform')">
|
|
|
+ <div class="developer-work-count">
|
|
|
+ {{ workPlatInfo.developerProjectNumber }}
|
|
|
</div>
|
|
|
- <p class="develop-order-tips">开发者会员出来提高权重,还有更多权益!</p>
|
|
|
+ <div class="developer-work-tips">整包</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <!-- 新人如何接单:end -->
|
|
|
- </div>
|
|
|
- <div class="developer-right">
|
|
|
+ <div class="developer-setting-area">
|
|
|
+ <div class="developer-setting-item" @click="goto('/setting/work')">
|
|
|
+ <div class="developer-setting-icon setting-icon"></div>
|
|
|
+ <div class="developer-setting-tips ">接单设置</div>
|
|
|
+ </div>
|
|
|
+ <div class="developer-setting-item">
|
|
|
+ <div class="developer-setting-icon ping-icon"></div>
|
|
|
+ <div class="developer-setting-tips" @click="ping">Ping</div>
|
|
|
+ </div>
|
|
|
+ <div class="developer-setting-line"></div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ <!-- 工作台:end -->
|
|
|
+
|
|
|
+ <!-- 收入:start -->
|
|
|
+ <section class="developer-reward block" v-if="init">
|
|
|
+ <div class="developer-reward-title">
|
|
|
+ <p @click="goto('/wo/bills')">总收入 (元) ></p>
|
|
|
+ <div @click="toggleBanlace" class="developer-reward-show-setting" :class="isShowBablance ? 'show' : 'hide'"></div>
|
|
|
+ </div>
|
|
|
+ <div class="developer-reward-count">
|
|
|
+ {{ isShowBablance ? balanceInfo.historyTotalBalance : "****" }}
|
|
|
+ </div>
|
|
|
+ <div class="developer-reward-detail">
|
|
|
+ <div class="developer-reward-item">
|
|
|
+ 账户余额:<span>{{
|
|
|
+ isShowBablance ? balanceInfo.totalBalance : "****"
|
|
|
+ }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="developer-reward-item">
|
|
|
+ 薪资余额:<span>{{
|
|
|
+ isShowBablance ? balanceInfo.gongMallBalance : "****"
|
|
|
+ }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="developer-reward-item">
|
|
|
+ 冻结余额:<span>{{
|
|
|
+ isShowBablance ? balanceInfo.frozenBalance : "****"
|
|
|
+ }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ <!-- 收入:end -->
|
|
|
|
|
|
+ <div class="developer-skill block">
|
|
|
+ <div class="developer-skill-item" @click="goto('/workbench/skill/index')">
|
|
|
+ <span class="developer-skill-icon icon1"></span>发布技能
|
|
|
+ </div>
|
|
|
+ <div class="developer-skill-item" @click="goto('/workbench/consult/index')">
|
|
|
+ <span class="developer-skill-icon icon2"></span>发布咨询
|
|
|
+ </div>
|
|
|
+ <div class="developer-skill-item" @click="goto('/workbench/learn/index')">
|
|
|
+ <span class="developer-skill-icon icon3"></span>上传课程
|
|
|
+ </div>
|
|
|
+ <div class="developer-skill-item" @click="goto('/otherpage/works/create')">
|
|
|
+ <span class="developer-skill-icon icon4"></span>上传资源
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -106,18 +323,27 @@
|
|
|
<script>
|
|
|
import {
|
|
|
mapState
|
|
|
-} from "vuex"
|
|
|
-import qs from "qs"
|
|
|
-
|
|
|
+} from "vuex";
|
|
|
+import qs from "qs";
|
|
|
+import DeveloperSeoData from "./developData";
|
|
|
export default {
|
|
|
- name: 'SeoLearnList',
|
|
|
+ name: "SeoLearnList",
|
|
|
data() {
|
|
|
return {
|
|
|
- baseUrl: '',
|
|
|
+ baseUrl: "",
|
|
|
mobile: false,
|
|
|
// firstLoad: true,
|
|
|
isWeixinApp: true,
|
|
|
- }
|
|
|
+ isShowBablance: 1,
|
|
|
+ init: false,
|
|
|
+
|
|
|
+ tid: "",
|
|
|
+ page: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ list: [],
|
|
|
+ isMore: true,
|
|
|
+ pageLoading: false
|
|
|
+ };
|
|
|
},
|
|
|
head() {
|
|
|
const {
|
|
|
@@ -127,59 +353,171 @@ export default {
|
|
|
h1 = "",
|
|
|
canonical = "",
|
|
|
metaLocation
|
|
|
- } = this.head || {}
|
|
|
+ } = this.head || {};
|
|
|
let obj = {
|
|
|
title: title,
|
|
|
meta: [{
|
|
|
- name: "keywords",
|
|
|
- content: keyword
|
|
|
- }, {
|
|
|
- name: "description",
|
|
|
- content: description
|
|
|
- }, {
|
|
|
- name: "h1",
|
|
|
- content: h1
|
|
|
- }],
|
|
|
+ name: "keywords",
|
|
|
+ content: keyword
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "description",
|
|
|
+ content: description
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "h1",
|
|
|
+ content: h1
|
|
|
+ }
|
|
|
+ ],
|
|
|
link: [{
|
|
|
rel: "canonical",
|
|
|
href: canonical
|
|
|
}]
|
|
|
- }
|
|
|
+ };
|
|
|
if (metaLocation) {
|
|
|
obj.meta.push({
|
|
|
name: "location",
|
|
|
content: metaLocation
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
- return obj
|
|
|
+ return obj;
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(["deviceType"]),
|
|
|
showWxHeader() {
|
|
|
- return !this.deviceType.app && !this.isWeixinApp &&
|
|
|
+ return (
|
|
|
+ !this.deviceType.app &&
|
|
|
+ !this.isWeixinApp &&
|
|
|
(this.deviceType.android || this.deviceType.ios)
|
|
|
+ );
|
|
|
},
|
|
|
mainMarginTop() {
|
|
|
if (this.mobile && this.showWxHeader) {
|
|
|
- return '64px !important'
|
|
|
+ return "64px !important";
|
|
|
} else if (this.mobile) {
|
|
|
- return '0px !important'
|
|
|
+ return "0px !important";
|
|
|
} else {
|
|
|
- return '20px !important'
|
|
|
+ return "20px !important";
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ // 是否实名
|
|
|
+ isRealName() {
|
|
|
+ return this.userInfo["realname_verify_status"] == 2 ? true : false;
|
|
|
+ },
|
|
|
+ // 是否签约
|
|
|
+ isSign() {
|
|
|
+ return this.userInfo["realname_re"] == 2 ? true : false;
|
|
|
+ }
|
|
|
},
|
|
|
+ async asyncData({
|
|
|
+ ...params
|
|
|
+ }) {
|
|
|
+ let dealDataObj = new DeveloperSeoData(params);
|
|
|
+ let ans = await dealDataObj.dealData();
|
|
|
|
|
|
+ return {
|
|
|
+ ...ans
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
mounted() {
|
|
|
- // console.log(444,)
|
|
|
- this.baseUrl = this.$store.state.domainConfig.siteUrl
|
|
|
- this.isWeixinApp = navigator.userAgent.indexOf("miniProgram") > -1
|
|
|
+ let isShowBablance = window.localStorage.getItem("banlanceShow");
|
|
|
+ if (isShowBablance === null || isShowBablance === undefined) {
|
|
|
+ isShowBablance = 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.isShowBablance = Number(isShowBablance);
|
|
|
+ this.init = true;
|
|
|
+
|
|
|
+ this.baseUrl = this.$store.state.domainConfig.siteUrl;
|
|
|
+ this.isWeixinApp = navigator.userAgent.indexOf("miniProgram") > -1;
|
|
|
+
|
|
|
+ this.tid = this.firstType.typeId;
|
|
|
+ this.list = [...this.dynamicList];
|
|
|
+
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.listenToEnd()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ destroy: function () {
|
|
|
+ window.onscroll = null;
|
|
|
},
|
|
|
methods: {
|
|
|
+ gotoApp() {
|
|
|
+ this.$message("请前往APP完成实名");
|
|
|
+ },
|
|
|
+ goto(url) {
|
|
|
+ location.href = url;
|
|
|
+ },
|
|
|
+ async ping() {
|
|
|
+ let res = await this.$axios.$post("/api/remote/ping");
|
|
|
+ if (res.status == 1) {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ toggleBanlace() {
|
|
|
+ if (this.isShowBablance) {
|
|
|
+ this.hideBanlance();
|
|
|
+ } else {
|
|
|
+ this.showBanlance();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ hideBanlance() {
|
|
|
+ this.isShowBablance = 0;
|
|
|
+ window.localStorage.setItem("banlanceShow", 0);
|
|
|
+ },
|
|
|
+ showBanlance() {
|
|
|
+ this.isShowBablance = 1;
|
|
|
+ window.localStorage.setItem("banlanceShow", 1);
|
|
|
+ },
|
|
|
+
|
|
|
+ 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;
|
|
|
+
|
|
|
+ if (scrollHeight - scrollTop - windowHeight < 400) {
|
|
|
+ console.log(1231)
|
|
|
+ that.fetchDynamicData()
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ reset(type_id) {
|
|
|
+ this.page = 1;
|
|
|
+ this.isMore = true;
|
|
|
+ this.tid = type_id;
|
|
|
+ this.list = [];
|
|
|
+ this.pageLoading = false;
|
|
|
+ this.fetchDynamicData();
|
|
|
+ },
|
|
|
+ async fetchDynamicData() {
|
|
|
+ if (this.pageLoading || !this.isMore) return
|
|
|
+ this.pageLoading = true;
|
|
|
+ let page = this.page + 1;
|
|
|
+ let res = await this.$axios.$post("/uapi/dynamic/get_dynamic_detail", {
|
|
|
+ type_id: this.tid,
|
|
|
+ page: page,
|
|
|
+ pagesize: this.pageSize
|
|
|
+ });
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ this.pageLoading = false;
|
|
|
+ }, 300)
|
|
|
|
|
|
+ if (Number(res.status) === 1) {
|
|
|
+ let info = res.data.list;
|
|
|
+ this.page = page
|
|
|
+ this.list = [...this.list, ...info];
|
|
|
+ this.isMore = info.length < this.pageSize ? false : true;
|
|
|
+ } else if (Number(res.status) === 40001) {
|
|
|
+ this.isExist = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|