Browse Source

修改BASE_URL协议

c4az6 4 years ago
parent
commit
ffff25f816

+ 1 - 1
.env.production

@@ -1,5 +1,5 @@
 VUE_APP_Name='生产环境'
-VUE_APP_Host='https://ue.360lj.com'
+VUE_APP_Host='//ue.360lj.com'
 VUE_APP_DoctorUserLoginUrl='https://ue.360lj.com/api/Home/Login?identity=1&backurl=https://ue.360lj.com/dist/SignUp'
 VUE_APP_PartnerUserLoginUrl='https://ue.360lj.com/api/Home/Login?identity=2&backurl=https://ue.360lj.com/dist/SignUp'
 VUE_APP_PatientUserLoginUrl='https://ue.360lj.com/api/Home/Login?identity=0&backurl=https://ue.360lj.com/dist/PatientUser'

+ 7 - 6
src/App.vue

@@ -83,11 +83,10 @@
             }, 2000); */
     },
     async mounted() {
-      // const { data: response } = await reqGetWeixinSign()
-      const { data: response } = await this.$http.GetSing()
+      const { data: response } = await reqGetWeixinSign()
       console.log("response: ", response)
       // if (response.success !== 1) return this.$toast('服务器异常,请稍后重试!')
-/*       wx.config({
+      wx.config({
         debug: false, // 是否开启调试模式
         appId: response.result.appId, //appid
         timestamp: response.result.timestamp, // 时间戳
@@ -114,11 +113,13 @@
       wx.error(function (res) {
         // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名
         console.log("配置错误: ", res)
-      }); */
+      });
 
 
 
