im.vue 108 KB

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