index.vue 25 KB

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