Quellcode durchsuchen

获取url参数

liyongli vor 3 Jahren
Ursprung
Commit
de6668a6f1

+ 21 - 9
src/components/tabs.vue

@@ -10,18 +10,21 @@
           :key="i"
           v-for="(item, i) in topicOfConversation"
         >
-          <span class="groupText" @click="() => beforeChange(item)">
+          <span class="groupText" @click="() => beforeChange(item, i)">
             <span>{{ item.title }}</span>
           </span>
         </span>
       </div>
     </van-sticky>
+    <div style="display: none">{{ address }}</div>
   </div>
 </template>
 
 <script>
 import vanSticky from "vant/lib/sticky";
 import "vant/lib/sticky/style";
+
+import utils from "../utils/utils";
 export default {
   name: "Tabs",
   mounted() {},
@@ -56,31 +59,40 @@ export default {
         return title;
       };
     },
+    address() {
+      return this.topicOfConversation;
+    },
   },
   created() {
     this.showTabs();
   },
   methods: {
     showTabs() {
-      let id = this.$utils.getUrl("id") || "";
+      let id = utils.getUrl("id");
+      let isSecond =
+        this.$route.name === "secondTopic" ||
+        this.$route.name === "secondTopicIndex";
+      isSecond && (id = this.$route.params.select);
       let Data =
         this.topicOfConversation.find((v, i) => {
-          if(id) return v.id == id;
-          if(!id) return i == 0;
+          if (id) return v.id == id;
+          else return i == 0;
         }) || {};
-
+      if (!Data.title)
+        return this.beforeChange({ ...this.topicOfConversation[0], select: 0 });
       this.routerData = {
         title: Data.title,
         id: Data.id,
         path: Data.path,
-        select: id,
+        select: 0,
       };
     },
-    beforeChange(item) {
+    beforeChange(item, i) {
       if (item.id === this.routerData.id) return;
-      this.$emit("toRouter", item, item.id);
+      item.select = i;
       this.routerData = item;
-    },
+      this.$emit("toRouter", item);
+    }
   },
 };
 </script>

+ 0 - 19
src/router/index.js

@@ -5,12 +5,10 @@ Vue.use(VueRouter);
 
 import yukang from "@/view/yukang/index.vue";
 import layout from "@/view/layout/index";
-import live from "@/view/live/index";
 
 const routes = [
   {
     path: "/",
-    redirect: "/contrast",
     name: "parendTopic",
     component: layout,
     children: [
@@ -60,23 +58,6 @@ const routes = [
     path:"/secondTopic/:select",
     name: "secondTopic",
     component: resolve => require(["@/view/secondTopic/index.vue"], resolve)
-  },
-  {
-    path: "/live",
-    name: "live",
-    component: live,
-    children:[
-      {
-        path: "douyin",
-        name: "liveDouyin",
-        component: resolve => require(["@/view/liveDouyin/index.vue"], resolve)
-      },
-      {
-        path: "kuaishou",
-        name: "kuaishou",
-        component: resolve => require(["@/view/liveKuaishou/index.vue"], resolve)
-      },
-    ]
   }
 ];
 

+ 33 - 34
src/view/layout/index.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="layout">
     <Tabs
+      ref="tabs"
       v-if="topicOfConversation.length"
       :topicOfConversation="topicOfConversation"
       @toRouter="toRouter"
-      :key="routerKey+'/11'" 
     />
-    <router-view class="basePage" :key="routerKey" />
+    <router-view class="basePage" :key="key" />
   </div>
 </template>
 
@@ -26,18 +26,23 @@ export default {
       topicOfConversation: [],
     };
   },
-  created() {},
+  created() {
+    let season = utils.getUrl("season");
+    sessionStorage.setItem("season", season || 1);
+    this.init(); // 路由变化时更新tabs
+  },
   mounted() {},
   computed: {
-    routerKey() {
-      let date = new Date();
-      let season = utils.getUrl("season");
-      let oriSeason = sessionStorage.getItem("season");
-      if(season != oriSeason || !this.topicOfConversation.length){
-        sessionStorage.setItem("season", season || 1);
-        this.init(); // 路由变化时更新tabs
+    key() {
+      let se = utils.getUrl("season");
+      let orise = sessionStorage.getItem("season");
+      if (se != orise) {
+        this.init();
+      } else if (utils.getUrl("id") === undefined) {
+        let i = this.$refs.tabs ? this.$refs.tabs.routerData ? this.$refs.tabs.routerData.select  ? this.$refs.tabs.routerData.select : 0 : 0 : 0;
+        this.toRouter(this.topicOfConversation[i]);
       }
-      return this.$route.name + date.getTime();
+      return this.$route.fullPath;
     },
   },
   methods: {
@@ -71,38 +76,32 @@ export default {
             id: v.topic_id,
             childList,
           });
-          this.topicOfConversation = list;
         });
-        if (season == 1 && this.$route.name != "contrast") {
-          this.toRouter(
-            this.topicOfConversation[0],
-            this.topicOfConversation[0].id
-          );
-        }
-        if (season == 2 && this.$route.name != "topic") {
-          this.toRouter(
-            this.topicOfConversation[0],
-            this.topicOfConversation[0].id
-          );
-        }
+
+        this.topicOfConversation = list;
+        let i = this.$refs.tabs ? this.$refs.tabs.routerData ? this.$refs.tabs.routerData.select  ? this.$refs.tabs.routerData.select : 0 : 0 : 0;
+        this.toRouter(list[i]);
       });
     },
