Commit f1c8aebd authored by anxixi's avatar anxixi

Merge remote-tracking branch 'origin/master'

parents bf8b592b 7d3205c3
......@@ -110,4 +110,5 @@
}
.positionTop{
top: 3rem;
padding-bottom:3rem;
}
\ No newline at end of file
This diff is collapsed.
......@@ -2,11 +2,11 @@ import Vue from 'vue';
import VueI18n from 'vue-i18n';
Vue.use(VueI18n);
const i18n = new VueI18n({
locale: window.localStorage.getItem("language"), // 语言标识
locale: window.sessionStorage.getItem("language"), // 语言标识
//this.$i18n.locale // 通过切换locale的值来实现语言切换
messages: {
'zh-CN': require('./lang/zh'), // 中文语言包
'en': window.localStorage.getItem("language")=='zh-CN'?require('./lang/zh'):require('./lang/en')
'en': window.sessionStorage.getItem("language")=='zh-CN'?require('./lang/zh'):require('./lang/en')
}
})
export default {
......
......@@ -260,11 +260,11 @@
if (that.lang === 'zh-CN') {
that.lang = 'en';
that.$i18n.locale = that.lang;//关键语句
window.localStorage.setItem("language",that.lang);
window.sessionStorage.setItem("language",that.lang);
} else {
that.lang = 'zh-CN';
that.$i18n.locale = that.lang;//关键语句
window.localStorage.setItem("language",that.lang);
window.sessionStorage.setItem("language",that.lang);
}
location.reload();
},
......@@ -434,7 +434,7 @@
},
mounted() {
this.getCountData();
this.diven_zh = window.localStorage.getItem("language") == "en" ? true : false;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? true : false;
this.isOtherVisible = this.isOther;
globalMsg.$on("sendIndex",(data)=>{
this.currentIndex= data;
......
......@@ -46,12 +46,12 @@
if (that.lang === 'zh-CN') {
that.lang = 'en';
that.$i18n.locale = that.lang;//关键语句
window.localStorage.setItem("language",that.lang);
window.sessionStorage.setItem("language",that.lang);
} else {
that.lang = 'zh-CN';
that.$i18n.locale = that.lang;//关键语句
window.localStorage.setItem("language",that.lang);
window.sessionStorage.setItem("language",that.lang);
}
location.reload();
},
......
......@@ -131,38 +131,46 @@
if (that.lang === 'zh-CN') {
that.lang = 'en';
that.$i18n.locale = that.lang;//关键语句
window.localStorage.setItem("language",that.lang);
window.sessionStorage.setItem("language",that.lang);
} else {
that.lang = 'zh-CN';
that.$i18n.locale = that.lang;//关键语句
window.localStorage.setItem("language",that.lang);
window.sessionStorage.setItem("language",that.lang);
}
location.reload();
},
handleSearchDetail(data){
if(data){
let params = {
context:data
}
api.mixSearchAxios(params).then((res)=>{
if(res.code==0){
globalMsg.$emit("sendResultData",res.result,data);
var tab = window.sessionStorage.getItem("searchTabInd")?window.sessionStorage.getItem("searchTabInd"):this.userInfo.empType==0?2:1;
if(this.$route.name!="mobileSearchResult"){
this.$router.push({path:"/mobileSearchResult",query:{key:data,tab:tab}});
var tab = window.sessionStorage.getItem("searchTabInd")?window.sessionStorage.getItem("searchTabInd"):this.userInfo.empType==0?2:1;
if(this.$route.name!="mobileSearchResult"){
this.$router.push({path:"/mobileSearchResult",query:{key:data,tab:tab}});
}else{
if(data!=window.sessionStorage.getItem("keyword"))this.$router.replace({path:"/mobileSearchResult",query:{key:data,tab:tab}});
}
window.sessionStorage.setItem("keyword",data);
globalMsg.$emit("reloadFunc");
}else{
this.$toast(res.msg);
}
}).catch((err)=>{
this.$toast(err);
})
}else{
if(data!=window.sessionStorage.getItem("keyword"))this.$router.replace({path:"/mobileSearchResult",query:{key:data,tab:tab}});
}
window.sessionStorage.setItem("keyword",data);
// let params = {
// context:data
// }
// api.mixSearchAxios(params).then((res)=>{
// if(res.code==0){
// globalMsg.$emit("sendResultData",res.result,data);
// var tab = window.sessionStorage.getItem("searchTabInd")?window.sessionStorage.getItem("searchTabInd"):this.userInfo.empType==0?2:1;
// if(this.$route.name!="mobileSearchResult"){
// this.$router.push({path:"/mobileSearchResult",query:{key:data,tab:tab}});
//
// }else{
// if(data!=window.sessionStorage.getItem("keyword"))this.$router.replace({path:"/mobileSearchResult",query:{key:data,tab:tab}});
// }
// window.sessionStorage.setItem("keyword",data);
// globalMsg.$emit("reloadFunc");
// }else{
// this.$toast(res.msg);
// }
// }).catch((err)=>{
// this.$toast(err);
// })
}
},
......@@ -199,13 +207,7 @@
let that = this;
api.logoutAxios().then((res)=>{
if(res.code==0){
window.sessionStorage.removeItem("userInfo");
window.sessionStorage.removeItem("keyword");
window.sessionStorage.removeItem("mobileIndex");
window.sessionStorage.removeItem("totalCount");
window.sessionStorage.removeItem("businessProjectsCount");
window.sessionStorage.removeItem("businessRequirementsCount");
window.sessionStorage.removeItem("searchTabInd");
window.sessionStorage.clear();
that.$router.push("/mobileLogin");
that.drawer = false;
}else{
......
......@@ -155,7 +155,7 @@
api.getBigBusinessListAxios(params).then((res)=>{
this.fullscreenLoading = false;
if(res.code==0){
this.$emit("sendBusinessCountFunc",res.result.pages);
this.$emit("sendBusinessCountFunc",res.result.total);
if(res.result.records.length>0){
this.hasData = false;
res.result.records.forEach((item)=>{
......@@ -232,17 +232,16 @@
},
},
mounted(){
if(this.$route.query.tab==1) {
this.getProjectList();
}
if(this.$route.query.tab==2||this.isMargin) {
if(this.$route.name=="phoneBusinessList"){
this.getInitList();
}
globalMsg.$on("reloadFunc",()=>{
if(this.$route.query.tab==1) {
this.page=1;
this.getProjectList();
}
if(this.$route.query.tab==2||this.isMargin) {
this.page=1;
this.getInitList();
}
})
......@@ -265,5 +264,6 @@
border-top: 1px solid transparent;
padding-top: 1rem;
top: 1rem;
padding-bottom:1rem;
}
</style>
\ No newline at end of file
......@@ -37,13 +37,13 @@ if (ismobile == 1) {
}else{
require('../public/css/common.scss')
}
if(!window.localStorage.getItem("language")){
if(!window.sessionStorage.getItem("language")){
if(type=="Netscape"){
language =navigator.language;
}else{
language = navigator.userLanguage;
}
window.localStorage.setItem("language",language!='zh'?'en':'zh-CN');
window.sessionStorage.setItem("language",language!='zh'&&language!='zh-CN'?'en':'zh-CN');
}
// var userInfoObj = window.sessionStorage.getItem("userInfo") ? JSON.parse(Base64.decode(window.sessionStorage.getItem("userInfo"))) : "",userInfoData = "";
// if (document.cookie.length > 0) {
......@@ -69,7 +69,7 @@ if(!window.localStorage.getItem("language")){
// }
var en = window.localStorage.getItem("language");
var en = window.sessionStorage.getItem("language");
Vue.config.productionTip = false;
const i18n = new VueI18n({
locale: en, // 语言标识
......
......@@ -92,7 +92,7 @@
}
},
mounted() {
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
for(let i in this.processSateList){
if(this.processSateList[i] == "PS01"){
this.progress1 = 'colorclass';
......
......@@ -308,7 +308,7 @@
},
},
mounted(){
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
this.requirementDetailed();
},
}
......
......@@ -296,7 +296,7 @@
},
mounted() {
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
this.smallbusinessselect();
}
}
......
......@@ -1062,7 +1062,7 @@
},
},
mounted(){
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
const empinfo = JSON.parse(this.Base64.decode(window.sessionStorage.getItem("userInfo")));
//empType 0 小b 1 大b 2 内部用户
if(empinfo.empType == 1){
......
......@@ -268,7 +268,7 @@
},
mounted() {
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
}
}
</script>
......
......@@ -376,7 +376,7 @@
},
},
mounted(){
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
this.selectProjectByIded();
},
}
......
......@@ -303,7 +303,7 @@
},
mounted() {
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
this.smallbusinessselect();
}
}
......
......@@ -451,7 +451,7 @@
},
},
mounted() {
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
this.getNationList();
this.searchSalesAxios();
api.getStaffProcessDetail({purposeId:this.$route.query.purposeId,type:this.$route.query.type}).then(response => {
......
......@@ -146,7 +146,7 @@
next(vm=>{ // 这里的vm指的就是vue实例,可以用来当做this使用
vm.pathfrom = from.path;
if(vm.pathfrom == '/aggregatetab'){
vm.search = JSON.parse(window.localStorage.getItem("aggregatetab"));
vm.search = JSON.parse(window.sessionStorage.getItem("aggregatetab"));
vm.registerTypeed.push(vm.search.registerType)
vm.empTypeed.push(vm.search.empType)
vm.authenticationStateed.push(vm.search.authenticationState)
......@@ -284,7 +284,7 @@
},
mounted() {
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
}
}
</script>
......
......@@ -378,7 +378,7 @@
}
},
mounted(){
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
const empinfo = JSON.parse(this.Base64.decode(window.sessionStorage.getItem("userInfo")));
//empType 0 小b 1 大b 2 内部用户
if(empinfo.authenticationState != 2){
......
......@@ -452,7 +452,7 @@
},
},
mounted(){
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
this.getNationList();
this.smallbusinessselect();
this.getlatestFinancingMoney();
......
......@@ -223,7 +223,7 @@
}
},
mounted(){
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
this.selectDictListcode();
this.selectBigBusinessLevelect();
},
......
......@@ -479,7 +479,7 @@
}
},
mounted(){
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
this.projectphaselist();
this.projectformlist();
},
......
......@@ -211,7 +211,7 @@
},
mounted(){
this.projectInfo();
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
const empinfo = JSON.parse(this.Base64.decode(window.sessionStorage.getItem("userInfo")));
//empType 0 小b 1 大b 2 内部用户
if(empinfo.empType != 2){
......
......@@ -155,18 +155,18 @@
if(this.shows){
this.showsd = true;
}
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
if(window.document.body.clientWidth > 700){
this.isclientWidth = true;
let images = window.localStorage.getItem("language") == "en" ? 'url(' + require('../../assets/img/index/Industryen.jpg') + ') center top /1920px 530px no-repeat rgba(0,92,195,1)' : 'url(' + require('../../assets/img/index/Industryzh.jpg') + ') center top /1920px 530px no-repeat rgba(0,92,195,1)';
let images = window.sessionStorage.getItem("language") == "en" ? 'url(' + require('../../assets/img/index/Industryen.jpg') + ') center top /1920px 530px no-repeat rgba(0,92,195,1)' : 'url(' + require('../../assets/img/index/Industryzh.jpg') + ') center top /1920px 530px no-repeat rgba(0,92,195,1)';
this.backgroundImg.background = images;
let imageschild = window.localStorage.getItem("language") == "en" ? 'url(' + require('../../assets/img/index/Industryen.jpg') + ') center top /1600px 530px no-repeat rgba(0,92,195,1)' : 'url(' + require('../../assets/img/index/Industryzh.jpg') + ') center top /1600px 530px no-repeat rgba(0,92,195,1)';
let imageschild = window.sessionStorage.getItem("language") == "en" ? 'url(' + require('../../assets/img/index/Industryen.jpg') + ') center top /1600px 530px no-repeat rgba(0,92,195,1)' : 'url(' + require('../../assets/img/index/Industryzh.jpg') + ') center top /1600px 530px no-repeat rgba(0,92,195,1)';
this.backgroundImgchild.background = imageschild;
}else{
this.isclientWidth = false;
let imagesphone = window.localStorage.getItem("language") == "en" ? 'url(' + require('../../assets/img/index/Industryenphone.png') + ') center top /100% 530px no-repeat rgba(0,92,195,1)' : 'url(' + require('../../assets/img/index/Industryzhphone.png') + ') center top /100% 530px no-repeat rgba(0,92,195,1)';
let imagesphone = window.sessionStorage.getItem("language") == "en" ? 'url(' + require('../../assets/img/index/Industryenphone.png') + ') center top /100% 530px no-repeat rgba(0,92,195,1)' : 'url(' + require('../../assets/img/index/Industryzhphone.png') + ') center top /100% 530px no-repeat rgba(0,92,195,1)';
this.backgroundImg.background = imagesphone;
let imageschildphone = window.localStorage.getItem("language") == "en" ? 'url(' + require('../../assets/img/index/Industryenphone.png') + ') center top /100% 530px no-repeat rgba(0,92,195,1)' : 'url(' + require('../../assets/img/index/Industryzhphone.png') + ') center top /100% 530px no-repeat rgba(0,92,195,1)';
let imageschildphone = window.sessionStorage.getItem("language") == "en" ? 'url(' + require('../../assets/img/index/Industryenphone.png') + ') center top /100% 530px no-repeat rgba(0,92,195,1)' : 'url(' + require('../../assets/img/index/Industryzhphone.png') + ') center top /100% 530px no-repeat rgba(0,92,195,1)';
this.backgroundImgchild.background = imageschildphone;
}
}
......
......@@ -85,7 +85,7 @@
if (that.lang === 'zh-CN') {
that.lang = 'en';
that.$i18n.locale = that.lang;//关键语句
window.localStorage.setItem("language",that.lang);
window.sessionStorage.setItem("language",that.lang);
// validate.i18n.locale =window.localStorage.getItem("lang");
location.reload();
that.reload();
......@@ -93,7 +93,7 @@
} else {
that.lang = 'zh-CN';
that.$i18n.locale = that.lang;//关键语句
window.localStorage.setItem("language",that.lang);
window.sessionStorage.setItem("language",that.lang);
// validate.i18n.locale =window.localStorage.getItem("lang");
location.reload();
that.reload();
......
......@@ -20,6 +20,7 @@
import breadTop from '../../components/mobile/breadTop';
import {Toast} from 'mint-ui';
import searchList from '../../components/mobile/searchList';
import api from '../index/api/api'
export default {
name: "searchRecord",
components: {
......@@ -55,13 +56,12 @@
this.currentIndex = index;
this.$router.replace({path:'/mobileSearchResult',query:{key:this.$route.query.key,tab:index}});
window.sessionStorage.setItem("searchTabInd",index);
if(index==1) this.$refs.searchList.getProjectList();
else this.$refs.searchList.getInitList();
},
//获取用户信息
getUserInfoFunc() {
this.userInfo = window.sessionStorage.getItem("userInfo") ? JSON.parse(this.Base64.decode(window.sessionStorage.getItem("userInfo"))) : null;
this.handleSearchFunc();
if (this.userInfo&&this.currentIndex==-1) {
if(this.userInfo.empType==0) {
this.currentIndex = 2;
......@@ -74,24 +74,46 @@
isShowScreen(data){
this.isShow = data;
},
handleSearchFunc(){
let params = {
context:this.$route.query.key
}
api.mixSearchAxios(params).then((res)=>{
if(res.code==0){
this.resultData = res.result;
this.keyword = this.$route.query.key;
this.totalCount = (res.result.businessProjectsCount?res.result.businessProjectsCount:0)+(res.result.businessRequirementsCount?res.result.businessRequirementsCount:0);
window.sessionStorage.setItem("totalCount",this.totalCount);
window.sessionStorage.setItem("businessProjectsCount",res.result.businessProjectsCount);
window.sessionStorage.setItem("businessRequirementsCount",res.result.businessRequirementsCount);
this.businessProjectsCount = window.sessionStorage.getItem("businessProjectsCount");
this.businessRequirementsCount = window.sessionStorage.getItem("businessRequirementsCount");
globalMsg.$emit("reloadFunc");
}else{
this.$toast(res.msg);
}
}).catch((err)=>{
this.$toast(err);
})
}
},
mounted(){
this.getUserInfoFunc();
globalMsg.$on("sendResultData",(data,keyword)=>{
this.resultData = data;
this.keyword = keyword;
this.totalCount = (data.businessProjectsCount?data.businessProjectsCount:0)+(data.businessRequirementsCount?data.businessRequirementsCount:0);
window.sessionStorage.setItem("totalCount",this.totalCount);
window.sessionStorage.setItem("businessProjectsCount",data.businessProjectsCount);
window.sessionStorage.setItem("businessRequirementsCount",data.businessRequirementsCount);
})
this.businessProjectsCount = window.sessionStorage.getItem("businessProjectsCount");
this.businessRequirementsCount = window.sessionStorage.getItem("businessRequirementsCount");
globalMsg.$on("isVisible",(data)=>{
this.isShow = data;
})
},
watch:{
//监听相同路由下参数变化的时候,从而实现异步刷新
'$route'(to,from){
if(this.$route.query.key!=""){
this.getUserInfoFunc();
}
},
}
}
</script>
......
......@@ -36,7 +36,7 @@
if(this.shows){
this.showsd = true;
}
this.images = window.localStorage.getItem("language") == "en" ? require('../../assets/img/index/aboutusen.jpg') : require('../../assets/img/index/aboutuszh.jpg');
this.images = window.sessionStorage.getItem("language") == "en" ? require('../../assets/img/index/aboutusen.jpg') : require('../../assets/img/index/aboutuszh.jpg');
}
}
</script>
......
......@@ -39,7 +39,7 @@
if(this.shows){
this.showsd = true;
}
this.images = window.localStorage.getItem("language") == "en" ? require('../../assets/img/index/aboutusen.jpg') : require('../../assets/img/index/aboutuszh.jpg');
this.images = window.sessionStorage.getItem("language") == "en" ? require('../../assets/img/index/aboutusen.jpg') : require('../../assets/img/index/aboutuszh.jpg');
}
}
</script>
......
......@@ -227,7 +227,7 @@
},
mounted() {
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
this.getInitList();
}
}
......
......@@ -839,7 +839,7 @@
}
},
mounted() {
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
if(window.document.body.clientWidth > 700){
this.isclientWidth = true;
}else{
......
......@@ -882,7 +882,7 @@
}
},
mounted() {
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
if(window.document.body.clientWidth > 700){
this.isclientWidth = true;
}else{
......
......@@ -151,8 +151,8 @@
if(this.shows){
this.showsd = true;
};
this.titlep = window.localStorage.getItem("language") == "en" ? 'Use help' : '使用帮助';
this.diven_zh = window.localStorage.getItem("language") == "en" ? false : true;
this.titlep = window.sessionStorage.getItem("language") == "en" ? 'Use help' : '使用帮助';
this.diven_zh = window.sessionStorage.getItem("language") == "en" ? false : true;
}
}
</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