index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. <template>
  2. <view class="column flex-1 hb">
  3. <!-- <view class="headnav x-bc">
  4. <view :class="activeTab == 0 ? 'headnav-item headnav-active':'headnav-item'" @click="handleNav(0)">
  5. <view>直播计划</view>
  6. <view class="headnav-num">3</view>
  7. <image :src="imgPath+'app/images/idle.png'" mode="aspectFill"></image>
  8. </view>
  9. <view :class="activeTab == 1? 'headnav-item headnav-active':'headnav-item'" @click="handleNav(1)">
  10. <view>今日直播</view>
  11. <view class="headnav-num">3</view>
  12. <image :src="imgPath+'/app/images/streaming.png'" mode="aspectFill"></image>
  13. </view>
  14. <view :class="activeTab == 2 ? 'headnav-item headnav-active':'headnav-item'" @click="handleNav(2)">
  15. <view>往日直播</view>
  16. <view class="headnav-num">3</view>
  17. <image :src="imgPath+'/app/images/finished.png'" mode="aspectFill"></image>
  18. </view>
  19. </view> -->
  20. <view>
  21. <dropdownPanel :filterData='filterData' @onChange="onChange" @confirm="confirm" @reset="reset">
  22. <view class="column flex-1 hb hidden">
  23. <view v-if="searchbarNav == 0">
  24. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds"
  25. :refresher-triggered="triggereds" refresher-background="rgba(0,0,0,0)"
  26. @refresherrefresh="pullDownRefreshs" @refresherrestore="triggereds = false"
  27. :upper-threshold="100" :lower-threshold="100" @refresherabort="triggereds = false"
  28. @scrolltolower="reachBottoms">
  29. <view class="p20 fs28 column flex-1 scrolly">
  30. <view v-for="(items,index) in courseOne" :key="items" :class="courseid==items.periodId?'actNav':''"
  31. class="m10 p10 center" style="border-bottom: 2rpx solid #eee;" @click="getCourseOne(items.periodId)">
  32. {{items.periodName}}
  33. </view>
  34. </view>
  35. <u-loadmore :status="statusA" />
  36. </scroll-view>
  37. </view>
  38. <view v-else class="p20 fs28 column flex-1 hidden">
  39. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnabled"
  40. :refresher-triggered="triggered" refresher-background="rgba(0,0,0,0)"
  41. @refresherrefresh="pullDownRefresh" @refresherrestore="triggered = false"
  42. :upper-threshold="100" :lower-threshold="100" @refresherabort="triggered = false"
  43. @scrolltolower="reachBottom">
  44. <view v-for="(item,index) in courseTwo" :key="index"
  45. :class="courseids==item.videoId?'actNav':''" class="m10 p10 center"
  46. style="border-bottom: 2rpx solid #eee;" @click="getCourseTwo(item.videoId)">
  47. {{item.title}}
  48. </view>
  49. <u-loadmore :status="status" />
  50. <view class="ptb40"></view>
  51. </scroll-view>
  52. </view>
  53. </view>
  54. </dropdownPanel>
  55. </view>
  56. <view class="bgf m20 radius8 column flex-1 scrolly" style="max-height: 100%;">
  57. <view class="column flex-1 scrolly">
  58. <u-collapse ref="collapseRef" :border="false" :value="collapseValue" @change="changeCollapse">
  59. <!-- #ifdef MP-WEIXIN -->
  60. <u-collapse-item name="course" title="课程统计">
  61. <!-- #endif -->
  62. <!-- #ifndef MP-WEIXIN -->
  63. <u-collapse-item name="course">
  64. <text slot="title" class="bold fs32">课程统计</text>
  65. <!-- #endif -->
  66. <text slot="value" class="base-color fs24">{{collapseValue.includes('course')?'收回':'展开'}}</text>
  67. <view slot="right-icon">
  68. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  69. </view>
  70. <view class="justify-around ">
  71. <view class="base-bg-f8 radius16 p30 flex-1">
  72. <view class="mb12 bold">营期</view>
  73. <view class="base-color"><text class="bold fs40">
  74. {{courselist.courseNum}}</text>期</view>
  75. </view>
  76. <view class="base-bg-f8 radius16 p20 flex-1 mlr20">
  77. <view class="mb12 bold">课程数</view>
  78. <view class="base-color"><text class="bold fs40">
  79. {{courselist.videoNum}}</text>课</view>
  80. </view>
  81. <view class="base-bg-f8 radius16 p20 flex-1">
  82. <view class="mb12 bold">参与会员</view>
  83. <view class="base-color"><text class="bold fs40">
  84. {{courselist.courseUserNum}}</text>人</view>
  85. </view>
  86. </view>
  87. </u-collapse-item>
  88. <!-- #ifdef MP-WEIXIN -->
  89. <u-collapse-item name="questions" title="看课统计">
  90. <!-- #endif -->
  91. <!-- #ifndef MP-WEIXIN -->
  92. <u-collapse-item name="questions">
  93. <text slot="title" class="bold fs32">看课统计</text>
  94. <!-- #endif -->
  95. <text slot="value"
  96. class="base-color fs24">{{collapseValue.includes('questions')?'收回':'展开'}}</text>
  97. <view slot="right-icon">
  98. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  99. </view>
  100. <view class="justify-around ">
  101. <view class="base-bg-f8 radius16 p30 flex-1">
  102. <view class="mb12 bold">观看人数</view>
  103. <view class="base-color"><text class="bold fs40">{{courselist.courseWatchNum}}</text>人</view>
  104. </view>
  105. <view class="base-bg-f8 radius16 p20 flex-1 mlr20">
  106. <view class="mb12 bold">完播人数</view>
  107. <view class="base-color"><text class="bold fs40">{{courselist.courseCompleteNum}}</text>人</view>
  108. </view>
  109. <view class="base-bg-f8 radius16 p20 flex-1">
  110. <view class="mb12 bold">完播率</view>
  111. <view class="base-color"><text class="bold fs40">{{courselist.courseCompleteRate}}</text>%</view>
  112. </view>
  113. </view>
  114. </u-collapse-item>
  115. <!-- #ifdef MP-WEIXIN -->
  116. <u-collapse-item name="redenvelope" title="答题统计">
  117. <!-- #endif -->
  118. <!-- #ifndef MP-WEIXIN -->
  119. <u-collapse-item name="redenvelope">
  120. <text slot="title" class="bold fs32">答题统计</text>
  121. <!-- #endif -->
  122. <text slot="value"
  123. class="base-color fs24">{{collapseValue.includes('redenvelope')?'收回':'展开'}}</text>
  124. <view slot="right-icon">
  125. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  126. </view>
  127. <view class="justify-around ">
  128. <view class="base-bg-f8 radius16 p30 flex-1">
  129. <view class="mb12 bold">答题人数</view>
  130. <view class="base-color"><text class="bold fs40">
  131. {{courselist.answerNum}}</text>人</view>
  132. </view>
  133. <view class="base-bg-f8 radius16 p20 flex-1 mlr20">
  134. <view class="mb12 bold">正确人数</view>
  135. <view class="base-color"><text class="bold fs40">
  136. {{courselist.answerRightNum}}</text>人</view>
  137. </view>
  138. <view class="base-bg-f8 radius16 p20 flex-1">
  139. <view class="mb12 bold">正确率</view>
  140. <view class="base-color"><text class="bold fs40">
  141. {{courselist.answerRightRate}}</text>%</view>
  142. </view>
  143. </view>
  144. </u-collapse-item>
  145. <!-- #ifdef MP-WEIXIN -->
  146. <u-collapse-item name="live" title="红包统计">
  147. <!-- #endif -->
  148. <!-- #ifndef MP-WEIXIN -->
  149. <u-collapse-item name="live">
  150. <text slot="title" class="bold fs32">红包统计</text>
  151. <!-- #endif -->
  152. <text slot="value" class="base-color fs24">{{collapseValue.includes('live')?'收回':'展开'}}</text>
  153. <view slot="right-icon">
  154. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  155. </view>
  156. <view class="justify-around ">
  157. <view class="base-bg-f8 radius16 p30 flex-1">
  158. <view class="mb12 bold">红包个数</view>
  159. <view class="base-color"><text class="bold fs40">
  160. {{courselist.redPacketNum}}</text>个</view>
  161. </view>
  162. <view class="base-bg-f8 radius16 p20 mlr20 justify-start align-center">
  163. <image :src="imgPath+'/app/images/redenvelope.png'" class="w102 h102"></image>
  164. <view class="ml20">
  165. <view class="mb12 bold">答题红包金额</view>
  166. <view class="base-color">
  167. <text class="bold fs40">{{courselist.redPacketAmount}}</text>元
  168. </view>
  169. </view>
  170. </view>
  171. </view>
  172. </u-collapse-item>
  173. <!-- #ifdef MP-WEIXIN -->
  174. <u-collapse-item name="funnel" title="转化漏斗图" v-if="!ratelistState">
  175. <!-- #endif -->
  176. <!-- #ifndef MP-WEIXIN -->
  177. <u-collapse-item name="funnel" v-if="!ratelistState">
  178. <text slot="title" class="bold fs32">转化漏斗图</text>
  179. <!-- #endif -->
  180. <text slot="value" class="base-color fs24">{{collapseValue.includes('funnel')?'收回':'展开'}}</text>
  181. <view slot="right-icon">
  182. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  183. </view>
  184. <view v-show="!ratelistState">
  185. <funnelChart :getratelist="getrateimg" />
  186. </view>
  187. <view v-show="ratelistState" class="center">暂无数据</view>
  188. </u-collapse-item>
  189. <!-- #ifdef MP-WEIXIN -->
  190. <u-collapse-item name="rank" title="排行榜">
  191. <!-- #endif -->
  192. <!-- #ifndef MP-WEIXIN -->
  193. <u-collapse-item name="rank">
  194. <text slot="title" class="bold fs32">排行榜</text>
  195. <!-- #endif -->
  196. <text slot="value" class="base-color fs24">{{collapseValue.includes('rank')?'收回':'展开'}}</text>
  197. <view slot="right-icon">
  198. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  199. </view>
  200. <view class="flex-1">
  201. <!-- <view class="mt40">
  202. <view class="justify-between align-center">
  203. <view class="base-color-3 bold fs32">群管排行榜</view>
  204. <view class="justify-start" @click="ordergroup(1)" v-if="orderGroup=='asc'">
  205. <u-icon name="list-dot" size="20"></u-icon>
  206. <view>按正序(前20名)</view>
  207. </view>
  208. <view class="justify-start" @click="ordergroup(0)" v-else>
  209. <u-icon name="list-dot" size="20"></u-icon>
  210. <view>按倒序(后20名)</view>
  211. </view>
  212. </view>
  213. <view class="centerV">
  214. <u-tabs :list="list1" @click="clickTab" lineColor='#1773ff' lineWidth='40'
  215. activeStyle="font-weight:bold"></u-tabs>
  216. </view>
  217. <view class="justify-start align-center mtb28" v-for="(items,index) in rankListA"
  218. :key="index">
  219. <u-avatar :src="items.avatar" size="40"></u-avatar>
  220. <view class="flex-1 ml20">
  221. <view class="justify-between mb16">
  222. <view class="base-color-3 single-line-ellipsis">{{items.userName}}</view>
  223. <view v-if="activeA==1">{{items.completeRate}}%</view>
  224. <view v-else>{{items.answerRightRate}}%</view>
  225. </view>
  226. <u-line-progress :percentage="activeA==1?items.completeRate:items.answerRightRate" activeColor='#ed0922' />
  227. </view>
  228. </view>
  229. <view v-if="rankListA.length==0" class="center mtb32">暂无数据</view>
  230. </view> -->
  231. <view class="mt60 column flex-1">
  232. <view class="justify-between align-center">
  233. <view class="base-color-3 bold fs32">课程排行榜</view>
  234. <view class="justify-start" @click="ordergroupB(1)" v-if="orderGroupB=='asc'">
  235. <u-icon name="list-dot" size="20"></u-icon>
  236. <view>按正序(前20名)</view>
  237. </view>
  238. <view class="justify-start" @click="ordergroupB(0)" v-else>
  239. <u-icon name="list-dot" size="20"></u-icon>
  240. <view>按倒序(后20名)</view>
  241. </view>
  242. </view>
  243. <view class="centerV">
  244. <u-tabs :list="list1" @click="clickTabB" lineColor='#1773ff' lineWidth='40'
  245. activeStyle="font-weight:bold"></u-tabs>
  246. </view>
  247. <view class="justify-start align-center" style="height: fit-content;" v-for="(item,index) in rankListB" :key="index">
  248. <view class="flex-1 ml20">
  249. <view class="justify-between mb16">
  250. <view class="base-color-3 single-line-ellipsis">{{item.videoName}}</view>
  251. <view v-if="activeB==1">{{item.completeRate}}%</view>
  252. <view v-else>{{item.answerRightRate}}%</view>
  253. </view>
  254. <u-line-progress :percentage="activeB==1?item.completeRate:item.answerRightRate" activeColor='#ed0922' />
  255. </view>
  256. </view>
  257. <view v-if="rankListB.length==0" class="center mtb32">暂无数据</view>
  258. </view>
  259. </view>
  260. </u-collapse-item>
  261. </u-collapse>
  262. </view>
  263. </view>
  264. </view>
  265. </template>
  266. <script>
  267. import {
  268. getFsCourseList,
  269. getvideolist,
  270. getshopCoursenum,
  271. getcourseRates,
  272. getGroupRanklist,
  273. getCourseRanklist
  274. } from "@/api/courseManage.js"
  275. import dropdownPanel from "@/components/dropdownPanel.vue"
  276. import parse from "../../../uni_modules/uview-ui/libs/config/props/parse"
  277. import funnelChart from "@/components/chart.vue"
  278. export default {
  279. components: {
  280. dropdownPanel,
  281. funnelChart,
  282. },
  283. data() {
  284. return {
  285. activeTab: 0,
  286. showCalendar: false,
  287. user: {},
  288. filterData: [{
  289. name: '训练营-营期',
  290. value: 1,
  291. },
  292. {
  293. name: '课程',
  294. value: 2,
  295. }
  296. ],
  297. searchbarNav: 0,
  298. collapseValue: ['course', 'questions', 'redenvelope', 'live', 'funnel', 'rank'],
  299. courseOne: [],
  300. courseTwo: [],
  301. courseid: '',
  302. courseids: '',
  303. triggered: false,
  304. status: 'loadmore',
  305. isEnabled: true,
  306. pageNum: 1,
  307. pageSize: 10,
  308. courselist: [],
  309. answerlist: [],
  310. getrateimg: {},
  311. list1: [{
  312. name: '按完播率',
  313. }, {
  314. name: '按正确率'
  315. }],
  316. orderGroup: 'asc',
  317. orderGroupB: 'asc',
  318. rankListA: {},
  319. rankListB: {},
  320. activeA: 1,
  321. activeB: 1,
  322. triggereds: false,
  323. statusA: 'loadmore',
  324. isEnableds: true,
  325. pageNums: 1,
  326. pageSizes: 10,
  327. ratelistState:false
  328. }
  329. },
  330. computed: {
  331. imgPath() {
  332. return this.$store.state.imgpath
  333. }
  334. },
  335. async mounted() {
  336. this.user = uni.getStorageSync("companyUserInfo") ? JSON.parse(uni.getStorageSync("companyUserInfo")) : {}
  337. this.getCoursestatistics()
  338. this.getrateList()
  339. this.getrankgroup()
  340. await this.getrankCourse()
  341. this.$nextTick(() => {
  342. setTimeout(()=>{
  343. this.$refs?.collapseRef?.init()
  344. },1000)
  345. })
  346. },
  347. methods: {
  348. ordergroup(item) {
  349. if (item == 0) {
  350. this.orderGroup = 'asc'
  351. this.getrankgroup()
  352. } else {
  353. this.orderGroup = 'desc'
  354. this.getrankgroup()
  355. }
  356. },
  357. ordergroupB(item) {
  358. if (item == 0) {
  359. this.orderGroupB = 'asc'
  360. this.getrankCourse()
  361. } else {
  362. this.orderGroupB = 'desc'
  363. this.getrankCourse()
  364. }
  365. },
  366. getrankCourse() {
  367. //获取课程排行
  368. // console.log(this.orderGroupB)
  369. const params = {
  370. companyId: this.user.companyId,
  371. endTime: '',
  372. startTime: '',
  373. periodId: this.courseid,
  374. videoId: this.courseids,
  375. order: this.orderGroupB,
  376. type: this.activeB, // 0:经销商/1:群管
  377. }
  378. getCourseRanklist(params).then(res => {
  379. if (res.code == 200) {
  380. // console.log(res)
  381. this.rankListB = res.data
  382. } else {
  383. uni.showToast({
  384. icon: 'none',
  385. title: res.msg
  386. })
  387. }
  388. })
  389. },
  390. getrankgroup() {
  391. //获取群管排行
  392. const params = {
  393. companyId: this.user.companyId,
  394. periodId: this.courseid,
  395. videoId: this.courseids,
  396. order: this.orderGroup,
  397. type: this.activeA, // 0:经销商/1:群管
  398. }
  399. getGroupRanklist(params).then(res => {
  400. if (res.code == 200) {
  401. // console.log(res)
  402. this.rankListA = res.data
  403. } else {
  404. uni.showToast({
  405. icon: 'none',
  406. title: res.msg
  407. })
  408. }
  409. })
  410. },
  411. getrateList() {
  412. //获取漏斗图
  413. const params = {
  414. periodId: this.courseid,
  415. videoId: this.courseids,
  416. }
  417. getcourseRates(params).then(res => {
  418. if (res.code == 200) {
  419. this.ratelistState = res.data.every(item => item.value === 0);
  420. this.getrateimg = res
  421. } else {
  422. uni.showToast({
  423. icon: 'none',
  424. title: res.msg
  425. })
  426. }
  427. })
  428. },
  429. getCoursestatistics() {
  430. //课程统计
  431. const params = {
  432. periodId: this.courseid,
  433. videoId:this.courseids,
  434. }
  435. getshopCoursenum(params).then(res => {
  436. if (res.code == 200) {
  437. // console.log(res)
  438. this.courselist = res.data
  439. } else {
  440. uni.showToast({
  441. icon: 'none',
  442. title: res.msg
  443. })
  444. }
  445. })
  446. },
  447. pullDownRefreshs() {
  448. // 下拉
  449. this.triggereds = true; //下拉了状态为true
  450. setTimeout(() => {
  451. this.triggereds = false;
  452. uni.stopPullDownRefresh()
  453. this.pageNums = 1;
  454. this.getCourseList('refresh') //触底 不穿执行else
  455. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  456. // 请求接口
  457. }, 1000)
  458. },
  459. reachBottoms() {
  460. // status这个是加载状态
  461. console.log(111);
  462. if (this.statusA === 'loadmore') {
  463. this.statusA = 'loading'
  464. uni.showNavigationBarLoading()
  465. setTimeout(() => {
  466. this.pageNums++
  467. this.getCourseList() //触底 不穿执行else
  468. uni.hideNavigationBarLoading()
  469. }, 1000);
  470. }
  471. },
  472. pullDownRefresh() {
  473. // 下拉
  474. this.triggered = true; //下拉了状态为true
  475. setTimeout(() => {
  476. this.triggered = false;
  477. uni.stopPullDownRefresh()
  478. this.pageNum = 1;
  479. this.getCourseListsmall('refresh') //触底 不穿执行else
  480. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  481. // 请求接口
  482. }, 1000)
  483. },
  484. reachBottom() {
  485. // status这个是加载状态
  486. console.log(111);
  487. if (this.status === 'loadmore') {
  488. this.status = 'loading'
  489. uni.showNavigationBarLoading()
  490. setTimeout(() => {
  491. this.pageNum++
  492. this.getCourseListsmall() //触底 不穿执行else
  493. uni.hideNavigationBarLoading()
  494. }, 1000);
  495. }
  496. },
  497. getCourseOne(id) {
  498. this.courseid = id
  499. },
  500. getCourseTwo(id) {
  501. this.courseids = id
  502. },
  503. getCourseList(type) {
  504. this.courseOne=[]
  505. const param = {
  506. pageNum: this.pageNums,
  507. pageSize: this.pageSizes,
  508. }
  509. getFsCourseList(param).then(res => {
  510. if (res.code == 200) {
  511. if (type == 'refresh') {
  512. this.courseOne = res.data.list
  513. } else {
  514. // 加载更多 当前页和下一页合并
  515. this.courseOne = [...this.courseOne, ...res.data.list]
  516. }
  517. if (res.data.isLastPage) {
  518. this.statusA = 'nomore'
  519. } else {
  520. this.statusA = 'loadmore'
  521. }
  522. console.log(this.courseOne);
  523. // this.courseOne
  524. } else {
  525. uni.showToast({
  526. icon: 'none',
  527. title: res.msg
  528. })
  529. }
  530. })
  531. },
  532. getCourseListsmall(type) {
  533. const param = {
  534. periodId: this.courseid,
  535. pageNum: this.pageNum,
  536. pageSize: this.pageSize, //
  537. }
  538. getvideolist(param).then(res => {
  539. if (res.code == 200) {
  540. // refresh 下拉
  541. if (type == 'refresh') {
  542. this.courseTwo = res.data.list
  543. } else {
  544. // 加载更多 当前页和下一页合并
  545. this.courseTwo = [...this.courseTwo, ...res.data.list]
  546. }
  547. if (this.pageNum >= res.data.pages) {
  548. this.status = 'nomore'
  549. } else {
  550. this.status = 'loadmore'
  551. }
  552. } else {
  553. }
  554. })
  555. },
  556. changeCollapse(e) {
  557. this.collapseValue = e.filter(item => item.status == 'open').map(it => it.name)
  558. },
  559. handleNav(type) {
  560. this.activeTab = type
  561. },
  562. onChange(index) {
  563. this.searchbarNav = index
  564. if (index == 0) {
  565. this.getCourseList()
  566. } else {
  567. this.pageNum = 1
  568. if (this.courseid == 0) {
  569. uni.showToast({
  570. icon: 'none',
  571. title: "请先选择训练营-营期"
  572. })
  573. } else {
  574. this.getCourseListsmall('refresh')
  575. }
  576. }
  577. },
  578. confirm() {
  579. this.getCoursestatistics()
  580. this.getrateList()
  581. this.getrankgroup()
  582. this.getrankCourse()
  583. },
  584. reset() {
  585. console.log(this.searchbarNav)
  586. if (this.searchbarNav == 0) {
  587. this.courseid = ''
  588. } else {
  589. this.courseids = ''
  590. }
  591. this.getCoursestatistics()
  592. this.getrateList()
  593. this.getrankgroup()
  594. this.getrankCourse()
  595. },
  596. clickTab(item) {
  597. this.activeA = item.index + 1
  598. this.getrankgroup()
  599. console.log(this.activeA)
  600. },
  601. clickTabB(item) {
  602. this.activeB = item.index + 1
  603. this.getrankCourse()
  604. console.log(this.activeA)
  605. },
  606. }
  607. }
  608. </script>
  609. <style lang="scss" scoped>
  610. .headnav {
  611. padding: 15px 12px;
  612. margin: 0 -10px -10px 0;
  613. box-sizing: border-box;
  614. background-color: #fff;
  615. image {
  616. height: 60px;
  617. width: 50px;
  618. position: absolute;
  619. z-index: 0;
  620. bottom: 0;
  621. right: 0;
  622. display: none;
  623. }
  624. &-item {
  625. flex: 1;
  626. font-size: 16px;
  627. padding: 10px;
  628. border-radius: 10px;
  629. background: #f8f8f8;
  630. margin: 0 10px 10px 0;
  631. position: relative;
  632. z-index: 1;
  633. overflow: hidden;
  634. color: #555;
  635. }
  636. &-active {
  637. background-color: rgb(231, 241, 255) !important;
  638. .headnav-num {
  639. color: #1677ff !important;
  640. }
  641. image {
  642. display: block !important;
  643. }
  644. }
  645. &-num {
  646. font-family: DIN, DIN;
  647. font-weight: bold;
  648. font-size: 25px;
  649. margin: 5px 0;
  650. }
  651. }
  652. .actNav {
  653. color: #1677ff !important;
  654. background-color: #e7f2fe;
  655. }
  656. </style>