index.vue 35 KB

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