index.vue 40 KB

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