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