index.vue 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627
  1. <template>
  2. <view class="index">
  3. <u-navbar class="navbar" :is-back="false" :border-bottom="false" title-color="#333333" back-icon-color="#ffffff">
  4. <view class="slot-wrap">
  5. <image src="/static/logo2.png"></image>
  6. </view>
  7. </u-navbar>
  8. <view class="swiper">
  9. <swiper :indicator-dots="false" indicator-color="#fff" indicator-active-color="#007AFF" :style="{'height':swiperHeight+'rpx'}" @change="swiperChange" :interval="interval" :duration="duration" :autoplay="autoplay" :circular="true">
  10. <swiper-item v-for="(swiper,index) in list" :key="index" @click="swiperClick(swiper)">
  11. <image @load="imageLoad" :src="$method.splitImgHost(swiper.adverUrl)" mode="widthFix"></image>
  12. </swiper-item>
  13. </swiper>
  14. <view class="dots">
  15. <view class="dot" :class="{'active':index == current}" v-for="(swiper,index) in list" :key="index"></view>
  16. </view>
  17. </view>
  18. <view class="content">
  19. <!-- <view class="notice" v-if="infoNums">
  20. <view class="notice__content">
  21. <image src="/static/icon/msg_icon1.png" class="icon"></image>
  22. <view class="text">
  23. 您有{{infoNums}}条新的通知
  24. </view>
  25. <view class="btn" @click="jumpPage">立即查看</view>
  26. </view>
  27. </view>
  28. <view class="my-list">
  29. <view class="my-list__item my-list__item--course" @click="go('course')">
  30. <image src="../../static/mycourse.png"></image>
  31. <text>我的网课</text>
  32. </view>
  33. <view class="my-list__item my-list__item--bank" @click="go('bank')">
  34. <image src="../../static/mybank.png"></image>
  35. <text>我的题库</text>
  36. </view>
  37. </view> -->
  38. <!-- 日历-->
  39. <!-- <view>
  40. <view class="calendar_card">
  41. <view class="card_box">
  42. <u-row gutter="16">
  43. <u-col span="10" >
  44. <view style="height:60rpx;">
  45. <text class="t1" v-if="nearByDay !== '' && nearByDay !== null">距离最近一次考试还剩{{nearByDay}}天</text>
  46. </view>
  47. </u-col>
  48. <u-col offset="1" span="1">
  49. <view @click="jumpPlan"><image src="/static/more.png" class="img_more"></image></view>
  50. </u-col>
  51. </u-row>
  52. </view>
  53. <u-line color="#EEEEEE" />
  54. <view style="width: 100%;display: flex;justify-content:center;margin-top: 20rpx;">
  55. <view v-for="(item, index) in date" :key="index" class="card_date">{{ item }}</view>
  56. </view>
  57. <view style="width: 100%; display: flex; margin-top: 40rpx; flex-wrap: wrap;">
  58. <view v-for="(item, index) in date_num" :key="index" class="date_num">
  59. <view class="items">
  60. {{ item.date }}
  61. </view>
  62. <view v-if="item.color == 0" class="date_num_color0" v-show="item.date > 0">
  63. {{ item.date }}
  64. <view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
  65. <view v-if="item.dot" class="date_dot"></view>
  66. </view>
  67. <view v-if="item.color == 1" class="date_num_color1">
  68. {{ item.date }}
  69. <view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
  70. <view v-if="item.dot" class="date_dot"></view>
  71. </view>
  72. <view v-if="item.color == 2" class="date_num_color2">
  73. {{ item.date }}
  74. <view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
  75. <view v-if="item.dot" class="date_dot"></view>
  76. </view>
  77. <view v-if="item.color == 3" class="date_num_color3">
  78. {{ item.date }}
  79. <view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
  80. <view v-if="item.dot" class="date_dot"></view>
  81. </view>
  82. </view>
  83. </view>
  84. <view style="width: 100%;margin-top: 20rpx;" v-if="workList.length > 0">
  85. <u-row gutter="16">
  86. <u-col span="2" text-align="center">
  87. <view><image src="/static/left.png" class="arr-icon" @click="preveItem"></image></view>
  88. </u-col>
  89. <u-col span="8" text-align="center">
  90. <view class="course_title" @click="jumpGoodsDetail(goodsItem)">{{ goodsItem.goodsName }}</view>
  91. </u-col>
  92. <u-col span="2" text-align="center">
  93. <view><image src="/static/right.png" class="arr-icon" @click="nextItem"></image></view>
  94. </u-col>
  95. </u-row>
  96. </view>
  97. </view>
  98. </view> -->
  99. <!-- <u-tabs class="tabs" :current="tabCurrent" @change="tab" :list="menu" :activeStyle="{fontSize:'36rpx'}" :inactiveStyle="{color:'#EAEEF1',fontSize:'30rpx'}" sticky></u-tabs> -->
  100. <view class="tabs">
  101. <view v-for="(item, index) in menu" :key="index" class="tab_item" :class="{nactive: tabNum == index}" @click="tab(index)">{{ item.name }}</view>
  102. </view>
  103. <view class="filters">
  104. <scroll-view class="scroll_view_H" scroll-x="true" >
  105. <template v-if="tabNum == 0 && courseName.length > 1">
  106. <view v-for="(item, index) in courseName" :key="index" class="filter_item" @click="changeCou(item.recommendId, index)">
  107. <view class="name" :class="{nactive: couIndex == index}">{{ item.name }}</view>
  108. </view>
  109. </template>
  110. <template v-if="tabNum == 1 && bankName.length > 1">
  111. <view v-for="(item, index) in bankName" :key="index" class="filter_item" @click="changebank(item.recommendId, index)">
  112. <view class="name" :class="{nactive: bankIndex == index}">{{ item.name }}</view>
  113. </view>
  114. </template>
  115. </scroll-view>
  116. </view>
  117. <!-- v-if="tabNum == 0" -->
  118. <!-- <view class="filters">
  119. <scroll-view class="scroll_view_H" scroll-x="true" >
  120. <template >
  121. <view v-for="(item, index) in subjectList" :key="index" class="filter_item" @click="changeSub(item.id, index)">
  122. <view class="name" :class="{nactive: subIndex == index}">{{ item.subjectName }}</view>
  123. </view>
  124. </template>
  125. </scroll-view>
  126. </view> -->
  127. <view class="course-list" v-show="tabCurrent==0">
  128. <template v-if="list1.length">
  129. <!-- hover-class="none" -->
  130. <view class="list_item" v-for="(item,index) in list1" :key="index" @click="tobuy(item)">
  131. <view class="course_content">
  132. <view class="c_title">{{item.goodsName}}</view>
  133. <view class="c_downs">
  134. <view class="img">
  135. <image :src="$method.splitImgHost(item.coverUrl, true)"></image>
  136. <view class="time" v-if="item.year">{{item.year?item.year:''}}</view>
  137. </view>
  138. <view class="text">
  139. <view class="desc">
  140. <view class="left">
  141. <text v-if="item.standPrice" class="mon_t">¥ {{toFixed(item.standPrice)}}</text>
  142. <text v-else class="mon_t free">免费</text>
  143. <!-- <text class="sale">/限时优惠</text> -->
  144. <text v-if="item.linePrice" class="sale"> ¥ </text>
  145. <text v-if="item.linePrice" class="price_line">&nbsp;{{ item.linePrice }}</text>
  146. </view>
  147. <view class="right">
  148. <view v-if="!hideBuyState" class="regiser_row">立即购买</view>
  149. </view>
  150. </view>
  151. <view v-if="item.buyUserNum" class="joins">
  152. <!-- <image class="people" src="/static/index/people.png"></image> -->
  153. <!-- 为0时,不显示 -->
  154. <view class="people">{{ item.buyUserNum }}人参与</view>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. </view>
  160. </template>
  161. <template v-else>
  162. <u-empty text="暂无推荐课程" mode="list" margin-top="100"></u-empty>
  163. </template>
  164. </view>
  165. <view class="course-list" v-show="tabCurrent==1">
  166. <template v-if="list2.length">
  167. <navigator hover-class="none" class="list_item" v-for="(item,index) in list2" :key="index" :url="'/pages2/bank/detail?id='+item.goodsId">
  168. <view class="course_content">
  169. <view class="c_title">{{item.goodsName}}</view>
  170. <view class="c_downs">
  171. <view class="img">
  172. <image :src="$method.splitImgHost(item.coverUrl, true)"></image>
  173. <view class="time" v-if="item.year">{{item.year?item.year:''}}</view>
  174. </view>
  175. <view class="text">
  176. <view class="desc">
  177. <view class="left">
  178. <text v-if="item.standPrice" class="mon_t">¥ {{toFixed(item.standPrice)}}</text>
  179. <text v-else class="mon_t free">免费</text>
  180. <!-- <text class="sale">/限时优惠</text> -->
  181. <text v-if="item.linePrice" class="sale"> ¥ </text>
  182. <text v-if="item.linePrice" class="price_line">&nbsp;{{ item.linePrice }}</text>
  183. </view>
  184. <view class="right">
  185. <view v-if="!hideBuyState" class="regiser_row">立即购买</view>
  186. </view>
  187. </view>
  188. <view v-if="item.buyUserNum" class="joins">
  189. <!-- 为0时,不显示 -->
  190. <view class="people">{{ item.buyUserNum }}人参与</view>
  191. </view>
  192. </view>
  193. </view>
  194. </view>
  195. </navigator>
  196. </template>
  197. <template v-else>
  198. <u-empty text="暂无推荐题库" mode="list" margin-top="100"></u-empty>
  199. </template>
  200. </view>
  201. </view>
  202. <!-- #ifdef MP-WEIXIN -->
  203. <view :style="{'opacity':opacitys}" class="officials">
  204. <view class="weixin_official_account">
  205. <image class="off_logo" src="/static/index/official.png"></image>
  206. <view>
  207. <view class="one">关注 “祥粤学校” 公众号</view>
  208. <view class="two">学习提醒、 报考通知不会错过</view>
  209. </view>
  210. <button type="default" class="btn btn-official" >
  211. 去关注
  212. <official-account class="official-account" id="official_account"></official-account>
  213. </button>
  214. <view class="close_icon">
  215. <u-icon name="close" class="icon-close" @click="closeOff"></u-icon>
  216. </view>
  217. </view>
  218. </view>
  219. <!-- #endif -->
  220. </view>
  221. </template>
  222. <script>
  223. import { mapGetters, mapActions } from 'vuex';
  224. import { socket_url, version} from '@/common/request.js';
  225. export default {
  226. data() {
  227. return {
  228. tabNum: 0,
  229. infoNums:0,
  230. list:[],
  231. tabCurrent:0,
  232. date:['日','一','二','三','四','五','六'],
  233. date_num: [],
  234. current:0,
  235. indicatorDots: true,
  236. autoplay: true,
  237. interval: 2000,
  238. duration: 500,
  239. swiperHeight:0,
  240. nearByDay:'', //距离最近一天考试
  241. menu: [{
  242. name: '推荐课程',
  243. }, {
  244. name: '推荐题库',
  245. }],
  246. goodsIndex: 0,
  247. goodsItem: 0,
  248. workList: [],
  249. workTextList: [],
  250. planGoodsList: [],
  251. paramList: [
  252. {
  253. pageNum: 1,
  254. pageSize: 10,
  255. total: 0,
  256. // showStatus: 0,
  257. getUserNum: 1, //是否返回商品购买用户数量 1带 0不带 ,会返回个buyUserNum
  258. goodsType:1
  259. },
  260. {
  261. pageNum: 1,
  262. pageSize: 10,
  263. total: 0,
  264. // showStatus: 0,
  265. getUserNum: 1,
  266. goodsType:2
  267. }
  268. ],
  269. total1: 0,
  270. total2: 0,
  271. list1: [],
  272. list2: [],
  273. isLogin:false,
  274. isOld:false,
  275. current: 0,
  276. showOfficial: false,
  277. // opacity: 1,
  278. isFollow: null, //是否关注过,不是1就是没关注
  279. curClose: true, // 当天时是否关闭过
  280. courseName: [],
  281. bankName: [],
  282. couIndex: 0,
  283. bankIndex: 0,
  284. courseId: '',
  285. bankId: '',
  286. subjectList: [],
  287. subIndex: 0,
  288. courSubjectId: '',
  289. optObj: {},
  290. };
  291. },
  292. async onLoad(option) {
  293. console.log('onLoadonLoad');
  294. this.isLogin = this.$method.isLogin()
  295. this.dictObj
  296. this.getAdvertising();
  297. if(this.$method.isLogin()) {
  298. try {
  299. await this.getUserInfo()
  300. // websocket.sokcet(socket_url+this.userInfo.userId+'-'+this.$method.getRandomString(6))
  301. // websocket.sokcet(socket_url+this.userInfo.userAccount)
  302. }catch(err) {
  303. }
  304. } else {
  305. if(uni.getStorageSync('needToLogin')) {
  306. uni.removeStorageSync('needToLogin');
  307. uni.navigateTo({
  308. url:'/pages4/login/login'
  309. })
  310. }
  311. }
  312. this.init()
  313. wx.getSystemInfo({
  314. success: function (res) {
  315. let version = res.SDKVersion
  316. console.log('该版本号为: ', version)
  317. }
  318. })
  319. },
  320. async onShow() {
  321. // #ifdef H5
  322. if (location.search) {
  323. let arrs = location.search.slice(1).split("&")
  324. for (let i = 0; i < arrs.length; i++) {
  325. this.optObj[arrs[i].split('=')[0]] = arrs[i].split('=')[1]
  326. }
  327. console.log('optObj:', this.optObj);
  328. uni.setStorageSync('h5_code', this.optObj.code)
  329. this.OfficialLogin()
  330. } else {
  331. // 没有code,就重定向到地址https://www.xyyxt.net?ask_type=h.xyyxt.net 去获取code,授权后就会把code带上然后访问域名,这时候你就拿到code了
  332. if (!uni.getStorageSync('h5_code')) {
  333. console.log('跳转');
  334. location.replace(
  335. "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx6f48f721d18244eb" +
  336. "&redirect_uri=" +
  337. encodeURIComponent('https://www.xyyxt.net/?ask_type=h.xyyxt.net') +
  338. "&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
  339. )
  340. return
  341. }
  342. }
  343. // #endif
  344. this.getInfo() // 判断有没有关注公众号
  345. this.isClickOff() //关注公众号,每天最多显示1次;当天学员关闭弹窗后,无需再显示
  346. uni.removeStorageSync('goPath')
  347. // if (this.courseId || this.bankId) {
  348. // if (this.tabNum == 0) {
  349. // this.list1 = []
  350. // this.paramList[0].pageNum = 1
  351. // this.list1 = await this.getGoodsList(this.courseId, 0)
  352. // } else {
  353. // this.list2 = []
  354. // this.paramList[1].pageNum = 1
  355. // this.list2 = await this.getGoodsList(this.bankId, 1)
  356. // }
  357. // } else {
  358. this.list1 = []
  359. this.list2 = []
  360. this.paramList[0].pageNum = 1
  361. this.paramList[1].pageNum = 1
  362. this.courseLists()
  363. // }
  364. if (uni.getStorageSync('updateHome')){
  365. this.init()
  366. uni.removeStorageSync('updateHome'); //消费首页刷新事件
  367. }
  368. this.appCommonConfig({
  369. version
  370. });
  371. if(this.$method.isLogin()){
  372. this.$store.state.allowLoading = false;
  373. this.$api.getinfoAttached().then(res => {
  374. if(res.data.code ===200){
  375. this.infoNums = res.data.data.informSum
  376. const nums = res.data.data.informSum + res.data.data.orderSum + res.data.data.periodSum + res.data.data.planSum + res.data.data.subscribeSum;
  377. this.$store.commit('tabNum', nums);
  378. }
  379. })
  380. this.$store.state.allowLoading = true;
  381. }else{
  382. this.$store.commit('tabNum', 0);
  383. }
  384. },
  385. onShareAppMessage(res) {
  386. return {
  387. title: '中正',
  388. path: `/pages/index/index?inviteCode=` + userInfo == null ? '' : userInfo.userAccount
  389. };
  390. },
  391. async onPullDownRefresh() {
  392. // console.log('下拉this.courseId:', this.courseId)
  393. if (this.tabNum == 0) {
  394. this.list1 = []
  395. this.paramList[0].pageNum = 1
  396. this.list1 = await this.getGoodsList(this.courseId, 0, this.courSubjectId)
  397. } else {
  398. this.list2 = []
  399. this.paramList[1].pageNum = 1
  400. this.list2 = await this.getGoodsList(this.bankId, 1, this.courSubjectId)
  401. }
  402. },
  403. async onReachBottom() {
  404. // console.log('加载this.courseId:', this.courseId, this.list1.length, this.paramList[0].total)
  405. if (this.tabNum == 0) {
  406. if (this.list1.length < this.paramList[0].total) {
  407. this.paramList[0].pageNum++
  408. let list1 = await this.getGoodsList(this.courseId, 0, this.courSubjectId)
  409. this.list1.push(...list1)
  410. }
  411. } else {
  412. if (this.list2.length < this.paramList[1].total) {
  413. this.paramList[1].pageNum++
  414. let list2 = await this.getGoodsList(this.bankId, 1, this.courSubjectId)
  415. this.list1.push(...list2)
  416. }
  417. }
  418. },
  419. computed: {
  420. ...mapGetters(['dictObj','userInfo', 'hideBuyState']),
  421. opacitys() {
  422. const value = [1011,1017,1025,1047,1124].includes(this.$store.state.scene) && this.isLogin && (this.isFollow != 1) && this.curClose ? 1 : 0
  423. return value
  424. },
  425. },
  426. methods: {
  427. ...mapActions(['getUserInfo','appCommonConfig']),
  428. // 公众号登录
  429. OfficialLogin() {
  430. this.$http({
  431. url: '/gzh_login',
  432. method: 'post',
  433. data: {
  434. code: this.optObj.code
  435. },
  436. }).then((res) => {
  437. if (res.data.code == 200) {}
  438. })
  439. },
  440. tobuy(item) {
  441. if (item.goodsType == 2) {
  442. uni.navigateTo({
  443. url: '/pages2/bank/detail?id='+item.goodsId
  444. })
  445. } else {
  446. // 视频、直播 /pages5/liveDetail/index
  447. uni.navigateTo({
  448. url: '/pages3/course/detail?id='+item.goodsId + '&goodsType=' + item.goodsType
  449. })
  450. }
  451. },
  452. getInfo() {
  453. // /app/user/getInfo 登录用户信息 // fromPlat来源平台 1小程序 2PC网站
  454. this.$api.getInfo({ fromPlat: 1 }).then(res => {
  455. if(res.data.code == 200){
  456. this.$store.state.userInfo = res.data.data
  457. this.isFollow = res.data.data.userFollowWx // 不是1就是没关注
  458. }
  459. })
  460. },
  461. // 每天最多显示1次;当天学员关闭弹窗后,无需再显示
  462. isClickOff() {
  463. //当天23:59:59秒 转换成的毫秒数
  464. const end = new Date(new Date(new Date().toLocaleDateString()).getTime()+24*60*60*1000-1).getTime()
  465. const start = new Date().getTime() //当前时间的毫秒数
  466. if(uni.getStorageSync('endTime')){ //首先判断本地有没有存入当天23:59:59秒的毫秒数
  467. if(start > uni.getStorageSync('endTime')){ //当前时间毫秒数大于当天23:59:59秒
  468. this.curClose = true
  469. uni.removeStorageSync('curClose')
  470. uni.removeStorageSync('endTime')
  471. } else {
  472. this.curClose = uni.getStorageSync('curClose') ? false : true
  473. }
  474. }else{
  475. uni.setStorageSync("endTime", end) //存入当天晚上23:59:59秒的毫秒数
  476. }
  477. },
  478. closeOff() {
  479. this.curClose = false
  480. uni.setStorageSync("curClose", '1')
  481. },
  482. toFixed(number) {
  483. if(number > 0) {
  484. return number.toFixed(2)
  485. } else {
  486. return '0.00'
  487. }
  488. },
  489. /**
  490. * @param {Object} swiper
  491. * 点击轮播图
  492. */
  493. swiperClick(swiper) {
  494. if(swiper.jumpType == 1) { //无跳转
  495. return;
  496. } else if(swiper.jumpType == 2) { //url
  497. let url = encodeURIComponent(swiper.jumpUrl)
  498. uni.navigateTo({
  499. url:'/pages/webview/index?url='+swiper.jumpUrl
  500. })
  501. } else if(swiper.jumpType == 3) { //内部接口
  502. uni.navigateTo({
  503. url:swiper.jumpUrl
  504. })
  505. } else if(swiper.jumpType == 4) { //外部接口
  506. uni.navigateToMiniProgram({
  507. appId: swiper.remarks,
  508. path: swiper.jumpUrl,
  509. extraData: {
  510. },
  511. success(res) {
  512. // 打开成功
  513. },
  514. fail(err) {
  515. // console.log(err)
  516. }
  517. })
  518. }
  519. },
  520. /**
  521. * banner图片加载完成
  522. */
  523. imageLoad(e) {
  524. let winW = 750;
  525. let imgW = e.detail.width;
  526. let imgH = e.detail.height;
  527. this.swiperHeight = 750 * imgH / imgW;
  528. },
  529. async getAdvertising() {
  530. await this.advertisingHomeLocation();
  531. await this.getLocation()
  532. // await this.advertisingList();
  533. },
  534. getUserSubscribeRecentExam() {
  535. return new Promise(resolve => {
  536. this.$api.getUserSubscribeRecentExam().then(res => {
  537. if(res.data.code == 200) {
  538. if(res.data.data) {
  539. let day = this.$method.timestampToTime(res.data.data.applySiteExamTime,true).replace(/-/g,'/')
  540. let dayTime = day + ' ' + res.data.data.applySiteStartTime
  541. let NowTime = new Date(); //考试时间
  542. let examTime = new Date(dayTime); //考试时间
  543. let t = (examTime.getTime() / 1000) - (NowTime.getTime() / 1000).toFixed(0);
  544. if(t > 0) {
  545. let day = +this.$method.GetRTime(examTime.getTime() / 1000,true)
  546. this.nearByDay = day;
  547. }
  548. }
  549. resolve()
  550. }
  551. })
  552. })
  553. },
  554. advertisingHomeLocation() {
  555. return new Promise(resolve => {
  556. this.$api.advertisingHomeLocation().then(res => {
  557. this.interval = res.data.data.intervalTime * 1000
  558. resolve()
  559. })
  560. })
  561. },
  562. getLocation() {
  563. this.$api.advertisingLocation({
  564. platform: 1,
  565. status: 1,
  566. locationKey: 'home-banner'
  567. }).then((res) => {
  568. if (res.data.code == 200) {
  569. let locationId = res.data.data && res.data.data[0].locationId || 1
  570. console.log('locationId:', locationId);
  571. this.advertisingList(locationId)
  572. }
  573. })
  574. },
  575. advertisingList(locationId) {
  576. // return new Promise(resolve => {
  577. this.$api.advertisingList({locationId: locationId}).then(res => {
  578. this.list = res.data.rows;
  579. // resolve()
  580. })
  581. // })
  582. },
  583. jumpPage(){
  584. this.$navTo.togo('/pages4/msg/index')
  585. },
  586. go(type) {
  587. if (!this.$method.isLogin()) {
  588. if(type == 'course') {
  589. uni.setStorageSync('goPath','course')
  590. } else if(type == 'bank' ) {
  591. uni.setStorageSync('goPath','bank')
  592. }
  593. this.$navTo.togo('/pages4/login/login');
  594. } else {
  595. if(type == 'course') {
  596. uni.navigateTo({
  597. url:'/pages2/wd/class'
  598. })
  599. } else if(type == 'bank') {
  600. this.$api.lockLockStatus({
  601. action:'bank'
  602. }).then(res => {
  603. if(res.data.code == 200) { //有其他端在操作,不能学习
  604. uni.showToast({
  605. icon:'none',
  606. title:res.data.msg,
  607. duration:3000,
  608. })
  609. } else if(res.data.code == 500) { //可以学习
  610. uni.navigateTo({
  611. url:'/pages2/wd/question_bank'
  612. })
  613. }
  614. })
  615. }
  616. }
  617. },
  618. async changeCou(recommendId, index) {
  619. this.couIndex = index
  620. this.courseId = recommendId
  621. this.paramList[0].pageNum = 1
  622. this.list1 = []
  623. let list1 = await this.getGoodsList(recommendId, 0, this.courSubjectId)
  624. this.list1.push(...list1)
  625. },
  626. async changebank(recommendId, index) {
  627. this.bankIndex = index
  628. this.bankId = recommendId
  629. this.paramList[1].pageNum = 1
  630. this.list2 = []
  631. let list2 = await this.getGoodsList(recommendId, 1, this.courSubjectId)
  632. this.list2.push(...list2)
  633. },
  634. async changeSub(subjectId, index) {
  635. // console.log('subjectId, index:', subjectId, index, 'this.courseId:', this.courseId, 'this.bankId:', this.bankId)
  636. this.subIndex = index
  637. this.courSubjectId = subjectId
  638. this.paramList[this.tabNum].pageNum = 1
  639. if (this.tabNum == 0) {
  640. this.list1 = []
  641. let list1 = await this.getGoodsList(this.courseId, 0, subjectId)
  642. this.list1.push(...list1)
  643. } else {
  644. this.list2 = []
  645. let list2 = await this.getGoodsList(this.bankId, 1, subjectId)
  646. this.list2.push(...list2)
  647. }
  648. },
  649. //课程
  650. courseLists() {
  651. // var param = this.paramList[0];
  652. // /app/common/goods/list
  653. this.$http({
  654. url: '/app/common/activity/recommend/list',
  655. method: 'get',
  656. data: {
  657. platform: 1,
  658. status: 1
  659. },
  660. noToken: true
  661. }).then(async (res) => {
  662. if (res.data.code == 200) {
  663. let list = res.data.rows || []
  664. //课程
  665. this.courseName = list.filter(x => x.type == 1).sort((a,b) => a.sort - b.sort).map(x => {
  666. return {
  667. name: x.name,
  668. recommendId: x.recommendId
  669. }
  670. });
  671. // console.log('couIndex', this.couIndex, this.courseName)
  672. //题库
  673. this.bankName = list.filter(x => x.type == 2).sort((a,b) => a.sort - b.sort).map(x => {
  674. return {
  675. name: x.name,
  676. recommendId: x.recommendId
  677. }
  678. });
  679. if (this.courseName.length) {
  680. let courseId = ''
  681. if (this.courseId) {
  682. courseId = this.courseId
  683. } else {
  684. courseId = this.courseName[0].recommendId
  685. this.courseId = this.courseName[0].recommendId
  686. }
  687. // console.log('courseId:', courseId)
  688. this.getSubjectList(courseId)
  689. let list1 = await this.getGoodsList(courseId, 0, '')
  690. this.list1.push(...list1)
  691. }
  692. if (this.bankName.length) {
  693. let bankId = ''
  694. if (this.bankId) {
  695. bankId = this.bankId
  696. } else {
  697. bankId = this.bankName[0].recommendId
  698. this.bankId = this.bankName[0].recommendId
  699. }
  700. let list2 = await this.getGoodsList(bankId, 1, '')
  701. this.list2.push(...list2)
  702. }
  703. }
  704. });
  705. },
  706. getGoodsList(recommendId, num, subjectId) {
  707. return new Promise((resolve, reject) => {
  708. let params = {
  709. pageNum: this.paramList[num].pageNum,
  710. pageSize: this.paramList[num].pageSize,
  711. recommendId: recommendId
  712. }
  713. subjectId && (params.subjectId = subjectId)
  714. // console.log('params:', params)
  715. this.$http({
  716. url: `/app/common/activity/recommend/goodsList`,
  717. method: 'get',
  718. data: params,
  719. noToken: true
  720. }).then((res) => {
  721. if (res.data.code == 200) {
  722. this.paramList[num].total = res.data.total
  723. resolve(res.data.rows)
  724. }
  725. })
  726. })
  727. },
  728. getSubjectList(recommendId) {
  729. this.$http({
  730. url: `/app/common/activity/recommend/subjectList`,
  731. method: 'get',
  732. data: {
  733. recommendId: recommendId
  734. },
  735. noToken: true
  736. }).then((res) => {
  737. if (res.data.code == 200) {
  738. let data = res.data.data || []
  739. this.subjectList = [{ id: '', subjectName: '全部'}, ...data]
  740. // console.log('this.subjectList:', this.subjectList)
  741. }
  742. })
  743. },
  744. /**
  745. * @param {Object} item
  746. * 跳转课程详情
  747. */
  748. async jumpGoodsDetail(item){
  749. uni.navigateTo({
  750. url:'/pages2/wd/class'
  751. })
  752. },
  753. /**
  754. * @param {Object} goodsId 商品id
  755. * 查询商品重修状态
  756. */
  757. courseGoodsRebuildStatus(goodsId,gradeId) {
  758. return new Promise(resolve => {
  759. this.$api.courseGoodsRebuildStatus({
  760. goodsId:goodsId,
  761. gradeId:gradeId
  762. }).then(res => {
  763. resolve(res.data.data)
  764. })
  765. })
  766. },
  767. preveItem() {
  768. if (this.goodsIndex > 0) {
  769. this.goodsIndex = this.goodsIndex - 1;
  770. this.planGoodsList =this.workList[this.goodsIndex].goodsVos
  771. this.goodsItem = this.planGoodsList[0];
  772. this.dealRL(this.workList[this.goodsIndex].calendarStudyVo)
  773. }
  774. },
  775. nextItem() {
  776. if (this.goodsIndex < this.workList.length - 1) {
  777. this.goodsIndex = this.goodsIndex + 1;
  778. this.planGoodsList =this.workList[this.goodsIndex].goodsVos
  779. this.goodsItem = this.planGoodsList[0];
  780. this.dealRL(this.workList[this.goodsIndex].calendarStudyVo)
  781. }
  782. },
  783. jumpPlan() {
  784. if (!this.$method.isLogin()) {
  785. this.$navTo.togo('/pages4/login/login');
  786. } else {
  787. this.$navTo.togo('/pages2/plan/index', {});
  788. }
  789. },
  790. async init() {
  791. if (!this.$method.isLogin()) {
  792. //未登录
  793. this.date_num = [];
  794. this.workList = [];
  795. this.planGoodsList = [];
  796. this.initDay();
  797. } else {
  798. this.date_num = [];
  799. this.workList = [];
  800. this.planGoodsList = [];
  801. await this.userPlanSeven();
  802. await this.getUserSubscribeRecentExam();
  803. }
  804. },
  805. getMonDate() {
  806. var d = new Date(),
  807. day = d.getDay(),
  808. date = d.getDate();
  809. if (day == 0) return d;
  810. else d.setDate(date - day);
  811. return d;
  812. },
  813. initDay() {
  814. // d是当前星期一的日期对象
  815. var d = this.getMonDate();
  816. var arr = [];
  817. let date = new Date();
  818. let num = date.getDate();
  819. this.date_num = []
  820. for (var i = 0; i < 7; i++) {
  821. let item = { date: d.getDate() };
  822. item.color = 0;
  823. if (d.getDate() == num) {
  824. item.color = 3;
  825. }
  826. this.date_num.push(item);
  827. d.setDate(d.getDate() + 1);
  828. }
  829. },
  830. dealRL(calendarStudyVo){
  831. let self = this
  832. self.date_num = []
  833. let date = new Date();
  834. let num = date.getDate();
  835. let month = date.getMonth() + 1;
  836. let list = [];
  837. for (let j = 0; j < calendarStudyVo.length; j++) {
  838. let item = calendarStudyVo[j];
  839. list = item.dayStudyList;
  840. for (let i = 0; i < list.length; i++) {
  841. let item = list[i];
  842. item.color = 0;
  843. if (item.date == num) {
  844. item.color = 3;
  845. }
  846. if (item.perform == 1) {
  847. item.color = 1;
  848. }
  849. if (item.perform == 2) {
  850. item.color = 2;
  851. }
  852. item.note = item.studyCourseKnob;
  853. if (item.note > 0) {
  854. item.dot = true;
  855. }
  856. self.date_num.push(item);
  857. }
  858. }
  859. },
  860. userPlanSeven() {
  861. return new Promise(resolve => {
  862. let self = this;
  863. this.$api.userPlanSeven().then(result => {
  864. if (result.data.data && result.data.data.length>0) {
  865. self.workList = result.data.data
  866. self.planGoodsList = self.workList[0].goodsVos;
  867. if (self.planGoodsList != null && self.planGoodsList.length > 0) {
  868. self.goodsItem = self.planGoodsList[0];
  869. }
  870. self.dealRL(result.data.data[0].calendarStudyVo)
  871. } else {
  872. self.initDay();
  873. }
  874. resolve()
  875. });
  876. })
  877. },
  878. swiperChange(e) {
  879. this.current = e.detail.current;
  880. },
  881. tab(e) {
  882. this.tabCurrent = e;
  883. this.tabNum = e
  884. this.paramList[this.tabNum].pageNum = 1
  885. if (e == 0) {
  886. this.list1 = []
  887. } else {
  888. this.list2 = []
  889. }
  890. this.courseLists()
  891. // let recommendId = e == 0 ? this.courseId : this.bankId
  892. // this.getSubjectList(recommendId)
  893. },
  894. updateHomePlan() {
  895. this.$refs.home.init();
  896. },
  897. beforeSwitch(index) {
  898. let that = this;
  899. if (index == 1) {
  900. this.isClick1 = true;
  901. }
  902. if (index == this.current) {
  903. return false;
  904. }
  905. if (!this.$method.isLogin()) {
  906. if (index == 0 || index == 1) {
  907. return true;
  908. } else {
  909. this.$navTo.togo('/pages4/login/login');
  910. return false;
  911. }
  912. } else {
  913. if (index == 2) {
  914. this.$refs.refMy.init();
  915. }
  916. return true;
  917. }
  918. }
  919. },
  920. };
  921. </script>
  922. <style>
  923. page {
  924. background: #eaeef1;
  925. }
  926. </style>
  927. <style lang="scss" scoped>
  928. @mixin threeDot {
  929. overflow: hidden;
  930. text-overflow:ellipsis;
  931. white-space: nowrap;
  932. }
  933. .index {
  934. .navbar {
  935. /deep/ .u-navbar-inner {
  936. margin-right:0!important;
  937. }
  938. .slot-wrap {
  939. width:100%;
  940. display: flex;
  941. align-items: center;
  942. justify-content: center;
  943. image {
  944. width: 178rpx;
  945. height: 31rpx;
  946. }
  947. }
  948. }
  949. .swiper {
  950. width:100%;
  951. position: relative;
  952. .dots {
  953. position:absolute;
  954. left:0;
  955. bottom:8rpx;
  956. width:100%;
  957. display: flex;
  958. justify-content: center;
  959. .dot {
  960. width: 8rpx;
  961. height: 8rpx;
  962. background: #FFFFFF;
  963. border-radius: 50%;
  964. margin:0 4rpx;
  965. transition: all 0.3s;
  966. &.active {
  967. width: 24rpx;
  968. height: 8rpx;
  969. background: #007AFF;
  970. border-radius: 4rpx;
  971. }
  972. }
  973. }
  974. image {
  975. width:100%;
  976. }
  977. }
  978. .content {
  979. overflow: hidden;
  980. padding:0 16rpx;
  981. background: rgba(234, 238, 241, 1);
  982. padding-bottom: 100rpx;
  983. .notice {
  984. background:#fff;
  985. border-radius: 16rpx;
  986. margin-top:32rpx;
  987. overflow: hidden;
  988. &__content {
  989. padding:0 8rpx;
  990. height: 56rpx;
  991. background: linear-gradient(-90deg, rgba(255, 209, 0, 0.3), rgba(255, 255, 255, 0.3));
  992. display: flex;
  993. align-items: center;
  994. }
  995. .icon {
  996. width: 40rpx;
  997. height: 40rpx;
  998. margin-right: 8rpx;
  999. }
  1000. .text {
  1001. flex:1;
  1002. font-size: 24rpx;
  1003. color: #333333;
  1004. position: relative;
  1005. }
  1006. .btn {
  1007. font-size: 24rpx;
  1008. color: #007AFF;
  1009. }
  1010. }
  1011. .date-list {
  1012. margin-top:16rpx;
  1013. width: 718rpx;
  1014. height: 330rpx;
  1015. background: #FFFFFF;
  1016. border-radius: 16rpx;
  1017. padding:18rpx 27rpx;
  1018. .title {
  1019. font-size: 30rpx;
  1020. font-weight: bold;
  1021. color: #007AFF;
  1022. }
  1023. .list {
  1024. margin-top:40rpx;
  1025. display: flex;
  1026. justify-content: space-around;
  1027. .item {
  1028. .top {
  1029. text-align: center;
  1030. font-size: 26rpx;
  1031. color: rgba(102, 102, 102, 0.6);
  1032. }
  1033. .bottom {
  1034. text-align: center;
  1035. line-height: 48rpx;
  1036. margin-top:30rpx;
  1037. width: 48rpx;
  1038. height: 48rpx;
  1039. border-radius: 50%;
  1040. color:rgba(51, 51, 51, 1);
  1041. font-size: 26rpx;
  1042. position:relative;
  1043. &.red {
  1044. color:#FF3B30;
  1045. }
  1046. &.green {
  1047. color:#36C75A;
  1048. }
  1049. &.blue {
  1050. background: #007AFF;
  1051. color:#fff;
  1052. }
  1053. .note {
  1054. width: 30rpx;
  1055. height: 30rpx;
  1056. border: 2rpx solid #FF9500;
  1057. border-radius: 50%;
  1058. position:absolute;
  1059. top:-20rpx;
  1060. right:-20rpx;
  1061. line-height: 28rpx;
  1062. text-align: center;
  1063. color:#FF9500;
  1064. font-size: 26rpx;
  1065. }
  1066. .point {
  1067. margin:0 auto;
  1068. width: 8rpx;
  1069. height: 8rpx;
  1070. background: #FF9500;
  1071. border-radius: 50%;
  1072. }
  1073. }
  1074. }
  1075. }
  1076. .btns {
  1077. margin-top:50rpx;
  1078. display: flex;
  1079. align-items: center;
  1080. justify-content: center;
  1081. .left,.right {
  1082. width: 40rpx;
  1083. height: 40rpx;
  1084. }
  1085. .center{
  1086. width: 440rpx;
  1087. height: 56rpx;
  1088. background: #FFFFFF;
  1089. box-shadow: 0px 0px 9rpx 1rpx rgba(47, 67, 121, 0.1);
  1090. border-radius: 28rpx;
  1091. color:rgba(255, 149, 0, 1);
  1092. line-height: 56rpx;
  1093. text-align: center;
  1094. font-size: 30rpx;
  1095. margin:0 30rpx;
  1096. }
  1097. }
  1098. }
  1099. .tabs {
  1100. width: 100%;
  1101. height: 78rpx;
  1102. display: flex;
  1103. align-items: center;
  1104. justify-content: space-between;
  1105. background-color: #F2F7FF;
  1106. border-radius: 38rpx;
  1107. margin: 34rpx 0rpx 24rpx 0rpx;
  1108. padding: 0rpx 5rpx;
  1109. .tab_item {
  1110. width: 345rpx;
  1111. height: 65rpx;
  1112. line-height: 65rpx;
  1113. font-size: 28rpx;
  1114. font-weight: bold;
  1115. border-radius: 32rpx;
  1116. text-align: center;
  1117. color: #333;
  1118. &.nactive {
  1119. color: #fff;
  1120. background-color: #3577E8;
  1121. }
  1122. }
  1123. }
  1124. .course-list {
  1125. box-shadow: 0px 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  1126. .list_item {
  1127. padding: 24rpx;
  1128. // height: 278rpx;
  1129. background: #FFFFFF;
  1130. box-shadow: 0rpx 0rpx 20rpx 1rpx rgba(1,99,235,0.1000);
  1131. border-radius: 24rpx;
  1132. background:#fff;
  1133. margin-bottom: 32rpx;
  1134. display: flex;
  1135. align-items: center;
  1136. .c_title {
  1137. font-size: 32rpx;
  1138. font-weight: bold;
  1139. margin-bottom: 24rpx;
  1140. font-weight: bold;
  1141. color: #222222;
  1142. }
  1143. .c_downs {
  1144. display: flex;
  1145. }
  1146. .img {
  1147. position:relative;
  1148. margin-right: 24rpx;
  1149. border-radius: 16rpx ;
  1150. overflow: hidden;
  1151. width: 204rpx;
  1152. height: 120rpx;
  1153. image {
  1154. width:100%;
  1155. height:100%;
  1156. }
  1157. .time {
  1158. position:absolute;
  1159. bottom:0;
  1160. right:0;
  1161. width: 80rpx;
  1162. height: 32rpx;
  1163. background: rgba(1, 25, 45, 0.4);
  1164. color:#fff;
  1165. text-align: center;
  1166. line-height: 32rpx;
  1167. font-size: 24rpx;
  1168. border-radius: 10rpx 0px 10rpx 0px;
  1169. }
  1170. }
  1171. .text {
  1172. width: 440rpx;
  1173. position: relative;
  1174. display: flex;
  1175. flex-direction: column;
  1176. justify-content: space-between;
  1177. height: 120rpx;
  1178. .joins {
  1179. .people {
  1180. width: 160rpx;
  1181. font-size: 20rpx;
  1182. color: #999999;
  1183. padding: 0rpx 8rpx;
  1184. text-align: center;
  1185. height: 36rpx;
  1186. line-height: 36rpx;
  1187. background: #F6F7FB;
  1188. border-radius: 4px;
  1189. }
  1190. }
  1191. .desc {
  1192. margin-top: 10rpx;
  1193. display: flex;
  1194. align-items: center;
  1195. justify-content: space-between;
  1196. width: 100%;
  1197. .left {
  1198. flex:1;
  1199. color:#333;
  1200. font-size: 26rpx;
  1201. .mon_t {
  1202. font-weight: bold;
  1203. color: #FC3F3F;
  1204. font-size: 36rpx;
  1205. }
  1206. .free {
  1207. font-size: 24rpx;
  1208. }
  1209. .sale {
  1210. color: #999999;
  1211. font-size: 24rpx;
  1212. margin-left: 8rpx;
  1213. }
  1214. .price_line {
  1215. color: #999999;
  1216. font-size: 24rpx;
  1217. text-decoration:line-through;
  1218. font-weight: 400;
  1219. }
  1220. }
  1221. .right {
  1222. font-size: 24rpx;
  1223. font-weight: bold;
  1224. .regiser_row {
  1225. width: 144rpx;
  1226. height: 52rpx;
  1227. line-height: 52rpx;
  1228. text-align: center;
  1229. border-radius: 16rpx;
  1230. background-color: #FC3F3F;
  1231. color: #fff;
  1232. font-weight: 500;
  1233. font-size: 26rpx;
  1234. }
  1235. }
  1236. }
  1237. }
  1238. }
  1239. }
  1240. .filters {
  1241. width: 100%;
  1242. padding: 0rpx 16rpx;
  1243. margin-bottom: 32rpx;
  1244. display: flex;
  1245. align-items: center;
  1246. .scroll_view_H {
  1247. width: 100%;
  1248. overflow: hidden;
  1249. white-space: nowrap;
  1250. }
  1251. .filter_item {
  1252. display: inline-block;
  1253. margin-right: 16rpx;
  1254. .name {
  1255. font-size: 24rpx;
  1256. color: #666666;
  1257. padding: 12rpx 16rpx;
  1258. height: 56rpx;
  1259. text-align: center;
  1260. background: #FFFFFF;
  1261. border-radius: 8rpx;
  1262. &.nactive {
  1263. color: #3F8DFD;
  1264. }
  1265. }
  1266. }
  1267. }
  1268. }
  1269. .my-list {
  1270. margin:32rpx 0;
  1271. display:flex;
  1272. justify-content: space-between;
  1273. &__item {
  1274. width:351rpx;
  1275. height:96rpx;
  1276. position:relative;
  1277. padding:25rpx 0 0 25rpx;
  1278. font-size: 32rpx;
  1279. &--bank {
  1280. text {
  1281. position: relative;
  1282. z-index: 2;
  1283. color:#00998A;
  1284. }
  1285. }
  1286. &--course {
  1287. text {
  1288. position: relative;
  1289. z-index: 2;
  1290. color:#0062D9;
  1291. }
  1292. }
  1293. image {
  1294. width:100%;
  1295. height:100%;
  1296. left:0;
  1297. top:0;
  1298. position:absolute;
  1299. z-index: 1;
  1300. }
  1301. }
  1302. }
  1303. }
  1304. .date_dot {
  1305. width: 6rpx;
  1306. height: 6rpx;
  1307. background: #ffcc00;
  1308. border-radius: 50%;
  1309. margin: 0 auto;
  1310. }
  1311. .date_note {
  1312. border-radius: 50%;
  1313. width: 29rpx;
  1314. height: 29rpx;
  1315. border: 1px solid #ffcc00;
  1316. font-size: 18rpx;
  1317. color: #ffcc00;
  1318. text-align: center;
  1319. display: inline-block;
  1320. position: absolute;
  1321. top: -19rpx;
  1322. right: 9rpx;
  1323. }
  1324. .circle_num {
  1325. border-radius: 50%;
  1326. width: 29rpx;
  1327. height: 29rpx;
  1328. border: 1px solid #ffcc00;
  1329. font-size: 18rpx;
  1330. color: #ffcc00;
  1331. text-align: center;
  1332. display: inline-block;
  1333. margin: 5rpx;
  1334. }
  1335. .date_num {
  1336. width: 14%;
  1337. text-align: center;
  1338. position: relative;
  1339. display: inline-block;
  1340. margin-top: 20rpx;
  1341. .items {
  1342. width: 100%;
  1343. }
  1344. }
  1345. .course_title {
  1346. color: #2f4379;
  1347. box-shadow: 0rpx 0rpx 9rpx 1rpx rgba(47, 67, 121, 0.1);
  1348. border-radius: 28rpx;
  1349. width: 100%;
  1350. height: 48rpx;
  1351. line-height: 48rpx;
  1352. overflow: hidden;
  1353. text-overflow:ellipsis;
  1354. white-space: nowrap;
  1355. }
  1356. .arr-icon {
  1357. width: 40rpx;
  1358. height: 40rpx;
  1359. }
  1360. .date_num_color0 {
  1361. color: #32467b;
  1362. }
  1363. .date_num_color1 {
  1364. color: #34c759;
  1365. }
  1366. .date_num_color2 {
  1367. color: #ff3b30;
  1368. }
  1369. .date_num_color3 {
  1370. color: #ffffff;
  1371. background-color: #ffcc00;
  1372. border-radius: 50%;
  1373. width: 40rpx;
  1374. height: 40rpx;
  1375. display: inline-block;
  1376. }
  1377. .card_date {
  1378. width: 14%;
  1379. text-align: center;
  1380. color: #7f8caf;
  1381. }
  1382. .calendar_card {
  1383. width: 100%;
  1384. background: #ffffff;
  1385. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(47, 67, 121, 0.1);
  1386. border-radius: 22rpx;
  1387. margin-top: 16rpx;
  1388. padding-bottom: 15rpx;
  1389. }
  1390. .calendar_card .card_box {
  1391. height: 60rpx;
  1392. line-height: 60rpx;
  1393. margin-left: 20rpx;
  1394. }
  1395. .calendar_card .t1 {
  1396. color: #007AFF;
  1397. font-size: 24rpx;
  1398. }
  1399. .img_more {
  1400. width: 26rpx;
  1401. height: 26rpx;
  1402. }
  1403. .flex-d {
  1404. display: flex;
  1405. flex-direction: column;
  1406. justify-content: space-between;
  1407. height: 100%;
  1408. }
  1409. .contentZ {
  1410. flex: 1;
  1411. overflow-y: auto;
  1412. padding-left: 35rpx;
  1413. display: flex;
  1414. justify-content: space-around;
  1415. }
  1416. .contentZ::-webkit-scrollbar {
  1417. display: none;
  1418. }
  1419. .fots {
  1420. height: 100rpx;
  1421. display: flex;
  1422. align-items: center;
  1423. justify-content: space-around;
  1424. border-top: 1rpx solid #eee;
  1425. }
  1426. .leftBtns {
  1427. font-size: 30rpx;
  1428. color: #32467b;
  1429. font-weight: 500;
  1430. }
  1431. .right_Btns {
  1432. font-size: 30rpx;
  1433. color: #fff;
  1434. background-color: #32467b;
  1435. border-radius: 24rpx;
  1436. height: 60rpx;
  1437. line-height: 60rpx;
  1438. text-align: center;
  1439. padding: 0rpx 23rpx;
  1440. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  1441. }
  1442. .lzs {
  1443. width: 31%;
  1444. margin: 0rpx 1%;
  1445. max-width: 31%;
  1446. }
  1447. .tylsz{
  1448. margin-top: 23rpx;
  1449. color: #666;
  1450. font-weight: 400;
  1451. font-size: 24rpx;
  1452. }
  1453. .tylsz:first-child{
  1454. text-align: center;
  1455. }
  1456. .activeStys{
  1457. font-weight: bold;
  1458. color: #32467B;
  1459. }
  1460. .officialsss {
  1461. position: fixed;
  1462. left: 0;
  1463. bottom: 100rpx;
  1464. width: 100%;
  1465. }
  1466. .officials {
  1467. width:100%;
  1468. height: 104rpx;
  1469. position:fixed;
  1470. bottom: 0;
  1471. left: 0;
  1472. z-index: 999;
  1473. display: flex;
  1474. align-items: center;
  1475. justify-content: center;
  1476. }
  1477. .weixin_official_account {
  1478. position: fixed;
  1479. bottom: 0;
  1480. left: 0;
  1481. display: flex;
  1482. align-items: center;
  1483. // justify-content: space-between;
  1484. width: 718rpx;
  1485. height: 104rpx;
  1486. padding: 0 32rpx;
  1487. margin-left: 16rpx;
  1488. background: #3A3F54;
  1489. border-radius: 16rpx;
  1490. .off_logo {
  1491. width: 48rpx;
  1492. height: 48rpx;
  1493. margin-right: 24rpx;
  1494. }
  1495. .one {
  1496. color: #fff;
  1497. font-size: 24rpx;
  1498. font-weight: 500;
  1499. }
  1500. .two {
  1501. color: #BCBEC7;
  1502. font-size: 20rpx;
  1503. }
  1504. .btn {
  1505. position: relative;
  1506. top: 0;
  1507. left: 35rpx;
  1508. width: 128rpx;
  1509. height: 56rpx;
  1510. line-height: 56rpx;
  1511. padding: 0;
  1512. background: linear-gradient(274deg, #408BF6 0%, #40B4F6 100%);
  1513. border-radius: 156rpx;
  1514. overflow: hidden;
  1515. text-align: center;
  1516. font-size: 24rpx;
  1517. color: #fff;
  1518. .official-account {
  1519. position: absolute;
  1520. z-index: 1000;
  1521. right: -9px;
  1522. top: -38px;
  1523. opacity: 0;
  1524. }
  1525. }
  1526. .close_icon {
  1527. width: 40rpx;
  1528. height: 40rpx;
  1529. background: #FFFFFF;
  1530. opacity: 0.2;
  1531. display: flex;
  1532. align-items: center;
  1533. position: absolute;
  1534. top: 0;
  1535. right: 0;
  1536. color: #fff;
  1537. border-radius: 0rpx 16rpx;
  1538. }
  1539. .icon-close {
  1540. display: flex;
  1541. align-items: center;
  1542. justify-content: center;
  1543. width: 50rpx;
  1544. height: 68rpx;
  1545. font-size: 22rpx;
  1546. color: #7B8284;
  1547. }
  1548. }
  1549. </style>