im.vue 106 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547
  1. <template>
  2. <view>
  3. <!-- 顶部导航栏 -->
  4. <view class="top-navbar">
  5. <view class="navbar-content">
  6. <!-- 左侧返回按钮 -->
  7. <view class="navbar-left" @click="goBack">
  8. <u-icon name="arrow-leftward" size="48" color="#333"></u-icon>
  9. </view>
  10. <!-- 中间用户信息 -->
  11. <view class="navbar-center">
  12. <view v-if="userType==1" class="user-info">
  13. <view class="avatar-container">
  14. <image :src="postPushInfo.hr&&postPushInfo.hr.hrImg || '../../static/logo.png'" class="user-avatar" mode="aspectFill"></image>
  15. <view class="status-indicator" :style="{ 'background': postPushInfo.user&&postPushInfo.user.onlineStatus == 'ONLINE' ? 'rgba(29, 209, 104, 0.1)' : '#999' }"></view>
  16. </view>
  17. <view class="user-details">
  18. <view class="user-name">{{ postPushInfo.user&&postPushInfo.user.userName || '未知' }}</view>
  19. <view class="user-title">{{ postPushInfo.company && postPushInfo.company.companyName ||(postPushInfo.company &&postPushInfo.company.companyAllName|| '未知公司') }} · {{postPushInfo.hr&&postPushInfo.hr.hrPosition || '未知'}}</view>
  20. </view>
  21. </view>
  22. <view v-else class="user-info">
  23. <view class="avatar-container">
  24. <image :src="resumesInfo.avatar || '../../static/logo.png'" class="user-avatar" mode="aspectFill"></image>
  25. <view class="status-indicator" :style="{ 'background': postPushInfo.user&&postPushInfo.user.onlineStatus == 'ONLINE' ? 'rgba(29, 209, 104, 0.1)' : '#999' }"></view>
  26. </view>
  27. <view class="user-details">
  28. <view class="user-name">{{ resumesInfo.userName || '未知' }}</view>
  29. <view class="user-title">{{ postPushInfo.ruleClassifyName || '未知岗位' }}</view>
  30. </view>
  31. </view>
  32. </view>
  33. <!-- 右侧更多按钮 -->
  34. <view v-if="false" class="navbar-right" @click="showMoreOptions">
  35. <u-icon name="more-dot-fill" size="38" color="#333"></u-icon>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- 顶部操作 -->
  40. <view class="topSe flex justify-center" v-if="userType==1">
  41. <view class="topSe-box flex align-center justify-around">
  42. <view class="topSe-box-item flex flex-wrap justify-center" @click="currentPhone()">
  43. <image src="../../static/im/mobilePhone2.svg" style="width: 48rpx;height: 48rpx;" mode=""></image>
  44. <view class="" style="color: #999999;">
  45. 换电话
  46. </view>
  47. <view v-if="isSendPhone" class="status-indicator"><u-icon name="checkmark-circle-fill"></u-icon></view>
  48. </view>
  49. <view class="topSe-box-item flex flex-wrap justify-center" @click="currentWchat()">
  50. <image src="../../static/im/weiChat2.svg" style="width: 48rpx;height: 48rpx;" mode=""></image>
  51. <view class="" style="color: #999999;">
  52. 换微信
  53. </view>
  54. <view v-if="isSendWx" class="status-indicator"><u-icon name="checkmark-circle-fill"></u-icon></view>
  55. </view>
  56. <view class="topSe-box-item flex flex-wrap justify-center" @click="sendResumes()">
  57. <image src="../../static/im/orderInfo2.svg" style="width: 48rpx;height: 48rpx;" mode=""></image>
  58. <view class="" style="color: #999999;">
  59. 发简历
  60. </view>
  61. <view v-if="isSendResumes" class="status-indicator"><u-icon name="checkmark-circle-fill"></u-icon></view>
  62. </view>
  63. <view class="topSe-box-item flex flex-wrap justify-center" @click="noIdtent()">
  64. <image src="../../static/im/nowei.svg" style="width: 48rpx;height: 48rpx;" mode=""></image>
  65. <view class="" style="color: #999999;">
  66. 无兴趣
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="topSe flex justify-center" v-else>
  72. <view class="topSe-box flex align-center justify-around">
  73. <view class="topSe-box-item flex flex-wrap justify-center" @click="currentPhone()">
  74. <image src="../../static/im/mobilePhone.png" style="width: 48rpx;height: 48rpx;" mode=""></image>
  75. <view class="" style="color: #999999;">
  76. 换电话
  77. </view>
  78. <view v-if="isSendPhone" class="status-indicator"><u-icon name="checkmark-circle-fill"></u-icon></view>
  79. </view>
  80. <view class="topSe-box-item flex flex-wrap justify-center" @click="currentWchat()">
  81. <image src="../../static/im/weiChat.png" style="width: 48rpx;height: 48rpx;" mode=""></image>
  82. <view class="" style="color: #999999;">
  83. 换微信
  84. </view>
  85. <view v-if="isSendWx" class="status-indicator"><u-icon name="checkmark-circle-fill"></u-icon></view>
  86. </view>
  87. <view class="topSe-box-item flex flex-wrap justify-center" @click="giveSendResumes()">
  88. <image src="../../static/im/orderInfo.png" style="width: 48rpx;height: 48rpx;" mode=""></image>
  89. <view class="" style="color: #999999;">
  90. 求简历
  91. </view>
  92. <view v-if="isSendResumes" class="status-indicator"><u-icon name="checkmark-circle-fill"></u-icon></view>
  93. </view>
  94. <view class="topSe-box-item flex flex-wrap justify-center" @click="mianshiF()">
  95. <image src="../../static/im/mianshi.png" style="width: 48rpx;height: 48rpx;" mode=""></image>
  96. <view class="" style="color: #999999;">
  97. 约面试
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. <scroll-view scroll-y="true" @touchstart="hideDrawer" @scroll="scroll" :scroll-top="scrollTop"
  103. style="height: calc(100vh - 360rpx);width: 100%;padding: 20rpx 0;">
  104. <!-- 温馨提示 -->
  105. <!-- <view class="xuanfu">
  106. <view class="xuanfu-box flex">
  107. <view class="" style="margin-right: 10rpx;">
  108. <image style="width: 30rpx;height: 30rpx;"
  109. src="https://zhaopin.xianmaxiong.com/file/uploadPath/2022/09/07/85e0d70ba1d9a78463b36bf7f92f6dca.png"
  110. mode=""></image>
  111. </view>
  112. <view class="">
  113. {{messages}}
  114. </view>
  115. </view>
  116. </view> -->
  117. <!-- 岗位简介 -->
  118. <view class="jobs flex justify-center" v-if="JSON.stringify(postPushInfo)!='{}'&&userType==1">
  119. <view class="jobs-box">
  120. <view class="gwList-box-item flex justify-center" @click="gotoInfo(postPushInfo.postPushId)">
  121. <view class="gwList-box-item-box">
  122. <view class="gwList-box-item-box-title flex justify-between align-center">
  123. <text>{{postPushInfo.ruleClassifyName || '暂无岗位'}}</text>
  124. <text>{{postPushInfo.salaryRange}}</text>
  125. </view>
  126. <!-- 公司和人数 -->
  127. <view class="gwList-box-item-box-name flex align-center">
  128. <text>{{postPushInfo.company?postPushInfo.company.companyName:''}}</text>
  129. <text
  130. v-if="postPushInfo.company">{{postPushInfo.company?postPushInfo.company.companyPeople:'0人'}}</text>
  131. </view>
  132. <view class="gwList-box-item-box-label flex align-center flex-wrap">
  133. <!-- 本科 -->
  134. <text
  135. style="color: #666666;font-size: 26rpx;padding: 10rpx;background: rgba(198, 198, 198, 0.1);border-radius: 8rpx;margin-right: 10rpx;margin-bottom: 20rpx;">
  136. {{postPushInfo.education}}
  137. </text>
  138. <!-- 要求年限 -->
  139. <text
  140. style="color: #666666;font-size: 26rpx;padding: 10rpx;background: rgba(198, 198, 198, 0.1);border-radius: 8rpx;margin-right: 10rpx;margin-bottom: 20rpx;">
  141. {{postPushInfo.experience}}
  142. </text>
  143. <!-- 单双休 -->
  144. <text v-if="postPushInfo.company"
  145. style="color: #666666;font-size: 26rpx;padding: 10rpx;background: rgba(198, 198, 198, 0.1);border-radius: 8rpx;margin-right: 10rpx;margin-bottom: 20rpx;">
  146. {{postPushInfo.company.workRestTime}}
  147. </text>
  148. <!-- 岗位福利 -->
  149. <text v-for="(item, index) in postPushInfo.welfareTag ? postPushInfo.welfareTag.split(';') : []" :key="index"
  150. style="color: #666666;font-size: 26rpx;padding: 10rpx;background: rgba(198, 198, 198, 0.1);border-radius: 8rpx;margin-right: 10rpx;margin-bottom: 20rpx;">
  151. {{item}}
  152. </text>
  153. <text
  154. style="color: #666666;font-size: 26rpx;padding: 10rpx;background: rgba(198, 198, 198, 0.1);border-radius: 8rpx;margin-right: 10rpx;margin-bottom: 20rpx;"
  155. v-for="(ite,ind) in postPushInfo.positionWelfare" :key="ind">{{ite}}</text>
  156. </view>
  157. <!-- <view class="gwList-box-item-box-line"></view> -->
  158. <!-- 工作描述 -->
  159. <view class="gwList-box-item-box-info-text">
  160. <block v-if="isHtmlContent">
  161. <view :class="['job-description-item',!isJobDescExpanded?'job-description-itemAll':'']" v-html="postPushInfo.positionDetails"></view>
  162. </block>
  163. <block v-else>
  164. <view :class="['job-description-item',!isJobDescExpanded?'job-description-itemAll':'']">{{postPushInfo.positionDetails}}</view>
  165. </block>
  166. <!-- 展开/收起按钮 -->
  167. <view class="expand-btn" @click.stop="toggleJobDesc">
  168. <text class="expand-text">{{ isJobDescExpanded ? '收起' : '展开更多' }}</text>
  169. </view>
  170. </view>
  171. <!-- hr信息 -->
  172. <view class="gwList-box-item-box-info flex justify-between align-center">
  173. <view class="gwList-box-item-box-info-l flex align-center">
  174. <image
  175. :src="postPushInfo.hr&&postPushInfo.hr.hrImg?postPushInfo.hr.hrImg:'../../static/logo.png'"
  176. style="width: 58rpx;height: 58rpx;border-radius: 50%;margin-right: 20rpx;"
  177. mode=""></image>
  178. <view class="people">
  179. {{postPushInfo.user&&postPushInfo.user.userName?postPushInfo.user.userName:'未知'}}
  180. </view>·{{postPushInfo.hr&&postPushInfo.hr.hrPosition||'创始人'}}
  181. </view>
  182. <!--
  183. <view class="gwList-box-item-box-info-r flex justify-end">
  184. {{postPushInfo.county}} {{postPushInfo.address}}
  185. </view>
  186. -->
  187. </view>
  188. <!-- 时间和收藏 -->
  189. <view class="time-favorite flex justify-between align-center">
  190. <view class="time-text">
  191. {{conversationInfo.createTime&&conversationInfo.createTime}} 向你发起的沟通
  192. </view>
  193. <view :class="['favorite-btn flex align-center',postPushInfo.isCollection?'collectActived':'']" @click.stop="setCollection(postPushInfo.postPushId)">
  194. <text class="favorite-icon"><u-icon :name="postPushInfo.isCollection?'star-fill':'star'"></u-icon></text>
  195. <text class="favorite-text">收藏职位</text>
  196. </view>
  197. </view>
  198. </view>
  199. </view>
  200. </view>
  201. </view>
  202. <!-- 简历简介 -->
  203. <view class="jobs flex justify-center" v-if="JSON.stringify(resumesInfo)!='{}'"
  204. @click="goNav('/pages/talentSearch/resumeDetail?resumesId=' + resumesId + '&postPushId=' + postPushId + '&isShowBtn=' + 1, 'company')">
  205. <view class="talent-list">
  206. <view class="talent-card">
  207. <view class="talent-content">
  208. <!-- 头像和基本信息 -->
  209. <view class="talent-header">
  210. <image :src="resumesInfo&&resumesInfo.avatar||'../../static/logo.png'" class="talent-avatar" mode="aspectFill"></image>
  211. <view class="talent-info">
  212. <view class="talent-name-section">
  213. <view class="talent-name">期望:{{ resumesInfo.intentionRuleClassifyName }} <text class="talentRange">{{resumesInfo.intentionSalaryRange}}</text></view>
  214. <!-- <view class="talent-tags">
  215. <view class="status-tag online" v-if="resumesInfo.isOnline">在线</view>
  216. <view class="status-tag hot" v-if="talent.isHot">热门搜索</view>
  217. <view class="status-tag active" v-if="resumesInfo.lastActive">{{ resumesInfo.lastActive }}
  218. </view>
  219. </view> -->
  220. </view>
  221. <!-- 经验和薪资 -->
  222. <view class="talent-experience">
  223. <text class="experience-text">{{ resumesInfo.resumesWorkExperience || 0 }}年</text>
  224. <text class="education-salary">{{ postPushInfo.education}}</text>
  225. <text class="education-salary">{{ postPushInfo.salaryRange}}</text>
  226. <text class="status-text">{{ jobStatusList[resumesInfo.resumesStatus].text}}</text>
  227. </view>
  228. </view>
  229. </view>
  230. <!-- 当前职位 -->
  231. <view class="current-job">
  232. <image src="../../static/images/aixin.svg" class="job-icon" mode="aspectFit"></image>
  233. <text class="job-text">{{ resumesInfo.resumesListDtoList&&resumesInfo.resumesListDtoList.companyName||'' }}·{{ resumesInfo.resumesListDtoList&&resumesInfo.resumesListDtoList.lastWorkPosition||'' }}</text>
  234. </view>
  235. <!-- 求职期望 -->
  236. <view class="job-expectation">
  237. <image src="../../static/images/xiangzi.svg" class="job-icon" mode="aspectFit"></image>
  238. <text class="expectation-text">{{ resumesInfo.resumesListDtoList&&resumesInfo.resumesListDtoList.school||'' }}·{{ resumesInfo.resumesListDtoList&&resumesInfo.resumesListDtoList.profession||'' }}</text>
  239. </view>
  240. <!-- 技能标签 -->
  241. <view class="skill-tags">
  242. <view class="skill-tag" v-for="(skill, skillIndex) in resumesInfo.resumesListDtoList&&resumesInfo.resumesListDtoList.intentIndustry&&resumesInfo.resumesListDtoList.intentIndustry.split('/')||[]" :key="skillIndex">
  243. {{ skill }}
  244. </view>
  245. </view>
  246. <!-- 工作描述 -->
  247. <view class="job-description">
  248. <text class="description-text">{{ resumesInfo.adv }}</text>
  249. </view>
  250. </view>
  251. <view class="time-favorite flex justify-between align-center">
  252. <view class="time-text">
  253. {{conversationInfo.createTime&&conversationInfo.createTime.substring(0,10)}} 沟通的职位-亚马逊{{resumesInfo.intentionRuleClassifyName}}
  254. </view>
  255. </view>
  256. </view>
  257. </view>
  258. </view>
  259. <!-- 聊天记录 -->
  260. <view style="display: flex;flex-direction: column;" v-for="(item,index) in ListItem" :key="index" :id=" 'id-'+index">
  261. <view style="margin-top: 15rpx;width: 100%;text-align: center;font-size: 26rpx;color: #999999;"
  262. v-if="item.createTime">
  263. {{item.createTime}}
  264. </view>
  265. <view v-if="item.userId && userId != item.userId" style="width: 83%;margin-right: 15%;">
  266. <view class="chat-listitem" style="float: left;margin-left: 10rpx;">
  267. <view>
  268. <image @tap="goGuanZhu(item)" :lazy-load="true" mode="aspectFill" :src="item.avatar ? item.avatar : '/static/logo.png'"
  269. class="chat-listitem-image"></image>
  270. </view>
  271. <view v-if="item.content && item.messageType === 1" @longpress="copyAndJubao(item)"
  272. class="chat-listitem-text"
  273. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">{{item.content}}</view>
  274. <view v-if="item.messageType === 20" @tap="sendCallVideo(2)"
  275. class="chat-listitem-text flex align-center"
  276. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  277. 视频通话
  278. <image src="../../static/im/historyVideo_black.png"
  279. style="width: 50rpx;height: 50rpx;margin-left: 20rpx;" mode=""></image>
  280. </view>
  281. <view v-if="item.messageType === 21" @tap="sendCallVideo(1)"
  282. class="chat-listitem-text flex align-center"
  283. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  284. 语音通话
  285. <image src="../../static/im/historyAudio_black.png"
  286. style="width: 50rpx;height: 50rpx;margin-left: 20rpx;" mode=""></image>
  287. </view>
  288. <!-- 互换手机号 -->
  289. <view v-if="item.content && item.messageType === 5 && item.content=='手机号请求'"
  290. @longpress="copy(item.content)" class="chat-listitem-text"
  291. style="padding-bottom: 20rpx;;padding-top: 20rpx;margin-left: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);">
  292. <view class="flex align-center">
  293. <image src="../../static/im/mobilePhone.png"
  294. style="width: 60rpx;height: 60rpx;margin-right: 10rpx;" mode=""></image>
  295. 我想跟你交换手机号,是否同意?
  296. </view>
  297. <view class="flex justify-between" style="margin-top: 30rpx;font-size: 24rpx;">
  298. <view @click.stop="refuseFun(item.chatContentId)"
  299. class="flex justify-center align-center"
  300. style="width: 40%;height: 50rpx;background-color: #F5F5F5;border-radius: 12rpx;">
  301. 拒绝
  302. </view>
  303. <view @click.stop="tongyi(item.messageType,item.chatContentId)"
  304. class="flex justify-center align-center"
  305. style="width: 40%;height: 50rpx;background-color: #D9FEED;border-radius: 12rpx;">
  306. 同意
  307. </view>
  308. </view>
  309. </view>
  310. <view v-if="item.content && item.messageType === 5 && item.content!='手机号请求'"
  311. class="chat-listitem-text"
  312. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  313. 已同意交换手机号
  314. </view>
  315. <view v-if="item.content && item.messageType === 7"
  316. @longpress="copyss(item.content,item.userType,'phone')" class="chat-listitem-text"
  317. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  318. <view class="" v-if="item.userType==1">
  319. 我的手机号为:{{JSON.parse(item.content).userPhone}}
  320. </view>
  321. <view class="" v-else>
  322. 我的手机号为:{{JSON.parse(item.content).companyPhone}}
  323. </view>
  324. </view>
  325. <!-- 互换微信号 -->
  326. <view v-if="item.content && item.messageType === 6 && item.content=='微信号请求'"
  327. @longpress="copy(item.content)" class="chat-listitem-text"
  328. style="padding-bottom: 20rpx;;padding-top: 20rpx;margin-left: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);">
  329. <view class="flex align-center">
  330. <image src="../../static/im/weiChat.png"
  331. style="width: 60rpx;height: 60rpx;margin-right: 10rpx;" mode=""></image>
  332. 我想跟你交换微信号,是否同意?
  333. </view>
  334. <view class="flex justify-between" style="margin-top: 30rpx;font-size: 24rpx;">
  335. <view @click.stop="refuseFun(item.chatContentId)"
  336. class="flex justify-center align-center"
  337. style="width: 40%;height: 50rpx;background-color: #F5F5F5;border-radius: 12rpx;">
  338. 拒绝
  339. </view>
  340. <view @click.stop="tongyi(item.messageType,item.chatContentId)"
  341. class="flex justify-center align-center"
  342. style="width: 40%;height: 50rpx;background-color: #D9FEED;border-radius: 12rpx;">
  343. 同意
  344. </view>
  345. </view>
  346. </view>
  347. <view v-if="item.content && item.messageType === 6 && item.content!='微信号请求'"
  348. class="chat-listitem-text"
  349. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  350. 已同意交换微信号
  351. </view>
  352. <view v-if="item.content && item.messageType === 8"
  353. @longpress="copyss(item.content,item.userType,'wx')" class="chat-listitem-text"
  354. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  355. <view class="" v-if="item.userType==1">
  356. 我的微信号为:{{JSON.parse(item.content).userWx}}
  357. </view>
  358. <view class="" v-else>
  359. 我的微信号为:{{JSON.parse(item.content).companyWx}}
  360. </view>
  361. </view>
  362. <view v-if="item.content && item.messageType === 9 && item.content=='简历请求'"
  363. @longpress="copy(item.content)" class="chat-listitem-text"
  364. style="padding-bottom: 20rpx;;padding-top: 20rpx;margin-left: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);">
  365. <view class="flex align-center">
  366. <image src="../../static/im/orderInfo.png"
  367. style="width: 60rpx;height: 60rpx;margin-right: 10rpx;" mode=""></image>
  368. 我想要你的一份简历,是否同意?
  369. </view>
  370. <view class="flex justify-between" style="margin-top: 30rpx;font-size: 24rpx;">
  371. <view @click.stop="refuseFun(item.chatContentId)"
  372. class="flex justify-center align-center"
  373. style="width: 40%;height: 50rpx;background-color: #F5F5F5;border-radius: 12rpx;">
  374. 拒绝
  375. </view>
  376. <view @click.stop="resumesTy()" class="flex justify-center align-center"
  377. style="width: 40%;height: 50rpx;background-color: #D9FEED;border-radius: 12rpx;">
  378. 同意
  379. </view>
  380. </view>
  381. </view>
  382. <view v-if="item.content && item.messageType === 9 && item.content!='简历请求'"
  383. @longpress="copy(item.content)" class="chat-listitem-text"
  384. style="padding-bottom: 20rpx;;padding-top: 20rpx;margin-left: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);">
  385. <view class="flex align-center">
  386. <image src="../../static/im/orderInfo.png"
  387. style="width: 60rpx;height: 60rpx;margin-right: 10rpx;" mode=""></image>
  388. {{item.content}}
  389. </view>
  390. </view>
  391. <view v-if="item.content && item.messageType === 10" class="chat-listitem-text"
  392. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  393. {{item.content}}
  394. </view>
  395. <view v-if="item.content && item.messageType === 12" class="chat-listitem-text"
  396. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  397. {{item.content}}已拒绝
  398. </view>
  399. <view class="chat-listitem-text bg-style" style="margin-left: 20rpx;"
  400. v-if="item.content && (item.messageType === 96 || item.messageType === 97)">{{item.content}}</view>
  401. <view v-if="item.content && item.messageType === 99"
  402. class="chat-listitem-text"
  403. style="padding-bottom: 20rpx;;padding-top: 20rpx;margin-left: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);">
  404. <view class="flex align-center">
  405. <image src="../../static/im/msyy.svg"
  406. style="width: 60rpx;height: 60rpx;margin-right: 10rpx;flex-shrink: 0;" mode="aspectFill"></image>
  407. 您收到了{{item.content}}
  408. </view>
  409. </view>
  410. <view v-if="item.content && item.messageType === 98"
  411. class="chat-listitem-text"
  412. style="padding-bottom: 20rpx;;padding-top: 20rpx;margin-left: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);">
  413. <view class="flex align-center">
  414. <image src="../../static/im/msjg.svg"
  415. style="width: 60rpx;height: 60rpx;margin-right: 10rpx;flex-shrink: 0;" mode="aspectFill"></image>
  416. {{item.content}}
  417. </view>
  418. </view>
  419. <image @tap="viewImg(item.content)" v-if="item.content && item.messageType === 2"
  420. :src="item.content" style="height: 200rpx;width: 200rpx;margin-left: 20rpx;" :lazy-load="true" mode="aspectFill"></image>
  421. <image class="chat-listitem-text"
  422. v-if="item.content && item.messageType === 4"
  423. :src="ossUrl +item.content"
  424. style="height: 80rpx;width: 80rpx;margin-left: 20rpx;" :lazy-load="true" mode="aspectFill"></image>
  425. <view v-if="item.content && item.messageType === 3" class="chat-listitem-text bubble voice textColorLeft"
  426. :class="playMsgid == index?'play':''"
  427. style="margin-left: 20rpx;display: flex;align-items: center;"
  428. @tap="playVoice(item.content,index)">
  429. <image v-if="playMsgid != index" src="../../static/im/laba.png"
  430. style="width: 35upx;height: 40upx;margin-right: 10rpx;"></image>
  431. <image v-if="playMsgid == index" src="../../static/im/labagif.gif"
  432. style="width: 35upx;height: 40upx;margin-right: 10rpx;"></image>
  433. <view class="length">{{item.width ? item.width : 0}}</view>
  434. </view>
  435. <view class="chat-listitem-text "
  436. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;"
  437. v-if="item.content && item.messageType === 18"
  438. @click="openMapss(item.content.latitude,item.content.longitude,item.content.address)">
  439. <view class="padding-sm flex">
  440. <!-- #ifdef APP -->
  441. <u-icon name="map-fill" color="#ffffff" size="28" style="margin-right: 10rpx;"></u-icon>
  442. <!-- #endif -->
  443. {{item.content.address}}
  444. </view>
  445. <!-- #ifndef APP -->
  446. <map style="width: 100%; height: 120px;" scale="14" :latitude="item.content.latitude"
  447. :longitude="item.content.longitude"
  448. @tap="openMapss(item.content.latitude,item.content.longitude,item.content.address)"
  449. :markers="item.markers">
  450. </map>
  451. <!-- #endif -->
  452. </view>
  453. </view>
  454. </view>
  455. <!-- ++++++++++++++++++++++++++ -->
  456. <view v-if="item.userId && userId == item.userId" style="width: 83%;margin-left: 15%;">
  457. <view class="chat-listitem" style="float: right;">
  458. <view v-if="item.content && item.messageType === 1" @longpress="caozuoActive(item,1)"
  459. class="chat-listitem-text textColor" style="margin-right: 20rpx;">{{item.content}}</view>
  460. <view v-if="item.messageType === 20" @tap="sendCallVideo(2)"
  461. class="chat-listitem-text textColor flex align-center" style="margin-right: 20rpx;">
  462. 视频通话
  463. <image src="../../static/im/historyVideo_white.png"
  464. style="width: 50rpx;height: 50rpx;margin-left: 20rpx;" mode=""></image>
  465. </view>
  466. <view v-if="item.messageType === 21" @tap="sendCallVideo(1)"
  467. class="chat-listitem-text textColor flex align-center" style="margin-right: 20rpx;">
  468. 语音通话
  469. <image src="../../static/im/historyAudio_white.png"
  470. style="width: 50rpx;height: 50rpx;margin-left: 20rpx;" mode=""></image>
  471. </view>
  472. <view v-if="item.content && item.messageType === 5" class="chat-listitem-text textColor"
  473. style="margin-right: 20rpx;">
  474. 交换手机号请求已发送,等待对方同意
  475. </view>
  476. <view v-if="item.content && item.messageType === 7"
  477. @longpress="copyss(item.content,item.userType,'phone')" class="chat-listitem-text textColor"
  478. style="margin-right: 20rpx;">
  479. <view class="" v-if="item.userType==1">
  480. 我的手机号为:{{JSON.parse(item.content).userPhone}}
  481. </view>
  482. <view class="" v-else>
  483. 我的手机号为:{{JSON.parse(item.content).companyPhone}}
  484. </view>
  485. </view>
  486. <view v-if="item.content && item.messageType === 6" class="chat-listitem-text textColor"
  487. style="margin-right: 20rpx;">
  488. 交换微信号请求已发送,等待对方同意
  489. </view>
  490. <view v-if="item.content && item.messageType === 8"
  491. @longpress="copyss(item.content,item.userType,'wx')" class="chat-listitem-text textColor"
  492. style="margin-right: 20rpx;">
  493. <view class="" v-if="item.userType==1">
  494. 我的微信号为:{{JSON.parse(item.content).userWx}}
  495. </view>
  496. <view class="" v-else>
  497. 我的微信号为:{{JSON.parse(item.content).companyWx}}
  498. </view>
  499. </view>
  500. <view v-if="item.content && item.messageType === 9" class="chat-listitem-text textColor"
  501. style="margin-right: 20rpx;">
  502. 简历请求已发送,等待对方同意
  503. </view>
  504. <view v-if="item.content && item.messageType === 10" class="chat-listitem-text textColor"
  505. style="margin-right: 20rpx;">
  506. {{item.content}}
  507. </view>
  508. <view v-if="item.content && item.messageType === 12" class="chat-listitem-text textColor"
  509. style="margin-right: 20rpx;">
  510. {{item.content}}已拒绝
  511. </view>
  512. <view class="chat-listitem-text bg-style" style="margin-right: 20rpx;"
  513. v-if="item.content && (item.messageType === 96 || item.messageType === 97)">{{item.content}}</view>
  514. <view v-if="item.content && item.messageType === 99"
  515. class="chat-listitem-text textColor"
  516. style="padding-bottom: 20rpx;;padding-top: 20rpx;margin-right: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);">
  517. <view class="flex align-center">
  518. <image src="../../static/im/msyy.svg"
  519. style="width: 60rpx;height: 60rpx;margin-right: 10rpx;flex-shrink: 0;" mode="aspectFill"></image>
  520. 您发送了{{item.content}}
  521. </view>
  522. </view>
  523. <view v-if="item.content && item.messageType === 98"
  524. class="chat-listitem-text textColor"
  525. style="padding-bottom: 20rpx;;padding-top: 20rpx;margin-right: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);">
  526. <view class="flex align-center">
  527. <image src="../../static/im/msjg.svg"
  528. style="width: 60rpx;height: 60rpx;margin-right: 10rpx;flex-shrink: 0;" mode="aspectFill"></image>
  529. {{item.content}}
  530. </view>
  531. </view>
  532. <view class="chat-listitem-text textColor" style="margin-right: 20rpx;"
  533. v-if="item.content && item.messageType === 18"
  534. @click="openMapss(item.content.latitude,item.content.longitude,item.content.address)">
  535. <view class="padding-sm flex">
  536. <!-- #ifdef APP -->
  537. <u-icon name="map-fill" color="#ffffff" size="28" style="margin-right: 10rpx;"></u-icon>
  538. <!-- #endif -->
  539. {{item.content.address}}
  540. </view>
  541. <!-- #ifndef APP -->
  542. <map style="width:520upx; height: 120px;" scale="14" :latitude="item.content.latitude"
  543. :longitude="item.content.longitude"
  544. @tap="openMapss(item.content.latitude,item.content.longitude,item.content.address)"
  545. :markers='item.markers'>
  546. </map>
  547. <!-- #endif -->
  548. </view>
  549. <!-- <view v-if="item.content && item.messageType === 1" @longpress="copy(item.content)"
  550. class="chat-listitem-text" style="margin-right: 20rpx;">{{item.content}}</view> -->
  551. <image @longpress="caozuoActive(item)" @tap="viewImg(item.content)"
  552. v-if="item.content && item.messageType === 2" :src="item.content"
  553. style="height: 200rpx;width: 200rpx;margin-right: 20rpx;" :lazy-load="true" mode="aspectFill"></image>
  554. <image class="chat-listitem-text textColor"
  555. v-if="item.content && item.messageType === 4"
  556. :src="ossUrl +item.content"
  557. style="height: 80rpx;width: 80rpx;margin-right: 20rpx;" :lazy-load="true" mode="aspectFill">
  558. </image>
  559. <view v-if="item.content && item.messageType === 3"
  560. class="chat-listitem-text bubble voice textColor" :class="playMsgid == index?'play':''"
  561. style="margin-right: 20rpx;display: flex;align-items: center;"
  562. @longpress="caozuoActive(item)" @tap="playVoice(item.content,index)">
  563. <view class="length">{{item.width ? item.width : 0}}</view>
  564. <image v-if="playMsgid != index" src="../../static/im/labaleft.png"
  565. style="width: 35upx;height: 40upx;margin-left: 10rpx;"></image>
  566. <image v-if="playMsgid == index" src="../../static/im/labaleft.png"
  567. style="width: 35upx;height: 40upx;margin-left: 10rpx;"></image>
  568. </view>
  569. <view>
  570. <image :lazy-load="true" mode="aspectFill" :src="imageUrl" class="chat-listitem-image"></image>
  571. </view>
  572. </view>
  573. </view>
  574. </view>
  575. <!-- </view> -->
  576. </scroll-view>
  577. <!-- 底部聊天输入框 -->
  578. <!-- <view class="input-box">
  579. <view style="display: flex;margin-top: 15rpx;width: 100%;">
  580. <image src="https://renwu.xiansqx.com/img/20210817/024ca47bc591460daf76762a8e98283f.png" @click="chooseImage(['album'])" style="width: 60rpx;height: 60rpx;margin-top: 8rpx;"></image>
  581. <input confirm-type="send" @confirm='setChatSave(1)' type="text" v-model="content"
  582. style="width: 68%;height: 70rpx;background: #FFFFFF;margin: 4rpx 10rpx 0;border-radius: 10rpx;padding-left: 10rpx;" />
  583. <view class="save" @tap='setChatSave(1)'>发送</view>
  584. </view>
  585. </view> -->
  586. <!-- 长按操作菜单 -->
  587. <u-action-sheet :list="activelist" @click="activeclick" v-model="showActive" :tips="tips"></u-action-sheet>
  588. <!-- 抽屉栏 -->
  589. <view class="popup-layer" :class="popupLayerClass" @touchmove.stop.prevent="discard">
  590. <!-- 表情 -->
  591. <swiper class="emoji-swiper" indicator-active-color="#cccccc" :class="{hidden:hideEmoji}"
  592. indicator-dots="true" duration="150">
  593. <swiper-item v-for="(page1,pid) in emojiList" :key="pid">
  594. <view v-for="(em,eid) in page1" :key="eid" @tap="setChatSave(4,em.url)">
  595. <!-- <image src="../../static/emoji/100.gif" mode="widthFix"></image> -->
  596. <image mode="widthFix" :src="ossUrl+em.url"></image>
  597. </view>
  598. </swiper-item>
  599. </swiper>
  600. <!-- 更多功能 相册-拍照-红包 -->
  601. <view class="more-layer" :class="{hidden:hideMore}">
  602. <view class="list" style="color: #000000;">
  603. <!-- 上传图片 -->
  604. <view style="margin-bottom: 30rpx;">
  605. <view class="box" @click="chooseImage(['album'])">
  606. <image src="../../static/im/tupian.svg" style="width: 48rpx;height: 48rpx;" mode=""></image>
  607. </view>
  608. <view style="width: 100%;text-align: center;color: #999;font-size: 20rpx;">上传图片</view>
  609. </view>
  610. <!-- #ifdef H5 || APP -->
  611. <!-- 语音 -->
  612. <view v-if="isVip" style="margin-bottom: 20rpx;">
  613. <view class="box" @tap="sendCallVideo(1)">
  614. <image src="../../static/im/yuyin.svg" mode=""
  615. style="width: 48rpx;height: 48rpx;">
  616. </image>
  617. </view>
  618. <view style="width: 100%;text-align: center;color: #999;font-size: 20rpx;">语音通话</view>
  619. </view>
  620. <!-- 视频 -->
  621. <view v-if="false" style="margin-bottom: 20rpx;">
  622. <view class="box" @tap="sendCallVideo(2)">
  623. <image src="../../static/im/shipin.svg" mode=""
  624. style="width: 48rpx;height: 48rpx;">
  625. </image>
  626. </view>
  627. <view style="width: 100%;text-align: center;color: #999;font-size: 20rpx;">视频通话</view>
  628. </view>
  629. <!-- #endif -->
  630. <!-- 常用语 -->
  631. <view style="margin-bottom: 20rpx;">
  632. <view class="box" @tap="showChangYongSelect">
  633. <view class="icon jianpan" style="font-size: 44rpx;"></view>
  634. </view>
  635. <view style="width: 100%;text-align: center;color: #999;font-size: 20rpx;">常用语句</view>
  636. </view>
  637. <!-- 添加常用语或自动回复内容 -->
  638. <view style="margin-bottom: 20rpx;">
  639. <view class="box" @tap="goAdd">
  640. <view class="icon add" style="font-size: 44rpx;"></view>
  641. </view>
  642. <view style="width: 100%;text-align: center;color: #999;font-size: 20rpx;">添加语句</view>
  643. </view>
  644. <view style="margin-bottom: 20rpx;">
  645. <view class="box" @tap="goMapss">
  646. <image src="../../static/images/weizhi.png" mode="" style="width: 48rpx;height: 48rpx;">
  647. </image>
  648. </view>
  649. <view style="width: 100%;text-align: center;color: #999;font-size: 20rpx;">发送位置</view>
  650. </view>
  651. <!-- <view>
  652. <view class="box" @tap="goHistory">
  653. <view class="icon chehui"></view>
  654. </view>
  655. <view style="width: 100%;text-align: center;">聊天记录</view>
  656. </view> -->
  657. </view>
  658. </view>
  659. </view>
  660. <!-- 底部输入栏 -->
  661. <view class="input-box" :class="popupLayerClass" @touchmove.stop.prevent="discard">
  662. <!-- H5下不能录音,输入栏布局改动一下 -->
  663. <!-- #ifndef H5 -->
  664. <view class="voice">
  665. <view class="icon" :class="isVoice?'jianpan':'yuyin'" @tap="switchVoice"></view>
  666. </view>
  667. <!-- #endif -->
  668. <view class="textbox">
  669. <view class="voice-mode" :class="[isVoice?'':'hidden',recording?'recording':'']"
  670. @touchstart="voiceBegin" @touchmove.stop.prevent="voiceIng" @touchend="voiceEnd"
  671. @touchcancel="voiceCancel">{{voiceTis}}</view>
  672. <view class="text-mode" :class="isVoice?'hidden':''">
  673. <!-- 常用语按钮 -->
  674. <view class="changgui" @tap="showChangYongSelect">
  675. <image src="../../static/im/changgui.svg" style="width: 56rpx;height: 56rpx;" mode=""></image>
  676. </view>
  677. <view class="box">
  678. <textarea style="color: #000000;" auto-height="true" @confirm='setChatSave(1)' v-model="content"
  679. @focus="textareaFocus" />
  680. </view>
  681. <view class="em" @tap="chooseEmoji">
  682. <image src="../../static/im/smail.svg" style="width: 56rpx;height: 56rpx;" mode=""></image>
  683. </view>
  684. <!-- #ifdef H5 -->
  685. <view class="more" @tap="showMore" style="height: 70rpx;">
  686. <image src="../../static/im/buleAdd.svg" style="width: 56rpx;height: 56rpx;" mode=""></image>
  687. </view>
  688. <!-- #endif -->
  689. </view>
  690. </view>
  691. <!-- #ifndef H5 -->
  692. <view class="more" @tap="showMore">
  693. <view class="icon add"></view>
  694. </view>
  695. <!-- #endif -->
  696. <view class="send" :class="isVoice?'hidden':''" @tap='setChatSave(1)'>
  697. <view class="btn">发送</view>
  698. </view>
  699. </view>
  700. <!-- 录音UI效果 -->
  701. <view class="record" :class="recording?'':'hidden'">
  702. <view class="ing" :class="willStop?'hidden':''">
  703. <view class="icon luyin2"></view>
  704. </view>
  705. <view class="cancel" :class="willStop?'':'hidden'">
  706. <view class="icon chehui"></view>
  707. </view>
  708. <view class="tis" :class="willStop?'change':''">{{recordTis}}</view>
  709. </view>
  710. <u-select v-model="showChangYong" title="常用词语" mode="single-column" :list="changYongList" @confirm="selConfirm">
  711. </u-select>
  712. <u-action-sheet :list="list" @click="click" v-model="show"></u-action-sheet>
  713. <u-popup v-model="mianshiShow" mode="bottom" z-index="998" :mask-close-able="false" border-radius="14"
  714. @close="cleanMs" :closeable="true">
  715. <view class="mianshiTitle">面试邀请</view>
  716. <view class="mianshiTime flex justify-center">
  717. <view class="mianshiTime-box flex justify-between align-center">
  718. <view class="">
  719. 面试时间
  720. </view>
  721. <view class="flex align-center mianshiTime-box-ti">
  722. <u-input disabled v-model="miamshi.interviewDateTime" @click="msTime=true" type="text"
  723. placeholder="请选择面试时间" />
  724. <u-icon name="arrow-right" style="margin-left: 10rpx;" color="#016BF6" size="28"
  725. @click="msTime=true"></u-icon>
  726. </view>
  727. </view>
  728. </view>
  729. <view class="mianshiTime flex justify-center">
  730. <view class="mianshiTime-box flex justify-between align-center">
  731. <view class="">
  732. 面试地址
  733. </view>
  734. <view class="flex align-center mianshiTime-box-ti">
  735. <u-input disabled @click="goMap()" v-model="miamshi.detailedAddress" type="text"
  736. placeholder="请选择面试地址" />
  737. <u-icon name="arrow-right" style="margin-left: 10rpx;" @click="goMap()" color="#016BF6"
  738. size="28"></u-icon>
  739. </view>
  740. </view>
  741. </view>
  742. <view class="mianshiTime flex justify-center">
  743. <view class="mianshiTime-box" style="border: none;">
  744. <view class="">
  745. 备注
  746. </view>
  747. <view class="flex align-center mianshiTime-box-ti">
  748. <u-input v-model="miamshi.remarks" type="textarea" input-align="left"
  749. style="padding: 10rpx;background-color: #F2F2F7;height: 200rpx;overflow: hidden;border-radius: 14rpx;width: 100%;"
  750. :auto-height="false" />
  751. </view>
  752. </view>
  753. </view>
  754. <view class="btnm flex justify-center">
  755. <view class="btn-box flex justify-around align-center">
  756. <view class="btn-close btnItem" @click="mianshiShow = false">
  757. 取消
  758. </view>
  759. <view class="btn-sub btnItem" @click="submitMs()">
  760. 确认
  761. </view>
  762. </view>
  763. </view>
  764. </u-popup>
  765. <u-toast ref="uToast" />
  766. <u-picker v-model="msTime" mode="time" :params="params" @confirm="mianshiConfirm" confirm-color="#016BF6">
  767. </u-picker>
  768. <!-- 面试邀请弹窗 -->
  769. <u-popup v-model="msshow" mode="center" z-index="998" border-radius="24" :mask-close-able="false" width="80%">
  770. <view class="mssTitle">
  771. 面试邀请
  772. </view>
  773. <view class="avatorm flex justify-center">
  774. <view class="avatorm-box flex justify-center">
  775. <block v-if="records.userEntity && records.userEntity.avatar">
  776. <image :src="records.userEntity.avatar"
  777. style="width: 100rpx;height: 100rpx;border-radius: 50%;" mode="aspectFill">
  778. </image>
  779. </block>
  780. <block v-else>
  781. <image src="../../static/logo.png" style="width: 100rpx;height: 100rpx;border-radius: 50%;"
  782. mode="">
  783. </image>
  784. </block>
  785. <block v-if="records.hr && records.hr.hrImg">
  786. <image :src="records.hr.hrImg"
  787. style="width: 100rpx;height: 100rpx;border-radius: 50%;" mode="aspectFill">
  788. </image>
  789. </block>
  790. <block v-else>
  791. <image src="../../static/logo.png" style="width: 100rpx;height: 100rpx;border-radius: 50%;"
  792. mode="">
  793. </image>
  794. </block>
  795. </view>
  796. </view>
  797. <view class="avatorm flex justify-center">
  798. <view class="avatorm-box">
  799. <view class="avatorm-box-item flex">
  800. <view class="avatorm-box-item-t">
  801. 面试岗位:
  802. </view>
  803. <view class="avatorm-box-item-r">
  804. {{records.postPush?records.postPush.ruleClassifyName:'未知'}}
  805. </view>
  806. </view>
  807. <view class="avatorm-box-item flex" v-if="records">
  808. <view class="avatorm-box-item-t">
  809. 面试时间:
  810. </view>
  811. <view class="avatorm-box-item-r">
  812. {{records.interviewDateTime&&records.interviewDateTime.substring(0, 10)||''}} {{records.detailTime}}
  813. </view>
  814. </view>
  815. <view class="avatorm-box-item flex" @click="goMapDap(records)">
  816. <view class="avatorm-box-item-t">
  817. 面试地点:
  818. </view>
  819. <view class="avatorm-box-item-r">
  820. {{records.detailedAddress}}
  821. <u-icon name="map-fill" color="#016BF6" size="28"></u-icon>
  822. </view>
  823. </view>
  824. <view class="avatorm-box-item flex">
  825. <view class="avatorm-box-item-t">
  826. 面试备注:
  827. </view>
  828. <view class="avatorm-box-item-r">
  829. {{records.remarks?records.remarks:'暂无'}}
  830. </view>
  831. </view>
  832. </view>
  833. </view>
  834. <view class="avatorm flex justify-center" v-if="records.company">
  835. <view class="avatorm-box flex justify-center">
  836. 来自{{records.company.companyAllName||records.company.companyName}}的面试邀请,是否接受?
  837. </view>
  838. </view>
  839. <view class="btnm flex justify-center" style="margin-bottom: 30rpx;">
  840. <view class="btn-box flex justify-around align-center">
  841. <view class="btn-close btnItem" @click="setJuJue(records)">
  842. 拒绝
  843. </view>
  844. <view class="btn-sub btnItem" @click="setJuJues(records)">
  845. 接受
  846. </view>
  847. </view>
  848. </view>
  849. </u-popup>
  850. <!-- 交换微信自定义弹窗 -->
  851. <u-popup v-model="wechatExchangeShow" mode="center" z-index="999" border-radius="24" :mask-close-able="false" width="80%">
  852. <view class="phone-exchange-popup">
  853. <!-- 顶部背景区域 -->
  854. <view class="phone-exchange-header">
  855. <image src="../../static/im/Artwork.png" class="phone-exchange-bg" mode="aspectFill"></image>
  856. </view>
  857. <!-- 中间内容区域 -->
  858. <view class="phone-exchange-content">
  859. <view class="phone-exchange-title">确认与对方交换微信吗?</view>
  860. <view class="phone-exchange-desc">交换成功后,双方可以查看彼此的微信号<br/>您可以前往个人中心管理微信号</view>
  861. </view>
  862. <!-- 底部按钮区域 -->
  863. <view class="phone-exchange-buttons">
  864. <view class="phone-exchange-btn phone-exchange-btn-cancel" @click="cancelWechatExchange">取消</view>
  865. <view class="phone-exchange-btn phone-exchange-btn-confirm" @click="confirmWechatExchange">确认</view>
  866. </view>
  867. </view>
  868. </u-popup>
  869. <!-- 交换手机号自定义弹窗 -->
  870. <u-popup v-model="phoneExchangeShow" mode="center" z-index="999" border-radius="24" :mask-close-able="false" width="80%">
  871. <view class="phone-exchange-popup">
  872. <!-- 顶部背景区域 -->
  873. <view class="phone-exchange-header">
  874. <image src="../../static/im/Artwork.png" class="phone-exchange-bg" mode="aspectFill"></image>
  875. </view>
  876. <!-- 中间内容区域 -->
  877. <view class="phone-exchange-content">
  878. <view class="phone-exchange-title">确认与对方交换电话吗?</view>
  879. <view class="phone-exchange-desc">交换成功后,双方可以查看彼此的电话号码<br/>您可以前往个人中心管理电话号码</view>
  880. </view>
  881. <!-- 底部按钮区域 -->
  882. <view class="phone-exchange-buttons">
  883. <view class="phone-exchange-btn phone-exchange-btn-cancel" @click="cancelPhoneExchange">取消</view>
  884. <view class="phone-exchange-btn phone-exchange-btn-confirm" @click="confirmPhoneExchange">确认</view>
  885. </view>
  886. </view>
  887. </u-popup>
  888. <u-popup v-model="attachmentShow" z-index="99999" mode="bottom" border-radius="14" height="auto" :closeable="true">
  889. <attachment @select="selectAttachment" :content="attachmentContent"></attachment>
  890. </u-popup>
  891. <u-popup mode="top" ref="permission">
  892. <view class="popup-content">
  893. <view class="popup-text-permission">选择/拍摄照片需要相机/相册权限,用于发送媒体消息</view>
  894. </view>
  895. </u-popup>
  896. <u-popup mode="top" ref="microphonePermission">
  897. <view class="popup-content">
  898. <view class="popup-text-permission">录制语音需要录音权限,用于发送语音消息</view>
  899. </view>
  900. </u-popup>
  901. <u-popup mode="top" ref="locationPermission">
  902. <view class="popup-content">
  903. <view class="popup-text-permission">获取位置需要定位权限,用于发送位置消息</view>
  904. </view>
  905. </u-popup>
  906. </view>
  907. </template>
  908. <script>
  909. const RECONNECT_INTERVAL = 3000; // 延迟3秒后进行重连
  910. const HEARTBEAT_INTERVAL = 20000; // 每20秒发送一次心跳消息
  911. import configdata from '../../common/config.js';
  912. import emoji from '../../common/emoji.json';
  913. import attachment from '../../components/attachment.vue'
  914. import permision from '@/js_sdk/wa-permission/permission.js'
  915. export default {
  916. components: {
  917. attachment
  918. },
  919. data() {
  920. return {
  921. msshow: false,
  922. params: {
  923. year: false,
  924. month: true,
  925. day: true,
  926. hour: true,
  927. minute: true,
  928. second: false
  929. },
  930. msTime: false,
  931. miamshi: {
  932. interviewDateTime: '', //面试时间
  933. companyId: '', //公司id
  934. remarks: '', //面试备注
  935. userId: '', //面试者id
  936. postPushId: '', //岗位id
  937. province: '', //省
  938. city: '', //市
  939. county: '', //区
  940. lng: '', //经度
  941. lat: '', //纬度
  942. detailedAddress: '', //详细地址
  943. },
  944. tips: {
  945. text: '',
  946. color: 'black',
  947. fontSize: 28
  948. },
  949. activelist: [],
  950. showActive: false,
  951. list: [{
  952. text: '查看简历',
  953. color: 'black',
  954. fontSize: 28
  955. }, {
  956. text: '查看企业',
  957. color: 'black',
  958. fontSize: 28
  959. }],
  960. show: false,
  961. recordLength: 0,
  962. initPoint: {
  963. identifier: 0,
  964. Y: 0
  965. },
  966. showChangYong: false,
  967. changYongList: [],
  968. // 工作描述展开状态
  969. isJobDescExpanded: false,
  970. //播放语音相关参数
  971. AUDIO: uni.createInnerAudioContext(),
  972. playMsgid: null,
  973. VoiceTimer: null,
  974. //文字消息
  975. textMsg: '',
  976. //消息列表
  977. isHistoryLoading: false,
  978. scrollAnimation: false,
  979. scrollTop: 0,
  980. scrollToView: '',
  981. msgList: [],
  982. msgImgList: [],
  983. myuid: 0,
  984. //录音相关参数
  985. // #ifndef H5
  986. //H5不能录音
  987. RECORDER: uni.getRecorderManager(),
  988. // #endif
  989. isVoice: false,
  990. voiceTis: '按住 说话',
  991. recordTis: "手指上滑 取消发送",
  992. recording: false,
  993. willStop: false,
  994. initPoint: {
  995. identifier: 0,
  996. Y: 0
  997. },
  998. recordTimer: null,
  999. recordLength: 0,
  1000. //播放语音相关参数
  1001. AUDIO: uni.createInnerAudioContext(),
  1002. playMsgid: null,
  1003. VoiceTimer: null,
  1004. // 抽屉参数
  1005. popupLayerClass: '',
  1006. // more参数
  1007. hideMore: true,
  1008. //表情定义
  1009. hideEmoji: true,
  1010. emojiList: emoji,
  1011. msg: false,
  1012. type4: [],
  1013. listRight: {
  1014. chat: {
  1015. userHead: ""
  1016. },
  1017. content: "",
  1018. messageType: 1,
  1019. type: 1
  1020. },
  1021. content: '',
  1022. chatId: '',
  1023. type: 1,
  1024. ListItem: [],
  1025. index: 0,
  1026. page: 1,
  1027. size: 100,
  1028. byUserId: 0,
  1029. imageUrl: '/static/logo.png',
  1030. chatConversationId: 0,
  1031. userId: 0,
  1032. byNickName: '',
  1033. countDown: '',
  1034. messages: '',
  1035. scrollInto: '',
  1036. tUserId: '', //对方id
  1037. companyId: '', //对方企业的id
  1038. activeInfo: {},
  1039. userType: '',
  1040. postPushId: '', //岗位id
  1041. resumesId: '', //简历id
  1042. postPushInfo: {}, //岗位信息
  1043. resumesInfo: {}, //简历信息
  1044. isSendPhone: false, //是否交换手机号
  1045. isSendWx: false, //是否交换微信
  1046. isSendResumes:false,
  1047. mianshiShow: false, //约面试弹窗
  1048. phoneExchangeShow: false, //交换手机号弹窗
  1049. wechatExchangeShow: false, //交换微信弹窗
  1050. records: {}, //面试邀请信息
  1051. recordsInter: '',
  1052. mapsValue: '',
  1053. showModal: true,
  1054. arr: [],
  1055. old: {
  1056. scrollTop: 0 //记录旧的scrollTop值
  1057. },
  1058. isOpen: false, //scoket是否正在链接
  1059. socketTimer: null, //心跳定时器
  1060. isVip: false, //是否是会员
  1061. isVideo: false, //是否打视频
  1062. ossUrl:configdata.ossUrl,
  1063. jobStatusList:[],
  1064. conversationInfo:{},
  1065. attachmentShow:false,
  1066. attachmentContent:[]
  1067. };
  1068. },
  1069. onUnload() {
  1070. uni.closeSocket()
  1071. uni.hideLoading()
  1072. uni.$off('updateAttachmentList')
  1073. clearInterval(this.recordsInter)
  1074. this.recordsInter = null
  1075. clearInterval(this.socketTimer)
  1076. this.socketTimer = null
  1077. },
  1078. computed: {
  1079. isHtmlContent() {
  1080. const str = this.postPushInfo?.positionDetails || '';
  1081. return /<[^>]+>/.test(str);
  1082. }
  1083. },
  1084. onLoad(d) {
  1085. console.log(d, 'zzzzzzzzz')
  1086. if (d.postPushId) {
  1087. this.postPushId = d.postPushId
  1088. }
  1089. if (d.resumesId) {
  1090. this.resumesId = d.resumesId
  1091. }
  1092. this.userType = uni.getStorageSync('userType')
  1093. if (this.userType == 1) {
  1094. this.postPushId = d.postPushId
  1095. //获取岗位信息
  1096. this.getPostPushInfo(this.postPushId)
  1097. this.getInterviewList()
  1098. } else {
  1099. this.resumesId = d.resumesId
  1100. this.postPushId = d.postPushId
  1101. this.getPostPushInfo(this.postPushId)
  1102. //获取简历信息
  1103. this.getResumesInfo(this.resumesId)
  1104. }
  1105. this.userId = this.$queue.getData('userId');
  1106. this.getMessage();
  1107. this.connect();
  1108. this.byNickName = d.byNickName;
  1109. this.byUserId = d.byUserId;
  1110. if (d.chatConversationId) {
  1111. this.chatConversationId = d.chatConversationId;
  1112. this.getTimeOrListItem1();
  1113. } else {
  1114. this.insertChat();
  1115. }
  1116. let image_url = this.$queue.getData('avatar');
  1117. if (image_url && image_url !== 'undefined') {
  1118. this.imageUrl = image_url;
  1119. } else {
  1120. this.imageUrl = '/static/logo.png';
  1121. }
  1122. // this.emojiList.forEach(d =>{
  1123. // d.forEach(e =>{
  1124. // console.log('/static/emoji/' + e.url)
  1125. // });
  1126. // });
  1127. //语音自然播放结束
  1128. this.AUDIO.onEnded((res) => {
  1129. this.playMsgid = null;
  1130. });
  1131. // #ifndef H5
  1132. //录音开始事件
  1133. this.RECORDER.onStart((e) => {
  1134. this.recordBegin(e);
  1135. })
  1136. //录音结束事件
  1137. this.RECORDER.onStop((e) => {
  1138. this.recordEnd(e);
  1139. })
  1140. // #endif
  1141. this.jobStatusList = this.$queue.resumesStatus()
  1142. this.$Request.get("/app/resumes/getAttachment").then(res => {
  1143. if (res.code == 0) {
  1144. this.attachmentContent=res.data
  1145. }
  1146. uni.hideLoading();
  1147. });
  1148. // #ifdef APP
  1149. //this.getAudioPermision()
  1150. // #endif
  1151. uni.$on('updateAttachmentList',()=>{
  1152. this.$Request.get("/app/resumes/getAttachment").then(res => {
  1153. if (res.code == 0) {
  1154. this.attachmentContent=res.data
  1155. }
  1156. uni.hideLoading();
  1157. });
  1158. })
  1159. },
  1160. onShow() {
  1161. if (this.chatConversationId) {
  1162. this.getTimeOrListItem1();
  1163. }
  1164. // #ifdef MP-WEIXIN
  1165. this.$Request.getT('/app/common/type/342').then(res => { //面试通知
  1166. if (res.code == 0) {
  1167. if (res.data && res.data.value) {
  1168. this.arr.push(res.data.value)
  1169. }
  1170. }
  1171. })
  1172. if (this.showModal) {
  1173. this.openMsg()
  1174. }
  1175. // #endif
  1176. this.userType = uni.getStorageSync('userType')
  1177. this.getChangYong();
  1178. // if (this.isOpen) {
  1179. // this.connect();
  1180. // }
  1181. if (this.userType == 1) {
  1182. //获取用户是否有该岗位待接受的面试邀请
  1183. this.recordsInter = setInterval(() => {
  1184. this.getInterviewList()
  1185. }, 5000)
  1186. }
  1187. this.getUserInfo()
  1188. },
  1189. onBackPress() {
  1190. this.AUDIO.stop();
  1191. this.playMsgid = null;
  1192. },
  1193. onHide() {
  1194. // this.AUDIO.stop();
  1195. // this.playMsgid = null;
  1196. // uni.closeSocket()
  1197. // clearInterval(this.recordsInter)
  1198. // this.recordsInter = null
  1199. },
  1200. methods: {
  1201. // 返回上一页
  1202. goBack() {
  1203. uni.navigateBack();
  1204. },
  1205. //获取麦克风/摄像头权限
  1206. async getAudioPermision() {
  1207. let status = permision.isIOS ? await permision.judgeIosPermission("record") : await permision
  1208. .requestAndroidPermission("android.permission.RECORD_AUDIO")
  1209. let status2 = permision.isIOS ? await permision.judgeIosPermission("camera") : await permision
  1210. .requestAndroidPermission("android.permission.CAMERA")
  1211. if (status === null || status === 1 || status == true) { //已经同意授权
  1212. console.log('获取到权限了')
  1213. } else { //未授权的
  1214. this.popupshowsq = true
  1215. }
  1216. },
  1217. // 显示更多选项
  1218. showMoreOptions() {
  1219. return this.$queue.showToast('waiting...')
  1220. // 可以添加更多选项的弹窗或菜单
  1221. // console.log('显示更多选项');
  1222. uni.navigateTo({
  1223. url:'/pages/msg/interviewInvitation'
  1224. })
  1225. },
  1226. // 切换工作描述展开状态
  1227. toggleJobDesc() {
  1228. this.isJobDescExpanded = !this.isJobDescExpanded;
  1229. },
  1230. getUserInfo() {
  1231. this.$Request.get("/app/user/selectUserById").then(res => {
  1232. if (res.code == 0) {
  1233. if (this.userType == 1) { //用户
  1234. if (res.data.isUserVip == 1) { //判断用户是否是vip
  1235. this.isVip = true
  1236. } else {
  1237. this.isVip = false
  1238. }
  1239. } else { //企业
  1240. if (res.data.isCompanyVip == 1) { //判断企业用户是否是vip
  1241. this.isVip = true
  1242. } else {
  1243. this.isVip = false
  1244. }
  1245. }
  1246. }
  1247. })
  1248. },
  1249. /**
  1250. * @param {Object} type 1:语音 2视频
  1251. */
  1252. sendCallVideo(type) {
  1253. if (!this.isVip) {
  1254. uni.showModal({
  1255. title: '提示',
  1256. content: type == 1 ? '语音为会员专属功能,请开通会员!' : '视频为会员专属功能,请开通会员!',
  1257. confirmText: '开通会员',
  1258. cancelText: '取消',
  1259. confirmColor: '#016BF6',
  1260. complete(ret) {
  1261. if (ret.confirm) {
  1262. uni.navigateTo({
  1263. url: '/pages/my/VIP/benefits'
  1264. })
  1265. }
  1266. }
  1267. })
  1268. return
  1269. }
  1270. if (this.isVideo) {
  1271. return
  1272. }
  1273. this.isVideo = true
  1274. let data = {
  1275. focusedUserId: this.byUserId, //对方的userId
  1276. messageType: type == 1 ? 21 : 20,
  1277. userId: uni.getStorageSync('userId'), //我的userId
  1278. userType: this.userType, //1:用户 2:企业,
  1279. postPushId: this.postPushId,
  1280. resumesId: this.resumesId
  1281. }
  1282. let that = this
  1283. this.$Request.postJson('/app/chat/insertChatConversationByChatVideo', data).then(res => {
  1284. if (res.code == 0) {
  1285. //isRol 1:发起人 2:收到人
  1286. console.log(res)
  1287. uni.navigateTo({
  1288. url: '/my/videoVoice/videoVoice?byUserId=' + this.byUserId +
  1289. '&chatContentId=' + res.data.chatContentId +
  1290. '&isRol=1&messageType=' + data.messageType + '&chatConversationId=' + res
  1291. .data
  1292. .chatConversationId + '&userType=' + data.userType + '&postPushId=' + data
  1293. .postPushId + '&resumesId=' + data.resumesId,
  1294. success() {
  1295. uni.setStorageSync('isDial', true)
  1296. uni.setStorageSync('videoStatus', 1)
  1297. that.isVideo = false
  1298. }
  1299. })
  1300. } else {
  1301. that.isVideo = false
  1302. uni.showToast({
  1303. title: res.msg,
  1304. icon: 'none'
  1305. })
  1306. }
  1307. })
  1308. },
  1309. scroll(e) {
  1310. this.old.scrollTop = e.detail.scrollTop
  1311. },
  1312. // 开启订阅消息
  1313. openMsg() {
  1314. console.log('订阅消息')
  1315. var that = this
  1316. uni.getSetting({
  1317. withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
  1318. success(ret) {
  1319. console.log(ret.subscriptionsSetting, '------------------')
  1320. // if (ret.subscriptionsSetting.itemSettings && Object.keys(ret.subscriptionsSetting.itemSettings).length == 2) {
  1321. if (ret.subscriptionsSetting.itemSettings) {
  1322. uni.setStorageSync('sendMsg', true)
  1323. uni.openSetting({ // 打开设置页
  1324. success(rea) {
  1325. console.log(rea.authSetting)
  1326. }
  1327. });
  1328. } else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
  1329. console.log(99999)
  1330. uni.setStorageSync('sendMsg', false)
  1331. uni.showModal({
  1332. title: '提示',
  1333. content: '为了更好的体验,请绑定消息推送',
  1334. confirmText: '确定',
  1335. cancelText: '取消',
  1336. confirmColor: '#016BF6',
  1337. success: function(res) {
  1338. if (res.confirm) {
  1339. console.log(that.arr)
  1340. wx.requestSubscribeMessage({
  1341. tmplIds: that.arr,
  1342. success(re) {
  1343. console.log(JSON.stringify(re),
  1344. '++++++++++++++')
  1345. var datas = JSON.stringify(re);
  1346. if (datas.indexOf("accept") != -1) {
  1347. console.log(re)
  1348. uni.setStorageSync('sendMsg', true)
  1349. }
  1350. },
  1351. fail: (res) => {
  1352. console.log(res)
  1353. }
  1354. })
  1355. uni.setStorageSync('sendMsg', true)
  1356. console.log('确认')
  1357. that.showModal = false
  1358. } else if (res.cancel) {
  1359. console.log('取消')
  1360. uni.setStorageSync('sendMsg', false)
  1361. that.showModal = true
  1362. }
  1363. }
  1364. })
  1365. }
  1366. }
  1367. })
  1368. },
  1369. /**
  1370. * @param {Object} info 内容
  1371. * @param {Object} userType 用户类型
  1372. * @param {Object} type 参数类型
  1373. */
  1374. copyss(info, userType, type) {
  1375. let content = ''
  1376. switch (type) {
  1377. //复制手机号
  1378. case 'phone':
  1379. if (userType == 1) {
  1380. content = JSON.parse(info).companyPhone
  1381. } else {
  1382. content = JSON.parse(info).userPhone
  1383. }
  1384. break;
  1385. //复制微信号
  1386. case 'wx':
  1387. if (userType == 1) {
  1388. content = JSON.parse(info).companyWx
  1389. } else {
  1390. content = JSON.parse(info).userWx
  1391. }
  1392. break;
  1393. default:
  1394. break;
  1395. }
  1396. this.copy(content)
  1397. },
  1398. openMapss(latitude, longitude, name) {
  1399. uni.openLocation({
  1400. latitude: latitude - 0, //要去的纬度-地址
  1401. longitude: longitude - 0, //要去的经度-地址
  1402. name: name, //地址名称
  1403. address: name, //详细地址名称
  1404. success: function() {
  1405. console.log('导航成功');
  1406. },
  1407. fail: function(error) {
  1408. console.log(error)
  1409. }
  1410. });
  1411. },
  1412. async goMapss() {
  1413. let that = this
  1414. // #ifdef APP
  1415. const hasLocation = await this.$queue.checkPermission(
  1416. 'location',
  1417. '获取位置需要定位权限,用于发送位置消息',
  1418. this,'locationPermission'
  1419. );
  1420. if (!hasLocation) return;
  1421. // #endif
  1422. uni.chooseLocation({
  1423. success: function(res) {
  1424. console.log('位置名称:' + res.name);
  1425. console.log('详细地址:' + res.address);
  1426. console.log('纬度:' + res.latitude);
  1427. console.log('经度:' + res.longitude);
  1428. let mapsValue = JSON.stringify(res);
  1429. that.setChatSave(18, mapsValue)
  1430. // console.log(typeof(res))
  1431. // return
  1432. that.showMore();
  1433. }
  1434. });
  1435. },
  1436. //接受邀请
  1437. setJuJues(item) {
  1438. // #ifdef MP-WEIXIN
  1439. if (uni.getStorageSync('sendMsg')) {
  1440. // console.log('授权+1')
  1441. wx.requestSubscribeMessage({
  1442. tmplIds: this.arr,
  1443. success(re) {
  1444. // console.log(JSON.stringify(re), 111111111111)
  1445. var datas = JSON.stringify(re);
  1446. if (datas.indexOf("accept") != -1) {
  1447. // console.log(re)
  1448. }
  1449. },
  1450. fail: (res) => {
  1451. // console.log(res)
  1452. }
  1453. })
  1454. }
  1455. // #endif
  1456. let that = this
  1457. uni.showModal({
  1458. title: '提示',
  1459. content: '确定接受来自' + item.company.companyName + '的面试邀请吗?',
  1460. confirmColor: '#016BF6',
  1461. complete(ret) {
  1462. if (ret.confirm) {
  1463. let data = {
  1464. recordId: item.recordId,
  1465. type: 1
  1466. }
  1467. that.$Request.getT("/app/interviewRecord/userUpdateInter", data).then(res => {
  1468. if (res.code == 0) {
  1469. uni.showToast({
  1470. // title: '已接受来自' + item.company.companyName + '的面试邀请'
  1471. title: '已接受面试邀请'
  1472. })
  1473. that.msshow = false;
  1474. that.setChatSave(97)
  1475. } else {
  1476. uni.showToast({
  1477. title: res.msg,
  1478. icon: 'none'
  1479. })
  1480. }
  1481. })
  1482. }
  1483. }
  1484. })
  1485. },
  1486. //去导航
  1487. goMapDap(info) {
  1488. uni.openLocation({
  1489. latitude: info.lat,
  1490. longitude: info.lng,
  1491. address: info.detailedAddress,
  1492. name: info.detailedAddress,
  1493. complete(ret) {
  1494. }
  1495. })
  1496. },
  1497. //拒绝邀请
  1498. setJuJue(item) {
  1499. let that = this
  1500. uni.showModal({
  1501. title: '提示',
  1502. content: '确定拒绝来自' + item.company.companyName + '的面试邀请吗?',
  1503. confirmColor: '#016BF6',
  1504. complete(ret) {
  1505. if (ret.confirm) {
  1506. let data = {
  1507. recordId: item.recordId,
  1508. type: 2
  1509. }
  1510. that.$Request.getT("/app/interviewRecord/userUpdateInter", data).then(res => {
  1511. if (res.code == 0) {
  1512. uni.showToast({
  1513. title: '已拒绝来自' + item.company.companyName + '的面试邀请'
  1514. })
  1515. that.msshow = false;
  1516. that.setChatSave(96)
  1517. } else {
  1518. uni.showToast({
  1519. title: res.msg,
  1520. icon: 'none'
  1521. })
  1522. }
  1523. })
  1524. }
  1525. }
  1526. })
  1527. },
  1528. //获取用户是否有面试记录
  1529. getInterviewList() {
  1530. let data = {
  1531. /* userId: uni.getStorageSync('userId'), */
  1532. status: 1,
  1533. postPushId: this.postPushId
  1534. }
  1535. this.$Request.getT("/app/interviewRecord/interviewList", data).then(res => {
  1536. if (res.code == 0) {
  1537. if ((res.data.records).length > 0) {
  1538. this.records = res.data.records[0]
  1539. this.msshow = true
  1540. } else {
  1541. this.msshow = false
  1542. }
  1543. } else {
  1544. uni.showToast({
  1545. title: res.msg,
  1546. icon: 'none'
  1547. })
  1548. this.msshow = false
  1549. }
  1550. })
  1551. },
  1552. submitMs() {
  1553. if (!this.miamshi.interviewDateTime) {
  1554. this.$refs.uToast.show({
  1555. title: '请选择面试时间',
  1556. type: 'default',
  1557. position: 'bottom'
  1558. })
  1559. return
  1560. }
  1561. if (!this.miamshi.detailedAddress) {
  1562. this.$refs.uToast.show({
  1563. title: '请选择面试地点',
  1564. type: 'default',
  1565. position: 'bottom'
  1566. })
  1567. return
  1568. }
  1569. let that = this
  1570. uni.showModal({
  1571. title: '提示',
  1572. content: '确定发起面试邀请吗?',
  1573. confirmColor: '#016BF6',
  1574. complete(ret) {
  1575. if (ret.confirm) {
  1576. let data = {
  1577. interviewDateTime: that.miamshi.interviewDateTime + ':00',
  1578. companyId: uni.getStorageSync('companyId'),
  1579. remarks: that.miamshi.remarks,
  1580. userId: that.byUserId, //求职者id
  1581. postPushId: that.postPushId,
  1582. province: that.miamshi.province,
  1583. city: that.miamshi.city,
  1584. county: that.miamshi.county,
  1585. lng: that.miamshi.lng,
  1586. lat: that.miamshi.lat,
  1587. detailedAddress: that.miamshi.detailedAddress
  1588. }
  1589. that.$Request.postJson("/app/interviewRecord/saveInterview", data).then(res => {
  1590. if (res.code == 0) {
  1591. uni.showToast({
  1592. title: '面试邀请已发送'
  1593. })
  1594. that.mianshiShow = false
  1595. } else {
  1596. that.mianshiShow = false
  1597. uni.showToast({
  1598. title: res.msg,
  1599. icon: 'none'
  1600. })
  1601. }
  1602. })
  1603. }
  1604. }
  1605. })
  1606. },
  1607. //关闭弹窗的时候清空表单的值
  1608. cleanMs() {
  1609. this.miamshi = {
  1610. interviewDateTime: '', //面试时间
  1611. companyId: '', //公司id
  1612. remarks: '', //面试备注
  1613. userId: '', //面试者id
  1614. postPushId: '', //岗位id
  1615. province: '', //省
  1616. city: '', //市
  1617. county: '', //区
  1618. lng: '', //经度
  1619. lat: '', //纬度
  1620. detailedAddress: '', //详细地址
  1621. }
  1622. },
  1623. // 点击调起地图选择位置
  1624. goMap() {
  1625. let that = this
  1626. uni.chooseLocation({
  1627. success: function(res) {
  1628. let arrress = res.address
  1629. let reg = /.+?(省|市|自治区|自治州|县|区)/g;
  1630. let adds = arrress.match(reg)
  1631. console.log(adds)
  1632. that.miamshi.province = adds[0]
  1633. that.miamshi.city = adds[1]
  1634. that.miamshi.county = adds[2]
  1635. that.miamshi.detailedAddress = res.address + '' + res.name
  1636. that.miamshi.lat = res.latitude
  1637. that.miamshi.lng = res.longitude
  1638. }
  1639. });
  1640. },
  1641. //选择面试时间
  1642. mianshiConfirm(e) {
  1643. //获取当前时间的年份
  1644. let date = new Date()
  1645. let year = date.getFullYear()
  1646. this.miamshi.interviewDateTime = year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute
  1647. },
  1648. mianshiF() {
  1649. // #ifdef MP-WEIXIN
  1650. if (uni.getStorageSync('sendMsg')) {
  1651. // console.log('授权+1')
  1652. wx.requestSubscribeMessage({
  1653. tmplIds: this.arr,
  1654. success(re) {
  1655. // console.log(JSON.stringify(re), 111111111111)
  1656. var datas = JSON.stringify(re);
  1657. if (datas.indexOf("accept") != -1) {
  1658. // console.log(re)
  1659. }
  1660. },
  1661. fail: (res) => {
  1662. // console.log(res)
  1663. }
  1664. })
  1665. }
  1666. // #endif
  1667. let data = {
  1668. userId: this.byUserId,
  1669. postPushId: this.postPushId
  1670. }
  1671. this.$Request.getT("/app/interviewRecord/isSendView", data).then(res => {
  1672. if (res.code == 0) {
  1673. //这里要判断是boss还是求职者,跳不同的页面 bossMianshiDetail
  1674. if (!res.data) {//表示没有面试,去约面试
  1675. //this.mianshiShow = true
  1676. if(!this.resumesInfo&&!this.resumesInfo.userId)
  1677. return this.$queue.showToast('简历用户信息获取失败')
  1678. uni.navigateTo({
  1679. url:`/pages/msg/interviewInvitation?postPushId=${this.postPushId}&resumesId=${this.resumesId}&interviewerId=${this.resumesInfo.userId}`
  1680. })
  1681. } else {
  1682. //这里的逻辑是不是应跳到面试详情了?
  1683. uni.navigateTo({
  1684. url:`/my/jilu/bossMianshiDetail?recordId=${res.data}&companyId=${uni.getStorageSync('companyId')}`
  1685. })
  1686. uni.showToast({
  1687. title: '已发送过面试邀请',
  1688. icon: 'none'
  1689. })
  1690. this.mianshiShow = false
  1691. }
  1692. } else {
  1693. this.mianshiShow = false
  1694. uni.showToast({
  1695. title: res.msg,
  1696. icon: 'none'
  1697. })
  1698. }
  1699. })
  1700. },
  1701. //请求拒绝
  1702. refuseFun(id) {
  1703. let that = this
  1704. uni.showModal({
  1705. title: '提示',
  1706. content: '确定拒绝吗?',
  1707. confirmColor: '#016BF6',
  1708. complete(ret) {
  1709. if (ret.confirm) {
  1710. let data = {
  1711. chatContentId: id
  1712. }
  1713. that.$Request.getT("/app/chat/refuseReqs", data).then(res => {
  1714. if (res.code == 0) {
  1715. uni.showToast({
  1716. title: '已拒绝'
  1717. })
  1718. that.setChatSave(24)
  1719. that.getTimeOrListItem1()
  1720. that.getStatusInfo()
  1721. } else {
  1722. uni.showToast({
  1723. title: res.msg,
  1724. icon: 'none'
  1725. })
  1726. }
  1727. })
  1728. }
  1729. }
  1730. })
  1731. },
  1732. selectAttachment(item){
  1733. //console.log(item)
  1734. this.attachmentShow=false
  1735. let that = this
  1736. let data = {
  1737. to: this.byUserId, //接收人的userId
  1738. postPushId: this.postPushId, //岗位id
  1739. resumesAttachmentId:item.resumesAttachmentId
  1740. }
  1741. this.$Request.postT("/app/resumes/sendResumes", data).then(res => {
  1742. if (res.code == 0) {
  1743. uni.showToast({
  1744. title: '简历已发送',
  1745. })
  1746. that.setChatSave(24)
  1747. that.getTimeOrListItem1()
  1748. that.getStatusInfo()
  1749. } else {
  1750. uni.showToast({
  1751. title: res.msg,
  1752. icon: 'none'
  1753. })
  1754. }
  1755. })
  1756. },
  1757. // 同意简历请求并发送简历
  1758. sendResumesSave() {
  1759. this.attachmentShow=true
  1760. },
  1761. resumesTy() {
  1762. let that = this
  1763. return that.sendResumesSave()
  1764. uni.showModal({
  1765. title: '提示',
  1766. content: '确定发送简历给对方?',
  1767. confirmColor: '#016BF6',
  1768. complete(ret) {
  1769. if (ret.confirm) {
  1770. that.sendResumesSave()
  1771. }
  1772. }
  1773. })
  1774. },
  1775. //求简历
  1776. giveSendResumes() {
  1777. let that = this
  1778. uni.showModal({
  1779. title: '提示',
  1780. content: '是否将简历请求发送给对方?,对方同意后将会收到对方的简历',
  1781. confirmColor: '#016BF6',
  1782. complete(ret) {
  1783. if (ret.confirm) {
  1784. that.setChatSave(9)
  1785. }
  1786. }
  1787. })
  1788. },
  1789. //发简历
  1790. sendResumes() {
  1791. let that = this
  1792. return that.sendResumesSave()
  1793. uni.showModal({
  1794. title: '提示',
  1795. content: '是否将简历发送给对方?',
  1796. confirmColor: '#016BF6',
  1797. complete(ret) {
  1798. if (ret.confirm) {
  1799. that.sendResumesSave()
  1800. }
  1801. }
  1802. })
  1803. },
  1804. //获取交换状态
  1805. getStatusInfo() {
  1806. let data = {
  1807. chatConversationId: this.chatConversationId
  1808. }
  1809. this.$Request.getT("/app/chat/getConversationInfo", data).then(res => {
  1810. if (res.code == 0) {
  1811. this.conversationInfo=res.data
  1812. if (res.data.isSendWx) {
  1813. this.isSendWx = true
  1814. } else {
  1815. this.isSendWx = false
  1816. }
  1817. if (res.data.isSendPhone) {
  1818. this.isSendPhone = true
  1819. } else {
  1820. this.isSendPhone = false
  1821. }
  1822. if(res.data.isSendResumes)
  1823. this.isSendResumes=true
  1824. else
  1825. this.isSendResumes=false
  1826. }
  1827. })
  1828. },
  1829. //交换微信号弹窗
  1830. currentWchat() {
  1831. let that = this
  1832. if (!uni.getStorageSync('weChatNum')) {
  1833. uni.showModal({
  1834. title: '提示',
  1835. content: '请先再个人信息页面完善微信号后操作',
  1836. confirmColor: '#016BF6',
  1837. confirmText: '去完善',
  1838. complete(re) {
  1839. if (re.confirm) {
  1840. uni.navigateTo({
  1841. url: '/pages/my/userinfo'
  1842. })
  1843. }
  1844. }
  1845. })
  1846. return
  1847. }
  1848. if (this.isSendWx == false) {
  1849. this.wechatExchangeShow = true;
  1850. } else {
  1851. uni.showToast({
  1852. title: '已交换过微信号,请查看聊天记录',
  1853. icon: 'none'
  1854. })
  1855. }
  1856. },
  1857. //同意交换手机号/微信
  1858. tongyi(messageType, chatContentId) {
  1859. if (messageType == 6 && !uni.getStorageSync('weChatNum')) {
  1860. uni.showModal({
  1861. title: '提示',
  1862. content: '请先再个人信息页面完善微信号后操作',
  1863. confirmColor: '#016BF6',
  1864. confirmText: '去完善',
  1865. complete(re) {
  1866. if (re.confirm) {
  1867. uni.navigateTo({
  1868. url: '/pages/my/userinfo'
  1869. })
  1870. }
  1871. }
  1872. })
  1873. return
  1874. }
  1875. let that = this
  1876. uni.showModal({
  1877. title: '提示',
  1878. content: messageType == 5 ? '同意后将交换手机号,是否同意?' : '同意后将交换微信号,是否同意?',
  1879. confirmColor: '#016BF6',
  1880. complete(ret) {
  1881. if (ret.confirm) {
  1882. let data = {
  1883. messageType: messageType,
  1884. chatContentId: chatContentId
  1885. }
  1886. that.$Request.postT("/app/chat/sendPhoneOrWx", data).then(res => {
  1887. if (res.code == 0) {
  1888. that.setChatSave(24)
  1889. that.getTimeOrListItem1()
  1890. that.getStatusInfo()
  1891. }
  1892. })
  1893. }
  1894. }
  1895. })
  1896. },
  1897. //交换手机号弹窗
  1898. currentPhone() {
  1899. if (this.isSendPhone == false) {
  1900. this.phoneExchangeShow = true;
  1901. } else {
  1902. uni.showToast({
  1903. title: '已交换过手机号,请查看聊天记录',
  1904. icon: 'none'
  1905. })
  1906. }
  1907. },
  1908. // 取消交换手机号
  1909. cancelPhoneExchange() {
  1910. this.phoneExchangeShow = false;
  1911. },
  1912. // 确认交换手机号
  1913. confirmPhoneExchange() {
  1914. this.phoneExchangeShow = false;
  1915. this.setChatSave(5);
  1916. },
  1917. // 取消微信交换
  1918. cancelWechatExchange() {
  1919. this.wechatExchangeShow = false;
  1920. },
  1921. // 确认微信交换
  1922. confirmWechatExchange() {
  1923. this.wechatExchangeShow = false;
  1924. this.setChatSave(6);
  1925. },
  1926. goNav(url) {
  1927. uni.navigateTo({
  1928. url: url
  1929. })
  1930. },
  1931. //获取简历数据
  1932. getResumesInfo(id) {
  1933. var that=this
  1934. this.$Request.getT("/app/resumes/selectResumesByResumesId", {
  1935. userId: uni.getStorageSync('userId'),
  1936. resumesId: id,
  1937. companyId: uni.getStorageSync('companyId')
  1938. }).then(res => {
  1939. if (res.code == 0) {
  1940. let title = res.data.userName
  1941. uni.setNavigationBarTitle({
  1942. title: title
  1943. })
  1944. res.data.intentionRuleClassifyName=this.postPushInfo.ruleClassifyName
  1945. res.data.intentionSalaryRange=this.postPushInfo.salaryRange
  1946. res.data.intentionExprence=[]
  1947. res.data.intentionList.forEach(function(item){
  1948. if(item.ruleClassifyName==that.postPushInfo.ruleClassifyName){
  1949. res.data.intentionRuleClassifyName=item.ruleClassifyName
  1950. res.data.intentionSalaryRange=item.salaryRange
  1951. res.data.intentionExprence=item.industry&&item.industry.split('/')||[]
  1952. }
  1953. })
  1954. this.resumesInfo = res.data
  1955. // this.postPushInfo.positionWelfare = this.postPushInfo.positionWelfare.split(',')
  1956. }
  1957. })
  1958. },
  1959. noIdtent(){
  1960. this.content='抱歉,我对该岗位暂无兴趣';
  1961. this.setChatSave(1)
  1962. },
  1963. gotoInfo(id) {
  1964. uni.navigateTo({
  1965. url: '/pages/index/game/order?postPushId=' + id
  1966. })
  1967. },
  1968. //获取岗位数据
  1969. getPostPushInfo(id) {
  1970. this.$Request.getT("/app/postPush/selectPostPushDetails", {
  1971. userId: uni.getStorageSync('userId'),
  1972. postPushId: id
  1973. }).then(res => {
  1974. if (res.code == 0) {
  1975. if(this.userType==1){
  1976. let title = res.data.company?res.data.company.companyName:'聊天'
  1977. uni.setNavigationBarTitle({
  1978. title: title
  1979. })
  1980. }
  1981. this.postPushInfo = res.data
  1982. this.postPushInfo.positionWelfare = this.postPushInfo.positionWelfare&&this.postPushInfo.positionWelfare.split(',')||[]
  1983. }
  1984. })
  1985. },
  1986. caozuoActive(item, type) {
  1987. if (type == 1) {
  1988. this.activelist = [{
  1989. text: '复制',
  1990. color: 'black',
  1991. fontSize: 24
  1992. }, {
  1993. text: '撤回',
  1994. color: 'black',
  1995. fontSize: 24
  1996. }]
  1997. } else {
  1998. this.activelist = [{
  1999. text: '撤回',
  2000. color: 'black',
  2001. fontSize: 24
  2002. }]
  2003. }
  2004. this.activeInfo = item
  2005. this.showActive = true
  2006. },
  2007. activeclick(index) {
  2008. if (this.activelist[index].text == '复制') { // 复制
  2009. this.copy(this.activeInfo.content)
  2010. } else { //撤回
  2011. let t2 = this.activeInfo.createTimes; //格式不正确需要转换
  2012. let aftert2 = new Date(t2.replace(/-/g, "/")); //转换
  2013. let data = new Date(); //获取当前时间
  2014. let times = data.getTime() - aftert2.getTime(); //时间差的毫秒数
  2015. //计算分钟数
  2016. let minu = parseInt(times / (1000 * 60))
  2017. if (minu > 5) {
  2018. uni.showToast({
  2019. title: '超过五分钟无法撤回',
  2020. icon: 'none'
  2021. })
  2022. } else {
  2023. let that = this
  2024. uni.showModal({
  2025. title: '提示',
  2026. content: '确定要撤回吗?',
  2027. confirmColor: '#016BF6',
  2028. complete(ret) {
  2029. if (ret.confirm) {
  2030. that.$Request.postT('/app/chat/deleteChatContentById', {
  2031. chatContentId: that.activeInfo.chatContentId
  2032. })
  2033. .then(res => {
  2034. if (res.code == 0) {
  2035. uni.showToast({
  2036. title: '已撤回',
  2037. icon: 'none'
  2038. })
  2039. that.getTimeOrListItem1();
  2040. }
  2041. });
  2042. }
  2043. }
  2044. })
  2045. }
  2046. }
  2047. },
  2048. //跳转
  2049. click(index) {
  2050. console.log(index)
  2051. switch (index) {
  2052. case 0: //简历
  2053. uni.navigateTo({
  2054. url: '/pages/index/game/orderDet?userId=' + this.tUserId
  2055. })
  2056. break;
  2057. case 1: //企业
  2058. uni.navigateTo({
  2059. url: '/my/enterpriseInfo/enterpriseInfo?companyId=' + this.companyId + '&type=yes'
  2060. })
  2061. break;
  2062. default:
  2063. break;
  2064. }
  2065. },
  2066. //消息公告
  2067. getMessage() {
  2068. this.$Request.getT('/app/common/type/311')
  2069. .then(res => {
  2070. if (res.code == 0) {
  2071. this.messages = res.data.value
  2072. }
  2073. });
  2074. },
  2075. showChangYongSelect() {
  2076. this.showMore();
  2077. this.showChangYong = !this.showChangYong;
  2078. },
  2079. selConfirm(e) {
  2080. // this.form.game = e[0].label
  2081. // this.form.gameId = e[0].value
  2082. this.content = e[0].label;
  2083. this.showMore();
  2084. this.showChangYong = false;
  2085. // this.setChatSave(1);
  2086. },
  2087. getChangYong() {
  2088. let state = 0
  2089. if(this.userType == 1){
  2090. state = 70
  2091. }else{
  2092. state = 80
  2093. }
  2094. this.$Request.getT(`/app/message/selectMessageByType?page=1&limit=100&state=${state}`)
  2095. .then(res => {
  2096. if (res.code == 0) {
  2097. this.changYongList = [{label:'你好啊,可以聊一聊~',value:0}];
  2098. res.data.list.forEach(d => {
  2099. let data = {
  2100. label: d.content,
  2101. value: d.id
  2102. }
  2103. this.changYongList.push(data);
  2104. });
  2105. }
  2106. });
  2107. },
  2108. goGuanZhu(item) {
  2109. return
  2110. this.hideDrawer();
  2111. this.tUserId = item.userId
  2112. this.$Request.get('/app/user/selectUserByIds', {
  2113. 'userId': item.userId
  2114. }).then(res => {
  2115. if (res.code == 0) {
  2116. if (res.data.userType == 1 || res.data.userType == null) { //个人
  2117. uni.navigateTo({
  2118. url: '/pages/index/game/orderDet?userId=' + item.userId
  2119. })
  2120. } else {
  2121. this.$Request.get('/app/resumes/selectResumesByUserIds', {
  2122. 'userId': item.userId
  2123. }).then(ret => {
  2124. if (ret.code == 0) {
  2125. if (ret.data && JSON.stringify(ret.data) != '{}') { //有简历则选择
  2126. this.$Request.get('/app/company/selectCompanyByUserIds', {
  2127. userId: item.userId
  2128. }).then(ree => {
  2129. if (ree.code == 0) {
  2130. this.companyId = ree.data.companyId
  2131. }
  2132. });
  2133. this.show = true
  2134. } else { //没有简历直接跳转企业详情
  2135. this.$Request.get('/app/company/selectCompanyByUserIds', {
  2136. userId: item.userId
  2137. }).then(ree => {
  2138. if (ree.code == 0) {
  2139. uni.navigateTo({
  2140. url: '/my/enterpriseInfo/enterpriseInfo?companyId=' +
  2141. ree.data.companyId + '&type=yes'
  2142. })
  2143. }
  2144. });
  2145. }
  2146. }
  2147. });
  2148. }
  2149. }
  2150. });
  2151. //去关注页面
  2152. },
  2153. //添加常用语/自动回复
  2154. goAdd() {
  2155. this.showMore();
  2156. uni.navigateTo({
  2157. url: '/pages/msg/addmsg',
  2158. success: (res) => {
  2159. // 监听返回的数据
  2160. res.eventChannel.on('selectData', (data) => {
  2161. console.log('子页面返回的数据:', data);
  2162. this.content = data;
  2163. });
  2164. }
  2165. });
  2166. },
  2167. goHistory() {
  2168. this.showMore();
  2169. uni.navigateTo({
  2170. url: '/pages/msg/chathistory?chatConversationId=' + this.chatConversationId
  2171. });
  2172. },
  2173. insertChat() {
  2174. let userId = this.$queue.getData('userId');
  2175. let data = {
  2176. focusedUserId: this.byUserId,
  2177. userId: userId
  2178. }
  2179. this.$Request.postJson('/appChat/insertChatConversation', data).then(res => {
  2180. if (res.code == 0 && res.data) {
  2181. this.chatConversationId = res.data.chatConversationId;
  2182. this.getTimeOrListItem1();
  2183. }
  2184. });
  2185. },
  2186. //更多功能(点击+弹出)
  2187. showMore() {
  2188. this.isVoice = false;
  2189. this.hideEmoji = true;
  2190. if (this.hideMore) {
  2191. this.hideMore = false;
  2192. this.openDrawer();
  2193. } else {
  2194. this.hideDrawer();
  2195. }
  2196. },
  2197. // 打开抽屉
  2198. openDrawer() {
  2199. this.popupLayerClass = 'showLayer';
  2200. },
  2201. // 隐藏抽屉
  2202. hideDrawer() {
  2203. this.popupLayerClass = '';
  2204. setTimeout(() => {
  2205. this.hideMore = true;
  2206. this.hideEmoji = true;
  2207. }, 150);
  2208. },
  2209. // 选择表情
  2210. chooseEmoji() {
  2211. this.hideMore = true;
  2212. if (this.hideEmoji) {
  2213. this.hideEmoji = false;
  2214. this.openDrawer();
  2215. } else {
  2216. this.hideDrawer();
  2217. }
  2218. },
  2219. //添加表情
  2220. addEmoji(em) {
  2221. this.textMsg += em.alt;
  2222. },
  2223. //获取焦点,如果不是选表情ing,则关闭抽屉
  2224. textareaFocus() {
  2225. if (this.popupLayerClass == 'showLayer' && this.hideMore == false) {
  2226. this.hideDrawer();
  2227. }
  2228. },
  2229. //替换表情符号为图片
  2230. replaceEmoji(str) {
  2231. let replacedStr = str.replace(/\[([^(\]|\[)]*)\]/g, (item, index) => {
  2232. console.log("item: " + item);
  2233. for (let i = 0; i < this.emojiList.length; i++) {
  2234. let row = this.emojiList[i];
  2235. for (let j = 0; j < row.length; j++) {
  2236. let EM = row[j];
  2237. if (EM.alt == item) {
  2238. //在线表情路径,图文混排必须使用网络路径,请上传一份表情到你的服务器后再替换此路径
  2239. //比如你上传服务器后,你的100.gif路径为https://www.xxx.com/emoji/100.gif 则替换onlinePath填写为https://www.xxx.com/emoji/
  2240. let onlinePath = 'https://s2.ax1x.com/2019/04/12/'
  2241. let imgstr = '<img src="' + onlinePath + this.onlineEmoji[EM.url] + '">';
  2242. console.log("imgstr: " + imgstr);
  2243. return imgstr;
  2244. }
  2245. }
  2246. }
  2247. });
  2248. return '<div style="display: flex;align-items: center;word-wrap:break-word;">' + replacedStr + '</div>';
  2249. },
  2250. // 播放语音
  2251. playVoice(msg, index) {
  2252. console.log(msg)
  2253. this.playMsgid = index;
  2254. this.AUDIO.src = msg;
  2255. this.$nextTick(function() {
  2256. this.AUDIO.play();
  2257. });
  2258. },
  2259. // 录音开始
  2260. async voiceBegin(e) {
  2261. let that = this
  2262. // 1. 先判断系统类型,区分Android/iOS权限
  2263. const hasPermission = await this.$queue.checkPermission(
  2264. 'microphone',
  2265. '选择/拍摄照片需要相机/相册权限,用于发送图片消息',
  2266. this,
  2267. 'microphonePermission'
  2268. );
  2269. // 2. 如果未授权或者用户拒绝,显示提示
  2270. if (!hasPermission) {
  2271. return;
  2272. }
  2273. if (e.touches.length > 1) {
  2274. return;
  2275. }
  2276. this.initPoint.Y = e.touches[0].clientY;
  2277. this.initPoint.identifier = e.touches[0].identifier;
  2278. this.RECORDER.start({
  2279. format: "mp3"
  2280. }); //录音开始,
  2281. },
  2282. //录音开始UI效果
  2283. recordBegin(e) {
  2284. this.recording = true;
  2285. this.voiceTis = '松开 结束';
  2286. this.recordLength = 0;
  2287. this.recordTimer = setInterval(() => {
  2288. this.recordLength++;
  2289. }, 1000)
  2290. },
  2291. // 录音被打断
  2292. voiceCancel() {
  2293. this.recording = false;
  2294. this.voiceTis = '按住 说话';
  2295. this.recordTis = '手指上滑 取消发送'
  2296. this.willStop = true; //不发送录音
  2297. this.RECORDER.stop(); //录音结束
  2298. },
  2299. // 录音中(判断是否触发上滑取消发送)
  2300. voiceIng(e) {
  2301. if (!this.recording) {
  2302. return;
  2303. }
  2304. let touche = e.touches[0];
  2305. //上滑一个导航栏的高度触发上滑取消发送
  2306. if (this.initPoint.Y - touche.clientY >= uni.upx2px(100)) {
  2307. this.willStop = true;
  2308. this.recordTis = '松开手指 取消发送'
  2309. } else {
  2310. this.willStop = false;
  2311. this.recordTis = '手指上滑 取消发送'
  2312. }
  2313. },
  2314. // 结束录音
  2315. voiceEnd(e) {
  2316. if (!this.recording) {
  2317. return;
  2318. }
  2319. this.recording = false;
  2320. this.voiceTis = '按住 说话';
  2321. this.recordTis = '手指上滑 取消发送'
  2322. this.RECORDER.stop(); //录音结束
  2323. },
  2324. //录音结束(回调文件)
  2325. recordEnd(e) {
  2326. clearInterval(this.recordTimer);
  2327. if (!this.willStop) {
  2328. this.$queue.showLoading('发送中...')
  2329. console.log("e: " + JSON.stringify(e));
  2330. let msg = {
  2331. length: 0,
  2332. url: e.tempFilePath
  2333. }
  2334. let min = parseInt(this.recordLength / 60);
  2335. let sec = this.recordLength % 60;
  2336. min = min < 10 ? '0' + min : min;
  2337. sec = sec < 10 ? '0' + sec : sec;
  2338. msg.length = min + ':' + sec;
  2339. console.log('msg.length___:' + msg.length)
  2340. uni.uploadFile({ // 上传接口
  2341. url: this.config("APIHOST1") + '/alioss/upload', //真实的接口地址
  2342. filePath: e.tempFilePath,
  2343. name: 'file',
  2344. success: (uploadFileRes) => {
  2345. uni.hideLoading();
  2346. this.content = JSON.parse(uploadFileRes.data).data;
  2347. console.log("语音:" + this.content)
  2348. this.setChatSave(3, msg.length);
  2349. uni.hideLoading();
  2350. }
  2351. });
  2352. } else {
  2353. console.log('取消发送录音');
  2354. }
  2355. this.willStop = false;
  2356. },
  2357. // 切换语音/文字输入
  2358. switchVoice() {
  2359. this.hideDrawer();
  2360. this.isVoice = this.isVoice ? false : true;
  2361. },
  2362. copy(content) {
  2363. uni.showModal({
  2364. title: '温馨提示',
  2365. content: '确认要复制此文字吗?',
  2366. showCancel: true,
  2367. cancelText: '取消',
  2368. confirmText: '确认',
  2369. confirmColor: '#016BF6',
  2370. success: res => {
  2371. if (res.confirm) {
  2372. uni.setClipboardData({
  2373. data: content,
  2374. success: r => {
  2375. this.$queue.showToast('复制成功');
  2376. }
  2377. });
  2378. }
  2379. }
  2380. });
  2381. },
  2382. h5Copy(content) {
  2383. if (!document.queryCommandSupported('copy')) {
  2384. // 不支持
  2385. return false
  2386. }
  2387. let textarea = document.createElement("textarea")
  2388. textarea.value = content
  2389. textarea.readOnly = "readOnly"
  2390. document.body.appendChild(textarea)
  2391. textarea.select() // 选择对象
  2392. textarea.setSelectionRange(0, content.length) //核心
  2393. let result = document.execCommand("copy") // 执行浏览器复制命令
  2394. textarea.remove()
  2395. return result
  2396. },
  2397. getDateDiff(data) {
  2398. // 传进来的data必须是日期格式,不能是时间戳
  2399. //var str = data;
  2400. //将字符串转换成时间格式
  2401. var timePublish = new Date(data);
  2402. var timeNow = new Date();
  2403. var minute = 1000 * 60;
  2404. var hour = minute * 60;
  2405. var day = hour * 24;
  2406. var month = day * 30;
  2407. var result = "2";
  2408. var diffValue = timeNow - timePublish;
  2409. var diffMonth = diffValue / month;
  2410. var diffWeek = diffValue / (7 * day);
  2411. var diffDay = diffValue / day;
  2412. var diffHour = diffValue / hour;
  2413. var diffMinute = diffValue / minute;
  2414. if (diffMonth > 3) {
  2415. result = timePublish.getFullYear() + "-";
  2416. result += timePublish.getMonth() + "-";
  2417. result += timePublish.getDate();
  2418. } else if (diffMonth > 1) { //月
  2419. result = data.substring(0, 10);
  2420. } else if (diffWeek > 1) { //周
  2421. result = data.substring(0, 10);
  2422. } else if (diffDay > 1) { //天
  2423. result = data.substring(0, 10);
  2424. } else if (diffHour > 1) { //小时
  2425. result = parseInt(diffHour) + "小时前";
  2426. } else if (diffMinute > 1) { //分钟
  2427. result = parseInt(diffMinute) + "分钟前";
  2428. } else {
  2429. result = "刚刚";
  2430. }
  2431. return result;
  2432. },
  2433. // 发送心跳包
  2434. startHeartbeat() {
  2435. // HeartBeat 这里是和后端约定好的值,我们发送给后端,后端再把这个值返给我们
  2436. // 目的就是让后端知道我们一直在
  2437. const heartbeatMsg = 'HeartBeat';
  2438. const sendHeartbeat = () => {
  2439. if (this.isOpen) {
  2440. console.log('发送HeartBeat')
  2441. uni.sendSocketMessage({
  2442. data: heartbeatMsg,
  2443. }).catch(error => {
  2444. console.log('发送心跳消息失败:', error);
  2445. //发送消息失败则进行重新链接
  2446. this.connect()
  2447. });
  2448. }
  2449. };
  2450. this.socketTimer = setInterval(sendHeartbeat, HEARTBEAT_INTERVAL);
  2451. },
  2452. // 开始重连
  2453. reconnect() {
  2454. if (!this.isOpen) {
  2455. clearTimeout(this.socketTimer);
  2456. this.socketTimer = setTimeout(() => {
  2457. console.log('开始重连...');
  2458. this.connect();
  2459. }, RECONNECT_INTERVAL);
  2460. }
  2461. },
  2462. connect() {
  2463. // #ifdef MP-WEIXIN
  2464. if (uni.getStorageSync('sendMsg')) {
  2465. // console.log('授权+1')
  2466. wx.requestSubscribeMessage({
  2467. tmplIds: this.arr,
  2468. success(re) {
  2469. // console.log(JSON.stringify(re), 111111111111)
  2470. var datas = JSON.stringify(re);
  2471. if (datas.indexOf("accept") != -1) {
  2472. // console.log(re)
  2473. }
  2474. },
  2475. fail: (res) => {
  2476. // console.log(res)
  2477. }
  2478. })
  2479. }
  2480. // #endif
  2481. let that = this
  2482. let userId = this.$queue.getData('userId');
  2483. uni.showLoading({
  2484. title: '连接中...'
  2485. })
  2486. uni.closeSocket()
  2487. uni.connectSocket({
  2488. // url: 'wss://h5.youxb.icu/wss/sqx_fast/chatSocket/' + userId,
  2489. // url: this.config("WSHOST1") + userId,
  2490. url: configdata.WSHOST1 + '' + userId,
  2491. // url: 'wss://h5.bosszan.com/wss/chatSocket/' + userId,
  2492. // url: 'ws://192.168.0.128:7152/sqx_fast/chatSocket/' + userId,
  2493. data() {
  2494. return {
  2495. msg: 'Hello'
  2496. }
  2497. },
  2498. header: {
  2499. 'content-type': 'application/json'
  2500. },
  2501. method: 'GET',
  2502. success(res) {
  2503. // 这里是接口调用成功的回调,不是连接成功的回调,请注意
  2504. },
  2505. fail(err) {
  2506. // 这里是接口调用失败的回调,不是连接失败的回调,请注意
  2507. }
  2508. })
  2509. uni.onSocketOpen((res) => {
  2510. uni.hideLoading()
  2511. that.isOpen = true;
  2512. that.startHeartbeat()
  2513. if (that.mapsValue) {
  2514. that.setChatSave(18, that.mapsValue)
  2515. }
  2516. })
  2517. uni.onSocketError((err) => {
  2518. uni.hideLoading()
  2519. //如果连接异常那么把状态设置为false
  2520. that.isOpen = false;
  2521. //并尝试进行重连
  2522. that.reconnect();
  2523. })
  2524. uni.onSocketMessage((res) => {
  2525. if (res.data == 'HeartBeat') { //如果是心跳回推则不进行处理
  2526. return
  2527. }
  2528. let msg
  2529. try {
  2530. msg = JSON.parse(res.data)
  2531. } catch (e) {
  2532. that.getTimeOrListItem1();
  2533. return;
  2534. }
  2535. if (msg.type === 'kickOut') {
  2536. uni.showModal({
  2537. title: '提示',
  2538. content: msg.content,
  2539. showCancel: false,
  2540. success() {
  2541. that.$queue.logout();
  2542. uni.reLaunch({ url: '/pages/public/loginphone?type=1' })
  2543. }
  2544. })
  2545. }else{
  2546. that.getTimeOrListItem1();
  2547. }
  2548. })
  2549. uni.onSocketClose((res) => {
  2550. uni.hideLoading()
  2551. that.isOpen = false;
  2552. //链接关闭的时候也尝试进行重连
  2553. // that.reconnect();
  2554. })
  2555. },
  2556. close() {
  2557. uni.closeSocket()
  2558. },
  2559. getTimeOrListItem1() {
  2560. let userId = this.$queue.getData('userId')
  2561. this.$Request.getT('/app/chat/selectChatContent?page=' + this.page + '&limit=' + this.size +
  2562. '&chatConversationId=' + this.chatConversationId + '&userId=' + userId).then(
  2563. res => {
  2564. // this.ListItem = [];
  2565. if (res.data) {
  2566. var time = '';
  2567. res.data.list.forEach(d => {
  2568. d.createTimes = d.createTime;
  2569. d.createTime = this.getDateDiff(d.createTime);
  2570. if (d.createTime === time) {
  2571. d.createTime = '';
  2572. } else {
  2573. time = d.createTime;
  2574. }
  2575. if (d.type === 4) {
  2576. let data = d.content.split(',');
  2577. d.content = data;
  2578. }
  2579. if (d.type === 3) {
  2580. let data = d.content.split(',');
  2581. d.content = data;
  2582. }
  2583. if (d.messageType === 18) {
  2584. d.content = JSON.parse(d.content);
  2585. d.markers = [{
  2586. id: 1,
  2587. latitude: d.content.latitude,
  2588. longitude: d.content.longitude,
  2589. width: 20,
  2590. height: 20,
  2591. iconPath: '../../static/images/mapMarker.png',
  2592. callout: {
  2593. content: d.content.name,
  2594. color: '#000', //文字颜色
  2595. fontSize: 10, //文本大小
  2596. padding: 10, //附近留白
  2597. borderRadius: 24, //边框圆角
  2598. bgColor: '#FFFFFF', //背景颜色
  2599. display: 'ALWAYS', //常显
  2600. }
  2601. }]
  2602. }
  2603. // this.ListItem.push(d);
  2604. });
  2605. this.ListItem = res.data.list
  2606. this.ListItem.reverse();
  2607. this.scrollTop = this.old.scrollTop
  2608. this.$nextTick(() => {
  2609. this.scrollTop = 99999
  2610. })
  2611. this.getStatusInfo()
  2612. }
  2613. uni.hideLoading();
  2614. });
  2615. },
  2616. setChatSave(type, url) {
  2617. //type:1文字 2图片
  2618. if (type === 1 && this.content == '') {
  2619. this.$queue.showToast('请输入聊天内容');
  2620. return;
  2621. }
  2622. if (type != 3 && type != 2 && this.$queue.getChatSearchKeys(this.content)) {
  2623. uni.showToast({
  2624. title: "输入内容带有非法关键字请重新输入",
  2625. mask: false,
  2626. duration: 1500,
  2627. icon: "none"
  2628. });
  2629. return;
  2630. }
  2631. // if (type === 1 && this.$queue.getChatSearchKeys(this.content) != -1) {
  2632. // uni.showToast({
  2633. // title: "输入内容带有非法关键字请重新输入",
  2634. // mask: false,
  2635. // duration: 1500,
  2636. // icon: "none"
  2637. // });
  2638. // return;
  2639. // }
  2640. if(type == 96){
  2641. this.content = '已拒绝面试邀请'
  2642. }
  2643. if(type == 97){
  2644. this.content = '已接受面试邀请'
  2645. }
  2646. let userId = this.$queue.getData('userId');
  2647. if (type === 4) {
  2648. this.content = url;
  2649. }
  2650. if (type === 18) { //定位
  2651. this.content = url;
  2652. }
  2653. let data = {};
  2654. if (type == 3) {
  2655. data = {
  2656. userId: this.byUserId,
  2657. content: this.content,
  2658. width: url,
  2659. messageType: type,
  2660. chatConversationId: this.chatConversationId
  2661. }
  2662. } else if (type == 5) { //交换手机号
  2663. data = {
  2664. userId: this.byUserId,
  2665. content: '手机号请求',
  2666. messageType: type,
  2667. chatConversationId: this.chatConversationId
  2668. }
  2669. } else if (type == 6) { //交换微信号
  2670. data = {
  2671. userId: this.byUserId,
  2672. content: '微信号请求',
  2673. messageType: type,
  2674. chatConversationId: this.chatConversationId
  2675. }
  2676. } else if (type == 9) { //简历请求
  2677. data = {
  2678. userId: this.byUserId,
  2679. content: '简历请求',
  2680. messageType: type,
  2681. chatConversationId: this.chatConversationId
  2682. }
  2683. } else if (type == 24) {
  2684. data = {
  2685. userId: this.byUserId,
  2686. content: '刷新',
  2687. messageType: type,
  2688. chatConversationId: this.chatConversationId
  2689. }
  2690. } else {
  2691. data = {
  2692. userId: this.byUserId,
  2693. content: this.content,
  2694. messageType: type,
  2695. chatConversationId: this.chatConversationId
  2696. }
  2697. }
  2698. data = JSON.stringify(data);
  2699. let that = this;
  2700. uni.sendSocketMessage({
  2701. data: data,
  2702. success(res) {
  2703. that.mapsValue = ''
  2704. let image_url = that.$queue.getData('image_url');
  2705. if (!image_url) {
  2706. image_url = '/static/logo.png';
  2707. }
  2708. let datas = {
  2709. chat: {
  2710. userHead: image_url
  2711. },
  2712. content: that.content,
  2713. type: type,
  2714. sendType: 1
  2715. }
  2716. that.ListItem.push(datas);
  2717. setTimeout(() => {
  2718. that.getTimeOrListItem1();
  2719. that.content = '';
  2720. that.hideDrawer();
  2721. }, 50);
  2722. console.log(that.content);
  2723. },
  2724. fail(err) {
  2725. console.log(err);
  2726. }
  2727. })
  2728. },
  2729. //发送图片
  2730. async chooseImage(sourceType) {
  2731. let that = this
  2732. // 1. 先判断系统类型,区分Android/iOS权限
  2733. const hasPermission = await this.$queue.checkPermission(
  2734. 'camera',
  2735. '选择/拍摄照片需要相机/相册权限,用于发送图片消息',
  2736. this
  2737. );
  2738. // 2. 如果未授权或者用户拒绝,显示提示
  2739. if (!hasPermission) {
  2740. return;
  2741. }
  2742. uni.chooseImage({
  2743. count: 1,
  2744. sourceType: ['album','camera'],
  2745. success: res => {
  2746. for (let i = 0; i < res.tempFilePaths.length; i++) {
  2747. this.$queue.showLoading("上传中...");
  2748. uni.uploadFile({ // 上传接口
  2749. url: this.config("APIHOST1") + '/alioss/upload', //真实的接口地址
  2750. filePath: res.tempFilePaths[i],
  2751. name: 'file',
  2752. success: (uploadFileRes) => {
  2753. let content = JSON.parse(uploadFileRes.data).data;
  2754. uni.hideLoading();
  2755. let data = {
  2756. userId: that.byUserId,
  2757. content: content,
  2758. messageType: 2,
  2759. chatConversationId: that.chatConversationId
  2760. }
  2761. data = JSON.stringify(data);
  2762. uni.sendSocketMessage({
  2763. data: data,
  2764. success(res) {
  2765. let image_url = that.$queue.getData(
  2766. 'image_url');
  2767. if (!image_url) {
  2768. image_url = '/static/logo.png';
  2769. }
  2770. let datas = {
  2771. chat: {
  2772. userHead: image_url
  2773. },
  2774. content: content,
  2775. type: 2,
  2776. sendType: 1
  2777. }
  2778. that.ListItem.push(datas);
  2779. setTimeout(() => {
  2780. that.getTimeOrListItem1();
  2781. that.hideDrawer();
  2782. }, 50);
  2783. },
  2784. fail(err) {
  2785. console.log(err);
  2786. }
  2787. })
  2788. }
  2789. });
  2790. }
  2791. }
  2792. })
  2793. },
  2794. config: function(name) {
  2795. var info = null;
  2796. if (name) {
  2797. var name2 = name.split("."); //字符分割
  2798. if (name2.length > 1) {
  2799. info = configdata[name2[0]][name2[1]] || null;
  2800. } else {
  2801. info = configdata[name] || null;
  2802. }
  2803. if (info == null) {
  2804. let web_config = cache.get("web_config");
  2805. if (web_config) {
  2806. if (name2.length > 1) {
  2807. info = web_config[name2[0]][name2[1]] || null;
  2808. } else {
  2809. info = web_config[name] || null;
  2810. }
  2811. }
  2812. }
  2813. }
  2814. return info;
  2815. },
  2816. //查看大图
  2817. viewImg(item) {
  2818. let imgsArray = [];
  2819. imgsArray[0] = item;
  2820. uni.previewImage({
  2821. current: 0,
  2822. urls: imgsArray
  2823. });
  2824. },
  2825. /**
  2826. * 收藏岗位
  2827. */
  2828. setCollection(postPushId) {
  2829. this.$Request.postT("/app/myCollection/saveCollection", {
  2830. postPushId: postPushId,
  2831. type: 1
  2832. }).then(res => {
  2833. if (res.code == 0) {
  2834. uni.showToast({
  2835. title: res.msg
  2836. })
  2837. this.postPushInfo.isCollection=1-(this.postPushInfo.isCollection?this.postPushInfo.isCollection:0)
  2838. }
  2839. })
  2840. },
  2841. copyAndJubao(item) {
  2842. var that=this
  2843. uni.showActionSheet({
  2844. itemList: ['举报', '复制'],
  2845. success(res) {
  2846. if (res.tapIndex === 0) {
  2847. setTimeout(() => {
  2848. that.$queue.showToast('该用户聊天信息举报已成功提交审核');
  2849. }, 200);
  2850. } else if (res.tapIndex === 1) {
  2851. that.copy(item.content);
  2852. }
  2853. },
  2854. fail(res) {
  2855. console.log(res.errMsg);
  2856. }
  2857. });
  2858. }
  2859. },
  2860. };
  2861. </script>
  2862. <style lang="scss">
  2863. @import "../msg/css/style.scss";
  2864. // 展开按钮样式
  2865. .expand-btn {
  2866. text-align: left;
  2867. margin-top: 20rpx;
  2868. padding: 10rpx 0;
  2869. .expand-text {
  2870. color: #007AFF;
  2871. font-size: 28rpx;
  2872. }
  2873. }
  2874. // 时间和收藏样式
  2875. .time-favorite {
  2876. padding: 10rpx 0;
  2877. .time-text {
  2878. color: rgba(156, 164, 171, 1);
  2879. font-family: DM Sans;
  2880. font-size: 12px;
  2881. font-weight: 400;
  2882. line-height: 20px;
  2883. letter-spacing: undefined;
  2884. text-align: right;
  2885. }
  2886. .favorite-btn {
  2887. color: rgba(156, 164, 171, 1);
  2888. font-size: 12px;
  2889. .favorite-icon {
  2890. margin-right: 8rpx;
  2891. font-size: 12px;
  2892. }
  2893. .favorite-text {
  2894. font-size: 12px;
  2895. }
  2896. }
  2897. .collectActived{
  2898. color: #016BF6;
  2899. }
  2900. }
  2901. .avatorm {
  2902. width: 100%;
  2903. // height: 100rpx;
  2904. margin-top: 20rpx;
  2905. color: #000;
  2906. .avatorm-box {
  2907. width: 90%;
  2908. height: 100%;
  2909. .avatorm-box-item {
  2910. margin-bottom: 10rpx;
  2911. .avatorm-box-item-t {
  2912. width: 30%;
  2913. }
  2914. .avatorm-box-item-r {
  2915. width: 70%;
  2916. }
  2917. }
  2918. }
  2919. }
  2920. .mssTitle {
  2921. width: 100%;
  2922. margin-top: 30rpx;
  2923. text-align: center;
  2924. font-size: 30rpx;
  2925. color: #000;
  2926. font-weight: bold;
  2927. }
  2928. .btnm {
  2929. width: 100%;
  2930. margin-top: 20rpx;
  2931. height: 80rpx;
  2932. margin-bottom: 100rpx;
  2933. .btn-box {
  2934. width: 686rpx;
  2935. height: 100%;
  2936. .btnItem {
  2937. display: flex;
  2938. align-items: center;
  2939. justify-content: center;
  2940. width: 200rpx;
  2941. height: 100%;
  2942. border-radius: 14rpx;
  2943. }
  2944. .btn-close {
  2945. color: #016BF6;
  2946. border: 1rpx solid #016BF6;
  2947. }
  2948. .btn-sub {
  2949. color: #FFFFFF;
  2950. background-color: #016BF6;
  2951. }
  2952. }
  2953. }
  2954. .mianshiTime {
  2955. width: 100%;
  2956. margin-top: 20rpx;
  2957. .mianshiTime-box {
  2958. padding-bottom: 20rpx;
  2959. width: 686rpx;
  2960. height: 100%;
  2961. color: #000000;
  2962. border-bottom: 1rpx solid #F2F2F7;
  2963. .mianshiTime-box-ti {
  2964. height: 100%;
  2965. margin-top: 20rpx;
  2966. }
  2967. }
  2968. }
  2969. .mianshiTitle {
  2970. width: 100%;
  2971. margin-top: 30rpx;
  2972. font-size: 30rpx;
  2973. text-align: center;
  2974. font-weight: bold;
  2975. color: #000000;
  2976. }
  2977. .qyList-box-item {
  2978. width: 100%;
  2979. // height: 400rpx;
  2980. padding-bottom: 40rpx;
  2981. background-color: #ffffff;
  2982. border-radius: 24rpx;
  2983. margin-bottom: 20rpx;
  2984. .qyList-box-item-box {
  2985. width: 626rpx;
  2986. height: 100%;
  2987. }
  2988. .qyList-box-item-info {
  2989. margin-top: 40rpx;
  2990. }
  2991. .qyList-box-item-job {
  2992. color: #121212;
  2993. font-size: 28rpx;
  2994. font-weight: 500;
  2995. margin-top: 20rpx;
  2996. }
  2997. .qyList-box-item-rem {
  2998. color: #999999;
  2999. font-size: 26rpx;
  3000. margin-top: 20rpx;
  3001. }
  3002. }
  3003. .topSe {
  3004. width: 100%;
  3005. height: 100%;
  3006. // padding-top: 80rpx;
  3007. background-color: #FFFFFF;
  3008. box-sizing: border-box;
  3009. .topSe-box {
  3010. width: 686rpx;
  3011. height: 100%;
  3012. .topSe-box-item {
  3013. font-size: 24rpx;
  3014. width: 80rpx;
  3015. position: relative;
  3016. .status-indicator{
  3017. position: absolute;
  3018. top: -12rpx;
  3019. right: 12rpx;
  3020. width: 20rpx;
  3021. height: 20rpx;
  3022. color: #4CAF50;
  3023. }
  3024. }
  3025. }
  3026. }
  3027. .jobs {
  3028. width: 100%;
  3029. .jobs-box {
  3030. width: 95%;
  3031. }
  3032. }
  3033. .gwList-box-item {
  3034. width: 100%;
  3035. // height: 329rpx;
  3036. border: 0.5px solid rgba(227, 231, 236, 1);
  3037. background: #FDFDFD;
  3038. border-radius: 24rpx;
  3039. // margin-bottom: 20rpx;
  3040. padding-bottom: 20rpx;
  3041. }
  3042. .gwList-box-item-box {
  3043. width: 100%;
  3044. height: 100%;
  3045. padding: 0 40rpx;
  3046. .gwList-box-item-box-title {
  3047. margin-top: 30rpx;
  3048. text:nth-of-type(1) {
  3049. color: rgba(23, 23, 37, 1);
  3050. font-family: DM Sans;
  3051. font-size: 24px;
  3052. font-weight: 700;
  3053. line-height: 24px;
  3054. letter-spacing: 0%;
  3055. text-align: left;
  3056. }
  3057. text:nth-of-type(2) {
  3058. color: rgba(1, 107, 246, 1);
  3059. font-family: DM Sans;
  3060. font-size: 16px;
  3061. font-weight: 700;
  3062. line-height: 20px;
  3063. letter-spacing: 0.5%;
  3064. text-align: right;
  3065. }
  3066. }
  3067. .gwList-box-item-box-label {
  3068. margin-top: 30rpx;
  3069. }
  3070. .gwList-box-item-box-name {
  3071. color: rgba(156, 164, 171, 1);
  3072. font-family: DM Sans;
  3073. font-size: 16px;
  3074. font-weight: 400;
  3075. line-height: 20px;
  3076. letter-spacing: 0.5%;
  3077. text-align: left;
  3078. gap: 8rpx;
  3079. margin-top: 20rpx;
  3080. }
  3081. .gwList-box-item-box-line {
  3082. width: 100%;
  3083. border: 1rpx solid #E6E6E6;
  3084. margin-top: 30rpx;
  3085. margin-bottom: 20rpx;
  3086. }
  3087. .gwList-box-item-box-info-text {
  3088. color: rgba(153, 153, 153, 1);
  3089. font-family: DM Sans;
  3090. font-size: 12px;
  3091. font-weight: 400;
  3092. line-height: 12px;
  3093. letter-spacing: 0px;
  3094. text-align: left;
  3095. margin-bottom: 20rpx;
  3096. white-space: pre-wrap;
  3097. .job-description-item {
  3098. margin-bottom: 6rpx;
  3099. line-height: 1.2;
  3100. &:last-child {
  3101. margin-bottom: 0;
  3102. }
  3103. }
  3104. .job-description-itemAll{
  3105. display: -webkit-box;
  3106. -webkit-line-clamp: 4;
  3107. -webkit-box-orient: vertical;
  3108. overflow: hidden;
  3109. text-overflow: ellipsis;
  3110. }
  3111. }
  3112. .gwList-box-item-box-info {
  3113. font-size: 26rpx;
  3114. padding-bottom: 20rpx;
  3115. border-bottom: 1rpx solid #E6E6E6;
  3116. .gwList-box-item-box-info-l {
  3117. color: #1A1A1A;
  3118. .people {
  3119. max-width: 110rpx;
  3120. overflow: hidden; //超出的文本隐藏
  3121. text-overflow: ellipsis; //溢出用省略号显示
  3122. white-space: nowrap; // 默认不换行;
  3123. color: rgba(156, 164, 171, 1);
  3124. font-family: DM Sans;
  3125. font-size: 14px;
  3126. font-weight: 400;
  3127. line-height: 20px;
  3128. letter-spacing: undefined;
  3129. text-align: left;
  3130. }
  3131. }
  3132. .gwList-box-item-box-info-r {
  3133. color: #999999;
  3134. width: 50%;
  3135. overflow: hidden; //超出的文本隐藏
  3136. text-overflow: ellipsis; //溢出用省略号显示
  3137. white-space: nowrap; // 默认不换行;
  3138. }
  3139. }
  3140. }
  3141. .xuanfu {
  3142. width: 100%;
  3143. display: flex;
  3144. justify-content: center;
  3145. align-items: center;
  3146. color: #016BF6;
  3147. .xuanfu-box {
  3148. width: 95%;
  3149. background-color: #FFFFFF;
  3150. border-radius: 10rpx;
  3151. padding: 20rpx 15rpx 20rpx 20rpx;
  3152. letter-spacing: 5rpx;
  3153. font-size: 26rpx;
  3154. }
  3155. }
  3156. page {
  3157. background: #FAFAFA;
  3158. color: #FFFFFF;
  3159. }
  3160. .chat-listitem {
  3161. display: flex;
  3162. margin-top: 20rpx;
  3163. padding: 10rpx;
  3164. }
  3165. .textColor {
  3166. color: #FFFFFF;
  3167. border-radius: 16px 16px 0px 16px;
  3168. background: rgba(1, 107, 246, 1);
  3169. }
  3170. .textColorLeft{
  3171. color: #000;
  3172. border-radius: 16px 16px 0px 16px;
  3173. background: #fff;
  3174. }
  3175. .chat-listitem-text {
  3176. // color: #FFFFFF;
  3177. margin-top: 6rpx;
  3178. width: fit-content;
  3179. padding: 15rpx;
  3180. font-size: 30rpx;
  3181. height: max-content;
  3182. word-wrap: break-word;
  3183. word-break: break-all;
  3184. border-radius: 10rpx;
  3185. }
  3186. .chat-listitem-image-type4 {
  3187. color: #000000;
  3188. background: #FFFFFF;
  3189. width: fit-content;
  3190. font-size: 30rpx;
  3191. height: max-content;
  3192. word-wrap: break-word;
  3193. word-break: break-all;
  3194. border-top-left-radius: 20rpx;
  3195. border-top-right-radius: 20rpx;
  3196. }
  3197. .chat-listitem-image {
  3198. margin-top: 5rpx;
  3199. width: 75rpx;
  3200. height: 75rpx;
  3201. border-radius: 50%;
  3202. }
  3203. .save {
  3204. width: 130rpx;
  3205. text-align: center;
  3206. border-radius: 10rpx;
  3207. height: 70rpx;
  3208. background: #FFFFFF;
  3209. margin: 5rpx 10rpx 0;
  3210. line-height: 70rpx;
  3211. }
  3212. .talent-list {
  3213. // margin-top: 280rpx; // 已改为动态计算,在模板中通过 :style 设置
  3214. padding: 20rpx;
  3215. z-index: 100;
  3216. position: relative;
  3217. width:96%
  3218. }
  3219. .talent-card {
  3220. background-color: #ffffff;
  3221. border-radius: 16rpx;
  3222. margin-bottom: 20rpx;
  3223. padding: 30rpx;
  3224. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  3225. .time-favorite{
  3226. border-top: 1px solid #efefef;
  3227. margin-top: 20rpx;
  3228. }
  3229. }
  3230. .talent-content {
  3231. .talent-header {
  3232. display: flex;
  3233. align-items: flex-start;
  3234. .talent-avatar {
  3235. width: 80rpx;
  3236. height: 80rpx;
  3237. border-radius: 50%;
  3238. margin-right: 20rpx;
  3239. }
  3240. .talent-info {
  3241. flex: 1;
  3242. .talentRange{
  3243. color: #016BF6;
  3244. font-size: 24rpx;
  3245. margin-left: 10rpx;
  3246. }
  3247. .talent-name-section {
  3248. display: flex;
  3249. align-items: center;
  3250. justify-content: flex-start;
  3251. width: 100%;
  3252. margin-bottom: 6rpx;
  3253. }
  3254. .talent-name {
  3255. color: rgba(51, 51, 51, 1);
  3256. font-family: DM Sans;
  3257. font-size: 28rpx;
  3258. font-weight: 500;
  3259. line-height: 36rx;
  3260. letter-spacing: 0.5%;
  3261. text-align: left;
  3262. margin-right: 16rpx;
  3263. }
  3264. .talent-tags {
  3265. display: flex;
  3266. flex-wrap: wrap;
  3267. gap: 10rpx;
  3268. .status-tag {
  3269. padding: 8rpx;
  3270. border-radius: 12rpx;
  3271. font-size: 18rpx;
  3272. font-family: DM Sans;
  3273. font-weight: 400;
  3274. line-height: 20rpx;
  3275. letter-spacing: -0.5px;
  3276. text-align: left;
  3277. &.online {
  3278. background: rgba(213, 255, 231, 1);
  3279. color: rgba(29, 209, 104, 1);
  3280. }
  3281. &.hot {
  3282. background: rgba(252, 233, 220, 1);
  3283. color: rgba(1, 107, 246, 1);
  3284. }
  3285. &.active {
  3286. color: rgba(153, 153, 153, 1);
  3287. }
  3288. }
  3289. }
  3290. }
  3291. }
  3292. .talent-experience {
  3293. display: flex;
  3294. align-items: center;
  3295. margin-bottom: 12rpx;
  3296. gap: 16rpx;
  3297. color: rgba(156, 164, 171, 1);
  3298. font-family: DM Sans;
  3299. font-size: 24rpx;
  3300. font-weight: 400;
  3301. line-height: 32rpx;
  3302. letter-spacing: 0.5%;
  3303. text-align: left;
  3304. }
  3305. .current-job {
  3306. display: flex;
  3307. align-items: center;
  3308. margin-bottom: 12rpx;
  3309. .job-icon {
  3310. width: 40rpx;
  3311. height: 40rpx;
  3312. margin-right: 8rpx;
  3313. }
  3314. .job-text {
  3315. color: rgba(156, 164, 171, 1);
  3316. font-family: DM Sans;
  3317. font-size: 24rpx;
  3318. font-weight: 400;
  3319. line-height: 40rpx;
  3320. letter-spacing: 0.5%;
  3321. text-align: left;
  3322. }
  3323. }
  3324. .job-expectation {
  3325. display: flex;
  3326. align-items: center;
  3327. margin-bottom: 16rpx;
  3328. .job-icon {
  3329. width: 40rpx;
  3330. height: 40rpx;
  3331. margin-right: 8rpx;
  3332. }
  3333. .expectation-text {
  3334. color: rgba(156, 164, 171, 1);
  3335. font-family: DM Sans;
  3336. font-size: 24rpx;
  3337. font-weight: 400;
  3338. line-height: 40rpx;
  3339. letter-spacing: 0.5%;
  3340. text-align: left;
  3341. }
  3342. }
  3343. .skill-tags {
  3344. display: flex;
  3345. flex-wrap: wrap;
  3346. gap: 10rpx;
  3347. margin-bottom: 16rpx;
  3348. .skill-tag {
  3349. padding: 8rpx;
  3350. background: rgba(198, 198, 198, 0.1);
  3351. border-radius: 12rpx;
  3352. color: rgba(153, 153, 153, 1);
  3353. font-family: DM Sans;
  3354. font-size: 20rpx;
  3355. font-weight: 400;
  3356. line-height: 20rpx;
  3357. letter-spacing: -0.5px;
  3358. text-align: left;
  3359. }
  3360. }
  3361. .job-description {
  3362. margin-bottom: 12rpx;
  3363. width: 100%;
  3364. .description-text {
  3365. color: rgba(97, 110, 124, 1);
  3366. font-family: DM Sans;
  3367. font-size: 24rpx;
  3368. font-weight: 400;
  3369. line-height: 32rpx;
  3370. letter-spacing: 0px;
  3371. text-align: left;
  3372. display: -webkit-box;
  3373. -webkit-line-clamp: 2;
  3374. /* 只显示2行 */
  3375. -webkit-box-orient: vertical;
  3376. overflow: hidden;
  3377. /* 隐藏超出内容 */
  3378. text-overflow: ellipsis;
  3379. /* 显示省略号 */
  3380. }
  3381. }
  3382. .work-period {
  3383. text-align: right;
  3384. .period-text {
  3385. font-size: 22rpx;
  3386. color: #999;
  3387. }
  3388. }
  3389. }
  3390. .bg-style{
  3391. padding-bottom: 20rpx;;padding-top: 20rpx;margin-right: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);
  3392. }
  3393. </style>