index.vue 40 KB

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