teaching-case.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  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 1 activityList_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. const value = this.$store.state.user.openid;
  164. const urls = [
  165. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",//产教融合情境下的双创通识课程建设 | 丽湖职教双创教育国际虚拟教研室常规教研活动第2期顺利举
  166. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1209", //打造双创“金课” | 丽湖职教双创教
  167. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1211",//赛创融合、协同育人—高职院校双创大赛赛事组织| 丽湖职教双创教育国际虚拟教研室常规研活动第2期
  168. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",//丽湖职教双创教育国际虚拟教研室2023年常规教研
  169. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
  170. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
  171. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
  172. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00406339964N",
  173. ];
  174. if (value == '') {
  175. console.log(111);
  176. uni.navigateTo({
  177. url: "/pages/login_Wechat/login_Wechat",
  178. });
  179. } else {
  180. uni.navigateTo({
  181. url: "/pages/activityDetail/activityDetail?acId=" + clickedAcId,
  182. });
  183. // console.log("/pages/activityDetail/activityDetail?openid=" + value);
  184. // switch (edata) {
  185. // case 0:
  186. // uni.navigateTo({
  187. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[0]),
  188. // });
  189. // break;
  190. // case 1:
  191. // uni.navigateTo({
  192. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[1]),
  193. // });
  194. // break;
  195. // case 2:
  196. // uni.navigateTo({
  197. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[2]),
  198. // });
  199. // break;
  200. // case 3:
  201. // uni.navigateTo({
  202. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[3]),
  203. // });
  204. // break;
  205. // default:
  206. // uni.navigateTo({
  207. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(urls[3]),
  208. // });
  209. // break;
  210. // }
  211. }
  212. // if (this.item.btn) {
  213. // if (value == '') {
  214. // uni.navigateTo({
  215. // url: "/pages/login/login",
  216. // });
  217. // } else {
  218. // if (this.item.btn_2 === 1) {
  219. // const urls = [
  220. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1181",
  221. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
  222. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
  223. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1234",
  224. // ];
  225. // let index = this.indexId;
  226. // if (index >= 0 && index < urls.length) {
  227. // const url = urls[index];
  228. // uni.navigateTo({
  229. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  230. // });
  231. // }
  232. // } else {
  233. // //常规教研活动
  234. // const urls = [
  235. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
  236. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1211",
  237. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
  238. // "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1209",
  239. // ];
  240. // let index = this.indexId;
  241. // if (index >= 0 && index < urls.length) {
  242. // const url = urls[index];
  243. // uni.navigateTo({
  244. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  245. // });
  246. // }
  247. // }
  248. // }
  249. // } else {
  250. // const value = this.$store.state.user.openid;
  251. // if (value == '') {
  252. // uni.navigateTo({
  253. // url: "/pages/login/login",
  254. // });
  255. // } else {
  256. // //推荐课程
  257. // const urls = [
  258. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
  259. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
  260. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
  261. // "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00406339964N",
  262. // ];
  263. // let index = this.indexId;
  264. // if (index >= 0 && index < urls.length) {
  265. // const url = urls[index];
  266. // uni.navigateTo({
  267. // url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  268. // });
  269. // }
  270. // }
  271. // }
  272. },
  273. join() {
  274. const value = this.$store.state.user.openid;
  275. if (value == '') {
  276. uni.navigateTo({
  277. url: "/pages/login_Wechat/login_Wechat",
  278. });
  279. return 1;
  280. } else {
  281. //推荐课程
  282. const urls = [
  283. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
  284. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
  285. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
  286. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00406339964N",
  287. ];
  288. let index = this.indexId;
  289. if (index >= 0 && index < urls.length) {
  290. const url = urls[index];
  291. uni.navigateTo({
  292. url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  293. });
  294. }
  295. }
  296. },
  297. actApply() {
  298. const value = this.$store.state.user.openid;
  299. if (value == '') {
  300. uni.navigateTo({
  301. url: "/pages/login_Wechat/login_Wechat",
  302. });
  303. return 1;
  304. } else {
  305. if (this.item.btn_2 === 1) {
  306. const urls = [
  307. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1181",
  308. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
  309. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
  310. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1234",
  311. ];
  312. let index = this.indexId;
  313. if (index >= 0 && index < urls.length) {
  314. const url = urls[index];
  315. uni.navigateTo({
  316. url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  317. });
  318. }
  319. } else {
  320. //常规教研活动
  321. const urls = [
  322. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1183",
  323. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1211",
  324. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1210",
  325. "https://szptxnjys.yuketang.cn/pro/portal/announcementdetail/1209",
  326. ];
  327. let index = this.indexId;
  328. if (index >= 0 && index < urls.length) {
  329. const url = urls[index];
  330. uni.navigateTo({
  331. url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  332. });
  333. }
  334. }
  335. }
  336. },
  337. },
  338. };
  339. </script>
  340. <style lang="scss">
  341. .AClist {
  342. display: flex;
  343. justify-content: space-between;
  344. background-color: #ffffff;
  345. padding: 20rpx 30rpx;
  346. }
  347. .teaching_case {
  348. display: flex;
  349. justify-content: space-between;
  350. // margin-bottom: 10px;
  351. background-color: #ffffff;
  352. padding: 20rpx 30rpx;
  353. // padding-bottom: 50rpx;
  354. .img {
  355. width: 160rpx;
  356. height: 160rpx;
  357. image {
  358. width: 100%;
  359. height: 100%;
  360. border-radius: 10rpx;
  361. }
  362. }
  363. .right {
  364. padding-left: 20rpx;
  365. flex: 1;
  366. // height: 300px;
  367. width: 100rpx;
  368. display: flex;
  369. flex-direction: column;
  370. // align-content: flex-end ;
  371. justify-content: space-between;
  372. // align-content: space-between;
  373. .title {
  374. display: flex;
  375. justify-content: flex-start;
  376. align-items: center;
  377. margin-bottom: 15rpx;
  378. // margin-bottom: 10rpx;
  379. .tag {
  380. border: 1px #00b2b6 solid;
  381. flex-shrink: 0;
  382. letter-spacing: 2rpx;
  383. width: 64rpx;
  384. height: 32rpx;
  385. display: flex;
  386. white-space: nowrap;
  387. justify-content: center;
  388. align-items: center;
  389. border-radius: 4rpx;
  390. margin-right: 10rpx;
  391. color: #00b2b6;
  392. line-height: 32rpx;
  393. }
  394. text {
  395. font-weight: bold;
  396. overflow: hidden;
  397. text-overflow: ellipsis;
  398. white-space: nowrap;
  399. }
  400. }
  401. .introduce {
  402. // font-size: 28rpx;
  403. color: #a7a7a7;
  404. // padding: 20rpx 0;
  405. // width: 560rpx;
  406. height: 40rpx;
  407. overflow: hidden;
  408. text-overflow: ellipsis;
  409. white-space: nowrap;
  410. }
  411. .operate {
  412. display: flex;
  413. justify-content: space-between;
  414. // align-items: baseline;
  415. align-items: flex-end;
  416. .left {
  417. display: flex;
  418. // justify-content: space-between;
  419. // align-items: center;
  420. align-items: baseline;
  421. // width: 200rpx;
  422. .opr {
  423. display: flex;
  424. align-items: center;
  425. .icon {
  426. width: 32rpx;
  427. height: 32rpx;
  428. display: flex;
  429. justify-content: center;
  430. align-items: center;
  431. }
  432. text {
  433. padding-left: 3rpx;
  434. color: #666666;
  435. }
  436. }
  437. .pernum {
  438. color: #666666;
  439. // font-size: 30rpx;
  440. }
  441. .price {
  442. // font-size: 40rpx;
  443. font-weight: bold;
  444. color: #f8a551;
  445. padding-right: 10rpx;
  446. }
  447. }
  448. .btn {
  449. z-index: 5;
  450. border: none;
  451. padding: 0;
  452. text-align: center;
  453. // padding: 8px, 24px, 8px, 24px;
  454. background-color: rgba(48, 129, 232, 1);
  455. color: #fff;
  456. border-radius: 100rpx;
  457. float: right;
  458. width: 144rpx;
  459. height: 48rpx;
  460. line-height: 48rpx;
  461. letter-spacing: 1px;
  462. }
  463. }
  464. }
  465. }
  466. </style>