index.vue 40 KB

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