manageDetail.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  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.index"
  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.index"
  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. </view>
  273. </template>
  274. <script>
  275. import dropdownPanel from "@/components/dropdownPanel.vue"
  276. import {
  277. getFsCourseList,
  278. getCourseVdieoList,
  279. getmanagepopnum,
  280. getRecPacketCount,
  281. getmanagecourse,
  282. getcourseList,
  283. updategroupinfo,
  284. getGroupDetail
  285. } from "@/api/courseManage.js"
  286. export default {
  287. components: {
  288. dropdownPanel
  289. },
  290. data() {
  291. return {
  292. changeremark: '',
  293. changephone: '',
  294. list1: [{
  295. name: '课程分析'
  296. }, {
  297. name: '销售数据'
  298. }],
  299. filterData: [{
  300. name: '训练营-营期',
  301. value: 0,
  302. },
  303. {
  304. name: '课程',
  305. value: 1,
  306. },
  307. ],
  308. searchbarNav: 0,
  309. showCont: 0,
  310. collapseValue: ['course', 'questions', 'redenvelope', 'live', 'funnel'], //
  311. showmore: false,
  312. morelist: [{
  313. name: '复制ID',
  314. value: 0,
  315. text: ''
  316. },
  317. {
  318. name: '改姓名',
  319. value: 1,
  320. text: '请输入姓名'
  321. },
  322. {
  323. name: '改手机号码',
  324. value: 2,
  325. text: '请输入手机号码'
  326. },
  327. {
  328. name: '改备注',
  329. value: 3,
  330. text: '请输入备注'
  331. }
  332. ],
  333. showlist: false,
  334. titlelist: '',
  335. contpl: '',
  336. changelist: '',
  337. groupid: 0,
  338. courseid: '',
  339. courseids: '',
  340. courseOne: [],
  341. courseTwo: [],
  342. triggereds: false,
  343. statusA: 'loadmore',
  344. isEnableds: true,
  345. pageNums: 1,
  346. pageSizes: 5,
  347. redprice: '',
  348. companyUserCount: [],
  349. redbaglist: [],
  350. courseCount: [],
  351. answerlist: [],
  352. courselist: [],
  353. triggered: false,
  354. status: 'loadmore',
  355. isEnabled: true,
  356. pageNum: 1,
  357. pageSize: 3,
  358. grouplist: [],
  359. selnum: 0,
  360. keyword:'',
  361. triggeredC: false,
  362. statusC: 'loadmore',
  363. isEnabledC: true,
  364. pageNumC: 1,
  365. pageSizeC: 10,
  366. keywordC:'',
  367. }
  368. },
  369. onLoad(option) {
  370. this.groupid = option.id
  371. },
  372. computed: {
  373. imgPath() {
  374. return this.$store.state.imgpath
  375. }
  376. },
  377. mounted() {
  378. this.user = uni.getStorageSync("companyUserInfo") ? JSON.parse(uni.getStorageSync("companyUserInfo")) : {}
  379. this.grouplist = uni.getStorageSync("grouplist")
  380. this.getvipcount()
  381. this.getcout()
  382. this.getcoursegroup()
  383. this.getgroupdetail()
  384. },
  385. methods: {
  386. getcompanyTagC(value){
  387. this.keywordC=value
  388. this.getCourseList()
  389. },
  390. pullDownRefreshC() {
  391. // 下拉
  392. this.triggeredC = true; //下拉了状态为true
  393. setTimeout(() => {
  394. this.triggeredC = false;
  395. uni.stopPullDownRefresh()
  396. this.pageNumC = 1;
  397. this.getCourseList('refresh') //触底 不穿执行else
  398. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  399. // 请求接口
  400. }, 1000)
  401. },
  402. reachBottomC() {
  403. // status这个是加载状态
  404. if (this.statusC === 'loadmore') {
  405. this.statusC = 'loading'
  406. uni.showNavigationBarLoading()
  407. setTimeout(() => {
  408. this.pageNumC++
  409. this.getCourseList() //触底 不穿执行else
  410. uni.hideNavigationBarLoading()
  411. }, 1000);
  412. }
  413. },
  414. getcompanyTag(value){
  415. this.keyword=value
  416. this.getCourseListsmall()
  417. },
  418. copyId() {
  419. uni.setClipboardData({
  420. data: String(this.grouplist.nickName),
  421. success: () => {
  422. uni.showToast({
  423. title: '用户昵称复制成功',
  424. icon: 'none',
  425. duration: 2000
  426. });
  427. this.showmore = false
  428. },
  429. })
  430. },
  431. copyCourseId(id) {
  432. console.log(id)
  433. uni.setClipboardData({
  434. data: String(id),
  435. success: () => {
  436. uni.showToast({
  437. title: '课程标题复制成功',
  438. icon: 'none',
  439. duration: 2000
  440. });
  441. },
  442. })
  443. },
  444. getgroupdetail() {
  445. const param = {
  446. companyUserId : this.groupid
  447. }
  448. getGroupDetail(param).then(res => {
  449. this.grouplist = res.data
  450. })
  451. },
  452. updatagroup() {
  453. console.log(Number(this.groupid))
  454. const param = {
  455. nickName: this.changelist,
  456. phoneNumber: this.changephone,
  457. remark: this.changeremark,
  458. userId: this.groupid
  459. }
  460. updategroupinfo(param).then(res => {
  461. if (res.code == 200) {
  462. uni.showToast({
  463. icon: 'none',
  464. title: "修改成功"
  465. })
  466. } else {
  467. uni.showToast({
  468. icon: 'none',
  469. title: res.msg
  470. })
  471. }
  472. })
  473. },
  474. pullDownRefresh() {
  475. // 下拉
  476. this.triggered = true; //下拉了状态为true
  477. setTimeout(() => {
  478. this.triggered = false;
  479. uni.stopPullDownRefresh()
  480. this.pageNum = 1;
  481. this.getcoursegroup('refresh') //触底 不穿执行else
  482. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  483. // 请求接口
  484. }, 1000)
  485. },
  486. reachBottom() {
  487. // status这个是加载状态
  488. if (this.status === 'loadmore') {
  489. this.status = 'loading'
  490. uni.showNavigationBarLoading()
  491. setTimeout(() => {
  492. this.pageNum++
  493. this.getcoursegroup() //触底 不穿执行else
  494. uni.hideNavigationBarLoading()
  495. }, 1000);
  496. }
  497. },
  498. getcoursegroup(type) {
  499. const param = {
  500. companyUserId: this.groupid,
  501. courseId: this.courseid,
  502. videoId: this.courseids,
  503. pageNum: this.pageNum,
  504. pageSize: this.pageSize,
  505. }
  506. getcourseList(param).then(res => {
  507. console.log(res)
  508. if (res.code == 200) {
  509. // refresh 下拉
  510. if (type == 'refresh') {
  511. this.courselist = res.data.list
  512. } else {
  513. // 加载更多 当前页和下一页合并
  514. this.courselist = [...this.courselist, ...res.data.list]
  515. }
  516. if (this.pageNum >= res.data.pages) {
  517. this.status = 'nomore'
  518. } else {
  519. this.status = 'loadmore'
  520. }
  521. } else {
  522. uni.showToast({
  523. icon: 'none',
  524. title: res.msg
  525. })
  526. }
  527. })
  528. },
  529. getcout() {
  530. const param = {
  531. companyUserId: this.groupid,
  532. courseId: this.courseid,
  533. videoId: this.courseids,
  534. }
  535. this.getCourselist(param)
  536. },
  537. getCourselist(param) {
  538. getmanagecourse(param).then(res => {
  539. if (res.code == 200) {
  540. this.courseCount = res.data
  541. } else {
  542. uni.showToast({
  543. icon: 'none',
  544. title: res.msg,
  545. });
  546. }
  547. })
  548. },
  549. getvipcount() {
  550. //获取会员总数
  551. const param = {
  552. companyUserId: this.groupid,
  553. }
  554. getmanagepopnum(param).then(res => {
  555. if (res.code == 200) {
  556. this.companyUserCount=res.data
  557. } else {
  558. uni.showToast({
  559. icon: 'none',
  560. title: res.msg,
  561. });
  562. }
  563. })
  564. },
  565. pullDownRefreshs() {
  566. // 下拉
  567. this.triggereds = true; //下拉了状态为true
  568. setTimeout(() => {
  569. this.triggereds = false;
  570. uni.stopPullDownRefresh()
  571. this.pageNums = 1;
  572. this.getCourseListsmall('refresh') //触底 不穿执行else
  573. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  574. // 请求接口
  575. }, 1000)
  576. },
  577. reachBottoms() {
  578. // status这个是加载状态
  579. if (this.statusA === 'loadmore') {
  580. this.statusA = 'loading'
  581. uni.showNavigationBarLoading()
  582. setTimeout(() => {
  583. this.pageNums++
  584. this.getCourseListsmall() //触底 不穿执行else
  585. uni.hideNavigationBarLoading()
  586. }, 1000);
  587. }
  588. },
  589. getCourseOne(id) {
  590. this.courseid = id
  591. },
  592. getCourseTwo(id) {
  593. this.courseids = id
  594. },
  595. getCourseList(type) {
  596. this.courseOne=[]
  597. //获取课程列表
  598. const param = {
  599. keyword:this.keywordC,
  600. pageNum: this.pageNumC,
  601. pageSize: this.pageSizeC,
  602. }
  603. getFsCourseList(param).then(res => {
  604. if (res.code == 200) {
  605. // this.courseOne = res.data.list
  606. // console.log(res)
  607. if (type == 'refresh') {
  608. this.courseOne = res.data.list
  609. } else {
  610. // 加载更多 当前页和下一页合并
  611. this.courseOne = [...this.courseOne, ...res.data.list]
  612. }
  613. if (res.data.isLastPage) {
  614. this.statusC = 'nomore'
  615. } else {
  616. this.statusC = 'loadmore'
  617. }
  618. } else {
  619. uni.showToast({
  620. icon: 'none',
  621. title: res.msg
  622. })
  623. }
  624. })
  625. },
  626. getCourseListsmall(type) {
  627. //获取小节目录
  628. const param = {
  629. courseId: this.courseid,
  630. pageNum: this.pageNums,
  631. pageSize: this.pageSizes,
  632. keyword:this.keyword
  633. }
  634. getCourseVdieoList(param).then(res => {
  635. if (res.code == 200) {
  636. // refresh 下拉
  637. if (type == 'refresh') {
  638. this.courseTwo = res.data.list
  639. } else {
  640. // 加载更多 当前页和下一页合并
  641. this.courseTwo = [...this.courseTwo, ...res.data.list]
  642. }
  643. if (this.pageNums >= res.data.pages) {
  644. this.statusA = 'nomore'
  645. } else {
  646. this.statusA = 'loadmore'
  647. }
  648. } else {
  649. }
  650. })
  651. },
  652. clickTab(e) {
  653. this.showCont = e.index
  654. this.$nextTick(() => {
  655. this.$refs?.collapseRef?.init()
  656. })
  657. this.courseid=''
  658. this.courseids=''
  659. this.keyword=''
  660. this.getvipcount()
  661. this.getcout()
  662. this.getcoursegroup()
  663. console.log(e.index)
  664. },
  665. onChange(index) {
  666. this.searchbarNav = index
  667. if (index == 0) {
  668. this.getCourseList()
  669. } else {
  670. this.getCourseListsmall()
  671. }
  672. },
  673. confirm() {
  674. this.getcout()
  675. this.getredbaglist()
  676. this.courselist = []
  677. this.getcoursegroup()
  678. },
  679. reset() {
  680. if (this.searchbarNav == 0) {
  681. this.courseid = ''
  682. this.getcout()
  683. // this.getredbaglist()
  684. this.courselist = []
  685. this.getcoursegroup()
  686. } else {
  687. this.courseids = ''
  688. this.getcout()
  689. // this.getredbaglist()
  690. this.courselist = []
  691. this.getcoursegroup()
  692. }
  693. },
  694. changeCollapse(e) {
  695. this.collapseValue = e.filter(item => item.status == 'open').map(it => it.name)
  696. console.log(e.filter(item => item.status == 'open').map(it => it.name))
  697. },
  698. closemore() {
  699. this.showmore = false
  700. },
  701. openmore() {
  702. },
  703. nameMore(item) {
  704. this.titlelist = item.name
  705. this.contpl = item.text
  706. this.selnum = item.value
  707. if (item.value == 0) {
  708. this.copyId()
  709. } else if (item.value == 1) {
  710. this.changelist = this.grouplist.nickName
  711. this.showlist = true
  712. } else if (item.value == 2) {
  713. console.log(this.grouplist.phonenumber)
  714. this.changephone = this.grouplist.phonenumber
  715. this.showlist = true
  716. } else {
  717. this.changeremark = this.grouplist.remark
  718. this.showlist = true
  719. }
  720. },
  721. confirmchange() {
  722. this.updatagroup()
  723. this.showlist = false
  724. setTimeout(() => {
  725. this.showmore = false
  726. this.getgroupdetail()
  727. }, 200)
  728. },
  729. changevipDetail() {
  730. uni.navigateTo({
  731. url: '/pages/courseManage/manage/changeVip?id=' + this.groupid
  732. })
  733. }
  734. }
  735. }
  736. </script>
  737. <style lang="scss">
  738. .header {
  739. background: linear-gradient(to right, rgba(218, 233, 255, 1), rgba(225, 225, 253, 1));
  740. }
  741. .doingimg {
  742. position: relative;
  743. }
  744. .doing {
  745. border-radius: 12rpx 0 12rpx 0;
  746. background-color: #3e9f59;
  747. color: #fff;
  748. width: fit-content;
  749. padding: 0 20rpx;
  750. font-size: 24rpx;
  751. position: absolute;
  752. top: 3rpx;
  753. }
  754. .box-blue {
  755. flex-wrap: wrap;
  756. padding: 20rpx;
  757. .boxs {
  758. width: 48%;
  759. border-radius: 20rpx;
  760. margin-top: 20rpx;
  761. padding: 20rpx 0;
  762. padding-left: 32rpx;
  763. font-size: 28rpx;
  764. }
  765. }
  766. .foot-box {
  767. position: fixed;
  768. bottom: 0;
  769. width: 100%;
  770. }
  771. .actNav {
  772. color: #1677ff !important;
  773. background-color: #e7f2fe;
  774. }
  775. </style>