3 커밋 d2f555afe0 ... 844c483de5

작성자 SHA1 메시지 날짜
  梦辉 844c483de5 fix: 5 달 전
  梦辉 3a62c028d4 fix: 5 달 전
  梦辉 085a38290e fix: 5 달 전
3개의 변경된 파일24개의 추가작업 그리고 70개의 파일을 삭제
  1. 13 64
      src/common/js/baseUrl.js
  2. 7 1
      src/subPages/pages/commitment/components/commitmentConfirmForm/index.vue
  3. 4 5
      src/subPages/pages/commitment/home/index.vue

+ 13 - 64
src/common/js/baseUrl.js

@@ -1,71 +1,20 @@
 let httpApi = ""; // 基础服务
 let doorplateImgUrl='';//  门牌二维码图片地址
 //根据运行时版本设置请求url
-function setFetchUrlByEnv(env) {
-//  httpApi = "http://192.168.31.51:9080"; //公司测试
-  httpApi = "https://fhszmp.fh.gov.cn:9080"; //线上测试
-//  httpApi = "https://fhszmp.fh.gov.cn:8080"; //线上正式
-  doorplateImgUrl='https://fhszmp.fh.gov.cn:8090/digital-doorplateAddrUrl'
-
-//  console.log("当前运行", env);
-//  if (env === "development") {
-////        httpApi = "http://192.168.31.51:9080";
-//    httpApi = "http://122.247.77.37:9080";
-//    doorplateImgUrl='https://fhszmp.fh.gov.cn:8090/digital-doorplateAddrUrl'
-//  } else {
-//    httpApi = "https://zlszmp.fh.gov.cn:8088/digital-doorplate";
-//    doorplateImgUrl='https://zlszmp.fh.gov.cn:8088/digital-doorplateAddrUrl'
-//  }
-//  switch (env) {
-//    case "develop":
-//      httpApi = "http://172.18.50.88:8070/digital-doorplate";
-//      doorplateImgUrl='https://fhszmp.fh.gov.cn:8090/digital-doorplateAddrUrl'
-//      // 微信小程序开发环境在真机上连接外网体验版地址
-//      // #ifdef MP-WEIXIN
-//      if (__wxConfig && __wxConfig.platform !== "devtools") {
-//        httpApi = "http://60.191.98.34:8072/digital-doorplate";
-//      }
-//      // #endif
-//      break;
-//    case "trial":
-//      // 体验版
-//      // #ifdef MP-WEIXIN
-//      // httpApi = "http://60.191.98.34:8072/digital-doorplate"; // 基础服务
-//      httpApi = "https://zlszmp.fh.gov.cn:8088/digital-doorplate"; // 基础服务
-//      // #endif
-//      // #ifdef MP-ALIPAY
-//      httpApi = "https://zlszmp.fh.gov.cn:8088/digital-doorplate"; // 基础服务
-//      // #endif
-//      doorplateImgUrl='https://fhszmp.fh.gov.cn:8090/digital-doorplateAddrUrl'
-//      break;
-//    case "release":
-//      // 正式
-//      httpApi = "'https://fhszmp.fh.gov.cn:8090/digital-doorplate"; // 基础服务
-//      doorplateImgUrl='https://fhszmp.fh.gov.cn:8090/digital-doorplateAddrUrl'
-//      break;
-//    default:
-//      // httpApi = "http://172.18.50.92:8888/digital-doorplate";
-//      if (env === "development") {
-////        发版的时候恢复过来
-////         httpApi = window.location.origin + "/digital-doorplate"; //"http://172.18.50.92:8888/digital-doorplate";
-////         doorplateImgUrl='https://zlszmp.fh.gov.cn:8088/digital-doorplateAddrUrl'
-//
-////        httpApi = "http://192.168.31.51:9080";
-//        httpApi = "http://122.247.77.37:9080";
-//        doorplateImgUrl='https://fhszmp.fh.gov.cn:8090/digital-doorplateAddrUrl'
-//      } else {
-//        httpApi = "https://zlszmp.fh.gov.cn:8088/digital-doorplate";
-//        doorplateImgUrl='https://zlszmp.fh.gov.cn:8088/digital-doorplateAddrUrl'
-//      }
-//      break;
-//  }
+function setFetchUrlByEnv() {
+  // 获取当前页面的 URL
+  const currentUrl = window.location.href;
+  console.log("currentUrl", currentUrl);
+  if (currentUrl.includes('debug=true')) {
+    httpApi = 'https://fhszmp.fh.gov.cn:9080';
+    uni.getEnvVersion = ()=> 'development'
+  } else {
+    httpApi = 'https://fhszmp.fh.gov.cn:8080';
+    uni.getEnvVersion = () => 'production'
+  }
+  doorplateImgUrl='https://zlszmp.fh.gov.cn:8088/digital-doorplateAddrUrl'
 }
 
-uni.getEnvVersion = () => {
-  return process.env.NODE_ENV === "production" ? "production" : "development";
-};
-const envVersion = uni.getEnvVersion();
-
-setFetchUrlByEnv(envVersion);
+setFetchUrlByEnv();
 
 export { httpApi, doorplateImgUrl};

+ 7 - 1
src/subPages/pages/commitment/components/commitmentConfirmForm/index.vue

@@ -61,17 +61,22 @@ export default {
       //如果选择的不是符合,核查得分选择去掉符合
       //先清空核查得分
       this.formStates.auditScore = ''
-      if (this.formStates.auditResult !== '符合') {
+      if (this.formStates.auditResult === '整改') {
         this.checkGoalColumns = [
           {
             text: '整改 0分',
             value: 0
           },
+        ]
+        this.formStates.auditScore = '整改 0分'
+      } else if (this.formStates.auditResult === '整改扣分') {
+        this.checkGoalColumns = [
           {
             text: '整改扣分 -10分',
             value: -10
           }
         ]
+        this.formStates.auditScore = '整改扣分 -10分'
       } else {
         this.checkGoalColumns = [
           {
@@ -79,6 +84,7 @@ export default {
             value: 0
           }
         ]
+        this.formStates.auditScore = '符合'
       }
     },
     handleCheckGoalConfirm(value) {

+ 4 - 5
src/subPages/pages/commitment/home/index.vue

@@ -36,7 +36,7 @@ export default {
       try {
         const res = await searchCommitment({
           searchCriteria: this.searchValue,
-          createUser: 2,
+          createUser: uni.getStorageSync("userInfo").id || '',
           type
         })
         if(type === 0) {
@@ -54,9 +54,8 @@ export default {
           this.resultList = this.resultList.map(item => {
             return {
               ...item,
-              company_name: item.item,
-              create_time: item.time,
-              remark: item.name
+              createTime: item.time,
+              companyName: item.name
             }
           })
         }
@@ -126,7 +125,7 @@ export default {
               <PromiseList :no-request="true" :prop-data-list="resultList"></PromiseList>
             </van-tab>
             <van-tab title="企业信息">
-              <EnterPriseList :no-request="true" ::prop-data-list="resultList"></EnterPriseList>
+              <EnterPriseList :no-request="true" :prop-data-list="resultList"></EnterPriseList>
             </van-tab>
           </van-tabs>
         </view>