index.vue 36 KB

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