index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026
  1. <template>
  2. <view class="index">
  3. <nav-logo :isShowLogo="true"></nav-logo>
  4. <view class="header_box">
  5. <u-swiper :list="list" :autoplay="autoplay" :interval="interval" :duration="duration" :height="swiperHeight"
  6. img-mode="scaleToFill" @click="swiperClick"></u-swiper>
  7. <view class="getStudy" v-if="other.tagH5 == 1">
  8. <view class="left">
  9. <img src="@/static/modIcon/plan.png" alt="">
  10. <text>获取定制学习规划</text>
  11. </view>
  12. <view class="btn" @click="tabListFunc({type:2,url:'/pages5/counselor/index'})">
  13. 立即获取
  14. </view>
  15. </view>
  16. <view class="jumpList" v-if="other.entranceH5 == 1">
  17. <view class="list_li" v-for="(item,index) in jumpList" :key="index" @click="tabListFunc(item)">
  18. <img :src="item.imgName" alt="">
  19. <text>{{item.label}}</text>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="content" v-if="!hideBuyState && other.courseH5 == 1 && recommendCourse.length > 0">
  24. <view class="header_top">
  25. <text class="left">推荐课程</text>
  26. <u-tabs class="u-tabs" :list="recommendCourse" :current="currentCourse" bg-color="transparent"
  27. :show-bar="false" :height="50" @change="changeCurren($event,'currentCourse')"></u-tabs>
  28. <text class="right" @click="jumpPage(0)">更多></text>
  29. </view>
  30. <view class="noGoods" v-if="recommendCourse[currentCourse].goodsList.length == 0">
  31. <img src="https://file.xyyxt.net/web/static/img/no-content.png" alt="">
  32. <view class="">
  33. 暂无数据
  34. </view>
  35. </view>
  36. <view class="content_box" v-for="(item,index) in filterNum(recommendCourse[currentCourse].goodsList)"
  37. :key="index" @click="tobuy(item)">
  38. <view class="title">
  39. {{item.goodsName}}
  40. </view>
  41. <view class="f_x">
  42. <view class="img_goods">
  43. <img :src="$method.splitImgHost(item.coverUrl)" alt="">
  44. </view>
  45. <view class="content_goods">
  46. <view class="top_bus">
  47. <text>{{recommendCourse[currentCourse].educationName}}</text>
  48. <text>{{recommendCourse[currentCourse].aliasName}}</text>
  49. </view>
  50. <view class="price">
  51. <text class="price1" v-if="!item.specTemplateId ||
  52. (!item.maxPrice && !item.minPrice)"><text v-if="item.standPrice"
  53. style="font-size: 28rpx;font-weight: 400;">¥</text><text
  54. v-if="item.standPrice">{{item.standPrice | formatPrice}}</text><text
  55. v-else>免费</text></text>
  56. <text class="price1" v-else><text
  57. style="font-size: 28rpx;font-weight: 400;">¥</text>{{item.minPrice | formatPrice}}
  58. <template v-if="item.minPrice != item.maxPrice">
  59. <text>-</text>
  60. <text
  61. style="font-size: 28rpx;font-weight: 400;">¥</text>{{ item.maxPrice | formatPrice }}
  62. </template></text>
  63. <text class="price2" v-if="item.linePrice">原价:¥{{item.linePrice | formatPrice}}</text>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="content" v-if="!hideBuyState && other.bankH5 == 1 &&recommendBank.length > 0">
  70. <view class="header_top">
  71. <text class="left">推荐题库</text>
  72. <u-tabs class="u-tabs" :list="recommendBank" :current="currentBank" bg-color="transparent"
  73. :show-bar="false" :height="50" @change="changeCurren($event,'currentBank')"></u-tabs>
  74. <text class="right" @click="jumpPage(2)">更多></text>
  75. </view>
  76. <view class="noGoods" v-if="recommendBank[currentBank].goodsList.length == 0">
  77. <img src="https://file.xyyxt.net/web/static/img/no-content.png" alt="">
  78. <view class="">
  79. 暂无数据
  80. </view>
  81. </view>
  82. <view class="content_box" v-for="(item,index) in filterNum(recommendBank[currentBank].goodsList)"
  83. :key="index" @click="tobuy(item)">
  84. <view class="title">
  85. {{item.goodsName}}
  86. </view>
  87. <view class="f_x">
  88. <view class="img_goods">
  89. <img :src="$method.splitImgHost(item.coverUrl)" alt="">
  90. </view>
  91. <view class="content_goods">
  92. <view class="top_bus">
  93. <text>{{recommendBank[currentBank].educationName}}</text>
  94. <text>{{recommendBank[currentBank].aliasName}}</text>
  95. </view>
  96. <view class="price">
  97. <text class="price1" v-if="!item.specTemplateId ||
  98. (!item.maxPrice && !item.minPrice)"><text v-if="item.standPrice"
  99. style="font-size: 28rpx;font-weight: 400;">¥</text>{{item.standPrice || '免费'}}</text>
  100. <text class="price1" v-else><text
  101. style="font-size: 28rpx;font-weight: 400;">¥</text>{{item.minPrice}}
  102. <template v-if="item.minPrice != item.maxPrice">
  103. <text>-</text>
  104. <text style="font-size: 28rpx;font-weight: 400;">¥</text>{{ item.maxPrice }}
  105. </template></text>
  106. <text class="price2" v-if="item.linePrice">原价:¥{{item.linePrice}}</text>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. <view class="content" v-if="other.teamH5 == 1">
  113. <view class="header_top">
  114. <text class="left">师资团队</text>
  115. <text class="right">左右滑动</text>
  116. </view>
  117. <view class="content_box" style="padding: 30rpx 0rpx;">
  118. <swiper class="swiper" circular autoplay>
  119. <swiper-item v-for="(item,index) in teacher" :key="index">
  120. <view class="boxs_tec">
  121. <view class="header">
  122. <view class="imgs">
  123. <img :src="item.imgUrl" alt="">
  124. </view>
  125. <view class="right_s">
  126. <view class="h_name">
  127. {{item.name}}
  128. </view>
  129. <view class="c_">
  130. {{item.occupation}}
  131. </view>
  132. </view>
  133. </view>
  134. <view class="bodys">
  135. <view class="" v-for="(items,indexs) in item.remark">
  136. {{items}}
  137. </view>
  138. </view>
  139. </view>
  140. </swiper-item>
  141. </swiper>
  142. </view>
  143. </view>
  144. <view class="content" v-if="other.certificateH5 == 1">
  145. <view class="header_top">
  146. <text class="left">资质证书</text>
  147. <text class="right">左右滑动</text>
  148. </view>
  149. <view class="content_box">
  150. <swiper class="swiper_cer" circular autoplay>
  151. <swiper-item v-for="(item,index) in certificate" :key="index">
  152. <view class="boxs_cer">
  153. <image mode="aspectFit" :src="item.imgUrl" @click="openImg(index)"></image>
  154. </view>
  155. </swiper-item>
  156. </swiper>
  157. </view>
  158. </view>
  159. <!-- #ifdef MP-WEIXIN -->
  160. <view class="officials"
  161. v-if="$method.isLogin() && isFollow !== 1 && !curClose && tenantId == '867735392558919680'">
  162. <view class="weixin_official_account">
  163. <image class="off_logo" src="@/static/index/official.png"></image>
  164. <view>
  165. <view class="one">关注 “祥粤学校” 公众号</view>
  166. <view class="two">学习提醒、 报考通知不会错过</view>
  167. </view>
  168. <button type="default" class="btn btn-official">
  169. 去关注
  170. <official-account class="official-account" id="official_account"></official-account>
  171. </button>
  172. <view class="close_icon">
  173. <u-icon name="close" class="icon-close" @click="closeOff"></u-icon>
  174. </view>
  175. </view>
  176. </view>
  177. <!-- #endif -->
  178. <!-- tabbar -->
  179. <myTabbar :backTopBtn="backTopBtn"></myTabbar>
  180. </view>
  181. </template>
  182. <script>
  183. import {
  184. mapGetters,
  185. mapActions
  186. } from "vuex";
  187. export default {
  188. data() {
  189. return {
  190. backTopBtn: false,
  191. currentCourse: 0,
  192. currentBank: 0,
  193. certificate: [{
  194. imgUrl: "https://file.xyyxt.net/web/static/img/bxxkz-zb.jpg",
  195. },
  196. {
  197. imgUrl: "https://file.xyyxt.net/web/static/img/djz.jpg",
  198. },
  199. {
  200. imgUrl: "https://file.xyyxt.net/web/static/img/hjgltxrz.jpg",
  201. },
  202. {
  203. imgUrl: "https://file.xyyxt.net/web/static/img/zyhjaqgktxrz.jpg",
  204. width: "147px"
  205. },
  206. {
  207. imgUrl: "https://file.xyyxt.net/web/static/img/zlgltxrz.jpg",
  208. },
  209. {
  210. imgUrl: "https://file.xyyxt.net/web/static/img/zzqyzhjyxtrzzs.jpg",
  211. },
  212. {
  213. imgUrl: "https://file.xyyxt.net/web/static/img/facesbrzzs.jpg",
  214. },
  215. {
  216. imgUrl: "https://file.xyyxt.net/web/static/img/zzyxtptrzzs1.jpg",
  217. },
  218. {
  219. imgUrl: "https://file.xyyxt.net/web/static/img/zzyxtptrzzs2.jpg",
  220. },
  221. {
  222. imgUrl: "https://file.xyyxt.net/web/static/img/zzzhkcrzzs1.jpg",
  223. },
  224. {
  225. imgUrl: "https://file.xyyxt.net/web/static/img/zzzhkcrzzs3.jpg",
  226. },
  227. {
  228. imgUrl: "https://file.xyyxt.net/web/static/img/zzzhkcrzzs2.jpg",
  229. },
  230. {
  231. imgUrl: "https://file.xyyxt.net/web/static/img/zzzhkcrzzs3-3.jpg",
  232. },
  233. {
  234. imgUrl: "https://file.xyyxt.net/web/static/img/zzzhkcrzzs.jpg",
  235. },
  236. {
  237. imgUrl: "https://file.xyyxt.net/web/static/img/2018A1.jpg",
  238. },
  239. {
  240. imgUrl: "https://file.xyyxt.net/web/static/img/2018A2.jpg",
  241. },
  242. {
  243. imgUrl: "https://file.xyyxt.net/web/static/img/2018A3.jpg",
  244. },
  245. {
  246. imgUrl: "https://file.xyyxt.net/web/static/img/2018A4.jpg",
  247. },
  248. {
  249. imgUrl: "https://file.xyyxt.net/web/static/img/2018A5.jpg",
  250. },
  251. {
  252. imgUrl: "https://file.xyyxt.net/web/static/img/2018A6.jpg",
  253. },
  254. {
  255. imgUrl: "https://file.xyyxt.net/web/static/img/2018A7.jpg",
  256. },
  257. {
  258. imgUrl: "https://file.xyyxt.net/web/static/img/2018A8.jpg",
  259. },
  260. {
  261. imgUrl: "https://file.xyyxt.net/web/static/img/2019A1.jpg",
  262. },
  263. ],
  264. teacher: [{
  265. imgUrl: "https://file.xyyxt.net/web/static/img/ch.png",
  266. name: "陈红",
  267. occupation: "教授、高级工程师",
  268. remark: [
  269. "国务院安委会、咨询、建筑施工专业委员会专家",
  270. "中国模板手脚架协会副秘书长",
  271. "原中国建筑一局 (集团)有限公司工程技术部经理参编国家标准:",
  272. "《建筑施工脚手架安全技术统一标准》",
  273. "《建筑施工扣件式钢管脚手架安全技术规范》",
  274. "《建筑施工临时支撑技术规范》"
  275. ]
  276. },
  277. {
  278. imgUrl: "https://file.xyyxt.net/web/static/img/xfk.png",
  279. name: "徐福康",
  280. occupation: "教授、高级工程师",
  281. remark: [
  282. "上海市施工现场安全生产保证体系第一审核认证中心副主任、总工程师",
  283. "上海市建设工程安全质量监督总站高级工程师",
  284. "国家标准《建筑施工企业安全生产管理规范》主要起草人"
  285. ]
  286. },
  287. {
  288. imgUrl: "https://file.xyyxt.net/web/static/img/mym.png",
  289. name: "马英明",
  290. occupation: "教授、高级工程师",
  291. remark: [
  292. "中国矿业大学博士生导师",
  293. "国家住建部全国地铁与轻轨建设专家组专家",
  294. "广东省人民政府科技专家顾问委员会委员",
  295. "原中国地下工程学会副主任"
  296. ]
  297. },
  298. {
  299. imgUrl: "https://file.xyyxt.net/web/static/img/khc.png",
  300. name: "邝穗春",
  301. occupation: "工程师、高级讲师",
  302. remark: [
  303. "广州市建筑置业有限公司",
  304. "生产技术部/工程部/资料管理部副部长",
  305. "广州市市政集团培训中心高级讲师",
  306. "广州大学市政技术学院特聘讲师",
  307. "专业从事建筑工程竣工验收/技术资料管理",
  308. "建筑工程施工安全资料管理"
  309. ]
  310. },
  311. {
  312. imgUrl: "https://file.xyyxt.net/web/static/img/hxx.png",
  313. name: "胡欣欣",
  314. occupation: "教授、硕士生导师",
  315. remark: [
  316. "二建考前名师",
  317. "广东工业大学土木与交通工程学员硕士生导师",
  318. "广东省工程造价协会专家库成员",
  319. "广东省工程咨询协会专家库成员"
  320. ]
  321. },
  322. {
  323. imgUrl: "https://file.xyyxt.net/web/static/img/zzhteacher.png",
  324. name: "朱培浩",
  325. occupation: "博士、教材主编",
  326. remark: ["机电实务全国名师", "建造师相关教材主编、参编"]
  327. }
  328. ],
  329. jumpList: [{
  330. label: "课程选购",
  331. imgName: require("@/static/modIcon/purchase.png"),
  332. type: 1, //1 tab类型 2 nav类型
  333. url: 0
  334. }, {
  335. label: "直播课程",
  336. imgName: require("@/static/modIcon/live.png"),
  337. type: 1, //1 tab类型 2 nav类型
  338. url: 1
  339. }, {
  340. label: "题库购买",
  341. imgName: require("@/static/modIcon/QuestionBank.png"),
  342. type: 1, //1 tab类型 2 nav类型
  343. url: 2
  344. }, {
  345. label: "讲义资料",
  346. imgName: require("@/static/modIcon/handout.png"),
  347. type: 1, //1 tab类型 2 nav类型
  348. url: 3
  349. }
  350. // , {
  351. // label: "课程试听",
  352. // imgName: "",
  353. // type: 1, //1 tab类型 2 nav类型
  354. // url: ""
  355. // }, {
  356. // label: "考试日历",
  357. // imgName: "",
  358. // type: 1, //1 tab类型 2 nav类型
  359. // url: ""
  360. // }, {
  361. // label: "常见问题",
  362. // imgName: "",
  363. // type: 1, //1 tab类型 2 nav类型
  364. // url: ""
  365. // }, {
  366. // label: "会员商城",
  367. // imgName: "",
  368. // type: 1, //1 tab类型 2 nav类型
  369. // url: ""
  370. // },
  371. ],
  372. autoplay: true,
  373. interval: 2000,
  374. duration: 500,
  375. swiperHeight: (uni.getWindowInfo().screenWidth - 40) * 0.42 * 2, //轮播图高度计算
  376. list: [],
  377. recommendCourse: [],
  378. recommendBank: [],
  379. isFollow: null, //是否关注过,不是1就是没关注
  380. curClose: true, // 当天时是否关闭过
  381. version: null, //当前版本号
  382. };
  383. },
  384. async onLoad(option) {
  385. let self = this
  386. uni.hideTabBar();
  387. // #ifdef H5
  388. uni.setNavigationBarTitle({
  389. title: this.header.companyName,
  390. });
  391. // #endif
  392. // #ifdef MP-WEIXIN
  393. wx.getSystemInfo({
  394. success: function(res) {
  395. self.version = res.SDKVersion;
  396. self.appCommonConfig({
  397. version: self.version,
  398. });
  399. },
  400. });
  401. // #endif
  402. this.getLocation();
  403. this.recommendList()
  404. this.dictObj;
  405. if (this.$method.isLogin()) {
  406. try {
  407. await this.getUserInfo();
  408. } catch (err) {}
  409. } else {
  410. if (uni.getStorageSync("needToLogin")) {
  411. uni.removeStorageSync("needToLogin");
  412. uni.navigateTo({
  413. url: "/pages4/login/login",
  414. });
  415. }
  416. }
  417. },
  418. onShow() {
  419. this.getInfo(); // 判断有没有关注公众号
  420. this.isClickOff(); //关注公众号,每天最多显示1次;当天学员关闭弹窗后,无需再显示
  421. },
  422. onShareAppMessage(res) {
  423. return {
  424. title: "中正",
  425. path: `/pages/index/index?inviteCode=` + userInfo == null ?
  426. "" : userInfo.userAccount,
  427. };
  428. },
  429. onPageScroll(e) {
  430. if (e.scrollTop > 100) {
  431. this.backTopBtn = true
  432. } else {
  433. this.backTopBtn = false
  434. }
  435. },
  436. computed: {
  437. ...mapGetters(["header", "other", "dictObj", "userInfo", "tenantId", "hideBuyState"]),
  438. filterNum: function() {
  439. return function(list) {
  440. if (list && list.length > 0) {
  441. return list.filter((i, k) => k < 3)
  442. } else {
  443. return []
  444. }
  445. }
  446. }
  447. },
  448. methods: {
  449. ...mapActions(["getUserInfo", "appCommonConfig"]),
  450. changeCurren(index, i) {
  451. this[i] = index
  452. },
  453. // 每天最多显示1次;当天学员关闭弹窗后,无需再显示
  454. isClickOff() {
  455. //当天23:59:59秒 转换成的毫秒数
  456. const end = new Date(
  457. new Date(new Date().toLocaleDateString()).getTime() +
  458. 24 * 60 * 60 * 1000 -
  459. 1
  460. ).getTime();
  461. const start = new Date().getTime(); //当前时间的毫秒数
  462. if (uni.getStorageSync("endTime")) {
  463. //首先判断本地有没有存入当天23:59:59秒的毫秒数
  464. if (start > uni.getStorageSync("endTime")) {
  465. //当前时间毫秒数大于当天23:59:59秒
  466. this.curClose = true;
  467. uni.removeStorageSync("curClose");
  468. uni.removeStorageSync("endTime");
  469. } else {
  470. this.curClose = uni.getStorageSync("curClose") ? false : true;
  471. }
  472. } else {
  473. uni.setStorageSync("endTime", end); //存入当天晚上23:59:59秒的毫秒数
  474. }
  475. },
  476. closeOff() {
  477. this.curClose = false;
  478. uni.setStorageSync("curClose", "1");
  479. },
  480. getInfo() {
  481. if (!this.$method.isLogin()) {
  482. return;
  483. }
  484. // /app/user/getInfo 登录用户信息 // fromPlat来源平台 1小程序 2PC网站
  485. this.$api.getInfo({
  486. fromPlat: 1
  487. }).then((res) => {
  488. if (res.data.code == 200) {
  489. this.$store.state.userInfo = res.data.data;
  490. this.isFollow = res.data.data.userFollowWx; // 不是1就是没关注
  491. console.log(this.isFollow, 'llow')
  492. }
  493. });
  494. },
  495. tabListFunc(item) {
  496. if (item.type == 1) {
  497. this.$store.state.current = item.url
  498. uni.switchTab({
  499. url: '/pages/course/index'
  500. });
  501. }
  502. if (item.type == 2) {
  503. uni.navigateTo({
  504. url: item.url
  505. });
  506. }
  507. },
  508. openImg(index) {
  509. uni.previewImage({
  510. urls: this.certificate.map(i => i.imgUrl),
  511. current: index
  512. })
  513. },
  514. /**
  515. * @param {Object} swiper
  516. * 点击轮播图
  517. */
  518. swiperClick(index) {
  519. let swiper = this.list[index]
  520. if (swiper.jumpType == 1) {
  521. //无跳转
  522. return;
  523. } else if (swiper.jumpType == 2) {
  524. //url
  525. let url = encodeURIComponent(swiper.jumpUrl);
  526. uni.navigateTo({
  527. url: "/pages5/webview/index?url=" + swiper.jumpUrl,
  528. });
  529. } else if (swiper.jumpType == 3) {
  530. //内部接口
  531. const {
  532. jumpUrl
  533. } = swiper;
  534. const map = [
  535. "pages/index/index",
  536. "pages/course/index",
  537. "pages/learn/index",
  538. "pages/questionBank/index",
  539. "pages/wd/index",
  540. "pages/information/index",
  541. ];
  542. const isSwitch = map.find((e) => jumpUrl.includes(e));
  543. // tab页
  544. if (isSwitch) {
  545. // 解决携带参数问题
  546. uni.reLaunch({
  547. url: jumpUrl,
  548. });
  549. return;
  550. }
  551. uni.navigateTo({
  552. url: jumpUrl,
  553. });
  554. } else if (swiper.jumpType == 4) {
  555. //外部接口
  556. uni.navigateToMiniProgram({
  557. appId: swiper.remarks,
  558. path: swiper.jumpUrl,
  559. extraData: {},
  560. success(res) {
  561. // 打开成功
  562. },
  563. fail(err) {
  564. // console.log(err)
  565. },
  566. });
  567. }
  568. },
  569. //获取轮播列表
  570. getLocation() {
  571. this.$api
  572. .advertisingLocation({
  573. platform: 1,
  574. status: 1,
  575. locationKey: "home-banner",
  576. })
  577. .then((res) => {
  578. if (res.data.code == 200) {
  579. let locationId =
  580. (res.data.data && res.data.data[0].locationId) || 1;
  581. this.interval = res.data.data[0].intervalTime * 1000;
  582. this.$api.advertisingList({
  583. locationId: locationId
  584. }).then((result) => {
  585. if (result.data && result.data.rows.length > 0) {
  586. this.list = result.data.rows.map(item => {
  587. return {
  588. ...item,
  589. image: this.$method.splitImgHost(item
  590. .adverUrl),
  591. title: item.advName
  592. }
  593. })
  594. }
  595. });
  596. }
  597. });
  598. },
  599. //推荐列表
  600. recommendList() {
  601. this.$http({
  602. url: "/app/common/activity/recommend/list",
  603. method: "get",
  604. data: {
  605. platform: 1,
  606. status: 1,
  607. },
  608. noToken: true,
  609. }).then((res) => {
  610. if (res.data && res.data.rows.length > 0) {
  611. this.recommendCourse = res.data.rows.filter(i => i.status == 1 && i.type ==
  612. 1) || []
  613. this.recommendBank = res.data.rows.filter(i => i.status == 1 && i.type ==
  614. 2) || []
  615. }
  616. })
  617. },
  618. tobuy(item) {
  619. if (item.goodsType == 2) {
  620. uni.navigateTo({
  621. url: "/pages2/bank/detail?id=" + item.goodsId,
  622. });
  623. } else {
  624. // 视频、直播 /pages5/liveDetail/index
  625. uni.navigateTo({
  626. url: "/pages3/course/detail?id=" +
  627. item.goodsId +
  628. "&goodsType=" +
  629. item.goodsType,
  630. });
  631. }
  632. },
  633. jumpPage(index) {
  634. this.$store.state.current = index
  635. uni.switchTab({
  636. url: '/pages/course/index'
  637. });
  638. }
  639. },
  640. };
  641. </script>
  642. <style>
  643. page {
  644. background: #f1f4f7;
  645. }
  646. </style>
  647. <style lang="scss" scoped>
  648. .noGoods {
  649. padding: 20rpx;
  650. background-color: #fff;
  651. border-radius: 8rpx;
  652. height: 80%;
  653. display: flex;
  654. flex-direction: column;
  655. align-items: center;
  656. &>img {
  657. width: 300rpx;
  658. height: 300rpx;
  659. }
  660. &>view {
  661. font-size: 34rpx;
  662. margin-top: 30rpx;
  663. color: #666;
  664. }
  665. }
  666. .swiper_cer {
  667. height: 500rpx;
  668. .boxs_cer {
  669. height: 100%;
  670. display: flex;
  671. align-items: center;
  672. justify-content: center;
  673. &>image {
  674. height: 100%;
  675. }
  676. }
  677. }
  678. .swiper {
  679. height: 500rpx;
  680. .boxs_tec {
  681. margin: 0rpx 20rpx;
  682. height: 100%;
  683. background-color: #fff;
  684. border: 1rpx solid #007aff;
  685. border-radius: 8rpx;
  686. display: flex;
  687. flex-direction: column;
  688. .header {
  689. display: flex;
  690. align-items: center;
  691. flex-shrink: 0;
  692. padding: 20rpx;
  693. .imgs {
  694. width: 80rpx;
  695. height: 80rpx;
  696. border-radius: 50%;
  697. overflow: hidden;
  698. margin-right: 20rpx;
  699. &>img {
  700. width: 100%;
  701. height: 100%;
  702. }
  703. }
  704. .right_s {
  705. display: flex;
  706. flex-direction: column;
  707. justify-content: space-between;
  708. .h_name {
  709. font-size: 32rpx;
  710. color: #333;
  711. font-weight: 600;
  712. }
  713. .c_ {
  714. color: #333;
  715. font-size: 28rpx;
  716. }
  717. }
  718. }
  719. .bodys {
  720. font-size: 28rpx;
  721. padding: 30rpx 20rpx;
  722. color: #fff;
  723. flex: 1;
  724. background-color: rgb(0, 122, 255);
  725. &>view {
  726. line-height: 42rpx;
  727. }
  728. }
  729. }
  730. }
  731. .header_box {
  732. padding: 20rpx;
  733. background: linear-gradient(180deg, rgba(0, 122, 255, 1) 0%, #f1f4f7 100%);
  734. .getStudy {
  735. display: flex;
  736. align-items: center;
  737. justify-content: space-between;
  738. background-color: #fff;
  739. margin-top: 24rpx;
  740. padding: 30rpx 26rpx;
  741. border-radius: 8rpx;
  742. .left {
  743. display: flex;
  744. align-items: center;
  745. img {
  746. width: 46rpx;
  747. height: 46rpx;
  748. margin-right: 14rpx;
  749. }
  750. text {
  751. font-size: 32rpx;
  752. font-weight: 600;
  753. }
  754. }
  755. .btn {
  756. font-size: 24rpx;
  757. border-radius: 28rpx;
  758. padding: 14rpx 28rpx;
  759. background-color: #007aff;
  760. color: #fff;
  761. }
  762. }
  763. .jumpList {
  764. display: flex;
  765. flex-wrap: wrap;
  766. background: #fff;
  767. margin-top: 24rpx;
  768. padding: 20rpx 0rpx;
  769. border-radius: 8rpx;
  770. .list_li {
  771. width: 25%;
  772. display: flex;
  773. flex-direction: column;
  774. align-items: center;
  775. margin-bottom: 20rpx;
  776. &>img {
  777. width: 76rpx;
  778. height: 76rpx;
  779. margin-bottom: 6rpx;
  780. }
  781. &>text {}
  782. }
  783. }
  784. }
  785. .content {
  786. padding: 20rpx;
  787. .header_top {
  788. display: flex;
  789. align-items: center;
  790. justify-content: space-between;
  791. margin-bottom: 20rpx;
  792. .left {
  793. color: #333;
  794. font-weight: 600;
  795. font-size: 36rpx;
  796. flex-shrink: 0;
  797. &:before {
  798. content: ""; // 必须
  799. display: inline-block; // 必须
  800. width: 6rpx;
  801. height: 26rpx;
  802. margin-right: 20rpx;
  803. background: #409eff !important;
  804. }
  805. }
  806. .u-tabs {
  807. flex: 1;
  808. width: 1rpx;
  809. margin: 0rpx 10rpx;
  810. /deep/ .u-scroll-box {
  811. height: 50rpx;
  812. }
  813. }
  814. .right {
  815. font-size: 28rpx;
  816. color: #7f7f7f;
  817. flex-shrink: 0;
  818. }
  819. }
  820. .content_box {
  821. background-color: #fff;
  822. border-radius: 8rpx;
  823. padding: 20rpx;
  824. margin-bottom: 20rpx;
  825. &>.title {
  826. padding-top: 10rpx;
  827. margin-bottom: 30rpx;
  828. color: #333;
  829. font-weight: 600;
  830. font-size: 28rpx;
  831. }
  832. &>.f_x {
  833. display: flex;
  834. &>.img_goods {
  835. width: 235rpx;
  836. height: 138rpx;
  837. overflow: hidden;
  838. border-radius: 8rpx;
  839. margin-right: 20rpx;
  840. flex-shrink: 0;
  841. &>img {
  842. width: 100%;
  843. height: 100%;
  844. }
  845. }
  846. &>.content_goods {
  847. flex: 1;
  848. width: 1rpx;
  849. display: flex;
  850. flex-direction: column;
  851. justify-content: space-between;
  852. &>.top_bus {
  853. text-overflow: ellipsis;
  854. white-space: nowrap;
  855. overflow: hidden;
  856. &>text {
  857. background-color: #f5f7f9;
  858. border-radius: 4rpx;
  859. padding: 6rpx 10rpx;
  860. &:first-child {
  861. margin-right: 14rpx;
  862. }
  863. }
  864. }
  865. &>.price {
  866. display: flex;
  867. align-items: center;
  868. flex-wrap: wrap;
  869. justify-content: space-between;
  870. &>.price1 {
  871. font-size: 36rpx;
  872. font-weight: 700;
  873. color: red;
  874. }
  875. &>.price2 {
  876. text-decoration: line-through;
  877. color: #aaaaaa;
  878. font-size: 24rpx;
  879. }
  880. }
  881. }
  882. }
  883. }
  884. }
  885. .officials {
  886. width: 100%;
  887. height: 104rpx;
  888. position: fixed;
  889. bottom: 100rpx;
  890. left: 0;
  891. z-index: 999;
  892. display: flex;
  893. align-items: center;
  894. justify-content: center;
  895. }
  896. .weixin_official_account {
  897. position: fixed;
  898. bottom: 100rpx;
  899. left: 0;
  900. display: flex;
  901. align-items: center;
  902. // justify-content: space-between;
  903. width: 718rpx;
  904. height: 104rpx;
  905. padding: 0 32rpx;
  906. margin-left: 16rpx;
  907. background: #3a3f54;
  908. border-radius: 16rpx;
  909. .off_logo {
  910. width: 48rpx;
  911. height: 48rpx;
  912. margin-right: 24rpx;
  913. }
  914. .one {
  915. color: #fff;
  916. font-size: 24rpx;
  917. font-weight: 500;
  918. }
  919. .two {
  920. color: #bcbec7;
  921. font-size: 20rpx;
  922. }
  923. .btn {
  924. position: relative;
  925. top: 0;
  926. left: 35rpx;
  927. width: 128rpx;
  928. height: 56rpx;
  929. line-height: 56rpx;
  930. padding: 0;
  931. background: linear-gradient(274deg, #408bf6 0%, #40b4f6 100%);
  932. border-radius: 156rpx;
  933. overflow: hidden;
  934. text-align: center;
  935. font-size: 24rpx;
  936. color: #fff;
  937. .official-account {
  938. position: absolute;
  939. z-index: 1000;
  940. right: -9px;
  941. top: -38px;
  942. opacity: 0;
  943. }
  944. }
  945. .close_icon {
  946. width: 40rpx;
  947. height: 40rpx;
  948. background: #ffffff;
  949. opacity: 0.2;
  950. display: flex;
  951. align-items: center;
  952. position: absolute;
  953. top: 0;
  954. right: 0;
  955. color: #fff;
  956. border-radius: 0rpx 16rpx;
  957. }
  958. .icon-close {
  959. display: flex;
  960. align-items: center;
  961. justify-content: center;
  962. width: 50rpx;
  963. height: 68rpx;
  964. font-size: 22rpx;
  965. color: #7b8284;
  966. }
  967. }
  968. </style>