-      /* ue.360lj.com 获取微信签名信息配置 */
+/* ue.360lj.com 获取微信签名信息配置 */
+   
+      /* const { data: response } = await this.$http.GetSing()   
       wx.config({
         debug: false, // 是否开启调试模式
         appId: response.ResultObject.appId, //appid
@@ -146,7 +147,7 @@
       wx.error(function (res) {
         // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名
         console.log("配置错误: ", res)
-      });
+      }); */
     },
     watch: {
       $route(to, from) {

+ 1 - 1
src/api/api.js

@@ -265,7 +265,7 @@ export default {
   // 生成图片验证码
   GetCode() {
     return api
-      .get(host + " /api/Home/GetSecurityCode", {
+      .get(host + "/api/Home/GetSecurityCode", {
         responseType: "arraybuffer"
       })
       .then(res => {

+ 360 - 392
src/components/doctorRegister/doctorFillInfomation.vue

@@ -1,450 +1,418 @@
 <template>
   <!-- 医生填写资料业务组件 -->
   <div class="fill-infomation-container">
-    <van-form
-      @submit="onSubmit"
-      @failed="onFailed"
-      ref="doctorFillForm"
-    >
+    <van-form @submit="onSubmit"
+              @failed="onFailed"
+              ref="doctorFillForm">
       <!-- 医生姓名部分 -->
       <van-cell-group class="section1">
-        <van-field
-          v-model="doctorFillForm.doctorName"
-          name="doctorName"
-          label="医生姓名"
-          placeholder="姓名"
-          :rules="[{ required: true, pattern: patternName, message: '请输入正确的姓名' }]"
-        />
-        <van-field
-          v-model="doctorFillForm.idCard"
-          name="idCard"
-          label="身份证号"
-          maxlength="18"
-          type="text"
-          placeholder="18位身份证"
-          :rules="[{ required: true, pattern: patternIDCard, message: '请输入正确的身份证号码' }]"
-        />
+        <van-field v-model="doctorFillForm.doctorName"
+                   name="doctorName"
+                   label="医生姓名"
+                   placeholder="姓名"
+                   :rules="[{ required: true, pattern: patternName, message: '请输入正确的姓名' }]" />
+        <van-field v-model="doctorFillForm.idCard"
+                   name="idCard"
+                   label="身份证号"
+                   maxlength="18"
+                   type="text"
+                   placeholder="18位身份证"
+                   :rules="[{ required: true, pattern: patternIDCard, message: '请输入正确的身份证号码' }]" />
       </van-cell-group>
 
       <!-- 医生职称部分 -->
-      <van-field
-        readonly
-        clickable
-        name="jobTitle"
-        :value="doctorFillForm.jobTitle"
-        label="医生职称"
-        placeholder="请选择"
-        right-icon="arrow"
-        @click="showPicker = true"
-        :rules="[{ required: true, message: '请选择医生职称' }]"
-      />
-      <van-popup
-        v-model="showPicker"
-        position="bottom"
-      >
-        <van-picker
-          show-toolbar
-          :columns="doctorJobList"
-          @confirm="onConfirm"
-          @cancel="showPicker = false"
-        />
+      <van-field readonly
+                 clickable
+                 name="jobTitle"
+                 :value="doctorFillForm.jobTitle"
+                 label="医生职称"
+                 placeholder="请选择"
+                 right-icon="arrow"
+                 @click="showPicker = true"
+                 :rules="[{ required: true, message: '请选择医生职称' }]" />
+      <van-popup v-model="showPicker"
+                 position="bottom">
+        <van-picker show-toolbar
+                    :columns="doctorJobList"
+                    @confirm="onConfirm"
+                    @cancel="showPicker = false" />
       </van-popup>
 
       <!-- 医生科室部分 -->
-      <van-field
-        readonly
-        clickable
-        name="doctorDepartments"
-        :value="doctorFillForm.doctorDepartments"
-        label="医生科室"
-        placeholder="请选择"
-        right-icon="arrow"
-        @click="showPicker2 = true"
-        :rules="[{ required: true, message: '请选择医生科室' }]"
-      />
-      <van-popup
-        v-model="showPicker2"
-        position="bottom"
-      >
-        <van-picker
-          show-toolbar
-          :columns="doctorDepartmentsList"
-          @confirm="onConfirm2"
-          @cancel="showPicker2 = false"
-        />
+      <van-field readonly
+                 clickable
+                 name="doctorDepartments"
+                 :value="doctorFillForm.doctorDepartments"
+                 label="医生科室"
+                 placeholder="请选择"
+                 right-icon="arrow"
+                 @click="showPicker2 = true"
+                 :rules="[{ required: true, message: '请选择医生科室' }]" />
+      <van-popup v-model="showPicker2"
+                 position="bottom">
+        <van-picker show-toolbar
+                    :columns="doctorDepartmentsList"
+                    @confirm="onConfirm2"
+                    @cancel="showPicker2 = false" />
       </van-popup>
 
       <!-- 执业医院部分 -->
-      <van-field
-        readonly
-        clickable
-        name="firstHospital"
-        :value="doctorFillForm.firstHospital"
-        label="执业医院"
-        placeholder="请选择"
-        right-icon="arrow"
-        @click="show = true"
-        :rules="[{ required: true, message: '请选择执业医院' }]"
-      />
-      <van-popup
-        v-model="show"
-        position="bottom"
-        closeable
-        :style="{ height: '50%' }"
-      >
+      <van-field readonly
+                 clickable
+                 name="firstHospital"
+                 :value="doctorFillForm.firstHospital"
+                 label="执业医院"
+                 placeholder="请选择"
+                 right-icon="arrow"
+                 @click="show = true"
+                 :rules="[{ required: true, message: '请选择执业医院' }]" />
+      <van-popup v-model="show"
+                 position="bottom"
+                 closeable
+                 :style="{ height: '50%' }">
         <!-- 搜索框部分 -->
-        <van-search
-          v-model="searchValue"
-          show-action
-          placeholder="请输入医院名称"
-          @search="onSearch"
-        >
+        <van-search v-model="searchValue"
+                    show-action
+                    placeholder="请输入医院名称"
+                    @search="onSearch">
           <template #action>
-            <div
-              class="search-btn"
-              @click="onSearch"
-            >搜索</div>
+            <div class="search-btn"
+                 @click="onSearch">搜索</div>
           </template>
         </van-search>
 
         <!-- 内容列表部分 -->
-        <van-list
-          v-model="loading"
-          :finished="finished"
-          finished-text="没有更多了"
-          @load="onLoad"
-        >
-          <van-cell
-            v-for="(item,index) in hospitalList"
-            :key="item.id"
-            class="van-cell-item"
-            @click="handleHospitalItem(item.hospitalname,item.id)"
-          >
-            <img
-              src="../../static/imgs/doctorRegister/hospital-icon.png"
-              alt=""
-            >
+        <van-list v-model="loading"
+                  :finished="finished"
+                  finished-text="没有更多了"
+                  @load="onLoad">
+          <van-cell v-for="(item,index) in hospitalList"
+                    :key="item.id"
+                    class="van-cell-item"
+                    @click="handleHospitalItem(item.hospitalname,item.id)">
+            <img src="../../static/imgs/doctorRegister/hospital-icon.png"
+                 alt="">
             <span>{{item.hospitalname}}</span>
           </van-cell>
         </van-list>
       </van-popup>
 
       <!-- 首次执业日期部分 -->
-      <van-field
-        readonly
-        clickable
-        name="joinWorkdayTime"
-        :value="doctorFillForm.joinWorkdayTime"
-        label="首次执业"
-        placeholder="请选择日期"
-        right-icon="arrow"
-        @click="showPicker3 = true"
-        :rules="[{ required: true, message: '请选择日期' }]"
-      />
-      <van-popup
-        v-model="showPicker3"
-        position="bottom"
-      >
-        <van-datetime-picker
-          v-model="currentDate"
-          type="year-month"
-          title="选择年月"
-          :min-date="minDate"
-          :max-date="maxDate"
-          :formatter="formatter"
-          @confirm="onConfirm3"
-          @cancel="showPicker3=false"
-        />
+      <van-field readonly
+                 clickable
+                 name="joinWorkdayTime"
+                 :value="doctorFillForm.joinWorkdayTime"
+                 label="首次执业"
+                 placeholder="请选择日期"
+                 right-icon="arrow"
+                 @click="showPicker3 = true"
+                 :rules="[{ required: true, message: '请选择日期' }]" />
+      <van-popup v-model="showPicker3"
+                 position="bottom">
+        <van-datetime-picker v-model="currentDate"
+                             type="year-month"
+                             title="选择年月"
+                             :min-date="minDate"
+                             :max-date="maxDate"
+                             :formatter="formatter"
+                             @confirm="onConfirm3"
+                             @cancel="showPicker3=false" />
       </van-popup>
 
       <!-- 选择全科医生部分 -->
-      <van-field
-        readonly
-        clickable
-        name="isEducationDoctor"
-        :value="doctorFillForm.isEducationDoctor==1?'是':'否'"
-        label="全科医生"
-        placeholder="请选择"
-        right-icon="arrow"
-        @click="showPicker4 = true"
-        :rules="[{ required: true, message: '请选择是否全科医生' }]"
-      />
-      <van-popup
-        v-model="showPicker4"
-        position="bottom"
-      >
-        <van-picker
-          show-toolbar
-          :columns="columns"
-          @confirm="onConfirm4"
-          @cancel="showPicker4 = false"
-        />
+      <van-field readonly
+                 clickable
+                 name="isEducationDoctor"
+                 :value="isEducationDoctorValue"
+                 label="全科医生"
+                 placeholder="请选择"
+                 right-icon="arrow"
+                 @click="showPicker4 = true"
+                 :rules="[{ required: true, message: '请选择是否全科医生' }]" />
+      <van-popup v-model="showPicker4"
+                 position="bottom">
+        <van-picker show-toolbar
+                    :columns="columns"
+                    @confirm="onConfirm4"
+                    @cancel="showPicker4 = false" />
       </van-popup>
 
-      <van-button
-        class="next-step-btn"
-        type="info"
-        size="large"
-        native-type="submit"
-      >下一步</van-button>
+      <van-button class="next-step-btn"
+                  type="info"
+                  size="large"
+                  native-type="submit">下一步</van-button>
     </van-form>
   </div>
 </template>
 
 <script>
-import { reqGetJobList, reqGetDoctorDepartmentsList, reqGetHospitalList } from '../../api/doctorRegister/doctorRegister'
-export default {
-  name: 'doctorFillInfomation',
-  data() {
-    return {
-      // 校验身份证的正则
-      patternIDCard: /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/,
-      // 校验姓名的正则
-      patternName: /^([\u4e00-\u9fa5]{2,20}|[a-zA-Z.\s]{2,20})$/,
-      // 是否全科医生
-      columns: ['是', '否'],
-      // 医生首次执业日期
-      minDate: new Date(1949, 0, 1),
-      maxDate: new Date(2020, 12, 1),
-      currentDate: new Date(),
-      // 医生职称列表
-      doctorJobList: [],
-      // 医生职称列表源数据
-      doctorJobListSource: [],
-      // 医生科室列表
-      doctorDepartmentsList: [],
-      // 搜索医生列表
-      hospitalList: [],
-      // 医生职称弹出框
-      showPicker: false,
-      // 医生科室列表
-      showPicker2: false,
-      // 首次置业日期弹窗
-      showPicker3: false,
-      // 是否全科医生弹窗
-      showPicker4: false,
-      // 显示
-      show: false,
-      // 搜索关键词
-      searchValue: "",
-      loading: false,
-      finished: false,
-      // 搜索参数对象
-      searchParams: {
-        pageIndex: 1,
-        pageSize: 10,
-        filters: [
-          {
-            field: "hospitalname",
-            operate: "contains",
-            value: ""
-          }
-        ]
-      },
-      totalCount: 0,
-      // 当前页的表单对象
-      doctorFillForm: {
-        doctorName: "",       // 医生名字
-        idCard: "",         // 医生身份证号
-        birthday: "",       // 出生日期
-        gender: "",         // 性别   奇数是男性、偶数是女性
-        jobTitle: "",       // 医生职称
-        jobTitleId: "",     // 医生职称ID
-        doctorDepartments: "",    // 医生科室
-        departmentId: "",       // 医生科室ID
-        firstHospital: "",         // 执业医院
-        hospitalId: "",           // 执业医院ID
-        joinWorkdayTime: "",      // 首次执业日期
-        isEducationDoctor: "",     // 是否是全科医生
-      }
-    }
-  },
-  methods: {
-    // 获取身份证号中的出生年日期和性别,返回对象
-    getIdcardBorn_gender(idcard){
-      let idCardObj = {}
-      // 获取年龄
-      let born = idcard.substring(6,14)
-      let n1 = born.substring(0,4) 
-      let n2 = born.substring(4,6) 
-      let n3 = born.substring(6) 
-      idCardObj.born = n1 + "-" + n2 + "-" + n3
-      idCardObj.gender = (+idcard[16])%2==0?2:1
-      return idCardObj
-    },
-    // 表单校验错误的处理函数
-    onFailed(errorInfo) {
-      console.log(errorInfo)
-    },
-
-    formatter(type, val) {
-      if (type === 'year') {
-        return `${val}年`;
-      } else if (type === 'month') {
-        return `${val}月`;
+  import { reqGetJobList, reqGetDoctorDepartmentsList, reqGetHospitalList } from '../../api/doctorRegister/doctorRegister'
+  export default {
+    name: 'doctorFillInfomation',
+    data() {
+      return {
+        // 校验身份证的正则
+        patternIDCard: /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/,
+        // 校验姓名的正则
+        patternName: /^([\u4e00-\u9fa5]{2,20}|[a-zA-Z.\s]{2,20})$/,
+        // 是否全科医生
+        columns: ['是', '否'],
+        // 医生首次执业日期
+        minDate: new Date(1949, 0, 1),
+        maxDate: new Date(2020, 12, 1),
+        currentDate: new Date(),
+        // 医生职称列表
+        doctorJobList: [],
+        // 医生职称列表源数据
+        doctorJobListSource: [],
+        // 医生科室列表
+        doctorDepartmentsList: [],
+        // 搜索医生列表
+        hospitalList: [],
+        // 医生职称弹出框
+        showPicker: false,
+        // 医生科室列表
+        showPicker2: false,
+        // 首次置业日期弹窗
+        showPicker3: false,
+        // 是否全科医生弹窗
+        showPicker4: false,
+        isEducationDoctorValue: null,   // 该医生全职
+        // 显示
+        show: false,
+        // 搜索关键词
+        searchValue: "",
+        loading: false,
+        finished: false,
+        // 搜索参数对象
+        searchParams: {
+          pageIndex: 1,
+          pageSize: 10,
+          filters: [
+            {
+              field: "hospitalname",
+              operate: "contains",
+              value: ""
+            }
+          ]
+        },
+        totalCount: 0,
+        // 当前页的表单对象
+        doctorFillForm: {
+          doctorName: "",       // 医生名字
+          idCard: "",         // 医生身份证号
+          birthday: "",       // 出生日期
+          gender: "",         // 性别   奇数是男性、偶数是女性
+          jobTitle: "",       // 医生职称
+          jobTitleId: "",     // 医生职称ID
+          doctorDepartments: "",    // 医生科室
+          departmentId: "",       // 医生科室ID
+          firstHospital: "",         // 执业医院
+          hospitalId: "",           // 执业医院ID
+          joinWorkdayTime: "",      // 首次执业日期
+          isEducationDoctor: null,     // 是否是全科医生
+        }
       }
-      return val;
-    },
-    // 搜索医生列表触底函数
-    onLoad() {
-      this.getHospitalList()
     },
+    methods: {
+      // 获取身份证号中的出生年日期和性别,返回对象
+      getIdcardBorn_gender(idcard) {
+        let idCardObj = {}
+        // 获取年龄
+        let born = idcard.substring(6, 14)
+        let n1 = born.substring(0, 4)
+        let n2 = born.substring(4, 6)
+        let n3 = born.substring(6)
+        idCardObj.born = n1 + "-" + n2 + "-" + n3
+        idCardObj.gender = (+idcard[16]) % 2 == 0 ? 2 : 1
+        return idCardObj
+      },
+      // 表单校验错误的处理函数
+      onFailed(errorInfo) {
+        console.log(errorInfo)
+      },
 
-    // 获取医院列表数据
-    async getHospitalList() {
-      const { data: response } = await reqGetHospitalList(this.searchParams)
-      this.loading = false
-      this.totalCount = response.totalCount
-      if (this.totalCount > this.hospitalList.length) {
-        this.hospitalList = [...this.hospitalList, ...response.items]
-        this.searchParams.pageIndex++
-      } else {
-        this.finished = true
-      }
-    },
+      formatter(type, val) {
+        if (type === 'year') {
+          return `${val}年`;
+        } else if (type === 'month') {
+          return `${val}月`;
+        }
+        return val;
+      },
+      // 搜索医生列表触底函数
+      onLoad() {
+        this.getHospitalList()
+      },
 
-    // 获取医院列表
-    handleHospitalItem(name, id) {
-      this.doctorFillForm.firstHospital = name
-      this.doctorFillForm.hospitalId = id
-      this.show = false
-    },
-    // 搜索事件
-    onSearch() {
-      this.searchParams.pageIndex = 1
-      this.hospitalList.length = 0
-      this.finished = false
-      this.searchParams.filters[0].value = this.searchValue
-      this.getHospitalList()
-    },
-    // 获取医生科室列表
-    async getDoctorDepartmentsList() {
-      const cacheData = JSON.parse(window.sessionStorage.getItem('doctorDepartmentsList'))
-      if (!cacheData) {
-        const { data: response } = await reqGetDoctorDepartmentsList()
-        this.doctorDepartmentsList = response.map(item => {
-          item.text = item.label
-          if (item.children.length !== 0) {
-            item.children.map(item2 => item2.text = item2.label)
-          }
-          return item
-        })
-        window.sessionStorage.setItem('doctorDepartmentsList', JSON.stringify(this.doctorDepartmentsList))
-      } else {
-        this.doctorDepartmentsList = cacheData
-      }
-    },
-    // 获取医生职称数据列表
-    async getDoctorJobList() {
-      const { data: response } = await reqGetJobList()
-      this.doctorJobListSource = response
-      this.doctorJobList = response.map(item => item.label)
-    },
-    async onSubmit(e) {
-      // 用于表单验证
-      const valideResult = await this.$refs.doctorFillForm.validate()
-      console.log("form合并前: ", this.doctorFillForm)
-      this.doctorFillForm = {...this.doctorFillForm, ...e}
-      console.log("form合并后: ", this.doctorFillForm)
-      setTimeout(() => {
-        // 删除Form对象中的undefined属性
-        try {
-          delete this.doctorFillForm.undefined
-        } catch (error) {
-          console.log(error)
+      // 获取医院列表数据
+      async getHospitalList() {
+        const { data: response } = await reqGetHospitalList(this.searchParams)
+        this.loading = false
+        this.totalCount = response.totalCount
+        if (this.totalCount > this.hospitalList.length) {
+          this.hospitalList = [...this.hospitalList, ...response.items]
+          this.searchParams.pageIndex++
+        } else {
+          this.finished = true
         }
-        console.log(this.doctorFillForm.idCard)
-        let result = this.getIdcardBorn_gender(this.doctorFillForm.idCard)
-        console.log(result)
-        this.doctorFillForm.birthday = result.born
-        this.doctorFillForm.gender = result.gender
-        window.sessionStorage.setItem('doctorFillForm', JSON.stringify(this.doctorFillForm))
-        this.$emit('doctorFillForm', this.doctorFillForm)
-      }, 100)
-    },
-    // 医生职称
-    onConfirm(value) {
-      let res = this.doctorJobListSource.find(item=>item.label===value)
-      this.doctorFillForm.jobTitleId = res.value
-      this.doctorFillForm.jobTitle = value
-      this.showPicker = false
-    },
-    // 医生科室
-    onConfirm2(value) {
-      this.doctorFillForm.doctorDepartments = value.join('/')
-      let res = this.doctorDepartmentsList.find(item=>{
-        if(item.label === value[0]) {
-          item.children.find(item2=>{
-            if(item2.label === value[1]) this.doctorFillForm.departmentId = item2.value
+      },
+
+      // 获取医院列表
+      handleHospitalItem(name, id) {
+        this.doctorFillForm.firstHospital = name
+        this.doctorFillForm.hospitalId = id
+        this.show = false
+      },
+      // 搜索事件
+      onSearch() {
+        this.searchParams.pageIndex = 1
+        this.hospitalList.length = 0
+        this.finished = false
+        this.searchParams.filters[0].value = this.searchValue
+        this.getHospitalList()
+      },
+      // 获取医生科室列表
+      async getDoctorDepartmentsList() {
+        const cacheData = JSON.parse(window.sessionStorage.getItem('doctorDepartmentsList'))
+        if (!cacheData) {
+          const { data: response } = await reqGetDoctorDepartmentsList()
+          this.doctorDepartmentsList = response.map(item => {
+            item.text = item.label
+            if (item.children.length !== 0) {
+              item.children.map(item2 => item2.text = item2.label)
+            }
+            return item
           })
+          window.sessionStorage.setItem('doctorDepartmentsList', JSON.stringify(this.doctorDepartmentsList))
+        } else {
+          this.doctorDepartmentsList = cacheData
         }
-      })
-      console.log("departmentId: ", this.doctorFillForm)
-      this.showPicker2 = false
-    },
-    // 医生首次执业日期
-    onConfirm3(value) {
-      let d = new Date(value)
-      let dateTime = d.getFullYear() + '-' + (d.getMonth() + 1)
-      this.doctorFillForm.joinWorkdayTime = dateTime
-      this.showPicker3 = false
+      },
+      // 获取医生职称数据列表
+      async getDoctorJobList() {
+        const { data: response } = await reqGetJobList()
+        this.doctorJobListSource = response
+        this.doctorJobList = response.map(item => item.label)
+      },
+      async onSubmit(e) {
+        console.log("e: ", e)
+        const value = e.isEducationDoctor
+        // 用于表单验证
+        const valideResult = await this.$refs.doctorFillForm.validate()
+        this.doctorFillForm = { ...this.doctorFillForm, ...e }
+        if(value === '是') {
+          this.doctorFillForm.isEducationDoctor = 1
+        }else if (value == '否') {
+          this.doctorFillForm.isEducationDoctor = 0
+        }else {
+          this.doctorFillForm.isEducationDoctor = null
+        }
+        setTimeout(() => {
+          // 删除Form对象中的undefined属性
+          try {
+            delete this.doctorFillForm.undefined
+          } catch (error) {
+            console.log(error)
+          }
+          console.log(this.doctorFillForm.idCard)
+          let result = this.getIdcardBorn_gender(this.doctorFillForm.idCard)
+          this.doctorFillForm.birthday = result.born
+          this.doctorFillForm.gender = result.gender
+          window.sessionStorage.setItem('doctorFillForm', JSON.stringify(this.doctorFillForm))
+          this.$emit('doctorFillForm', this.doctorFillForm)
+        }, 100)
+      },
+      // 医生职称
+      onConfirm(value) {
+        let res = this.doctorJobListSource.find(item => item.label === value)
+        this.doctorFillForm.jobTitleId = res.value
+        this.doctorFillForm.jobTitle = value
+        this.showPicker = false
+      },
+      // 医生科室
+      onConfirm2(value) {
+        this.doctorFillForm.doctorDepartments = value.join('/')
+        let res = this.doctorDepartmentsList.find(item => {
+          if (item.label === value[0]) {
+            item.children.find(item2 => {
+              if (item2.label === value[1]) this.doctorFillForm.departmentId = item2.value
+            })
+          }
+        })
+        console.log("departmentId: ", this.doctorFillForm)
+        this.showPicker2 = false
+      },
+      // 医生首次执业日期
+      onConfirm3(value) {
+        let d = new Date(value)
+        let dateTime = d.getFullYear() + '-' + (d.getMonth() + 1)
+        this.doctorFillForm.joinWorkdayTime = dateTime
+        this.showPicker3 = false
+      },
+      // 是否全科医生确认事件
+      onConfirm4(value) {
+        this.isEducationDoctorValue = value
+        this.showPicker4 = false
+      },
+
     },
-    // 是否全科医生确认事件
-    onConfirm4(value) {
-      this.doctorFillForm.isEducationDoctor = value==='是'?1:0
-      this.showPicker4 = false
+    created() {
+      this.getDoctorJobList()
+      this.getDoctorDepartmentsList()
+      this.getHospitalList()
     },
-    // 获取sessionStorage初始化Form数据
-    initForm() {
+    mounted() {
+      // 获取缓存中的数据初始化doctorFillForm
       this.doctorFillForm = JSON.parse(window.sessionStorage.getItem('doctorFillForm')) || {}
+      console.log("缓存数据: ", this.doctorFillForm)
+      if(this.doctorFillForm.isEducationDoctor !== null) {
+        if(this.doctorFillForm.isEducationDoctor===1) {
+          this.isEducationDoctorValue = '是'
+        }else if(this.doctorFillForm.isEducationDoctor===0) {
+          this.isEducationDoctorValue = '否'
+        }else {
+          this.isEducationDoctorValue = null
+        }
+      }
     }
-
-  },
-  created() {
-    this.getDoctorJobList()
-    this.getDoctorDepartmentsList()
-    this.getHospitalList()
-  },
-  mounted() {
-    this.initForm()
   }
-}
 </script>
 
 <style lang="less" scoped>
-.section1 {
-  margin-bottom: 0.2rem;
-}
+  .section1 {
+    margin-bottom: 0.2rem;
+  }
 
-.van-search {
-  margin-top: 0.8rem;
-}
+  .van-search {
+    margin-top: 0.8rem;
+  }
 
-.search-btn {
-  background-color: #478bfb;
-  color: #fff;
-  padding: 0 0.2rem;
-  border-radius: 0.1rem;
-}
+  .search-btn {
+    background-color: #478bfb;
+    color: #fff;
+    padding: 0 0.2rem;
+    border-radius: 0.1rem;
+  }
 
-/deep/.van-cell-item .van-cell__value {
-  display: flex;
-  align-items: center;
-  img {
-    margin-right: 0.4rem;
-    width: 0.58rem;
+  /deep/.van-cell-item .van-cell__value {
+    display: flex;
+    align-items: center;
+    img {
+      margin-right: 0.4rem;
+      width: 0.58rem;
+    }
   }
-}
 
-/deep/ .van-field__label {
-  text-align: left;
-}
+  /deep/ .van-field__label {
+    text-align: left;
+  }
 
-.next-step-btn {
-  /*   position: absolute;
-  bottom: 5%;
-  transform: translate(-50%); */
-  margin: 0.5rem 0;
-  width: 90%;
-}
+  .next-step-btn {
+    /*   position: absolute;
+      bottom: 5%;
+      transform: translate(-50%); */
+    margin: 0.5rem 0;
+    width: 90%;
+  }
 </style>

+ 67 - 59
src/components/doctorRegister/doctorIntroduction.vue

@@ -1,73 +1,81 @@
 <template>
   <van-form>
-    <van-field
-      v-model="specialty"
-      rows="2"
-      autosize
-      label="医生擅长"
-      type="textarea"
-      maxlength="300"
-      placeholder="擅长治疗方向"
-      show-word-limit
-      :rules="[{ required: true, message: '请输入擅长的治疗方向' }]"
-    />
+    <van-field v-model="specialty"
+               rows="2"
+               autosize
+               label="医生擅长"
+               type="textarea"
+               maxlength="300"
+               placeholder="擅长治疗方向"
+               show-word-limit
+               :rules="[{ required: true, message: '请输入擅长的治疗方向' }]" />
 
-    <van-field
-      v-model="description"
-      rows="2"
-      autosize
-      label="医生简介"
-      type="textarea"
-      maxlength="1000"
-      placeholder="医生简介"
-      show-word-limit
-      :rules="[{ required: true, message: '请输入医生简介' }]"
-    />
+    <van-field v-model="description"
+               rows="2"
+               autosize
+               label="医生简介"
+               type="textarea"
+               maxlength="1000"
+               placeholder="医生简介"
+               show-word-limit
+               :rules="[{ required: true, message: '请输入医生简介' }]" />
 
-    <van-button
-      class="next-step-btn"
-      type="info"
-      size="large"
-      @click="submitForm"
-    >提交审核</van-button>
+    <div class="btn-wrap">
+      <van-button class="next-step-btn"
+                  type="info"
+                  @click="submitForm">提交审核</van-button>
+
+      <van-button class="skip-btn"
+                  @click="skipBtn">跳过</van-button>
+    </div>
   </van-form>
 </template>
 
 <script>
-export default {
-  data() {
-    return {
-      specialty: "",   // 擅长
-      description: ""     // 简介
-    }
-  },
-  methods: {
-    submitForm() {
-      if(this.specialty && this.description) {
-        // 将数据存起来
-        window.sessionStorage.setItem('doctorMessageForm', JSON.stringify({specialty:this.specialty, description:this.description}))
-        this.$emit('handleSubmitAudit', {specialty:this.specialty, description:this.description})
-      }else {
-        this.$toast('请填写医生擅长或医生简介内容!')
+  export default {
+    data() {
+      return {
+        specialty: "",   // 擅长
+        description: ""     // 简介
+      }
+    },
+    methods: {
+      // 跳过医生简介,提交审核
+      skipBtn() {
+        console.log("呵呵呵")
+      },
+      // 提交审核
+      submitForm() {
+        if (this.specialty && this.description) {
+          // 将数据存起来
+          window.sessionStorage.setItem('doctorMessageForm', JSON.stringify({ specialty: this.specialty, description: this.description }))
+          this.$emit('handleSubmitAudit', { specialty: this.specialty, description: this.description })
+        } else {
+          this.$toast('请填写医生擅长或医生简介内容!')
+        }
+      }
+    },
+    mounted() {
+      let obj = JSON.parse(window.sessionStorage.getItem('doctorMessageForm'))
+      if (obj) {
+        this.specialty = obj.specialty
+        this.description = obj.description
       }
-    }
-  },
-  mounted(){
-    let obj = JSON.parse(window.sessionStorage.getItem('doctorMessageForm'))
-    if(obj) {
-      this.specialty = obj.specialty
-      this.description = obj.description
     }
   }
-}
 </script>
 
-<style>
-.next-step-btn {
-  /*   position: absolute;
-  bottom: 5%;
-  transform: translate(-50%); */
-  margin: 0.5rem 0;
-  width: 90%;
-}
+<style lang="less">
+  .btn-wrap {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    .skip-btn {
+      width: 90%;
+    }
+    .next-step-btn {
+      width: 90%;
+      margin: 0.5rem 0;
+    }
+  }
 </style>

+ 17 - 0
src/components/doctorRegister/uploadLicense.vue

@@ -119,7 +119,12 @@
         :lineWidth="lineWidth"
         :lineColor="lineColor"
         :bgColor.sync="bgColor"
+        v-show="!licenseForm.caPersonUrl"
       />
+
+      <div v-show="licenseForm.caPersonUrl" class="caperson-img-wrap">
+        <img :src="licenseForm.caPersonUrl" alt="">
+      </div>
     </div>
     <div
       class="reset-drawing"
@@ -278,6 +283,7 @@ export default {
     },
     // 清除手写签名画布
     handleReset() {
+      this.licenseForm.caPersonUrl = ''
       this.$refs.esign.reset()
     },
 
@@ -285,6 +291,7 @@ export default {
     handleGenerate() {
       this.$refs.esign.generate().then(res => {
         this.resultImg = res
+        console.log("this.resultImg: ", this.resultImg)
       }).catch(err => {
         console.log(err)
       })
@@ -294,16 +301,19 @@ export default {
   },
   mounted() {
     try {
+      // 获取缓存中的医生名字,用于区分将图片上传到服务器对应医生姓名的文件夹下
       this.doctorName = JSON.parse(window.sessionStorage.getItem('doctorFillForm')).doctorName
     } catch (error) {
       console.log(error)
     }
+    // 获取缓存中的图片信息
     this.licenseForm = JSON.parse(window.sessionStorage.getItem('licenseForm')) || {}
     if(this.licenseForm.headurl && this.licenseForm.qualificationImgurl && this.licenseForm.practiceImgurl) {
       this.uploaderAvatar = [{ url: this.licenseForm.headurl }]
       this.uploader = [{ url: this.licenseForm.qualificationImgurl }]
       this.uploader2 = [{ url: this.licenseForm.practiceImgurl }]
     }
+    console.log(this.licenseForm)
   }
 }
 </script>
@@ -397,4 +407,11 @@ export default {
   margin: 0.5rem 0;
   width: 90%;
 }
+
+.caperson-img-wrap {
+  img {
+    width: 100%;
+    height: 100%;
+  }
+}
 </style>

+ 250 - 266
src/views/doctor/SignUp.vue

@@ -4,320 +4,304 @@ import { type } from 'os';
 <template>
   <main>
     <header>
-      <img
-        src="../../assets/images/doctor.png"
-        alt=""
-      />
+      <img src="../../assets/images/doctor.png"
+           alt="" />
     </header>
     <div class="signUp">
       <div>
         <label for="Mobile">手机号码</label>
-        <input
-          v-model="Mobile"
-          id="Mobile"
-          type="number"
-          placeholder="请输入手机号码"
-        />
+        <input v-model="Mobile"
+               id="Mobile"
+               type="number"
+               placeholder="请输入手机号码" />
       </div>
       <div>
         <label for="ImgCode">图片码</label>
-        <input
-          v-model="verificationCode"
-          id="ImgCode"
-          type="text"
-          placeholder="请输入图片码"
-          maxlength="4"
-        />
-        <img
-          :src="ImgCode"
-          alt=""
-          @click="GetCode()"
-        />
+        <input v-model="verificationCode"
+               id="ImgCode"
+               type="text"
+               placeholder="请输入图片码"
+               maxlength="4" />
+        <img :src="ImgCode"
+             alt=""
+             @click="GetCode()" />
       </div>
       <div style="border:none;">
         <label for="Code">验证码</label>
-        <input
-          v-model="MoblieCode"
-          id="Code"
-          type="number"
-          placeholder="请输入短信码"
-          maxlength="6"
-        />
-        <span
-          v-if="!DownTimeStatus"
-          @click="SendSMS()"
-        >获取验证码</span>
+        <input v-model="MoblieCode"
+               id="Code"
+               type="number"
+               placeholder="请输入短信码"
+               maxlength="6" />
+        <span v-if="!DownTimeStatus"
+              @click="SendSMS()">获取验证码</span>
         <span v-if="DownTimeStatus">{{ DownTimeNum }}s后获取</span>
       </div>
     </div>
-    <button
-      type="button"
-      class="button"
-      @click="SignUp()"
-    >提交验证</button>
-    <img
-      src="../../assets/images/signup-bg2.png"
-      alt=""
-    />
+    <button type="button"
+            class="button"
+            @click="SignUp()">提交验证</button>
+    <img src="../../assets/images/signup-bg2.png"
+         alt="" />
   </main>
 </template>
 
 <script>
-export default {
-  name: "SignUp",
-  data() {
-    return {
-      Mobile: "", // 手机号
-      MoblieCode: "", // 短信验证码
-      ImgCode: "", // 图片验证码的图片
-      verificationCode: "", // 图片验证码值
-      DownTimeNum: 180, // 短信倒计时
-      DownTimeStatus: false,
-      identity: "",
-      partnerID: ""
-    };
-  },
-  created() {
-    this.GetCode();
-    this.$toast("欢迎注册亮健优医");
-  },
-  mounted() {
-    // 获取url中的参数
-    this.identity = this.getUrlParams('identity');
-    this.partnerID = this.getUrlParams('PartnerID') || "";
-    console.log(this.identity)
-    console.log(this.partnerID)
-  },
-  methods: {
-    // 获取url中的参数
-    getUrlParams(paramsName) {
-      //JavaScript获取url,并把url中的参数变成数组的方法,arr数组的值就是各参数值
-      var url = window.document.location.href.toString();
-      var u = url.split("?");
-      var arr = [];
-      if (typeof (u[1]) == "string") {
-        u = u[1].split("&");
-        for (var i in u) {
-          var a = (u[i].split("="));
-          arr[a[0]] = a[1];
-        }
-      }
-      return arr[paramsName]
+  export default {
+    name: "SignUp",
+    data() {
+      return {
+        Mobile: "", // 手机号
+        MoblieCode: "", // 短信验证码
+        ImgCode: "", // 图片验证码的图片
+        verificationCode: "", // 图片验证码值
+        DownTimeNum: 180, // 短信倒计时
+        DownTimeStatus: false,
+        identity: "",
+        partnerID: ""
+      };
     },
-
-    // 获得图片验证码
-    GetCode() {
-      this.$http.GetCode().then(res => {
-        this.ImgCode = res;
-      });
+    created() {
+      this.GetCode();
+      this.$toast("欢迎注册亮健优医");
+    },
+    mounted() {
+      // 获取url中的参数
+      this.identity = this.getUrlParams('identity');
+      this.partnerID = this.getUrlParams('PartnerID') || "";
+      console.log(this.identity)
+      console.log(this.partnerID)
     },
+    methods: {
+      // 获取url中的参数
+      getUrlParams(paramsName) {
+        //JavaScript获取url,并把url中的参数变成数组的方法,arr数组的值就是各参数值
+        var url = window.document.location.href.toString();
+        var u = url.split("?");
+        var arr = [];
+        if (typeof (u[1]) == "string") {
+          u = u[1].split("&");
+          for (var i in u) {
+            var a = (u[i].split("="));
+            arr[a[0]] = a[1];
+          }
+        }
+        return arr[paramsName]
+      },
 
-    // 发送短信验证码
-    SendSMS() {
-      var obj = {
-        Mobile: this.Mobile,
-        verificationCode: this.verificationCode
-      };
-      var isSuccess = this.CheckSignUpData(obj);
-      if (!isSuccess.state) {
-        this.$toast(isSuccess.msg);
-        return;
-      }
+      // 获得图片验证码
+      GetCode() {
+        this.$http.GetCode().then(res => {
+          this.ImgCode = res;
+        });
+      },
 
-      this.$toast({
-        message: "发送中...",
-        type: "loading",
-        duration: 30000,
-        forbidClick: true
-      });
-      this.$http.SendSMS(obj).then(res => {
-        this.$toast.clear();
-        if (res.data.IsSuccess) {
-          this.$toast({
-            message: res.data.ResultMsg,
-            type: "success",
-            duration: 2000
-          });
-          this.DownTime();
-        } else {
-          this.$toast({
-            message: res.data.ResultMsg,
-            type: "fail",
-            duration: 2000
-          });
-          this.GetCode();
+      // 发送短信验证码
+      SendSMS() {
+        var obj = {
+          Mobile: this.Mobile,
+          verificationCode: this.verificationCode
+        };
+        var isSuccess = this.CheckSignUpData(obj);
+        if (!isSuccess.state) {
+          this.$toast(isSuccess.msg);
+          return;
         }
-      });
-    },
 
-    // 提交验证
-    SignUp() {
-      console.log(process.env.VUE_APP_PartnerUserLoginUrl)
-      console.log(process.env.VUE_APP_PatientUserLoginUrl)
+        this.$toast({
+          message: "发送中...",
+          type: "loading",
+          duration: 30000,
+          forbidClick: true
+        });
+        this.$http.SendSMS(obj).then(res => {
+          this.$toast.clear();
+          if (res.data.IsSuccess) {
+            this.$toast({
+              message: res.data.ResultMsg,
+              type: "success",
+              duration: 2000
+            });
+            this.DownTime();
+          } else {
+            this.$toast({
+              message: res.data.ResultMsg,
+              type: "fail",
+              duration: 2000
+            });
+            this.GetCode();
+          }
+        });
+      },
 
-      var obj = {
-        Mobile: this.Mobile,
-        verificationCode: this.verificationCode,
-        MoblieCode: this.MoblieCode
-      };
+      // 提交验证
+      SignUp() {
+        console.log(process.env.VUE_APP_PartnerUserLoginUrl)
+        console.log(process.env.VUE_APP_PatientUserLoginUrl)
 
-      var isSuccess = this.CheckSignUpData(obj);
+        var obj = {
+          Mobile: this.Mobile,
+          verificationCode: this.verificationCode,
+          MoblieCode: this.MoblieCode
+        };
 
-      if (!isSuccess.state) {
-        this.$toast(isSuccess.msg);
-        return;
-      }
-      obj = {
-        ...obj,
-        identity: this.identity,
-        SuperiorPartnerID: this.partnerID
-      }
-      this.$toast({
-        message: "绑定中...",
-        type: "loading",
-        duration: 30000,
-        forbidClick: true
-      });
-      this.$http.DoctorBinding(obj).then(res => {
-        console.log(res);
-        this.$toast.clear();
-        if (res.data.IsSuccess) {
-          this.$toast({
-            message: "绑定成功!",
-            type: "success",
-            duration: 1500,
-            forbidClick: true,
-            onClose: () => {
-              if (this.identity == 1) {
-                window.location = process.env.VUE_APP_DoctorUserLoginUrl;
-              } else if (this.identity == 2) {
-                window.location = process.env.VUE_APP_PartnerUserLoginUrl;
-              }
-            }
-          });
-        } else {
-          this.$toast(res.data.ResultMsg);
+        var isSuccess = this.CheckSignUpData(obj);
+
+        if (!isSuccess.state) {
+          this.$toast(isSuccess.msg);
+          return;
         }
-      });
-    },
-    // 验证注册数据
-    CheckSignUpData(obj) {
-      var state = { state: true, msg: "ok" };
+        obj = {
+          ...obj,
+          identity: this.identity,
+          SuperiorPartnerID: this.partnerID
+        }
+        this.$toast({
+          message: "绑定中...",
+          type: "loading",
+          duration: 30000,
+          forbidClick: true
+        });
+        this.$http.DoctorBinding(obj).then(res => {
+          console.log(res);
+          this.$toast.clear();
+          if (res.data.IsSuccess) {
+            this.$toast({
+              message: "绑定成功!",
+              type: "success",
+              duration: 1500,
+              forbidClick: true,
+              onClose: () => {
+                if (this.identity == 1) {
+                  window.location = process.env.VUE_APP_DoctorUserLoginUrl;
+                } else if (this.identity == 2) {
+                  window.location = process.env.VUE_APP_PartnerUserLoginUrl;
+                }
+              }
+            });
+          } else {
+            this.$toast(res.data.ResultMsg);
+          }
+        });
+      },
+      // 验证注册数据
+      CheckSignUpData(obj) {
+        var state = { state: true, msg: "ok" };
 
-      var MobileReg = /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/;
-      var CodeReg = /^[0-9a-zA-Z]{4}$/;
-      var SMSReg = /^[0-9]{6}$/;
+        var MobileReg = /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/;
+        var CodeReg = /^[0-9a-zA-Z]{4}$/;
+        var SMSReg = /^[0-9]{6}$/;
 
-      if ("Mobile" in obj && !MobileReg.test(obj.Mobile)) {
-        state.state = false;
-        state.msg = "请输入正确的手机号";
-        return state;
-      }
+        if ("Mobile" in obj && !MobileReg.test(obj.Mobile)) {
+          state.state = false;
+          state.msg = "请输入正确的手机号";
+          return state;
+        }
 
-      if ("verificationCode" in obj && !CodeReg.test(obj.verificationCode)) {
-        state.state = false;
-        state.msg = "图片验证码格式不正确";
-        return state;
-      }
+        if ("verificationCode" in obj && !CodeReg.test(obj.verificationCode)) {
+          state.state = false;
+          state.msg = "图片验证码格式不正确";
+          return state;
+        }
 
-      if ("MoblieCode" in obj && !SMSReg.test(obj.MoblieCode)) {
-        state.state = false;
-        state.msg = "短信验证码格式不正确";
+        if ("MoblieCode" in obj && !SMSReg.test(obj.MoblieCode)) {
+          state.state = false;
+          state.msg = "短信验证码格式不正确";
+          return state;
+        }
         return state;
-      }
-      return state;
-    },
+      },
 
-    // 短信验证码倒计时
-    DownTime() {
-      this.DownTimeStatus = true;
-      var t = setInterval(() => {
-        this.DownTimeNum--;
-        if (this.DownTimeNum <= 0) {
-          clearInterval(t);
-          t = null;
-          this.GetCode();
-          this.DownTimeNum = 180;
-          this.DownTimeStatus = false;
-        }
-      }, 1000);
+      // 短信验证码倒计时
+      DownTime() {
+        this.DownTimeStatus = true;
+        var t = setInterval(() => {
+          this.DownTimeNum--;
+          if (this.DownTimeNum <= 0) {
+            clearInterval(t);
+            t = null;
+            this.GetCode();
+            this.DownTimeNum = 180;
+            this.DownTimeStatus = false;
+          }
+        }, 1000);
+      }
     }
-  }
-};
+  };
 </script>
 
 <style scoped lang="less">
-main {
-  width: 100vw;
-  height: 100vh;
-  background-color: #fff;
-  position: relative;
+  main {
+    width: 100vw;
+    height: 100vh;
+    background-color: #fff;
+    position: relative;
 
-  > img {
-    width: 1.95rem;
-    position: absolute;
-    right: 0;
-    bottom: 0;
-  }
+    > img {
+      width: 1.95rem;
+      position: absolute;
+      right: 0;
+      bottom: 0;
+    }
 
-  > header {
-    width: 7.5rem;
-    height: 3.68rem;
-    background: url("../../assets/images/signup-bg1.png") no-repeat;
-    background-size: 7.5rem 3.68rem;
+    > header {
+      width: 7.5rem;
+      height: 3.68rem;
+      background: url("../../assets/images/signup-bg1.png") no-repeat;
+      background-size: 7.5rem 3.68rem;
 
-    img {
-      width: 2.44rem;
-      margin: 0.3rem auto 0;
+      img {
+        width: 2.44rem;
+        margin: 0.3rem auto 0;
+      }
     }
-  }
 
-  .signUp {
-    width: 7rem;
-    margin: -0.8rem auto 0;
-    box-sizing: border-box;
-    padding: 0 0.6rem;
-    background-color: #fff;
-    border-radius: 5px;
-    box-shadow: 0px 4px 9px 0px #9fb4d3;
+    .signUp {
+      width: 7rem;
+      margin: -0.8rem auto 0;
+      box-sizing: border-box;
+      padding: 0 0.6rem;
+      background-color: #fff;
+      border-radius: 5px;
+      box-shadow: 0px 4px 9px 0px #9fb4d3;
 
-    > div {
-      height: 1.18rem;
-      border-bottom: 1px solid #e2e2e2;
-      line-height: 1.18rem;
-      text-align: left;
+      > div {
+        height: 1.18rem;
+        border-bottom: 1px solid #e2e2e2;
+        line-height: 1.18rem;
+        text-align: left;
 
-      label {
-        display: inline-block;
-        min-width: 1.3rem;
-        width: 1.3rem;
-        font-size: 0.26rem;
-        color: #999999;
-      }
+        label {
+          display: inline-block;
+          min-width: 1.3rem;
+          width: 1.3rem;
+          font-size: 0.26rem;
+          color: #999999;
+        }
 
-      input {
-        width: 3rem;
-        height: 1rem;
-        font-size: 0.26rem;
-      }
+        input {
+          width: 3rem;
+          height: 1rem;
+          font-size: 0.26rem;
+        }
 
-      span {
-        display: inline-block;
-        width: 1.5rem;
-        height: 0.6rem;
-        background-color: #00a0e9;
-        text-align: center;
-        border-radius: 15px;
-        color: #fff;
-        line-height: 0.6rem;
-        font-size: 0.22rem;
-      }
+        span {
+          display: inline-block;
+          width: 1.5rem;
+          height: 0.6rem;
+          background-color: #00a0e9;
+          text-align: center;
+          border-radius: 15px;
+          color: #fff;
+          line-height: 0.6rem;
+          font-size: 0.22rem;
+        }
 
-      img {
-        width: 1.5rem;
-        vertical-align: middle;
+        img {
+          width: 1.5rem;
+          vertical-align: middle;
+        }
       }
     }
   }
-}
 </style>

+ 4 - 7
src/views/doctorRegister/doctorFlow/doctorFlow.vue

@@ -47,7 +47,6 @@ export default {
   methods: {
     // 获取医生擅长和医生简介信息并且提交审核
     async getSubmitAudit(e) {
-      console.log('之前的form数据: ', this.registerParams)
       this.registerParams = { ...this.registerParams, ...e }
       this.registerParams.isEducationDoctor = this.registerParams.isEducationDoctor=='是'?1:0
       this.registerParams.phone = window.sessionStorage.getItem('phone')
@@ -74,12 +73,13 @@ export default {
     },
 
     // 进入下一步骤
-    hadnleNextStep() {
+    async hadnleNextStep() {
+      console.log("send payload: ", this.registerParams)
+      const {data: response} = await reqDoctorSubmit(this.registerParams)
+      console.log(response)
       this.active++
     },
 
-  },
-  created() {
   }
 };
 </script>
@@ -95,9 +95,6 @@ export default {
 }
 
 .next-step-btn {
-  /*   position: absolute;
-  bottom: 5%;
-  transform: translate(-50%); */
   margin: 0.5rem 0;
   width: 90%;
 }

+ 6 - 1
src/views/doctorRegister/doctorMine/doctorMine.vue

@@ -91,12 +91,17 @@ export default {
       console.log(response)
       this.userInfo = response.result
       if(response.success!==1) return this.$toast(response.messages)
+      // 审核通过的时候展示其他导航菜单项,否则隐藏
       response.result.checkStatus===2 ? this.isShow=true : this.isShow=false
       delete this.userInfo.createTime
       delete this.userInfo.lastModifyTime
+      /* 数据持久化 */
+      // 持久化医生基本信息
       window.sessionStorage.setItem('doctorFillForm', JSON.stringify(this.userInfo))
+      // 持久化医生简介和擅长信息
       window.sessionStorage.setItem('doctorMessageForm', JSON.stringify({specialty: this.userInfo.specialty, description: this.userInfo.description}))
-      window.sessionStorage.setItem('licenseForm', JSON.stringify({headurl: response.result.headurl, qualificationImgurl:response.result.qualificationImgurl, practiceImgurl: response.result.practiceImgurl}))
+      // 持久化医生上传证照图片信息
+      window.sessionStorage.setItem('licenseForm', JSON.stringify({headurl: response.result.headurl, qualificationImgurl:response.result.qualificationImgurl, practiceImgurl: response.result.practiceImgurl, caPersonUrl: response.result.caPersonUrl}))
     }
   },
 

+ 14 - 7
vue.config.js

@@ -1,5 +1,7 @@
 const path = require("path");
-
+//添加版本号  此处用时间戳
+const Timestamp = new Date().getTime()
+process.env.VUE_APP_VERSION = require('./package.json').version
 module.exports = {
   publicPath: "./",
   devServer: {
@@ -9,7 +11,7 @@ module.exports = {
     proxy: {
       "/api": {
         // target: "http://mem.360lj.com/ueapi1", // 目标 API 地址 富勇电脑
-        target: "http://ue.360lj.com", // 目标 API 地址 富勇电脑
+        target: "http://ue.360lj.com",
         ws: true,
         changeOrigin: true, // 是否跨域
         pathRewrite: {
@@ -17,8 +19,7 @@ module.exports = {
         }
       },
       "/ymall": {
-        // target: "http://mem.360lj.com:7001", // 医生注册Java接口
-        target: "http://mem.360lj.com", // 医生注册Java接口
+        target: "http://mem.360lj.com",
         ws: true,
         changeOrigin: true, // 是否跨域
         pathRewrite: {
@@ -26,8 +27,7 @@ module.exports = {
         }
       },
       "/note": {
-        // target: "http://mem.360lj.com:7001", // 医生注册Java接口
-        target: "http://mem.360lj.com", // 医生注册Java接口
+        target: "http://mem.360lj.com",
         ws: true,
         changeOrigin: true, // 是否跨域
         pathRewrite: {
@@ -41,5 +41,12 @@ module.exports = {
       errors: false,
       lintOnSave: false
     }
-  }
+  },
+  configureWebpack: {
+    output: {
+      // 输出重构  打包编译后的 文件名称  【模块名称.版本号.时间戳】
+      filename: `js/[name].${process.env.VUE_APP_Version}.${Timestamp}.js`,
+      chunkFilename: `js/[name].${process.env.VUE_APP_Version}.${Timestamp}.js`
+    }
+  },
 };