-    toRouter(params, id) {
+    toRouter(params) {
       let season = sessionStorage.getItem("season");
       let sonlist =
         params.childList && params.childList.length
           ? JSON.stringify(params.childList || [])
           : undefined;
       sonlist = sonlist ? encodeURIComponent(sonlist) : undefined;
-      this.$router.push({
-        path: params.path,
-        query: {
-          id,
-          title: params.real_title,
-          sonlist,
-          season,
-        },
-      });
+      this.sId = params.id;
+      this.$router
+        .push({
+          path: params.path,
+          query: {
+            id: params.id,
+            title: params.real_title,
+            sonlist,
+            select: params.select,
+            season,
+          },
+        });
     },
   },
 };

+ 0 - 82
src/view/live/index.vue

@@ -1,82 +0,0 @@
-<template>
-  <div style="height: 100vh;padding-bottom: 50px">
-    <router-view class="basePage" v-if="douyin || kuaishou" :key="routerKey" />
-    <van-tabbar v-model="active" @change="onChange">
-      <van-tabbar-item v-if="douyin">抖音</van-tabbar-item>
-      <van-tabbar-item v-if="kuaishou">快手</van-tabbar-item>
-    </van-tabbar>
-  </div>
-</template>
-
-<script>
-import { Tabbar as vanTabbar, TabbarItem as vanTabbarItem } from "vant";
-import "vant/lib/tabbar/style";
-import "vant/lib/tabbar-item/style";
-export default {
-  name: "App",
-  components: {
-    vanTabbar,
-    vanTabbarItem,
-  },
-  data() {
-    return {
-      routerData: {},
-      tablist: [],
-      active: 0,
-      douyin: false,
-      kuaishou: false,
-    };
-  },
-  computed: {
-    routerKey() {
-      let date = new Date();
-      return this.routerData.path + date.getTime();
-    },
-  },
-  mounted() {
-    let q = this.$route.query || {};
-    q.douyin === "true" ? (this.douyin = true) : (this.douyin = false);
-    q.kuaishou === "true" ? (this.kuaishou = true) : (this.kuaishou = false);
-    if (!this.douyin && !this.kuaishou) return;
-    this.douyin && this.tablist.push("douyin");
-    this.kuaishou && this.tablist.push("kuaishou");
-    let path = "";
-    if (q.douyin === "true") path = "/live/douyin";
-    else if (q.kuaishou === "true") path = "/live/kuaishou";
-    if (path == "/live/kuaishou")
-      this.$router.push({
-        path,
-        query: {
-          id: q.id,
-          title: q.title,
-          platform:
-            q.douyin === "true"
-              ? "douyin"
-              : q.kuaishou === "true"
-              ? "kuaishou"
-              : "",
-          kuaishou: q.kuaishou,
-          douyin: q.douyin,
-        },
-      });
-  },
-  created() {},
-  methods: {
-    onChange(res) {
-      let q = this.$route.query;
-      this.$router.push({
-        path: "/live/"+ this.tablist[res || 0],
-        query: {
-          id: q.id,
-          title: q.title,
-          platform: this.tablist[res || 0],
-          kuaishou: q.kuaishou,
-          douyin: q.douyin,
-        },
-      });
-    },
-  },
-};
-</script>
-
-<style lang="sass" scoped></style>

