Commit 7ea31e73 authored by anxixi's avatar anxixi

Merge remote-tracking branch 'origin/master'

parents d82926ec f4be715a
......@@ -5,6 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta name="keywords" content="TechBook,技术对接平台,创新服务平台,科创社区,找项目,找需求,techbook.co,创新产业升级" />
<meta name="description" content="TechBook是太库旗下线上科创社区和产业创新对接合作平台。聚焦全球AloT、机器人、AVR、新能源、智慧医疗等行业的科创项目和具有明确技术创新和技术合作的大企业,通过线上匹配+线下服务的模式,力争成为中国大企业探寻技术创新的主要工具和全球科创企业技术产品的首发平台。聚焦全球科技创新创业人群,力求打造活跃的科创交流社区。" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>TechBook-大企业与全球科创项目的即时对接平台</title>
<style>
......
import api from "../api/api";
import Qs from 'qs';
export default {
tipInfo (){
return api.fetchPost('/business/tip/tipInfo');
},
//获取感兴趣字典表接口
getIntersetedDictAxios(){
return api.fetchLoadingPost('/business/content/selectBaseDataList');
},
//提交感兴趣领域标签
postIntersetedDictAxios(params){
return api.fetchLoadingPost('/business/content/addEmpDataLabel',params);
},
//获取用户选择标签
getUserIntersetedFlagAxios(){
return api.fetchPost('/business/content/selectEmpDataLabelList')
}
}
......@@ -1783,7 +1783,8 @@ module.exports = {
interseted:{
title:"请选择您感兴趣的领域",
check:"(可多选)"
check:"(可多选)",
add:"添加兴趣领域"
},
articleInfo:{
......
......@@ -1876,7 +1876,8 @@ module.exports = {
interseted:{
title:"请选择您感兴趣的领域",
check:"(可多选)"
check:"(可多选)",
add:"添加兴趣领域"
},
......
import Vue from 'vue';
import publicFun from '@/assets/js/public.js';
import api from './commonApi';
let userInfoObj = "";
export default {
//根据ID获取name,适用于select,radio
......@@ -285,5 +286,4 @@ export default {
})
}
}
\ No newline at end of file
......@@ -4,12 +4,12 @@
<p class="screenTitle">{{title}} <span v-if="otherTitle">{{$t("interseted.check")}}</span></p>
<div class="firstLine">
<ul>
<li v-for="item in screenlist" :class="item.checked?'activeLi':''" @click="checkClik(item)">{{item.industryName}}</li>
<li v-for="item in screenlist" :class="item.checked?'activeLi':''" @click="checkClik(item)">{{item.dataName}}</li>
</ul>
</div>
</div>
<div class="buttonWrapper">
<el-button type="primary" @click="handleConfirm">{{$t("findPassword.nextStep")}}</el-button>
<el-button type="primary" :disabled="checkboxGroup.length==0" @click="handleConfirm">{{$t("findPassword.nextStep")}}</el-button>
</div>
</div>
</template>
......@@ -73,44 +73,29 @@
checkClik(item){
item.checked = !item.checked;
if(item.checked){
this.checkboxGroup.push(item.industryId);
this.checkboxGroup.push(item.dataId);
}else{
for(var i=0;i<this.checkboxGroup.length;i++){
if(item.industryId==this.checkboxGroup[i]){
if(item.dataId==this.checkboxGroup[i]){
this.checkboxGroup.splice(i,1);
i--;
}
}
}
console.log(this.checkboxGroup)
for ( let i in this.screenlist ) {
if ( this.screenlist[i].industryId == this.checkboxGroup[0] ) {
this.screenlist[i].checked = true;
this.screenchildList = this.screenlist[i].screenchildList;
if(this.screenchildList){
this.screenchildList.forEach((item)=>{
item.checked = false;
})
}
} else {
this.screenlist[i].checked = false;
if(this.screenchildList){
this.screenchildList.forEach((item)=>{
item.checked = false;
})
}
}
}
},
handleConfirm(){
console.log(this.checkboxGroup)
this.$emit("postCheckBoxGroup",this.checkboxGroup)
}
},
mounted(){
if(this.screenlist.length>0){
this.screenlist.forEach((item,index)=>{
if(item.checked) this.checkboxGroup.push(item.dataId)
})
}
}
}
</script>
......@@ -145,7 +130,7 @@
flex-wrap: wrap;
align-items: center;
li{
min-width: 30%;
/*min-width: 30%;*/
text-align: center;
height: .6rem;
background: #F2F2F2;
......
......@@ -179,10 +179,14 @@ router.beforeEach((to, from, next) => {
publicFun.setUserInfoCookie("fullPath",false);
}
if(to.path == '/projectrelease'||to.path == '/addPhoneRequire'||to.path=='/mine'){
router.push('/mobileLogin')
if (i18n.locale == "zh-CN") router.push({path:'/loginByPhone',query:to.query});
else router.push({path:'/loginByEmail',query:to.query})
}else{
if(ismobile==1) router.push('/mobileRegister');
else router.push('/login');
else {
if (i18n.locale == "zh-CN") router.push({path:'/mobileLoginCmpt',query:to.query});
else router.push({path:'/emailLoginCmpt',query:to.query})
}
}
}
}
......
......@@ -92,7 +92,6 @@ const subjectcommentMore = () => import('views/mobile/proFeedback/commentMore');
const mineIndex = () => import('views/mobile/mine');//我的
const minePublished = () => import('views/mobile/published');//已发布
const subjectStage =()=> import("views/mobile/proFeedback/stagerouter");//某个阶段
const selectScreen = ()=> import("views/mobile/selectInterset");//感兴趣标签
Vue.use(Router)
const originalReplace = Router.prototype.replace;
......@@ -1137,13 +1136,7 @@ export default new Router({
name: 'subjectresultpage',
}
]
},
{
path:"/selectScreen",
component:selectScreen,
name:"selectScreen"
},
}
]
})
......@@ -120,7 +120,10 @@
registerChannel:this.channelData.channelId,
registerPcOrApp:1,
registerSource:1,
registerType:0
registerType:0,
rDeviceId:this.publicFun.getCookie("rDeviceId")&&this.publicFun.getCookie("rDeviceId")!=undefined ? this.publicFun.getCookie("rDeviceId") : null,
rEmpId:this.publicFun.getCookie("rEmpId")&&this.publicFun.getCookie("rEmpId")!=undefined ? this.publicFun.getCookie("rEmpId") : null,
rTargetType:this.publicFun.getCookie("rTargetType")&&this.publicFun.getCookie("rTargetType")!=undefined ? this.publicFun.getCookie("rTargetType") : null
};
this.fullscreenLoading = true;
api.resultUserRegisterAxios(params).then((res)=>{
......
......@@ -155,7 +155,10 @@
registerPcOrApp:0,
registerSource:this.$route.query.refereesId>0?2:
this.$route.query.registerChannel>0?1:0,
registerType:1
registerType:1,
rDeviceId:this.publicFun.getCookie("rDeviceId")&&this.publicFun.getCookie("rDeviceId")!=undefined ? this.publicFun.getCookie("rDeviceId") : null,
rEmpId:this.publicFun.getCookie("rEmpId")&&this.publicFun.getCookie("rEmpId")!=undefined ? this.publicFun.getCookie("rEmpId") : null,
rTargetType:this.publicFun.getCookie("rTargetType")&&this.publicFun.getCookie("rTargetType")!=undefined ? this.publicFun.getCookie("rTargetType") : null
},params1 = this.$route.query.isEmail?this.outSideParams:null;
this.fullscreenLoading = true;
api.resultUserRegisterAxios(params,params1).then((res)=>{
......
......@@ -149,7 +149,9 @@
registerPcOrApp:0,
registerSource:this.$route.query.refereesId>0?2:
this.$route.query.registerChannel>0?1:0,
// registerType:0
rDeviceId:this.publicFun.getCookie("rDeviceId")&&this.publicFun.getCookie("rDeviceId")!=undefined ? this.publicFun.getCookie("rDeviceId") : null,
rEmpId:this.publicFun.getCookie("rEmpId")&&this.publicFun.getCookie("rEmpId")!=undefined ? this.publicFun.getCookie("rEmpId") : null,
rTargetType:this.publicFun.getCookie("rTargetType")&&this.publicFun.getCookie("rTargetType")!=undefined ? this.publicFun.getCookie("rTargetType") : null
},params1 = this.$route.query.isEmail?this.outSideParams:null;
this.fullscreenLoading = true;
api.resultUserRegisterAxios(params,params1).then((res)=>{
......
......@@ -14,7 +14,7 @@ export default {
//活动报名列表分页
getActivityListAxios(params){
return api.fetchGet("/base/channel/searchActivity?"+Qs.stringify(params));
return api.fetchLoadingGet("/base/channel/searchActivity?"+Qs.stringify(params));
},
//报名活动详情
......
......@@ -363,7 +363,17 @@
this.applyVisible= false;
this.getDetailInfo();
},
setCookieFunc(){
if(this.$route.query.rTargetType){
this.publicFun.setUserInfoCookie("rTargetType",this.$route.query.rTargetType);
}
if(this.$route.query.rDeviceId){
this.publicFun.setUserInfoCookie("rDeviceId",this.$route.query.rDeviceId);
}
if(this.$route.query.rEmpId){
this.publicFun.setUserInfoCookie("rEmpId",this.$route.query.rEmpId);
}
}
},
created(){
......@@ -372,6 +382,11 @@
},
mounted(){
this.getDetailInfo();
if(this.$route.query.rTargetType){
this.publicFun.setUserInfoCookie("rTargetType",this.$route.query.rTargetType);
}
this.setCookieFunc();
}
}
</script>
......
......@@ -2,11 +2,11 @@
<div>
<div>
<div class="activity_top">
<p style="display: flex;justify-content: space-between">
<el-input placeholder="请输入活动关键字" v-model="keyName" prefix-icon="el-icon-search" class="activity_search_input">
<p style="display: flex;justify-content: center">
<!--<el-input placeholder="请输入活动关键字" v-model="keyName" prefix-icon="el-icon-search" class="activity_search_input">-->
</el-input>
<span class="search-btn" @click="handleSearch">搜索</span>
<!--</el-input>-->
<!--<span class="search-btn" @click="handleSearch">搜索</span>-->
<el-button type="text" @click="searchinput" class="text-search">按地区筛选<i class="iconfont icon-xiala" style="font-size: .24rem;margin-left: .1rem;"></i>
</el-button>
</p>
......@@ -335,11 +335,12 @@
<style scoped lang="scss">
.activity_top{
margin: .15rem .2rem;
padding: .1rem 0 .15rem;
padding-bottom: .2rem;
margin-bottom: 0;
margin: 0 .2rem;
position: relative;
height: .95rem;
display: flex;
align-items: center;
justify-content: center;
&::after{
content:"";
position: absolute;
......@@ -358,7 +359,7 @@
}
.text-search{
color: #3F3F53;
font-size: .24rem;
font-size: .28rem;
font-weight: normal;
}
.search-btn{
......
......@@ -99,45 +99,6 @@
</div>
</div>
<div class="tabWrapper cooperationWrapper">
<div class="topTitle">
<div>
<h4><span></span>{{$t("indexCount.cooperationCase")}}</h4>
<div @click="handleMore(3)"><span>{{$t("indexCount.lookMore")}}</span><i class="iconfont icon-you"></i></div>
</div>
<div class="div1px"></div>
</div>
<div class="cooperationUl">
<ul>
<li v-for="item in $t('cooperationCase.datajson')" :key="item.id"
@click="handleToCooperation(item)">
<div>
<img :src="item.images" alt="" v-lazy="item.images">
</div>
<p>{{item.pcontent}}</p>
<span>{{item.spancontent}}</span>
</li>
</ul>
</div>
</div>
<div class="tabWrapper firendLinkWrapper" v-if="false">
<div class="topTitle">
<span></span>
<h4>{{$t("bottomNav.friendlyLink")}}</h4>
<div class="borderBottom80px"></div>
</div>
<div class="partnerUl">
<ul>
<li v-for="item in friendlyLink" :key="item.id" @click="handleToLink(item,index)">
<img :src="item.imageUrl" alt="">
</li>
</ul>
</div>
</div>
<div v-if="setTimeVisible">
<el-dialog class="dialogWrapSetTime"
:visible.sync="setTimeVisible"
......
......@@ -121,10 +121,28 @@
this.publicFun.removeCookie("userInfo");
}
this.publicFun.setUserInfoCookie("userInfo",that.Base64.encode(JSON.stringify(data)));
this.$router.go(-1);
this.routerLinkFunc();
that.timeOutReturn();
},
//跳转
routerLinkFunc(){
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}})
break;
case "mine":
this.publicFun.setOtherCookie("selected","mine")
this.$router.push("/mine")
}
}else{
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
},
hasSetPassword(){
api.hasSetPasswordAxios().then((res)=>{
if(res.code==0){
......@@ -145,7 +163,10 @@
accountName: this.yzCodeForm.phone,
code: this.yzCodeForm.code,
appId:"wx725d0e129f703106",
openid:this.$route.query.id
openid:this.$route.query.id,
rDeviceId:this.publicFun.getCookie("rDeviceId")&&this.publicFun.getCookie("rDeviceId")!=undefined ? this.publicFun.getCookie("rDeviceId") : null,
rEmpId:this.publicFun.getCookie("rEmpId")&&this.publicFun.getCookie("rEmpId")!=undefined ? this.publicFun.getCookie("rEmpId") : null,
rTargetType:this.publicFun.getCookie("rTargetType")&&this.publicFun.getCookie("rTargetType")!=undefined ? this.publicFun.getCookie("rTargetType") : null
}
this.fullscreenLoading = true;
......
<template>
<div>
<el-form :model="emailYzCodeForm" :rules="rulesCode" ref="emailYzCodeForm" @keyup.enter.native="handleLogin(2,'emailYzCodeForm')"
<el-form :model="emailYzCodeForm" :rules="rulesCode" ref="emailYzCodeForm" @keyup.enter.native="handleLogin(2,'emailYzCodeForm')" v-if="isShow"
class="demo-emailForm">
<el-form-item prop="email">
<el-input v-model="emailYzCodeForm.email" @input="isTrueEmail"
......@@ -34,6 +34,7 @@
<span>{{$t('commonTips.registerTitle')}}</span><span @click="handleRegister">{{$t('commonTips.alreadyRegister')}}</span>
</el-form-item>
</el-form>
<selectFlag @postData="postData" :pathfrom="pathfrom" v-if="isShowFlag"></selectFlag>
</div>
</template>
......@@ -42,14 +43,21 @@
import sliderCmpt from '../../../components/common/puzzleSlider';
import api from '../../loginregister/api/api';
import { Toast } from 'mint-ui';
import selectFlag from '../selectInterset';
import publicFunc from '../../../common/public';
export default {
name: "emCodeCmpt",
components:{
sliderCmpt
sliderCmpt,
selectFlag
},
props:{
pathfrom:""
},
data(){
return{
isShow:true,
isShowFlag:false,
codehtml: "getCode",
lang: this.$i18n.locale == "zh-CN" ? 1 : 2,
emailYzCodeForm: {
......@@ -145,27 +153,35 @@
}
this.publicFun.setUserInfoCookie("userInfo",that.Base64.encode(JSON.stringify(data)));
globalMsg.$emit('getUserInfo')
if(this.pathfrom){
if(this.pathfrom.indexOf("login")!=-1||this.pathfrom.indexOf("Login")!=-1||this.pathfrom=="/") {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
else if(this.pathfrom=="/mine"){
this.$router.push(this.pathfrom);
}
else this.$router.go(-1);
}
else {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
that.timeOutReturn();
this.isSelectedInterstedFlag();
},
//是否选择了感兴趣领域标签
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.getCookie("userInfo")&&result){
that.isShow = true;
that.isShowFlag = false;
that.routerLinkFunc();
}else{
if(that.publicFun.getUserDetailRoleFunc()!=2){
that.isShow = false;
that.isShowFlag = true;
}else that.routerLinkFunc();
}
that.timeOutReturn()
})
},
//登录
handleLogin(type, formName) {
const that = this;
......@@ -255,6 +271,41 @@
this.$toast(err)
})
},
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}})
break;
case "mine":
this.publicFun.setOtherCookie("selected","mine")
this.$router.push("/mine")
}
}else{
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
}
else if(this.pathfrom=="/mine"){
this.$router.push(this.pathfrom);
}
else this.$router.go(-1);
}
else {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
},
postData(){
this.routerLinkFunc()
}
},
mounted() {
globalMsg.$on("isPhoneSendCode",(data,which)=>{
......
<template>
<div>
<el-form :model="emailForm" :rules="rulesCode" ref="emailForm" @keyup.enter.native="handleLogin(1,'emailForm')"
<el-form :model="emailForm" :rules="rulesCode" ref="emailForm" @keyup.enter.native="handleLogin(1,'emailForm')" v-if="isShow"
class="demo-emailForm">
<el-form-item prop="email">
<el-input v-model="emailForm.email" :placeholder="$t('commonTips.placeholderEmail')"
......@@ -21,6 +21,7 @@
<span>{{$t('commonTips.registerTitle')}}</span><span @click="handleRegister">{{$t('commonTips.alreadyRegister')}}</span>
</el-form-item>
</el-form>
<selectFlag @postData="postData" :pathfrom="pathfrom" v-if="isShowFlag"></selectFlag>
</div>
</template>
......@@ -30,14 +31,21 @@
import publicFunc from '../../../common/public';
import sliderCmpt from '../../../components/login/slider';
import api from '../../loginregister/api/api';
import selectFlag from '../selectInterset';
import { Toast } from 'mint-ui';
export default {
name: "emPwdCmpt",
props:{
pathfrom:""
},
components: {
sliderCmpt
sliderCmpt,
selectFlag
},
data(){
return{
isShow:true,
isShowFlag:false,
lang: this.$i18n.locale == "zh-CN" ? 1 : 2,
checked: this.publicFun.getCookie("checked") == 'true' ? true : false,
emailForm: {
......@@ -131,25 +139,32 @@
}
this.publicFun.setUserInfoCookie("userInfo",that.Base64.encode(JSON.stringify(data)));
globalMsg.$emit('getUserInfo')
if(this.pathfrom){
if(this.pathfrom.indexOf("login")!=-1||this.pathfrom.indexOf("Login")!=-1||this.pathfrom=="/") {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
else if(this.pathfrom=="/mine"){
this.$router.push(this.pathfrom);
}
else this.$router.go(-1);
}
else {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
this.timeOutReturn();
this.isSelectedInterstedFlag();
},
//是否选择了感兴趣领域标签
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.getCookie("userInfo")&&result){
that.isShow = true;
that.isShowFlag = false;
that.routerLinkFunc();
}else{
if(that.publicFun.getUserDetailRoleFunc()!=2){
that.isShow = false;
that.isShowFlag = true;
}else that.routerLinkFunc();
}
that.timeOutReturn()
})
},
//登录
handleLogin(type, formName) {
......@@ -200,6 +215,41 @@
this.$toast(err)
})
},
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}})
break;
case "mine":
this.publicFun.setOtherCookie("selected","mine")
this.$router.push("/mine")
}
}else{
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
}
else if(this.pathfrom=="/mine"){
this.$router.push(this.pathfrom);
}
else this.$router.go(-1);
}
else {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
},
postData(){
this.routerLinkFunc()
}
},
mounted() {
this.getCookie();
......
<template>
<div>
<el-form :model="yzCodeForm" :rules="rules" ref="yzCodeForm" @keyup.enter.native="handleLogin(2,'yzCodeForm')"
<el-form :model="yzCodeForm" :rules="rules" ref="yzCodeForm" @keyup.enter.native="handleLogin(2,'yzCodeForm')" v-if="isShow"
class="demo-loginForm">
<el-form-item prop="phone">
<el-input v-model="yzCodeForm.phone" @input="isTruePhone" :placeholder="$t('errorValidate.errorNoAccount')" autocomplete></el-input>
......@@ -27,6 +27,7 @@
<span>{{$t('commonTips.registerTitle')}}</span><span @click="handleRegister">{{$t('commonTips.alreadyRegister')}}</span>
</el-form-item>
</el-form>
<selectFlag @postData="postData" :pathfrom="pathfrom" v-if="isShowFlag"></selectFlag>
</div>
</template>
......@@ -37,13 +38,18 @@
import sliderCmpt from '../../../components/common/puzzleSlider';
import { Toast } from 'mint-ui';
import publicFunc from '../../../common/public';
import selectFlag from '../selectInterset';
export default {
name: "phoneCodeCmpt",
components:{
sliderCmpt
sliderCmpt,
selectFlag
},
data(){
return{
isShow:true,
isShowFlag:false,
codehtml: "getCode",
yzCodeForm: {
phone: "",
......@@ -131,23 +137,63 @@
}
this.publicFun.setUserInfoCookie("userInfo",that.Base64.encode(JSON.stringify(data)));
globalMsg.$emit('getUserInfo')
this.isSelectedInterstedFlag();
},
//是否选择了感兴趣领域标签
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.getCookie("userInfo")&&result){
that.isShow = true;
that.isShowFlag = false;
that.routerLinkFunc();
}else{
if(that.publicFun.getUserDetailRoleFunc()!=2){
that.isShow = false;
that.isShowFlag = true;
}else that.routerLinkFunc();
}
that.timeOutReturn()
})
},
routerLinkFunc(){
if(this.pathfrom){
if(this.pathfrom.indexOf("register")!=-1||this.pathfrom.indexOf("Register")!=-1||this.pathfrom.indexOf("login")!=-1||this.pathfrom.indexOf("Login")!=-1||this.pathfrom=="/") {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
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}})
break;
case "mine":
this.publicFun.setOtherCookie("selected","mine")
this.$router.push("/mine")
}
}else{
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
}
else if(this.pathfrom=="/mine"){
this.$router.push(this.pathfrom);
}
else this.$router.go(-1);
}
else {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
that.timeOutReturn();
},
hasSetPassword(){
......@@ -258,6 +304,10 @@
}, 1000)
}
},
postData(){
this.routerLinkFunc()
}
},
mounted() {
globalMsg.$on("isPhoneSendCode",(data,which)=>{
......
<template>
<div>
<el-form :model="loginForm" :rules="rules" ref="loginForm" @keyup.enter.native="handleLogin('loginForm')"
<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" :placeholder="$t('errorValidate.errorNoAccount')" autocomplete></el-input>
......@@ -20,6 +20,7 @@
<span>{{$t('commonTips.registerTitle')}}</span><span @click="handleRegister">{{$t('commonTips.alreadyRegister')}}</span>
</el-form-item>
</el-form>
<selectFlag @postData="postData" :pathfrom="pathfrom" v-if="isShowFlag"></selectFlag>
</div>
</template>
......@@ -28,11 +29,17 @@
import api from '../../loginregister/api/api';
import validate from '../../../common/validate';
import publicFunc from '../../../common/public';
import selectFlag from '../selectInterset';
import { Toast } from 'mint-ui';
export default {
name: "phonePwdCmpt",
components:{
selectFlag
},
data(){
return{
isShow:true,
isShowFlag:false,
checked:this.publicFun.getCookie("checked")=='true'?true:false,
lang:this.$i18n.locale=="zh-CN"?1:2,
loginForm: {
......@@ -154,7 +161,6 @@
}
}).catch((err)=>{
console.log(err)
that.$toast(err);
that.timeOutReturn()
......@@ -169,24 +175,42 @@
}
this.publicFun.setUserInfoCookie("userInfo",that.Base64.encode(JSON.stringify(data)));
globalMsg.$emit('getUserInfo')
this.isSelectedInterstedFlag();
},
//跳转
routerLinkFunc(){
if(this.pathfrom){
if(this.pathfrom.indexOf("login")!=-1||this.pathfrom.indexOf("Login")!=-1||this.pathfrom=="/") {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
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}})
break;
case "mine":
this.publicFun.setOtherCookie("selected","mine")
this.$router.push("/mine")
}
}else{
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
}
else if(this.pathfrom=="/mine"){
this.$router.push(this.pathfrom);
}
else this.$router.go(-1);
else {
this.$router.go(-1);
}
}
else {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
that.timeOutReturn()
},
hasSetPassword(){
......@@ -202,6 +226,34 @@
this.$toast(err)
})
},
postData(){
this.routerLinkFunc()
},
//是否选择了感兴趣领域标签
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.getCookie("userInfo")&&result){
that.isShow = true;
that.isShowFlag = false;
that.routerLinkFunc();
}else{
if(that.publicFun.getUserDetailRoleFunc()!=2){
that.isShow = false;
that.isShowFlag = true;
}else that.routerLinkFunc();
}
that.timeOutReturn()
})
}
},
mounted() {
this.getCookie();
......
<template>
<el-form :model="registerForm" :rules="rules" ref="registerForm"
class="demo-loginForm">
<el-form-item prop="phone">
<el-input v-model="registerForm.phone" :placeholder="$t('errorValidate.errorNoAccount')" @input="isTruePhone" autocomplete></el-input>
</el-form-item>
<el-form-item prop="code" class="yzcodeItem">
<el-input type="text" v-model="registerForm.code" :placeholder="$t('commonTips.placeholderAccountCode')" style="float: left;" maxlength="6"
autocomplete></el-input>
<input type="text" class="is-hidden" />
<input type="password" class="is-hidden" />
<span class="getyzcodeBtn" @click="handleGetCode" v-if="showCount">{{$t("commonTips."+codehtml)}}</span>
<span class="getdyzcodeBtn" v-if="!showCount&&lang==2">{{$t("commonTips.resendCode")}}{{count}}s</span>
<span class="getdyzcodeBtn" v-if="!showCount&&lang==1">{{count}}{{$t("commonTips.resendCode")}}</span>
</el-form-item>
<div>
<el-form :model="registerForm" :rules="rules" ref="registerForm" v-if="isShow"
class="demo-loginForm">
<el-form-item prop="phone">
<el-input v-model="registerForm.phone" :placeholder="$t('errorValidate.errorNoAccount')" @input="isTruePhone" autocomplete></el-input>
</el-form-item>
<el-form-item prop="code" class="yzcodeItem">
<el-input type="text" v-model="registerForm.code" :placeholder="$t('commonTips.placeholderAccountCode')" style="float: left;" maxlength="6"
autocomplete></el-input>
<input type="text" class="is-hidden" />
<input type="password" class="is-hidden" />
<span class="getyzcodeBtn" @click="handleGetCode" v-if="showCount">{{$t("commonTips."+codehtml)}}</span>
<span class="getdyzcodeBtn" v-if="!showCount&&lang==2">{{$t("commonTips.resendCode")}}{{count}}s</span>
<span class="getdyzcodeBtn" v-if="!showCount&&lang==1">{{count}}{{$t("commonTips.resendCode")}}</span>
</el-form-item>
<div class="sliderCmptWrapper" v-if="isShowSlider">
<sliderCmpt v-if="isShowSlider"></sliderCmpt>
</div>
<el-form-item prop="password">
<el-input :type="!isShowPass?'password':'text'" v-model="registerForm.password" :placeholder="$t('commonTips.setLoginPassword')" maxlength="18"></el-input>
<i :class="isShowPass?'iconfont icon-yanjing':'iconfont icon-yanjing1'" @click="isShowPass = !isShowPass"></i>
</el-form-item>
<!--<el-tooltip placement="bottom" popper-class="password_tooltip">-->
<div class="sliderCmptWrapper" v-if="isShowSlider">
<sliderCmpt v-if="isShowSlider"></sliderCmpt>
</div>
<el-form-item prop="password">
<el-input :type="!isShowPass?'password':'text'" v-model="registerForm.password" :placeholder="$t('commonTips.setLoginPassword')" maxlength="18"></el-input>
<i :class="isShowPass?'iconfont icon-yanjing':'iconfont icon-yanjing1'" @click="isShowPass = !isShowPass"></i>
</el-form-item>
<!--<el-tooltip placement="bottom" popper-class="password_tooltip">-->
<!--<div slot="content">{{$t("commonTips.passwordDescriptionOne")}}<br/> {{$t("commonTips.passwordDescriptionTwo")}}<br/> {{$t("commonTips.passwordDescriptionThree")}}</div>-->
<!--<el-form-item prop="password">-->
<!--<el-input :type="!isShowPass?'password':'text'" v-model="registerForm.password" :placeholder="$t('commonTips.setLoginPassword')" maxlength="18"-->
<!--style="height: 40px;"></el-input>-->
<!--<i :class="isShowPass?'iconfont icon-yanjing':'iconfont icon-yanjing1'" @click="isShowPass = !isShowPass"></i>-->
<!--<el-input :type="!isShowPass?'password':'text'" v-model="registerForm.password" :placeholder="$t('commonTips.setLoginPassword')" maxlength="18"-->
<!--style="height: 40px;"></el-input>-->
<!--<i :class="isShowPass?'iconfont icon-yanjing':'iconfont icon-yanjing1'" @click="isShowPass = !isShowPass"></i>-->
<!--</el-form-item>-->
<!--</el-tooltip>-->
<!--</el-tooltip>-->
<el-form-item class="agreeprotocol" style="margin-top: .8rem;">
<el-checkbox name="type" v-model="checked">
<el-form-item class="agreeprotocol" style="margin-top: .8rem;">
<el-checkbox name="type" v-model="checked">
</el-checkbox>
<span style="font-weight: bold;margin-left: 5px;font-size: 12px;">{{$t("commonTips.protocolTitle")}}TechBook《<span @click="handleToProtocol(1)" class="protocol">{{$t("bottomNav.protocol")}}</span>》《<span @click="handleToProtocol(2)" class="protocol">{{$t("bottomNav.protocol2")}}</span></span>
</el-form-item>
<el-form-item>
<el-button type="primary" class="loginButton" :disabled="flag>0" @click="handleRegister('registerForm')" v-loading.fullscreen="fullscreenLoading">{{$t("topNav.register")}}
</el-button>
</el-form-item>
<el-form-item class="registerButton">
<span>{{$t("commonTips.loginTitle")}}</span><span @click="handleLogin">{{$t("commonTips.alreadyLogin")}}</span>
</el-form-item>
</el-form>
</el-checkbox>
<span style="font-weight: bold;margin-left: 5px;font-size: 12px;">{{$t("commonTips.protocolTitle")}}TechBook《<span @click="handleToProtocol(1)" class="protocol">{{$t("bottomNav.protocol")}}</span>》《<span @click="handleToProtocol(2)" class="protocol">{{$t("bottomNav.protocol2")}}</span></span>
</el-form-item>
<el-form-item>
<el-button type="primary" class="loginButton" :disabled="flag>0" @click="handleRegister('registerForm')" v-loading.fullscreen="fullscreenLoading">{{$t("topNav.register")}}
</el-button>
</el-form-item>
<el-form-item class="registerButton">
<span>{{$t("commonTips.loginTitle")}}</span><span @click="handleLogin">{{$t("commonTips.alreadyLogin")}}</span>
</el-form-item>
</el-form>
<selectFlag @postData="postData" :pathfrom="pathfrom" v-if="isShowFlag"></selectFlag>
</div>
</template>
......@@ -54,14 +57,21 @@
import api from '../../loginregister/api/api';
import sliderCmpt from '../../../components/common/puzzleSlider';
import dialogCmpt from '../../../components/common/dialogCmpt';
import selectFlag from '../selectInterset';
export default {
name: "phoneRegister",
props:{
pathfrom:""
},
components:{
sliderCmpt,
dialogCmpt
dialogCmpt,
selectFlag
},
data(){
return{
isShow:true,
isShowFlag:false,
activeName: "first",
codehtml: "getCode",
lang:this.$i18n.locale=="zh-CN"?1:2,
......@@ -136,7 +146,9 @@
registerPcOrApp:1,
registerSource:this.$route.query.refereesId>0?2:
this.$route.query.registerChannel>0?1:0,
// registerType:0
rDeviceId:this.publicFun.getCookie("rDeviceId")&&this.publicFun.getCookie("rDeviceId")!=undefined ? this.publicFun.getCookie("rDeviceId") : null,
rEmpId:this.publicFun.getCookie("rEmpId")&&this.publicFun.getCookie("rEmpId")!=undefined ? this.publicFun.getCookie("rEmpId") : null,
rTargetType:this.publicFun.getCookie("rTargetType")&&this.publicFun.getCookie("rTargetType")!=undefined ? this.publicFun.getCookie("rTargetType") : null
},params1 = this.$route.query.isEmail?this.outSideParams:null;
this.fullscreenLoading = true;
api.resultUserRegisterAxios(params,params1).then((res)=>{
......@@ -144,9 +156,8 @@
if(res.code==0){
this.publicFun.setUserInfoCookie("userInfo",this.Base64.encode(JSON.stringify(res.result)));
globalMsg.$emit("getUserInfo");
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
this.isShow = false;
this.isShowFlag = true;
setTimeout(function(){
that.flag = 0;
return false;
......@@ -281,6 +292,31 @@
}
}, 1000)
}
},
routerLinkFunc(){
if(this.pathfrom){
if(this.pathfrom.indexOf("login")!=-1||this.pathfrom.indexOf("Login")!=-1||this.pathfrom=="/") {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
else if(this.pathfrom=="/mine"){
this.$router.push(this.pathfrom);
}
else {
this.$router.go(-1);
}
}
else {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
},
postData(){
this.routerLinkFunc()
}
},
mounted() {
......
......@@ -5,8 +5,8 @@
<!--<span class="positionLoginOrRegister" @click="handleChange">{{activeMethod==1?$t('login.phoneCodeLogin'):$t('login.phonePwdLogin')}}</span>-->
<el-tabs v-model="activeName" :class="lang==1?'':'registerPhoneTab'">
<el-tab-pane :label="lang==1?$t('register.registerByAccount'):$t('register.registerEmail')" name="first">
<phoneRegister v-if="lang==1"></phoneRegister>
<emRegister v-if="lang==2"></emRegister>
<phoneRegister v-if="lang==1" :pathfrom="pathfrom"></phoneRegister>
<emRegister v-if="lang==2" :pathfrom="pathfrom"></emRegister>
</el-tab-pane>
</el-tabs>
<breadBottom></breadBottom>
......@@ -30,6 +30,7 @@
activeName: "first",
activeMethod:1,
lang:this.$i18n.locale=="zh-CN"?1:2,
pathfrom:""
}
},
......@@ -59,7 +60,13 @@
},
mounted(){
if(this.$route.query.refereesId||this.$route.query.registerChannel) this.getActiveName();
}
},
beforeRouteEnter(to, from, next) {
next(vm=>{ // 这里的vm指的就是vue实例,可以用来当做this使用
vm.pathfrom =vm.publicFun.getCookie("selected")=="mine"?'/mine':from.fullPath;
})
},
}
</script>
......
<template>
<div class="overfolowWrapper">
<div class="topWrapper">
<el-row class="userInfoWrapper" v-if="empuser">
<el-col :span="18">
<div style="position: relative">
<img :src="empuser.empLogo!=''&&empuser.empLogo?empuser.empLogo:require('../../assets/img/defaultlogo.png')">
<img v-if="publicFun.getUserRoleIsZjFunc()" src="../../assets/img/proFeedBack/vip.png" alt=""
class="vipImg">
<div v-if="isShow">
<div class="topWrapper">
<el-row class="userInfoWrapper" v-if="empuser">
<el-col :span="18">
<div style="position: relative">
<img :src="empuser.empLogo!=''&&empuser.empLogo?empuser.empLogo:require('../../assets/img/defaultlogo.png')">
<img v-if="publicFun.getUserRoleIsZjFunc()" src="../../assets/img/proFeedBack/vip.png" alt=""
class="vipImg">
</div>
<span class="line-limit-length">{{empuser.nickName}}</span>
</el-col>
<el-col :span="6">
<p @click="handleGo">编辑资料</p>
</el-col>
</el-row>
<div class="intersetedFlag" v-if="publicFun.getUserDetailRoleFunc()==1">
<span v-if="intersetedFlag.length>0" v-for="item in intersetedFlag">{{item.dataName}}</span>
<span @click="isShowFlag = true">
+ {{$t("interseted.add")}}
</span>
</div>
<div class="routerLink routerLinkFirst" v-if="activeList.length>0">
<el-row v-for="(item,index) in activeList" :key="item.id">
<div @click="handlePush(item)">
<el-col :span="24" class="activeCol" :style="{borderBottomWidth:index==activeList.length-1?'0':'1px'}">
<p ><i class="iconfont" :class="item.icon"></i><span>{{$t('topNav.'+item.name)}}</span></p>
<i class="iconfont icon-you"></i>
</el-col>
</div>
</el-row>
</div>
</div>
<div class="routerLink routerLinkSecond">
<el-row v-for="(item,index) in activeSecondList" :key="item.id">
<div @click="handlePush(item)">
<el-col :span="24" class="activeCol" :style="{borderBottomWidth:index==activeSecondList.length-1?'0':'1px'}">
<p><i class="iconfont" :class="item.icon"></i><span>{{$t('topNav.'+item.name)}}</span></p>
<i class="iconfont icon-you"></i>
</el-col>
</div>
<span class="line-limit-length">{{empuser.nickName}}</span>
</el-col>
<el-col :span="6">
<p @click="handleGo">编辑资料</p>
</el-col>
</el-row>
<div class="routerLink routerLinkFirst" v-if="activeList.length>0">
<el-row v-for="(item,index) in activeList" :key="item.id">
</el-row>
</div>
<div class="routerLink routerLinkSecond">
<el-row v-for="(item,index) in activeThirdList" :key="item.id">
<div @click="handlePush(item)">
<el-col :span="24" class="activeCol" :style="{borderBottomWidth:index==activeList.length-1?'0':'1px'}">
<p ><i class="iconfont" :class="item.icon"></i><span>{{$t('topNav.'+item.name)}}</span></p>
<el-col :span="24" class="activeCol" :style="{borderBottomWidth:index==activeThirdList.length-1?'0':'1px'}">
<p><i class="iconfont" :class="item.icon"></i><span>{{$t('topNav.'+item.name)}}</span></p>
<i class="iconfont icon-you"></i>
</el-col>
</div>
</el-row>
</div>
<div class="buttonWrapper">
<el-button @click="handleLogout">
{{$t("topNav.logout")}}
</el-button>
</div>
</div>
<div class="routerLink routerLinkSecond">
<el-row v-for="(item,index) in activeSecondList" :key="item.id">
<div @click="handlePush(item)">
<el-col :span="24" class="activeCol" :style="{borderBottomWidth:index==activeSecondList.length-1?'0':'1px'}">
<p><i class="iconfont" :class="item.icon"></i><span>{{$t('topNav.'+item.name)}}</span></p>
<i class="iconfont icon-you"></i>
</el-col>
</div>
</el-row>
</div>
<div class="routerLink routerLinkSecond">
<el-row v-for="(item,index) in activeThirdList" :key="item.id">
<div @click="handlePush(item)">
<el-col :span="24" class="activeCol" :style="{borderBottomWidth:index==activeThirdList.length-1?'0':'1px'}">
<p><i class="iconfont" :class="item.icon"></i><span>{{$t('topNav.'+item.name)}}</span></p>
<i class="iconfont icon-you"></i>
</el-col>
</div>
</el-row>
</div>
<div class="buttonWrapper">
<el-button @click="handleLogout">
{{$t("topNav.logout")}}
</el-button>
</div>
<selectFlag @postData="postData" :selectedFlag="intersetedFlag" @hiddenSelect="hiddenSelect" :pathfrom="'himself'" v-if="isShowFlag"></selectFlag>
</div>
</template>
......@@ -57,11 +66,17 @@
<script>
import api from '../mobile/personaluser/api/api';
import {Toast} from 'mint-ui';
import commonApi from '../../common/commonApi';
import selectFlag from './selectInterset';
export default {
name: "mine",
components:{
selectFlag
},
data() {
return {
isShow:true,
isShowFlag:false,
userInfo: this.publicFun.getCookie("userInfo") ? JSON.parse(this.Base64.decode(this.publicFun.getCookie("userInfo"))) : null,
empuser: null,
activeList:[],
......@@ -88,7 +103,8 @@
icon:"icon-shiyongbangzhu",
routerLink:"/usehelped"
}
]
],
intersetedFlag:[]
}
},
methods: {
......@@ -205,10 +221,38 @@
})
},
getInitInfo(flag){
if(this.userInfo){
commonApi.getUserIntersetedFlagAxios().then((res)=>{
if(res.code==0){
this.intersetedFlag = res.result;
if(flag){
this.isShow = true;
this.isShowFlag = false;
}
}else{
this.$toast(res.msg);
}
}).catch((err)=>{
this.$toast(err);
})
}
},
postData(){
this.getInitInfo(true);
},
hiddenSelect(){
this.isShowFlag = false;
this.isShow = true;
}
},
mounted() {
this.getselectByEmpId()
this.getInitInfo()
}
}
</script>
......@@ -245,7 +289,7 @@
width: 100%;
background: #5d78ff;
.userInfoWrapper {
padding: .66rem .3rem;
padding: .66rem .3rem 0 .3rem;
.el-col {
color: #fff;
display: flex;
......@@ -289,6 +333,30 @@
}
}
}
.intersetedFlag{
width: 100%;
padding-left: 20%;
display: flex;
flex-wrap: wrap;
padding-right: .2rem;
align-items: center;
margin-bottom: .6rem;
>span{
display: inline-block;
min-height: .5rem;
padding: .08rem .1rem;
color: #fff;
border: 1px solid #fff;
font-size: .24rem;
margin-right: .2rem;
border-radius: .03rem;
margin-bottom: .08rem;
&:last-of-type{
background-color: #fff;
color: #5D78FF;
}
}
}
.height15px{
height: .15rem;
background: #f6f6f6;
......
......@@ -784,6 +784,17 @@
}, 1);
}
},
setCookieFunc(){
if(this.$route.query.rTargetType){
this.publicFun.setUserInfoCookie("rTargetType",this.$route.query.rTargetType);
}
if(this.$route.query.rDeviceId){
this.publicFun.setUserInfoCookie("rDeviceId",this.$route.query.rDeviceId);
}
if(this.$route.query.rEmpId){
this.publicFun.setUserInfoCookie("rEmpId",this.$route.query.rEmpId);
}
}
},
mounted(){
// ES6 标准
......@@ -801,6 +812,7 @@
globalMsg.$on("scrollToTop",()=>{
this.checkWxScroll();
})
this.setCookieFunc();
// this.publicFun.setUserInfoCookie("projecttype",0);
},
beforeRouteLeave(to,from,next){
......
......@@ -989,11 +989,23 @@
this.$toast(err);
})
},
setCookieFunc(){
if(this.$route.query.rTargetType){
this.publicFun.setUserInfoCookie("rTargetType",this.$route.query.rTargetType);
}
if(this.$route.query.rDeviceId){
this.publicFun.setUserInfoCookie("rDeviceId",this.$route.query.rDeviceId);
}
if(this.$route.query.rEmpId){
this.publicFun.setUserInfoCookie("rEmpId",this.$route.query.rEmpId);
}
}
},
mounted(){
this.getProjectDetail();
this.setCookieFunc();
globalMsg.$on("scrollToTop",()=>{
this.checkWxScroll();
})
......
<template>
<div class="screenWrapper">
<div class="closeBtn">
<i class="iconfont icon-cuowu" @click="$router.go(-1)"></i>
<i class="iconfont icon-cuowu" @click="handleTo"></i>
</div>
<intersetedCmpt :screenlist="intersetList" :title="$t('interseted.title')" :otherTitle="true"></intersetedCmpt>
<intersetedCmpt :screenlist="intersetList" v-if="intersetList.length>0" :title="$t('interseted.title')" :otherTitle="true" @postCheckBoxGroup="handleConfirm"></intersetedCmpt>
</div>
</template>
<script>
import intersetedCmpt from '../../components/mobile/intersetedCmpt';
import api from './api';
import api from '../../common/commonApi';
export default {
name: "selectInterset",
components:{
intersetedCmpt
},
props:{
pathfrom:"",
selectedFlag:{
type:Array,
default:()=>[]
}
},
data(){
return{
intersetList:[],
disabledFlag:0,
}
},
methods:{
//获取行业领域接口
bigBusinessselect() {
api.getIndustryAxios().then( response => {
getInitSelect() {
var that = this;
api.getIntersetedDictAxios().then( response => {
if ( response.code == 0 ) {
response.result.forEach( ( item ) => {
item.checked = false;
item.screenchildList = item.childrenList;
} );
this.intersetList = response.result;
if(response.result.length>0){
response.result.forEach((item,index)=>{
item.checked = false;
that.intersetList.push(item)
})
if(that.selectedFlag.length>0){
var dataArr = that.selectedFlag.map((item)=>{
return item.dataId;
})
for(let i=0; i<that.intersetList.length;i++){
if(dataArr.indexOf(that.intersetList[i].dataId)<0) that.intersetList[i].checked = false;
else that.intersetList[i].checked = true;
}
}
}
} else {
this.$toast( response.msg );
}
......@@ -38,9 +61,94 @@
return false;
} );
},
handleConfirm(data){
var that = this;
if(this.disabledFlag==0){
this.disabledFlag++;
api.postIntersetedDictAxios(data).then(res=>{
if(res.code==0){
this.$emit("postData");
setTimeout(function(){
that.disabledFlag = 0;
return false;
},500)
}else{
this.$toast(res.msg);
setTimeout(function(){
that.disabledFlag = 0;
return false;
},500)
}
}).catch(err=>{
this.$toast(err);
setTimeout(function(){
that.disabledFlag = 0;
return false;
},500)
})
}else{
setTimeout(function(){
that.disabledFlag = 0;
return false;
},500)
}
},
//获取标签
getIntersetFlag(){
return api.tipInfo().then((res)=>{
if(res.code==0){
if(res.result.indexOf('TIP005')>-1) return true;
else return false;
}else{
console.log(res.msg);
}
}).catch((err)=>{
console.log(err);
})
},
handleTo(){
if(this.pathfrom){
if(this.pathfrom=='himself'){
this.$emit("hiddenSelect");
}else{
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}})
break;
case "mine":
this.publicFun.setOtherCookie("selected","mine")
this.$router.push("/mine")
}
}else{
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
}
else if(this.pathfrom=="/mine"){
this.$router.push(this.pathfrom);
}
else {
this.$router.go(-1);
}
}
}
else {
this.$router.push("/index");
this.publicFun.setUserInfoCookie("selected","index");
globalMsg.$emit("sendSelected","index");
}
}
},
mounted(){
this.bigBusinessselect();
this.getInitSelect();
}
}
</script>
......
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