index.vue 36 KB

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