Browse Source

feat: ocr

ljc 2 weeks ago
parent
commit
6ac340feb8
2 changed files with 40 additions and 8 deletions
  1. 8 8
      config/index.ts
  2. 32 0
      pages/mine/improveImmediately.vue

+ 8 - 8
config/index.ts

@@ -14,14 +14,14 @@ let dt = 'club'//'club'; // 默认域名后缀
 const config = {
 
   HostWs: "wss://ws." + ho + "." + dt,
-  Host80: ht + "//secure." + ho + "." + dt,
-  Host00: ht + "//ucard." + ho + "." + dt,
-  Host85: ht + "//ucard." + ho + "." + dt,
-  Host04: ht + "//pay." + ho + "." + dt,
-  // Host80: 'http://192.168.0.23:8000',
-  // Host00: 'http://192.168.0.23:8000',
-  // Host85: 'http://192.168.0.23:8000',
-  // Host04: 'http://192.168.0.23:8004',
+  // Host80: ht + "//secure." + ho + "." + dt,
+  // Host00: ht + "//ucard." + ho + "." + dt,
+  // Host85: ht + "//ucard." + ho + "." + dt,
+  // Host04: ht + "//pay." + ho + "." + dt,
+  Host80: 'http://192.168.0.32:8000',
+  Host00: 'http://192.168.0.32:8000',
+  Host85: 'http://192.168.0.32:8000',
+  Host04: 'http://192.168.0.32:8004',
   Host90: ht + "//data." + ho + "." + dt,
   HostShop: ht + "//shopcustom." + ho + "." + dt,
   HostShopImg: ht + "//shopmanager." + ho + "." + dt,

+ 32 - 0
pages/mine/improveImmediately.vue

@@ -7,6 +7,37 @@
         <view v-show="currentStep === 1" class="form-section">
           <h3 class="section-title">{{ t('ImproveImmediately.Title.BasicInformation') }}</h3>
           <uni-row class="demo-uni-row uni-row1" :gutter="20">
+<!--            ocr识别-->
+            <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb-3">
+              ocr
+              <cwg-file-picker-wrapper v-model="ocrObj" :limit="1"
+                                       :fileMediatype="'all'" uploadUrl="/custom/file/upload/1" :baseUrl="updateUrl" :imageWidth="150"
+                                       :imageHeight="150" :showPreviewDelete="false" :canDelete="false" :uploadError="false"
+                                       :showProgress="false" :canChoose="true" :showError="false" :show-progress="false" disablePreview
+                                       :image-styles="imageStyle" @update:modelValue="(val) => handleFileUpdate(val, '1')"
+                                       customClass="avatar-uploader">
+                <view class="file-item">
+                  <image v-if="!isPdf(fileListID1.path)" class="avatar" :src="updateUrl + (fileListID1.path)">
+                  </image>
+                  <view v-else>
+                    <image class="icon" :src="icon_doc" />
+                  </view>
+                </view>
+              </cwg-file-picker-wrapper>
+              <!--                  <view v-else>-->
+              <!--                    <view class="file-item">-->
+              <!--                      <image-->
+              <!--                        v-if="!isPdf(fileListID1.path)"-->
+              <!--                        class="avatar"-->
+              <!--                        :src="updateUrl + fileListID1.path"-->
+              <!--                      ></image>-->
+              <!--                      <view v-else>-->
+              <!--                        <image class="icon" :src="icon_doc" />-->
+              <!--                      </view>-->
+
+              <!--                    </view>-->
+              <!--                  </view>-->
+            </uni-col>
             <!-- 客户类型 -->
             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
               <uni-forms-item :label="t('ImproveImmediately.Label.CustomerType')">
@@ -692,6 +723,7 @@ const divActiveHelf = ref(false)
 const divActiveAll = ref(false)
 const websock = ref(null)
 const isPC = ref(true)
+const ocrObj = ref()
 const fileListID1 = ref({ againPath: '', id: null, path: '', status: null, type: null })
 const fileListID2 = ref({ againPath: '', id: null, path: '', status: null, type: null })
 const fileListAdd1 = ref({ againPath: '', id: null, path: '', status: null, type: null })