+ 0 - 303
src/view/liveDouyin/index.vue

@@ -1,303 +0,0 @@
-<template>
-    <div class="yukang">
-      <head-tabs :data="allList"></head-tabs>
-      <div class="mainBody" style="padding-bottom: 50px">
-        <div class="title">观众来源</div>
-        <div>
-            <canvas
-            ref="chart"
-            :width="canvasRegion.width"
-            :height="canvasRegion.height"
-            ></canvas>
-          <b-canvas
-            keyName="value"
-            :legend="true"
-            :list="platformSort"
-          ></b-canvas>
-        </div>
-        <!-- 实时走势 -->
-        <div class="title">累计粉丝量</div>
-        <c-canvas
-            v-if="AddUpFans.peopleList.length"
-            :showListBtn="true"
-            :list="AddUpFans.peopleList"
-          ></c-canvas>
-        <div class="title">点赞走势</div>
-          <c-canvas
-            v-if="LikeTheTrend.peopleList.length"
-            :list="LikeTheTrend.peopleList"
-            :showListBtn="true"
-          ></c-canvas>
-        <div class="title">实时流量</div>
-          <c-canvas
-            v-if="RealTimeTraffic.peopleList.length"
-            :showListBtn="true"
-            :list="RealTimeTraffic.peopleList"
-          ></c-canvas>
-        <div class="title">观看人次</div>
-          <c-canvas
-            v-if="RealTimePersonTime.peopleList.length"
-            :showListBtn="true"
-            :list="RealTimePersonTime.peopleList"
-          ></c-canvas>
-      </div>
-    </div>
-  </template>
-  
-  <script>
-  import headTabs from "@/components/liveHead.vue";
-  import cCanvas from "@/components/chart";
-  import bCanvas from "@/components/bChart";
-  import {getlive} from "@/api/getList.js"
-  import F2 from '@antv/f2';
-  
-  export default {
-    name: "App",
-    components: {
-      headTabs,
-      cCanvas,
-      bCanvas,
-    },
-    data() {
-      return {
-        canvasRegion: {
-            width: 0,
-            height: 0,
-        },
-        allList: {},
-        platformSort: [],
-        AddUpFans: {peopleList: []},
-        RealTimeTraffic: {peopleList: []},
-        RealTimePersonTime: {peopleList: []},
-        LikeTheTrend: {peopleList: []}
-      };
-    },
-    mounted() {
-        let w = document.body.clientWidth || 0;
-        let h = document.body.clientHeight / 3;
-        this.canvasRegion = {
-            width: w > 1200 ? 1200 : w,
-            height: h,
-        };
-    },
-    created() {
-      let q = this.$route.query;
-      getlive({
-        topic: q.title,
-        platform: q.platform
-      }).then(res=>{
-            let oriData = res || {};
-            let trend = oriData.trend || {};
-            this.allList =  {
-                msg_count: (oriData.webcastMessageList ? oriData.webcastMessageList.count || 0 : 0),
-                like_count: (trend.like || {}).add_like_count || 0,
-                total_fans_count: (trend.fans || {}).club_info_total_fans_count || 0,
-                peopel_time: (trend.user || {}).stats_total_user || 0
-            }
-            let gender = [];
-            let oriGender = oriData.gender || [];
-            for (let i = 0; i < oriGender.length; i++) {
-                const v = oriGender[i];
-                gender.push({
-                    name: v.key == "1" ? "男" : "女",
-                    percent: v.rate * 1,
-                    a: '1'
-                })
-            }
-            this.pie(gender);
-            let cityList = [];
-            let oriCity = oriData.city || [];
-            oriCity.map(v=>{
-                cityList.push({
-                    nickname: v.key == 'Phuket Province' ? "普吉" : v.key,
-                    value: v.count,
-                })
-            })
-
-            this.platformSort = cityList;
-
-             let RealTimeTraffic = {
-                title: "实时流量",
-                subTitle: "",
-                id: 'id' + 10,
-                canvasId: 'canvasId' + 10,
-                type: "line",
-                yType: "value",
-                xType: "time",
-                peopleList: []
-              };
-              let RealTimePersonTime = {
-                title: "观看人次",
-                subTitle: "",
-                id: 'id' + 11,
-                canvasId: 'canvasId' + 11,
-                type: "line",
-                yType: "value",
-                xType: "time",
-                peopleList: []
-              };
-              let AddUpFans = {
-                title: "累计粉丝量",
-                subTitle: "",
-                id: 'id' + 12,
-                canvasId: 'canvasId' + 12,
-                type: "line",
-                yType: "value",
-                xType: "time",
-                peopleList: []
-              };
-              let LikeTheTrend = {
-                title: "点赞走势",
-                subTitle: "",
-                id: 'id' + 13,
-                canvasId: 'canvasId' + 13,
-                type: "line",
-                yType: "value",
-                xType: "time",
-                peopleList: []
-              };
-              // 实时流量
-              RealTimeTraffic.subTitle = "在线人数峰值:" + ((trend.user || {}).user_count || 0) + "  出现时间:" + ((trend.user || {}).crawl_date || "") + " 平均人数:" + ((trend.user || {}).avg_user_count || 0);
-              // 观看人次
-              RealTimePersonTime.subTitle = ((trend.user || {}).stats_user_composition_from_my_follow_count || 0) + "人来自关注页面 " + ((trend.user || {}).stats_user_composition_from_video_detail_count || 0) + "人来自视频推荐";
-              // 累计粉丝量
-              AddUpFans.subTitle = "粉丝峰值:" + ((trend.fans || {}).club_info_total_fans_count || 0) + " 出现在:" + ((trend.fans || {}).crawl_date || "");
-              // 点赞走势
-              LikeTheTrend.subTitle = "点赞峰值:" + ((trend.like || {}).add_like_count || 0) + " 出现在:" + ((trend.like || {}).crawl_date || "");
-              // 趋势图数据
-              for (let i = 0; i < (trend.webcastTrendList || []).length; i++) {
-                const v = (trend.webcastTrendList || [])[i];
-                let time = v.crawl_date.split(" ")[1] || "";
-                
-            /**
-             *   date: v.time,
-            type: "微博-阅读量趋势",
-            value: v.value,
-             * 
-             */
-                RealTimeTraffic.peopleList.push({
-                  value: v.user_count || 0,
-                  type: "实时流量",
-                  date: time
-                });
-                RealTimePersonTime.peopleList.push({
-                  value: v.stats_total_user || 0,
-                  type: "观看人次",
-                  date: time
-                });
-                AddUpFans.peopleList.push({
-                  value: v.club_info_total_fans_count || 0,
-                  type: "累计粉丝量",
-                  date: time
-                });
-                LikeTheTrend.peopleList.push({
-                  value: v.like_count || 0,
-                  type: "点赞走势",
-                  date: time
-                });
-              }
-              
-              this.AddUpFans = AddUpFans;
-              this.RealTimeTraffic = RealTimeTraffic;
-              this.RealTimePersonTime = RealTimePersonTime;
-              this.LikeTheTrend = LikeTheTrend;
-
-
-        })
-    },
-    computed: {},
-    methods: {
-        pie(gender){
-            const chart = new F2.Chart({
-                el: this.$refs.chart,
-                pixelRatio: window.devicePixelRatio,
-            });
-            chart.source(gender, {
-            percent: {
-                formatter: function formatter(val) {
-                return val * 100 + '%';
-                }
-            }
-            });
-            chart.legend({
-            position: 'right',
-            itemFormatter: function itemFormatter(val) {
-                return val;
-            }
-            });
-            chart.tooltip(false);
-            chart.coord('polar', {
-            transposed: true,
-            radius: 0.85
-            });
-            chart.axis(false);
-            chart.interval()
-            .position('a*percent')
-            .color('name', [ '#1890FF', '#13C2C2', '#2FC25B', '#FACC14', '#F04864', '#8543E0' ])
-            .adjust('stack')
-            .style({
-                lineWidth: 1,
-                stroke: '#fff',
-                lineJoin: 'round',
-                lineCap: 'round'
-            })
-            .animate({
-                appear: {
-                duration: 1200,
-                easing: 'bounceOut'
-                }
-            });
-
-            chart.render();
-        }
-    }
-  };
-  </script>
-  
-  <style lang="scss">
-  .yukang {
-    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
-      Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui",
-      "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
-    color: #2c3e50;
-    font-weight: 400;
-    .title{
-        width: 100%;
-        padding: 10px 16px;
-        box-sizing: border-box;
-        overflow: hidden;
-        color: #323233;
-        font-size: 14px;
-        line-height: 24px;
-        background-color: #fff;
-    }
-    .userType {
-      position: relative;
-      .textGroup {
-        z-index: 1;
-        position: absolute;
-        overflow: hidden;
-        top: 15px;
-        right: 10px;
-        font-size: 0;
-        color: #1989fa;
-        &::after {
-          border-radius: 3px;
-          border-color: #1989fa;
-        }
-        .text {
-          padding: 0 3px;
-          display: inline-block;
-          text-align: center;
-          cursor: pointer;
-          font-size: 14px;
-        }
-        .act {
-          background-color: #1989fa;
-          color: #fff;
-        }
-      }
-    }
-  }
-  </style>
-  

