index.vue 39 KB

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