im.vue 108 KB

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