index.vue 39 KB

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