Sfoglia il codice sorgente

Merge branch 'test'

yumeng 5 anni fa
parent
commit
7307675d0e

+ 1 - 0
package.json

@@ -40,6 +40,7 @@
     "vue": "^2.6.10",
     "vue-apexcharts": "^1.3.2",
     "vue-class-component": "^6.0.0",
+    "vue-count-to": "^1.0.13",
     "vue-cropper": "^0.4.8",
     "vue-i18n": "^8.7.0",
     "vue-layer": "^1.0.2",

+ 131 - 119
src/api/video.js

@@ -1,120 +1,132 @@
-
-import {axios} from '@/utils/request'
-
-
-//获取登陆账户已经绑定过的快手账户列表
-export function getUserList() {
-    return axios({
-      url: "/ks/web/user/list",
-      method: 'post',
-      //   params: parameter
-    })
-}
-
-// 获取登陆二维码
-export function getLoginQr() {
-    return axios({
-      url: "/ks/web/login/qr",
-      method: 'post',
-      //   params: parameter
-    })
-}
-
-// 获取登陆状态
-// /ks/web/login/status
-// 参数 String requestId
-export function getLoginStatus(parameter) {
-    return axios({
-      url: "/ks/web/login/status",
-      method: 'post',
-      params: parameter
-    })
-}
-
-// 获取视频列表
-// /ks/web/video/list
-// 参数 String ksid,String pcursor
-export function getVideoList(parameter) {
-    return axios({
-      url: "/ks/web/video/list",
-      method: 'post',
-      params: parameter
-    })
-}
-
-// 获取评论列表
-// /ks/web/comment/list
-// 参数 String ksid,String photoId,String pcursor
-export function getCommentList(parameter) {
-    return axios({
-      url: "/ks/web/comment/list",
-      method: 'post',
-      params: parameter
-    })
-}
-
-// 删除单条评论
-// /ks/web/comment/delete
-// 参数 String ksid,String photoId,Long commentId
-export function commentDelete(parameter) {
-    return axios({
-      url: "/ks/web/comment/delete",
-      method: 'post',
-      params: parameter
-    })
-}
-
-// 获取子评论列表
-// /ks/web/subcomment/list
-// 参数 String ksid,String photoId,Long rootCommentId,String pcursor
-export function getSubcommentList(parameter) {
-    return axios({
-      url: "/ks/web/subcomment/list",
-      method: 'post',
-      params: parameter
-    })
-}
-
-//评论添加接口
-///ks/web/comment/add
-// String ksid, String photoId,String principalId,String content, Long replyToCommentId,Long repltTo
-export function commentAdd(parameter) {
-    return axios({
-      url: "/ks/web/comment/add",
-      method: 'post',
-      params: parameter
-    })
-}
-
-
-
-//头条当前账号下的数据集合
-// /ctop/report/accountReport
-export function getAccountReport() {
-    return axios({
-      url: "/ctop/report/accountReport",
-      method: 'get',
-    //   params: parameter
-    })
-}
-
-
-//快手当前账号下的数据集合
-export function getKsAccountReport(parameter) {
-    return axios({
-      url: "/ctop/report/kuaiShou/accountReport",
-      method: 'post',
-      data: parameter
-    })
-}
-
-// 当日明细
-// /accountReport/kuaiShou/accountDetailReport
-//快手当前账号下的数据集合
-export function getKsDetail(parameter) {
-    return axios({
-      url: "/ctop/report/kuaiShou/accountDetailReport",
-      method: 'post',
-      data: parameter
-    })
+
+import {axios} from '@/utils/request'
+
+
+//获取登陆账户已经绑定过的快手账户列表
+export function getUserList() {
+    return axios({
+      url: "/ks/web/user/list",
+      method: 'post',
+      //   params: parameter
+    })
+}
+
+// 获取登陆二维码
+export function getLoginQr() {
+    return axios({
+      url: "/ks/web/login/qr",
+      method: 'post',
+      //   params: parameter
+    })
+}
+
+// 获取登陆状态
+// /ks/web/login/status
+// 参数 String requestId
+export function getLoginStatus(parameter) {
+    return axios({
+      url: "/ks/web/login/status",
+      method: 'post',
+      params: parameter
+    })
+}
+
+// 获取视频列表
+// /ks/web/video/list
+// 参数 String ksid,String pcursor
+export function getVideoList(parameter) {
+    return axios({
+      url: "/ks/web/video/list",
+      method: 'post',
+      params: parameter
+    })
+}
+
+// 获取评论列表
+// /ks/web/comment/list
+// 参数 String ksid,String photoId,String pcursor
+export function getCommentList(parameter) {
+    return axios({
+      url: "/ks/web/comment/list",
+      method: 'post',
+      params: parameter
+    })
+}
+
+// 删除单条评论
+// /ks/web/comment/delete
+// 参数 String ksid,String photoId,Long commentId
+export function commentDelete(parameter) {
+    return axios({
+      url: "/ks/web/comment/delete",
+      method: 'post',
+      params: parameter
+    })
+}
+
+// 获取子评论列表
+// /ks/web/subcomment/list
+// 参数 String ksid,String photoId,Long rootCommentId,String pcursor
+export function getSubcommentList(parameter) {
+    return axios({
+      url: "/ks/web/subcomment/list",
+      method: 'post',
+      params: parameter
+    })
+}
+
+//评论添加接口
+///ks/web/comment/add
+// String ksid, String photoId,String content, Long replyToCommentId,Long repltTo
+export function commentAdd(parameter) {
+    return axios({
+      url: "/ks/web/comment/add",
+      method: 'post',
+      params: parameter
+    })
+}
+
+
+
+//头条当前账号下的数据集合
+// /ctop/report/accountReport
+export function getAccountReport() {
+    return axios({
+      url: "/ctop/report/accountReport",
+      method: 'get',
+    //   params: parameter
+    })
+}
+
+
+//快手当前账号下的数据集合
+export function getKsAccountReport(parameter) {
+    return axios({
+      url: "/ctop/report/kuaiShou/accountReport",
+      method: 'post',
+      data: parameter
+    })
+}
+
+// 当日明细
+// /accountReport/kuaiShou/accountDetailReport
+//快手当前账号下的数据集合
+export function getKsDetail(parameter) {
+    return axios({
+      url: "/ctop/report/kuaiShou/accountDetailReport",
+      method: 'post',
+      data: parameter
+    })
+}
+
+
+// 当日明细
+// /accountReport/kuaiShou/accountDetailReport
+//快手当前账号下的数据集合
+export function getReportList(parameter) {
+    return axios({
+      url: "/ctop/report/kuaiShou/getReportList",
+      method: 'post',
+      data: parameter
+    })
 }

+ 17 - 16
src/router/index.js

@@ -1,17 +1,18 @@
-import Vue from 'vue'
-import Router from 'vue-router'
-import {constantRouterMap} from '@/config/router.config'
-
-Vue.use(Router)
-
-const originalPush = Router.prototype.push;
-Router.prototype.push = function push(location) {
-  return originalPush.call(this, location).catch(err => err)
-}
-
-export default new Router({
-  mode: 'history',
-  base: process.env.BASE_URL,
-  scrollBehavior: () => ({y: 0}),
-  routes: constantRouterMap
+import Vue from 'vue'
+import Router from 'vue-router'
+import {constantRouterMap} from '@/config/router.config'
+
+Vue.use(Router)
+
+const originalPush = Router.prototype.push;
+Router.prototype.push = function push(location) {
+  console.log(location,10001000)
+  return originalPush.call(this, location).catch(err => err)
+}
+
+export default new Router({
+  mode: 'history',
+  base: process.env.BASE_URL,
+  scrollBehavior: () => ({y: 0}),
+  routes: constantRouterMap
 })

+ 274 - 271
src/views/dashboard/Analysis.vue

@@ -1,272 +1,275 @@
-<template>
-  <div class="page-header-index-wide">
-    <a-row :gutter="24">
-      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
-        <chart-card :loading="loading" title="总销售额" total="¥126,560">
-          <a-tooltip title="指标说明" slot="action">
-            <a-icon type="info-circle-o"/>
-          </a-tooltip>
-          <div>
-            <trend flag="up" style="margin-right: 16px;">
-              <span slot="term">周同比</span>
-              12%
-            </trend>
-            <trend flag="down">
-              <span slot="term">日同比</span>
-              11%
-            </trend>
-          </div>
-          <template slot="footer">日均销售额<span>¥ 234.56</span></template>
-        </chart-card>
-      </a-col>
-      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
-        <chart-card :loading="loading" title="访问量" :total="8846 | NumberFormat">
-          <a-tooltip title="指标说明" slot="action">
-            <a-icon type="info-circle-o"/>
-          </a-tooltip>
-          <div>
-            <mini-area/>
-          </div>
-          <template slot="footer">日访问量<span> {{ '1234' | NumberFormat }}</span></template>
-        </chart-card>
-      </a-col>
-      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
-        <chart-card :loading="loading" title="支付笔数" :total="6560 | NumberFormat">
-          <a-tooltip title="指标说明" slot="action">
-            <a-icon type="info-circle-o"/>
-          </a-tooltip>
-          <div>
-            <mini-bar :height="40"/>
-          </div>
-          <template slot="footer">转化率 <span>60%</span></template>
-        </chart-card>
-      </a-col>
-      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
-        <chart-card :loading="loading" title="运营活动效果" total="78%">
-          <a-tooltip title="指标说明" slot="action">
-            <a-icon type="info-circle-o"/>
-          </a-tooltip>
-          <div>
-            <mini-progress color="rgb(19, 194, 194)" :target="80" :percentage="78" :height="8"/>
-          </div>
-          <template slot="footer">
-            <trend flag="down" style="margin-right: 16px;">
-              <span slot="term">同周比</span>
-              12%
-            </trend>
-            <trend flag="up">
-              <span slot="term">日环比</span>
-              80%
-            </trend>
-          </template>
-        </chart-card>
-      </a-col>
-    </a-row>
-
-    <a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}">
-      <div class="salesCard">
-        <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
-          <div class="extra-wrapper" slot="tabBarExtraContent">
-            <div class="extra-item">
-              <a>今日</a>
-              <a>本周</a>
-              <a>本月</a>
-              <a>本年</a>
-            </div>
-            <a-range-picker :style="{width: '256px'}"/>
-          </div>
-          <a-tab-pane loading="true" tab="销售额" key="1">
-            <a-row>
-              <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
-                <bar title="销售额排行" :dataSource="barData"/>
-              </a-col>
-              <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
-                <rank-list title="门店销售排行榜" :list="rankList"/>
-              </a-col>
-            </a-row>
-          </a-tab-pane>
-          <a-tab-pane tab="访问量" key="2">
-            <a-row>
-              <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
-                <bar title="销售额趋势" :dataSource="barData"/>
-              </a-col>
-              <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
-                <rank-list title="门店销售排行榜" :list="rankList"/>
-              </a-col>
-            </a-row>
-          </a-tab-pane>
-        </a-tabs>
-      </div>
-    </a-card>
-
-    <a-row>
-      <a-col :span="24">
-        <a-card :loading="loading" :bordered="false" title="最近一周访问次数统计" :style="{ marginTop: '24px' }">
-          <a-row>
-            <a-col :span="6">
-              <head-info title="今日访问IP数" :content="loginfo.todayIp"></head-info>
-            </a-col>
-            <a-col :span="2">
-              <a-spin class='circle-cust'>
-                <a-icon slot="indicator" type="environment" style="font-size: 24px"/>
-              </a-spin>
-            </a-col>
-            <a-col :span="6">
-              <head-info title="今日访问次数" :content="loginfo.todayVisitCount"></head-info>
-            </a-col>
-            <a-col :span="2">
-              <a-spin class='circle-cust'>
-                <a-icon slot="indicator" type="team" style="font-size: 24px"/>
-              </a-spin>
-            </a-col>
-            <a-col :span="6">
-              <head-info title="访问总次数" :content="loginfo.totalVisitCount"></head-info>
-            </a-col>
-            <a-col :span="2">
-              <a-spin class='circle-cust'>
-                <a-icon slot="indicator" type="rise" style="font-size: 24px"/>
-              </a-spin>
-            </a-col>
-          </a-row>
-          <line-chart-multid :fields="visitFields" :dataSource="visitInfo"></line-chart-multid>
-        </a-card>
-      </a-col>
-    </a-row>
-  </div>
-</template>
-
-<script>
-  import ChartCard from '@/components/ChartCard'
-  import ACol from "ant-design-vue/es/grid/Col"
-  import ATooltip from "ant-design-vue/es/tooltip/Tooltip"
-  import MiniArea from '@/components/chart/MiniArea'
-  import MiniBar from '@/components/chart/MiniBar'
-  import MiniProgress from '@/components/chart/MiniProgress'
-  import RankList from '@/components/chart/RankList'
-  import Bar from '@/components/chart/Bar'
-  import LineChartMultid from '@/components/chart/LineChartMultid'
-  import HeadInfo from '@/components/tools/HeadInfo.vue'
-
-  import Trend from '@/components/Trend'
-  import {getLoginfo, getVisitInfo} from '@/api/api'
-
-  const rankList = []
-  for (let i = 0; i < 7; i++) {
-    rankList.push({
-      name: '白鹭岛 ' + (i + 1) + ' 号店',
-      total: 1234.56 - i * 100
-    })
-  }
-  const barData = []
-  for (let i = 0; i < 12; i += 1) {
-    barData.push({
-      x: `${i + 1}月`,
-      y: Math.floor(Math.random() * 1000) + 200
-    })
-  }
-  export default {
-    name: "Analysis",
-    components: {
-      ATooltip,
-      ACol,
-      ChartCard,
-      MiniArea,
-      MiniBar,
-      MiniProgress,
-      RankList,
-      Bar,
-      Trend,
-      LineChartMultid,
-      HeadInfo
-    },
-    data() {
-      return {
-        loading: true,
-        center: null,
-        rankList,
-        barData,
-        loginfo: {},
-        visitFields: ['ip', 'visit'],
-        visitInfo: [],
-        indicator: <a-icon type="loading" style = "font-size: 24px" spin />
-    }
-    },
-    created() {
-      setTimeout(() => {
-        this.loading = !this.loading
-      }, 1000)
-      this.initLogInfo();
-    },
-    methods: {
-      initLogInfo() {
-        getLoginfo(null).then((res) => {
-          if (res.success) {
-            Object.keys(res.result).forEach(key => {
-              res.result[key] = res.result[key] + ""
-            })
-            this.loginfo = res.result;
-          }
-        })
-        getVisitInfo().then(res => {
-          if (res.success) {
-            console.log("aaaaaa", res.result)
-            this.visitInfo = res.result;
-          }
-        })
-      },
-    }
-  }
-</script>
-
-<style lang="scss" scoped>
-  .circle-cust {
-    position: relative;
-    top: 28px;
-    left: -100%;
-  }
-
-  .extra-wrapper {
-    line-height: 55px;
-    padding-right: 24px;
-
-    .extra-item {
-      display: inline-block;
-      margin-right: 24px;
-
-      a {
-        margin-left: 24px;
-      }
-    }
-  }
-
-  /* 首页访问量统计 */
-  .head-info {
-    position: relative;
-    text-align: left;
-    padding: 0 32px 0 0;
-    min-width: 125px;
-
-    &.center {
-      text-align: center;
-      padding: 0 32px;
-    }
-
-    span {
-      color: rgba(0, 0, 0, .45);
-      display: inline-block;
-      font-size: .95rem;
-      line-height: 42px;
-      margin-bottom: 4px;
-    }
-
-    p {
-      line-height: 42px;
-      margin: 0;
-
-      a {
-        font-weight: 600;
-        font-size: 1rem;
-      }
-    }
-  }
+<template>
+  <div class="page-header-index-wide">
+    <!-- <a-row :gutter="24">
+      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
+        <chart-card :loading="loading" title="总销售额" total="¥126,560">
+          <a-tooltip title="指标说明" slot="action">
+            <a-icon type="info-circle-o"/>
+          </a-tooltip>
+          <div>
+            <trend flag="up" style="margin-right: 16px;">
+              <span slot="term">周同比</span>
+              12%
+            </trend>
+            <trend flag="down">
+              <span slot="term">日同比</span>
+              11%
+            </trend>
+          </div>
+          <template slot="footer">日均销售额<span>¥ 234.56</span></template>
+        </chart-card>
+      </a-col>
+      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
+        <chart-card :loading="loading" title="访问量" :total="8846 | NumberFormat">
+          <a-tooltip title="指标说明" slot="action">
+            <a-icon type="info-circle-o"/>
+          </a-tooltip>
+          <div>
+            <mini-area/>
+          </div>
+          <template slot="footer">日访问量<span> {{ '1234' | NumberFormat }}</span></template>
+        </chart-card>
+      </a-col>
+      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
+        <chart-card :loading="loading" title="支付笔数" :total="6560 | NumberFormat">
+          <a-tooltip title="指标说明" slot="action">
+            <a-icon type="info-circle-o"/>
+          </a-tooltip>
+          <div>
+            <mini-bar :height="40"/>
+          </div>
+          <template slot="footer">转化率 <span>60%</span></template>
+        </chart-card>
+      </a-col>
+      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
+        <chart-card :loading="loading" title="运营活动效果" total="78%">
+          <a-tooltip title="指标说明" slot="action">
+            <a-icon type="info-circle-o"/>
+          </a-tooltip>
+          <div>
+            <mini-progress color="rgb(19, 194, 194)" :target="80" :percentage="78" :height="8"/>
+          </div>
+          <template slot="footer">
+            <trend flag="down" style="margin-right: 16px;">
+              <span slot="term">同周比</span>
+              12%
+            </trend>
+            <trend flag="up">
+              <span slot="term">日环比</span>
+              80%
+            </trend>
+          </template>
+        </chart-card>
+      </a-col>
+    </a-row>
+
+    <a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}">
+      <div class="salesCard">
+        <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
+          <div class="extra-wrapper" slot="tabBarExtraContent">
+            <div class="extra-item">
+              <a>今日</a>
+              <a>本周</a>
+              <a>本月</a>
+              <a>本年</a>
+            </div>
+            <a-range-picker :style="{width: '256px'}"/>
+          </div>
+          <a-tab-pane loading="true" tab="销售额" key="1">
+            <a-row>
+              <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
+                <bar title="销售额排行" :dataSource="barData"/>
+              </a-col>
+              <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
+                <rank-list title="门店销售排行榜" :list="rankList"/>
+              </a-col>
+            </a-row>
+          </a-tab-pane>
+          <a-tab-pane tab="访问量" key="2">
+            <a-row>
+              <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
+                <bar title="销售额趋势" :dataSource="barData"/>
+              </a-col>
+              <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
+                <rank-list title="门店销售排行榜" :list="rankList"/>
+              </a-col>
+            </a-row>
+          </a-tab-pane>
+        </a-tabs>
+      </div>
+    </a-card>
+
+    <a-row>
+      <a-col :span="24">
+        <a-card :loading="loading" :bordered="false" title="最近一周访问次数统计" :style="{ marginTop: '24px' }">
+          <a-row>
+            <a-col :span="6">
+              <head-info title="今日访问IP数" :content="loginfo.todayIp"></head-info>
+            </a-col>
+            <a-col :span="2">
+              <a-spin class='circle-cust'>
+                <a-icon slot="indicator" type="environment" style="font-size: 24px"/>
+              </a-spin>
+            </a-col>
+            <a-col :span="6">
+              <head-info title="今日访问次数" :content="loginfo.todayVisitCount"></head-info>
+            </a-col>
+            <a-col :span="2">
+              <a-spin class='circle-cust'>
+                <a-icon slot="indicator" type="team" style="font-size: 24px"/>
+              </a-spin>
+            </a-col>
+            <a-col :span="6">
+              <head-info title="访问总次数" :content="loginfo.totalVisitCount"></head-info>
+            </a-col>
+            <a-col :span="2">
+              <a-spin class='circle-cust'>
+                <a-icon slot="indicator" type="rise" style="font-size: 24px"/>
+              </a-spin>
+            </a-col>
+          </a-row>
+          <line-chart-multid :fields="visitFields" :dataSource="visitInfo"></line-chart-multid>
+        </a-card>
+      </a-col>
+    </a-row>-->
+    <statistics />
+  </div>
+</template>
+
+<script>
+import ChartCard from '@/components/ChartCard'
+import ACol from 'ant-design-vue/es/grid/Col'
+import ATooltip from 'ant-design-vue/es/tooltip/Tooltip'
+import MiniArea from '@/components/chart/MiniArea'
+import MiniBar from '@/components/chart/MiniBar'
+import MiniProgress from '@/components/chart/MiniProgress'
+import RankList from '@/components/chart/RankList'
+import Bar from '@/components/chart/Bar'
+import LineChartMultid from '@/components/chart/LineChartMultid'
+import HeadInfo from '@/components/tools/HeadInfo.vue'
+
+import Trend from '@/components/Trend'
+import { getLoginfo, getVisitInfo } from '@/api/api'
+import statistics from '@/views/modules/Statistics/Statistics.vue'
+
+const rankList = []
+for (let i = 0; i < 7; i++) {
+  rankList.push({
+    name: '白鹭岛 ' + (i + 1) + ' 号店',
+    total: 1234.56 - i * 100
+  })
+}
+const barData = []
+for (let i = 0; i < 12; i += 1) {
+  barData.push({
+    x: `${i + 1}月`,
+    y: Math.floor(Math.random() * 1000) + 200
+  })
+}
+export default {
+  name: 'Analysis',
+  components: {
+    ATooltip,
+    ACol,
+    ChartCard,
+    MiniArea,
+    MiniBar,
+    MiniProgress,
+    RankList,
+    Bar,
+    Trend,
+    LineChartMultid,
+    HeadInfo,
+    statistics
+  },
+  data() {
+    return {
+      loading: true,
+      center: null,
+      rankList,
+      barData,
+      loginfo: {},
+      visitFields: ['ip', 'visit'],
+      visitInfo: [],
+      indicator: <a-icon type="loading" style="font-size: 24px" spin />
+    }
+  },
+  created() {
+    setTimeout(() => {
+      this.loading = !this.loading
+    }, 1000)
+    this.initLogInfo()
+  },
+  methods: {
+    initLogInfo() {
+      getLoginfo(null).then(res => {
+        if (res.success) {
+          Object.keys(res.result).forEach(key => {
+            res.result[key] = res.result[key] + ''
+          })
+          this.loginfo = res.result
+        }
+      })
+      getVisitInfo().then(res => {
+        if (res.success) {
+          console.log('aaaaaa', res.result)
+          this.visitInfo = res.result
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.circle-cust {
+  position: relative;
+  top: 28px;
+  left: -100%;
+}
+
+.extra-wrapper {
+  line-height: 55px;
+  padding-right: 24px;
+
+  .extra-item {
+    display: inline-block;
+    margin-right: 24px;
+
+    a {
+      margin-left: 24px;
+    }
+  }
+}
+
+/* 首页访问量统计 */
+.head-info {
+  position: relative;
+  text-align: left;
+  padding: 0 32px 0 0;
+  min-width: 125px;
+
+  &.center {
+    text-align: center;
+    padding: 0 32px;
+  }
+
+  span {
+    color: rgba(0, 0, 0, 0.45);
+    display: inline-block;
+    font-size: 0.95rem;
+    line-height: 42px;
+    margin-bottom: 4px;
+  }
+
+  p {
+    line-height: 42px;
+    margin: 0;
+
+    a {
+      font-weight: 600;
+      font-size: 1rem;
+    }
+  }
+}
 </style>

File diff suppressed because it is too large
+ 1284 - 392
src/views/modules/Statistics/Statistics.vue


+ 70 - 3
src/views/modules/bytedance/model/InternalModel.vue

@@ -18,10 +18,25 @@
       </a-form-item>
 
       <a-form-item
-        label="模板名称"
+        label="选择已有广告组"
         :labelCol="labelCol"
         :wrapperCol="wrapperCol">
-        <a-input v-model="templateName" placeholder="请输入模板名称">
+        <a-select
+          v-model="campaignId"
+          showSearch
+          placeholder="选择已有广告组"
+          optionFilterProp="children"
+          style="width: 400px"
+        >
+          <a-select-option v-for="campaign in existCampaignList" :key="campaign.campaign_id" :value="campaign.campaign_id">{{campaign.name}}</a-select-option>
+        </a-select>
+      </a-form-item>
+
+      <a-form-item
+        label="创意名称"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol">
+        <a-input v-model="templateName" placeholder="请输入创意名称">
         </a-input>
       </a-form-item>
       <a-form-item
@@ -84,6 +99,36 @@
         </a-select>
       </a-form-item>
 
+      <a-form-item
+        v-if="deliveryRange=='2'"
+        label="定向流量包"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol">
+        <a-select
+          mode="tags"
+          placeholder="选择需要定向的流量包"
+          style="width: 600px"
+          v-model="flowPackage"
+        >
+          <a-select-option v-for="getPackage in flowPackageList" :key="getPackage.flow_package_id.toString()" :value="getPackage.flow_package_id.toString()">{{getPackage.name}}</a-select-option>
+        </a-select>
+      </a-form-item>
+
+      <a-form-item
+        v-if="deliveryRange=='2'"
+        label="排除流量包"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol">
+        <a-select
+          mode="tags"
+          placeholder="选择需要排除的流量包"
+          style="width: 600px"
+          v-model="excludeFlowPackage"
+        >
+          <a-select-option v-for="getPackage in flowPackageList" :key="getPackage.flow_package_id.toString()" :value="getPackage.flow_package_id.toString()">{{getPackage.name}}</a-select-option>
+        </a-select>
+      </a-form-item>
+
 
       <a-form-item
         label="投放目标"
@@ -343,6 +388,11 @@
     components: {AFormItem},
     data() {
       return {
+        existCampaignList:[],
+        flowPackageList:[],
+        excludeFlowPackage:[],
+        flowPackage:[],
+        campaignId:'',
         webUrl:'',
         retargetingTagsExclude:[],
         retargetingTagsInclude:[],
@@ -429,7 +479,9 @@
           convertList:'template/convert/list/url',
           userOrentationList:'ctop/byteDanceUserOrientationTemplate/list',
           creativeTemplateList:'/ctop/bytedanceCreativeLaunchTemplate/list',
-          userAudienceList:'toutiao/advertiser/custom/audience/select'
+          userAudienceList:'toutiao/advertiser/custom/audience/select',
+          getCampanginList:'toutiao/advertiser/campaign/list',
+          getFlowPackageList:'toutiao/advertiser/custom/package/get'
         }
       }
     },
@@ -563,6 +615,18 @@
             this.audienceList = res.data;
           }
         });
+        params = {};
+        getAction(this.url.getCampanginList+'?accountId='+this.accountId, params).then((res) => {
+          if (res.success) {
+            this.existCampaignList = res.data;
+          }
+        });
+        params = {};
+        getAction(this.url.getFlowPackageList+'?accountId='+this.accountId, params).then((res) => {
+          if (res.success) {
+            this.flowPackageList = res.data;
+          }
+        });
       },
       onChangeDeliveryTarget(value) {
         console.log(value);
@@ -612,6 +676,7 @@
         }
         console.log("付费方式:" + this.priceType);
         console.log("目标转化出价:" + this.convertPrice);
+        params.campaignId = this.campaignId;
         params.userOrientationId = this.userOrientationId;
         params.templateName = this.templateName;
         params.accountId = this.accountId;
@@ -639,6 +704,8 @@
         params.convertType = this.convertType;
         params.retargetingTagsExclude = this.retargetingTagsExclude;
         params.retargetingTagsInclude = this.retargetingTagsInclude;
+        params.flowPackage = this.flowPackage;
+        params.excludeFlowPackage = this.excludeFlowPackage;
         if (this.time != [] && this.time.length == 2) {
           params.startDate = moment(this.time[0]).format('YYYY-MM-DD HH:mm')
           params.endDate = moment(this.time[1]).format('YYYY-MM-DD HH:mm')

+ 586 - 399
src/views/modules/video/video.vue

@@ -1,399 +1,586 @@
-<style>
-@media (min-width: 1024px) {
-  .checkbox_item_container {
-    width: 70%;
-  }
-} /*>=1024的设备*/
-
-@media (min-width: 1100px) {
-  .checkbox_item_container {
-    width: 70%;
-  }
-} /*>=1100的设备*/
-@media (min-width: 1280px) {
-  .checkbox_item_container_size {
-    width: 70%;
-  }
-}
-
-/*>=1280的设备*/
-
-@media (min-width: 1366px) {
-}
-
-@media (min-width: 1440px) {
-}
-
-@media (min-width: 1680px) {
-}
-@media (min-width: 1920px) {
-  .checkbox_item_container_size {
-    width: 50%;
-  }
-}
-.vm-video-list .ant-comment-inner {
-  padding: 0;
-}
-.vm-video-list .bg:after {
-  content: '';
-  width: 110%;
-  height: 110%;
-  position: absolute;
-  left: -5%;
-  top: -5%;
-  background: inherit;
-  filter: blur(20px);
-  z-index: 2;
-}
-</style>
-<template>
-  <div class="vm-video-list">
-    <a-row class="image-list-heading vm-panel">
-      <div class="panel-heading">{{ title }}</div>
-      <a-row type="flex" align="middle" justify="space-between" class="panel-body">
-        <div class="search-bar">
-          <a-button type="primary" icon="plus" style="margin-right:10px" @click="addUser">新增账号</a-button>
-          <a-select
-            showSearch
-            placeholder="选择账号"
-            notFoundContent="暂无账号,赶紧去添加一个吧"
-            optionFilterProp="children"
-            style="width: 300px"
-            @focus="handleFocus"
-            @blur="handleBlur"
-            @change="handleChange"
-            :filterOption="filterOption"
-          >
-            <a-select-option
-              :value="item.ksid"
-              v-for="(item,index) of options"
-              :key="index"
-            >{{item.userName}}</a-select-option>
-          </a-select>
-        </div>
-      </a-row>
-    </a-row>
-    <a-row class="image-list" :gutter="16" style="padding:0 8px">
-      <a-col
-        :lg="6"
-        :sm="12"
-        class="vm-margin"
-        v-for="(item,index) of dataShow"
-        :key="index"
-        style="padding:0"
-      >
-        <a-card hoverable style="margin:0 15px">
-          <div
-            slot="cover"
-            style="display:flex;justify-content:center;position:relative;height:300px;"
-          >
-            <div
-              class="bg"
-              style="overflow:hidden;position:relative;width:100%;height:100%"
-              :style="{backgroundImage: 'url(' +item.thumbnailUrl+')', backgroundSize:'cover', backgroundRepeat: 'no-repeat',backgroundPosition:'center center'}"
-            ></div>
-            <img
-              :src="item.poster"
-              alt
-              style="height:300px;width:auto;position:absolute;z-index:10;top:0"
-            />
-          </div>
-          <template class="ant-card-actions" slot="actions">
-            <a-icon type="setting" />
-            <a-icon type="edit" />
-            <a-icon type="ellipsis" />
-          </template>
-          <div style="position:relative">
-            <div
-              style="width:100%;height:200px;position: absolute;z-index:3;background:white;display:flex;justify-content:center;align-items:center"
-              v-if="item.loading"
-            >
-              <img src="./images/loading.gif" alt />
-            </div>
-            <div style="height:200px;overflow:auto;" v-if="item.commentList.length>0">
-              <a-comment v-for="(items,idx) of item.commentList" :key="idx">
-                <a slot="author">
-                  <input type="checkbox" />
-                  {{items.authorName}}
-                </a>
-                <p
-                  slot="content"
-                  style="display: flex;justify-content: space-between;white-space: nowrap;"
-                >
-                  {{items.content}}
-                  <span @click="remove(item,items,idx)" style="margin-right:5px">删除</span>
-                </p>
-              </a-comment>
-            </div>
-            <div
-              v-else
-              style="height:200px;display:flex;justify-content:center;align-items:center"
-            >暂无评论</div>
-          </div>
-        </a-card>
-      </a-col>
-    </a-row>
-    <a-modal title="扫描二维码登录" v-model="showCode" :width="300" @cancel="showCode = false">
-      <div style="display: flex;justify-content: center;position:relative">
-        <img :src="qrcode" alt style="width:130px;height:130px;border:1px solid #f2f2f2" />
-        <div
-          style="width:130px;height:130px;position:absolute;background:rgba(255,255,255,.9);text-align:center;padding:30px 5px"
-          v-show="showShare"
-        >
-          <p>
-            {{showTitle}}
-            <span @click="addUser" style="color:red" v-show="showSpan">刷新</span>
-          </p>
-        </div>
-      </div>
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import ARow from 'ant-design-vue/es/grid/Row'
-import ACol from 'ant-design-vue/es/grid/Col'
-import axios from 'axios'
-var interval, objTimer
-import {
-  getLoginQr,
-  getUserList,
-  getLoginStatus,
-  getVideoList,
-  getCommentList,
-  commentDelete,
-  getAccountReport
-} from '@api/video.js'
-export default {
-  name: 'videoList',
-  components: {
-    ACol,
-    ARow
-  },
-
-  data: function() {
-    return {
-      title: '视频列表',
-      dataShow: [], // data for showing
-      data: [],
-      options: [],
-      showTwo: false,
-      showCode: false,
-      lastTime: null, //最后一次点击的时间
-      currentTime: null, //当前点击的时间
-      timeOut: 60 * 1000, //设置超时时间: 1分钟,
-      requestId: '',
-      qrcode: '',
-      showTitle: '',
-      showShare: false,
-      showSpan: false,
-      ksid: null,
-      pullRefreshss: true, // 代表可以进行下拉加载,false代表不能
-      scollY: null, // 离底部距离有多少
-      pcursor: null
-    }
-  },
-  methods: {
-    handleChange(value) {
-      this.ksid = value
-      this.dataShow = []
-      clearInterval(interval)
-      this.getVideoList(value, null)
-      //   this.getTest()
-    },
-    handleBlur() {
-      console.log('blur')
-    },
-    handleFocus() {
-      console.log('focus')
-    },
-    filterOption(input, option) {
-      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-    },
-    getUserList() {
-      getUserList().then(res => {
-        if (res.code == 0) {
-          this.options = res.result
-        } else {
-          this.options = []
-        }
-      })
-    },
-    addUser() {
-      this.showCode = true
-      getLoginQr().then(res => {
-        if (res.code == 0) {
-          this.qrcode = res.result.qrcode
-          this.requestId = res.result.requestId
-        }
-      })
-    },
-    getVideoList(ksid, pcursor) {
-      var that = this
-
-      getVideoList({ ksid: ksid, pcursor: pcursor }).then(res => {
-        if (res.code == 0) {
-          var data = res.result.data.publicFeeds.list.map(item => {
-            return {
-              ...item,
-              commentList: [],
-              loading: true
-            }
-          })
-          this.pcursor = res.result.data.publicFeeds.pcursor
-          this.dataShow.push(...data)
-          var i = 0
-          interval = setInterval(() => {
-            if (i <= that.dataShow.length) {
-              ;(function(a) {
-                setTimeout(function() {
-                  that.getCommentList(ksid, that.dataShow[a].photoId).then(dataOne => {
-                    that.dataShow[a].loading = false
-                    if (dataOne && that.dataShow[a]) {
-                      that.dataShow[a].commentList = dataOne.commentList
-                    } else {
-                      that.dataShow[a].commentList = []
-                    }
-                  })
-                }, 0)
-                if (that.dataShow.length == 0) {
-                  clearInterval(interval)
-                  i = 0
-                } else {
-                  i++
-                }
-              })(i)
-            } else {
-              clearInterval(interval)
-            }
-          }, 10000)
-        }
-      })
-    },
-    getCommentList(ksid, photoId) {
-      return new Promise(function(resolve) {
-        getCommentList({ ksid: ksid, photoId: photoId, pcursor: null }).then(res => {
-          if (res.code == 0) {
-            resolve(res.result.data.shortVideoCommentList)
-          }
-        })
-      })
-    },
-    sleep(d) {
-      return new Promise(resolve => setTimeout(resolve, d))
-    },
-    remove(allItem, item, index) {
-      console.log(allItem, item)
-      allItem.commentList.splice(index, 1)
-      //   String ksid,String photoId,Long commentId
-      commentDelete({ ksid: this.ksid, photoId: allItem.photoId, commentId: item.commentId }).then(res => {
-        console.log(res)
-      })
-    },
-    getScrollTop: function() {
-      var scrollTop = 0,
-        bodyScrollTop = 0,
-        documentScrollTop = 0
-      if (document.body) {
-        bodyScrollTop = document.body.scrollTop
-      }
-      if (document.documentElement) {
-        documentScrollTop = document.documentElement.scrollTop
-      }
-      scrollTop = bodyScrollTop - documentScrollTop > 0 ? bodyScrollTop : documentScrollTop
-      return scrollTop
-    },
-    //浏览器视口的高度
-    getScrollHeight: function() {
-      var scrollHeight = 0,
-        bodyScrollHeight = 0,
-        documentScrollHeight = 0
-      if (document.body) {
-        bodyScrollHeight = document.body.scrollHeight
-      }
-      if (document.documentElement) {
-        documentScrollHeight = document.documentElement.scrollHeight
-      }
-      scrollHeight = bodyScrollHeight - documentScrollHeight > 0 ? bodyScrollHeight : documentScrollHeight
-      return scrollHeight
-    },
-    //浏览器视口的高度
-    getWindowHeight: function() {
-      var windowHeight = 0
-      if (document.compatMode == 'CSS1Compat') {
-        windowHeight = document.documentElement.clientHeight
-      } else {
-        windowHeight = document.body.clientHeight
-      }
-      return windowHeight
-    },
-    scrollChange: function() {
-      var _this = this,
-        currentPage = { page: this.page }
-      this.scollY = this.getScrollTop() + this.getWindowHeight() - this.getScrollHeight()
-      // 把下拉刷新置为false,防止多次请求
-      if (this.scollY >= -100) {
-        if (this.page > this.pageTotal) {
-          return false
-        }
-        if (!this.pullRefreshss) {
-          return false
-        }
-        _this.getVideoList(_this.ksid, _this.pcursor)
-        // _this.getTest()
-        _this.pullRefreshss = false
-      } else {
-        // 其他时候把下拉刷新置为true
-        _this.pullRefreshss = true
-      }
-    }
-  },
-  watch: {},
-  distoryed() {
-    clearInterval(interval)
-    window.clearInterval(objTimer)
-  },
-  mounted: function() {
-    this.$nextTick(() => {
-      var that = this
-      this.getUserList()
-      //   getAccountReport().then(res => {
-      //     console.log(res)
-      //   })
-      objTimer = window.setInterval(() => {
-        if (that.showCode) {
-          setTimeout(function() {
-            getLoginStatus({ requestId: that.requestId }).then(res => {
-              if (res.code == 0) {
-                if (res.result) {
-                  if (res.result.status == 1) {
-                    that.showShare = false
-                  } else {
-                    that.showShare = true
-                    that.showSpan = true
-                    that.showTitle = res.result.msg
-                    if (res.result.status == 3) {
-                      that.showSpan = false
-                      that.showCode = false
-                      that.getUserList()
-                    } else if (res.result.status == 2) {
-                      that.showSpan = false
-                    }
-                  }
-                }
-              }
-            })
-          }, 0)
-        }
-      }, 1000)
-      window.onscroll = function() {
-        if (that.ksid) {
-          if (that.pcursor != 'no_more') {
-            that.scrollChange()
-          }
-        }
-      }
-    })
-  }
-}
-</script>
+<style>
+@media (min-width: 1024px) {
+  .checkbox_item_container {
+    width: 70%;
+  }
+} /*>=1024的设备*/
+
+@media (min-width: 1100px) {
+  .checkbox_item_container {
+    width: 70%;
+  }
+} /*>=1100的设备*/
+@media (min-width: 1280px) {
+  .checkbox_item_container_size {
+    width: 70%;
+  }
+}
+
+/*>=1280的设备*/
+
+@media (min-width: 1366px) {
+}
+
+@media (min-width: 1440px) {
+}
+
+@media (min-width: 1680px) {
+}
+@media (min-width: 1920px) {
+  .checkbox_item_container_size {
+    width: 50%;
+  }
+}
+.vm-video-list .ant-comment-inner {
+  padding: 0;
+}
+.vm-video-list .bg:after {
+  content: '';
+  width: 110%;
+  height: 110%;
+  position: absolute;
+  left: -5%;
+  top: -5%;
+  background: inherit;
+  filter: blur(20px);
+  z-index: 2;
+}
+.ant-comment-content-detail {
+  word-wrap: break-word;
+  word-break: normal;
+
+}
+.ant-comment-content-detail p {
+  word-wrap: break-word;
+  word-break: normal;
+  white-space: initial !important;
+}
+.vm-video-list .ant-card-actions li span {
+  width: 90%;
+}
+.vm-video-list .ant-card-actions li .ant-input-group {
+  width: 100%;
+}
+.vm-video-list .ant-card-actions li .ant-input-group-addon {
+  width: 0;
+}
+.ant-comment-nested {
+  margin-left: 10px;
+}
+.ant-comment-content-author-name {
+  width: 100%;
+}
+</style>
+<template>
+  <div class="vm-video-list">
+    <a-row class="image-list-heading vm-panel">
+      <div class="panel-heading">{{ title }}</div>
+      <a-row type="flex" align="middle" justify="space-between" class="panel-body">
+        <div class="search-bar">
+          <a-button type="primary" icon="plus" style="margin-right:10px" @click="addUser">新增账号</a-button>
+          <a-select
+            showSearch
+            placeholder="选择账号"
+            notFoundContent="暂无账号,赶紧去添加一个吧"
+            optionFilterProp="children"
+            style="width: 300px"
+            @focus="handleFocus"
+            @blur="handleBlur"
+            @change="handleChange"
+            :filterOption="filterOption"
+          >
+            <a-select-option
+              :value="item.ksid"
+              v-for="(item,index) of options"
+              :key="index"
+            >{{item.userName}}</a-select-option>
+          </a-select>
+        </div>
+      </a-row>
+    </a-row>
+    <a-row class="image-list" :gutter="16" style="padding:0 8px">
+      <a-col
+        :lg="6"
+        :sm="12"
+        class="vm-margin"
+        v-for="(item,index) of dataShow"
+        :key="index"
+        style="padding:0"
+      >
+        <a-card hoverable style="margin:0 15px">
+          <div
+            slot="cover"
+            style="display:flex;justify-content:center;position:relative;height:300px;"
+          >
+            <div
+              class="bg"
+              style="overflow:hidden;position:relative;width:100%;height:100%"
+              :style="{backgroundImage: 'url(' +item.thumbnailUrl+')', backgroundSize:'cover', backgroundRepeat: 'no-repeat',backgroundPosition:'center center'}"
+            >
+              <a
+                :href="'https://live.kuaishou.com/u/'+item.user.id+'/'+item.photoId+'?did=web_582ac3583a8eb520aaca065b372d1a1c'"
+                target="_blank"
+                style="width: 100%;height: 100%;position: absolute;z-index: 100;"
+              ></a>
+            </div>
+
+            <img
+              :src="item.poster"
+              alt
+              style="height:300px;width:auto;position:absolute;z-index:10;top:0"
+            />
+          </div>
+
+          <template class="ant-card-actions" slot="actions">
+            <a-input placeholder="请输入评论内容" v-model="item.keyword" style="width:100%">
+              <div slot="addonAfter" @click="addComment(item,index)">评论</div>
+            </a-input>
+          </template>
+          <div style="position:relative">
+            <div
+              style="width:100%;height:200px;position: absolute;z-index:3;background:white;display:flex;justify-content:center;align-items:center"
+              v-if="item.loading"
+            >
+              <img src="./images/loading.gif" alt />
+            </div>
+            <div
+              style="height:200px;overflow-y:auto;"
+              class="scrollBox"
+              @scroll="scrollGet(item,index)"
+            >
+              <div style="margin-bottom:15px;height:50px">
+                {{item.caption}}
+                <br />
+                <a-icon type="heart" />
+                {{item.likeCount}}
+                <a-icon type="highlight" style="margin-left:10px" />
+                {{item.commentCount}}
+                <a-icon type="play-circle" style="margin-left:10px" />
+                {{item.viewCount}}
+              </div>
+              <div v-show="item.commentList.length>0">
+                <a-comment v-for="(items,idx) of item.commentList" :key="idx">
+                  <span
+                    slot="actions"
+                    v-if="items.subComments.length>0"
+                    @click="items.show=!items.show"
+                    style="color:blue"
+                  >更多评论</span>
+                  <p slot="author">
+                    {{items.authorName}}
+                    <span style="float:right">{{items.timestamp|formatDate}}</span>
+                  </p>
+                  <div slot="content" style="display: flex;justify-content: space-between;">
+                    <p style="width:75%">
+                      <!-- <input type="checkbox" style="margin-right:5px" name id /> -->
+                      {{items.content}}
+                    </p>
+                    <div style="white-space: nowrap;">
+                      <span style="margin-right:5px" @click="backAdd(item,items)">回复</span>
+                      <span @click="remove(item,items,index)" style="margin-right:5px">删除</span>
+                    </div>
+                  </div>
+                  <div v-if="items.subComments.length>0" v-show="items.show">
+                    <a-comment v-for="(itemSub,idxSub) of items.subComments" :key="idxSub">
+                      <a slot="author">{{itemSub.authorName}}</a>
+                      <div slot="content" style="display: flex;justify-content: space-between;">
+                        <p style="width:75%">{{itemSub.content}}</p>
+                        <div>
+                          <span style="margin-right:5px" @click="backAdd(item,items)">回复</span>
+                          <span @click="remove(item,itemSub,index)" style="margin-right:5px">删除</span>
+                        </div>
+                      </div>
+                    </a-comment>
+                  </div>
+                </a-comment>
+              </div>
+              <div
+                v-show="item.commentList.length<=0"
+                style="height:130px;display:flex;justify-content:center;align-items:center"
+              >暂无评论</div>
+            </div>
+          </div>
+        </a-card>
+      </a-col>
+    </a-row>
+    <div
+      style="position:fixed;width:50px;height:100px;right:0;bottom:100px;cursor: pointer;"
+      v-show="scollTop>300"
+      @click="backTop"
+    >
+      <a-icon type="arrow-up" style="font-size:30px" />
+    </div>
+    <a-modal title="扫描二维码登录" v-model="showCode" :width="300" @cancel="showCode = false">
+      <div style="display: flex;justify-content: center;position:relative">
+        <img :src="qrcode" alt style="width:200px;height:200px;border:1px solid #f2f2f2" />
+        <div
+          style="width:200px;height:200px;position:absolute;background:rgba(255,255,255,.9);text-align:center;padding:60px 15px"
+          v-show="showShare"
+        >
+          <div style="margin-bottom:5px">
+            <img :src="url" alt />
+          </div>
+          <p>{{showTitle}}</p>
+          <span @click="addUser" style="color:red;cursor: pointer;" v-show="showSpan">刷新</span>
+        </div>
+      </div>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import ARow from 'ant-design-vue/es/grid/Row'
+import ACol from 'ant-design-vue/es/grid/Col'
+import axios from 'axios'
+var interval, objTimer
+var a = 0
+
+import {
+  getLoginQr,
+  getUserList,
+  getLoginStatus,
+  getVideoList,
+  getCommentList,
+  commentDelete,
+  commentAdd
+} from '@api/video.js'
+export default {
+  name: 'videoList',
+  components: {
+    ACol,
+    ARow
+  },
+
+  data: function() {
+    return {
+      title: '视频列表',
+      dataShow: [], // data for showing
+      data: [],
+      options: [],
+      showTwo: false,
+      showCode: false,
+      lastTime: null, //最后一次点击的时间
+      currentTime: null, //当前点击的时间
+      timeOut: 60 * 1000, //设置超时时间: 1分钟,
+      requestId: '',
+      qrcode: '',
+      showTitle: '',
+      showShare: false,
+      showSpan: false,
+      ksid: null,
+      pullRefreshss: true, // 代表可以进行下拉加载,false代表不能
+      scollY: null, // 离底部距离有多少
+      scollTop: null,
+      pcursor: null,
+      repltTo: 0,
+      replyToCommentId: 0,
+      length: 0,
+      url: 'http://static.yximgs.com/s1/i/qr-confirm.f32a3c5.svg'
+    }
+  },
+  filters: {
+    formatDate: function(value) {
+      let date = new Date(value)
+      let y = date.getFullYear()
+      let MM = date.getMonth() + 1
+      MM = MM < 10 ? '0' + MM : MM
+      let d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      let h = date.getHours()
+      h = h < 10 ? '0' + h : h
+      let m = date.getMinutes()
+      m = m < 10 ? '0' + m : m
+      let s = date.getSeconds()
+      s = s < 10 ? '0' + s : s
+      return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s
+    }
+  },
+  methods: {
+    scrollGet(item, i, e) {
+      var b = document.getElementsByClassName('scrollBox')[i]
+      if (b.scrollHeight - b.scrollTop < 250 && item.pcursor != 'no_more') {
+        if (b.scrollHeight - b.scrollTop > 235) {
+          this.getCommentList(this.ksid, this.dataShow[i].photoId, item.pcursor).then(dataOne => {
+            this.dataShow[i].loading = false
+            if (dataOne && this.dataShow[i]) {
+              var pcursor = dataOne.pcursor
+              this.dataShow[i].pcursor = pcursor
+              var dataNew = dataOne.commentList.map(item => {
+                return {
+                  ...item,
+                  show: false
+                }
+              })
+              this.dataShow[i].commentList.push(...dataNew)
+            } else {
+              this.dataShow[i].commentList = []
+            }
+          })
+        }
+      }
+    },
+    handleChange(value) {
+      this.ksid = value
+      this.dataShow = []
+      clearInterval(interval)
+      this.getVideoList(value, null)
+      //   this.getTest()
+    },
+    handleBlur() {
+      console.log('blur')
+    },
+    handleFocus() {
+      console.log('focus')
+    },
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    getUserList() {
+      getUserList().then(res => {
+        if (res.code == 0) {
+          this.options = res.result
+        } else {
+          this.options = []
+        }
+      })
+    },
+    addUser() {
+      this.showCode = true
+      getLoginQr().then(res => {
+        if (res.code == 0) {
+          this.qrcode = res.result.qrcode
+          this.requestId = res.result.requestId
+        }
+      })
+    },
+    getVideoList(ksid, pcursor) {
+      var that = this
+      getVideoList({ ksid: ksid, pcursor: pcursor }).then(res => {
+        if (res.code == 0) {
+          var data = res.result.data.publicFeeds.list.map(item => {
+            return {
+              ...item,
+              commentList: [],
+              loading: true,
+              keyword: ''
+            }
+          })
+          this.pcursor = res.result.data.publicFeeds.pcursor
+          this.dataShow.push(...data)
+          var i = 0
+          for (let i = 0; i < that.dataShow.length; i++) {
+            that.dataShow[i].loading = false
+            if (that.dataShow[i].commentCount > 0) {
+              that.getCommentList(ksid, that.dataShow[i].photoId, null).then(dataOne => {
+                that.dataShow[i].loading = false
+                if (dataOne && that.dataShow[i]) {
+                  var pcursor = dataOne.pcursor
+                  that.dataShow[i].commentList = dataOne.commentList.map(item => {
+                    return {
+                      ...item,
+                      show: false
+                    }
+                  })
+                  that.dataShow[i].pcursor = pcursor
+                } else {
+                  that.dataShow[i].commentList = []
+                }
+              })
+            } else {
+              that.dataShow[i].loading = false
+            }
+          }
+        }
+      })
+    },
+    getCommentList(ksid, photoId, pcursor) {
+      return new Promise(function(resolve) {
+        getCommentList({ ksid: ksid, photoId: photoId, pcursor: pcursor }).then(res => {
+          if (res.code == 0) {
+            var data = res.result.data.shortVideoCommentList
+            resolve(data)
+          }
+        })
+      })
+    },
+    sleep(d) {
+      return new Promise(resolve => setTimeout(resolve, d))
+    },
+    remove(allItem, item, index) {
+      console.log(allItem, item)
+      commentDelete({ ksid: this.ksid, photoId: allItem.photoId, commentId: item.commentId }).then(res => {
+        this.getCommentList(this.ksid, allItem.photoId, null).then(dataOne => {
+          this.dataShow[index].loading = false
+          this.dataShow[index].commentList = []
+          if (dataOne && this.dataShow[index]) {
+            var pcursor = dataOne.pcursor
+            this.dataShow[index].pcursor = pcursor
+            this.dataShow[index].commentList = dataOne.commentList.map(item => {
+              return {
+                ...item,
+                show: false
+              }
+            })
+          } else {
+            this.dataShow[index].commentList = []
+          }
+        })
+      })
+    },
+    getScrollTop: function() {
+      var scrollTop = 0,
+        bodyScrollTop = 0,
+        documentScrollTop = 0
+      if (document.body) {
+        bodyScrollTop = document.body.scrollTop
+      }
+      if (document.documentElement) {
+        documentScrollTop = document.documentElement.scrollTop
+      }
+      scrollTop = bodyScrollTop - documentScrollTop > 0 ? bodyScrollTop : documentScrollTop
+      return scrollTop
+    },
+    //浏览器视口的高度
+    getScrollHeight: function() {
+      var scrollHeight = 0,
+        bodyScrollHeight = 0,
+        documentScrollHeight = 0
+      if (document.body) {
+        bodyScrollHeight = document.body.scrollHeight
+      }
+      if (document.documentElement) {
+        documentScrollHeight = document.documentElement.scrollHeight
+      }
+      scrollHeight = bodyScrollHeight - documentScrollHeight > 0 ? bodyScrollHeight : documentScrollHeight
+      return scrollHeight
+    },
+    //浏览器视口的高度
+    getWindowHeight: function() {
+      var windowHeight = 0
+      if (document.compatMode == 'CSS1Compat') {
+        windowHeight = document.documentElement.clientHeight
+      } else {
+        windowHeight = document.body.clientHeight
+      }
+      return windowHeight
+    },
+    scrollChange: function() {
+      var _this = this,
+        currentPage = { page: this.page }
+      _this.scollY = this.getScrollTop() + this.getWindowHeight() - this.getScrollHeight()
+      // 把下拉刷新置为false,防止多次请求
+      if (this.scollY >= -100) {
+        if (this.page > this.pageTotal) {
+          return false
+        }
+        if (!this.pullRefreshss) {
+          return false
+        }
+        _this.getVideoList(_this.ksid, _this.pcursor)
+        // _this.getTest()
+        _this.pullRefreshss = false
+      } else {
+        // 其他时候把下拉刷新置为true
+        _this.pullRefreshss = true
+      }
+    },
+    backTop() {
+      document.body.scrollTop = 0
+      document.documentElement.scrollTop = 0
+    },
+    addComment(item, index) {
+      console.log(item)
+      var word = item.keyword.substring(this.length)
+      console.log(word)
+      var params = {
+        ksid: this.ksid,
+        photoId: item.photoId,
+        content: word,
+        replyToCommentId: this.replyToCommentId,
+        repltTo: this.repltTo
+      }
+      commentAdd(params).then(res => {
+        console.log(res)
+        if (res.code == 0) {
+          this.getCommentList(this.ksid, item.photoId, null).then(dataOne => {
+            this.dataShow[index].loading = false
+            this.dataShow[index].commentList = []
+            if (dataOne && this.dataShow[index]) {
+              this.dataShow[index].commentList = dataOne.commentList.map(item => {
+                return {
+                  ...item,
+                  show: false
+                }
+              })
+            } else {
+              this.dataShow[index].commentList = []
+            }
+          })
+          this.length = 0
+          item.keyword = ''
+        }
+      })
+    },
+    backAdd(item, items) {
+      console.log(item, items)
+      // authorId  commentId
+      item.keyword = '回复' + items.authorName
+      this.length = item.keyword.length
+      this.repltTo = items.authorId
+      this.replyToCommentId = items.commentId
+    }
+  },
+  watch: {},
+  distoryed() {
+    clearInterval(interval)
+    window.clearInterval(objTimer)
+  },
+  mounted: function() {
+    this.$nextTick(() => {
+      var that = this
+      this.getUserList()
+      //   getAccountReport().then(res => {
+      //     console.log(res)
+      //   })
+      objTimer = window.setInterval(() => {
+        if (that.showCode) {
+          setTimeout(function() {
+            getLoginStatus({ requestId: that.requestId }).then(res => {
+              if (res.code == 0) {
+                if (res.result) {
+                  if (res.result.status == 1) {
+                    that.url = 'http://static.yximgs.com/s1/i/qr-confirm.f32a3c5.svg'
+                    that.showShare = false
+                  } else {
+                    that.url = 'http://static.yximgs.com/s1/i/qr-timeout.36ec907.svg'
+                    that.showShare = true
+                    that.showSpan = true
+                    that.showTitle = res.result.msg
+                    if (res.result.status == 3) {
+                      that.url = 'http://static.yximgs.com/s1/i/qr-confirm.f32a3c5.svg'
+                      that.showSpan = false
+                      that.showCode = false
+                      that.getUserList()
+                    } else if (res.result.status == 2) {
+                      that.url = 'http://static.yximgs.com/s1/i/qr-confirm.f32a3c5.svg'
+                      that.showSpan = false
+                    }
+                  }
+                }
+              }
+            })
+          }, 0)
+        }
+      }, 1000)
+      window.onscroll = function() {
+        that.scollTop = that.getScrollTop()
+        if (that.ksid) {
+          if (that.pcursor != 'no_more') {
+            that.scrollChange()
+          }
+        }
+      }
+    })
+  }
+}
+</script>

+ 21 - 18
src/views/template/creative/modules/material.vue

@@ -84,6 +84,26 @@
                       :accessKeySecret="accessKeySecret"
                     ></upload-to-ali>
                   </a-form-item>
+
+                  <a-form-item
+                    label="封面上传"
+                    :labelCol="labelCol"
+                    :wrapperCol="wrapperCol"
+                    v-if="(materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'||materialType=='CREATIVE_IMAGE_MODE_VIDEO')"
+                  >
+                    <upload-to-ali
+                      v-model="item.imageUrl"
+                      :customDomain="customDomain"
+                      preview
+                      :region="region"
+                      :bucket="bucket"
+                      :accept="acceptImage"
+                      :size="102400"
+                      :accessKeyId="accessKeyId"
+                      :accessKeySecret="accessKeySecret"
+                    ></upload-to-ali>
+                  </a-form-item>
+
                   <a-form-item
                     label="创意标题"
                     :labelCol="labelCol"
@@ -106,24 +126,7 @@
                     >{{itemTag.name}}</a-tag>
                     <span @click="showElseClick(item)">{{item.showElse?"更多":"收起"}}</span>
                   </a-form-item>
-                  <a-form-item
-                    label="封面上传"
-                    :labelCol="labelCol"
-                    :wrapperCol="wrapperCol"
-                    v-if="creativeType == 'program'&&(materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'||materialType=='CREATIVE_IMAGE_MODE_VIDEO')"
-                  >
-                    <upload-to-ali
-                      v-model="item.imageUrl"
-                      :customDomain="customDomain"
-                      preview
-                      :region="region"
-                      :bucket="bucket"
-                      :accept="acceptImage"
-                      :size="102400"
-                      :accessKeyId="accessKeyId"
-                      :accessKeySecret="accessKeySecret"
-                    ></upload-to-ali>
-                  </a-form-item>
+
                 </div>
               </a-card>
             </a-col>

+ 25 - 0
src/views/template/userorientation/modules/ByteDanceUserOrientationTemplateModal.vue

@@ -81,6 +81,23 @@
           </a-radio-group>
         </a-form-item>
 
+        <a-form-item label="精选流量包" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-radio-group v-model="superiorPopularityType">
+            <a-radio-button value="NONE">不限</a-radio-button>
+            <a-radio-button value="APP">应用软件精选</a-radio-button>
+            <a-radio-button value="GAME">游戏精选</a-radio-button>
+            <a-radio-button value="ZDY">自定义流量包</a-radio-button>
+          </a-radio-group>
+        </a-form-item>
+
+        <a-form-item label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-radio-group v-model="deviceTypeChshj">
+            <a-radio-button value="NONE">不限</a-radio-button>
+            <a-radio-button value="MOBILE">智能手机</a-radio-button>
+            <a-radio-button value="PAD">平板</a-radio-button>
+          </a-radio-group>
+        </a-form-item>
+
         <a-form-item label="网络" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <a-checkbox-group v-model="netType">
             <a-checkbox
@@ -159,6 +176,8 @@ export default {
   },
   data() {
     return {
+      deviceTypeChshj:'NONE',
+      superiorPopularityType:'NONE',
       cityStr:[],
       areaStr:[],
       adTagStr:[],
@@ -303,6 +322,8 @@ export default {
       this.intrestType="NONE";
       this.gender="NONE";
       this.ageRange=null;
+      this.superiorPopularityType = 'NONE';
+      this.deviceTypeChshj = 'NONE';
     },
     edit(record) {
       console.log(record)
@@ -326,6 +347,8 @@ export default {
       this.cityStr = JSON.parse(record.cityStr);
       this.areaStr = JSON.parse(record.districtStr);
       this.adTagStr = JSON.parse(record.adTagStr);
+      this.deviceTypeChshj = record.deviceType;
+      this.superiorPopularityType = record.superiorPopularityType;
       this.id = record.id;
       // this.form.resetFields()
       this.model = Object.assign({}, record)
@@ -393,6 +416,8 @@ export default {
           params.cityList = this.cityList;
           params.areaList = this.areaList;
           params.intrestCategoryList = this.intrestCategoryList;
+          params.deviceType = this.deviceTypeChshj;
+          params.superiorPopularityType = this.superiorPopularityType;
 
           console.log(params);
           postAction(this.url.insertUrl,params).then((res)=>{

+ 2 - 2
vue.config.js

@@ -64,9 +64,9 @@ module.exports = {
          }
        },*/
       '/jeecg-boot': {
-        target: 'http://localhost:8080', //请求本地 需要jeecg-boot后台项目
+        target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
+        // target: 'http://192.168.2.130:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目
-        // target: 'http://192.168.43.23:8080', //请求本地 需要jeecg-boot后台项目
         ws: false,
         changeOrigin: true
       },

File diff suppressed because it is too large
+ 0 - 12633
yarn.lock