index.vue 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096
  1. <template>
  2. <view style="padding-bottom: 30rpx;" v-if="!loading">
  3. <view class="top-fixed" :style="'height: '+ systems.barHeight + 'rpx;'">
  4. <view :class="'bgcolor' + (isTop == 1 ? ' opacity' : '')" :style="'height:' + systems.barHeight + 'rpx'">
  5. </view>
  6. <view class="top-fixed-c"
  7. :style="'height: '+ systems.navigationHeight + 'rpx;margin-top:' + systems.ktxStatusHeight + 'rpx;'">
  8. <navigator @click="toBack" hover-class="none" class="back ddflex"
  9. :style="'height: '+ systems.navigationHeight + 'rpx;'">
  10. <image v-if="!pageBack" src="/static/pages/images/back_black.png"></image>
  11. <image v-else src="/static/pages/images/back_home.png" style="width: 40rpx;height:40rpx"></image>
  12. </navigator>
  13. <view :class="'top-title tover' + (isTop == 1 ? ' top-black':'')"
  14. :style="'line-height: '+ systems.navigationHeight + 'rpx;'">名片</view>
  15. </view>
  16. </view>
  17. <view :style="'height: '+ systems.barHeight + 'rpx;'"></view>
  18. <view class="bg">
  19. <image src="/static/pages/images/userBg.png"></image>
  20. </view>
  21. <view class="infos">
  22. <view class="infos-border">
  23. <view class="photo">
  24. <block v-if="cardInfo.avatar">
  25. <image :src="cardInfo.avatar" mode="aspectFill" class="poster"></image>
  26. <view class="change-option ddflex">
  27. <view v-if="cardId" class="change" style="right: 140rpx;background-color:#27D699;"
  28. @click="userBehavior(3)">
  29. <image v-if="!cardInfo.isThumbs" style="width: 35rpx;height: 32rpx;"
  30. src="/card/static/images/dz1.png" mode="aspectFit"></image>
  31. <image v-else style="width: 35rpx;height:32rpx;" src="/card/static/images/dz1_h.png" mode="aspectFit">
  32. </image>
  33. <view class="change-option-text">点赞</view>
  34. <!-- 点赞 -->
  35. </view>
  36. <view v-if="cardId&&(userInfo.manageSaleNo!=cardInfo.jobNumber)" class="change" @click="jumpUrl('/card/cardFound/cardFound')">
  37. <image src="/card/static/images/change.png" style="width: 35rpx;height: 32rpx;" mode="aspectFit"></image>
  38. <view class="change-option-text">切换</view>
  39. <!-- 更换销售员-->
  40. </view>
  41. <view v-if="cardId&&(!userInfo.manageSaleNo)" style="background-color: #FF7229;" class="change" @click="bindSale()">
  42. <image style="width: 32rpx;height: 32rpx;" src="/card/static/images/bind.png" mode="aspectFit"></image>
  43. <view class="change-option-text">绑定</view>
  44. <!-- 绑定销售员-->
  45. </view>
  46. </view>
  47. </block>
  48. </view>
  49. <view class="info dflex">
  50. <view class="flex">
  51. <view class="name">
  52. {{ cardInfo.realName }}
  53. <text class="job" v-if="cardInfo.job">{{ cardInfo.jobName }}</text>
  54. <text class="job">入司{{cardInfo.inDate?monthDayDiff(cardInfo.inDate):'1年'}}</text>
  55. </view>
  56. <view class="company ddflex" style="margin-top: 20rpx;">
  57. <image src="/card/static/images/gs.png"></image>
  58. {{ cardInfo.companyName }}
  59. </view>
  60. <view class="company ddflex">
  61. <image src="/card/static/images/area.png"></image>
  62. 服务区域 {{ cardInfo.areaCodeName?cardInfo.areaCodeName:'湖南' }}
  63. </view>
  64. <view class="company">
  65. 执业证书:{{ cardInfo.professionalCertificateNo?cardInfo.professionalCertificateNo:'暂无'}}
  66. </view>
  67. <view class="ddflex" style="margin-top: 30rpx;">
  68. <view class="ddflex fflex" style="background: #F8F8F8;border-radius: 10rpx;padding: 20rpx;font-size: 26rpx;margin-right: 30rpx;">
  69. <image style="width: 32rpx;height: 32rpx;margin-right: 10rpx;" src="/card/static/images/phone.png"></image>
  70. {{cardInfo.phone?cardInfo.phone:'暂无手机号'}}
  71. </view>
  72. <view class="ddflex fflex" style="background: #F8F8F8;border-radius: 10rpx;padding: 20rpx;font-size: 26rpx;">
  73. <image style="width: 32rpx;height: 32rpx;margin-right: 10rpx;" src="/card/static/images/wx.png"></image>
  74. {{cardInfo.wechat?cardInfo.wechat:'暂无微信号'}}
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="btns ddflex" v-if="cardId">
  81. <view class="share-ta ddflex fflex" :style="!(cardInfo.wechat||cardInfo.wechatCode||cardInfo.wechatCompanyCode)?'background: #999':'background: linear-gradient(80deg, #7EBFF1 0%, #458EEE 100%);'"
  82. @click="cardInfo.wechat||cardInfo.wechatCode||cardInfo.wechatCompanyCode?showCodePop():''">
  83. <image src="../../static/pages/images/wx.png"></image>微信联系</view>
  84. <view class="share-ta ddflex fflex" :style="!cardInfo.phone?'background: #999':'background: linear-gradient(84deg, #6FE5BC 0%, #27D699 100%);'"
  85. @click="cardInfo.phone?goPhone():''">
  86. <image src="/card/static/images/phone1.png"></image>电话联系</view>
  87. <view class="share-ta ddflex fflex" style="background: linear-gradient(80deg, #FF985A 0%, #FF5700 100%);"
  88. @click="cardInfo.auditState!=1?'':jumpUrl('/card/poster/poster?id='+cardInfo.id)">
  89. <image src="/card/static/images/fx.png"></image>分享名片</view>
  90. </view>
  91. <view class="save-text ddflex" v-if="cardId" @click="saveToPhone()">
  92. <image src="/card/static/images/save.png"></image>保存到通讯录
  93. </view>
  94. <view class="btns ddflex" v-if="!cardId" style="justify-content: center;">
  95. <view class="share-ta ddflex" style="background: linear-gradient(84deg, #6FE5BC 0%, #27D699 100%);width: 260rpx;margin-right: 30rpx;"
  96. @click="cardInfo.auditState!=1?'':jumpUrl('/card/poster/poster?id='+cardInfo.id)">
  97. <image src="/card/static/images/wdmp.png"></image>我的名片码</view>
  98. <button :open-type="cardInfo.auditState!=1?'':'share'" class="share-ta ddflex" style="background: linear-gradient(80deg, #FF985A 0%, #FF5700 100%);width: 260rpx !important;"
  99. >
  100. <image src="/card/static/images/fx.png"></image>发送名片</button>
  101. </view>
  102. <view class="extend-info ddflex">
  103. <view class="extend-info-item fflex">
  104. <view class="extend-info-data">{{cardInfo.cntCust?cardInfo.cntCust:0}}</view>
  105. <view class="extend-info-label ddflex">
  106. <image src="../../static/pages/images/fw_hui.png"></image>
  107. <view>服务客户</view>
  108. </view>
  109. </view>
  110. <view class="extend-info-item fflex">
  111. <view class="extend-info-data">{{cardInfo.cntCntr?cardInfo.cntCntr:0}}</view>
  112. <view class="extend-info-label ddflex">
  113. <image src="/static/pages/images/cy_hui.png"></image>
  114. <view>保单件数</view>
  115. </view>
  116. </view>
  117. <view class="extend-info-item fflex">
  118. <view class="extend-info-data">{{cardInfo.thumbs?cardInfo.thumbs:0}}</view>
  119. <view class="extend-info-label ddflex">
  120. <image src="/static/pages/images/dz_hui.png"></image>
  121. <view>点赞量</view>
  122. </view>
  123. </view>
  124. </view>
  125. <view class="q-hud ddflex">
  126. <view class="q-hud-c ddflex">
  127. <view class="q-users ddflex">
  128. <image :src="item.avatar?item.avatar:'../../static/images/userimg.png'" mode="aspectFill" v-for="(item, index) in cardInfo.pageUser.list"
  129. v-if="index<3" :key="index"></image>
  130. </view>
  131. <view class="fflex">
  132. {{cardInfo.pageUser.total}}人看过
  133. </view>
  134. <!-- <image src="../static/images/q_rico.png" class="q-rico"></image> -->
  135. </view>
  136. <view class="q-hud-r ddflex">
  137. <view class="ddflex">
  138. <image style="width: 23rpx;height: 31rpx;margin-right: 10rpx;"
  139. src="/card/static/images/hot.png"></image>
  140. <text>{{cardInfo.share}}</text>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. <!-- 评分 -->
  146. <view class="pf-box">
  147. <view class="ddflex" style="justify-content: space-between;">
  148. <view class="pf-nav">客户评价</view>
  149. <view class="ddflex pf-more" @click="jumpUrl('/card/evaluateList/evaluateList?groupId='+cardInfo.id)" v-if="evaluateInfo.evaluateDTO">
  150. 全部评价
  151. <image style="width: 9rpx;height: 19rpx;margin-left: 10rpx;" src="/static/pages/images/more.png"></image>
  152. </view>
  153. </view>
  154. <view class="ddflex" style="justify-content: center;margin-top: 40rpx;">
  155. <view class="pf-number">
  156. {{evaluateInfo.info?evaluateInfo.info.avage:0}}<text style="font-size: 24rpx;color: #333333;font-weight: 400;margin-left: 10rpx;">分</text>
  157. </view>
  158. <uni-rate style="justify-content: center;margin-left: 30rpx;" class="ddflex" color="#999999" active-color="#FF4600" :readonly="true" size="18" allow-half :value="evaluateInfo.info.avage/2" />
  159. </view>
  160. <view class="pf-note">综合评分 {{evaluateInfo.info?evaluateInfo.info.total:0}}人评分</view>
  161. <view class="pf-data" v-if="evaluateInfo.evaluateDTO">
  162. <view class="pf-user ddflex">
  163. <view class="ddflex">
  164. <image class="pf-user-header" :src="evaluateInfo.evaluateDTO.avatar?evaluateInfo.evaluateDTO.avatar:'../../static/images/userimg.png'"></image>
  165. <view class="pf-user-name tover">{{evaluateInfo.evaluateDTO.name}}</view>
  166. <uni-rate style="justify-content: center;margin-left: 30rpx;" class="ddflex" color="#999999" active-color="#FF4600" :readonly="true" size="14" allow-half :value="evaluateInfo.evaluateDTO.serveScore/2" />
  167. <text style="font-size: 20rpx;color: #FF4600;">{{evaluateInfo.evaluateDTO.serveScore}}分</text>
  168. </view>
  169. <view class="pf-user-time">{{evaluateInfo.evaluateDTO.createDate}}</view>
  170. </view>
  171. <view class="pf-user-content">
  172. {{evaluateInfo.evaluateDTO.content}}
  173. </view>
  174. <view class="" style="margin-top: 20rpx;">
  175. <image :style="'width: 200rpx;height: 200rpx;margin-bottom: 10rpx;display: inline-block;'+((index+1)%3==0?'':'margin-right:10rpx')"
  176. v-for="item,index in evaluateInfo.evaluateDTO.evaluateImgUrls" :src="item" mode="aspectFit"
  177. @click="previewImg(evaluateInfo.evaluateDTO.evaluateImgUrls,index)"></image>
  178. </view>
  179. </view>
  180. <view class="pf-btn" v-if="cardId" @click="jumpUrl('/card/evaluate/evaluate?id='+cardInfo.id)">点击输入您的评价</view>
  181. </view>
  182. <view class="ddflex index-tab">
  183. <view :class="tabType==1?'index-tab-active':''" @click="tabChange(1)">个人主页</view>
  184. <view :class="tabType==2?'index-tab-active':''" @click="tabChange(2)">最新动态</view>
  185. </view>
  186. <block v-if="tabType==1">
  187. <!-- <view class="box brief" v-if="cardInfo.honorImg">
  188. <view class="tit ddflex">
  189. <view class="flex ddflex">
  190. <image src="/card/static/images/shry.png"></image>
  191. <view>所获荣誉</view>
  192. </view>
  193. </view>
  194. <view class="contacts" style="height: 300rpx;margin-top: 20rpx;">
  195. <scroll-view scroll-x="true" class="contact" style="height: 300rpx;">
  196. <view class=" ry-image" v-for="item,index in cardInfo.honorImg.split(',')" @click="previewImg(cardInfo.honorImg.split(','),index)">
  197. <image :src="item" mode="aspectFill"></image>
  198. </view>
  199. </scroll-view>
  200. </view>
  201. </view> -->
  202. <view class="box brief" v-if="cardInfo.styleImg">
  203. <view class="tit ddflex">
  204. <view class="flex ddflex">
  205. <image src="/card/static/images/grfc.png"></image>
  206. <view>个人风采</view>
  207. </view>
  208. </view>
  209. <view class="contacts" style="height: 300rpx;margin-top: 20rpx;">
  210. <scroll-view scroll-x="true" class="contact" style="height: 300rpx;">
  211. <view class=" ry-image" v-for="item,index in cardInfo.styleImg.split(',')" @click="previewImg(cardInfo.styleImg.split(','),index)">
  212. <image :src="item" mode="aspectFill"></image>
  213. </view>
  214. </scroll-view>
  215. </view>
  216. </view>
  217. <view class="box brief" v-if="cardInfo.honorText">
  218. <view class="tit ddflex">
  219. <view class="flex ddflex">
  220. <image src="/card/static/images/shry.png"></image>
  221. <view>所获荣誉</view>
  222. </view>
  223. <!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
  224. </view>
  225. <view class="bri"><rich-text :nodes="cardInfo.honorText ? cardInfo.honorText : ''"></rich-text></view>
  226. </view>
  227. <view class="box brief">
  228. <view class="tit ddflex">
  229. <view class="flex ddflex">
  230. <image src="/card/static/images/grjj.png"></image>
  231. <view>个人简介</view>
  232. </view>
  233. <!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
  234. </view>
  235. <view class="bri"><rich-text :nodes="cardInfo.brief ? cardInfo.brief : ''"></rich-text></view>
  236. </view>
  237. <view class="box brief">
  238. <view class="tit ddflex">
  239. <view class="flex ddflex">
  240. <image src="/card/static/images/gsjj.png"></image>
  241. <view>公司简介</view>
  242. </view>
  243. <!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
  244. </view>
  245. <view class="bri"><rich-text :nodes="config.CONFIG_ABOUT_COMPANY ? config.CONFIG_ABOUT_COMPANY : ''"></rich-text></view>
  246. </view>
  247. </block>
  248. <block v-if="tabType==2">
  249. <view class="list" v-if="pageList && pageList.length > 0">
  250. <view class="li" v-for="(item, index) in pageList" :key="index">
  251. <view class="user ddflex">
  252. <image :src="item.userDTO.avatar" mode="aspectFill" class="userimg" @click="toUserHomePage(item.userDTO.id)"></image>
  253. <view class="fflex">
  254. <view class="namea ddflex">
  255. <view class="name fflex ddflex" @click="toUserHomePage(item.userDTO.id)">
  256. {{ item.userDTO.nickName }}
  257. <image v-if="item.userDTO.levelGrade > 0" src="../../static/images/vip_tag.png" class="vip-tag"></image>
  258. </view>
  259. <view class="time">{{ item.time }}</view>
  260. </view>
  261. <view class="area" @click="toUserHomePage(item.userDTO.id)" v-if="item.userDTO.cityName">{{ item.userDTO.provinceName }} {{ item.userDTO.cityName }}</view>
  262. </view>
  263. </view>
  264. <!-- 分享的动态 -->
  265. <block v-if="item.source">
  266. <view class="link ddflex" @click="jumpUrlDetail(item)">
  267. <block v-if="item.url&&item.url.length>0"><image mode="aspectFill" v-if="idx == 0" v-for="(it, idx) in item.url" :src="it" :key="idx"></image></block>
  268. <view class="fflex tover"><rich-text :nodes="item.content"></rich-text></view>
  269. </view>
  270. </block>
  271. <!-- 非分享的动态 -->
  272. <block v-else>
  273. <view v-if="item.type == 2" class="des tovers" @click="jumpUrlDetail(item)">
  274. <view class="wen">提问</view>
  275. {{ removeHtml(item.content) }}
  276. </view>
  277. <view class="des" v-else @click="jumpUrlDetail(item)"><rich-text :nodes="item.content"></rich-text></view>
  278. <!-- //如果有投票,就不显示图片 -->
  279. <block v-if="!item.qyPoll">
  280. <view class="video" v-if="item.isHaveVideo && config.open_community_video == 1">
  281. <video :src="item.url" :show-center-play-btn="false" :controls="item.isControls" :autoplay="item.isControls" :id="'myVideo'+index" @pause="videoPause(index)" @ended="videoEnded(index)"></video>
  282. <view class="video-play ddflex" @click="videoPlay(index)" v-if="item.isShowPlayBtn"><image src="../../static/images/play.png"></image></view>
  283. </view>
  284. <view class="imgbox ddflex" @click="jumpUrlDetail(item)" v-if="!item.isHaveVideo"><!-- @click="previewImgss(item.url, idx)" -->
  285. <block v-if="item.url&&item.url.length>0">
  286. <image mode="aspectFill" v-for="(it, idx) in item.url" :src="it" :key="idx"></image>
  287. </block>
  288. </view>
  289. </block>
  290. <!-- 话题 -->
  291. <view class="ddflex" v-if="item.qyDialogu">
  292. <view class="topic ddflex" @click="jumpUrl('/topics/detail/detail?topicId=' + item.qyDialogu.id)">
  293. <image src="../../static/images/topic.png"></image>
  294. {{ item.qyDialogu.title }}
  295. </view>
  296. </view>
  297. <view class="loca ddflex" @click="jumpUrlPoi(item,'/office/poi/index')" v-if="item.poiName"><image :src="picUrlss+'office_images/loca.png'"></image><text v-if="item.poiDistance > 0">{{item.poiDistance ? item.poiDistance < 1000 ? item.poiDistance+'m' : (item.poiDistance/1000).toFixed(1)+'km' : ''}}</text>{{item.poiName}}</view>
  298. <!-- 投票 -->
  299. <view :class="'vote-box' + (item.qyPoll.isEnd ? ' ends' : '')" v-if="item.qyPoll">
  300. <view class="vote-tit">{{ item.qyPoll.title }}</view>
  301. <block v-if="item.qyPoll.isVote == 1">
  302. <view class="vote-list end" @click="jumpUrlDetail(item)">
  303. <view :class="'lis ddflex ' + (itpy.isVote == 1 ? 'active' : '')" v-for="(itpy, idex) in JSON.parse(item.qyPoll.optionJson)" :key="idex">
  304. <view class="percent" :style="'width:' + parseFloat(itpy.proportion) + '%;'"></view>
  305. <view class="fflex">{{ itpy.name }}</view>
  306. <view>{{ parseFloat(itpy.proportion) + '%' }}</view>
  307. </view>
  308. </view>
  309. </block>
  310. <block v-else>
  311. <view class="vote-list">
  312. <view class="lis" v-for="(itpy, idex) in JSON.parse(item.qyPoll.optionJson)" :key="idex" @click="submitPoll(item, index, idex)">
  313. {{ itpy.name }}
  314. </view>
  315. </view>
  316. </block>
  317. <view class="vote-can" v-if="item.qyPoll.isEnd"><text>{{item.qyPoll.voteCount}}人参与</text>投票已结束</view>
  318. </view>
  319. <block v-if="item.type==10||item.type==11">
  320. <view v-if="item.type==10" class="ddflex step-box" style="justify-content: space-between;" @click="jumpUrl('/exercise/record/record?userId=' + item.userId)">
  321. <view>
  322. <view class="step-date">{{item.wxRun.step}}</view>
  323. <view class="step-label">步数</view>
  324. </view>
  325. <view>
  326. <view class="step-date">{{item.wxRun.index}}</view>
  327. <view class="step-label" style="text-align: right;">名次</view>
  328. </view>
  329. </view>
  330. <view v-if="item.type==11" class="ddflex step-box" style="justify-content: space-between;" @click="jumpUrl('/match/activityDetail/activityDetail?id=' + item.matchContent.id)">
  331. <image class="step-pic" :src="item.matchContent.pic" mode="aspectFill"></image>
  332. <view class="fflex">
  333. <view class="step-title tovers">{{item.matchContent.title}}</view>
  334. <view class="ddflex" style="justify-content: space-between;margin-top: 10rpx;">
  335. <view class="step-price">{{item.matchContent.endTime}}</view>
  336. <view class="step-btn">查看</view>
  337. </view>
  338. </view>
  339. </view>
  340. </block>
  341. <view v-if="item.userGroupId" class="ddflex step-box" style="padding: 25rpx 21rpx;" @click="jumpUrl('/office/team/index?id=' + item.userGroupId)">
  342. <image style="width: 24rpx;height: 24rpx;margin-right: 13rpx;" src="../../static/images/link.png"></image>
  343. <view style="font-weight: 500;color: #999999;">Team:</view>
  344. <view>{{item.userGroupTitle}}</view>
  345. </view>
  346. <block v-else>
  347. <view class="product" v-if="item.products && item.products.length > 0">
  348. <view scroll-x="true" :class="'pro-view' + (item.products.length == 1 ? ' pro-view1' : '')">
  349. <view class="li" v-for="(it, idx) in item.products" :key="idx" @click="toProductDetail(it)">
  350. <view class="ddflex">
  351. <image :src="it.pic" mode="aspectFill" class="pro-pic"></image>
  352. <view class="fflex">
  353. <view class="title tovers">{{ it.title }}</view>
  354. <view class="opts ddflex">
  355. <view class="money">¥{{ it.salePrice }}</view>
  356. <view class="pro-btn">购买</view>
  357. </view>
  358. </view>
  359. </view>
  360. </view>
  361. </view>
  362. </view>
  363. </block>
  364. </block>
  365. <view class="opt ddflex" v-if="!item.source && type != 3">
  366. <view class="fflex" @click="jumpUrlDetail(item)">{{ item.count.browseCount }}次浏览</view>
  367. <view class="ddflex" @click="submitFabulous(2, item.id, index)">
  368. <image :src="'../../static/images/' + (item.isPraise == 1 ? 'like_h' : 'like') + '.png'"></image>
  369. {{ item.count.fabulousCount < 99 ? item.count.fabulousCount : '99+' }}
  370. </view>
  371. <view class="ddflex" @click="jumpUrlDetail(item)">
  372. <image src="../../static/images/comment.png"></image>
  373. {{ item.count.commentCount < 99 ? item.count.commentCount : '99+' }}
  374. </view>
  375. <!-- <button open-type="share" class="opt-share ddflex">
  376. <image src="../../static/images/share.png"></image>
  377. 分享
  378. </button> -->
  379. </view>
  380. </view>
  381. </view>
  382. <view class="nodata" v-else>
  383. <image :src="picUrlss + 'empty_jl.png'"></image>
  384. <text>{{ type == 1 ? '暂无动态' : type == 2 ? '暂无提问' : type == 3 ? '暂无日记' : '' }}</text>
  385. </view>
  386. </block>
  387. <view class="ceng2" v-if="isShowCodePop" @click="isShowCodePop = false" @touchmove.stop.prevent="moveHandle">
  388. </view>
  389. <view :class="'code-pop ' +(about.greyTheme==1?'grayTheme':'')" v-if="isShowCodePop">
  390. <view v-if="cardInfo.wechatCode||cardInfo.wechatCompanyCode" class="ddflex" style="justify-content: center;">
  391. <view class="code-content" v-if="cardInfo.wechatCode">
  392. <image :src="cardInfo.wechatCode?cardInfo.wechatCode:'/static/images/wxCode.jpg'" :style="cardInfo.wechatCompanyCode?'width: 200rpx;height: 200rpx;':''"
  393. show-menu-by-longpress="true"></image>
  394. <view style="text-align: center;font-size: 24rpx;color: #999;margin-bottom: 50rpx;">长按识别微信二维码</view>
  395. </view>
  396. <view class="code-content" v-if="cardInfo.wechatCompanyCode" :style="cardInfo.wechatCode?'margin-left:30rpx':''">
  397. <image :src="cardInfo.wechatCompanyCode?cardInfo.wechatCompanyCode:'/static/images/wxCode.jpg'" :style="cardInfo.wechatCode?'width: 200rpx;height: 200rpx;':''"
  398. show-menu-by-longpress="true"></image>
  399. <view style="text-align: center;font-size: 24rpx;color: #999;margin-bottom: 50rpx;">长按识别企微二维码</view>
  400. </view>
  401. </view>
  402. <view class="code-text" v-else>
  403. <view>微信号</view>
  404. <view>{{cardInfo.wechat}}</view>
  405. </view>
  406. <view class="code-btn" v-if="cardInfo.wechat" @click="copy(cardInfo.wechat,1)">
  407. 复制微信号
  408. </view>
  409. </view>
  410. <serviceContact :userId="cardInfo.userId" v-if="cardInfo.userId"></serviceContact>
  411. <!-- <to-userinfo v-if="isShowUpdate" @closeUpdate="()=>{isShowUpdate=false}"></to-userinfo> -->
  412. <update-userinfo :update-info="isUpdateInfo" :update-mobile="isUpdateMobile" :is-update="true" v-if="isShowUpdate" @closeUpdate="closeUpdate" @updateMobile="updateMobileInfo" @updateInfo="updateInfo"></update-userinfo>
  413. </view>
  414. </template>
  415. <script>
  416. const app = getApp();
  417. const req = require('../../utils/request.js');
  418. const api = require('../../utils/api.js');
  419. import VODUpload from '@/utils/aliyun-upload-sdk-1.0.1.min.js'
  420. import serviceContact from '@/components/service-contact/index.vue'
  421. import util from '../../utils/util.js';
  422. export default {
  423. data() {
  424. return {
  425. picUrlss: req.public.picUrls,
  426. systems: {},
  427. isTop: 0,
  428. options: {},
  429. scene: null,
  430. cardId: '',
  431. cardInfo: '',
  432. cardCount: '',
  433. zhiPicUrls: [],
  434. isFirst: true, //页面加载第一次调用
  435. uploader: '',
  436. isStart: false,
  437. videoInfo: '',
  438. fileName: '', //视频名称
  439. evaluateInfo:null,//评分
  440. tabType:1,
  441. loading:true,
  442. config: {},
  443. isLoad: true,
  444. form: {
  445. page: 1,
  446. limit: 10
  447. },
  448. pageList: [],
  449. userId: '',
  450. videoCurrent: null,
  451. videoContext: '',
  452. userInfo:'',
  453. isShowCodePop: false,
  454. pageBack:false,
  455. isShowUpdate: false, //是否显示更新信息弹窗
  456. isUpdateInfo: false, //更新用户信息
  457. isUpdateMobile: false, //绑定手机号
  458. };
  459. },
  460. components:{ serviceContact },
  461. onLoad(options) {
  462. this.options = options
  463. this.cardId = options.cardId;
  464. if(options.shareId) req.setStorage('shareId',options.shareId)
  465. if (options.scene)
  466. this.scene = options.scene
  467. uni.showLoading({
  468. title:'加载中'
  469. })
  470. let page = getCurrentPages()
  471. let pages = page[page.length-2]
  472. if(pages){
  473. this.pageBack = false
  474. }else{
  475. this.pageBack = true
  476. }
  477. },
  478. async onShow() {
  479. this.getConfig()
  480. if (this.scene) {
  481. this.cardId = this.scene.split('_')[0]
  482. if(this.scene.split('_')[1]){
  483. req.setStorage('shareId',this.scene.split('_')[1])
  484. }
  485. // await this.loadCodeParams();
  486. }
  487. await req.silenceLogin(this.options.userId ? this.options.userId : '', '')
  488. this.userInfo = req.getStorage('userInfo')
  489. this.getCardInfo();
  490. },
  491. onReachBottom() {
  492. this.form.page++;
  493. this.getOfficeList();
  494. },
  495. onShareAppMessage(res) {
  496. if (res.from == 'button') {
  497. let userInfo = req.getStorage('userInfo');
  498. this.userBehavior(6)
  499. req.saveBehaviorNew(this.cardInfo.id,1,6)
  500. return {
  501. title: this.cardInfo.realName,
  502. path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
  503. imageUrl: this.cardInfo.avatar, // 分享图
  504. };
  505. }else{
  506. let userInfo = req.getStorage('userInfo');
  507. this.userBehavior(6)
  508. req.saveBehaviorNew(this.cardInfo.id,1,6)
  509. return {
  510. title: this.cardInfo.realName,
  511. path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
  512. imageUrl: this.cardInfo.avatar, // 分享图
  513. };
  514. }
  515. },
  516. onShareTimeline(res) {
  517. if (res.from == 'button') {
  518. let userInfo = req.getStorage('userInfo');
  519. this.userBehavior(6)
  520. req.saveBehaviorNew(this.cardInfo.id,1,6)
  521. return {
  522. title: this.cardInfo.realName,
  523. path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
  524. imageUrl: this.cardInfo.avatar, // 分享图
  525. };
  526. }else{
  527. let userInfo = req.getStorage('userInfo');
  528. this.userBehavior(6)
  529. req.saveBehaviorNew(this.cardInfo.id,1,6)
  530. return {
  531. title: this.cardInfo.realName,
  532. path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
  533. imageUrl: this.cardInfo.avatar, // 分享图
  534. };
  535. }
  536. },
  537. methods: {
  538. toBack(){
  539. let page = getCurrentPages()
  540. let pages = page[page.length-2]
  541. if(pages){
  542. uni.navigateBack()
  543. }else{
  544. uni.switchTab({
  545. url:'/pages/index/index'
  546. })
  547. }
  548. },
  549. getConfig() {
  550. var _this = this;
  551. return new Promise((res, rej) => {
  552. req.g(
  553. '/api/other/config',
  554. data => {
  555. req.setStorage('configRes', JSON.stringify(data));
  556. this.config = data;
  557. res(data);
  558. },
  559. true
  560. );
  561. });
  562. },
  563. getImgList(url) {
  564. var list = [];
  565. if (url) {
  566. list = url.split(',');
  567. }
  568. return list;
  569. },
  570. jumpUrl(url) {
  571. uni.navigateTo({
  572. url: url
  573. });
  574. },
  575. getCardInfo() {
  576. var url = '';
  577. var dataP = {
  578. id:this.cardId
  579. };
  580. if (this.cardId) {
  581. url = '/api/visiting/card/info';
  582. dataP.id = this.cardId;
  583. } else {
  584. url = '/api/visiting/card/userInfo';
  585. dataP = {};
  586. }
  587. req.getRequest(url, dataP, data => {
  588. this.cardInfo = data;
  589. this.userId = this.cardInfo.userId
  590. if(this.pageList.length==0){
  591. this.getOfficeList();
  592. }
  593. console.log('isFirst')
  594. if (this.cardId && this.cardInfo.userId == req.getStorage('userInfo').id) {
  595. this.cardId = null
  596. this.getCardInfo()
  597. } else {
  598. if (this.cardInfo.userId == req.getStorage('userInfo').id) {
  599. } else {
  600. // 用户浏览
  601. if (this.isFirst) {
  602. this.userBehavior(4)
  603. req.saveBehaviorNew(this.cardInfo.id,1,4)
  604. }
  605. }
  606. this.isFirst = false
  607. uni.hideLoading()
  608. this.loading = false
  609. }
  610. this.getEvaluate()
  611. if(this.cardInfo.auditState!=1) {
  612. uni.hideShareMenu()
  613. }
  614. });
  615. },
  616. // 用户行为
  617. userBehavior(type) {
  618. var dataP = {};
  619. dataP.type =
  620. 23 //、产品 2、活动 3、未知 4、内容 5、课程 6、老师 7、素材 8、题目 9、资料领取 10、招聘职位 12、用户须知 13、素材 15、医院科室 16、海报 20、医生 21 新闻 23名片
  621. dataP.behavior = type; //1、关注 2、收藏 3、点赞 4、浏览 5、确认 6、分享
  622. dataP.bindId = this.cardInfo.id;
  623. req.postRequestLoding('/api/v3/behavior/save', dataP, data => {
  624. if (type == 3) {
  625. this.cardInfo.isThumbs = !this.cardInfo.isThumbs
  626. // 点赞行为统计
  627. if(this.cardInfo.isThumbs)
  628. req.saveBehaviorNew(this.cardInfo.id,1,3)
  629. //取消点赞 行为统计
  630. else req.saveBehaviorNew(this.cardInfo.id,1,11)
  631. }
  632. if (type == 1) {
  633. this.cardInfo.follow = !this.cardInfo.follow
  634. }
  635. });
  636. },
  637. // 存入名片夹
  638. saveToFolder() {
  639. let form = {
  640. visitingCardId: this.cardInfo.id,
  641. userId: req.getStorage('userInfo').id
  642. }
  643. req.postRequest('/api/v3/visiting/card/folder/saveOrUpdate', form, res => {
  644. req.msg('已存入名片夹')
  645. this.cardInfo.isSave = true
  646. })
  647. },
  648. // 存入通讯录
  649. saveToPhone() {
  650. console.log('saveToPhone')
  651. uni.addPhoneContact({
  652. nickName: this.cardInfo.realName,
  653. firstName: this.cardInfo.realName,
  654. mobilePhoneNumber: this.cardInfo.phone,
  655. success: (res) => {
  656. console.log(res)
  657. uni.showModal({
  658. title: '提示',
  659. content: '已存入通讯录,请前往手机通讯录查看',
  660. showCancel: false,
  661. })
  662. req.saveBehaviorNew(this.cardInfo.id,1,13)
  663. },
  664. fail: (err) => {
  665. console.log(err)
  666. req.msg('存入失败')
  667. }
  668. })
  669. },
  670. goPhone() {
  671. uni.makePhoneCall({
  672. phoneNumber: this.cardInfo.phone,
  673. success(res){
  674. req.saveBehaviorNew(this.cardInfo.id,1,17,this.cardInfo.phone)
  675. }
  676. }); // 传参带入号码即可
  677. },
  678. showCodePop(){
  679. this.isShowCodePop = true
  680. req.saveBehaviorNew(this.cardInfo.id,1,18,this.cardInfo.wechat?this.cardInfo.wechat:null)
  681. },
  682. copy(valueText, type) {
  683. let that = this
  684. uni.setClipboardData({
  685. data: valueText,
  686. success:(res)=> {
  687. if (type == 1) {
  688. that.isShowCodePop = false
  689. req.msg('微信号复制成功');
  690. } else if (type == 2) {
  691. req.msg('邮箱复制成功');
  692. }
  693. }
  694. });
  695. },
  696. getPlayInfo(videoId) {
  697. req.getRequest('/api/v3/vod/playInfo', {
  698. videoId: videoId
  699. }, data => {
  700. this.videoInfo = data
  701. })
  702. },
  703. createUploader() {
  704. let self = this;
  705. return new VODUpload({
  706. timeout: 60000,
  707. partSize: 1048576,
  708. parallel: 5,
  709. retryCount: 3,
  710. retryDuration: 2,
  711. region: this.regionId,
  712. userId: this.accountId,
  713. // 开始上传
  714. onUploadstarted: function(uploadInfo) {
  715. uni.showLoading({
  716. title: '视频上传中'
  717. })
  718. console.log('uploadInfo==', uploadInfo)
  719. if (!uploadInfo.videoId) {
  720. req.getRequest('/api/v3/vod/uploadAuth?fileName=' + self.fileName, {}, res => {
  721. var data = res;
  722. self.uploader.setUploadAuthAndAddress(uploadInfo, data.uploadAuth, data
  723. .uploadAddress, data.videoId)
  724. })
  725. self.isStart = true;
  726. } else {
  727. req.getRequest('/api/v3/vod/refreshUploadAuth?videoId=' + uploadInfo.videoId, {},
  728. res => {
  729. var data = res;
  730. self.uploader.setUploadAuthAndAddress(uploadInfo, data.uploadAuth, data
  731. .uploadAddress, data.videoId)
  732. })
  733. }
  734. },
  735. // 文件上传成功
  736. onUploadSucceed: function(uploadInfo) {
  737. // req.msg("视频上传成功");
  738. let dataP = {
  739. id: self.cardInfo.id,
  740. videoId: uploadInfo.videoId,
  741. videoInfo: JSON.stringify(uploadInfo)
  742. }
  743. req.postRequest('/api/v3/visiting/card/saveOrUpdate', dataP, res => {
  744. self.getPlayInfo(uploadInfo.videoId);
  745. setTimeout(() => {
  746. self.isStart = false;
  747. }, 1000);
  748. uni.hideLoading()
  749. })
  750. },
  751. // 文件上传失败
  752. onUploadFailed: function(uploadInfo, code, message) {
  753. req.msg("文件上传失败");
  754. },
  755. // 取消文件上传
  756. onUploadCanceled: function(uploadInfo, code, message) {
  757. req.msg("文件已暂停上传");
  758. },
  759. // 文件上传进度,单位:字节, 可以在这个函数中拿到上传进度并显示在页面上
  760. onUploadProgress: function(uploadInfo, totalSize, progress) {
  761. var progressPercent = Math.ceil(progress * 100);
  762. // self.$set(self.uploader, 'authProgress', progressPercent);
  763. },
  764. // 上传凭证超时
  765. onUploadTokenExpired: function(uploadInfo) {
  766. req.getRequest('/api/v3/vod/refreshUploadAuth?videoId=' + uploadInfo.videoId, {},
  767. res => {
  768. var data = res;
  769. self.uploader.resumeUploadWithAuth(data.uploadAuth)
  770. })
  771. }
  772. })
  773. },
  774. uploadVodChangeHandle: function(e) {
  775. let self = this;
  776. uni.chooseVideo({
  777. count: 1, //上传视频的个数
  778. mediaType: ['video'], //限制上传的类型为video
  779. sourceType: ['album', 'camera'], //视频选择来源
  780. maxDuration: 58, //拍摄限制时间
  781. camera: 'back', //采用后置摄像头
  782. success: function(res) {
  783. //获取临时存放的视频资源
  784. // let tempFilePath=res.tempFiles[0]
  785. console.log('视频文件==', res)
  786. var file = {
  787. url: res.tempFilePath,
  788. coverUrl: res.thumbTempFilePath
  789. };
  790. self.fileName = res.tempFilePath.substring(res.tempFilePath.lastIndexOf('/') + 1)
  791. // if (self.uploader) {
  792. // self.uploader.stopUpload();
  793. // self.authProgress = 0;
  794. // }
  795. var userData = '{"Vod":{}}';
  796. self.uploader = self.createUploader();
  797. self.uploader.addFile(file, null, null, null, userData);
  798. self.uploader.startUpload();
  799. },
  800. })
  801. },
  802. //预览图片
  803. previewImg(picUrls, index) {
  804. //预览合同图片
  805. var src = picUrls[index];
  806. let imgs = picUrls;
  807. uni.previewImage({
  808. current: src, // 当前显示图片的http链接
  809. urls: imgs
  810. });
  811. },
  812. cleanimages(index) {
  813. // 删除图片
  814. let arr = this.zhiPicUrls;
  815. arr.splice(index, 1);
  816. this.zhiPicUrls = arr;
  817. },
  818. /**
  819. * @param {Object} type 1图片 2、视频
  820. * @param {Object} url 资源地址
  821. */
  822. updateCard(type, url) {
  823. var dataP = {};
  824. dataP.id = this.cardInfo.id;
  825. if (type == 1) {
  826. dataP.pictures = url;
  827. } else if (type == 2) {
  828. dataP.video = url;
  829. } else if (type == 3) {
  830. dataP.imageMap = url;
  831. }
  832. req.postRequest(api.api_addressList_update, dataP, json => {
  833. if (type == 1) {
  834. this.cardInfo.pictures = url;
  835. } else if (type == 2) {
  836. this.cardInfo.video = url;
  837. } else if (type == 3) {
  838. this.cardInfo.imageMap = url;
  839. }
  840. });
  841. },
  842. monthDayDiff(date){
  843. return util.monthDayDiff(date)
  844. },
  845. // 获取评论
  846. getEvaluate(){
  847. req.getRequest('/api/evaluate/cardInfo',{bindId:this.cardInfo.id,type:2},res=>{
  848. this.evaluateInfo = res
  849. })
  850. },
  851. tabChange(type){
  852. if(type==this.tabType) return false
  853. this.tabType = type
  854. },
  855. getOfficeList() {
  856. let that = this;
  857. var pramData = this.form;
  858. // pramData.type = this.type;
  859. pramData.orderType = 2;
  860. pramData.userId = this.userId;
  861. if (!this.isLoad) return false;
  862. this.isLoad = false;
  863. req.getRequest('/api/v3/moments/page', pramData, data => {
  864. if(data.list&&data.list.length > 0){
  865. this.total = data.total
  866. data.list.map(it=>{
  867. if(it.qyPoll && it.qyPoll.isEnd){
  868. it.qyPoll.voteCount = that.sum(JSON.parse(it.qyPoll.optionJson))
  869. }
  870. if(it.url){
  871. let h = it.url.substring(it.url.lastIndexOf('.') + 1)
  872. if(h.indexOf('mp4')<0&&h.indexOf('MP4')<0){
  873. it.url = it.url.split(',');
  874. }else{
  875. it.isHaveVideo = true
  876. it.isControls = false
  877. it.isShowPlayBtn = true
  878. }
  879. }
  880. it.content = '<div style="overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 5;-webkit-box-orient: vertical;word-break: break-all;">' + it.content + '</div>'
  881. return it;
  882. })
  883. }
  884. if (data.list && data.list.length >= this.form.limit) {
  885. this.isLoad = true;
  886. }
  887. if (this.form.page > 1) {
  888. data.list = this.pageList.concat(data.list);
  889. }
  890. this.pageList = data.list;
  891. this.isShowView = true;
  892. });
  893. },
  894. sum(arr) {
  895. var s = 0;
  896. for (var i=arr.length-1; i>=0; i--) {
  897. if(arr[i].count){
  898. s += Number(arr[i].count);
  899. }
  900. }
  901. return s;
  902. },
  903. //提交点赞、取消点赞;收藏、取消收藏
  904. submitFabulous(type, id, index) {
  905. if (!req.isLogins(true)) {
  906. return;
  907. }
  908. var dataP = {};
  909. dataP.type = type; //1,观看 ,2点赞,3评论,4分享,5收藏
  910. dataP.momentsId = id;
  911. req.postRequestLoding('/api/v3/fabulous/save', dataP, data => {
  912. if (type == 2) {
  913. //动态点赞
  914. if (this.pageList[index].isPraise == 1) {
  915. //已赞
  916. this.pageList[index].isPraise = 0;
  917. this.pageList[index].count.fabulousCount--;
  918. req.saveBehaviorNew(id, this.pageList[index].pollId?10:11,11)
  919. } else {
  920. this.pageList[index].isPraise = 1;
  921. this.pageList[index].count.fabulousCount++;
  922. req.saveBehaviorNew(id, this.pageList[index].pollId?10:11,3)
  923. }
  924. }
  925. });
  926. },
  927. //提交投票
  928. submitPoll(item, pIndex, pollIndex) {
  929. if(item.qyPoll.isEnd) return false;
  930. var dataP = {};
  931. // dataP.id = item.id;
  932. dataP.pollId = item.qyPoll.id;
  933. var pollObjList = JSON.parse(item.qyPoll.optionJson);
  934. dataP.pollOptionCode = pollObjList[pollIndex].code;
  935. req.postRequest('/api/v3/poll/saveDetails', dataP, data => {
  936. req.msg('投票成功');
  937. //图片完之后要将该投票的对象返回,便于做渲染%
  938. this.pageList[pIndex].qyPoll = data;
  939. req.saveBehaviorNew(item.id,10,5)
  940. });
  941. },
  942. videoPlay(index){
  943. var that = this;
  944. var curIdx = index;
  945. this.pageList[index].isControls = true
  946. this.pageList[index].isShowPlayBtn = false
  947. // 有播放时先将prev暂停,再播放当前点击的current
  948. if (that.videoCurrent != null) {
  949. var videoContextPrev = uni.createVideoContext('myVideo' + that.videoCurrent)
  950. if (that.videoCurrent != curIdx) {
  951. this.pageList[that.videoCurrent].isControls = false
  952. this.pageList[that.videoCurrent].isShowPlayBtn = true
  953. videoContextPrev.stop()
  954. }
  955. that.videoCurrent = curIdx
  956. var videoContextCurrent = uni.createVideoContext('myVideo' + curIdx)
  957. videoContextCurrent.play()
  958. } else {
  959. // 没有播放时播放视频
  960. that.videoCurrent = curIdx
  961. var videoContext = uni.createVideoContext('myVideo' + curIdx) // 对应的视频id
  962. videoContext.play()
  963. }
  964. },
  965. videoPause(index){
  966. this.pageList[index].isControls = false
  967. this.pageList[index].isShowPlayBtn = true
  968. },
  969. videoEnded(index){
  970. this.pageList[index].isControls = false
  971. this.pageList[index].isShowPlayBtn = true
  972. },
  973. jumpUrlDetail(item) {
  974. this.jumpUrl('/office/detail/detail?contentId=' + item.id);
  975. },
  976. toUserHomePage(userId) {
  977. this.jumpUrl('/topics/home/home?userId=' + userId);
  978. },
  979. bindSale(){
  980. let userInfo = req.getStorage('userInfo');
  981. console.log('updateInfo userInfo.avatar',userInfo.avatar)
  982. if (!userInfo.avatar || userInfo.nickName == '微信用户') {
  983. this.isShowUpdate = true
  984. this.isUpdateInfo = true
  985. return false
  986. }
  987. if(userInfo.avatar&&!userInfo.mobile){
  988. this.isShowUpdate = true
  989. this.isUpdateMobile = true
  990. return false
  991. }
  992. uni.showModal({
  993. title:'提示',
  994. content:'是否绑定该顾问?',
  995. success: (con) => {
  996. if(con.confirm){
  997. req.postRequest('/api/visiting/card/bindManageSaleNo',{manageSaleNo:this.cardInfo.jobNumber},res=>{
  998. req.msg('已绑定专属顾问')
  999. let userInfo = req.getStorage('userInfo')
  1000. userInfo.manageSaleNo = this.cardInfo.jobNumber
  1001. req.setStorage('userInfo',userInfo)
  1002. this.userInfo = req.getStorage('userInfo')
  1003. })
  1004. }
  1005. }
  1006. })
  1007. },
  1008. showUpdate(){
  1009. this.isShowUpdate = true;
  1010. this.isUpdateInfo = true;
  1011. },
  1012. closeUpdate(){
  1013. this.isShowUpdate = false
  1014. this.isUpdateInfo = false;
  1015. },
  1016. updateInfo(e){
  1017. setTimeout(()=>{
  1018. this.bindSale()
  1019. },500)
  1020. },
  1021. updateMobileInfo(e){
  1022. setTimeout(()=>{
  1023. this.bindSale()
  1024. },500)
  1025. },
  1026. },
  1027. mounted() {
  1028. const systemInfo = uni.getSystemInfoSync();
  1029. // px转换到rpx的比例
  1030. let pxToRpxScale = 750 / systemInfo.windowWidth;
  1031. let systems = {
  1032. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  1033. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  1034. };
  1035. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  1036. this.systems = systems;
  1037. },
  1038. onPageScroll: function(e) {
  1039. if (e.scrollTop > this.systems.barHeight) {
  1040. this.isTop = 1;
  1041. } else {
  1042. this.isTop = 0;
  1043. }
  1044. }
  1045. };
  1046. </script>
  1047. <style>
  1048. @import './index.css';
  1049. </style>