|
|
@@ -78,8 +78,8 @@
|
|
|
@click="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">
|
|
|
- <image src="/card/static/images/save.png" @click="saveToPhone()"></image>保存到通讯录
|
|
|
+ <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;"
|
|
|
@@ -144,12 +144,12 @@
|
|
|
</view>
|
|
|
<view class="ddflex" style="justify-content: center;margin-top: 40rpx;">
|
|
|
<view class="pf-number">
|
|
|
- {{evaluateInfo.info.avage}}<text style="font-size: 24rpx;color: #333333;font-weight: 400;margin-left: 10rpx;">分</text>
|
|
|
+ {{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.total}}人评分</view>
|
|
|
- <view class="pf-data">
|
|
|
+ <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>
|
|
|
@@ -171,74 +171,206 @@
|
|
|
<view class="pf-btn" v-if="cardId" @click="jumpUrl('/card/evaluate/evaluate?id='+cardInfo.id)">点击输入您的评价</view>
|
|
|
</view>
|
|
|
|
|
|
- <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 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="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 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>
|
|
|
- </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 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 in cardInfo.styleImg.split(',')" @click="previewImg(cardInfo.styleImg.split(','),index)">
|
|
|
+ <image :src="item" mode="aspectFill"></image>
|
|
|
+ </view>
|
|
|
+ </scroll-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 in cardInfo.styleImg.split(',')" @click="previewImg(cardInfo.styleImg.split(','),index)">
|
|
|
- <image :src="item" mode="aspectFill"></image>
|
|
|
+ <view class="box brief">
|
|
|
+ <view class="tit ddflex">
|
|
|
+ <view class="flex ddflex">
|
|
|
+ <image src="/card/static/images/grjj.png"></image>
|
|
|
+ <view>个人简介</view>
|
|
|
</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>
|
|
|
+ <!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
|
|
|
</view>
|
|
|
- <!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
|
|
|
+ <view class="bri"><rich-text :nodes="cardInfo.brief ? cardInfo.brief : ''"></rich-text></view>
|
|
|
</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 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>
|
|
|
- <!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
|
|
|
+ <view class="bri"><rich-text :nodes="cardInfo.companyIntroduction ? cardInfo.companyIntroduction : ''"></rich-text></view>
|
|
|
</view>
|
|
|
- <view class="bri"><rich-text :nodes="cardInfo.companyIntroduction ? cardInfo.companyIntroduction : ''"></rich-text></view>
|
|
|
- </view>
|
|
|
- <!-- <view class="box videos">
|
|
|
- <view class="tit ddflex">
|
|
|
- <view class="flex ddflex">
|
|
|
- <image src="../static/images/sp_ico.png"></image>
|
|
|
- <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 + '?x-oss-process=style/w375'" 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>
|
|
|
- <image v-if="cardInfo.videoId && !cardId" @click="uploadVodChangeHandle()"
|
|
|
- src="../static/images/bj_ico.png" class="edit"></image>
|
|
|
</view>
|
|
|
- <view class="video">
|
|
|
- <video v-if="cardInfo.videoId" controls="true" class="video-sp" :src="videoInfo.playUrl"></video>
|
|
|
- <view v-else class="not" @click="uploadVodChangeHandle()">
|
|
|
- <image src="../static/images/add_ico1.png"></image>
|
|
|
- <view>点击添加个人介绍视频</view>
|
|
|
- </view>
|
|
|
+ <view class="nodata" v-else>
|
|
|
+ <image :src="picUrlss + 'empty_jl.png'"></image>
|
|
|
+ <text>{{ type == 1 ? '暂无动态' : type == 2 ? '暂无提问' : type == 3 ? '暂无日记' : '' }}</text>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="also" v-if="cardId" @click="jumpUrl('/card/create/create')">我也要创建电子名片</view> -->
|
|
|
+ </block>
|
|
|
|
|
|
<serviceContact></serviceContact>
|
|
|
</view>
|
|
|
@@ -253,6 +385,7 @@ import util from '../../utils/util.js';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ picUrlss: req.public.picUrls,
|
|
|
systems: {},
|
|
|
isTop: 0,
|
|
|
options: {},
|
|
|
@@ -271,7 +404,20 @@ import util from '../../utils/util.js';
|
|
|
|
|
|
evaluateInfo:null,//评分
|
|
|
|
|
|
- loading:true
|
|
|
+ tabType:1,
|
|
|
+
|
|
|
+ loading:true,
|
|
|
+
|
|
|
+ config: {},
|
|
|
+ isLoad: true,
|
|
|
+ form: {
|
|
|
+ page: 1,
|
|
|
+ limit: 10
|
|
|
+ },
|
|
|
+ pageList: [],
|
|
|
+ userId: '',
|
|
|
+ videoCurrent: null,
|
|
|
+ videoContext: '',
|
|
|
};
|
|
|
},
|
|
|
components:{ serviceContact },
|
|
|
@@ -286,13 +432,17 @@ import util from '../../utils/util.js';
|
|
|
},
|
|
|
|
|
|
async onShow() {
|
|
|
+ this.getConfig()
|
|
|
if (this.scene) {
|
|
|
await this.loadCodeParams();
|
|
|
}
|
|
|
await req.silenceLogin(this.options.userId ? this.options.userId : '', '')
|
|
|
this.getCardInfo();
|
|
|
},
|
|
|
-
|
|
|
+ onReachBottom() {
|
|
|
+ this.form.page++;
|
|
|
+ this.getOfficeList();
|
|
|
+ },
|
|
|
onShareAppMessage(res) {
|
|
|
if (res.from == 'button') {
|
|
|
let userInfo = req.getStorage('userInfo');
|
|
|
@@ -318,7 +468,20 @@ import util from '../../utils/util.js';
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
-
|
|
|
+ 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
|
|
|
+ );
|
|
|
+ });
|
|
|
+ },
|
|
|
loadCodeParams() {
|
|
|
let _ts = this;
|
|
|
return new Promise((resolve, reject) => {
|
|
|
@@ -366,6 +529,10 @@ import util from '../../utils/util.js';
|
|
|
}
|
|
|
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
|
|
|
@@ -417,22 +584,21 @@ import util from '../../utils/util.js';
|
|
|
},
|
|
|
// 存入通讯录
|
|
|
saveToPhone() {
|
|
|
+ console.log('saveToPhone')
|
|
|
uni.addPhoneContact({
|
|
|
nickName: this.cardInfo.realName,
|
|
|
firstName: this.cardInfo.realName,
|
|
|
mobilePhoneNumber: this.cardInfo.phone,
|
|
|
success: (res) => {
|
|
|
- this.$showModal({
|
|
|
- title: '提示',
|
|
|
- content: '已存入通讯录,请前往手机通讯录查看',
|
|
|
- showCancel: false,
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
-
|
|
|
- })
|
|
|
- .catch(err => {});
|
|
|
+ console.log(res)
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '已存入通讯录,请前往手机通讯录查看',
|
|
|
+ showCancel: false,
|
|
|
+ })
|
|
|
},
|
|
|
- fail: () => {
|
|
|
+ fail: (err) => {
|
|
|
+ console.log(err)
|
|
|
req.msg('存入失败')
|
|
|
}
|
|
|
})
|
|
|
@@ -681,7 +847,136 @@ import util from '../../utils/util.js';
|
|
|
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--;
|
|
|
+ } else {
|
|
|
+ this.pageList[index].isPraise = 1;
|
|
|
+ this.pageList[index].count.fabulousCount++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ //提交投票
|
|
|
+ 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;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ 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);
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
const systemInfo = uni.getSystemInfoSync();
|