Commit 7891cd40 authored by zhangyanni's avatar zhangyanni

登录之后返回

嘉宾交换名片
parent 5dcaa595
......@@ -221,6 +221,16 @@ export default {
},
selectDictList(params) {
return api.fetchGet('/business/dict/selectDictList?groupCode='+params );
return api.fetchGet("/business/dict/selectDictList?groupCode="+params );
},
//获取活动嘉宾列表
getActGuestListAxios(params){
return api.fetchLoadingGet("/base/activity/getActivityGuestList?"+Qs.stringify(params));
},
//获取活动嘉宾详情
getGuestDetailInfoAxios(params){
return api.fetchLoadingGet("/base/activity/showGuestInfo?guestId="+params);
}
}
......@@ -1953,7 +1953,9 @@ module.exports = {
realName:"your real name",
activityGuest:"Event Guests",
recentParticipated:"Recently Participated",
recentParticipatedList:"Participant List"
recentParticipatedList:"Participant List",
guestList:"Guest List"
......
......@@ -2048,7 +2048,8 @@ module.exports = {
realName:"您的真实姓名",
activityGuest:"活动嘉宾",
recentParticipated:"最近参与",
recentParticipatedList:"参与者列表"
recentParticipatedList:"参与者列表",
guestList:"嘉宾列表"
},
......
......@@ -2,36 +2,59 @@
<div class="guestDialog">
<div class="v-modal transparentBg" tabindex="0" style="z-index: 2001;"></div>
<div class="closeIcon" @click="handleClose"><i class="iconfont icon-cuowu"></i></div>
<div class="guestInfoWrap">
<div class="guestInfoWrap" v-if="detailInfo">
<!--<div class="topInfo" :style="{backgroundImage:contactObj.empLogo?'url('+contactObj.empLogo+')':'url('+require('../../assets/img/defaultlogo.png')+')'}">-->
<!--</div>-->
<div class="topInfo">
<div class="img" :style="{backgroundImage:'url('+require('../../assets/img/defaultlogo.png')+')'}">
<div class="img" :style="{backgroundImage:'url('+(detailInfo.guestPic?detailInfo.guestPic:require('../../assets/img/defaultlogo.png'))+')'}">
</div>
<el-row class="personInfo">
<el-col :span="18">
<div class="fontWeight">郭翠鸽</div>
<div>郭翠鸽郭翠鸽郭翠鸽郭翠鸽郭翠鸽郭翠鸽郭翠鸽郭翠鸽郭翠鸽郭翠鸽郭翠鸽郭翠鸽</div>
<el-col :span="lang==1?18:24">
<div class="fontWeight">{{detailInfo.guestName}}</div>
<div>{{detailInfo.guestTitle}}</div>
</el-col>
<el-col :span="6">
<span class="follow" @click="handleClick">交换名片</span>
<el-col :span="6" v-if="lang==1">
<span class="follow" :class="detailInfo.isApplyToGuest==2?'hasFollow':''" @click="handleClick" v-show="detailInfo.isApplyToGuest!=0">{{detailInfo.isApplyToGuest==1?'交换名片':detailInfo.isApplyToGuest==2?'等待通过':'电子名片'}}</span>
</el-col>
</el-row>
</div>
<div class="bottomInfo">
一个互联网行业的优秀产品总监,应该无限接近一个优秀的CEO;向着更高职业发展,潜心沉淀,做出更多优秀的产品来改善大家的生活。简简单单生活,把产品当作自己的孩子!一个互联网行业的优秀产品总监,应该无限接近一个优秀的CEO;向着更高职业发展,潜心沉淀,做出更多优秀的产品来改善大家的生活。简简单单生活,把产品当作自己的孩子!一个互联网行业的优秀产品总监,应该无限接近一个优秀的CEO;向着更高职业发展,潜
{{detailInfo.guestDesc}}
</div>
</div>
<div v-if="completeVisible">
<div class="v-modal transparentBg" tabindex="0"
style="z-index: 2001;"></div>
<div class="centerAllWrap integral">
<div class="integralWrap infoWrap" style="height: 7.5rem;">
<i class="iconfont icon-cuowu" @click="completeVisible = false"></i>
<p class="circleBg"><i class="iconfont icon-mingpian1"></i></p>
<p style="line-height: .7rem;text-align: center;padding: 0 .3rem;">
{{completeTitle}}</p>
<div class="buttonWrapper">
<el-button type="primary" size="middle" @click="handleToEdit">编辑资料</el-button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import commonApi from '../../common/commonApi';
export default {
name: "guestDialogCmpt",
data() {
return {}
return {
detailInfo:null,
flag:0,
lang: this.$i18n.locale == "zh-CN" ? 1 : 2,
completeTitle:"",
completeVisible:false
}
},
props:{
guestInfo:{
......@@ -40,16 +63,73 @@
}
},
methods: {
handleClick(data){
handleClick(){
if(this.guestInfo.isApplyToGuest==1){
if(this.flag==0){
this.flag++;
let params = {
otherEmpId: null,
queryType: 0,
dataId: this.$route.query.id,
dataType: 1,
guestId: this.guestInfo.id
},that = this;
commonApi.addFriendAxios(params).then((res) => {
if (res.code == 0) {
//addState 0成功 1添加达到上限 2添加成功 3已添加 4资料不完整
if (res.result.addState == 0 || res.result.addState == 2 || res.result.addState == 3) {
if (res.result.addState == 0) this.getGuestInfoFunc();
if (res.result.addValue) this.$toast({
message: res.result.addValue,
duration: 2000,
className: 'noticeError'
})
}
else if (res.result.addState == 1) {
this.$toast(res.result.addValue)
}
else if (res.result.addState == 4) {
this.completeTitle = res.result.addValue;
this.completeVisible = true;
}
setTimeout(function () {
that.flag = 0;
}, 500)
} else {
this.$toast(res.msg);
setTimeout(function () {
that.flag = 0;
}, 500)
}
}).catch((err) => {
this.$toast(err);
that.flag = 0;
})
}
}
},
handleClose(){
this.$emit("closeGuestDialog");
},
getGuestInfoFunc(){
let params = this.guestInfo.id;
commonApi.getGuestDetailInfoAxios(params).then((res)=>{
if(res.code==0){
this.detailInfo = res.result;
}else this.$toast(res.msg);
}).catch((err)=>{
this.$toast(err);
})
},
handleToEdit(){
this.$router.push({path: "/modifypersonal", query: {state: true}})
}
},
mounted() {
this.getGuestInfoFunc();
}
}
</script>
......@@ -100,7 +180,7 @@
height: 1rem;
border-radius: 50%;
background-repeat: no-repeat;
background-size: contain;
background-size: cover;
}
.personInfo{
width: calc(100% - 1.1rem);
......@@ -117,7 +197,19 @@
border-radius: 1rem;
border: 1px solid #ff5d5d;
}
.el-col-18{
.hasFollow {
margin-top: .1rem;
width: 1.5rem;
display: inline-block;
text-align: center;
padding: .1rem;
font-size: .24rem;
color: #AAAAAA;
border-radius: 1rem;
border: 1px solid #AAAAAA;
}
.el-col-18,.el-col-24{
padding-left: .15rem;
color: #1A1A1E;
font-size: .28rem;
......@@ -137,5 +229,69 @@
}
}
}
.integral {
display: flex;
justify-content: center;
flex-wrap: wrap;
.integralWrap {
width: 94%;
height: 6.5rem;
background-color: #fff;
padding: .2rem .25rem;
border-radius: .1rem;
display: flex;
flex-wrap: wrap;
position: relative;
justify-content: center;
i.icon-cuowu {
position: absolute;
right: .2rem;
top: .2rem;
color: #AAAAAA;
}
> p {
width: 100%;
display: flex;
font-size: .28rem;
justify-content: center;
&:first-of-type {
margin-top: 1rem;
}
&:nth-of-type(2) {
padding-top: .5rem;
}
i.icon-kulian:before, i.icon-jifen:before, i.icon-mingpian1:before {
font-size: 1.2rem;
color: #AAAAAA;
font-weight: normal;
}
i.icon-jifen:before {
color: #FF9E29;
font-size: .8rem;
}
i.icon-mingpian1:before {
color: #5d78ff;
font-size: .8rem;
}
}
.buttonWrapper {
width: 100%;
display: flex;
justify-content: space-around;
padding-bottom: .8rem;
padding-top: 1rem;
.el-button {
width: 45%;
font-weight: bold;
font-size: .32rem;
border-radius: .1rem;
padding: 0;
}
}
}
.infoWrap {
height: 7rem;
}
}
</style>
\ No newline at end of file
......@@ -3,7 +3,7 @@
<div class="wrapper" :class="circleType==23?'changeWrapper':''">
<div class="content_data" style="height: unset;" v-if="!fixed&&hasData">
<el-row v-for="(item,index) in tableData" :key="index">
<el-col :span="circleType%2!=0?18:24">
<el-col :span="circleType%2!=0&&lang==1?18:22">
<el-col :span="4" class="imgWrap" @click.native="handleToPersonal(item)">
<el-image
:src="item.empLogo?item.empLogo:require('../../assets/img/defaultlogo.png')"
......@@ -15,22 +15,23 @@
class="vipImg">
</el-col>
<el-col :span="18">
<el-col :span="lang==1?18:20">
<p style="width: 100%;display: flex;align-items: center;" @click="handleToPersonal(item)"
v-if="item.empTitle||item.workName">
<span class="fontWeight dwote"
style="max-width: 40%;margin-right: .2rem;">{{item.empName}}</span>
<span class="dwote"
style="max-width: 55%;font-size: .24rem;" v-if="circleType==25">{{item.isProfessor||item.isModerator?item.empTitle:item.workName}}</span>
<span class="dwote" v-if="circleType!=25"
style="max-width: 55%;font-size: .24rem;" v-if="circleType!=25">{{item.isProfessor||item.isModerator?item.empTitle:item.workName}}</span>
<span class="dwote" v-if="circleType==25"
style="max-width: 55%;font-size: .24rem;">{{item.empTitle}}</span>
</p>
<p class="fontWeight dwote" style="width: 100%;" @click="handleToPersonal(item)" v-else>
{{item.empName}}</p>
<p class="titleIntro dwote" @click="handleToPersonal(item)" v-if="item.orgName&&circleType!=25">
<p class="titleIntro dwote" @click="handleToPersonal(item)"
v-if="item.orgName&&circleType!=25">
{{item.orgName}}</p>
<p class="empIntro dwote" v-if="item.empIntroduction" @click="handleToPersonal(item)">
{{item.empIntroduction}}</p>
......@@ -38,12 +39,16 @@
</el-col>
</el-col>
<el-col :span="6" v-show="circleType%2!=0&&lang==1">
<el-col :span="6"
v-show="((circleType!=25&&circleType%2!=0)||(circleType==25&&item.isApplyToGuest!=0))&&lang==1">
<span class="follow"
:class="[((item.isFriend==1||item.isFriend==2)&&circleList)||(item.isFriend==1&&!circleList)||(item.isFollowed&&(item.relationType!=1&&item.relationType!=2&&item.relationType!=3))||((item.isFriend==1||item.isFriend==2&&circleList)&&(item.relationType==2||item.relationType==3))?'hasFollow':'',filterButtonText1(item)=='电子名片'?'blueButton':'']"
@click="handleCheck(item,index,$event)">{{filterButtonText1(item)}}</span>
<i class="iconfont icon-you" @click="handleToPersonal(item)"></i>
</el-col>
<el-col :span="2" v-show="lang==2">
<i class="iconfont icon-you" @click="handleToPersonal(item)"></i>
</el-col>
</el-row>
</div>
<div class="content_data" ref="contentDataWrapper" @scroll.passive="getScroll($event)"
......@@ -54,7 +59,7 @@
:bottom-status.sync="bottomStatus" ref="loadmore"
:class="circleType==2&&isOther&&this.publicFun.judgeBrandIsWechatOrHtml()==2?'h5-loadmore':''">
<el-row v-for="(item,index) in tableData" :key="index">
<el-col :span="circleType%2!=0?circleType==23?16:18:24">
<el-col :span="circleType%2!=0&&lang==1?18:22">
<el-col :span="4" class="imgWrap" @click.native="handleToPersonal(item)">
<el-image
:src="item.empLogo?item.empLogo:require('../../assets/img/defaultlogo.png')"
......@@ -65,22 +70,23 @@
src="../../assets/img/mobile/moderator.png" alt=""
class="vipImg">
</el-col>
<el-col :span="18" v-if="circleType!=23">
<el-col :span="lang==1?18:20" v-if="circleType!=23">
<p style="width: 100%;display: flex;align-items: center;"
@click="handleToPersonal(item)"
v-if="item.empTitle||item.workName">
<span class="fontWeight dwote" style="max-width: 40%;margin-right: .2rem;">{{item.empName}}</span>
<span class="dwote"
style="max-width: 55%;font-size: .24rem;" v-if="circleType==25">{{item.isProfessor||item.isModerator?item.empTitle:item.workName}}</span>
<span class="dwote" v-if="circleType!=25"
style="max-width: 55%;font-size: .24rem;" v-if="circleType!=25">{{item.isProfessor||item.isModerator?item.empTitle:item.workName}}</span>
<span class="dwote" v-if="circleType==25"
style="max-width: 55%;font-size: .24rem;">{{item.empTitle}}</span>
</p>
<p class="fontWeight dwote" style="width: 100%;" @click="handleToPersonal(item)" v-else>
{{item.empName}}</p>
<p class="titleIntro dwote" @click="handleToPersonal(item)" v-if="item.orgName&&circleType!=25">
<p class="titleIntro dwote" @click="handleToPersonal(item)"
v-if="item.orgName&&circleType!=25">
{{item.orgName}}</p>
<p class="empIntro dwote" v-if="item.empIntroduction" @click="handleToPersonal(item)">
{{item.empIntroduction}}</p>
......@@ -105,14 +111,17 @@
</el-col>
</el-col>
<el-col :span="circleType==23?8:6"
v-show="((circleType%2!=0&&circleType!=21)||!userInfo||(circleType==21&&userInfo&&userInfo.empId!=item.empId))&&lang==1">
<el-col :span="6"
v-show="((circleType%2!=0&&circleType!=21)||!userInfo||(circleType==21&&userInfo&&userInfo.empId!=item.empId)||(circleType==25&&item.isApplyToGuest!=0))&&lang==1">
<span class="follow"
:class="[((item.isFriend==1||item.isFriend==2)&&circleList)||(item.isFriend==1&&!circleList)||(circleType!=8&&circleType!=7&&item.isFollowed&&(item.relationType!=1&&item.relationType!=2&&item.relationType!=3))||((item.isFriend==1||item.isFriend==2&&circleList)&&(item.relationType==2||item.relationType==3))||(item.isFollowed&&circleType==1)?'hasFollow':'',filterButtonText1(item)=='电子名片'?'blueButton':'']"
@click="handleCheck(item,index,$event)">{{filterButtonText1(item)}}</span>
<i class="iconfont icon-you" @click="handleToPersonal(item)"></i>
</el-col>
<el-col :span="2" v-show="lang==2">
<i class="iconfont icon-you" @click="handleToPersonal(item)"></i>
</el-col>
</el-row>
<div slot="top" class="mint-loadmore-top">
<span v-show="topStatus !== 'loading'" :class="{ 'rotate': topStatus === 'drop' }">{{$t("commonTips.downPull")}}</span>
......@@ -143,91 +152,10 @@
</div>
</div>
<div v-if="noData&&circleType==21" class="searchNoData">
<div style="border-bottom: 1px solid #F2F2F2;padding-bottom: 1rem;">
<img src="../../assets/img/mobile/noPeople@2x.png" alt="">
<span style="padding: .3rem .2rem 0 .2rem;">抱歉,未找到“<i style="color: #7A7A7A;">{{keywordVal}}</i>”相关用户</span>
<span>以下可能是您想要找的用户</span>
</div>
<div class="circle_data">
<el-row v-for="(item,index) in recommendData" :key="index">
<el-col :span="circleType%2!=0?18:24">
<el-col :span="4" class="imgWrap" @click.native="handleToPersonal(item)">
<el-image
:src="item.empLogo?item.empLogo:require('../../assets/img/defaultlogo.png')"
:fit="'cover'"></el-image>
<img v-if="item.isProfessor>0" src="../../assets/img/proFeedBack/vip.png" alt=""
class="vipImg">
<img v-if="item.isProfessor>0?false:item.isModerator>0?true:false"
src="../../assets/img/mobile/moderator.png" alt=""
class="vipImg">
</el-col>
<!--之前的-->
<!--<el-col :span="18">-->
<!--<p class="fontWeight dwote" style="width: 100%;" @click="handleToPersonal(item)">-->
<!--{{item.empName}}</p>-->
<!--<p class="titleIntro dwote" @click="handleToPersonal(item)">-->
<!--{{item.empIntroduction}}</p>-->
<!--<p>-->
<!--<span class="scaleFont" @click="handleToSameFriend(item)"-->
<!--:class="[item.relationType==1&&item.relationValue?'hasSameFriend':'',item.relationValue&&Number(item.relationValue) >=0?'':'marginLeft']"><span-->
<!--style="color: #7A7A7A;">{{(item.relationType==4||item.relationType==1)&&item.relationValue?item.relationValue+'\&nbsp;':""}}</span>{{filterEmpName(item)}}</span>-->
<!--</p>-->
<!--</el-col>-->
<!--之前的-->
<el-col :span="18">
<p style="width: 100%;display: flex;align-items: center;"
@click="handleToPersonal(item)"
v-if="item.empTitle||item.workName">
<span class="fontWeight dwote" style="max-width: 40%;margin-right: .2rem;">{{item.empName}}</span>
<span class="dwote"
style="max-width: 55%;font-size: .24rem;">{{item.isProfessor||item.isModerator?item.empTitle:item.workName}}</span>
</p>
<p class="fontWeight dwote" style="width: 100%;" @click="handleToPersonal(item)" v-else>
{{item.empName}}</p>
<p class="titleIntro dwote" @click="handleToPersonal(item)" v-if="item.orgName">
{{item.orgName}}</p>
<!--<p v-if="circleType!=18" @click="handleToPersonal(item)">-->
<!--<span class="scaleFont" style="margin-left: -.1rem;"><span style="color: #7A7A7A;">{{item.friendCount}}</span><span-->
<!--style="color: #AAAAAA;padding-right: .2rem;">&nbsp;位联系人</span><span-->
<!--style="color: #7A7A7A;">{{item.followedCount}}</span><span-->
<!--style="color: #AAAAAA;">&nbsp;位关注者</span></span>-->
<!--</p>-->
<p class="empIntro dwote" v-if="item.empIntroduction" @click="handleToPersonal(item)">
{{item.empIntroduction}}</p>
<p v-if="circleType!=21&&item.relationType!=4">
<span class="scaleFont" @click="handleToSameFriend(item)"
:class="[item.relationType==1&&item.relationValue?'hasSameFriend':'',item.relationValue&&Number(item.relationValue) >=0?'':'marginLeft']"><span
style="color: #7A7A7A;">{{(item.relationType==4||item.relationType==1)&&item.relationValue?item.relationValue+'\&nbsp;':""}}</span>{{filterEmpName(item)}}</span>
</p>
</el-col>
</el-col>
<el-col :span="6" v-show="circleType%2!=0&&lang==1">
<!--<span class="follow">-->
<!--{{circleType==1?"+关注":"+联系人"}}-->
<!--</span>-->
<span class="follow"
:class="[((item.isFriend==1||item.isFriend==2)&&circleList)||(item.isFriend==1&&!circleList)||(item.isFollowed&&(item.relationType!=1&&item.relationType!=2&&item.relationType!=3))||((item.isFriend==1||item.isFriend==2&&circleList)&&(item.relationType==2||item.relationType==3))?'hasFollow':'',filterButtonText1(item)=='电子名片'?'blueButton':'']"
@click="handleCheck(item,index,$event)">{{filterButtonText1(item)}}</span>
<i class="iconfont icon-you" @click="handleToPersonal(item)"></i>
</el-col>
</el-row>
</div>
</div>
</div>
<div v-if="integralVisible" :class="circleType==23?'changeCompleteWrap':''">
<div class="v-modal transparentBg" tabindex="0" style="z-index: 2001;" :class="circleType==23?'changeCompleteWrapModal':''"></div>
<div class="v-modal transparentBg" tabindex="0" style="z-index: 2001;"
:class="circleType==23?'changeCompleteWrapModal':''"></div>
<div class="centerAllWrap integral" :class="circleType==23?'changeCompleteWrapCenterWrap':''">
<div class="integralWrap" style="height: 7.5rem;">
<i class="iconfont icon-cuowu" @click="integralVisible = false"></i>
......@@ -261,7 +189,8 @@
</div>
<div v-if="reduceIntegralVisible" :class="circleType==23?'changeCompleteWrap':''">
<div class="v-modal transparentBg" tabindex="0" style="z-index: 2001;" :class="circleType==23?'changeCompleteWrapModal':''"></div>
<div class="v-modal transparentBg" tabindex="0" style="z-index: 2001;"
:class="circleType==23?'changeCompleteWrapModal':''"></div>
<div class="centerAllWrap integral" :class="circleType==23?'changeCompleteWrapCenterWrap':''">
<div class="integralWrap infoWrap" style="height: 7.5rem;">
<i class="iconfont icon-cuowu" @click="reduceIntegralVisible = false"></i>
......@@ -280,7 +209,8 @@
</div>
<div v-if="contactVisible&&contactObj" :class="circleType==23?'changeCompleteWrap':''">
<div class="v-modal transparentBg" tabindex="0" style="z-index: 2001;" :class="circleType==23?'changeCompleteWrapModal':''"></div>
<div class="v-modal transparentBg" tabindex="0" style="z-index: 2001;"
:class="circleType==23?'changeCompleteWrapModal':''"></div>
<div class="centerAllWrap contact" :class="circleType==23?'changeCompleteWrapCenterWrap':''">
<div class="contactWrap">
<!--<i class="iconfont icon-cuowu" @click="contactVisible = false"></i>-->
......@@ -336,9 +266,10 @@
import {Toast} from 'mint-ui';
import commonApi from '../../common/commonApi';
import applyLoginCmpt from './applyLogin'
export default {
name: "guestFollowCmpt",
components:{
components: {
applyLoginCmpt
},
props: {
......@@ -377,18 +308,18 @@
type: Boolean,
default: false
},
partList:{
partList: {
type: Boolean,
default: false
},
activityId:{
type:Number,
default:0
activityId: {
type: Number,
default: 0
}
},
data() {
return {
lang:this.$i18n.locale=="zh-CN"?1:2,
lang: this.$i18n.locale == "zh-CN" ? 1 : 2,
userInfo: this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null,
tableData: [],
recommendData: [],
......@@ -412,7 +343,7 @@
currentData: null,
keywordVal: "",
timer: null,
isLogin:false
isLogin: false
}
},
......@@ -477,6 +408,14 @@
if (data.records.length > 0) {
data.records.forEach((item) => {
item.flag = 0;
if (this.circleType == 25) {
item.empTitle = item.guestTitle;
item.empLogo = item.guestPic;
item.empIntroduction = item.guestDesc;
item.empName = item.guestName;
item.isFriend = item.isApplyToGuest == 0 ? "" : item.isApplyToGuest == 1 ? 0 : item.isApplyToGuest == 2 ? 1 : 2;
//0:不可申请(没有联系方式) 1:未申请 2:等待处理 3:已通过
}
})
}
if (size) {
......@@ -503,136 +442,38 @@
},
getInitFunc(size, flag, circleType) {
if(this.guestList) this.getGusetListFunc(size, flag);
if(this.partList) this.getParticipatedListFunc(size, flag);
if (this.guestList) this.getGusetListFunc(size, flag);
if (this.partList) this.getParticipatedListFunc(size, flag);
},
//嘉宾列表
getGusetListFunc(size,flag){
getGusetListFunc(size, flag) {
let params = {
activityId: this.activityId,
pageIndex: this.page,
pageSize: this.pageSize,
pageIndex: this.fixed ? this.page : 1,
pageSize: this.fixed ? this.pageSize : 4,
};
var arr = [
{
"empId":12560,
"empName":"决定减肥先发布项目",
"empIntroduction":"我的简介意吧好的我",
"empLogo":null,
"isProfessor":0,
"followedCount":4,
"isScan":1,
"sortValue":-2777,
"relationType":1,
"relationValue":"1",
"isModerator":1,
"isFollowed":0,
"isFriend":0,
"empNameInfo":null,
"workName":null,
"orgName":null,
"friendCount":0,
"empTitle":"都发生的"
},
{
"empId":19079,
"empName":"gongfei",
"empIntroduction":"快来加我吧",
"empLogo":null,
"isProfessor":0,
"followedCount":6,
"isScan":1,
"sortValue":-4120,
"relationType":2,
"relationValue":"北京大学",
"isModerator":0,
"isFollowed":0,
"isFriend":0,
"empNameInfo":"gongfei",
"workName":null,
"orgName":null,
"friendCount":0,
"empTitle":null
},
{
"empId":19620,
"empName":"我是这个人的。销售创建的",
"empIntroduction":"孙大发说是道非",
"empLogo":"",
"isProfessor":1,
"followedCount":0,
"isScan":1,
"sortValue":-4537,
"relationType":6,
"relationValue":null,
"isModerator":0,
"isFollowed":0,
"isFriend":0,
"empNameInfo":"我是这个人的。销售创建的",
"workName":null,
"orgName":"孙大发的s'd'f",
"friendCount":0,
"empTitle":"15899999912"
},
{
"empId":11621,
"empName":"九九八",
"empIntroduction":"版主有介绍,未展示,随意输入的个人简介",
"empLogo":"https://techbook-test.oss-cn-beijing.aliyuncs.com/business/image/EC1C74B26FD24C2AA3430B1A6582FE3B.jpg?Expires=1905422013&OSSAccessKeyId=LTAIm3BF0PBlzH5t&Signature=swdQWcbCa%2FJ%2BTEGsnZ4oNhT0V4E%3D",
"isProfessor":0,
"followedCount":21,
"isScan":1,
"sortValue":-5506,
"relationType":1,
"relationValue":"1",
"isModerator":1,
"isFollowed":0,
"isFriend":0,
"empNameInfo":"九九八",
"workName":"测试一下",
"orgName":"哈哈哈有意思",
"friendCount":0,
"empTitle":"此版主没有昵称"
},
{
"empId":19580,
"empName":"巡回检查组",
"empIntroduction":"来吧,巡回检查组",
"empLogo":null,
"isProfessor":0,
"followedCount":13,
"isScan":1,
"sortValue":-7017,
"relationType":1,
"relationValue":"1",
"isModerator":0,
"isFollowed":0,
"isFriend":0,
"empNameInfo":"巡回检查组",
"workName":null,
"orgName":null,
"friendCount":0,
"empTitle":null
},
];
this.tableData = arr;
this.noData = false;
this.hasData = true;
commonApi.getActGuestListAxios(params).then((res) => {
if (res.code == 0) {
this.initTableData(size, flag, res.result)
} else this.$toast(res.msg);
}).catch((err) => {
this.$toast(err);
})
},
getParticipatedListFunc(size,flag){
getParticipatedListFunc(size, flag) {
let params = {
activityId: this.activityId,
pageIndex: this.page,
pageSize: this.pageSize,
};
api.getRecentParticipatedListAxios(params).then((response)=>{
if(response.code==0){
api.getRecentParticipatedListAxios(params).then((response) => {
if (response.code == 0) {
this.initTableData(size, flag, response.result)
}else this.$toast(response.msg);
}).catch((err)=>{
} else this.$toast(response.msg);
}).catch((err) => {
this.$toast(err);
})
},
......@@ -974,7 +815,7 @@
//查看联系方式
checkContactFunc(data, index) {
commonApi.checkIntegralCanContactAxios(data.empId,this.circleType == 23?true:false).then((res) => {
commonApi.checkIntegralCanContactAxios(data.empId, this.circleType == 23 ? true : false).then((res) => {
if (res.code == 0) {
//isConstact true直接查看 false提醒扣除积分
......@@ -991,7 +832,7 @@
//查看联系方式
checkResultContact(data) {
commonApi.checkContactAxios(data.empId,this.circleType == 23?true:false).then((res) => {
commonApi.checkContactAxios(data.empId, this.circleType == 23 ? true : false).then((res) => {
if (res.code == 0) {
// queryState 0积分不够 1无联系方式 2查看联系方式 3不是好友 4已添加
if (res.result.queryState == 0) this.integralVisible = true;
......@@ -1020,17 +861,21 @@
},
handleToPersonal(data) {
if(this.lang==1){
if (this.lang == 1) {
if (!this.userInfo) this.isLogin = true;
else {
if (data.empId != this.userInfo.empId) this.$router.push({
path: "/personalCenterInfo",
query: {
empId: data.empId,
init: this.$route.name == 'personalCenterInfoParentRouter' ? true : undefined
}
});
else this.$router.push({path: "/mine"});
if (data.empId) {
if (data.empId != this.userInfo.empId) this.$router.push({
path: "/personalCenterInfo",
query: {
empId: data.empId,
init: this.$route.name == 'personalCenterInfoParentRouter' ? true : undefined
}
});
else this.$router.push({path: "/mine"});
} else {
this.$emit("showGuestDialogFunc", data);
}
}
}
},
......@@ -1046,16 +891,16 @@
commonApi.postFollowedAxios(params).then((res) => {
if (res.code == 0) {
res.result.baseEmpRelationDTO.flag = 0;
if(this.tableData.length>0){
if (this.tableData.length > 0) {
this.$set(this.tableData, index, res.result.baseEmpRelationDTO);
this.$set(this.tableData[index], "flag", 0);
}
if(this.recommendData.length>0){
if (this.recommendData.length > 0) {
this.$set(this.recommendData, index, res.result.baseEmpRelationDTO);
this.$set(this.recommendData[index], "flag", 0);
}
this.publicFun.updateCircleListFollow(res.result.baseEmpRelationDTO.empId, 1,this.circleType == 23?true:false);
this.publicFun.updateCircleListFollow(res.result.baseEmpRelationDTO.empId, 1, this.circleType == 23 ? true : false);
setTimeout(function () {
data.flag = 0;
}, 500)
......@@ -1088,29 +933,29 @@
data.flag++;
commonApi.postCancelFollowedAxios(params).then((res) => {
if (res.code == 0) {
this.publicFun.updateCircleListFollow(res.result.baseEmpRelationDTO.empId, 2,this.circleType == 23?true:false);
this.publicFun.updateCircleListFollow(res.result.baseEmpRelationDTO.empId, 2, this.circleType == 23 ? true : false);
if (this.circleType == 1 || this.circleType == 2) {
this.page = 1;
this.getMyFollowFunc();
}
else if (this.circleType == 7 || this.circleType == 8 || this.circleType == 21) {
res.result.baseEmpRelationDTO.flag = 0;
if(this.tableData.length>0){
if (this.tableData.length > 0) {
this.$set(this.tableData, index, res.result.baseEmpRelationDTO)
this.$set(this.tableData[index], "flag", 0);
}
if(this.recommendData.length>0){
if (this.recommendData.length > 0) {
this.$set(this.recommendData, index, res.result.baseEmpRelationDTO)
this.$set(this.recommendData[index], "flag", 0);
}
}
else if (this.circleType == 13) {
if(this.tableData.length>0){
if (this.tableData.length > 0) {
this.$set(this.tableData, index, res.result.baseEmpRelationDTO);
this.$set(this.tableData[index], "flag", 0);
}
if(this.recommendData.length>0){
if (this.recommendData.length > 0) {
this.$set(this.recommendData, index, res.result.baseEmpRelationDTO);
this.$set(this.recommendData[index], "flag", 0);
}
......@@ -1143,28 +988,37 @@
if (data.flag == 0) {
data.flag++;
let params = {
otherEmpId: data.empId,
otherEmpId: data.empId ? data.empId : null,
queryType: 0,
dataId: this.circleType == 23 ? this.$route.query.id : null,
dataType: this.circleType == 23 ? 1 : null
dataId: this.circleType == 23 || this.circleType == 25 ? this.$route.query.id : null,
dataType: this.circleType == 23 || this.circleType == 25 ? 1 : null,
guestId: data.id ? data.id : null
};
commonApi.addFriendAxios(params,this.circleType == 23?true:false).then((res) => {
commonApi.addFriendAxios(params, this.circleType == 23 ? true : false).then((res) => {
if (res.code == 0) {
//addState 0成功 1添加达到上限 2添加成功 3已添加 4资料不完整
if (res.result.addState == 0 || res.result.addState == 2 || res.result.addState == 3) {
if (res.result.addState == 0) this.publicFun.updateCircleListFriend(res.result.baseEmpRelationDTO.empId, 1,this.circleType == 23?true:false);
if (res.result.addState == 0) {
if (this.circleType === 25 && res.result.baseEmpRelationDTO) {
res.result.baseEmpRelationDTO.empTitle = res.result.baseEmpRelationDTO.guestTitle;
res.result.baseEmpRelationDTO.empLogo = res.result.baseEmpRelationDTO.guestPic;
res.result.baseEmpRelationDTO.empIntroduction = res.result.baseEmpRelationDTO.guestDesc;
res.result.baseEmpRelationDTO.empName = res.result.baseEmpRelationDTO.guestName;
res.result.baseEmpRelationDTO.isFriend = res.result.baseEmpRelationDTO.isApplyToGuest == 0 ? "" : res.result.baseEmpRelationDTO.isApplyToGuest == 1 ? 0 : res.result.baseEmpRelationDTO.isApplyToGuest == 2 ? 1 : 2;
}
if (this.circleType == 25 && res.result.baseEmpRelationDTO && res.result.baseEmpRelationDTO.empId) this.publicFun.updateCircleListFriend(res.result.baseEmpRelationDTO.empId, 1, this.circleType == 23 ? true : false);
}
res.result.baseEmpRelationDTO.flag = 0;
if(this.tableData.length>0){
if (this.tableData.length > 0) {
this.$set(this.tableData, index, res.result.baseEmpRelationDTO)
this.$set(this.tableData[index], "flag", 0);
}
if(this.recommendData.length>0){
if (this.recommendData.length > 0) {
this.$set(this.recommendData, index, res.result.baseEmpRelationDTO)
this.$set(this.recommendData[index], "flag", 0);
}
if (res.result.addValue) this.$toast({
message: res.result.addValue,
duration: 2000,
......@@ -1251,6 +1105,8 @@
this.page = 1;
this.getInitFunc();
},
},
watch: {
circleType(newVal, oldVal) {
......@@ -1263,7 +1119,7 @@
mounted() {
var that = this;
this.keywordVal = this.keyword;
if (this.guestList||this.partList) {
if (this.guestList || this.partList) {
this.getInitFunc();
}
globalMsg.$on("clearTimeout", function () {
......@@ -1335,7 +1191,7 @@
border-bottom: 1px solid #F2F2F2;
display: flex;
align-items: center;
> .el-col-18, > .el-col-16, > .el-col-24 {
> .el-col-18, > .el-col-16, > .el-col-24, > .el-col-22 {
display: flex;
align-items: center;
justify-content: flex-start;
......@@ -1425,26 +1281,26 @@
border: 1px solid #5d78ff;
}
}
> .el-col-6{
> .el-col-6, > .el-col-2 {
justify-content: space-between;
align-items: center;
position: relative;
i.icon-you{
i.icon-you {
color: #D6D6D6;
position: absolute;
right: -.2rem;
top: .04rem;
}
i.icon-you:before{
i.icon-you:before {
font-size: .2rem;
}
.follow{
.follow {
padding: .04rem .2rem;
}
}
> .el-col-18, > .el-col-16 {
> .el-col-18, > .el-col-16, > .el-col-22 {
align-items: flex-start;
> .el-col-18 {
> .el-col-18,> .el-col-20 {
display: flex;
flex-wrap: wrap;
align-self: normal;
......@@ -1770,7 +1626,8 @@
left: -11%;
top: -4.2rem;
}
.changeCompleteWrapCenterWrap{
.changeCompleteWrapCenterWrap {
position: fixed;
left: -6%;
top: -2.4rem;
......
......@@ -51,25 +51,25 @@
</div>
<div class="divHeight15px">
</div>
<div class="guestInfo">
<div class="guestInfo" v-if="detailInfo.guestCount>0">
<div class="activityIntro">
<div>
<span class="leftTab"></span><span>{{$t("activityInfo.activityGuest")}}</span>
</div>
<div>
<div v-show="detailInfo.guestCount>4">
<span @click="handleToGuest">{{$t("indexCount.lookMore")}}</span>
</div>
</div>
<div>
<followCmpt ref="followCmpt" :guestList="true" @quicklyLoginFunc="quicklyLoginFunc"
:circleType="25" :fixed="false"></followCmpt>
<div v-if="detailInfo.guestCount>0">
<followCmpt ref="followCmpt" :activityId="Number($route.query.id)" :guestList="true" @quicklyLoginFunc="quicklyLoginFunc"
:circleType="25" :fixed="false" @showGuestDialogFunc="showGuestDialogFunc"></followCmpt>
</div>
</div>
<div class="divHeight15px">
<div class="divHeight15px" v-if="detailInfo.guestCount>0">
</div>
<div class="contentInfo">
<p class="activityIntro"><span class="leftTab"></span><span>{{$t("Otherjson.activityview")}}</span></p>
<div>
<div v-if="detailInfo.guestCount>0">
<div v-html="detailInfo.channelIntroduction" v-if="!showAll"
style="max-height: 4rem;overflow: hidden;margin-bottom: .2rem;">
......@@ -81,6 +81,7 @@
:class="showAll?'icon-xiala-copy':'icon-xiala'"></i></span>
</div>
</div>
<div v-if="detailInfo.guestCount==0" v-html="detailInfo.channelIntroduction"></div>
</div>
<div class="divHeight15px">
</div>
......@@ -95,11 +96,11 @@
</div>
<div class="inviteCustumer" v-if="recentlyList.length>0">
<div v-for="item in recentlyList">
<img :src="item.empLogo" alt="" @click="handleToPersonal(item)">
<img :src="item.empLogo?item.empLogo:require('../../../assets/img/defaultlogo.png')" alt="" @click="handleToPersonal(item)">
</div>
</div>
</div>
<div class="divHeight15px" v-if="recentlyList.length>0">
<div class="divHeight15px" v-if="recentlyList">
</div>
<div class="sameContentwrap" v-if="lang==1&&sameContentData">
<p class="activityIntro"><span
......@@ -111,6 +112,9 @@
<div class="leftInfo">
<img :src="item.resourceType=='RAT02'||item.resourceType=='RAT01'?item.coverUrl:item.resourceType=='RAT03'?require('../../../assets/img/mobile/pdfImg@2x.png'):require('../../../assets/img/mobile/activityArticleImg@2x.png')"
alt="">
<!--资源类型 RAT01(话题) RAT02(活动) RAT03(报告) RAT04(文章)-->
<span class="activityStatusTip" style="background: rgba(0, 0, 0, 0.5);"><span
class="scaleFont">{{item.resourceType=='RAT01'?"话题":item.resourceType=='RAT02'?"活动":item.resourceType=='RAT03'?"报告":"文章"}}</span></span>
</div>
<div class="rightInfo" v-if="item.resourceType=='RAT02'">
<p class="activityTitle activityLive">
......@@ -334,7 +338,7 @@
:visible="isLogin"></applyLoginCmpt>
<itegralCmpt :visible="getIntegralVisible" v-if="getIntegralVisible" :integral="integral"
@handleHideIntegral="handleHideIntegral"></itegralCmpt>
<guestDialogCmpt v-if="guestVisible"></guestDialogCmpt>
<guestDialogCmpt @closeGuestDialog="closeGuestDialog" v-if="guestVisible" :guestInfo="guestInfo"></guestDialogCmpt>
</div>
</template>
<script>
......@@ -394,7 +398,8 @@
recommendedData: [],
currentCommendActivity: null,
recentlyList: [],
sameContentData: []
sameContentData: [],
guestInfo:null
}
},
......@@ -843,6 +848,15 @@
this.isLogin = true;
},
showGuestDialogFunc(data){
this.guestInfo = data;
this.guestVisible = true;
},
closeGuestDialog(){
this.guestVisible = false;
},
handleShowAll() {
this.showAll = !this.showAll;
},
......@@ -904,18 +918,16 @@
if (this.lang == 1) {
if (!this.userInfo) this.isLogin = true;
else {
if (!flag) {
if(data.empId){
if (data.empId != this.userInfo.empId) this.$router.push({
path: "/personalCenterInfo",
query: {empId: data.empId}
});
else this.$router.push({path: "/mine"});
} else {
if (data.otherEmpId != this.userInfo.empId) this.$router.push({
path: "/personalCenterInfo",
query: {empId: data.otherEmpId}
});
else this.$router.push({path: "/mine"});
}else {
this.guestInfo = data;
this.guestVisible = true;
}
}
}
......@@ -1299,6 +1311,7 @@
width: 2.5rem;
height: 1.5rem;
border-radius: .06rem;
object-fit: cover;
}
}
div.rightInfo {
......
......@@ -3,11 +3,13 @@
<breadTop :title="title" :isReturn="true" :isTop="true" :isSearch="false" :isColor="false"
:grayColor="true" style="border-bottom:1px solid #F2F2F2"></breadTop>
<div class="contentWrapper">
<followCmpt ref="followCmpt" :isShowCount="false" @quicklyLoginFunc="quicklyLoginFunc" :guestList="true"
:circleType="25" :fixed="true"></followCmpt>
<followCmpt ref="followCmpt" :activityId="Number($route.query.id)" :isShowCount="false" @quicklyLoginFunc="quicklyLoginFunc" :guestList="true"
:circleType="25" :fixed="true" @showGuestDialogFunc="showGuestDialogFunc"></followCmpt>
</div>
<applyLoginCmpt v-if="isLogin" @isShowLoginDialogFunc="isShowLoginDialogFunc" :registerType="loginType"
:visible="isLogin"></applyLoginCmpt>
<guestDialogCmpt @closeGuestDialog="closeGuestDialog" v-if="guestVisible" :guestInfo="guestInfo"></guestDialogCmpt>
</div>
</template>
......@@ -18,20 +20,24 @@
import {Toast} from 'mint-ui';
import applyLoginCmpt from '../../../components/mobile/applyLogin';
import followCmpt from '../../../components/mobile/guestFollowCmpt';
import guestDialogCmpt from '../../../components/mobile/guestDialogCmpt';
export default {
name: "guestList",
components: {
breadTop,
applyLoginCmpt,
followCmpt
followCmpt,
guestDialogCmpt
},
data() {
return {
title: "嘉宾列表",
title: this.$t("activityInfo.guestList"),
isLogin: false,
userInfo: this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null,
loginType: 64,
guestVisible:false,
guestInfo:null
}
},
......@@ -49,6 +55,16 @@
this.isLogin = data;
this.userInfo = this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null;
},
closeGuestDialog(){
this.guestVisible = false;
},
showGuestDialogFunc(data){
this.guestInfo = data;
this.guestVisible = true;
},
},
mounted() {
......
......@@ -72,7 +72,7 @@
<el-button size="mini" plain type="primary" @click="handleApply(item)"
:disabled="item.disabledFlag>0"
v-if="item.activityState==2&&item.isJoin==2">
{{$t("activityInfo.freeApply")}}
{{item.viewDesc?item.viewDesc:$t("activityInfo.freeApply")}}
</el-button>
<el-button type="text" @click="handleToDetail(item)" class="hasApplied" size="mini"
v-if="item.activityState==2&&item.isJoin==1"><span>{{$t("activityInfo.hasApply")}}</span>
......
......@@ -4,10 +4,12 @@
:grayColor="true" style="border-bottom:1px solid #F2F2F2"></breadTop>
<div class="contentWrapper">
<followCmpt ref="followCmpt" :activityId="Number($route.query.id)" :isShowCount="false" @quicklyLoginFunc="quicklyLoginFunc" :partList="true"
:circleType="27" :fixed="true"></followCmpt>
:circleType="27" :fixed="true" @showGuestDialogFunc="showGuestDialogFunc"></followCmpt>
</div>
<applyLoginCmpt v-if="isLogin" @isShowLoginDialogFunc="isShowLoginDialogFunc" :registerType="loginType"
:visible="isLogin"></applyLoginCmpt>
<guestDialogCmpt @closeGuestDialog="closeGuestDialog" v-if="guestVisible" :guestInfo="guestInfo"></guestDialogCmpt>
</div>
</template>
......@@ -18,13 +20,15 @@
import {Toast} from 'mint-ui';
import applyLoginCmpt from '../../../components/mobile/applyLogin';
import followCmpt from '../../../components/mobile/guestFollowCmpt';
import guestDialogCmpt from '../../../components/mobile/guestDialogCmpt';
export default {
name: "guestList",
components: {
breadTop,
applyLoginCmpt,
followCmpt
followCmpt,
guestDialogCmpt
},
data() {
return {
......@@ -32,7 +36,8 @@
isLogin: false,
userInfo: this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null,
loginType: 64,
guestInfo:null,
guestVisible:false
}
},
methods: {
......@@ -49,6 +54,15 @@
this.isLogin = data;
this.userInfo = this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null;
},
closeGuestDialog(){
this.guestVisible = false;
},
showGuestDialogFunc(data){
this.guestInfo = data;
this.guestVisible = true;
},
},
mounted() {
......
......@@ -154,7 +154,7 @@
v-if="((userInfo&&userInfo.empId!=item.contentDetail.createdBy)||!userInfo)&&item.contentDetail.channelType!=5">
<p @click="handleApply(item.contentDetail)" class="freeApply"
v-if="item.contentDetail.activityState==2&&item.contentDetail.isJoin==2">
{{$t("activityInfo.freeApply")}}</p>
{{item.contentDetail.viewDesc?item.contentDetail.viewDesc:$t("activityInfo.freeApply")}}</p>
<el-button type="text" @click="handleToActivity(item.contentDetail)"
class="hasApplied" size="mini"
v-if="item.contentDetail.activityState==2&&item.contentDetail.isJoin==1">
......@@ -312,7 +312,7 @@
<div class="right"
v-if="((userInfo&&userInfo.empId!=item.createdBy)||!userInfo)&&item.channelType!=5">
<p @click="handleApply(item)" class="freeApply"
v-if="item.activityState==2&&item.isJoin==2">{{$t("activityInfo.freeApply")}}</p>
v-if="item.activityState==2&&item.isJoin==2">{{item.viewDesc?item.viewDesc:$t("activityInfo.freeApply")}}</p>
<el-button type="text" @click="handleToActivity(item)" class="hasApplied"
size="mini" v-if="item.activityState==2&&item.isJoin==1"><span>{{$t("activityInfo.hasApply")}}</span>
</el-button>
......
......@@ -294,6 +294,9 @@
else if(this.pathfrom=="/mine"){
this.$router.push(this.pathfrom);
}
else if(this.pathfrom == "/settings"){
this.$router.push("/mine");
}
else this.$router.go(-1);
}
else {
......
......@@ -238,6 +238,9 @@
else if(this.pathfrom=="/mine"){
this.$router.push(this.pathfrom);
}
else if(this.pathfrom == "/settings"){
this.$router.push("/mine");
}
else this.$router.go(-1);
}
else {
......
......@@ -186,6 +186,9 @@
else if(this.pathfrom=="/mine"){
this.$router.push(this.pathfrom);
}
else if(this.pathfrom == "/settings"){
this.$router.push("/mine");
}
else this.$router.go(-1);
}
......
<template>
<div>
<el-form :model="loginForm" :rules="rules" ref="loginForm" @keyup.enter.native="handleLogin('loginForm')" v-if="isShow"
<el-form :model="loginForm" :rules="rules" ref="loginForm" @keyup.enter.native="handleLogin('loginForm')"
v-if="isShow"
class="demo-loginForm">
<el-form-item prop="phone">
<el-input v-model="loginForm.phone" @blur="publicFun.phpneInputblurFunc()" :placeholder="$t('errorValidate.errorNoAccount')" autocomplete></el-input>
<el-input v-model="loginForm.phone" @blur="publicFun.phpneInputblurFunc()"
:placeholder="$t('errorValidate.errorNoAccount')" autocomplete></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input type="password" v-model="loginForm.password" @blur="publicFun.phpneInputblurFunc()" :placeholder="$t('commonTips.placeholderPwd')" maxlength="18"
<el-input type="password" v-model="loginForm.password" @blur="publicFun.phpneInputblurFunc()"
:placeholder="$t('commonTips.placeholderPwd')" maxlength="18"
autocomplete></el-input>
</el-form-item>
<!--<el-form-item class="remumberPass">-->
<!--<el-checkbox name="type" v-model="checked">{{$t('commonTips.rememberPwd')}}</el-checkbox>-->
<!--<span @click="handleForget">{{$t('commonTips.forgetPwd')}}</span>-->
<!--<el-checkbox name="type" v-model="checked">{{$t('commonTips.rememberPwd')}}</el-checkbox>-->
<!--<span @click="handleForget">{{$t('commonTips.forgetPwd')}}</span>-->
<!--</el-form-item>-->
<el-form-item style="margin-bottom: 0;margin-top: .8rem;">
<el-button type="primary" :disabled="flag>0" class="loginButton" @click.native="handleLogin('loginForm')" v-loading.fullscreen="fullscreenLoading">{{$t('commonTips.login')}}</el-button>
<el-button type="primary" :disabled="flag>0" class="loginButton"
@click.native="handleLogin('loginForm')" v-loading.fullscreen="fullscreenLoading">
{{$t('commonTips.login')}}
</el-button>
</el-form-item>
<el-form-item class="registerButton">
<span>{{$t('commonTips.registerTitle')}}</span><span @click="handleRegister">{{$t('commonTips.alreadyRegister')}}</span>
......@@ -30,60 +36,61 @@
import validate from '../../../common/validate';
import publicFunc from '../../../common/public';
import selectFlag from '../selectInterset';
import { Toast } from 'mint-ui';
import {Toast} from 'mint-ui';
export default {
name: "phonePwdCmpt",
components:{
components: {
selectFlag
},
data(){
return{
isShow:true,
isShowFlag:false,
checked:this.publicFun.getCookie("checked")=='true'?true:false,
lang:this.$i18n.locale=="zh-CN"?1:2,
data() {
return {
isShow: true,
isShowFlag: false,
checked: this.publicFun.getCookie("checked") == 'true' ? true : false,
lang: this.$i18n.locale == "zh-CN" ? 1 : 2,
loginForm: {
phone: "",
password: ""
},
flag:0,
fullscreenLoading:false,
flag: 0,
fullscreenLoading: false,
rules: {
phone: [
{required: true, validator:validate.checkMobileAndEmail, trigger: 'blur'},
{required: true, validator: validate.checkMobileAndEmail, trigger: 'blur'},
],
password:[
{required: true, validator:validate.checkPassWord, trigger: 'blur'}
password: [
{required: true, validator: validate.checkPassWord, trigger: 'blur'}
]
},
outSideParams:window.location.href.split("?")?window.location.href.split("?")[1]:null,
outSideParams: window.location.href.split("?") ? window.location.href.split("?")[1] : null,
}
},
props:{
pathfrom:""
props: {
pathfrom: ""
},
methods:{
methods: {
timeOutReturn(){
timeOutReturn() {
var that = this;
setTimeout(function(){
that.flag=0;
setTimeout(function () {
that.flag = 0;
return false;
},500)
}, 500)
},
//登录
handleLogin(formName) {
const that =this;
this.publicFun.setUserInfoCookie("checked",this.checked);
const that = this;
this.publicFun.setUserInfoCookie("checked", this.checked);
this.$refs[formName].validate((valid) => {
if (valid) {
if(that.flag==0){
if (that.flag == 0) {
that.flag++;
that.submitLoginFormFunc();
that.timeOutReturn()
}else{
} else {
that.timeOutReturn()
}
} else {
......@@ -99,27 +106,27 @@
},
//去注册
handleRegister(){
handleRegister() {
var queryData = this.$route.query;
queryData.isEmail = "1";
this.$router.push({path:"/mobileRegister",query:queryData});
this.$router.push({path: "/mobileRegister", query: queryData});
},
//判断是否选中记住密码
isCheckedPassword(){
isCheckedPassword() {
const self = this;
//判断复选框是否被勾选 勾选则调用配置cookie方法
if (self.checked == true) {
//传入账号名,密码,和保存天数3个参数
publicFunc.setCookie(self.loginForm.phone, this.Base64.encode(self.loginForm.password), 90);
}else {
} else {
//清空Cookie
publicFunc.clearCookie();
}
},
//读取cookie
getCookie: function() {
getCookie: function () {
if (document.cookie.length > 0) {
var arr = document.cookie.split('; '); //这里显示的格式需要切割一下自己可输出看下
for (var i = 0; i < arr.length; i++) {
......@@ -135,32 +142,32 @@
},
//提交注册表单
submitLoginFormFunc(){
submitLoginFormFunc() {
this.isCheckedPassword();
var loginFormParams = {
account: this.loginForm.phone,
password: this.$md5(this.loginForm.password),
loginPcOrApp:1,
loginPcOrApp: 1,
// loginWay:0,
rememberMe:this.checked
rememberMe: this.checked
}
this.fullscreenLoading = true;
this.loginByPswFunc(loginFormParams);
},
//通过密码登录
loginByPswFunc(params){
var that = this,params1 = this.$route.query.isEmail?this.outSideParams:null;
api.resultLoginAxios(params,params1).then((res)=>{
loginByPswFunc(params) {
var that = this, params1 = this.$route.query.isEmail ? this.outSideParams : null;
api.resultLoginAxios(params, params1).then((res) => {
this.fullscreenLoading = false;
if(res.code==0){
if (res.code == 0) {
that.commonResResult(res.result);
}else{
} else {
that.$toast(res.msg);
that.timeOutReturn()
}
}).catch((err)=>{
}).catch((err) => {
that.$toast(err);
that.timeOutReturn()
......@@ -168,9 +175,9 @@
},
//返回统一处理
commonResResult(data){
commonResResult(data) {
var that = this;
if(this.publicFun.getUserInfoCookieType()){
if (this.publicFun.getUserInfoCookieType()) {
this.publicFun.removeCookieType();
}
......@@ -181,75 +188,78 @@
},
//跳转
routerLinkFunc(){
if(this.pathfrom){
if(this.pathfrom.indexOf("login")!=-1||this.pathfrom.indexOf("Login")!=-1||this.pathfrom=="/"||this.pathfrom.indexOf("/mobileRegister")!=-1) {
if(this.publicFun.getCookie("selected")&&this.publicFun.getCookie("selected")!="index"){
routerLinkFunc() {
if (this.pathfrom) {
if (this.pathfrom.indexOf("login") != -1 || this.pathfrom.indexOf("Login") != -1 || this.pathfrom == "/" || this.pathfrom.indexOf("/mobileRegister") != -1) {
if (this.publicFun.getCookie("selected") && this.publicFun.getCookie("selected") != "index") {
switch (this.publicFun.getCookie("selected")) {
case "contact":
this.$router.push({path:"/tabconnect",query:{tabIndex:1}})
this.$router.push({path: "/tabconnect", query: {tabIndex: 1}})
break;
case "mine":
this.publicFun.setOtherCookie("selected","mine")
this.publicFun.setOtherCookie("selected", "mine")
this.$router.push("/mine")
}
}else{
} else {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
this.publicFun.setUserInfoCookie("selected", "index");
globalMsg.$emit("sendSelected", "index");
}
}
else if(this.pathfrom=="/mine"){
else if (this.pathfrom == "/mine") {
this.$router.push(this.pathfrom);
}
else if(this.pathfrom == "/settings"){
this.$router.push("/mine");
}
else {
this.$router.go(-1);
}
}
else {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
this.publicFun.setUserInfoCookie("selected", "index");
globalMsg.$emit("sendSelected", "index");
}
},
hasSetPassword(){
api.hasSetPasswordAxios().then((res)=>{
if(res.code==0){
if(!res.result){
hasSetPassword() {
api.hasSetPasswordAxios().then((res) => {
if (res.code == 0) {
if (!res.result) {
this.$router.push("/setPassword");
}
}else{
} else {
this.$toast(res.msg);
}
}).catch((err)=>{
}).catch((err) => {
this.$toast(err)
})
},
postData(){
postData() {
this.routerLinkFunc()
},
//是否选择了感兴趣领域标签
isSelectedInterstedFlag(){
let m = selectFlag.methods.getIntersetFlag,that = this;
isSelectedInterstedFlag() {
let m = selectFlag.methods.getIntersetFlag, that = this;
// 以下是把 m 的 `this` 指向到本组件
let pdata = m.call(this);
// ******************console.log(pdata);******************
let a = Promise.resolve(pdata);
a.then(function (result) {
if(that.publicFun.getUserInfoCookieType()&&result){
if (that.publicFun.getUserInfoCookieType() && result) {
that.isShow = true;
that.isShowFlag = false;
that.routerLinkFunc();
}else{
if(that.publicFun.getUserDetailRoleFunc()!=2){
} else {
if (that.publicFun.getUserDetailRoleFunc() != 2) {
that.isShow = false;
that.isShowFlag = true;
}else that.routerLinkFunc();
} else that.routerLinkFunc();
}
that.timeOutReturn()
})
......@@ -271,6 +281,7 @@
cursor: pointer;
}
}
.loginButton {
width: 100%;
height: 1rem;
......
......@@ -3,8 +3,10 @@
<div class="closeBtn" v-if="isCmpt&&!isSearch">
<i class="iconfont icon-cuowu" @click="handleTo"></i>
</div>
<intersetedCmpt :screenlist="intersetList" :isCmpt="isCmpt" :isGou="isChannel" v-if="intersetList.length>0" :isSearch="isSearch"
:title="isChannel?'全部频道':$t('interseted.title')" :otherTitle="isChannel?false:true" :isEditInfo="isEditInfo"
<intersetedCmpt :screenlist="intersetList" :isCmpt="isCmpt" :isGou="isChannel" v-if="intersetList.length>0"
:isSearch="isSearch"
:title="isChannel?'全部频道':$t('interseted.title')" :otherTitle="isChannel?false:true"
:isEditInfo="isEditInfo"
@postCheckBoxGroup="handleConfirm"></intersetedCmpt>
</div>
</template>
......@@ -13,6 +15,7 @@
import intersetedCmpt from '../../components/mobile/intersetedCmpt';
import api from '../../common/commonApi';
import {Toast} from 'mint-ui'
export default {
name: "selectInterset",
components: {
......@@ -41,9 +44,9 @@
type: Boolean,
default: true
},
isEditInfo:{//编辑兴趣领域标签
type:Boolean,
default:false
isEditInfo: {//编辑兴趣领域标签
type: Boolean,
default: false
},
init: {
type: Boolean,
......@@ -58,7 +61,7 @@
return {
intersetList: [],
disabledFlag: 0,
selectedFlagArr:[],
selectedFlagArr: [],
userInfo: this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null,
}
......@@ -68,7 +71,7 @@
getInitSelect() {
var that = this;
this.selectedFlagArr = this.selectedFlag;
if(this.init){
if (this.init) {
if (this.userInfo) {
api.getUserIntersetedFlagAxios().then((res) => {
if (res.code == 0) {
......@@ -81,14 +84,14 @@
this.$toast(err);
})
}
}else{
} else {
this.initAllData()
}
},
//所有初始化数据
initAllData(){
initAllData() {
var that = this;
api.getIntersetedDictAxios().then(response => {
if (response.code == 0) {
......@@ -123,7 +126,7 @@
var that = this;
if (this.disabledFlag == 0) {
this.disabledFlag++;
if (this.isChannel||this.isSearch) {
if (this.isChannel || this.isSearch) {
this.$emit("postData", data);
} else {
api.postIntersetedDictAxios(data).then(res => {
......@@ -182,6 +185,9 @@
else if (this.pathfrom == "/mine") {
this.$router.push(this.pathfrom);
}
else if(this.pathfrom == "/settings"){
this.$router.push("/mine");
}
else {
this.$router.go(-1);
}
......@@ -265,7 +271,7 @@
padding-bottom: 1rem;
overflow: auto;
z-index: 9999;
&.paddingTopWrap{
&.paddingTopWrap {
top: 1rem;
padding-left: .3rem;
padding-right: .3rem;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment