index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017
  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="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" :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="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" :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="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></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. version:null,//当前版本号
  381. };
  382. },
  383. async onLoad(option) {
  384. let self = this
  385. uni.hideTabBar();
  386. // #ifdef H5
  387. uni.setNavigationBarTitle({
  388. title: this.header.companyName,
  389. });
  390. // #endif
  391. this.getLocation();
  392. this.recommendList()
  393. this.dictObj;
  394. if (this.$method.isLogin()) {
  395. try {
  396. await this.getUserInfo();
  397. } catch (err) {}
  398. } else {
  399. if (uni.getStorageSync("needToLogin")) {
  400. uni.removeStorageSync("needToLogin");
  401. uni.navigateTo({
  402. url: "/pages4/login/login",
  403. });
  404. }
  405. }
  406. wx.getSystemInfo({
  407. success: function(res) {
  408. self.version = res.SDKVersion;
  409. console.log("该版本号为: ", self.version);
  410. },
  411. });
  412. },
  413. onShow() {
  414. this.getInfo(); // 判断有没有关注公众号
  415. this.isClickOff(); //关注公众号,每天最多显示1次;当天学员关闭弹窗后,无需再显示
  416. this.appCommonConfig({
  417. version: this.version,
  418. });
  419. },
  420. onShareAppMessage(res) {
  421. return {
  422. title: "中正",
  423. path: `/pages/index/index?inviteCode=` + userInfo == null ?
  424. "" : userInfo.userAccount,
  425. };
  426. },
  427. computed: {
  428. ...mapGetters(["header","other", "dictObj", "userInfo", "tenantId"]),
  429. filterNum: function() {
  430. return function(list) {
  431. if (list && list.length > 0) {
  432. return list.filter((i, k) => k < 3)
  433. } else {
  434. return []
  435. }
  436. }
  437. }
  438. },
  439. methods: {
  440. ...mapActions(["getUserInfo", "appCommonConfig"]),
  441. changeCurren(index, i) {
  442. this[i] = index
  443. },
  444. // 每天最多显示1次;当天学员关闭弹窗后,无需再显示
  445. isClickOff() {
  446. //当天23:59:59秒 转换成的毫秒数
  447. const end = new Date(
  448. new Date(new Date().toLocaleDateString()).getTime() +
  449. 24 * 60 * 60 * 1000 -
  450. 1
  451. ).getTime();
  452. const start = new Date().getTime(); //当前时间的毫秒数
  453. if (uni.getStorageSync("endTime")) {
  454. //首先判断本地有没有存入当天23:59:59秒的毫秒数
  455. if (start > uni.getStorageSync("endTime")) {
  456. //当前时间毫秒数大于当天23:59:59秒
  457. this.curClose = true;
  458. uni.removeStorageSync("curClose");
  459. uni.removeStorageSync("endTime");
  460. } else {
  461. this.curClose = uni.getStorageSync("curClose") ? false : true;
  462. }
  463. } else {
  464. uni.setStorageSync("endTime", end); //存入当天晚上23:59:59秒的毫秒数
  465. }
  466. },
  467. closeOff() {
  468. this.curClose = false;
  469. uni.setStorageSync("curClose", "1");
  470. },
  471. getInfo() {
  472. if (!this.$method.isLogin()) {
  473. return;
  474. }
  475. // /app/user/getInfo 登录用户信息 // fromPlat来源平台 1小程序 2PC网站
  476. this.$api.getInfo({
  477. fromPlat: 1
  478. }).then((res) => {
  479. if (res.data.code == 200) {
  480. this.$store.state.userInfo = res.data.data;
  481. this.isFollow = res.data.data.userFollowWx; // 不是1就是没关注
  482. console.log(this.isFollow, 'llow')
  483. }
  484. });
  485. },
  486. tabListFunc(item) {
  487. if (item.type == 1) {
  488. this.$store.state.current = item.url
  489. uni.switchTab({
  490. url: '/pages/course/index'
  491. });
  492. }
  493. if (item.type == 2) {
  494. uni.navigateTo({
  495. url: item.url
  496. });
  497. }
  498. },
  499. openImg(index) {
  500. uni.previewImage({
  501. urls: this.certificate.map(i => i.imgUrl),
  502. current: index
  503. })
  504. },
  505. /**
  506. * @param {Object} swiper
  507. * 点击轮播图
  508. */
  509. swiperClick(index) {
  510. let swiper = this.list[index]
  511. if (swiper.jumpType == 1) {
  512. //无跳转
  513. return;
  514. } else if (swiper.jumpType == 2) {
  515. //url
  516. let url = encodeURIComponent(swiper.jumpUrl);
  517. uni.navigateTo({
  518. url: "/pages5/webview/index?url=" + swiper.jumpUrl,
  519. });
  520. } else if (swiper.jumpType == 3) {
  521. //内部接口
  522. const {
  523. jumpUrl
  524. } = swiper;
  525. const map = [
  526. "pages/index/index",
  527. "pages/course/index",
  528. "pages/learn/index",
  529. "pages/questionBank/index",
  530. "pages/wd/index",
  531. "pages/information/index",
  532. ];
  533. const isSwitch = map.find((e) => jumpUrl.includes(e));
  534. // tab页
  535. if (isSwitch) {
  536. // 解决携带参数问题
  537. uni.reLaunch({
  538. url: jumpUrl,
  539. });
  540. return;
  541. }
  542. uni.navigateTo({
  543. url: jumpUrl,
  544. });
  545. } else if (swiper.jumpType == 4) {
  546. //外部接口
  547. uni.navigateToMiniProgram({
  548. appId: swiper.remarks,
  549. path: swiper.jumpUrl,
  550. extraData: {},
  551. success(res) {
  552. // 打开成功
  553. },
  554. fail(err) {
  555. // console.log(err)
  556. },
  557. });
  558. }
  559. },
  560. //获取轮播列表
  561. getLocation() {
  562. this.$api
  563. .advertisingLocation({
  564. platform: 1,
  565. status: 1,
  566. locationKey: "home-banner",
  567. })
  568. .then((res) => {
  569. if (res.data.code == 200) {
  570. let locationId =
  571. (res.data.data && res.data.data[0].locationId) || 1;
  572. this.interval = res.data.data[0].intervalTime * 1000;
  573. this.$api.advertisingList({
  574. locationId: locationId
  575. }).then((result) => {
  576. if (result.data && result.data.rows.length > 0) {
  577. this.list = result.data.rows.map(item => {
  578. return {
  579. ...item,
  580. image: this.$method.splitImgHost(item
  581. .adverUrl),
  582. title: item.advName
  583. }
  584. })
  585. }
  586. });
  587. }
  588. });
  589. },
  590. //推荐列表
  591. recommendList() {
  592. this.$http({
  593. url: "/app/common/activity/recommend/list",
  594. method: "get",
  595. data: {
  596. platform: 1,
  597. status: 1,
  598. },
  599. noToken: true,
  600. }).then((res) => {
  601. if (res.data && res.data.rows.length > 0) {
  602. this.recommendCourse = res.data.rows.filter(i => i.status == 1 && i.type ==
  603. 1) || []
  604. this.recommendBank = res.data.rows.filter(i => i.status == 1 && i.type ==
  605. 2) || []
  606. }
  607. })
  608. },
  609. tobuy(item) {
  610. if (item.goodsType == 2) {
  611. uni.navigateTo({
  612. url: "/pages2/bank/detail?id=" + item.goodsId,
  613. });
  614. } else {
  615. // 视频、直播 /pages5/liveDetail/index
  616. uni.navigateTo({
  617. url: "/pages3/course/detail?id=" +
  618. item.goodsId +
  619. "&goodsType=" +
  620. item.goodsType,
  621. });
  622. }
  623. },
  624. jumpPage(index) {
  625. this.$store.state.current = index
  626. uni.switchTab({
  627. url: '/pages/course/index'
  628. });
  629. }
  630. },
  631. };
  632. </script>
  633. <style>
  634. page {
  635. background: #f1f4f7;
  636. }
  637. </style>
  638. <style lang="scss" scoped>
  639. .noGoods {
  640. padding: 20rpx;
  641. background-color: #fff;
  642. border-radius: 8rpx;
  643. height: 80%;
  644. display: flex;
  645. flex-direction: column;
  646. align-items: center;
  647. &>img {
  648. width: 300rpx;
  649. height: 300rpx;
  650. }
  651. &>view {
  652. font-size: 34rpx;
  653. margin-top: 30rpx;
  654. color: #666;
  655. }
  656. }
  657. .swiper_cer {
  658. height: 500rpx;
  659. .boxs_cer {
  660. height: 100%;
  661. display: flex;
  662. align-items: center;
  663. justify-content: center;
  664. &>image {
  665. height: 100%;
  666. }
  667. }
  668. }
  669. .swiper {
  670. height: 500rpx;
  671. .boxs_tec {
  672. margin: 0rpx 20rpx;
  673. height: 100%;
  674. background-color: #fff;
  675. border: 1rpx solid #007aff;
  676. border-radius: 8rpx;
  677. display: flex;
  678. flex-direction: column;
  679. .header {
  680. display: flex;
  681. align-items: center;
  682. flex-shrink: 0;
  683. padding: 20rpx;
  684. .imgs {
  685. width: 80rpx;
  686. height: 80rpx;
  687. border-radius: 50%;
  688. overflow: hidden;
  689. margin-right: 20rpx;
  690. &>img {
  691. width: 100%;
  692. height: 100%;
  693. }
  694. }
  695. .right_s {
  696. display: flex;
  697. flex-direction: column;
  698. justify-content: space-between;
  699. .h_name {
  700. font-size: 32rpx;
  701. color: #333;
  702. font-weight: 600;
  703. }
  704. .c_ {
  705. color: #333;
  706. font-size: 28rpx;
  707. }
  708. }
  709. }
  710. .bodys {
  711. font-size: 28rpx;
  712. padding: 30rpx 20rpx;
  713. color: #fff;
  714. flex: 1;
  715. background-color: rgb(0, 122, 255);
  716. &>view {
  717. line-height: 42rpx;
  718. }
  719. }
  720. }
  721. }
  722. .header_box {
  723. padding: 20rpx;
  724. background: linear-gradient(180deg, rgba(0, 122, 255, 1) 0%, #f1f4f7 100%);
  725. .getStudy {
  726. display: flex;
  727. align-items: center;
  728. justify-content: space-between;
  729. background-color: #fff;
  730. margin-top: 24rpx;
  731. padding: 30rpx 26rpx;
  732. border-radius: 8rpx;
  733. .left {
  734. display: flex;
  735. align-items: center;
  736. img {
  737. width: 46rpx;
  738. height: 46rpx;
  739. margin-right: 14rpx;
  740. }
  741. text {
  742. font-size: 32rpx;
  743. font-weight: 600;
  744. }
  745. }
  746. .btn {
  747. font-size: 24rpx;
  748. border-radius: 28rpx;
  749. padding: 14rpx 28rpx;
  750. background-color: #007aff;
  751. color: #fff;
  752. }
  753. }
  754. .jumpList {
  755. display: flex;
  756. flex-wrap: wrap;
  757. background: #fff;
  758. margin-top: 24rpx;
  759. padding: 20rpx 0rpx;
  760. border-radius: 8rpx;
  761. .list_li {
  762. width: 25%;
  763. display: flex;
  764. flex-direction: column;
  765. align-items: center;
  766. margin-bottom: 20rpx;
  767. &>img {
  768. width: 76rpx;
  769. height: 76rpx;
  770. margin-bottom: 6rpx;
  771. }
  772. &>text {}
  773. }
  774. }
  775. }
  776. .content {
  777. padding: 20rpx;
  778. .header_top {
  779. display: flex;
  780. align-items: center;
  781. justify-content: space-between;
  782. margin-bottom: 20rpx;
  783. .left {
  784. color: #333;
  785. font-weight: 600;
  786. font-size: 36rpx;
  787. flex-shrink: 0;
  788. &:before {
  789. content: ""; // 必须
  790. display: inline-block; // 必须
  791. width: 6rpx;
  792. height: 26rpx;
  793. margin-right: 20rpx;
  794. background: #409eff !important;
  795. }
  796. }
  797. .u-tabs {
  798. flex: 1;
  799. width: 1rpx;
  800. margin: 0rpx 10rpx;
  801. /deep/ .u-scroll-box {
  802. height: 50rpx;
  803. }
  804. }
  805. .right {
  806. font-size: 28rpx;
  807. color: #7f7f7f;
  808. flex-shrink: 0;
  809. }
  810. }
  811. .content_box {
  812. background-color: #fff;
  813. border-radius: 8rpx;
  814. padding: 20rpx;
  815. margin-bottom: 20rpx;
  816. &>.title {
  817. padding-top: 10rpx;
  818. margin-bottom: 30rpx;
  819. color: #333;
  820. font-weight: 600;
  821. font-size: 28rpx;
  822. }
  823. &>.f_x {
  824. display: flex;
  825. &>.img_goods {
  826. width: 235rpx;
  827. height: 138rpx;
  828. overflow: hidden;
  829. border-radius: 8rpx;
  830. margin-right: 20rpx;
  831. flex-shrink: 0;
  832. &>img {
  833. width: 100%;
  834. height: 100%;
  835. }
  836. }
  837. &>.content_goods {
  838. flex: 1;
  839. width: 1rpx;
  840. display: flex;
  841. flex-direction: column;
  842. justify-content: space-between;
  843. &>.top_bus {
  844. text-overflow: ellipsis;
  845. white-space: nowrap;
  846. overflow: hidden;
  847. &>text {
  848. background-color: #f5f7f9;
  849. border-radius: 4rpx;
  850. padding: 6rpx 10rpx;
  851. &:first-child {
  852. margin-right: 14rpx;
  853. }
  854. }
  855. }
  856. &>.price {
  857. display: flex;
  858. align-items: center;
  859. flex-wrap: wrap;
  860. justify-content: space-between;
  861. &>.price1 {
  862. font-size: 36rpx;
  863. font-weight: 700;
  864. color: red;
  865. }
  866. &>.price2 {
  867. text-decoration: line-through;
  868. color: #aaaaaa;
  869. font-size: 24rpx;
  870. }
  871. }
  872. }
  873. }
  874. }
  875. }
  876. .officials {
  877. width: 100%;
  878. height: 104rpx;
  879. position: fixed;
  880. bottom: 100rpx;
  881. left: 0;
  882. z-index: 999;
  883. display: flex;
  884. align-items: center;
  885. justify-content: center;
  886. }
  887. .weixin_official_account {
  888. position: fixed;
  889. bottom: 100rpx;
  890. left: 0;
  891. display: flex;
  892. align-items: center;
  893. // justify-content: space-between;
  894. width: 718rpx;
  895. height: 104rpx;
  896. padding: 0 32rpx;
  897. margin-left: 16rpx;
  898. background: #3a3f54;
  899. border-radius: 16rpx;
  900. .off_logo {
  901. width: 48rpx;
  902. height: 48rpx;
  903. margin-right: 24rpx;
  904. }
  905. .one {
  906. color: #fff;
  907. font-size: 24rpx;
  908. font-weight: 500;
  909. }
  910. .two {
  911. color: #bcbec7;
  912. font-size: 20rpx;
  913. }
  914. .btn {
  915. position: relative;
  916. top: 0;
  917. left: 35rpx;
  918. width: 128rpx;
  919. height: 56rpx;
  920. line-height: 56rpx;
  921. padding: 0;
  922. background: linear-gradient(274deg, #408bf6 0%, #40b4f6 100%);
  923. border-radius: 156rpx;
  924. overflow: hidden;
  925. text-align: center;
  926. font-size: 24rpx;
  927. color: #fff;
  928. .official-account {
  929. position: absolute;
  930. z-index: 1000;
  931. right: -9px;
  932. top: -38px;
  933. opacity: 0;
  934. }
  935. }
  936. .close_icon {
  937. width: 40rpx;
  938. height: 40rpx;
  939. background: #ffffff;
  940. opacity: 0.2;
  941. display: flex;
  942. align-items: center;
  943. position: absolute;
  944. top: 0;
  945. right: 0;
  946. color: #fff;
  947. border-radius: 0rpx 16rpx;
  948. }
  949. .icon-close {
  950. display: flex;
  951. align-items: center;
  952. justify-content: center;
  953. width: 50rpx;
  954. height: 68rpx;
  955. font-size: 22rpx;
  956. color: #7b8284;
  957. }
  958. }
  959. </style>