index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020
  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. // let a = "http://192.168.1.213:8080/pages3/polyv/detail?id=214618&goodsId=490909&orderGoodsId=5535&gradeId=1854&periodWaitTime=1&isQ="
  486. // uni.navigateTo({
  487. // url:`/pages5/webview/sdlink?url=${a}`
  488. // })
  489. // return
  490. if (item.type == 1) {
  491. this.$store.state.current = item.url
  492. uni.switchTab({
  493. url: '/pages/course/index'
  494. });
  495. }
  496. if (item.type == 2) {
  497. uni.navigateTo({
  498. url: item.url
  499. });
  500. }
  501. },
  502. openImg(index) {
  503. uni.previewImage({
  504. urls: this.certificate.map(i => i.imgUrl),
  505. current: index
  506. })
  507. },
  508. /**
  509. * @param {Object} swiper
  510. * 点击轮播图
  511. */
  512. swiperClick(index) {
  513. let swiper = this.list[index]
  514. if (swiper.jumpType == 1) {
  515. //无跳转
  516. return;
  517. } else if (swiper.jumpType == 2) {
  518. //url
  519. let url = encodeURIComponent(swiper.jumpUrl);
  520. uni.navigateTo({
  521. url: "/pages5/webview/index?url=" + swiper.jumpUrl,
  522. });
  523. } else if (swiper.jumpType == 3) {
  524. //内部接口
  525. const {
  526. jumpUrl
  527. } = swiper;
  528. const map = [
  529. "pages/index/index",
  530. "pages/course/index",
  531. "pages/learn/index",
  532. "pages/questionBank/index",
  533. "pages/wd/index",
  534. "pages/information/index",
  535. ];
  536. const isSwitch = map.find((e) => jumpUrl.includes(e));
  537. // tab页
  538. if (isSwitch) {
  539. // 解决携带参数问题
  540. uni.reLaunch({
  541. url: jumpUrl,
  542. });
  543. return;
  544. }
  545. uni.navigateTo({
  546. url: jumpUrl,
  547. });
  548. } else if (swiper.jumpType == 4) {
  549. //外部接口
  550. uni.navigateToMiniProgram({
  551. appId: swiper.remarks,
  552. path: swiper.jumpUrl,
  553. extraData: {},
  554. success(res) {
  555. // 打开成功
  556. },
  557. fail(err) {
  558. // console.log(err)
  559. },
  560. });
  561. }
  562. },
  563. //获取轮播列表
  564. getLocation() {
  565. this.$api
  566. .advertisingLocation({
  567. platform: 1,
  568. status: 1,
  569. locationKey: "home-banner",
  570. })
  571. .then((res) => {
  572. if (res.data.code == 200) {
  573. let locationId =
  574. (res.data.data && res.data.data[0].locationId) || 1;
  575. this.interval = res.data.data[0].intervalTime * 1000;
  576. this.$api.advertisingList({
  577. locationId: locationId
  578. }).then((result) => {
  579. if (result.data && result.data.rows.length > 0) {
  580. this.list = result.data.rows.map(item => {
  581. return {
  582. ...item,
  583. image: this.$method.splitImgHost(item
  584. .adverUrl),
  585. title: item.advName
  586. }
  587. })
  588. }
  589. });
  590. }
  591. });
  592. },
  593. //推荐列表
  594. recommendList() {
  595. this.$http({
  596. url: "/app/common/activity/recommend/list",
  597. method: "get",
  598. data: {
  599. platform: 1,
  600. status: 1,
  601. },
  602. noToken: true,
  603. }).then((res) => {
  604. if (res.data && res.data.rows.length > 0) {
  605. this.recommendCourse = res.data.rows.filter(i => i.status == 1 && i.type ==
  606. 1) || []
  607. this.recommendBank = res.data.rows.filter(i => i.status == 1 && i.type ==
  608. 2) || []
  609. }
  610. })
  611. },
  612. tobuy(item) {
  613. if (item.goodsType == 2) {
  614. uni.navigateTo({
  615. url: "/pages2/bank/detail?id=" + item.goodsId,
  616. });
  617. } else {
  618. // 视频、直播 /pages5/liveDetail/index
  619. uni.navigateTo({
  620. url: "/pages3/course/detail?id=" +
  621. item.goodsId +
  622. "&goodsType=" +
  623. item.goodsType,
  624. });
  625. }
  626. },
  627. jumpPage(index) {
  628. this.$store.state.current = index
  629. uni.switchTab({
  630. url: '/pages/course/index'
  631. });
  632. }
  633. },
  634. };
  635. </script>
  636. <style>
  637. page {
  638. background: #f1f4f7;
  639. }
  640. </style>
  641. <style lang="scss" scoped>
  642. .noGoods {
  643. padding: 20rpx;
  644. background-color: #fff;
  645. border-radius: 8rpx;
  646. height: 80%;
  647. display: flex;
  648. flex-direction: column;
  649. align-items: center;
  650. &>img {
  651. width: 300rpx;
  652. height: 300rpx;
  653. }
  654. &>view {
  655. font-size: 34rpx;
  656. margin-top: 30rpx;
  657. color: #666;
  658. }
  659. }
  660. .swiper_cer {
  661. height: 500rpx;
  662. .boxs_cer {
  663. height: 100%;
  664. display: flex;
  665. align-items: center;
  666. justify-content: center;
  667. &>image {
  668. height: 100%;
  669. }
  670. }
  671. }
  672. .swiper {
  673. height: 500rpx;
  674. .boxs_tec {
  675. margin: 0rpx 20rpx;
  676. height: 100%;
  677. background-color: #fff;
  678. border: 1rpx solid #007aff;
  679. border-radius: 8rpx;
  680. display: flex;
  681. flex-direction: column;
  682. .header {
  683. display: flex;
  684. align-items: center;
  685. flex-shrink: 0;
  686. padding: 20rpx;
  687. .imgs {
  688. width: 80rpx;
  689. height: 80rpx;
  690. border-radius: 50%;
  691. overflow: hidden;
  692. margin-right: 20rpx;
  693. &>img {
  694. width: 100%;
  695. height: 100%;
  696. }
  697. }
  698. .right_s {
  699. display: flex;
  700. flex-direction: column;
  701. justify-content: space-between;
  702. .h_name {
  703. font-size: 32rpx;
  704. color: #333;
  705. font-weight: 600;
  706. }
  707. .c_ {
  708. color: #333;
  709. font-size: 28rpx;
  710. }
  711. }
  712. }
  713. .bodys {
  714. font-size: 28rpx;
  715. padding: 30rpx 20rpx;
  716. color: #fff;
  717. flex: 1;
  718. background-color: rgb(0, 122, 255);
  719. &>view {
  720. line-height: 42rpx;
  721. }
  722. }
  723. }
  724. }
  725. .header_box {
  726. padding: 20rpx;
  727. background: linear-gradient(180deg, rgba(0, 122, 255, 1) 0%, #f1f4f7 100%);
  728. .getStudy {
  729. display: flex;
  730. align-items: center;
  731. justify-content: space-between;
  732. background-color: #fff;
  733. margin-top: 24rpx;
  734. padding: 30rpx 26rpx;
  735. border-radius: 8rpx;
  736. .left {
  737. display: flex;
  738. align-items: center;
  739. img {
  740. width: 46rpx;
  741. height: 46rpx;
  742. margin-right: 14rpx;
  743. }
  744. text {
  745. font-size: 32rpx;
  746. font-weight: 600;
  747. }
  748. }
  749. .btn {
  750. font-size: 24rpx;
  751. border-radius: 28rpx;
  752. padding: 14rpx 28rpx;
  753. background-color: #007aff;
  754. color: #fff;
  755. }
  756. }
  757. .jumpList {
  758. display: flex;
  759. flex-wrap: wrap;
  760. background: #fff;
  761. margin-top: 24rpx;
  762. padding: 20rpx 0rpx;
  763. border-radius: 8rpx;
  764. .list_li {
  765. width: 25%;
  766. display: flex;
  767. flex-direction: column;
  768. align-items: center;
  769. margin-bottom: 20rpx;
  770. &>img {
  771. width: 76rpx;
  772. height: 76rpx;
  773. margin-bottom: 6rpx;
  774. }
  775. &>text {}
  776. }
  777. }
  778. }
  779. .content {
  780. padding: 20rpx;
  781. .header_top {
  782. display: flex;
  783. align-items: center;
  784. justify-content: space-between;
  785. margin-bottom: 20rpx;
  786. .left {
  787. color: #333;
  788. font-weight: 600;
  789. font-size: 36rpx;
  790. flex-shrink: 0;
  791. &:before {
  792. content: ""; // 必须
  793. display: inline-block; // 必须
  794. width: 6rpx;
  795. height: 26rpx;
  796. margin-right: 20rpx;
  797. background: #409eff !important;
  798. }
  799. }
  800. .u-tabs {
  801. flex: 1;
  802. width: 1rpx;
  803. margin: 0rpx 10rpx;
  804. /deep/ .u-scroll-box {
  805. height: 50rpx;
  806. }
  807. }
  808. .right {
  809. font-size: 28rpx;
  810. color: #7f7f7f;
  811. flex-shrink: 0;
  812. }
  813. }
  814. .content_box {
  815. background-color: #fff;
  816. border-radius: 8rpx;
  817. padding: 20rpx;
  818. margin-bottom: 20rpx;
  819. &>.title {
  820. padding-top: 10rpx;
  821. margin-bottom: 30rpx;
  822. color: #333;
  823. font-weight: 600;
  824. font-size: 28rpx;
  825. }
  826. &>.f_x {
  827. display: flex;
  828. &>.img_goods {
  829. width: 235rpx;
  830. height: 138rpx;
  831. overflow: hidden;
  832. border-radius: 8rpx;
  833. margin-right: 20rpx;
  834. flex-shrink: 0;
  835. &>img {
  836. width: 100%;
  837. height: 100%;
  838. }
  839. }
  840. &>.content_goods {
  841. flex: 1;
  842. width: 1rpx;
  843. display: flex;
  844. flex-direction: column;
  845. justify-content: space-between;
  846. &>.top_bus {
  847. text-overflow: ellipsis;
  848. white-space: nowrap;
  849. overflow: hidden;
  850. &>text {
  851. background-color: #f5f7f9;
  852. border-radius: 4rpx;
  853. padding: 6rpx 10rpx;
  854. &:first-child {
  855. margin-right: 14rpx;
  856. }
  857. }
  858. }
  859. &>.price {
  860. display: flex;
  861. align-items: center;
  862. flex-wrap: wrap;
  863. justify-content: space-between;
  864. &>.price1 {
  865. font-size: 36rpx;
  866. font-weight: 700;
  867. color: red;
  868. }
  869. &>.price2 {
  870. text-decoration: line-through;
  871. color: #aaaaaa;
  872. font-size: 24rpx;
  873. }
  874. }
  875. }
  876. }
  877. }
  878. }
  879. .officials {
  880. width: 100%;
  881. height: 104rpx;
  882. position: fixed;
  883. bottom: 100rpx;
  884. left: 0;
  885. z-index: 999;
  886. display: flex;
  887. align-items: center;
  888. justify-content: center;
  889. }
  890. .weixin_official_account {
  891. position: fixed;
  892. bottom: 100rpx;
  893. left: 0;
  894. display: flex;
  895. align-items: center;
  896. // justify-content: space-between;
  897. width: 718rpx;
  898. height: 104rpx;
  899. padding: 0 32rpx;
  900. margin-left: 16rpx;
  901. background: #3a3f54;
  902. border-radius: 16rpx;
  903. .off_logo {
  904. width: 48rpx;
  905. height: 48rpx;
  906. margin-right: 24rpx;
  907. }
  908. .one {
  909. color: #fff;
  910. font-size: 24rpx;
  911. font-weight: 500;
  912. }
  913. .two {
  914. color: #bcbec7;
  915. font-size: 20rpx;
  916. }
  917. .btn {
  918. position: relative;
  919. top: 0;
  920. left: 35rpx;
  921. width: 128rpx;
  922. height: 56rpx;
  923. line-height: 56rpx;
  924. padding: 0;
  925. background: linear-gradient(274deg, #408bf6 0%, #40b4f6 100%);
  926. border-radius: 156rpx;
  927. overflow: hidden;
  928. text-align: center;
  929. font-size: 24rpx;
  930. color: #fff;
  931. .official-account {
  932. position: absolute;
  933. z-index: 1000;
  934. right: -9px;
  935. top: -38px;
  936. opacity: 0;
  937. }
  938. }
  939. .close_icon {
  940. width: 40rpx;
  941. height: 40rpx;
  942. background: #ffffff;
  943. opacity: 0.2;
  944. display: flex;
  945. align-items: center;
  946. position: absolute;
  947. top: 0;
  948. right: 0;
  949. color: #fff;
  950. border-radius: 0rpx 16rpx;
  951. }
  952. .icon-close {
  953. display: flex;
  954. align-items: center;
  955. justify-content: center;
  956. width: 50rpx;
  957. height: 68rpx;
  958. font-size: 22rpx;
  959. color: #7b8284;
  960. }
  961. }
  962. </style>