im.vue 104 KB

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