y595705120 пре 3 година
родитељ
комит
edb84e7f6f
3 измењених фајлова са 47 додато и 14 уклоњено
  1. 2 2
      config/index.js
  2. 7 0
      src/assets/css/base.css
  3. 38 12
      src/containers/center/market/index.vue

+ 2 - 2
config/index.js

@@ -2,8 +2,8 @@
 // Template version: 1.3.1
 // see http://vuejs-templates.github.io/webpack for documentation.
 //
-// const TARGET = "http://study.ndjsxh.cn:8889/"
-const TARGET = "http://localhost:8000/"
+const TARGET = "http://study.ndjsxh.cn:8889/"
+// const TARGET = "http://localhost:8000/"
 const path = require('path')
 
 module.exports = {

+ 7 - 0
src/assets/css/base.css

@@ -28,6 +28,13 @@
 .pb20 {
     padding-bottom: 20px;
 }
+.pl20 {
+    padding-left: 20px;
+}
+.pr20 {
+    padding-right: 20px;
+}
+
 .rel {
     position: relative;
 }

+ 38 - 12
src/containers/center/market/index.vue

@@ -66,9 +66,8 @@
     </el-dialog>
 
 
-    <el-dialog title="申请开通课程" class="fc tc" :visible.sync="buyCourseDialog" :append-to-body="true"
-    width="560px" >
-      <el-form label-width="80" label-position="center">
+    <el-dialog title="申请开通课程" class="fc tc" :visible.sync="buyCourseDialog" :append-to-body="true"  >
+      <el-form label-width="80" label-position="left" :inline="false">
         <div align="left" style="font-size: 16px;">
           <p><span class="buyForm-title">单位名称:</span> 三明市城市建设项目服务中心  </p>
           <p><span class="buyForm-title">开户银行:</span>中国工商银行股份有限公司三明下洋支行  </p>
@@ -82,15 +81,38 @@
           <p style="margin-left: 20px;">2、缴费时请备注:姓名+工种名称,例:张三+土建施工员</p>
           <p style="margin-left: 20px;">3、缴费成功后请上传缴费截图审核。</p>
         </div>
-
         <div align="left" >
           <el-button type="text" > 本课程费用: <strong style="color: red;"> {{buyForm.fee/100}} 元 </strong>  </el-button>
           <el-button type="text"  @click="showImg(exampleImg)"> 查看案例 </el-button>
         </div>
 
-        <el-form-item lable="备注信息" class="mt20">
-          <el-input v-model="buyForm.marks" type="textarea" placeholder="备注信息"></el-input>
-        </el-form-item>
+        <el-row align="left">
+          <el-col :lg="12" class="pl20 pr20">
+            <el-form-item lable="报考岗位" >
+              <label slot="label">报考岗位</label>
+              <el-input v-model="buyForm.courseName" type="text" placeholder="报考岗位"></el-input>
+            </el-form-item>
+
+          </el-col>
+
+          <el-col :lg="12" class="pl20 pr20">
+            <el-form-item lable="证书编号" >
+              <label slot="label">证书编号</label>
+              <el-input v-model="buyForm.rzCode" type="text" placeholder="证书编号"></el-input>
+            </el-form-item>
+          </el-col>
+
+        </el-row>
+
+        <el-row  align="left">
+          <el-col :span="24" class="pl20 pr20">
+            <el-form-item lable="备注信息" >
+              <label slot="label">备注信息</label>
+              <el-input v-model="buyForm.marks" type="textarea" placeholder="备注信息"></el-input>
+            </el-form-item>
+          </el-col>
+
+        </el-row>
 
         <el-form-item>
           <img :src="buyForm.buyImg" :onerror="errorImg" class="setting-img" @click="showImg(buyForm.buyImg)">
@@ -110,6 +132,7 @@
         append-to-body
         close-on-click-modal
         :visible.sync="showImgDialog"
+        style="margin-top: 0px;"
         :width="width">
         <img :src="imgUrl" @load="onLoad" alt="" />
     </el-dialog>
@@ -144,7 +167,7 @@
         buyCourseDialog: false,
         showExample: false,
         showImgDialog: false,
-        buyForm:{marks:''},
+        buyForm:{marks:'', rzCode:'', courseName:''},
         imgUrl:'',
         qrcodeUrl: "",
         outTradeNo: "",
@@ -217,9 +240,12 @@
         });
       },
       buyCourse(){
-        let {marks, buyImg, course_id} = this.buyForm;
-        console.log( this.buyForm )
-        let param = {marks, buyImg, courseId:course_id}
+        let {marks, buyImg, course_id, courseName, rzCode, name} = this.buyForm;
+        if( courseName != name ){
+           this.$message.errorMsg("报考岗位有误", 1)
+          return;
+        }
+        let param = {marks, buyImg, courseId:course_id, courseName, rzCode }
         httpServer("course.buyCourse", param).then((res) => {
           if (res.code == 200) {
             this.$message.successMsg("申请购买成功", 1);
@@ -237,7 +263,7 @@
       },
       goPay(index) {
         let item = this.list[index];
-        this.buyForm = Object.assign({}, item);
+        this.buyForm = Object.assign({}, item)
         this.buyForm.temp= item;
         httpServer("weixin.docheckpay", {
           courseId: item.course_id