+ 0 - 335
src/view/liveKuaishou/index.vue

@@ -1,335 +0,0 @@
-<template>
-  <div class="yukang">
-    <van-cell-group>
-      <van-cell :title="'直播时间:' + base.live_time" />
-    </van-cell-group>
-    <div class="mainBody" style="padding-bottom: 50px">
-      <div>
-        <van-row>
-          <van-col span="12" class="van-hairline--right">
-            <div class="title">
-              性别
-            </div>
-            <canvas
-              ref="chart"
-              :width="canvasRegion.width / 2"
-              :height="canvasRegion.height"
-            ></canvas>
-          </van-col>
-          <van-col span="12">
-            <div class="title">
-              年龄
-            </div>
-            <canvas
-              ref="chartage"
-              :width="canvasRegion.width / 2"
-              :height="canvasRegion.height"
-            ></canvas>
-          </van-col>
-        </van-row>
-        <b-canvas
-          keyName="value"
-          :transposed="true"
-          :height="300"
-          :legend="true"
-          :list="platformSort"
-        ></b-canvas>
-      </div>
-      <!-- 实时走势 -->
-      <c-canvas
-        v-if="BulletChat.peopleList.length"
-        :showListBtn="true"
-        :list="BulletChat.peopleList"
-      ></c-canvas>
-      <c-canvas
-        v-if="ScreenMan.peopleList.length"
-        :list="ScreenMan.peopleList"
-        :showListBtn="true"
-      ></c-canvas>
-      <c-canvas
-        v-if="flow.peopleList.length"
-        :showListBtn="true"
-        :list="flow.peopleList"
-      ></c-canvas>
-    </div>
-  </div>
-</template>
-
-<script>
-import cCanvas from "@/components/chart";
-import bCanvas from "@/components/bChart";
-import { getlive } from "@/api/getList.js";
-import {  Col as vanCol, Row as vanRow, Cell as vanCell, CellGroup  as vanCellGroup } from "vant";
-import "vant/lib/cell/style";
-import "vant/lib/cell-group/style";
-import "vant/lib/col/style";
-import "vant/lib/row/style";
-import F2 from "@antv/f2";
-
-export default {
-  name: "App",
-  components: {
-    vanCellGroup,
-    vanCell,
-    cCanvas,
-    bCanvas,
-    vanCol,
-    vanRow,
-  },
-  data() {
-    return {
-      canvasRegion: {
-        width: 0,
-        height: 0,
-      },
-      base: {},
-      platformSort: [],
-      BulletChat: { peopleList: [] },
-      flow: { peopleList: [] },
-      ScreenMan: { peopleList: [] },
-    };
-  },
-  mounted() {
-    let w = document.body.clientWidth || 0;
-    let h = document.body.clientHeight / 3;
-    this.canvasRegion = {
-      width: w > 1200 ? 1200 : w,
-      height: h,
-    };
-  },
-  created() {
-    let q = this.$route.query;
-    getlive({
-      topic: q.title,
-      platform: q.platform,
-    }).then(res => {
-      let oriData = res || {};
-      let trend = oriData.trend || {};
-      this.base = {
-        live_time: oriData.detail ? oriData.detail.time || "" : ""
-      };
-      let gender = [];
-      let oriGender = oriData.fans.gender || [];
-      for (let i = 0; i < oriGender.length; i++) {
-        const v = oriGender[i];
-        gender.push({
-          name: v.gender,
-          percent: v.rate.replace("%", "") * 1,
-          a: "1",
-        });
-      }
-      let age = [];
-      let oriAge = oriData.fans.age || [];
-      for (let i = 0; i < oriAge.length; i++) {
-        const v = oriAge[i];
-        age.push({
-          name: v.item,
-          percent: v.percent * 100,
-          a: "1",
-        });
-      }
-      this.pie(gender, "chart");
-      this.pie(age, "chartage");
-      let cityList = [];
-      let oriCity = oriData.fans.area["全部"] || [];
-      oriCity.map(v => {
-        cityList.push({
-          nickname: v.Name.replace("市", ""),
-          value: v.Ratio.toFixed(2) - 0,
-        });
-      });
-      this.platformSort = cityList;
-
-      let flow = {
-        title: "实时流量",
-        subTitle: "",
-        id: "id" + 10,
-        canvasId: "canvasId" + 10,
-        type: "line",
-        yType: "value",
-        xType: "time",
-        peopleList: [],
-      };
-      let BulletChat = {
-        title: "累计粉丝量",
-        subTitle: "",
-        id: "id" + 12,
-        canvasId: "canvasId" + 12,
-        type: "line",
-        yType: "value",
-        xType: "time",
-        peopleList: [],
-      };
-      let ScreenMan = {
-        title: "点赞走势",
-        subTitle: "",
-        id: "id" + 13,
-        canvasId: "canvasId" + 13,
-        type: "line",
-        yType: "value",
-        xType: "time",
-        peopleList: [],
-      };
-      // 实时流量
-      flow.subTitle =
-        "在线人数峰值:" +
-        ((trend.user || {}).user_count || 0) +
-        "  出现时间:" +
-        ((trend.user || {}).crawl_date || "") +
-        " 平均人数:" +
-        ((trend.user || {}).avg_user_count || 0);
-      // 累计粉丝量
-      BulletChat.subTitle =
-        "粉丝峰值:" +
-        ((trend.fans || {}).club_info_total_fans_count || 0) +
-        " 出现在:" +
-        ((trend.fans || {}).crawl_date || "");
-      // 点赞走势
-      ScreenMan.subTitle =
-        "点赞峰值:" +
-        ((trend.like || {}).add_like_count || 0) +
-        " 出现在:" +
-        ((trend.like || {}).crawl_date || "");
-      // 趋势图数据
-      for (let i = 0; i < (oriData.detail.watch || []).length; i++) {
-        const v = (oriData.detail.watch || [])[i];
-        let time = this.formatTime(v.x);
-        flow.peopleList.push({
-          value: v.watch || 0,
-          type: "实时流量",
-          date: time,
-        });
-        BulletChat.peopleList.push({
-          value: v.bsc || 0,
-          type: "弹幕数",
-          date: time,
-        });
-        ScreenMan.peopleList.push({
-          value: v.bsuc || 0,
-          type: "弹幕人数",
-          date: time,
-        });
-      }
-
-      this.BulletChat = BulletChat;
-      this.flow = flow;
-      this.ScreenMan = ScreenMan;
-    });
-  },
-  computed: {},
-  methods: {
-    pie(gender, ele) {
-      const chart = new F2.Chart({
-        el: this.$refs[ele],
-        pixelRatio: window.devicePixelRatio,
-      });
-      chart.source(gender, {
-        percent: {
-          formatter: function formatter(val) {
-            return val * 100 + "%";
-          },
-        },
-      });
-      chart.legend({
-        position: "right",
-        itemFormatter: function itemFormatter(val) {
-          return val;
-        },
-      });
-      chart.tooltip(false);
-      chart.coord("polar", {
-        transposed: true,
-        radius: 0.85,
-      });
-      chart.axis(false);
-      chart
-        .interval()
-        .position("a*percent")
-        .color("name", [
-          "#1890FF",
-          "#13C2C2",
-          "#2FC25B",
-          "#FACC14",
-          "#F04864",
-          "#8543E0",
-        ])
-        .adjust("stack")
-        .style({
-          lineWidth: 1,
-          stroke: "#fff",
-          lineJoin: "round",
-          lineCap: "round",
-        })
-        .animate({
-          appear: {
-            duration: 1200,
-            easing: "bounceOut",
-          },
-        });
-
-      chart.render();
-    },
-    formatTime(time) {
-      let t = new Date(time);
-      let hour = t.getHours();
-      let min = t.getMinutes();
-      let sec = t.getSeconds();
-      hour = hour > 9 ? hour : '0' + hour;
-      min = min > 9 ? min : '0' + min;
-      sec = sec > 9 ? sec : '0' + sec;
-      return hour + ":" + min + ":" + sec;
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.yukang {
-  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
-    Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui",
-    "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
-  color: #2c3e50;
-  font-weight: 400;
-  .title {
-    width: 100%;
-    padding: 10px 16px;
-    box-sizing: border-box;
-    overflow: hidden;
-    color: #323233;
-    font-size: 14px;
-    line-height: 24px;
-    background-color: #fff;
-  }
-  .userType {
-    position: relative;
-    .textGroup {
-      z-index: 1;
-      position: absolute;
-      overflow: hidden;
-      top: 15px;
-      right: 10px;
-      font-size: 0;
-      color: #1989fa;
-      &::after {
-        border-radius: 3px;
-        border-color: #1989fa;
-      }
-      .text {
-        padding: 0 3px;
-        display: inline-block;
-        text-align: center;
-        cursor: pointer;
-        font-size: 14px;
-      }
-      .act {
-        background-color: #1989fa;
-        color: #fff;
-      }
-    }
-  }
-  .title{
-    color: #323233;
-    font-size: 14px;
-  }
-}
-</style>

+ 1 - 7
src/view/secondTopic/index.vue

@@ -4,7 +4,6 @@
       <div class="title" v-text="$route.query.title"></div>
     </van-sticky>
     <Tabs
-      :key="upKey"
       v-if="topicOfConversation.length"
       :topicOfConversation="topicOfConversation"
       @toRouter="toRouter"
@@ -159,7 +158,6 @@ export default {
         name: "点赞",
         type: "digg_count",
       },
-      upKey: 1,
       listOri: [],
       allList: {},
       douAllList: [],
@@ -182,7 +180,6 @@ export default {
     this.topicOfConversation = this.$route.query.sonlist
       ? JSON.parse(decodeURIComponent(this.$route.query.sonlist))
       : [];
-    console.log(this.topicOfConversation)
     let sName =
       this.$route.params.select >= 0 ? this.$route.params.select : undefined;
 
@@ -191,12 +188,11 @@ export default {
       else return i === 0
     });
     this.pageDate = {
-      alias_name: item.alias_name || this.$route.query.title,
+      topic_name: item.alias_name || this.$route.query.title,
     };
     this.readType = "30d";
     this.meType = "30d";
     this.oriType = "30d";
-    this.upKey++;
     this.select();
   },
   computed: {},
@@ -205,7 +201,6 @@ export default {
     this.meType = "30d";
     this.oriType = "30d";
     this.select();
-    this.upKey++;
     next()
   },
   beforeRouteLeave (to, from, next) {
@@ -213,7 +208,6 @@ export default {
     this.meType = "30d";
     this.oriType = "30d";
     this.select();
-    this.upKey++;
     next();
   },
   methods: {

+ 1 - 1
src/view/yukang/index.vue

@@ -40,7 +40,7 @@
           v-if="listOri.length"
           :list="listOri"
         ></work-cloud> -->
-        <h4 v-if="could">词云</h4>
+        <div v-if="could" style="padding-left:16px">词云</div>
         <img :src="could" v-if="could" style="width: 100%" />
       </div>
       <!-- 抖音 -->