index.vue 23 KB

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