index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  1. <template>
  2. <div class="m-right-block fr mh576">
  3. <div class="right-block-bd ng-scope" ui-view="myStudyContent" style="position: relative;">
  4. <div class="panel-tit clear">
  5. <p class="fl">推荐课程</p>
  6. <ul class="fr tips-intro" style="color:royalblue" @mouseover="showTip=true" @mouseleave="showTip=false">
  7. <li class="fs15 tit">
  8. <i class="p-ico questiong-ico" style="margin-right: 0px;" /> 已将近退休年龄,是否还需要参加继续教育?
  9. </li>
  10. </ul>
  11. <div class="fr tip-card" v-show="showTip">
  12. <div class="p20">
  13. <h3>一、建设从业人员:</h3>
  14. <h5 style="margin: 8px;">1、安管人员:</h5>
  15. <h5 style="margin-left: 16px;">①企业主要负责人(A证):年龄18周岁以上。</h5>
  16. <h5 style="margin-left: 16px;">②项目负责人(B证):年龄18周岁以上,65周岁以下。</h5>
  17. <h5 style="margin-left: 16px;">③“安管人员”C证,男性持证人员从60周岁逐步延长至63周岁(退休年龄从2025年1月1日起,每四个月延迟一个月)</h5>
  18. <h4 style="margin: 8px;">2、特种作业人员:男性持证人员从60周岁逐步延长至63周岁(退休年龄从2025年1月1日起,每四个月延迟一个月);女性持证人员年龄上限55周岁。</h4>
  19. <h4 style="margin: 8px;">3、八大员:年龄20周岁以上,且男性不超过60周岁,女性不超过55周岁。</h4>
  20. <h4 style="margin: 8px;">4、C证: 年龄18周岁以上,男性从60周岁逐步延长至63周岁(退休年龄从2025年1月1日起,每四个月延迟一个月),女性60周岁以下;</h4>
  21. <h4 style="margin: 8px;">5、特种:年满18周岁以上,男性从60周岁逐步延长至63周岁(退休年龄从2025年1月1日起,每四个月延迟一个月),女性55周岁以下;</h4>
  22. <h2 style="margin:8px 0 16px 0px;">二、执业注册人员:</h2>
  23. <h4 style="margin: 8px;">1、注册建造师(一级、二级)、注册监理工程师:年龄65周岁以下;</h4>
  24. <h4 style="margin: 8px;">2、其他执业资格注册证件无年龄要求。</h4>
  25. </div>
  26. </div>
  27. </div>
  28. <el-row class="pt-line mt20">
  29. <el-col :span="6" :xs="12">
  30. <el-button :class="{type_active : type==''}" class="type_item" type="text" @click="type=''">所有</el-button>
  31. </el-col>
  32. <el-col :span="6" :xs="12" v-for="item in typeList" :key="item.id" v-if="item.isOpen && item.isNew==0 && !item.link">
  33. <el-button :class="{type_active:item.name==type }" class="type_item" type="text"
  34. @click="type=item.name">{{item.name}}</el-button>
  35. </el-col>
  36. </el-row>
  37. <div class="mt10" v-if="type=='施工现场专业人员'">
  38. <p style="color: red;font-size: 16px;">
  39. 报名对象为:2020年度及以后由培训单位核发的和2021年度换发的“电子培训合格证”且每年度需参加继续教育人员
  40. </p>
  41. <p style="color: red;font-size: 16px;">
  42. 注意:继续教育学员请先下载
  43. <a style="color: blue;cursor: hand;"
  44. href="https://sm.hqedust.com/cdn/%E7%BB%A7%E7%BB%AD%E6%95%99%E8%82%B2%E5%A7%94%E6%89%98%E5%9F%B9%E8%AE%AD%E3%80%81%E6%89%BF%E8%AF%BA%E5%87%BD.doc">
  45. 《继续教育委托培训、承诺函》
  46. </a>
  47. ,填写并加盖单位公章后,在申请开通课程界面上传扫描件、并缴费
  48. </p>
  49. </div>
  50. <!-- <div class="mt10" v-if="type=='燃气经营企业'">
  51. <p style="color: red;font-size: 16px;">
  52. 注意:继续教育学员请先下载
  53. <a style="color: blue;cursor: hand;" href="https://sm.hqedust.com/cdn/%E7%87%83%E6%B0%94%E4%BA%BA%E5%91%98%E4%BA%BA%E5%91%98%E5%B2%97%E4%BD%8D%E7%BB%A7%E7%BB%AD%E6%95%99%E8%82%B2%E5%A7%94%E6%89%98%E5%9F%B9%E8%AE%AD%E3%80%81%E6%89%BF%E8%AF%BA%E5%87%BD.doc">
  54. 《燃气人员人员岗位继续教育委托培训、承诺函》
  55. </a>
  56. ,填写并加盖单位公章后,在申请开通课程界面上传扫描件、并缴费
  57. </p>
  58. </div> -->
  59. <ul class="pt-line mt20" v-if="ndList.length>1">
  60. <li style="float: left;font-size: 16px;margin: 4px;padding: 4px;">
  61. <span>课程年度:</span>
  62. </li>
  63. <li style="float: left;">
  64. <span :class="{type_active:nd==''}" class="nav-btn-years" @click="nd=''">所有</span>
  65. </li>
  66. <li v-for="item in ndList" style="float: left;">
  67. <span :class="{type_active:item==nd }" class="nav-btn-years" @click="nd=item">{{item}} </span>
  68. </li>
  69. <li style="float: left;">
  70. <input type="text" style="line-height: 1;padding: 10px" v-model="filterName"
  71. class="ui-ipt ng-pristine ng-valid filterName" placeholder="输入名字查找">
  72. </li>
  73. </ul>
  74. <ul class="m-course-list clear mt10 classlist">
  75. <li v-for="(item,index) in list.slice(page*size-size, page*size)" :key="item.course_id"
  76. class="pt-sola mt20 pb10">
  77. <div>
  78. <span v-if="item.isFinish==1" class="p-ico2 ico-passed"></span>
  79. <div class="img">
  80. <img :src="item.tb">
  81. <div class="year-label">
  82. <span v-if="item.is_pay==0 && item.buyImg =='' && item.payNo == ''">
  83. 还未购买
  84. </span>
  85. <span v-else-if="item.is_pay == 2 && item.is_import ==9">
  86. 预购买中
  87. </span>
  88. <span v-else-if="item.is_pay==0" style="background-color: orange;">
  89. 等待审核
  90. </span>
  91. <span v-else-if="item.is_pay==2" style="background-color: #78335F;">申请驳回</span>
  92. <span v-else-if="!item.is_pass"
  93. style="background-color: blue;padding: 2px;border-radius: 2px;">在学习中</span>
  94. <span v-else style="background-color: green;padding: 2px;border-radius: 2px;">已经完成</span>
  95. </div>
  96. <div class="hover-block">
  97. <div class="mask-bg"></div>
  98. <el-button @click="gotoPlay(item)" v-if="item.is_pay==1"
  99. class="ui-btn btn-blue">进入学习</el-button>
  100. <el-button @click="goPay(item)" v-else-if="item.is_pay==2 || !!item.buyImg"
  101. class="ui-btn btn-w">补充材料</el-button>
  102. <el-button @click="goPay(item)" v-else-if="item.payErr" class="ui-btn btn-gr">申请购买</el-button>
  103. <el-button @click="goPay(item)" v-else class="ui-btn btn-o">购买课程</el-button>
  104. </div>
  105. </div>
  106. <div class="tit"><a>{{item.displayName || item.name}}</a>
  107. </div>
  108. <div class="info">
  109. <p class="w1"><span class="p-ico c1"></span> {{item.type}} </p>
  110. <p class="w2"><span class="p-ico c2"></span>{{item.nd||'2020'}}</p>
  111. <p class="w1">
  112. <span class="p-ico c5"></span> ¥{{item.fee/100}}元
  113. </p>
  114. <p class="w2">
  115. <span class="p-ico c3"></span> {{item.xs/10}}学时
  116. </p>
  117. </div>
  118. </div>
  119. </li>
  120. </ul>
  121. <div v-if="list.length==0" class="tc mt20 red">
  122. <span style="color: red;padding:40px;font-size: 26px;">已经最后一页了</span>
  123. </div>
  124. <el-pagination class="m-pages" @current-change="(page)=>{this.page=page}" :current-page="page" :page-size="size"
  125. layout="total, prev, pager, next" :total="list.length">
  126. </el-pagination>
  127. </div>
  128. <el-dialog title="申请开通课程" :visible.sync="buyCourseDialog" width="850px" top="20px" align="center">
  129. <el-form label-width="80px" label-position="right" :inline="true" :model="buyForm" status-icon :rules="rules"
  130. ref="elForm">
  131. <el-row align="left">
  132. <el-col :lg="12" class="pl20 pr20">
  133. <el-form-item lable="报考岗位" prop="courseName">
  134. <label slot="label">报考岗位</label>
  135. <el-input v-model="buyForm.courseName" type="text" placeholder="报考岗位" style="width: 260px;"></el-input>
  136. </el-form-item>
  137. </el-col>
  138. <el-col :lg="12" class="pl20 pr20">
  139. <el-form-item lable="证书编号" prop="rzCode">
  140. <label slot="label">证书编号</label>
  141. <el-input v-model="buyForm.rzCode" type="text" style="width: 260px;">
  142. <template #suffix>
  143. <el-button @click="openShowAllRzcodeDialog" type="text">修改</el-button>
  144. </template>
  145. </el-input>
  146. </el-form-item>
  147. </el-col>
  148. <!-- <el-row>
  149. <span style="color: red;padding:10px"> 请认真核实报考岗位与证书编号,本课程不支持退款</span>
  150. </el-row> -->
  151. <el-col :lg="12" class="pl20 pr20">
  152. <el-form-item lable="邮箱地址" prop="email">
  153. <label slot="label">邮箱地址</label>
  154. <el-input v-model="buyForm.email" type="textarea" placeholder="邮箱地址" style="width: 260px;"></el-input>
  155. </el-form-item>
  156. </el-col>
  157. <el-col :span="12" class="pl20 pr20">
  158. <el-form-item lable="订单号" prop="payNo">
  159. <label slot="label">订单编号</label>
  160. <el-input v-model="buyForm.payNo" placeholder="输入订单编号后6位" style="width: 260px;" :minlength="6"
  161. :maxlength="6" show-word-limit></el-input>
  162. </el-form-item>
  163. </el-col>
  164. </el-row>
  165. <el-row>
  166. <el-col :span="12" class="pl20 pr20">
  167. <el-form-item lable="工作单位" prop="company">
  168. <label slot="label">工作单位</label>
  169. <el-input v-model="buyForm.company" type="textarea" placeholder="工作单位" style="width: 260px;"></el-input>
  170. </el-form-item>
  171. </el-col>
  172. <el-col :span="12" class="pl20 pr20">
  173. <el-form-item lable="备注信息" prop="marks">
  174. <label slot="label">备注信息</label>
  175. <el-input v-model="buyForm.marks" type="textarea" placeholder="姓名+工种名称,例:张三+土建施工员"
  176. style="width: 260px;"></el-input>
  177. </el-form-item>
  178. </el-col>
  179. </el-row>
  180. <el-row v-if="typeInfo.needPromise==1">
  181. <div style="width: 700px;margin: 0 auto;text-align: left;color: red;">
  182. 提示:继续教育承诺函企业名称应与个人报名系统企业名称一致,如已变更单位的,
  183. 请先在个人系统帐号设置进入额外信息栏进行修改工作单位与报名承诺函工作单位相符后方可上传承诺函确认
  184. </div>
  185. <img :src="buyForm.buyImg" :onerror="errorImg" style="width: 160px;text-align: center;">
  186. <do-upload @onFinish="(url)=>{buyForm.buyImg=url}" placeholder="上传承诺书" width="160px"> </do-upload>
  187. </el-row>
  188. <el-row>
  189. <h2 class="tc"> 本课程费用: <strong style="color: red;"> {{buyForm.fee/100}} 元 </strong> </h2>
  190. <div style="width: 300px; margin: 0px auto;">
  191. <img src="/static/images/wxpay.jpg" width="300px" @click="showImg(buyForm.buyImg)">
  192. </div>
  193. </el-row>
  194. <el-row class="tc fc">
  195. <el-form-item>
  196. <el-button @click="cancelBuyCourse">取 消</el-button>
  197. <el-button @click="buyCourse" type="primary">确 定</el-button>
  198. </el-form-item>
  199. </el-row>
  200. </el-form>
  201. </el-dialog>
  202. <el-dialog :title="promiseType[promise.showType]" class="fc tc" :visible.sync="commitmentDialog">
  203. <div>
  204. <div>
  205. <div class="commitment-header"> {{promise.title}} </div>
  206. <div class="tl commitment">
  207. {{promise.content}}
  208. </div>
  209. <div class="commitment-footer">
  210. {{promise.footer}}
  211. </div>
  212. </div>
  213. <div class="tl commitment-content mt20" v-if="promise.showType==2">
  214. <el-radio-group v-model="isCommitment">
  215. <el-row class="mt10">
  216. <el-radio :label="true">本人作出上述承诺</el-radio>
  217. </el-row>
  218. <el-row class="mt10">
  219. <el-radio :label="false">本人不作出上述承诺</el-radio>
  220. </el-row>
  221. </el-radio-group>
  222. </div>
  223. <span slot="footer" class="dialog-footer" v-if="promise.showType==2">
  224. <el-button @click="commitmentDialog = false">取 消</el-button>
  225. <el-button type="primary" :disabled="isCommitment?false:true" @click="buyCourseDialog=true">确 定</el-button>
  226. </span>
  227. <div slot="footer" class="dialog-footer mt20" v-else>
  228. <el-button @click="commitmentDialog = false">取 消</el-button>
  229. <el-button type="primary" @click="buyCourseDialog=true">继续购买</el-button>
  230. </div>
  231. </div>
  232. </el-dialog>
  233. <el-dialog append-to-body close-on-click-modal :visible.sync="showImgDialog" style="margin-top: 0px;"
  234. :width="width">
  235. <img :src="imgUrl" @load="onLoad" alt="" />
  236. </el-dialog>
  237. <el-dialog append-to-body close-on-click-modal :visible.sync="showAllRzcodeDialog" width="1024">
  238. <el-table v-if="buyForm.list.length>0" :data="buyForm.list" border>
  239. <el-table-column label="证书编号" prop="certificateNum" align="center" />
  240. <el-table-column label="岗位名称" prop="positionName" align="center" />
  241. <el-table-column label="证书状态" prop="certificateStatus" align="center" />
  242. <el-table-column label="发证机关" prop="certificateOrgan" align="center" />
  243. <el-table-column label="发证时间" prop="startTime" align="center" />
  244. <el-table-column label="选择" prop="reviewTime" align="center">
  245. <template slot-scope="{row}">
  246. <el-button @click="selectRzcode(row)" type="primary">选择</el-button>
  247. </template>
  248. </el-table-column>
  249. </el-table>
  250. </el-dialog>
  251. </div>
  252. </template>
  253. <script>
  254. import {
  255. httpServer
  256. } from "@/components/httpServer/httpServer.js";
  257. import {
  258. MessageBox
  259. } from "element-ui";
  260. import {
  261. parseTime
  262. } from "@/utils";
  263. import DoUpload from '@/components/upload/index.vue'
  264. import exampleImg from '@/assets/template.png'
  265. import {curDatetime} from '@/utils/date.js'
  266. import {
  267. mapGetters,
  268. mapActions
  269. } from "vuex";
  270. export default {
  271. name: "Index",
  272. data() {
  273. return {
  274. page: 1,
  275. size: 6,
  276. total: 0,
  277. stage: 0,
  278. isCompanyPay: 0,
  279. showTip: false,
  280. width: "",
  281. type: '',
  282. filterName: '',
  283. list: [],
  284. nd: new Date().getFullYear() + '',
  285. ndList: [],
  286. allList: [],
  287. isCommitment: "",
  288. buyCourseDialog: false,
  289. showExample: false,
  290. showImgDialog: false,
  291. showAllRzcodeDialog: false,
  292. promiseType: {
  293. 1: '温馨提示',
  294. 2: '承诺书',
  295. 3: '委 托 书'
  296. },
  297. buyForm: {
  298. marks: '',
  299. rzCode: '',
  300. payNo: '',
  301. email: '',
  302. company: '',
  303. buyImg: '',
  304. name: '',
  305. courseName: '',
  306. list: []
  307. },
  308. promise: {
  309. status: 0,
  310. showType: 1
  311. },
  312. typeInfo:{
  313. },
  314. imgUrl: '',
  315. qrcodeUrl: "",
  316. outTradeNo: "",
  317. courseFee: 0,
  318. title: '',
  319. timer: null,
  320. tickCount: 0,
  321. listLoading: false,
  322. media: {},
  323. commitmentDialog: false,
  324. exampleImg: exampleImg,
  325. rules: {
  326. rzCode: [{
  327. required: true,
  328. message: '请输入证书编号'
  329. }],
  330. payNo: [{
  331. required: true,
  332. message: '请输入订单编号后六位'
  333. }],
  334. marks: [{
  335. required: true,
  336. message: '请输入备注信息'
  337. }],
  338. email: [{
  339. required: true,
  340. message: '请输入有效邮箱'
  341. },
  342. {
  343. type: 'string',
  344. message: '邮箱格式不正确',
  345. trigger: 'blur',
  346. transform(value) {
  347. value = value.trim();
  348. if (!/^\w+((-\w+)|(\.\w+))*@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value)) {
  349. return true
  350. } else {}
  351. }
  352. }
  353. ],
  354. company: [{
  355. required: true,
  356. message: '请输入所在企业'
  357. }],
  358. courseName: [{
  359. required: true,
  360. message: '请输入报考岗位'
  361. }]
  362. },
  363. errorImg: 'this.src="' + require('../../../assets/images/no-data_hash5abcd2ef62.png') + '"'
  364. };
  365. },
  366. computed: {
  367. ...mapGetters("user", ["typeList", "userInfo", "promiseList"])
  368. },
  369. components: {
  370. DoUpload
  371. },
  372. filters: {
  373. dateFilter(val) {
  374. return parseTime(val, '{y}-{m}-{d}')
  375. }
  376. },
  377. watch: {
  378. type(val) {
  379. this.page = 1
  380. this.nd = new Date().getFullYear() + ''
  381. this.filterData()
  382. },
  383. nd(val) {
  384. this.filterData()
  385. },
  386. filterName() {
  387. this.page = 1
  388. this.filterData()
  389. },
  390. isCommitment(val) {
  391. console.log(val)
  392. }
  393. },
  394. beforeMount() {
  395. this.type = this.$route.query.type || ''
  396. this.getData();
  397. },
  398. beforeDestroy() {
  399. if (this.timer) window.clearInterval(this.timer);
  400. },
  401. methods: {
  402. showImg(url) {
  403. if (!url) return;
  404. this.imgUrl = url;
  405. this.showImgDialog = true;
  406. },
  407. closeDialog() {
  408. if (this.timer) window.clearInterval(this.timer);
  409. },
  410. onLoad(e) {
  411. const img = e.target;
  412. let width = 0;
  413. if (img.fileSize > 0 || (img.width > 1 && img.height > 1)) {
  414. width = img.width + 40;
  415. }
  416. this.width = width + "px";
  417. },
  418. matchPromise(row) {
  419. let {type,name} = row;
  420. let isMatch = false
  421. for (let i in this.promiseList) {
  422. let item = this.promiseList[i];
  423. if (name == item.type || item.type == type) {
  424. this.promise = Object.assign(this.promise, item);
  425. console.log("promise", this.promise);
  426. isMatch = true
  427. } else if (!isMatch && item.type == '默认类型') {
  428. this.promise = Object.assign(this.promise, item);
  429. }
  430. }
  431. },
  432. matchType(type) {
  433. for (let i in this.typeList) {
  434. let item = this.typeList[i];
  435. if(item.name == type) {
  436. this.typeInfo = Object.assign(this.typeInfo, item);
  437. return;
  438. }
  439. }
  440. },
  441. getData() {
  442. let param = {
  443. size: 1000,
  444. trainType: 2,
  445. from: 0
  446. }
  447. httpServer("course.getcoursemarket", param).then((res) => {
  448. if (res.code == 200) {
  449. this.allList = res.data.list;
  450. this.filterData()
  451. }
  452. });
  453. },
  454. filterData() {
  455. let nd = this.nd || '';
  456. let filterName = this.filterName || '';
  457. let type = this.type || ''
  458. this.ndList = [];
  459. this.list = [];
  460. for (let i in this.allList) {
  461. let item = this.allList[i];
  462. if (type != '' && item.type != type) continue;
  463. if (this.ndList.indexOf(item.nd) == -1) {
  464. this.ndList.push(item.nd);
  465. }
  466. if (filterName!='' && item.name.indexOf(filterName) == -1) continue;
  467. if (nd != '' && item.nd != nd) continue;
  468. this.list.push(item)
  469. }
  470. },
  471. cancelBuyCourse() {
  472. this.$refs["elForm"].resetFields();
  473. this.buyCourseDialog = false
  474. this.commitmentDialog = false;
  475. },
  476. openShowAllRzcodeDialog() {
  477. this.showAllRzcodeDialog = true;
  478. },
  479. selectRzcode(row) {
  480. this.buyForm.rzCode = row.certificateNum;
  481. this.showAllRzcodeDialog = false;
  482. },
  483. buyCourse() {
  484. this.$refs["elForm"].validate((valid) => {
  485. if (!valid) return;
  486. let {
  487. marks,
  488. company,
  489. payNo,
  490. course_id,
  491. courseName,
  492. rzCode,
  493. name,
  494. email,
  495. buyImg
  496. } = this.buyForm;
  497. if (courseName != name) {
  498. this.$message.errorMsg("报考岗位有误", 1)
  499. return;
  500. }
  501. let param = {
  502. marks,
  503. payNo,
  504. company,
  505. courseId: course_id,
  506. courseName,
  507. rzCode,
  508. email,
  509. buyImg
  510. }
  511. httpServer("course.buyCourse", param).then((res) => {
  512. if (res.code == 200) {
  513. this.$message.successMsg("申请购买成功", 1);
  514. this.buyForm.temp.marks = this.buyForm.marks
  515. Object.assign(this.buyForm.temp, param);
  516. this.$refs["elForm"].resetFields();
  517. this.buyForm.temp.is_pay = 0
  518. this.buyCourseDialog = false;
  519. this.commitmentDialog = false;
  520. }
  521. });
  522. })
  523. },
  524. gotoDetail(courseId) {
  525. this.$router.push(`/main/course/${courseId}`);
  526. },
  527. uploadBuyImg(url) {
  528. this.buyForm.buyImg = url;
  529. },
  530. testBuyOK(item) {
  531. this.stage = 2;
  532. this.isCompanyPay = 1;
  533. this.isCommitment = ''
  534. this.buyForm.rzCode = item.rzCode;
  535. this.buyForm.company = 'ssss';
  536. this.buyForm.name = item.courseName;
  537. // let isEdu = this.hasPromise(item.type);
  538. if (this.promise.status == 1) {
  539. this.commitmentDialog = true;
  540. this.buyCourseDialog = false;
  541. } else {
  542. this.buyCourseDialog = true;
  543. this.commitmentDialog = false;
  544. }
  545. // if( isEdu || this.hasNotice() ){
  546. // this.buyCourseDialog = false;
  547. // this.commitmentDialog = true;
  548. // }else{
  549. // this.buyCourseDialog = true;
  550. // this.commitmentDialog = false;
  551. // }
  552. },
  553. goPay(item) {
  554. this.buyForm = Object.assign(this.buyForm, item)
  555. this.buyForm.company = this.userInfo.company;
  556. this.buyForm.temp = item;
  557. this.buyForm.courseName = item.name;
  558. this.matchPromise(item);
  559. this.matchType(item.type)
  560. // this.testBuyOK(item)
  561. // return;
  562. // 检查
  563. item.payErr = true;
  564. httpServer("weixin.docheckpay", {
  565. courseId: item.course_id
  566. }).then((res) => {
  567. if (res.code == 200) {
  568. this.stage = 2;
  569. this.isCompanyPay = 0;
  570. this.isCommitment = ''
  571. Object.assign(this.buyForm, res.data);
  572. if (this.promise.status == 1) {
  573. this.commitmentDialog = true;
  574. this.buyCourseDialog = false;
  575. } else {
  576. this.buyCourseDialog = true;
  577. this.commitmentDialog = false;
  578. }
  579. } else {
  580. console.log("payErr")
  581. item.payErr = true;
  582. }
  583. });
  584. },
  585. gotoPlay(item) {
  586. let courseId = item.course_id||item.courseId;
  587. if( curDatetime() < item.startDate){
  588. this.$message.warning("还未到学习时间");
  589. return
  590. }
  591. this.$router.push({name:'play', params:{courseId:item.courseId}})
  592. },
  593. handleCurrentChange(page) {
  594. this.page = page;
  595. this.filterData()
  596. }
  597. },
  598. };
  599. </script>
  600. <style>
  601. @import "../../../assets/css/content.css";
  602. @import "../../../assets/css/course.css";
  603. @import url("./index.css");
  604. .buyForm-title {
  605. width: 90px;
  606. padding: 2px;
  607. text-align: center;
  608. }
  609. .commitment-header {
  610. font-size: 16px;
  611. text-align: left;
  612. }
  613. .commitment {
  614. text-indent: 30px;
  615. margin-top: 20px;
  616. font-size: 16px;
  617. line-height: 200%;
  618. }
  619. .commitment-footer {
  620. margin-top: 30px;
  621. text-indent: 50px;
  622. font-size: 16px;
  623. text-align: left;
  624. }
  625. .commitment-content {
  626. font-size: 16px;
  627. }
  628. .tip-card {
  629. border-radius: 20px;
  630. font-size: 14px;
  631. float: right;
  632. width: 420px;
  633. right: 20px;
  634. position: absolute;
  635. top: 50px;
  636. color: white;
  637. background-color: #7fbae4;
  638. z-index: 1000;
  639. }
  640. .tips-intro {
  641. color: #468cf2;
  642. cursor: pointer;
  643. position: relative;
  644. }
  645. </style>