index.vue 25 KB

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