teaching-case.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. <template>
  2. <view>
  3. <view class="teaching_case" v-for="(i,index) in classList" :key="index + 'a'" @click="gotoTeDetail" :data-index="index">
  4. <view class="img cell-img">
  5. <image :src="i.img" v-if="!item.btn" mode="aspectFill"></image>
  6. </view>
  7. <view class="right">
  8. <view class="">
  9. <view class="title">
  10. <view v-if="!item.btn" class="tag bqZ-font">类型</view>
  11. <text class="btn-font" v-if="!item.btn" style="">{{i.className}}</text>
  12. </view>
  13. <view v-if="!item.btn" class="introduce fwb-font">
  14. {{ i.intro }}
  15. </view>
  16. </view>
  17. <view class="operate">
  18. <view class="left">
  19. <view class="opr" style="padding-right: 25rpx">
  20. <view class="icon">
  21. <image src="http://43.139.158.220:5007/img/static/yym/Star 1 (Stroke).png"
  22. style="width: 28rpx; height: 26rpx" mode="aspectFill"></image>
  23. </view>
  24. <text class="fz-font">收藏</text>
  25. </view>
  26. <view class="opr">
  27. <view class="icon">
  28. <image src="http://43.139.158.220:5007/img/static/yym/Vector (Stroke).png"
  29. style="width: 22rpx; height: 26rpx" mode="aspectFill"></image>
  30. </view>
  31. <text class="fz-font">订阅</text>
  32. </view>
  33. </view>
  34. <view class="">
  35. <button class="btn sBtn-font" disableEventPropagation="true" @click.stop="join">
  36. 立即参与
  37. </button>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <!-- 活动列表 -->
  43. <view class="teaching_case" v-for="(i,index) in activeList" @click="gotoACdetail" :data-index="index"
  44. :key="index + 'b'">
  45. <view class="img cell-img">
  46. <image :src="i.pic" mode="aspectFill"></image>
  47. </view>
  48. <view class="right">
  49. <view class="">
  50. <view class="title">
  51. <view class="tag bqZ-font">类型</view>
  52. <text class="three-font">{{ i.acName }}</text>
  53. </view>
  54. <view class="introduce fwb-font">
  55. {{ i.brief }}
  56. </view>
  57. </view>
  58. <view class="operate">
  59. <view class="left">
  60. <view class="price num-font"><text class="three-font">¥</text>{{ i.cost }}</view>
  61. <view class="pernum fz-font">已报名{{ i.pers }}人</view>
  62. </view>
  63. <view class="">
  64. <button class="btn sBtn-font" @click.stop="actApply">立即报名</button>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- <view class="" style="height: 50rpx;width: 100%;background-color: #ffffff;"></view> -->
  70. </view>
  71. </template>
  72. <script>
  73. export default {
  74. name: "teaching-case",
  75. props: {
  76. item: {
  77. type: Object,
  78. default () {
  79. return {
  80. btn: 0, //0教研列表 1活动列表
  81. btn_2: 0 //0 activityList 0 activityList_2 1 liveactivityList 2
  82. };
  83. },
  84. },
  85. classList: {
  86. type: Array,
  87. default () {
  88. return [];
  89. },
  90. },
  91. activeList: {
  92. type: Array,
  93. default () {
  94. return [];
  95. },
  96. },
  97. indexId: {
  98. type: Number,
  99. },
  100. },
  101. data() {
  102. return {};
  103. },
  104. methods: {
  105. gotoTeDetail(e) {
  106. console.log(e.currentTarget.dataset['index'], 123);
  107. let edata = e.currentTarget.dataset['index']
  108. const value = this.$store.state.user.openid;
  109. const urls = [
  110. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",//产教融合情境下的双创通识课程建设 | 丽湖职教双创教育国际虚拟教研室常规教研活动第2期顺利举
  111. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1209", //打造双创“金课” | 丽湖职教双创教
  112. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1211",//赛创融合、协同育人—高职院校双创大赛赛事组织| 丽湖职教双创教育国际虚拟教研室常规研活动第2期
  113. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
  114. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1181",
  115. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
  116. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
  117. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1234",
  118. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
  119. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
  120. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
  121. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00406339964N",
  122. ];
  123. console.log(value);
  124. if (value == '') {
  125. // console.log(111);
  126. uni.navigateTo({
  127. url: "/pages/login_Wechat/login_Wechat",
  128. });
  129. } else {
  130. switch (edata) {
  131. case 0:
  132. uni.navigateTo({
  133. url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[0]),
  134. });
  135. break;
  136. case 1:
  137. uni.navigateTo({
  138. url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[1]),
  139. });
  140. break;
  141. case 2:
  142. uni.navigateTo({
  143. url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[2]),
  144. });
  145. break;
  146. case 3:
  147. uni.navigateTo({
  148. url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[3]),
  149. });
  150. break;
  151. default:
  152. uni.navigateTo({
  153. url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[3]),
  154. });
  155. break;
  156. }
  157. }
  158. },
  159. gotoACdetail(e) {
  160. console.log(e.currentTarget.dataset['index'], 123);
  161. let edata = e.currentTarget.dataset['index'];
  162. const clickedAcId = this.activeList[edata].acId;
  163. console.log(clickedAcId);
  164. const value = this.$store.state.user.openid;
  165. const urls = [
  166. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",//产教融合情境下的双创通识课程建设 | 丽湖职教双创教育国际虚拟教研室常规教研活动第2期顺利举
  167. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1209", //打造双创“金课” | 丽湖职教双创教
  168. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1211",//赛创融合、协同育人—高职院校双创大赛赛事组织| 丽湖职教双创教育国际虚拟教研室常规研活动第2期
  169. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",//丽湖职教双创教育国际虚拟教研室2023年常规教研
  170. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
  171. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
  172. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
  173. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00406339964N",
  174. ];
  175. if (value == '') {
  176. console.log(111);
  177. uni.navigateTo({
  178. url: "/pages/login_Wechat/login_Wechat",
  179. });
  180. } else {
  181. if (this.item.btn_2 === 1) {
  182. uni.navigateTo({
  183. url: "/pages/teachingDetail/teachingDetail?acId=" + clickedAcId,
  184. });
  185. }else if (this.item.btn_2 === 2) {
  186. uni.navigateTo({
  187. url: "/pages/activityDetail/activityDetail?acId=" + clickedAcId + "&ty=0",
  188. });
  189. }else{
  190. uni.navigateTo({
  191. url: "/pages/activityDetail/activityDetail?acId=" + clickedAcId + "&ty=1",
  192. });
  193. }
  194. // console.log("/pages/activityDetail/activityDetail?openid=" + value);
  195. // switch (edata) {
  196. // case 0:
  197. // uni.navigateTo({
  198. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[0]),
  199. // });
  200. // break;
  201. // case 1:
  202. // uni.navigateTo({
  203. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[1]),
  204. // });
  205. // break;
  206. // case 2:
  207. // uni.navigateTo({
  208. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[2]),
  209. // });
  210. // break;
  211. // case 3:
  212. // uni.navigateTo({
  213. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[3]),
  214. // });
  215. // break;
  216. // default:
  217. // uni.navigateTo({
  218. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[3]),
  219. // });
  220. // break;
  221. // }
  222. }
  223. // if (this.item.btn) {
  224. // if (value == '') {
  225. // uni.navigateTo({
  226. // url: "/pages/login/login",
  227. // });
  228. // } else {
  229. // if (this.item.btn_2 === 1) {
  230. // const urls = [
  231. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1181",
  232. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
  233. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
  234. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1234",
  235. // ];
  236. // let index = this.indexId;
  237. // if (index >= 0 && index < urls.length) {
  238. // const url = urls[index];
  239. // uni.navigateTo({
  240. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  241. // });
  242. // }
  243. // } else {
  244. // //常规教研活动
  245. // const urls = [
  246. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
  247. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1211",
  248. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
  249. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1209",
  250. // ];
  251. // let index = this.indexId;
  252. // if (index >= 0 && index < urls.length) {
  253. // const url = urls[index];
  254. // uni.navigateTo({
  255. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  256. // });
  257. // }
  258. // }
  259. // }
  260. // } else {
  261. // const value = this.$store.state.user.openid;
  262. // if (value == '') {
  263. // uni.navigateTo({
  264. // url: "/pages/login/login",
  265. // });
  266. // } else {
  267. // //推荐课程
  268. // const urls = [
  269. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
  270. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
  271. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
  272. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00406339964N",
  273. // ];
  274. // let index = this.indexId;
  275. // if (index >= 0 && index < urls.length) {
  276. // const url = urls[index];
  277. // uni.navigateTo({
  278. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  279. // });
  280. // }
  281. // }
  282. // }
  283. },
  284. join() {
  285. const value = this.$store.state.user.openid;
  286. if (value == '') {
  287. uni.navigateTo({
  288. url: "/pages/login_Wechat/login_Wechat",
  289. });
  290. return 1;
  291. } else {
  292. //推荐课程
  293. const urls = [
  294. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
  295. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
  296. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
  297. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00406339964N",
  298. ];
  299. let index = this.indexId;
  300. if (index >= 0 && index < urls.length) {
  301. const url = urls[index];
  302. uni.navigateTo({
  303. url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  304. });
  305. }
  306. }
  307. },
  308. actApply() {
  309. const value = this.$store.state.user.openid;
  310. if (value == '') {
  311. uni.navigateTo({
  312. url: "/pages/login_Wechat/login_Wechat",
  313. });
  314. return 1;
  315. } else {
  316. if (this.item.btn_2 === 1) {
  317. const urls = [
  318. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1181",
  319. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
  320. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
  321. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1234",
  322. ];
  323. let index = this.indexId;
  324. if (index >= 0 && index < urls.length) {
  325. const url = urls[index];
  326. uni.navigateTo({
  327. url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  328. });
  329. }
  330. } else {
  331. //常规教研活动
  332. const urls = [
  333. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
  334. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1211",
  335. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
  336. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1209",
  337. ];
  338. let index = this.indexId;
  339. if (index >= 0 && index < urls.length) {
  340. const url = urls[index];
  341. uni.navigateTo({
  342. url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  343. });
  344. }
  345. }
  346. }
  347. },
  348. },
  349. };
  350. </script>
  351. <style lang="scss">
  352. .AClist {
  353. display: flex;
  354. justify-content: space-between;
  355. background-color: #ffffff;
  356. padding: 20rpx 30rpx;
  357. }
  358. .teaching_case {
  359. display: flex;
  360. justify-content: space-between;
  361. // margin-bottom: 10px;
  362. background-color: #ffffff;
  363. padding: 20rpx 30rpx;
  364. // padding-bottom: 50rpx;
  365. .img {
  366. width: 160rpx;
  367. height: 160rpx;
  368. image {
  369. width: 100%;
  370. height: 100%;
  371. border-radius: 10rpx;
  372. }
  373. }
  374. .right {
  375. padding-left: 20rpx;
  376. flex: 1;
  377. // height: 300px;
  378. width: 100rpx;
  379. display: flex;
  380. flex-direction: column;
  381. // align-content: flex-end ;
  382. justify-content: space-between;
  383. // align-content: space-between;
  384. .title {
  385. display: flex;
  386. justify-content: flex-start;
  387. align-items: center;
  388. margin-bottom: 15rpx;
  389. // margin-bottom: 10rpx;
  390. .tag {
  391. border: 1px #00b2b6 solid;
  392. flex-shrink: 0;
  393. letter-spacing: 2rpx;
  394. width: 64rpx;
  395. height: 32rpx;
  396. display: flex;
  397. white-space: nowrap;
  398. justify-content: center;
  399. align-items: center;
  400. border-radius: 4rpx;
  401. margin-right: 10rpx;
  402. color: #00b2b6;
  403. line-height: 32rpx;
  404. }
  405. text {
  406. font-weight: bold;
  407. overflow: hidden;
  408. text-overflow: ellipsis;
  409. white-space: nowrap;
  410. }
  411. }
  412. .introduce {
  413. // font-size: 28rpx;
  414. color: #a7a7a7;
  415. // padding: 20rpx 0;
  416. // width: 560rpx;
  417. height: 40rpx;
  418. overflow: hidden;
  419. text-overflow: ellipsis;
  420. white-space: nowrap;
  421. }
  422. .operate {
  423. display: flex;
  424. justify-content: space-between;
  425. // align-items: baseline;
  426. align-items: flex-end;
  427. .left {
  428. display: flex;
  429. // justify-content: space-between;
  430. // align-items: center;
  431. align-items: baseline;
  432. // width: 200rpx;
  433. .opr {
  434. display: flex;
  435. align-items: center;
  436. .icon {
  437. width: 32rpx;
  438. height: 32rpx;
  439. display: flex;
  440. justify-content: center;
  441. align-items: center;
  442. }
  443. text {
  444. padding-left: 3rpx;
  445. color: #666666;
  446. }
  447. }
  448. .pernum {
  449. color: #666666;
  450. // font-size: 30rpx;
  451. }
  452. .price {
  453. // font-size: 40rpx;
  454. font-weight: bold;
  455. color: #f8a551;
  456. padding-right: 10rpx;
  457. }
  458. }
  459. .btn {
  460. z-index: 5;
  461. border: none;
  462. padding: 0;
  463. text-align: center;
  464. // padding: 8px, 24px, 8px, 24px;
  465. background-color: rgba(48, 129, 232, 1);
  466. color: #fff;
  467. border-radius: 100rpx;
  468. float: right;
  469. width: 144rpx;
  470. height: 48rpx;
  471. line-height: 48rpx;
  472. letter-spacing: 1px;
  473. }
  474. }
  475. }
  476. }
  477. </style>