| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079 |
- <template>
- <view style="padding-bottom: 30rpx;" v-if="!loading">
- <view class="top-fixed" :style="'height: '+ systems.barHeight + 'rpx;'">
- <view :class="'bgcolor' + (isTop == 1 ? ' opacity' : '')" :style="'height:' + systems.barHeight + 'rpx'">
- </view>
- <view class="top-fixed-c"
- :style="'height: '+ systems.navigationHeight + 'rpx;margin-top:' + systems.ktxStatusHeight + 'rpx;'">
- <navigator @click="toBack" hover-class="none" class="back ddflex"
- :style="'height: '+ systems.navigationHeight + 'rpx;'">
- <image v-if="!pageBack" src="/static/pages/images/back_black.png"></image>
- <image v-else src="/static/pages/images/back_home.png" style="width: 40rpx;height:40rpx"></image>
- </navigator>
- <view :class="'top-title tover' + (isTop == 1 ? ' top-black':'')"
- :style="'line-height: '+ systems.navigationHeight + 'rpx;'">名片</view>
- </view>
- </view>
- <view :style="'height: '+ systems.barHeight + 'rpx;'"></view>
- <view class="bg">
- <image src="/static/pages/images/userBg.png"></image>
- </view>
- <view class="infos">
- <view class="infos-border">
- <view class="photo">
- <block v-if="cardInfo.avatar">
- <image :src="cardInfo.avatar" mode="aspectFill" class="poster"></image>
- <view class="change-option ddflex">
- <view v-if="cardId" class="change" style="right: 140rpx;background-color:#27D699;"
- @click="userBehavior(3)">
- <image v-if="!cardInfo.isThumbs" style="width: 35rpx;height: 32rpx;"
- src="/card/static/images/dz1.png" mode="aspectFit"></image>
- <image v-else style="width: 35rpx;height:32rpx;" src="/card/static/images/dz1_h.png" mode="aspectFit">
- </image>
- <view class="change-option-text">点赞</view>
- <!-- 点赞 -->
- </view>
- <view v-if="cardId&&(userInfo.manageSaleNo!=cardInfo.jobNumber)" class="change" @click="jumpUrl('/card/cardFound/cardFound')">
- <image src="/card/static/images/change.png" style="width: 35rpx;height: 32rpx;" mode="aspectFit"></image>
- <view class="change-option-text">切换</view>
- <!-- 更换销售员-->
- </view>
- <view v-if="cardId&&(!userInfo.manageSaleNo)" style="background-color: #FF7229;" class="change" @click="bindSale()">
- <image style="width: 32rpx;height: 32rpx;" src="/card/static/images/bind.png" mode="aspectFit"></image>
- <view class="change-option-text">绑定</view>
- <!-- 绑定销售员-->
- </view>
- </view>
- </block>
- </view>
- <view class="info dflex">
- <view class="flex">
- <view class="name">
- {{ cardInfo.realName }}
- <text class="job" v-if="cardInfo.job">{{ cardInfo.jobName }}</text>
- <text class="job">入司{{cardInfo.inDate?monthDayDiff(cardInfo.inDate):'1年'}}</text>
- </view>
- <view class="company ddflex" style="margin-top: 20rpx;">
- <image src="/card/static/images/gs.png"></image>
- {{ cardInfo.companyName }}
- </view>
- <view class="company ddflex">
- <image src="/card/static/images/area.png"></image>
- 服务区域 {{ cardInfo.areaCodeName?cardInfo.areaCodeName:'湖南' }}
- </view>
- <view class="company">
- 执业证书:{{ cardInfo.professionalCertificateNo?cardInfo.professionalCertificateNo:'暂无'}}
- </view>
- <view class="ddflex" style="margin-top: 30rpx;">
- <view class="ddflex fflex" style="background: #F8F8F8;border-radius: 10rpx;padding: 20rpx;font-size: 26rpx;margin-right: 30rpx;">
- <image style="width: 32rpx;height: 32rpx;margin-right: 10rpx;" src="/card/static/images/phone.png"></image>
- {{cardInfo.phone?cardInfo.phone:'暂无手机号'}}
- </view>
- <view class="ddflex fflex" style="background: #F8F8F8;border-radius: 10rpx;padding: 20rpx;font-size: 26rpx;">
- <image style="width: 32rpx;height: 32rpx;margin-right: 10rpx;" src="/card/static/images/wx.png"></image>
- {{cardInfo.wechat?cardInfo.wechat:'暂无微信号'}}
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="btns ddflex" v-if="cardId">
- <view class="share-ta ddflex fflex" :style="!(cardInfo.wechat||cardInfo.wechatCode)?'background: #999':'background: linear-gradient(80deg, #7EBFF1 0%, #458EEE 100%);'"
- @click="cardInfo.wechat||cardInfo.wechatCode?showCodePop():''">
- <image src="../../static/pages/images/wx.png"></image>微信联系</view>
- <view class="share-ta ddflex fflex" :style="!cardInfo.phone?'background: #999':'background: linear-gradient(84deg, #6FE5BC 0%, #27D699 100%);'"
- @click="cardInfo.phone?goPhone():''">
- <image src="/card/static/images/phone1.png"></image>电话联系</view>
- <view class="share-ta ddflex fflex" style="background: linear-gradient(80deg, #FF985A 0%, #FF5700 100%);"
- @click="cardInfo.auditState!=1?'':jumpUrl('/card/poster/poster?id='+cardInfo.id)">
- <image src="/card/static/images/fx.png"></image>分享名片</view>
- </view>
- <view class="save-text ddflex" v-if="cardId" @click="saveToPhone()">
- <image src="/card/static/images/save.png"></image>保存到通讯录
- </view>
- <view class="btns ddflex" v-if="!cardId" style="justify-content: center;">
- <view class="share-ta ddflex" style="background: linear-gradient(84deg, #6FE5BC 0%, #27D699 100%);width: 260rpx;margin-right: 30rpx;"
- @click="cardInfo.auditState!=1?'':jumpUrl('/card/poster/poster?id='+cardInfo.id)">
- <image src="/card/static/images/wdmp.png"></image>我的名片码</view>
- <button :open-type="cardInfo.auditState!=1?'':'share'" class="share-ta ddflex" style="background: linear-gradient(80deg, #FF985A 0%, #FF5700 100%);width: 260rpx !important;"
- >
- <image src="/card/static/images/fx.png"></image>发送名片</button>
- </view>
- <view class="extend-info ddflex">
- <view class="extend-info-item fflex">
- <view class="extend-info-data">{{cardInfo.cntCust?cardInfo.cntCust:0}}</view>
- <view class="extend-info-label ddflex">
- <image src="../../static/pages/images/fw_hui.png"></image>
- <view>服务客户</view>
- </view>
- </view>
- <view class="extend-info-item fflex">
- <view class="extend-info-data">{{cardInfo.cntCntr?cardInfo.cntCntr:0}}</view>
- <view class="extend-info-label ddflex">
- <image src="/static/pages/images/cy_hui.png"></image>
- <view>保单件数</view>
- </view>
- </view>
- <view class="extend-info-item fflex">
- <view class="extend-info-data">{{cardInfo.thumbs?cardInfo.thumbs:0}}</view>
- <view class="extend-info-label ddflex">
- <image src="/static/pages/images/dz_hui.png"></image>
- <view>点赞量</view>
- </view>
- </view>
- </view>
- <view class="q-hud ddflex">
- <view class="q-hud-c ddflex">
- <view class="q-users ddflex">
- <image :src="item.avatar?item.avatar:'../../static/images/userimg.png'" mode="aspectFill" v-for="(item, index) in cardInfo.pageUser.list"
- v-if="index<3" :key="index"></image>
- </view>
- <view class="fflex">
- {{cardInfo.pageUser.total}}人看过
- </view>
- <!-- <image src="../static/images/q_rico.png" class="q-rico"></image> -->
- </view>
- <view class="q-hud-r ddflex">
- <view class="ddflex">
- <image style="width: 23rpx;height: 31rpx;margin-right: 10rpx;"
- src="/card/static/images/hot.png"></image>
- <text>{{cardInfo.share}}</text>
- </view>
- </view>
- </view>
- </view>
-
- <!-- 评分 -->
- <view class="pf-box">
- <view class="ddflex" style="justify-content: space-between;">
- <view class="pf-nav">客户评价</view>
- <view class="ddflex pf-more" @click="jumpUrl('/card/evaluateList/evaluateList?groupId='+cardInfo.id)" v-if="evaluateInfo.evaluateDTO">
- 全部评价
- <image style="width: 9rpx;height: 19rpx;margin-left: 10rpx;" src="/static/pages/images/more.png"></image>
- </view>
- </view>
- <view class="ddflex" style="justify-content: center;margin-top: 40rpx;">
- <view class="pf-number">
- {{evaluateInfo.info?evaluateInfo.info.avage:0}}<text style="font-size: 24rpx;color: #333333;font-weight: 400;margin-left: 10rpx;">分</text>
- </view>
- <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" />
- </view>
- <view class="pf-note">综合评分 {{evaluateInfo.info?evaluateInfo.info.total:0}}人评分</view>
- <view class="pf-data" v-if="evaluateInfo.evaluateDTO">
- <view class="pf-user ddflex">
- <view class="ddflex">
- <image class="pf-user-header" :src="evaluateInfo.evaluateDTO.avatar?evaluateInfo.evaluateDTO.avatar:'../../static/images/userimg.png'"></image>
- <view class="pf-user-name tover">{{evaluateInfo.evaluateDTO.name}}</view>
- <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" />
- <text style="font-size: 20rpx;color: #FF4600;">{{evaluateInfo.evaluateDTO.serveScore}}分</text>
- </view>
- <view class="pf-user-time">{{evaluateInfo.evaluateDTO.createDate}}</view>
- </view>
- <view class="pf-user-content">
- {{evaluateInfo.evaluateDTO.content}}
- </view>
- <view class="" style="margin-top: 20rpx;">
- <image :style="'width: 200rpx;height: 200rpx;margin-bottom: 10rpx;display: inline-block;'+((index+1)%3==0?'':'margin-right:10rpx')"
- v-for="item,index in evaluateInfo.evaluateDTO.evaluateImgUrls" :src="item" mode="aspectFit"
- @click="previewImg(evaluateInfo.evaluateDTO.evaluateImgUrls,index)"></image>
- </view>
- </view>
- <view class="pf-btn" v-if="cardId" @click="jumpUrl('/card/evaluate/evaluate?id='+cardInfo.id)">点击输入您的评价</view>
- </view>
-
- <view class="ddflex index-tab">
- <view :class="tabType==1?'index-tab-active':''" @click="tabChange(1)">个人主页</view>
- <view :class="tabType==2?'index-tab-active':''" @click="tabChange(2)">最新动态</view>
- </view>
-
- <block v-if="tabType==1">
- <view class="box brief" v-if="cardInfo.honorImg">
- <view class="tit ddflex">
- <view class="flex ddflex">
- <image src="/card/static/images/shry.png"></image>
- <view>所获荣誉</view>
- </view>
- </view>
- <view class="contacts" style="height: 300rpx;margin-top: 20rpx;">
- <scroll-view scroll-x="true" class="contact" style="height: 300rpx;">
- <view class=" ry-image" v-for="item,index in cardInfo.honorImg.split(',')" @click="previewImg(cardInfo.honorImg.split(','),index)">
- <image :src="item" mode="aspectFill"></image>
- </view>
- </scroll-view>
- </view>
- </view>
- <view class="box brief" v-if="cardInfo.styleImg">
- <view class="tit ddflex">
- <view class="flex ddflex">
- <image src="/card/static/images/grfc.png"></image>
- <view>个人风采</view>
- </view>
- </view>
- <view class="contacts" style="height: 300rpx;margin-top: 20rpx;">
- <scroll-view scroll-x="true" class="contact" style="height: 300rpx;">
- <view class=" ry-image" v-for="item,index in cardInfo.styleImg.split(',')" @click="previewImg(cardInfo.styleImg.split(','),index)">
- <image :src="item" mode="aspectFill"></image>
- </view>
- </scroll-view>
- </view>
- </view>
- <view class="box brief">
- <view class="tit ddflex">
- <view class="flex ddflex">
- <image src="/card/static/images/grjj.png"></image>
- <view>个人简介</view>
- </view>
- <!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
- </view>
- <view class="bri"><rich-text :nodes="cardInfo.brief ? cardInfo.brief : ''"></rich-text></view>
- </view>
- <view class="box brief">
- <view class="tit ddflex">
- <view class="flex ddflex">
- <image src="/card/static/images/gsjj.png"></image>
- <view>公司简介</view>
- </view>
- <!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
- </view>
- <view class="bri"><rich-text :nodes="config.CONFIG_ABOUT_COMPANY ? config.CONFIG_ABOUT_COMPANY : ''"></rich-text></view>
- </view>
- </block>
-
-
- <block v-if="tabType==2">
- <view class="list" v-if="pageList && pageList.length > 0">
- <view class="li" v-for="(item, index) in pageList" :key="index">
- <view class="user ddflex">
- <image :src="item.userDTO.avatar" mode="aspectFill" class="userimg" @click="toUserHomePage(item.userDTO.id)"></image>
- <view class="fflex">
- <view class="namea ddflex">
- <view class="name fflex ddflex" @click="toUserHomePage(item.userDTO.id)">
- {{ item.userDTO.nickName }}
- <image v-if="item.userDTO.levelGrade > 0" src="../../static/images/vip_tag.png" class="vip-tag"></image>
- </view>
- <view class="time">{{ item.time }}</view>
- </view>
- <view class="area" @click="toUserHomePage(item.userDTO.id)" v-if="item.userDTO.cityName">{{ item.userDTO.provinceName }} {{ item.userDTO.cityName }}</view>
- </view>
- </view>
- <!-- 分享的动态 -->
- <block v-if="item.source">
- <view class="link ddflex" @click="jumpUrlDetail(item)">
- <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>
- <view class="fflex tover"><rich-text :nodes="item.content"></rich-text></view>
- </view>
- </block>
- <!-- 非分享的动态 -->
- <block v-else>
- <view v-if="item.type == 2" class="des tovers" @click="jumpUrlDetail(item)">
- <view class="wen">提问</view>
- {{ removeHtml(item.content) }}
- </view>
- <view class="des" v-else @click="jumpUrlDetail(item)"><rich-text :nodes="item.content"></rich-text></view>
-
-
- <!-- //如果有投票,就不显示图片 -->
- <block v-if="!item.qyPoll">
- <view class="video" v-if="item.isHaveVideo && config.open_community_video == 1">
- <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>
- <view class="video-play ddflex" @click="videoPlay(index)" v-if="item.isShowPlayBtn"><image src="../../static/images/play.png"></image></view>
- </view>
- <view class="imgbox ddflex" @click="jumpUrlDetail(item)" v-if="!item.isHaveVideo"><!-- @click="previewImgss(item.url, idx)" -->
- <block v-if="item.url&&item.url.length>0">
- <image mode="aspectFill" v-for="(it, idx) in item.url" :src="it" :key="idx"></image>
- </block>
- </view>
- </block>
- <!-- 话题 -->
- <view class="ddflex" v-if="item.qyDialogu">
- <view class="topic ddflex" @click="jumpUrl('/topics/detail/detail?topicId=' + item.qyDialogu.id)">
- <image src="../../static/images/topic.png"></image>
- {{ item.qyDialogu.title }}
- </view>
- </view>
- <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>
- <!-- 投票 -->
- <view :class="'vote-box' + (item.qyPoll.isEnd ? ' ends' : '')" v-if="item.qyPoll">
- <view class="vote-tit">{{ item.qyPoll.title }}</view>
- <block v-if="item.qyPoll.isVote == 1">
- <view class="vote-list end" @click="jumpUrlDetail(item)">
- <view :class="'lis ddflex ' + (itpy.isVote == 1 ? 'active' : '')" v-for="(itpy, idex) in JSON.parse(item.qyPoll.optionJson)" :key="idex">
- <view class="percent" :style="'width:' + parseFloat(itpy.proportion) + '%;'"></view>
- <view class="fflex">{{ itpy.name }}</view>
- <view>{{ parseFloat(itpy.proportion) + '%' }}</view>
- </view>
- </view>
- </block>
- <block v-else>
- <view class="vote-list">
- <view class="lis" v-for="(itpy, idex) in JSON.parse(item.qyPoll.optionJson)" :key="idex" @click="submitPoll(item, index, idex)">
- {{ itpy.name }}
- </view>
- </view>
- </block>
- <view class="vote-can" v-if="item.qyPoll.isEnd"><text>{{item.qyPoll.voteCount}}人参与</text>投票已结束</view>
- </view>
- <block v-if="item.type==10||item.type==11">
- <view v-if="item.type==10" class="ddflex step-box" style="justify-content: space-between;" @click="jumpUrl('/exercise/record/record?userId=' + item.userId)">
- <view>
- <view class="step-date">{{item.wxRun.step}}</view>
- <view class="step-label">步数</view>
- </view>
- <view>
- <view class="step-date">{{item.wxRun.index}}</view>
- <view class="step-label" style="text-align: right;">名次</view>
- </view>
- </view>
- <view v-if="item.type==11" class="ddflex step-box" style="justify-content: space-between;" @click="jumpUrl('/match/activityDetail/activityDetail?id=' + item.matchContent.id)">
- <image class="step-pic" :src="item.matchContent.pic" mode="aspectFill"></image>
- <view class="fflex">
- <view class="step-title tovers">{{item.matchContent.title}}</view>
- <view class="ddflex" style="justify-content: space-between;margin-top: 10rpx;">
- <view class="step-price">{{item.matchContent.endTime}}</view>
- <view class="step-btn">查看</view>
- </view>
- </view>
- </view>
- </block>
- <view v-if="item.userGroupId" class="ddflex step-box" style="padding: 25rpx 21rpx;" @click="jumpUrl('/office/team/index?id=' + item.userGroupId)">
- <image style="width: 24rpx;height: 24rpx;margin-right: 13rpx;" src="../../static/images/link.png"></image>
- <view style="font-weight: 500;color: #999999;">Team:</view>
- <view>{{item.userGroupTitle}}</view>
- </view>
- <block v-else>
- <view class="product" v-if="item.products && item.products.length > 0">
- <view scroll-x="true" :class="'pro-view' + (item.products.length == 1 ? ' pro-view1' : '')">
- <view class="li" v-for="(it, idx) in item.products" :key="idx" @click="toProductDetail(it)">
- <view class="ddflex">
- <image :src="it.pic" mode="aspectFill" class="pro-pic"></image>
- <view class="fflex">
- <view class="title tovers">{{ it.title }}</view>
- <view class="opts ddflex">
- <view class="money">¥{{ it.salePrice }}</view>
- <view class="pro-btn">购买</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </block>
- </block>
- <view class="opt ddflex" v-if="!item.source && type != 3">
- <view class="fflex" @click="jumpUrlDetail(item)">{{ item.count.browseCount }}次浏览</view>
- <view class="ddflex" @click="submitFabulous(2, item.id, index)">
- <image :src="'../../static/images/' + (item.isPraise == 1 ? 'like_h' : 'like') + '.png'"></image>
- {{ item.count.fabulousCount < 99 ? item.count.fabulousCount : '99+' }}
- </view>
- <view class="ddflex" @click="jumpUrlDetail(item)">
- <image src="../../static/images/comment.png"></image>
- {{ item.count.commentCount < 99 ? item.count.commentCount : '99+' }}
- </view>
- <!-- <button open-type="share" class="opt-share ddflex">
- <image src="../../static/images/share.png"></image>
- 分享
- </button> -->
- </view>
- </view>
- </view>
- <view class="nodata" v-else>
- <image :src="picUrlss + 'empty_jl.png'"></image>
- <text>{{ type == 1 ? '暂无动态' : type == 2 ? '暂无提问' : type == 3 ? '暂无日记' : '' }}</text>
- </view>
- </block>
-
-
- <view class="ceng2" v-if="isShowCodePop" @click="isShowCodePop = false" @touchmove.stop.prevent="moveHandle">
- </view>
- <view :class="'code-pop ' +(about.greyTheme==1?'grayTheme':'')" v-if="isShowCodePop">
- <view class="code-content" v-if="cardInfo.wechatCode">
- <image :src="cardInfo.wechatCode?cardInfo.wechatCode:'/static/images/wxCode.jpg'"
- show-menu-by-longpress="true"></image>
- <view style="text-align: center;font-size: 24rpx;color: #999;margin-bottom: 50rpx;">长按识别微信二维码</view>
- </view>
- <view class="code-text" v-else>
- <view>微信号</view>
- <view>{{cardInfo.wechat}}</view>
- </view>
- <view class="code-btn" v-if="cardInfo.wechat" @click="copy(cardInfo.wechat,1)">
- 复制微信号
- </view>
- </view>
-
- <serviceContact :userId="cardInfo.userId" v-if="cardInfo.userId"></serviceContact>
-
- <!-- <to-userinfo v-if="isShowUpdate" @closeUpdate="()=>{isShowUpdate=false}"></to-userinfo> -->
- <update-userinfo :update-info="isUpdateInfo" :update-mobile="isUpdateMobile" :is-update="true" v-if="isShowUpdate" @closeUpdate="closeUpdate" @updateMobile="updateMobileInfo" @updateInfo="updateInfo"></update-userinfo>
-
- </view>
- </template>
- <script>
- const app = getApp();
- const req = require('../../utils/request.js');
- const api = require('../../utils/api.js');
- import VODUpload from '@/utils/aliyun-upload-sdk-1.0.1.min.js'
- import serviceContact from '@/components/service-contact/index.vue'
- import util from '../../utils/util.js';
- export default {
- data() {
- return {
- picUrlss: req.public.picUrls,
- systems: {},
- isTop: 0,
- options: {},
- scene: null,
- cardId: '',
- cardInfo: '',
- cardCount: '',
- zhiPicUrls: [],
- isFirst: true, //页面加载第一次调用
- uploader: '',
- isStart: false,
- videoInfo: '',
- fileName: '', //视频名称
-
- evaluateInfo:null,//评分
-
- tabType:1,
-
- loading:true,
-
- config: {},
- isLoad: true,
- form: {
- page: 1,
- limit: 10
- },
- pageList: [],
- userId: '',
- videoCurrent: null,
- videoContext: '',
-
- userInfo:'',
-
- isShowCodePop: false,
-
- pageBack:false,
-
-
- isShowUpdate: false, //是否显示更新信息弹窗
- isUpdateInfo: false, //更新用户信息
- isUpdateMobile: false, //绑定手机号
- };
- },
- components:{ serviceContact },
- onLoad(options) {
- this.options = options
- this.cardId = options.cardId;
- if(options.shareId) req.setStorage('shareId',options.shareId)
- if (options.scene)
- this.scene = options.scene
- uni.showLoading({
- title:'加载中'
- })
-
- let page = getCurrentPages()
- let pages = page[page.length-2]
- if(pages){
- this.pageBack = false
- }else{
- this.pageBack = true
- }
- },
- async onShow() {
- this.getConfig()
- if (this.scene) {
- this.cardId = this.scene.split('_')[0]
- if(this.scene.split('_')[1]){
- req.setStorage('shareId',this.scene.split('_')[1])
- }
- // await this.loadCodeParams();
- }
- await req.silenceLogin(this.options.userId ? this.options.userId : '', '')
- this.userInfo = req.getStorage('userInfo')
- this.getCardInfo();
- },
- onReachBottom() {
- this.form.page++;
- this.getOfficeList();
- },
- onShareAppMessage(res) {
- if (res.from == 'button') {
- let userInfo = req.getStorage('userInfo');
- this.userBehavior(6)
- req.saveBehaviorNew(this.cardInfo.id,1,6)
- return {
- title: this.cardInfo.realName,
- path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
- imageUrl: this.cardInfo.avatar, // 分享图
- };
- }else{
- let userInfo = req.getStorage('userInfo');
- this.userBehavior(6)
- req.saveBehaviorNew(this.cardInfo.id,1,6)
- return {
- title: this.cardInfo.realName,
- path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
- imageUrl: this.cardInfo.avatar, // 分享图
- };
- }
- },
- onShareTimeline(res) {
- if (res.from == 'button') {
- let userInfo = req.getStorage('userInfo');
- this.userBehavior(6)
- req.saveBehaviorNew(this.cardInfo.id,1,6)
- return {
- title: this.cardInfo.realName,
- path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
- imageUrl: this.cardInfo.avatar, // 分享图
- };
- }else{
- let userInfo = req.getStorage('userInfo');
- this.userBehavior(6)
- req.saveBehaviorNew(this.cardInfo.id,1,6)
- return {
- title: this.cardInfo.realName,
- path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
- imageUrl: this.cardInfo.avatar, // 分享图
- };
- }
- },
- methods: {
- toBack(){
- let page = getCurrentPages()
- let pages = page[page.length-2]
- if(pages){
- uni.navigateBack()
- }else{
- uni.switchTab({
- url:'/pages/index/index'
- })
- }
- },
- getConfig() {
- var _this = this;
- return new Promise((res, rej) => {
- req.g(
- '/api/other/config',
- data => {
- req.setStorage('configRes', JSON.stringify(data));
- this.config = data;
- res(data);
- },
- true
- );
- });
- },
- getImgList(url) {
- var list = [];
- if (url) {
- list = url.split(',');
- }
- return list;
- },
- jumpUrl(url) {
- uni.navigateTo({
- url: url
- });
- },
- getCardInfo() {
- var url = '';
- var dataP = {
- id:this.cardId
- };
- if (this.cardId) {
- url = '/api/visiting/card/info';
- dataP.id = this.cardId;
- } else {
- url = '/api/visiting/card/userInfo';
- dataP = {};
- }
- req.getRequest(url, dataP, data => {
- this.cardInfo = data;
- this.userId = this.cardInfo.userId
- if(this.pageList.length==0){
- this.getOfficeList();
- }
- console.log('isFirst')
- if (this.cardId && this.cardInfo.userId == req.getStorage('userInfo').id) {
- this.cardId = null
- this.getCardInfo()
- } else {
- if (this.cardInfo.userId == req.getStorage('userInfo').id) {
- } else {
- // 用户浏览
- if (this.isFirst) {
- this.userBehavior(4)
- req.saveBehaviorNew(this.cardInfo.id,1,4)
- }
- }
- this.isFirst = false
- uni.hideLoading()
- this.loading = false
- }
- this.getEvaluate()
- if(this.cardInfo.auditState!=1) {
- uni.hideShareMenu()
- }
- });
- },
- // 用户行为
- userBehavior(type) {
- var dataP = {};
- dataP.type =
- 23 //、产品 2、活动 3、未知 4、内容 5、课程 6、老师 7、素材 8、题目 9、资料领取 10、招聘职位 12、用户须知 13、素材 15、医院科室 16、海报 20、医生 21 新闻 23名片
- dataP.behavior = type; //1、关注 2、收藏 3、点赞 4、浏览 5、确认 6、分享
- dataP.bindId = this.cardInfo.id;
- req.postRequestLoding('/api/v3/behavior/save', dataP, data => {
- if (type == 3) {
- this.cardInfo.isThumbs = !this.cardInfo.isThumbs
- // 点赞行为统计
- if(this.cardInfo.isThumbs)
- req.saveBehaviorNew(this.cardInfo.id,1,3)
- //取消点赞 行为统计
- else req.saveBehaviorNew(this.cardInfo.id,1,11)
- }
- if (type == 1) {
- this.cardInfo.follow = !this.cardInfo.follow
- }
- });
- },
- // 存入名片夹
- saveToFolder() {
- let form = {
- visitingCardId: this.cardInfo.id,
- userId: req.getStorage('userInfo').id
- }
- req.postRequest('/api/v3/visiting/card/folder/saveOrUpdate', form, res => {
- req.msg('已存入名片夹')
- this.cardInfo.isSave = true
- })
- },
- // 存入通讯录
- saveToPhone() {
- console.log('saveToPhone')
- uni.addPhoneContact({
- nickName: this.cardInfo.realName,
- firstName: this.cardInfo.realName,
- mobilePhoneNumber: this.cardInfo.phone,
- success: (res) => {
- console.log(res)
- uni.showModal({
- title: '提示',
- content: '已存入通讯录,请前往手机通讯录查看',
- showCancel: false,
- })
- req.saveBehaviorNew(this.cardInfo.id,1,13)
- },
- fail: (err) => {
- console.log(err)
- req.msg('存入失败')
- }
- })
- },
- goPhone() {
- uni.makePhoneCall({
- phoneNumber: this.cardInfo.phone,
- success(res){
- req.saveBehaviorNew(this.cardInfo.id,1,17,this.cardInfo.phone)
- }
- }); // 传参带入号码即可
- },
-
- showCodePop(){
- this.isShowCodePop = true
- req.saveBehaviorNew(this.cardInfo.id,1,18,this.cardInfo.wechat?this.cardInfo.wechat:null)
- },
- copy(valueText, type) {
- let that = this
- uni.setClipboardData({
- data: valueText,
- success:(res)=> {
- if (type == 1) {
- that.isShowCodePop = false
- req.msg('微信号复制成功');
- } else if (type == 2) {
- req.msg('邮箱复制成功');
- }
- }
- });
- },
- getPlayInfo(videoId) {
- req.getRequest('/api/v3/vod/playInfo', {
- videoId: videoId
- }, data => {
- this.videoInfo = data
- })
- },
- createUploader() {
- let self = this;
- return new VODUpload({
- timeout: 60000,
- partSize: 1048576,
- parallel: 5,
- retryCount: 3,
- retryDuration: 2,
- region: this.regionId,
- userId: this.accountId,
- // 开始上传
- onUploadstarted: function(uploadInfo) {
- uni.showLoading({
- title: '视频上传中'
- })
- console.log('uploadInfo==', uploadInfo)
- if (!uploadInfo.videoId) {
- req.getRequest('/api/v3/vod/uploadAuth?fileName=' + self.fileName, {}, res => {
- var data = res;
- self.uploader.setUploadAuthAndAddress(uploadInfo, data.uploadAuth, data
- .uploadAddress, data.videoId)
- })
- self.isStart = true;
- } else {
- req.getRequest('/api/v3/vod/refreshUploadAuth?videoId=' + uploadInfo.videoId, {},
- res => {
- var data = res;
- self.uploader.setUploadAuthAndAddress(uploadInfo, data.uploadAuth, data
- .uploadAddress, data.videoId)
- })
- }
- },
- // 文件上传成功
- onUploadSucceed: function(uploadInfo) {
- // req.msg("视频上传成功");
- let dataP = {
- id: self.cardInfo.id,
- videoId: uploadInfo.videoId,
- videoInfo: JSON.stringify(uploadInfo)
- }
- req.postRequest('/api/v3/visiting/card/saveOrUpdate', dataP, res => {
- self.getPlayInfo(uploadInfo.videoId);
- setTimeout(() => {
- self.isStart = false;
- }, 1000);
- uni.hideLoading()
- })
- },
- // 文件上传失败
- onUploadFailed: function(uploadInfo, code, message) {
- req.msg("文件上传失败");
- },
- // 取消文件上传
- onUploadCanceled: function(uploadInfo, code, message) {
- req.msg("文件已暂停上传");
- },
- // 文件上传进度,单位:字节, 可以在这个函数中拿到上传进度并显示在页面上
- onUploadProgress: function(uploadInfo, totalSize, progress) {
- var progressPercent = Math.ceil(progress * 100);
- // self.$set(self.uploader, 'authProgress', progressPercent);
- },
- // 上传凭证超时
- onUploadTokenExpired: function(uploadInfo) {
- req.getRequest('/api/v3/vod/refreshUploadAuth?videoId=' + uploadInfo.videoId, {},
- res => {
- var data = res;
- self.uploader.resumeUploadWithAuth(data.uploadAuth)
- })
- }
- })
- },
- uploadVodChangeHandle: function(e) {
- let self = this;
- uni.chooseVideo({
- count: 1, //上传视频的个数
- mediaType: ['video'], //限制上传的类型为video
- sourceType: ['album', 'camera'], //视频选择来源
- maxDuration: 58, //拍摄限制时间
- camera: 'back', //采用后置摄像头
- success: function(res) {
- //获取临时存放的视频资源
- // let tempFilePath=res.tempFiles[0]
- console.log('视频文件==', res)
- var file = {
- url: res.tempFilePath,
- coverUrl: res.thumbTempFilePath
- };
- self.fileName = res.tempFilePath.substring(res.tempFilePath.lastIndexOf('/') + 1)
- // if (self.uploader) {
- // self.uploader.stopUpload();
- // self.authProgress = 0;
- // }
- var userData = '{"Vod":{}}';
- self.uploader = self.createUploader();
- self.uploader.addFile(file, null, null, null, userData);
- self.uploader.startUpload();
- },
- })
- },
-
- //预览图片
- previewImg(picUrls, index) {
- //预览合同图片
- var src = picUrls[index];
- let imgs = picUrls;
- uni.previewImage({
- current: src, // 当前显示图片的http链接
- urls: imgs
- });
- },
- cleanimages(index) {
- // 删除图片
- let arr = this.zhiPicUrls;
- arr.splice(index, 1);
- this.zhiPicUrls = arr;
- },
- /**
- * @param {Object} type 1图片 2、视频
- * @param {Object} url 资源地址
- */
- updateCard(type, url) {
- var dataP = {};
- dataP.id = this.cardInfo.id;
- if (type == 1) {
- dataP.pictures = url;
- } else if (type == 2) {
- dataP.video = url;
- } else if (type == 3) {
- dataP.imageMap = url;
- }
- req.postRequest(api.api_addressList_update, dataP, json => {
- if (type == 1) {
- this.cardInfo.pictures = url;
- } else if (type == 2) {
- this.cardInfo.video = url;
- } else if (type == 3) {
- this.cardInfo.imageMap = url;
- }
- });
- },
- monthDayDiff(date){
- return util.monthDayDiff(date)
- },
-
- // 获取评论
- getEvaluate(){
- req.getRequest('/api/evaluate/cardInfo',{bindId:this.cardInfo.id,type:2},res=>{
- this.evaluateInfo = res
- })
- },
-
- tabChange(type){
- if(type==this.tabType) return false
- this.tabType = type
- },
-
- getOfficeList() {
- let that = this;
- var pramData = this.form;
- // pramData.type = this.type;
- pramData.orderType = 2;
- pramData.userId = this.userId;
- if (!this.isLoad) return false;
- this.isLoad = false;
- req.getRequest('/api/v3/moments/page', pramData, data => {
- if(data.list&&data.list.length > 0){
- this.total = data.total
- data.list.map(it=>{
- if(it.qyPoll && it.qyPoll.isEnd){
- it.qyPoll.voteCount = that.sum(JSON.parse(it.qyPoll.optionJson))
- }
- if(it.url){
- let h = it.url.substring(it.url.lastIndexOf('.') + 1)
- if(h.indexOf('mp4')<0&&h.indexOf('MP4')<0){
- it.url = it.url.split(',');
- }else{
- it.isHaveVideo = true
- it.isControls = false
- it.isShowPlayBtn = true
- }
- }
- 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>'
- return it;
- })
- }
- if (data.list && data.list.length >= this.form.limit) {
- this.isLoad = true;
- }
- if (this.form.page > 1) {
- data.list = this.pageList.concat(data.list);
- }
- this.pageList = data.list;
- this.isShowView = true;
- });
- },
- sum(arr) {
- var s = 0;
- for (var i=arr.length-1; i>=0; i--) {
- if(arr[i].count){
- s += Number(arr[i].count);
- }
- }
- return s;
- },
- //提交点赞、取消点赞;收藏、取消收藏
- submitFabulous(type, id, index) {
- if (!req.isLogins(true)) {
- return;
- }
- var dataP = {};
- dataP.type = type; //1,观看 ,2点赞,3评论,4分享,5收藏
- dataP.momentsId = id;
- req.postRequestLoding('/api/v3/fabulous/save', dataP, data => {
- if (type == 2) {
- //动态点赞
- if (this.pageList[index].isPraise == 1) {
- //已赞
- this.pageList[index].isPraise = 0;
- this.pageList[index].count.fabulousCount--;
- req.saveBehaviorNew(id, this.pageList[index].pollId?10:11,11)
- } else {
- this.pageList[index].isPraise = 1;
- this.pageList[index].count.fabulousCount++;
- req.saveBehaviorNew(id, this.pageList[index].pollId?10:11,3)
- }
- }
- });
- },
-
- //提交投票
- submitPoll(item, pIndex, pollIndex) {
- if(item.qyPoll.isEnd) return false;
- var dataP = {};
- // dataP.id = item.id;
- dataP.pollId = item.qyPoll.id;
- var pollObjList = JSON.parse(item.qyPoll.optionJson);
- dataP.pollOptionCode = pollObjList[pollIndex].code;
- req.postRequest('/api/v3/poll/saveDetails', dataP, data => {
- req.msg('投票成功');
- //图片完之后要将该投票的对象返回,便于做渲染%
- this.pageList[pIndex].qyPoll = data;
- req.saveBehaviorNew(item.id,10,5)
- });
- },
- videoPlay(index){
- var that = this;
- var curIdx = index;
- this.pageList[index].isControls = true
- this.pageList[index].isShowPlayBtn = false
- // 有播放时先将prev暂停,再播放当前点击的current
- if (that.videoCurrent != null) {
- var videoContextPrev = uni.createVideoContext('myVideo' + that.videoCurrent)
- if (that.videoCurrent != curIdx) {
- this.pageList[that.videoCurrent].isControls = false
- this.pageList[that.videoCurrent].isShowPlayBtn = true
-
- videoContextPrev.stop()
- }
- that.videoCurrent = curIdx
- var videoContextCurrent = uni.createVideoContext('myVideo' + curIdx)
- videoContextCurrent.play()
- } else {
- // 没有播放时播放视频
- that.videoCurrent = curIdx
- var videoContext = uni.createVideoContext('myVideo' + curIdx) // 对应的视频id
- videoContext.play()
- }
- },
- videoPause(index){
- this.pageList[index].isControls = false
- this.pageList[index].isShowPlayBtn = true
- },
- videoEnded(index){
- this.pageList[index].isControls = false
- this.pageList[index].isShowPlayBtn = true
- },
- jumpUrlDetail(item) {
- this.jumpUrl('/office/detail/detail?contentId=' + item.id);
- },
- toUserHomePage(userId) {
- this.jumpUrl('/topics/home/home?userId=' + userId);
- },
-
- bindSale(){
- let userInfo = req.getStorage('userInfo');
- console.log('updateInfo userInfo.avatar',userInfo.avatar)
- if (!userInfo.avatar || userInfo.nickName == '微信用户') {
- this.isShowUpdate = true
- this.isUpdateInfo = true
- return false
- }
- if(userInfo.avatar&&!userInfo.mobile){
- this.isShowUpdate = true
- this.isUpdateMobile = true
- return false
- }
- uni.showModal({
- title:'提示',
- content:'是否绑定该顾问?',
- success: (con) => {
- if(con.confirm){
- req.postRequest('/api/visiting/card/bindManageSaleNo',{manageSaleNo:this.cardInfo.jobNumber},res=>{
- req.msg('已绑定专属顾问')
- let userInfo = req.getStorage('userInfo')
- userInfo.manageSaleNo = this.cardInfo.jobNumber
- req.setStorage('userInfo',userInfo)
- this.userInfo = req.getStorage('userInfo')
- })
- }
- }
- })
- },
- showUpdate(){
- this.isShowUpdate = true;
- this.isUpdateInfo = true;
- },
- closeUpdate(){
- this.isShowUpdate = false
- this.isUpdateInfo = false;
- },
- updateInfo(e){
- setTimeout(()=>{
- this.bindSale()
- },500)
- },
- updateMobileInfo(e){
- setTimeout(()=>{
- this.bindSale()
- },500)
- },
- },
- mounted() {
- const systemInfo = uni.getSystemInfoSync();
- // px转换到rpx的比例
- let pxToRpxScale = 750 / systemInfo.windowWidth;
- let systems = {
- ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
- navigationHeight: 44 * pxToRpxScale // 导航栏的高度
- };
- systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
- this.systems = systems;
- },
- onPageScroll: function(e) {
- if (e.scrollTop > this.systems.barHeight) {
- this.isTop = 1;
- } else {
- this.isTop = 0;
- }
- }
- };
- </script>
- <style>
- @import './index.css';
- </style>
|