瀏覽代碼

企业名称处理

Xiao_123 4 月之前
父節點
當前提交
222d61c68c

+ 3 - 1
components/PositionList/index.vue

@@ -58,7 +58,7 @@
             <image class="enterAvatar ml" :src="item.enterprise?.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
           </view>
           <view class="ss-m-l-35">
-            <view class="mr">{{ item.enterprise?.anotherName || item.enterprise.name }}</view>
+            <view class="mr">{{ dealEnterpriseName(item.enterprise?.anotherName || item.enterprise.name) }}</view>
             <span class="color-999">{{ item.enterprise?.industryName || '' }}</span>
             <span class="divider tag-gap1" v-if="item.enterprise?.industryName && item.enterprise?.scaleName"> | </span>
             <span class="mr color-999">{{ item.enterprise?.scaleName || '' }}</span>
@@ -77,6 +77,8 @@
 <script setup>
 import { commissionCalculation } from '@/utils/position'
 import { timesTampChange } from '@/utils/date'
+import { dealEnterpriseName } from '@/utils/getText'
+
 const props = defineProps({
   list: { type: Array, default: () => [] },
   noMore: { type: Boolean, default: false },

+ 3 - 2
pages/index/communicate.vue

@@ -23,7 +23,7 @@
 						<view class="box-content-names">
 							<view class="name">
 								{{ item.thatName }}
-								<text class="nameSub">{{ item.enterpriseAnotherName }}</text>
+								<text class="nameSub">{{ dealEnterpriseName(item.enterpriseAnotherName) }}</text>
 								<span class="line" v-if="item.postNameCn && item.enterpriseAnotherName"></span>
 								<text class="nameSub">{{ item.postNameCn }}</text>
 							</view>
@@ -52,6 +52,7 @@ import { getUserAvatar } from '@/utils/avatar'
 import { timesTampChange } from '@/utils/date'
 import { userStore } from '@/store/user'
 import { useIMStore } from '@/store/im'
+import { dealEnterpriseName } from '@/utils/getText'
 
 const IM = useIMStore()
 
@@ -111,7 +112,7 @@ const handleTo = (item) => {
 		id: userInfoVo?.userInfoResp?.userId,
 		name: thatName,
 		postName: postNameCn,
-		enterpriseName: enterpriseAnotherName,
+		enterpriseName: dealEnterpriseName(enterpriseAnotherName),
 		enterpriseId: userInfoVo?.userInfoResp?.enterpriseId,
 		channelID: channel_id,
 		channelType: channel_type,

+ 2 - 1
pagesA/chart/index.vue

@@ -6,7 +6,7 @@
         <text class="subText">
           {{ info?.postName && info?.postName !== 'null' && info?.postName !== 'undefined' ? info.postName : '' }}
           <text v-if="info?.postName && info?.postName !== 'null' && info?.postName !== 'undefined' && info.enterpriseName" class="gun">|</text>
-          {{ info.enterpriseName }}
+          {{ dealEnterpriseName(info.enterpriseName) }}
         </text>
       </view>
       <!-- <view class="box-top-content" v-if="interview.length">
@@ -217,6 +217,7 @@ import { initConnect, send, initChart, getMoreMessages, toChannel } from '@/hook
 import { getDict } from '@/hooks/useDictionaries'
 import { timesTampChange } from '@/utils/date'
 import { getUserAvatar } from '@/utils/avatar'
+import { dealEnterpriseName } from '@/utils/getText'
 import { preview } from '@/utils/preview'
 import { getPersonResumeCv, saveResume } from '@/api/user'
 import { uploadFile } from '@/api/file'

+ 2 - 1
pagesA/collect/company.vue

@@ -7,7 +7,7 @@
             <view class="d-flex align-center">
               <image :src="item.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" style="width: 50px; height: 50px; object-fit: contain"></image>
               <view style="flex: 1;" class="ss-m-l-30">
-                <view class="enterprise-name ellipsis">{{ item.name }}</view>
+                <view class="enterprise-name ellipsis">{{ dealEnterpriseName(item.name) }}</view>
                 <view class="ss-m-y-15 font-size-12">
                   <span class="tag-gap color-666">
                     <span>{{item.industryName }}</span>
@@ -43,6 +43,7 @@
 import { ref } from 'vue'
 import { getSubscribeEnterprise } from '@/api/user'
 import { dealDictArrayData } from '@/utils/position'
+import { dealEnterpriseName } from '@/utils/getText'
 
 const items = ref([])
 const status = ref('more')

+ 3 - 1
pagesA/recommendation/list.vue

@@ -15,7 +15,7 @@
 				<span v-else>面议</span>
 			</view>
 			<view class="list-company" style="border-radius: 0 0 12px 12px;">
-				<text>{{ item.enterprise?.anotherName }}</text>
+				<text>{{ dealEnterpriseName(item.enterprise?.anotherName) }}</text>
 				<text>{{ item.enterprise?.anotherName && item.job?.name ? ' · ' : '' }}</text>
 				<text>{{ item.job?.name }}</text>
 			</view>
@@ -25,6 +25,8 @@
 
 <script setup>
 import { timesTampChange } from '@/utils/date'
+import { dealEnterpriseName } from '@/utils/getText'
+
 const props = defineProps({
 	items: {
 		type: Array,

+ 1 - 0
pagesA/resume/index.vue

@@ -39,6 +39,7 @@ import { getPersonResumeCv, saveResume, deleteResume } from '@/api/user'
 import { uploadFile } from '@/api/file'
 import { timesTampChange } from '@/utils/date'
 import { preview } from '@/utils/preview'
+
 const emit = defineEmits(['submit'])
 const props = defineProps({
   resumeAnalysis: { type: Boolean, default: false }

+ 2 - 1
pagesA/seenMe/index.vue

@@ -17,7 +17,7 @@
             <view class="d-flex align-center">
               <image :src="item.enterprise.logoUrl" style="width: 50px; height: 50px;"></image>
               <view style="flex: 1;" class="ss-m-l-30">
-                <view class="enterprise-name ellipsis">{{ item.enterprise.anotherName || item.enterprise.name }}</view>
+                <view class="enterprise-name ellipsis">{{ dealEnterpriseName(item.enterprise.anotherName || item.enterprise.name) }}</view>
                 <!-- 行业规模 -->
                 <view class="ss-m-y-15 font-size-12">
                   <span class="tag-gap color-666">
@@ -58,6 +58,7 @@ import { getInterestedMePage } from '@/api/user'
 import { dealDictObjData } from '@/utils/position'
 import { getUserAvatar } from '@/utils/avatar'
 import { timesTampChange } from '@/utils/date'
+import { dealEnterpriseName } from '@/utils/getText'
 
 const status = ref('more')
 const queryParams = ref({

+ 3 - 2
pagesB/companyDetail/index.vue

@@ -4,7 +4,7 @@
       <view class="f-horizon">
         <image style="width: 80px; height: 80px;" :src="info.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
         <view class="f-straight ss-m-l-10" style="flex: 1;position: relative;">
-          <view class="title-des font-weight-bold" style="max-width: 45vw;">{{ info.anotherName }}</view>
+          <view class="title-des font-weight-bold" style="max-width: 60vw;">{{ dealEnterpriseName(info.anotherName || info.name) }}</view>
           <view class="color-999 ellipsis font-size-14" style="max-width: 60vw;">
             <span>{{ !!info.industryName? info.industryName : ''}}</span>
             <span class="ss-m-x-10" v-if="info?.industryName && info?.scaleName"> | </span>
@@ -119,6 +119,7 @@ import { getJobAdvertisedSearch } from '@/api/position'
 import { getAccessToken } from '@/utils/request'
 import PositionList from '@/components/PositionList'
 import { checkIsImage } from '@/utils'
+import { dealEnterpriseName } from '@/utils/getText'
 
 const current = ref(0)
 const items = ['企业介绍', '招聘职位']
@@ -242,7 +243,7 @@ const videoErrorCallback = (e) =>{
 <style scoped lang="scss">
 .title-des {
   color: #37576c;
-  font-size: 20px;
+  font-size: 17px;
   margin-right: 30px;
   margin-top: 1px;
   vertical-align: middle;

+ 3 - 1
pagesB/inviteRecord/list.vue

@@ -16,7 +16,7 @@
 				{{ item.job?.payTo }}
 			</view>
 			<view class="list-company">
-				<text>{{ item.enterprise?.anotherName }}</text>
+				<text>{{ dealEnterpriseName(item.enterprise?.anotherName) }}</text>
 				<text>{{ item.enterprise?.anotherName && item.job?.name ? ' · ' : '' }}</text>
 				<text>{{ item.job?.name }}</text>
 			</view>
@@ -26,6 +26,8 @@
 
 <script setup>
 import { timesTampChange } from '@/utils/date'
+import { dealEnterpriseName } from '@/utils/getText'
+
 const props = defineProps({
 	items: {
 		type: Array,

+ 3 - 2
pagesB/positionDetail/index.vue

@@ -50,7 +50,7 @@
             </view>
             <view >
               <view class="contact-name">{{ info.contact?.name }}</view>
-              <view class="contact-info">{{ info.enterprise?.anotherName || info.enterprise?.name }} {{ info.contact?.postNameCn ? '· ' + info.contact?.postNameCn : '' }}</view>
+              <view class="contact-info">{{ dealEnterpriseName(info.enterprise?.anotherName || info.enterprise?.name) }} {{ info.contact?.postNameCn ? '· ' + info.contact?.postNameCn : '' }}</view>
             </view>
           </view>
           <!-- 岗位职责 -->
@@ -212,6 +212,7 @@ import { onLoad, onShareAppMessage, onShow } from '@dcloudio/uni-app'
 import { prologue, defaultText } from '@/hooks/useIM'
 import { userStore } from '@/store/user'
 import { getSubscribeTemplateList } from '@/api/common'
+import { dealEnterpriseName } from '@/utils/getText'
 
 const useUserStore = userStore()
 const sharePopup = ref()
@@ -362,7 +363,7 @@ const createPoster = async () => {
 
   // 企业名称
   context.setFillStyle('#000000')
-  dealWords(context, 25, anotherName, 250, 150, 210, 2, true)
+  dealWords(context, 25, dealEnterpriseName(anotherName), 250, 150, 210, 2, true)
 
   // 企业行业类型、规模
   context.setFontSize(20)

+ 2 - 1
pagesB/recommendEnterprise/index.vue

@@ -6,7 +6,7 @@
           <view class="d-flex align-center" @click="handleToEnterprise(val)">
             <image class="enterAvatar" :src="val.enterprise.logoUrl ? val.enterprise.logoUrl : 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
             <view class="ss-m-l-20" style="flex: 1;">
-              <view class="font-size-16 enterpriseName">{{ val.enterprise.anotherName || val.enterprise.name }}</view>
+              <view class="font-size-16 enterpriseName">{{ dealEnterpriseName(val.enterprise.anotherName || val.enterprise.name) }}</view>
               <view class="ss-m-t-5">
                 <span class="color-999">{{ val.enterprise?.industryName || '' }}</span>
                 <span class="divider tag-gap1" v-if="val.enterprise?.industryName && val.enterprise?.scaleName"> | </span>
@@ -58,6 +58,7 @@
 import { ref }  from 'vue'
 import { getHotEnterprise } from '@/api/enterprise'
 import { dealDictObjData, dealDictArrayData } from '@/utils/position'
+import { dealEnterpriseName } from '@/utils/getText'
 
 const more = ref('more')
 const items = ref([])

+ 5 - 0
utils/getText.js

@@ -55,3 +55,8 @@ export const dealCanBeInputtedSave = (formItem, params) => {
   }
   else { params[formItem.key] = formItem.value; params[formItem.itemTextName] = formItem[formItem.itemTextName] }
 }
+
+// 处理企业名称
+export const dealEnterpriseName = (name) => {
+  return name ? name.replace(/&amp;/g, '&') : ''
+}