Commit d6d2640e authored by 华国豪's avatar 华国豪 🙄

更新登录

parent b99b60fd
...@@ -625,7 +625,7 @@ ...@@ -625,7 +625,7 @@
text-align: center; text-align: center;
color: #fff; color: #fff;
} }
.LocalTourList .choose_ul .spanMargin .el-date-editor.el-input, .el-date-editor.el-input__inner{ .LocalTourList .choose_ul .spanMargin .el-date-editor.el-input,.LocalTourList .el-date-editor.el-input__inner{
width:160px; width:160px;
height:28px; height:28px;
margin-top:3px; margin-top:3px;
......
...@@ -23,8 +23,11 @@ ul,li{list-style: none;} ...@@ -23,8 +23,11 @@ ul,li{list-style: none;}
.w100{ .w100{
width: 100px !important; width: 100px !important;
} }
.wb60{ .wb40{
width: 60% !important; width: 40% !important;
}
.wb30{
width: 30% !important;
} }
._flex_center{ ._flex_center{
display: flex; display: flex;
......
...@@ -238,11 +238,14 @@ export default { ...@@ -238,11 +238,14 @@ export default {
}, },
created(){ created(){
if(this.$route.query.keywords){ if(this.$route.query.keywords){
this.listmsg.searchKey=this.$route.query.keywords; this.listmsg.searchKey=this.$route.query.keywords;
} }
if(this.$route.query.lineteamId){ if(this.$route.query.lineteamId){
this.listmsg.lineTeamId=this.$route.query.lineteamId; this.listmsg.lineTeamId=this.$route.query.lineteamId;
} }
if(this.$route.query.time){
this.listmsg.monthdate=this.$route.query.time;
}
this.isLogin=this.$store.state.isLogin; this.isLogin=this.$store.state.isLogin;
if(this.isLogin==1){ if(this.isLogin==1){
this.listmsg.priceOrderByField=2; this.listmsg.priceOrderByField=2;
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<i class="iconfont icon-Shape"></i> <i class="iconfont icon-Shape"></i>
<p>酒店</p> <p>酒店</p>
</li> </li>
<li @click="ChangeTab('admticket')" :class="tag=='admticket'?'tag_active':''" v-show="false"> <li @click="ChangeTab('admticket')" :class="tag=='admticket'?'tag_active':''" >
<i class="iconfont icon-menpiao1"></i> <i class="iconfont icon-menpiao1"></i>
<p>门票</p> <p>门票</p>
</li> </li>
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
</div> </div>
<!-- 门票 v-show="tag=='admticket'"--> <!-- 门票 v-show="tag=='admticket'"-->
<div style="width:394px" class="visa" v-show="false"> <div style="width:394px" class="visa" >
<el-form ref="visa_form" :model="visa_form" label-width="90px"> <el-form ref="visa_form" :model="visa_form" label-width="90px">
<!-- <el-form-item label="关键词搜索" style="margin-bottom:10px"> <!-- <el-form-item label="关键词搜索" style="margin-bottom:10px">
<el-input size="small" v-model="visa_form.name" placeholder="输入景点名称、城市或主题"></el-input> <el-input size="small" v-model="visa_form.name" placeholder="输入景点名称、城市或主题"></el-input>
...@@ -400,7 +400,7 @@ ...@@ -400,7 +400,7 @@
</el-row> </el-row>
<!-- 自由行 --> <!-- 自由行 -->
<div class="travel Grouptour" v-show="false"> <div class="travel Grouptour" v-show="false">
<div class="tour_left"> <div class="tour_left">
<p class="pfR">自由行</p> <p class="pfR">自由行</p>
<div class="tour_left_content travel_left" style="height:325px;"> <div class="tour_left_content travel_left" style="height:325px;">
...@@ -439,30 +439,30 @@ ...@@ -439,30 +439,30 @@
</div> </div>
</div> </div>
<div @click="goUrl('detailTwo',item.idDes,item.tcid)" v-if="index==5" v-for="(item,index) in freePriceList" :key="index+150" class="travel_right_item travel_right_item_big"> <div @click="goUrl('detailTwo',item.idDes,item.tcid)" v-if="index==5" v-for="(item,index) in freePriceList" :key="index+150" class="travel_right_item travel_right_item_big">
<img v-if="item.imgCover[0].url" :src='compressImg(item.imgCover[0].url, "filt", 245, "")' alt=""> <img v-if="item.imgCover[0].url" :src='compressImg(item.imgCover[0].url, "filt", 245, "")' alt="">
<img v-else src="../assets/img/home/tour4.png" alt=""> <img v-else src="../assets/img/home/tour4.png" alt="">
<div class="Remarks"> <div class="Remarks">
<p class="text2">{{item.title}}</p> <p class="text2">{{item.title}}</p>
<p style="text-align:right"><span style="color:#FF6600"><span style="font-size:18px;font-weight:bold"> <p style="text-align:right"><span style="color:#FF6600"><span style="font-size:18px;font-weight:bold">
{{(isLogin!=1 ? item.b2CPrice : item.b2BPrice) | NoDesnum}} {{(isLogin!=1 ? item.b2CPrice : item.b2BPrice) | NoDesnum}}
</span></span></p> </span></span></p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 冰糕活动跳转 --><el-row style="margin: 20px 0;cursor: pointer;"> <!-- 冰糕活动跳转 -->
<!-- <el-row style="margin: 20px 0;cursor: pointer;">
<img <img
@click="FootgoUrl('IceCreamTask')" @click="FootgoUrl('IceCreamTask')"
class="huodong_img" class="huodong_img"
src="../assets/img/active/huodong_img1.png" src="../assets/img/active/huodong_img1.png"
alt alt
> >
</el-row> </el-row> -->
<!-- 景点门票 --> <!-- 景点门票 -->
<div class="Ticket_spots" v-show="false"> <div class="Ticket_spots" v-show="false">
<ul class="common_ul_tab"> <ul class="common_ul_tab">
<span style="font-weight:700;margin-right:172px">景点门票</span> <span style="font-weight:700;margin-right:172px">景点门票</span>
<li @click="ClickTicket(item)" v-for="(item,index) in tciketCountry" :key="index+200" :class="ticketMsg.countryId==item.countryId?'li_active':''">{{item.countryName}}</li> <li @click="ClickTicket(item)" v-for="(item,index) in tciketCountry" :key="index+200" :class="ticketMsg.countryId==item.countryId?'li_active':''">{{item.countryName}}</li>
...@@ -1369,7 +1369,6 @@ export default { ...@@ -1369,7 +1369,6 @@ export default {
} }
}; };
</script> </script>
<style> <style>
@import "../assets/css/home.css"; @import "../assets/css/home.css";
@import "../assets/css/common.css"; @import "../assets/css/common.css";
......
...@@ -897,6 +897,15 @@ export default { ...@@ -897,6 +897,15 @@ export default {
mounted() { mounted() {
}, },
created() { created() {
if(this.$route.query.time){
this.dateList=this.$route.query.time;
this.msg.searchroomGroup = [{
roomNum:1,
numberOfAdults:1,
numberOfChildren:0
}]
this.getInOutDate()
}
if(this.$route.query.searchKey){ if(this.$route.query.searchKey){
this.keyWords=this.$route.query.searchKey; this.keyWords=this.$route.query.searchKey;
this.SearchHotel(); this.SearchHotel();
...@@ -912,6 +921,7 @@ export default { ...@@ -912,6 +921,7 @@ export default {
this.msg.searchroomGroup = msgList.roomList; this.msg.searchroomGroup = msgList.roomList;
this.SearchHotel(); this.SearchHotel();
} }
if(sessionStorage.getItem("OpenB2BCode")){ if(sessionStorage.getItem("OpenB2BCode")){
if(sessionStorage.getItem("OpenB2BCode")=='jqk4n7BSaoI='){ if(sessionStorage.getItem("OpenB2BCode")=='jqk4n7BSaoI='){
this.isShowTime=false; this.isShowTime=false;
......
...@@ -426,6 +426,9 @@ export default { ...@@ -426,6 +426,9 @@ export default {
this.choose_info.qFlightDateStart this.choose_info.qFlightDateStart
).format("YYYY-MM-DD HH:mm:ss"); ).format("YYYY-MM-DD HH:mm:ss");
} }
if(this.$route.query.time){
this.choose_info.qFlightDateStart=this.$route.query.time[0];
}
this.Datelist(); this.Datelist();
this.initAirlines(); this.initAirlines();
this.CFD(); this.CFD();
......
...@@ -47,6 +47,15 @@ ...@@ -47,6 +47,15 @@
.item-tootip{ .item-tootip{
width: 100px; width: 100px;
} }
.my-input{
border: none !important;
border-radius: 0 !important;
height: 34px !important;
border-left: 1px solid #e6e6e6 !important;
}
.my-input .el-range-separator{
line-height: 28px !important;
}
</style> </style>
<template> <template>
<!-- 头部 --> <!-- 头部 -->
...@@ -163,10 +172,10 @@ ...@@ -163,10 +172,10 @@
</el-select> </el-select>
</div> </div>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="12" :offset="1">
<div class="_search_box _flex_center"> <div class="_search_box _flex_center">
<!-- <span class="_city">成都</span> --> <!-- <span class="_city">成都</span> -->
<el-select v-model="select" slot="prepend" size="mini" class="w100" placeholder="请选择"> <el-select v-model="select" slot="prepend" @change="value6 = []" size="mini" class="w85" placeholder="请选择">
<el-option label="旅游" value="1"></el-option> <el-option label="旅游" value="1"></el-option>
<el-option label="定制游" value="4"></el-option> <el-option label="定制游" value="4"></el-option>
<el-option label="一日游" value="5-1" v-show="false"></el-option> <el-option label="一日游" value="5-1" v-show="false"></el-option>
...@@ -178,19 +187,30 @@ ...@@ -178,19 +187,30 @@
</el-select> </el-select>
<span class="_splice"></span> <span class="_splice"></span>
<el-input <el-input
class="wb60" class="wb40"
placeholder="搜索旅行地/酒店/旅游/门票/签证" placeholder="搜索旅行地/酒店/旅游/门票/签证"
size="mini" size="mini"
@keyup.enter="goSearch" @keyup.enter="goSearch"
v-model="searchText" v-model="searchText"
></el-input> ></el-input>
<el-date-picker
v-if="select!=='6'"
size="mini"
:picker-options="select !== '3' && select !== '7' ? pickerOptions0 : pickerOptions1"
v-model="value6"
type="daterange"
class="wb30 my-input"
value-format="yyyy-MM-dd"
range-separator="-"
format="MM-dd">
</el-date-picker>
<span class="_search_btn __cp" @click="goSearch"> <span class="_search_btn __cp" @click="goSearch">
<i class="iconfont icon-search"></i> <i class="iconfont icon-search"></i>
</span> </span>
</div> </div>
</el-col> </el-col>
<!-- 右 电话 --> <!-- 右 电话 -->
<el-col :span="5" :offset="2"> <el-col :span="5" :offset="1">
<div class="_phone _flex_center"> <div class="_phone _flex_center">
<div> <div>
<i class="iconfont icon-dianhua1"></i> <i class="iconfont icon-dianhua1"></i>
...@@ -334,6 +354,7 @@ const map = new AMap.Map("map-container", { ...@@ -334,6 +354,7 @@ const map = new AMap.Map("map-container", {
import { location } from "../../assets/utils/getLocation"; import { location } from "../../assets/utils/getLocation";
import bus from "../../plugins/event-bus"; import bus from "../../plugins/event-bus";
import moment from "moment";
export default { export default {
data() { data() {
return { return {
...@@ -345,7 +366,19 @@ export default { ...@@ -345,7 +366,19 @@ export default {
navActive: "", navActive: "",
sites: [], sites: [],
city: 0, city: 0,
cityText: "" cityText: "",
value6: '',
pickerOptions0: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
}
},
pickerOptions1: {
disabledDate(time) {
let today_after7=moment().add(7,'days').format('YYYY-MM-DD');
return time.getTime() < new Date(today_after7).getTime() - 8.64e7;
}
},
}; };
}, },
methods: { methods: {
...@@ -426,14 +459,20 @@ export default { ...@@ -426,14 +459,20 @@ export default {
if (this.searchText != "") { if (this.searchText != "") {
if (this.select === "1") { if (this.select === "1") {
// 旅游 // 旅游
let query = { keywords: encodeURIComponent(this.searchText) }; let time = [];
if (this.value6) {
this.value6.map(x=>{
time.push(x.substring(2, 10))
})
}
let query = { keywords: encodeURIComponent(this.searchText), time: time };
this.$router.push({ this.$router.push({
path: "search", path: "search",
query query
}); });
} else if (this.select === "3") { } else if (this.select === "3") {
// 机票 // 机票
let query = { keywords: encodeURIComponent(this.searchText) }; let query = { keywords: encodeURIComponent(this.searchText), time: this.value6 };
this.$router.push({ this.$router.push({
path: "TicketList", path: "TicketList",
query query
...@@ -441,7 +480,7 @@ export default { ...@@ -441,7 +480,7 @@ export default {
} }
else if (this.select === "4") { else if (this.select === "4") {
// 定制游 // 定制游
let query = { keywords: this.searchText}; let query = { keywords: this.searchText, time: this.value6};
this.$router.push({ this.$router.push({
path: "IndependentList", path: "IndependentList",
query query
...@@ -449,7 +488,7 @@ export default { ...@@ -449,7 +488,7 @@ export default {
} }
else if (this.select === "5-1") { else if (this.select === "5-1") {
// 一日游 // 一日游
let query = { searchKey: this.searchText,tab:1}; let query = { searchKey: this.searchText,tab:1, time: this.value6};
this.$router.push({ this.$router.push({
path: "LocalTourList", path: "LocalTourList",
query query
...@@ -457,7 +496,7 @@ export default { ...@@ -457,7 +496,7 @@ export default {
} }
else if (this.select === "5-2") { else if (this.select === "5-2") {
// 当地游门票 // 当地游门票
let query = { searchKey: this.searchText,tab:2}; let query = { searchKey: this.searchText,tab:2, time: this.value6};
this.$router.push({ this.$router.push({
path: "LocalTourList", path: "LocalTourList",
query query
...@@ -465,7 +504,7 @@ export default { ...@@ -465,7 +504,7 @@ export default {
} }
else if (this.select === "5-3") { else if (this.select === "5-3") {
// 当地游美食 // 当地游美食
let query = { searchKey: this.searchText}; let query = { searchKey: this.searchText, time: this.value6};
this.$router.push({ this.$router.push({
path: "LocalCuisine", path: "LocalCuisine",
query query
...@@ -473,7 +512,7 @@ export default { ...@@ -473,7 +512,7 @@ export default {
} }
else if (this.select === "6") { else if (this.select === "6") {
// 签证 // 签证
let query = { searchKey: this.searchText}; let query = { searchKey: this.searchText, time: this.value6};
this.$router.push({ this.$router.push({
path: "Visalist", path: "Visalist",
query query
...@@ -481,7 +520,7 @@ export default { ...@@ -481,7 +520,7 @@ export default {
} }
else if (this.select === "7") { else if (this.select === "7") {
// 酒店 // 酒店
let query = { searchKey: this.searchText}; let query = { searchKey: this.searchText, time: this.value6};
this.$router.push({ this.$router.push({
path: "HotelList", path: "HotelList",
query query
......
...@@ -221,6 +221,10 @@ export default { ...@@ -221,6 +221,10 @@ export default {
this.searchItem.push('') this.searchItem.push('')
this.searchItem.push('') this.searchItem.push('')
this.keywords=decodeURIComponent(this.$route.query.keywords) this.keywords=decodeURIComponent(this.$route.query.keywords)
if (this.$route.query.time) {
this.multData = this.$route.query.time
this.multDataChange()
}
this.loadRecoItems() this.loadRecoItems()
this.loadDates() this.loadDates()
this.loadDayCount() this.loadDayCount()
......
...@@ -3,6 +3,7 @@ import Router from "vue-router"; ...@@ -3,6 +3,7 @@ import Router from "vue-router";
import index from "./views/index"; import index from "./views/index";
import login from "./views/login"; import login from "./views/login";
import newLogin from "./views/newLogin"; import newLogin from "./views/newLogin";
import loginNationalDay from "./views/loginNationalDay";
import IceCreamTask from "./components/taskPage/IceCream/IceCreamTask"; import IceCreamTask from "./components/taskPage/IceCream/IceCreamTask";
// import JuanSaid from "./components/taskPage/JuanSaid"; // import JuanSaid from "./components/taskPage/JuanSaid";
import FoodImg from "./components/taskPage/FoodImg"; import FoodImg from "./components/taskPage/FoodImg";
...@@ -21,7 +22,7 @@ export default new Router({ ...@@ -21,7 +22,7 @@ export default new Router({
{ {
path: "/login", path: "/login",
name: "login", name: "login",
component: newLogin component: loginNationalDay
}, },
// { // {
// path: "/newLogin", // path: "/newLogin",
......
<style>
.loginNationalDay {
height: 100%;
width: 100%;
background: url("../assets/img/login/loginNationalDay-bg.png");
background-size: 100% 100%;
}
.loginNationalDay .container {
width: 100%;
height: 100%;
float: right;
box-sizing: border-box;
/* background-color: skyblue; */
}
.loginNationalDay .container .top_logo {
display: flex;
align-items: flex-end;
}
.loginNationalDay .container .top_logo img {
display: block;
}
.loginNationalDay .container .top_logo span {
color: #ee4454;
font-size: 22px;
padding-left: 8px;
font-weight: bold;
font-family: "PingFangR";
}
.loginNationalDay .container .sub_tit {
font-size: 18px;
margin-top: 15px;
color: #ee4454;
margin-bottom: 90px;
}
.loginNationalDay .container ._lable {
color: #333333;
font-size: 16px;
margin-bottom: 5px;
}
.loginNationalDay .el-input__inner {
border: 2px solid rgba(230, 230, 230, 1) !important;
border-top: none !important;
border-left: none !important;
border-right: none !important;
padding: 0;
background-color: white !important;
border-radius: 0;
}
.loginNationalDay .el-input__inner:focus {
border-bottom: 2px solid #ee4454 !important;
}
.loginNationalDay input {
caret-color: #ee4454;
color: #333333;
}
.loginNationalDay .active_code .el-button{
border: none;
color: #66b1ff;
text-align: right;
}
.loginNationalDay .el-input--suffix .el-input__inner{
border-bottom: none !important;
}
.loginNationalDay .active_code{
border-bottom: 2px solid rgba(230, 230, 230, 1) !important;
margin-bottom: 20px;
}
.loginNationalDay .active_code .el-button:focus,.loginNationalDay .active_code .el-button:hover{
background-color: white !important;
}
.loginNationalDay input:-webkit-autofill {
-webkit-text-fill-color: #ededed !important;
-webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
background-color: transparent;
background-image: none;
transition: background-color 50000s ease-in-out 0s;
}
.bg-gray,.loginNationalDay .active_code .el-button.bg-gray:hover{
color: #999999 !important
}
.login_pass p:hover{
color: #111111;
}
.loginNationalDay .login_pass {
color: #999999;
color: #111111;
}
.loginNationalDay .el-button.is-round {
padding: 15px 70px;
margin-top: 50px;
}
._jihuo {
font-size: 14px;
color: #111111;
margin-top: 20px;
}
._jihuo ._gan {
height: 14px;
width: 14px;
display: inline-block;
color: white;
text-align: center;
font-size: 12px;
line-height: 14px;
margin-right: 5px;
background-color: #ee4454;
border-radius: 50%;
}
._jihuo ._ji {
color: #ee4454;
cursor: pointer;
}
.loginNationalDay .el-form-item{
margin-bottom: 30PX;
}
.loginNationalDay .container .container_small{
background: url("../assets/img/login/loginNationalDay-bg-s.png");
width: 77%;
height: 87%;
margin: 0 auto;
margin-top: 3.5%;
background-size: 100% 100%;
background-position: center center;
background-repeat: no-repeat;
}
.conten-box{
width: 450px;
height: 100%;
float: right;
margin-right: 120px;
padding-top: 10%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.right-img{
background: url("../assets/img/login/loginNationalDay-box.png");
width: 290px;
height: 250px;
position: absolute;
right: 50px;
bottom: 15px;
}
.loginNationalDay .el-checkbox__input.is-checked+.el-checkbox__label{
color: #f56c6c;
}
.loginNationalDay .el-checkbox__input.is-checked .el-checkbox__inner, .loginNationalDay .el-checkbox__input.is-indeterminate .el-checkbox__inner{
background-color: #f56c6c;
border-color: #f56c6c;
}
</style>
<template>
<div class="loginNationalDay">
<div class="container" :style="{zoom: zoom}">
<div class="container_small">
<div class="conten-box">
<div class="top_logo">
<img src="../assets/img/logo_t.png" alt>
<span>-同业登录</span>
</div>
<p class="sub_tit">印象之旅,同业旅游好助手</p>
<!-- 登录 -->
<div class="login" v-if="!active">
<el-form :model="loginMsg" :rules="rules" ref="loginMsg">
<p class="_lable">
<i class="iconfont icon-user"></i> 账号
</p>
<el-form-item prop="account">
<el-input
v-model="loginMsg.account"
@change="GetAccountState()"
autocomplete="new-password"
placeholder="请输入账号"
></el-input>
</el-form-item>
<p class="_lable">
<i class="iconfont icon-mima1"></i> 密码
</p>
<el-form-item prop="password">
<el-input
type="password"
autocomplete="new-password"
v-model="loginMsg.password"
placeholder="请输入密码"
></el-input>
</el-form-item>
</el-form>
<div class="login_pass">
<div>
<el-checkbox v-model="checked">下次自动登录</el-checkbox>
</div>
<p @click="active= true, isEdit = true">忘记密码?</p>
</div>
<el-button type="danger" round @click="user_login">登录</el-button>
<p class="_jihuo">
<span class="_gan">!</span>账号未激活?
<span class="_ji" @click="active = true, isEdit = false, initMsg()">立即激活</span>
</p>
</div>
<!-- 激活 -->
<div class="active" v-if="active">
<el-form :model="activeMsg" :rules="rules" ref="activeMsg">
<p class="_lable">
<i class="iconfont icon-user"></i> 账号
</p>
<el-form-item prop="account">
<el-input
v-model="activeMsg.account"
@change="GetAccountState()"
autocomplete="new-password"
placeholder="请输入账号"
></el-input>
</el-form-item>
<p class="_lable">
<i class="iconfont icon-mima1"></i> 设置密码
</p>
<el-form-item prop="password">
<el-input
type="password"
autocomplete="new-password"
v-model="activeMsg.password"
placeholder="请输入密码"
></el-input>
</el-form-item>
<p class="_lable">
<i class="iconfont icon-yanzhengma"></i> 验证码
</p>
<div class="active_code">
<el-input
placeholder="请输入验证码"
v-model="activeMsg.code"
clearable>
</el-input>
<el-button v-if="show" @click="getCode">{{timer==null?'发送验证码':timer}}</el-button>
<el-button v-else disabled class="bg-gray">{{count}}s重新获取</el-button>
</div>
<div class="login_pass">
<p @click="active = false, initMsg()">返回登录</p>
</div>
<el-button type="danger" round @click="user_active(isEdit ? 2 : 1 )">{{isEdit ? '修改' : '激活'}}并登录</el-button>
</el-form>
</div>
</div>
</div>
</div>
<div class="right-img">
</div>
</div>
</template>
<script>
export default {
data() {
return {
active: false,
checked: true,
loginMsg: {
account: "",
password: ""
},
activeMsg: {
account: "",
mobileNumber: "",
password: "",
code: ""
},
isEdit: false,
rules: {
account: [{ required: true, message: "请输入账号", trigger: "blur" }],
password: [{ required: true, message: "请输入密码", trigger: "blur" }]
},
timer: null,
show:true,
count:'',
mobileCodeType: 1,
zoom: 1,
};
},
methods: {
// 获取验证码
getCode() {
var phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/;
//电话
var phone = this.activeMsg.account.replace(/^\s+|\s+$/gm, "");
if (!phoneReg.test(phone)) {
this.$message.error("请输入有效的手机号码!");
return false;
}
const TIME_COUNT = 60;
this.code = "";
if (!this.timer) {
this.count = TIME_COUNT;
this.show = false;
this.timer = setInterval(() => {
if (this.count > 0 && this.count <= TIME_COUNT) {
this.count--;
} else {
this.show = true;
clearInterval(this.timer);
this.timer = null;
}
}, 1000);
}
let msg = {
mobileNumber: this.activeMsg.account,
mobileCodeType: this.mobileCodeType
};
this.apipost("user_get_moblieNumber_code", msg, r => {
if (r.data.resultCode == 1) {
} else {
this.$message.error(r.data.message);
}
});
},
user_active(t) {
//t:1 激活账号 t:2 修改密码
if (this.activeMsg.account == "")
return this.$message.error("请输入账号!");
if (this.activeMsg.password == "")
return this.$message.error("请输入密码!");
if (this.activeMsg.code == "")
return this.$message.error("请输入验证码!");
this.activeMsg.mobileNumber = this.activeMsg.account;
let cmd = "b2b_post_AccountActivation";
if (t == 2) {
cmd = "b2b_post_ModifyPasswordByAccountAndCode";
}
this.apipost(
cmd,
this.activeMsg,
r => {
if (r.data.resultCode == 1) {
let msg = {
account: this.activeMsg.account,
password: this.activeMsg.password
};
this.loginF(msg);
} else {
this.$message.error(r.data.message);
}
},
err => {}
);
},
// 检测账号是否已激活
GetAccountState() {
if (!this.loginMsg.account) return;
this.apipost(
"b2b_get_GetAccountState",
{ account: this.loginMsg.account },
r => {
if (r.data.resultCode == 10007) {
this.$confirm("该账号还未激活,请先激活账号在进行登录!", {
confirmButtonText: "立即激活",
cancelButtonText: "等一等",
type: "warning"
})
.then(() => {
this.active = true;
})
.catch(() => {
});
} else if (r.data.resultCode == 1) {
} else {
this.$message.error(r.data.message);
}
},
err => {}
);
},
//登录
user_login() {
if (this.loginMsg.account == "")
return this.$message.error("请输入账号!");
if (this.loginMsg.password == "")
return this.$message.error("请输入密码!");
this.loging = true;
let msg = {
account: this.loginMsg.account,
password: this.loginMsg.password
};
this.loginF(msg);
},
loginF(msg) {
msg.platform = 0;
// 登录方法
this.apipost(
"b2b_post_Login",
msg,
r => {
if (r.data.resultCode == 1) {
let autoLogin = this.checked ? {
acc: this.loginMsg.account,
pwd: this.loginMsg.password,
} : null ;
localStorage.autoLogin = JSON.stringify(autoLogin)
let userInfo = r.data.data;
let userJson = JSON.stringify(userInfo);
localStorage.userInfo = userJson;
let FromPath = sessionStorage.getItem("FromPath") ? JSON.parse(sessionStorage.getItem("FromPath")) : '';
this.$store.commit("changeLogin", 1);
this.$store.commit("updateUser", userInfo);
//登录成功 删除后台传参
sessionStorage.removeItem("OpenB2BCode");
if (FromPath) {
this.$router.push({ path: FromPath.path, query: FromPath.query });
} else if (this.$route.query.id && this.$route.query.path) {
let path = `${this.$route.query.path}/${this.$route.query.id}`;
this.$router.push({ path });
} else {
this.$router.push({ path: "/Home" });
}
this.$message.success(r.data.message);
this.loging = false;
} else {
this.$message.error(r.data.message);
this.loging = false;
this.errorTips = true;
}
},
null
);
},
initMsg: function () {
this.loginMsg = {
account: "",
password: ""
}
this.activeMsg = {
account: "",
mobileNumber: "",
password: "",
code: ""
}
}
},
created(){
let Height = window.innerHeight
this.zoom = (Math.round((Height/1080) * 100) / 100) + 0.1
let autoLogin = localStorage.autoLogin ? JSON.parse(localStorage.autoLogin) : null
console.log(autoLogin)
this.loginMsg.account = autoLogin ? autoLogin.acc : ''
this.loginMsg.password = autoLogin ? autoLogin.pwd : ''
this.checked = autoLogin ? true : false
}
};
</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