manageDataDetail.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  1. <template>
  2. <view class="column flex-1 hb">
  3. <view class="header p20">
  4. <view class="justify-start align-center">
  5. <u-avatar :src="grouplist.avatar" size="50"></u-avatar>
  6. <view class="ml20">
  7. <view class="justify-start align-center ">
  8. <text class="fs32 bold mr8">{{grouplist.nickName}}</text>
  9. <image class="w40 h40" :src="imgPath+'/app/images/copy_icon.png'" @click="copyId" mode="aspectFill">
  10. </view>
  11. <view class="fs24 base-color-9 mt10">备注:{{grouplist.remark ||'暂无'}}</view>
  12. </view>
  13. </view>
  14. <view class="ptb20 fs24 base-color-6">手机号码:{{grouplist.phonenumber||'暂无'}}</view>
  15. </view>
  16. <view class="bgf">
  17. <view class="centerV">
  18. <u-tabs :list="list1" @click="clickTab" lineColor='#1773ff' lineWidth='40'
  19. activeStyle="font-weight:bold"></u-tabs>
  20. </view>
  21. <view class="justify-between box-blue" v-show="showCont==1">
  22. <view class="base-bg-sure boxs">
  23. <view class="bold">会员总数</view>
  24. <view class="base-color fs28">
  25. <text class="fs40 bold">{{companyUserCount.userTotal}}</text>人
  26. </view>
  27. </view>
  28. <view class="base-bg-sure boxs">
  29. <view class="bold">今日新增会员</view>
  30. <view class="base-color fs28">
  31. <text class="fs40 bold">{{companyUserCount.todayNewUser}}</text>人
  32. </view>
  33. </view>
  34. <view class="base-bg-sure boxs">
  35. <view class="bold">会员红包数</view>
  36. <view class="base-color fs28"><text class="fs40 bold">{{companyUserCount.userRedPacketNum}}</text>个</view>
  37. </view>
  38. <view class="base-bg-sure boxs">
  39. <view class="bold">新会员红包金额</view>
  40. <view class="base-color fs28"><text class="fs40 bold">{{companyUserCount.todayUserRedPacketAmount}}</text>元</view>
  41. </view>
  42. </view>
  43. <dropdownPanel :filterData='filterData' @onChange="onChange" @confirm="confirm" @reset="reset">
  44. <view v-if="searchbarNav == 0">
  45. <view class="mb20" >
  46. <u-search placeholder="请输入搜索营期" v-model="keywordC" :showAction="false" height="30px"
  47. @search='getcompanyTagC'></u-search>
  48. </view>
  49. <view class="p20 fs28 column flex-1 scrolly">
  50. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnabledC"
  51. :refresher-triggered="triggeredC" refresher-background="rgba(0,0,0,0)"
  52. @refresherrefresh="pullDownRefreshC" @refresherrestore="triggeredC = false"
  53. :upper-threshold="100" :lower-threshold="100" @refresherabort="triggeredC = false"
  54. @scrolltolower="reachBottomC">
  55. <view v-for="(item,index) in courseOne" :key="item.periodId"
  56. :class="courseid==item.periodId?'actNav':''" class="m10 p10 center"
  57. style="border-bottom: 2rpx solid #eee;" @click="getCourseOne(item.periodId)">
  58. {{item.periodName}}
  59. </view>
  60. </scroll-view>
  61. <u-loadmore :status="statusC" />
  62. </view>
  63. </view>
  64. <view class="p20 fs28 column flex-1 hidden h100" v-if="searchbarNav == 1">
  65. <view class="mb20" >
  66. <u-search placeholder="请输入搜索课程" v-model="keyword" :showAction="false" height="30px"
  67. @search='getcompanyTag'></u-search>
  68. </view>
  69. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds"
  70. :refresher-triggered="triggereds" refresher-background="rgba(0,0,0,0)"
  71. @refresherrefresh="pullDownRefreshs" @refresherrestore="triggereds = false"
  72. :upper-threshold="100" :lower-threshold="100" @refresherabort="triggereds = false"
  73. @scrolltolower="reachBottoms">
  74. <view v-for="(item,index) in courseTwo" :key="item.videoId"
  75. :class="courseids==item.videoId?'actNav':''" class="m10 p10 center"
  76. style="border-bottom: 2rpx solid #eee;" @click="getCourseTwo(item.videoId)">
  77. {{item.title}}
  78. </view>
  79. <u-loadmore :status="statusA" />
  80. <view class="ptb40"></view>
  81. </scroll-view>
  82. </view>
  83. </dropdownPanel>
  84. </view>
  85. <view class="column flex-1 scrolly" v-show="showCont==0">
  86. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnabled" :refresher-triggered="triggered"
  87. refresher-background="rgba(0,0,0,0)" @refresherrefresh="pullDownRefresh"
  88. @refresherrestore="triggered = false" :upper-threshold="100" :lower-threshold="100"
  89. @refresherabort="triggered = false" @scrolltolower="reachBottom">
  90. <view class="m20 radius16 bgf p20" style="border: #3e9f59 solid 2rpx;"
  91. v-for="(item,index) in courselist" :key="index">
  92. <view class="justify-start align-center pb20" style="border-bottom: #eee solid 2rpx;">
  93. <view class="doingimg">
  94. <image :src="item.thumbnail" class='w150 h90 radius16'></image>
  95. <view class="doing">进行中</view>
  96. </view>
  97. <view class="ml20">
  98. <view class="justify-start align-center">
  99. <view>{{item.courseName}}</view>
  100. <view class="justify-start align-center base-color">ID
  101. <image class="w40 h40" @click="copyCourseId(item.courseName)"
  102. :src="imgPath+'/app/images/copy_icon.png'" mode="aspectFill">
  103. </view>
  104. </view>
  105. <view class="fs24 base-color-6 column">
  106. <text>{{item.title}}</text>
  107. <text></text>
  108. </view>
  109. </view>
  110. </view>
  111. <view class="justify-between fs28 mt20">
  112. <view class="flex-1">
  113. <view class="mb8 base-color-6">观看人数</view>
  114. <view>{{item.countVO.courseWatchNum}}</view>
  115. </view>
  116. <view class="flex-1">
  117. <view class="mb8 base-color-6">完播人数</view>
  118. <view>{{item.countVO.courseCompleteNum}}
  119. <text class="base-color-red ml16">完播率{{item.countVO.completeRate}}%</text>
  120. </view>
  121. </view>
  122. </view>
  123. <view class="justify-between fs28 mt20 pb20" style="border-bottom: #eee solid 2rpx;">
  124. <view class="flex-1">
  125. <view class="mb8 base-color-6">答题红包数</view>
  126. <view>{{item.countVO.redPacketNum}}</view>
  127. </view>
  128. <view class="flex-1">
  129. <view class="mb8 base-color-6">答题红包金额</view>
  130. <view>{{item.countVO.redPacketAmount}}元</view>
  131. </view>
  132. </view>
  133. <view class="justify-between mt20">
  134. <view class="flex-1">
  135. <view class="base-color-6 mb8 ">答题人数</view>
  136. <view>{{item.countVO.answerNum}}</view>
  137. </view>
  138. <view class="flex-1">
  139. <view class="base-color-6 mb8 ">正确人数</view>
  140. <view>{{item.countVO.answerRightNum}}</view>
  141. </view>
  142. <view class="flex-1">
  143. <!-- <view class="base-color-6 mb8 ">正确率</view>
  144. <view>{{item.answerRightRate.toFixed(2)||0}}%</view> -->
  145. </view>
  146. </view>
  147. <!-- <view class="centerV mt20">
  148. <view class="colorf base-bg ptb12 w400 radius80 center ">课程数据</view>
  149. </view> -->
  150. </view>
  151. <u-loadmore :status="status" />
  152. <view class="h90 "></view>
  153. </scroll-view>
  154. </view>
  155. <view class="column flex-1 scrolly " v-show="showCont==1"
  156. style="height: calc(100% - 100rpx);padding-bottom: 100rpx;">
  157. <u-collapse ref="collapseRef" :border="false" :value="collapseValue" @change="changeCollapse">
  158. <!-- #ifdef MP-WEIXIN -->
  159. <u-collapse-item name="course" title="课程统计">
  160. <!-- #endif -->
  161. <!-- #ifndef MP-WEIXIN -->
  162. <u-collapse-item name="course">
  163. <text slot="title" class="bold fs32">课程统计</text>
  164. <!-- #endif -->
  165. <text slot="value" class="base-color fs24">{{collapseValue.includes('course')?'收回':'展开'}}</text>
  166. <view slot="right-icon">
  167. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  168. </view>
  169. <view class="justify-around ">
  170. <view class="base-bg-f radius16 p30 flex-1">
  171. <view class="mb12 bold">营期</view>
  172. <view class="base-color">
  173. <text class="bold fs40">{{courseCount.courseNum}}</text>期
  174. </view>
  175. </view>
  176. <view class="base-bg-f radius16 p20 flex-1 mlr20">
  177. <view class="mb12 bold">课程数</view>
  178. <view class="base-color"><text class="bold fs40">{{courseCount.videoNum}}
  179. </text>课</view>
  180. </view>
  181. <view class="base-bg-f radius16 p20 flex-1">
  182. <view class="mb12 bold">参与会员</view>
  183. <view class="base-color"><text class="bold fs40">
  184. {{courseCount.courseUserNum}}</text>人</view>
  185. </view>
  186. </view>
  187. </u-collapse-item>
  188. <!-- #ifdef MP-WEIXIN -->
  189. <u-collapse-item name="redenvelope" title="答题统计">
  190. <!-- #endif -->
  191. <!-- #ifndef MP-WEIXIN -->
  192. <u-collapse-item name="redenvelope">
  193. <text slot="title" class="bold fs32">答题统计</text>
  194. <!-- #endif -->
  195. <text slot="value"
  196. class="base-color fs24">{{collapseValue.includes('redenvelope')?'收回':'展开'}}</text>
  197. <view slot="right-icon">
  198. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  199. </view>
  200. <view class="justify-around ">
  201. <view class="base-bg-f radius16 p30 flex-1">
  202. <view class="mb12 bold">答题人数</view>
  203. <view class="base-color"><text class="bold fs40">
  204. {{courseCount.answerNum}}</text>人</view>
  205. </view>
  206. <view class="base-bg-f radius16 p20 flex-1 mlr20">
  207. <view class="mb12 bold">正确人数</view>
  208. <view class="base-color"><text class="bold fs40">
  209. {{courseCount.answerRightNum}}</text>人</view>
  210. </view>
  211. <view class="base-bg-f radius16 p20 flex-1">
  212. <view class="mb12 bold">正确率</view>
  213. <view class="base-color"><text class="bold fs40">
  214. {{courseCount.answerRightRate}}</text>%</view>
  215. </view>
  216. </view>
  217. </u-collapse-item>
  218. <!-- #ifdef MP-WEIXIN -->
  219. <u-collapse-item name="live" title="红包统计">
  220. <!-- #endif -->
  221. <!-- #ifndef MP-WEIXIN -->
  222. <u-collapse-item name="live">
  223. <text slot="title" class="bold fs32">红包统计</text>
  224. <!-- #endif -->
  225. <text slot="value" class="base-color fs24">{{collapseValue.includes('live')?'收回':'展开'}}</text>
  226. <view slot="right-icon">
  227. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  228. </view>
  229. <view class="justify-around ">
  230. <view class="base-bg-f radius16 p30 flex-1">
  231. <view class="mb12 bold">红包个数</view>
  232. <view class="base-color"><text class="bold fs40">
  233. {{courseCount.redPacketNum}}</text>个</view>
  234. </view>
  235. <view class="base-bg-f radius16 p20 mlr20 justify-start align-center">
  236. <image :src="imgPath+'/app/images/redenvelope.png'" class="w102 h102"></image>
  237. <view class="ml20">
  238. <view class="mb12 bold">答题红包金额</view>
  239. <view class="base-color">
  240. <text class="bold fs40">
  241. {{courseCount.redPacketAmount}}
  242. </text>元
  243. </view>
  244. </view>
  245. </view>
  246. </view>
  247. </u-collapse-item>
  248. </u-collapse>
  249. <view class="h90 "></view>
  250. </view>
  251. <view class="foot-box justify-between bgf p20 align-center">
  252. <view class="fs28 base-color-6" @click="showmore=true">更多</view>
  253. <view class="base-color-red base-bg-false plr20 fs28 ptb8 radius40 bold" @click="changevipDetail()">更换会员归属
  254. </view>
  255. </view>
  256. <view>
  257. <u-popup :show="showmore" @close="closemore" @open="openmore" style="flex: 0;">
  258. <view class="column align-center">
  259. <view class="m20" v-for="(item,index) in morelist" :key="item.value" @click="nameMore(item)">
  260. {{item.name}}
  261. </view>
  262. <u-modal :show="showlist" :title="titlelist" @confirm="confirmchange">
  263. <view class="slot-content">
  264. <u-input :placeholder="contpl" v-model="changelist" v-if="selnum==1"></u-input>
  265. <u-input :placeholder="contpl" v-model="changephone" v-if="selnum==2" maxlength="11" ></u-input>
  266. <u-input :placeholder="contpl" v-model="changeremark" v-if="selnum==3"></u-input>
  267. </view>
  268. </u-modal>
  269. </view>
  270. </u-popup>
  271. </view>
  272. <u-loading-page :loading="viewload" iconSize="32" loadingColor="#3c9cff" fontSize="20"
  273. :loading-text="loadingtext"></u-loading-page>
  274. </view>
  275. </template>
  276. <script>
  277. import dropdownPanel from "@/pages_manage/components/dropdownPanel.vue"
  278. import {
  279. getFsCourseList,
  280. getCourseVdieoList,
  281. getmanagepopnum,
  282. getmanagecourse,
  283. getcourseList,
  284. updategroupinfo,
  285. getGroupDetail
  286. } from "@/api/manageCompany.js"
  287. export default {
  288. components: {
  289. dropdownPanel
  290. },
  291. data() {
  292. return {
  293. viewload:true,
  294. loadingtext:"数据加载中...",
  295. changeremark: '',
  296. changephone: '',
  297. list1: [{
  298. name: '课程分析'
  299. }, {
  300. name: '销售数据'
  301. }],
  302. filterData: [{
  303. name: '训练营-营期',
  304. value: 0,
  305. },
  306. {
  307. name: '课程',
  308. value: 1,
  309. },
  310. ],
  311. searchbarNav: 0,
  312. showCont: 0,
  313. collapseValue: ['course', 'questions', 'redenvelope', 'live', 'funnel'], //
  314. showmore: false,
  315. morelist: [{
  316. name: '复制ID',
  317. value: 0,
  318. text: ''
  319. },
  320. {
  321. name: '改姓名',
  322. value: 1,
  323. text: '请输入姓名'
  324. },
  325. {
  326. name: '改手机号码',
  327. value: 2,
  328. text: '请输入手机号码'
  329. },
  330. {
  331. name: '改备注',
  332. value: 3,
  333. text: '请输入备注'
  334. }
  335. ],
  336. showlist: false,
  337. titlelist: '',
  338. contpl: '',
  339. changelist: '',
  340. groupid: 0,
  341. courseid: '',
  342. courseids: '',
  343. courseOne: [],
  344. courseTwo: [],
  345. triggereds: false,
  346. statusA: 'loadmore',
  347. isEnableds: true,
  348. pageNums: 1,
  349. pageSizes: 5,
  350. redprice: '',
  351. companyUserCount: [],
  352. redbaglist: [],
  353. courseCount: [],
  354. answerlist: [],
  355. courselist: [],
  356. triggered: false,
  357. status: 'loadmore',
  358. isEnabled: true,
  359. pageNum: 1,
  360. pageSize: 3,
  361. grouplist: [],
  362. selnum: 0,
  363. keyword:'',
  364. triggeredC: false,
  365. statusC: 'loadmore',
  366. isEnabledC: true,
  367. pageNumC: 1,
  368. pageSizeC: 10,
  369. keywordC:'',
  370. }
  371. },
  372. onLoad(option) {
  373. this.groupid = option.id
  374. },
  375. computed: {
  376. imgPath() {
  377. return this.$store.state.imgpath
  378. }
  379. },
  380. mounted() {
  381. this.user = uni.getStorageSync("companyUserInfo") ? JSON.parse(uni.getStorageSync("companyUserInfo")) : {}
  382. this.grouplist = uni.getStorageSync("grouplist")
  383. this.getvipcount()
  384. this.getcout()
  385. this.getcoursegroup()
  386. this.getgroupdetail()
  387. },
  388. methods: {
  389. getcompanyTagC(value){
  390. this.keywordC=value
  391. this.getCourseList()
  392. },
  393. pullDownRefreshC() {
  394. // 下拉
  395. this.triggeredC = true; //下拉了状态为true
  396. setTimeout(() => {
  397. this.triggeredC = false;
  398. uni.stopPullDownRefresh()
  399. this.pageNumC = 1;
  400. this.getCourseList('refresh') //触底 不穿执行else
  401. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  402. // 请求接口
  403. }, 1000)
  404. },
  405. reachBottomC() {
  406. // status这个是加载状态
  407. if (this.statusC === 'loadmore') {
  408. this.statusC = 'loading'
  409. uni.showNavigationBarLoading()
  410. setTimeout(() => {
  411. this.pageNumC++
  412. this.getCourseList() //触底 不穿执行else
  413. uni.hideNavigationBarLoading()
  414. }, 1000);
  415. }
  416. },
  417. getcompanyTag(value){
  418. this.keyword=value
  419. this.getCourseListsmall()
  420. },
  421. copyId() {
  422. uni.setClipboardData({
  423. data: String(this.grouplist.nickName),
  424. success: () => {
  425. uni.showToast({
  426. title: '用户昵称复制成功',
  427. icon: 'none',
  428. duration: 2000
  429. });
  430. this.showmore = false
  431. },
  432. })
  433. },
  434. copyCourseId(id) {
  435. console.log(id)
  436. uni.setClipboardData({
  437. data: String(id),
  438. success: () => {
  439. uni.showToast({
  440. title: '课程标题复制成功',
  441. icon: 'none',
  442. duration: 2000
  443. });
  444. },
  445. })
  446. },
  447. getgroupdetail() {
  448. const param = {
  449. companyUserId : this.groupid
  450. }
  451. getGroupDetail(param).then(res => {
  452. this.grouplist = res.data
  453. })
  454. },
  455. updatagroup() {
  456. console.log(Number(this.groupid))
  457. const param = {
  458. nickName: this.changelist,
  459. phoneNumber: this.changephone,
  460. remark: this.changeremark,
  461. userId: this.groupid
  462. }
  463. updategroupinfo(param).then(res => {
  464. if (res.code == 200) {
  465. uni.showToast({
  466. icon: 'none',
  467. title: "修改成功"
  468. })
  469. } else {
  470. uni.showToast({
  471. icon: 'none',
  472. title: res.msg
  473. })
  474. }
  475. })
  476. },
  477. pullDownRefresh() {
  478. // 下拉
  479. this.triggered = true; //下拉了状态为true
  480. setTimeout(() => {
  481. this.triggered = false;
  482. uni.stopPullDownRefresh()
  483. this.pageNum = 1;
  484. this.getcoursegroup('refresh') //触底 不穿执行else
  485. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  486. // 请求接口
  487. }, 1000)
  488. },
  489. reachBottom() {
  490. // status这个是加载状态
  491. if (this.status === 'loadmore') {
  492. this.status = 'loading'
  493. uni.showNavigationBarLoading()
  494. setTimeout(() => {
  495. this.pageNum++
  496. this.getcoursegroup() //触底 不穿执行else
  497. uni.hideNavigationBarLoading()
  498. }, 1000);
  499. }
  500. },
  501. getcoursegroup(type) {
  502. const param = {
  503. companyUserId: this.groupid,
  504. periodId: this.courseid,
  505. videoId: this.courseids,
  506. pageNum: this.pageNum,
  507. pageSize: this.pageSize,
  508. }
  509. getcourseList(param).then(res => {
  510. console.log(res)
  511. if (res.code == 200) {
  512. // refresh 下拉
  513. this.viewload=false
  514. if (type == 'refresh') {
  515. this.courselist = res.data.list
  516. } else {
  517. // 加载更多 当前页和下一页合并
  518. this.courselist = [...this.courselist, ...res.data.list]
  519. }
  520. if (this.pageNum >= res.data.pages) {
  521. this.status = 'nomore'
  522. } else {
  523. this.status = 'loadmore'
  524. }
  525. } else {
  526. uni.showToast({
  527. icon: 'none',
  528. title: res.msg
  529. })
  530. }
  531. })
  532. },
  533. getcout() {
  534. const param = {
  535. companyUserId: this.groupid,
  536. periodId: this.courseid,
  537. videoId: this.courseids,
  538. }
  539. this.getCourselist(param)
  540. },
  541. getCourselist(param) {
  542. getmanagecourse(param).then(res => {
  543. if (res.code == 200) {
  544. this.courseCount = res.data
  545. } else {
  546. uni.showToast({
  547. icon: 'none',
  548. title: res.msg,
  549. });
  550. }
  551. })
  552. },
  553. getvipcount() {
  554. //获取会员总数
  555. const param = {
  556. companyUserId: this.groupid,
  557. }
  558. getmanagepopnum(param).then(res => {
  559. if (res.code == 200) {
  560. this.companyUserCount=res.data
  561. } else {
  562. uni.showToast({
  563. icon: 'none',
  564. title: res.msg,
  565. });
  566. }
  567. })
  568. },
  569. pullDownRefreshs() {
  570. // 下拉
  571. this.triggereds = true; //下拉了状态为true
  572. setTimeout(() => {
  573. this.triggereds = false;
  574. uni.stopPullDownRefresh()
  575. this.pageNums = 1;
  576. this.getCourseListsmall('refresh') //触底 不穿执行else
  577. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  578. // 请求接口
  579. }, 1000)
  580. },
  581. reachBottoms() {
  582. // status这个是加载状态
  583. if (this.statusA === 'loadmore') {
  584. this.statusA = 'loading'
  585. uni.showNavigationBarLoading()
  586. setTimeout(() => {
  587. this.pageNums++
  588. this.getCourseListsmall() //触底 不穿执行else
  589. uni.hideNavigationBarLoading()
  590. }, 1000);
  591. }
  592. },
  593. getCourseOne(id) {
  594. this.courseid = id
  595. },
  596. getCourseTwo(id) {
  597. this.courseids = id
  598. },
  599. getCourseList(type) {
  600. this.courseOne=[]
  601. //获取课程列表
  602. const param = {
  603. keyword:this.keywordC,
  604. pageNum: this.pageNumC,
  605. pageSize: this.pageSizeC,
  606. }
  607. getFsCourseList(param).then(res => {
  608. if (res.code == 200) {
  609. // this.courseOne = res.data.list
  610. // console.log(res)
  611. if (type == 'refresh') {
  612. this.courseOne = res.data.list
  613. } else {
  614. // 加载更多 当前页和下一页合并
  615. this.courseOne = [...this.courseOne, ...res.data.list]
  616. }
  617. if (res.data.isLastPage) {
  618. this.statusC = 'nomore'
  619. } else {
  620. this.statusC = 'loadmore'
  621. }
  622. } else {
  623. uni.showToast({
  624. icon: 'none',
  625. title: res.msg
  626. })
  627. }
  628. })
  629. },
  630. getCourseListsmall(type) {
  631. //获取小节目录
  632. const param = {
  633. periodId: this.courseid,
  634. pageNum: this.pageNums,
  635. pageSize: this.pageSizes,
  636. keyword:this.keyword
  637. }
  638. getCourseVdieoList(param).then(res => {
  639. if (res.code == 200) {
  640. // refresh 下拉
  641. if (type == 'refresh') {
  642. this.courseTwo = res.data.list
  643. } else {
  644. // 加载更多 当前页和下一页合并
  645. this.courseTwo = [...this.courseTwo, ...res.data.list]
  646. }
  647. if (this.pageNums >= res.data.pages) {
  648. this.statusA = 'nomore'
  649. } else {
  650. this.statusA = 'loadmore'
  651. }
  652. } else {
  653. }
  654. })
  655. },
  656. clickTab(e) {
  657. this.showCont = e.index
  658. this.$nextTick(() => {
  659. this.$refs?.collapseRef?.init()
  660. })
  661. this.courseid=''
  662. this.courseids=''
  663. this.keyword=''
  664. this.getvipcount()
  665. this.getcout()
  666. this.getcoursegroup()
  667. console.log(e.index)
  668. },
  669. onChange(index) {
  670. this.searchbarNav = index
  671. if (index == 0) {
  672. this.getCourseList()
  673. } else {
  674. if(this.courseid==''){
  675. uni.showToast({
  676. icon: 'none',
  677. title: '请选择训练营'
  678. })
  679. return
  680. }
  681. this.courseTwo=[]
  682. this.getCourseListsmall()
  683. }
  684. },
  685. confirm() {
  686. this.getcout()
  687. // this.getredbaglist()
  688. this.courselist = []
  689. this.getcoursegroup()
  690. },
  691. reset() {
  692. if (this.searchbarNav == 0) {
  693. this.courseid = ''
  694. this.getcout()
  695. // this.getredbaglist()
  696. this.courselist = []
  697. this.getcoursegroup()
  698. } else {
  699. this.courseids = ''
  700. this.getcout()
  701. // this.getredbaglist()
  702. this.courselist = []
  703. this.getcoursegroup()
  704. }
  705. },
  706. changeCollapse(e) {
  707. this.collapseValue = e.filter(item => item.status == 'open').map(it => it.name)
  708. console.log(e.filter(item => item.status == 'open').map(it => it.name))
  709. },
  710. closemore() {
  711. this.showmore = false
  712. },
  713. openmore() {
  714. },
  715. nameMore(item) {
  716. this.titlelist = item.name
  717. this.contpl = item.text
  718. this.selnum = item.value
  719. if (item.value == 0) {
  720. this.copyId()
  721. } else if (item.value == 1) {
  722. this.changelist = this.grouplist.nickName
  723. this.showlist = true
  724. } else if (item.value == 2) {
  725. console.log(this.grouplist.phonenumber)
  726. this.changephone = this.grouplist.phonenumber
  727. this.showlist = true
  728. } else {
  729. this.changeremark = this.grouplist.remark
  730. this.showlist = true
  731. }
  732. },
  733. confirmchange() {
  734. this.updatagroup()
  735. this.showlist = false
  736. setTimeout(() => {
  737. this.showmore = false
  738. this.getgroupdetail()
  739. }, 200)
  740. },
  741. changevipDetail() {
  742. uni.navigateTo({
  743. url: '/pages/courseManage/manage/changeVip?id=' + this.groupid
  744. })
  745. }
  746. }
  747. }
  748. </script>
  749. <style lang="scss">
  750. .header {
  751. background: linear-gradient(to right, rgba(218, 233, 255, 1), rgba(225, 225, 253, 1));
  752. }
  753. .doingimg {
  754. position: relative;
  755. }
  756. .doing {
  757. border-radius: 12rpx 0 12rpx 0;
  758. background-color: #3e9f59;
  759. color: #fff;
  760. width: fit-content;
  761. padding: 0 20rpx;
  762. font-size: 24rpx;
  763. position: absolute;
  764. top: 3rpx;
  765. }
  766. .box-blue {
  767. flex-wrap: wrap;
  768. padding: 20rpx;
  769. .boxs {
  770. width: 48%;
  771. border-radius: 20rpx;
  772. margin-top: 20rpx;
  773. padding: 20rpx 0;
  774. padding-left: 32rpx;
  775. font-size: 28rpx;
  776. }
  777. }
  778. .foot-box {
  779. position: fixed;
  780. bottom: 0;
  781. width: 100%;
  782. }
  783. .actNav {
  784. color: #1677ff !important;
  785. background-color: #e7f2fe;
  786. }
  787. </style>