<template>
|
<div class="zjny_home">
|
<div class="product_wrap" style="height: 100%">
|
<!-- 头部导航栏 -->
|
<van-nav-bar>
|
<template #left>
|
<van-image
|
@click="m_isShowLeftMenu = !m_isShowLeftMenu"
|
src="static/img/TitleLog.png"
|
style="
|
width: 90px;
|
height: 100%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
"
|
/>
|
</template>
|
|
<template #right>
|
<!-- <van-icon v-if="isShowLogin" @click="toLogin" name="manager-o" size="18" /> -->
|
</template>
|
</van-nav-bar>
|
<div class="swipe-box">
|
<van-swipe
|
class="my-swipe"
|
width="100%"
|
height="100%"
|
:autoplay="3000"
|
indicator-color="white"
|
>
|
<van-swipe-item>
|
<a href="#">
|
<img src="static/img/Intr/1.png" />
|
<!-- <p id="CST1_P" class="slider-title">浙江南元泵业</p> -->
|
</a>
|
</van-swipe-item>
|
</van-swipe>
|
</div>
|
<div class="product_con" style="display: block">
|
<van-row gutter="5" style="padding: 5px">
|
<van-col span="8" @click="navigatorToEBook">
|
<div class="item_box">
|
<img src="static/img/Icon/eventech/SeriesListBX.png" alt class="icon" />
|
<p>
|
<span>按泵型</span>
|
<span>By Catalog</span>
|
</p>
|
</div>
|
</van-col>
|
<van-col span="8" @click="navigatorSeriesZM">
|
<div class="item_box">
|
<img src="static/img/Icon/eventech/SeriesListZM.png" alt class="icon" />
|
<p>
|
<span>按字母</span>
|
<span>By alphabet</span>
|
</p>
|
</div>
|
</van-col>
|
<van-col span="8" @click="navigatorToPipeCalc">
|
<div class="item_box">
|
<img src="static/img/Icon/eventech/PipeCalc.png" alt class="icon" />
|
<p>
|
<span>管路损失</span>
|
<span>Pipe Calc</span>
|
</p>
|
</div>
|
</van-col>
|
</van-row>
|
<van-row gutter="5" style="padding: 0 5px">
|
<van-col span="16">
|
<van-col
|
span="24"
|
style="margin-bottom: 5px; padding-right: 2.5px"
|
@click="navigatorToSelect"
|
>
|
<div class="item_box">
|
<img src="static/img/Icon/eventech/FindData.png" alt class="icon" />
|
<p>
|
<span>智能选型</span>
|
<span>Intelligent selection</span>
|
</p>
|
</div>
|
</van-col>
|
<van-col span="24" @click="navigatorFindKeyWords">
|
<div class="item_box">
|
<img src="static/img/Icon/eventech/Select.png" alt class="icon" />
|
<p>
|
<span>搜索</span>
|
<span>Search</span>
|
</p>
|
</div>
|
</van-col>
|
</van-col>
|
<van-col span="8" style="height: 205px">
|
<van-col span="24" @click="toFactoryList">
|
<div class="item_box">
|
<img
|
src="static/img/Icon/eventech/FactoryList.png"
|
style="top: 5px"
|
alt
|
class="icon"
|
/>
|
<p>
|
<span>入驻厂家</span>
|
<span style="left: 5px">Factory List</span>
|
</p>
|
</div>
|
</van-col>
|
<van-col span="24" @click="toCorpInfo" style="margin-top:5px">
|
<div class="item_box">
|
<img
|
src="static/img/corpInfo/corpIcon.png"
|
style="top: 5px;right:20px;"
|
alt
|
class="icon"
|
/>
|
<p>
|
<span>公司信息</span>
|
<span style="left: 0px">CorpInfo</span>
|
</p>
|
</div>
|
</van-col>
|
</van-col>
|
</van-row>
|
</div>
|
<van-popup
|
v-model:show="m_isShowLeftMenu"
|
position="left"
|
style="height: 100%; width: 70%; background-color: #000000"
|
>
|
<div class="leftMenuTitle">
|
<div>泵管家</div>
|
<van-icon color="#ffffff" name="close" @click="m_isShowLeftMenu = false" />
|
</div>
|
<div>
|
<van-collapse v-model="activeNames">
|
<van-collapse-item title="应用" name="1">
|
<div class="leftMenuItem">
|
<van-cell is-link title="我的收藏" @click="toCollectList" icon="star-o" />
|
<van-cell is-link title="比较列表" @click="toCompareList">
|
<template #icon>
|
<i style="margin-right: 5px" class="iconfont iconplus-listview" />
|
</template>
|
</van-cell>
|
<!-- <van-cell is-link title="管路损失" @click="toPipeLoss" icon="setting-o" /> -->
|
<!-- <van-cell is-link title="帮助手册" @click="toHelpManual" icon="info-o" /> -->
|
</div>
|
</van-collapse-item>
|
<van-collapse-item title="关于" name="2">
|
<div class="leftMenuItem">
|
<van-cell
|
is-link
|
v-if="isApp"
|
@click="toPrivacyStatement"
|
title="隐私声明"
|
icon="info-o"
|
/>
|
<van-cell is-link v-if="isApp" @click="toUserAgreement" title="用户协议" icon="info-o" />
|
<van-cell is-link @click="toAbout" title="软件开发商" icon="info-o" />
|
</div>
|
</van-collapse-item>
|
</van-collapse>
|
<!-- <van-cell v-if="!isShowLogin" @click="resetPwd" title="修改密码" />
|
<van-cell v-if="!isShowLogin" @click="LoginOut" title="退出登录" /> -->
|
<van-cell :title="'当前版本:'+ m_currentVersion" />
|
</div>
|
</van-popup>
|
<!-- 底部 -->
|
<nav
|
id="footerBar"
|
class="tang-footer"
|
style="position: fixed; width: 100%; bottom: 0"
|
>{{m_bottomTextContent}}</nav>
|
</div>
|
<div style="position: fixed;right: 5px;bottom: 120px;box-shadow: 0 0 6px rgb(0 0 0 / 12%);border-radius: 28px;" @click="contactMe">
|
<van-icon name="chat-o" size="42" />
|
</div>
|
</div>
|
</template>
|
|
<script>
|
|
import { Dialog } from "vant";
|
import languageMixin from "@/mixin/language";
|
export default {
|
mixins: [languageMixin],
|
name: "Home",
|
data() {
|
return {
|
m_isShowLeftMenu: false,
|
|
isShowLogin: true,
|
activeNames: ["1"],
|
m_softTitle: "泵管家",
|
isApp: false,
|
m_bottomTextContent: "上海义维流体科技有限公司",
|
m_currentVersion: "1.0.0"
|
};
|
},
|
mounted() {
|
document.title = "泵管家";
|
|
this.m_currentVersion = window.globalConfig.CurrentVersion;
|
//console.log(this.$globalConfig.SoftType, 202);
|
if (this.$globalConfig.SoftType == 45) {
|
this.isApp = true;
|
this.autoUpdate();
|
}
|
let userID = this.$store.state.instante.account.UserID;
|
if (userID) {
|
this.isShowLogin = false;
|
} else {
|
this.isShowLogin = true;
|
}
|
},
|
methods: {
|
//检测更新
|
autoUpdate() {
|
if (window.plus) {
|
this.plusReady();
|
} else {
|
document.addEventListener("plusready", this.plusReady, false);
|
}
|
},
|
//获取版本号
|
plusReady() {
|
let plus = window.plus;
|
// 获取本地应用资源版本号
|
plus.runtime.getProperty(plus.runtime.appid, inf => {
|
this.m_currentVersion = inf.version;
|
this.checkVersion(inf.version);
|
});
|
},
|
// 检查版本
|
checkVersion(currentV) {
|
let plus = window.plus;
|
// console.log(plus.os.name,plus.os.version,plus.device.model,plus.device.vendor,253)
|
let isFirstStarup = localStorage.getItem("isFirstStarup") || true;
|
|
let url =
|
this.$globalConfig.WebApiUrl.MainUrl + "v1/app/AddSoftUseNumber";
|
let Lang = this.$i18n.locale;
|
this.$axios({
|
method: "post",
|
url: url,
|
data: {
|
DeviceModel: plus.device.model,
|
DeviceVendor: plus.device.vendor,
|
Lang: Lang,
|
OsName: plus.os.name,
|
OsVersion: plus.os.version,
|
IsFirstStartup: isFirstStarup,
|
SoftVersion: currentV
|
}
|
})
|
.then(res => {
|
|
if (res.status === 200) {
|
let result = res.data;
|
let current_version = currentV.substring(currentV.length - 3);
|
let newVersion = result.Data.Version.substring(
|
result.Data.Version.length - 3
|
);
|
|
if (result.Data && currentV && current_version < newVersion) {
|
if (result.Data.IsMustUpdate == false) {
|
this.$dialog
|
.confirm({
|
title: `${this.$t("header.tip.TR")}`,
|
message: `${this.$t("header.update.TR")}`,
|
confirmButtonText: `${this.$t("detailPage.define.TR")}`,
|
cancelButtonText: `${this.$t("detailPage.cancel.TR")}`
|
})
|
.then(() => {
|
this.downloadWgt(result.Data.Version, result.Data.Langugae);
|
})
|
.catch(() => {
|
return;
|
});
|
} else {
|
Dialog.alert({
|
title: `${this.$t("header.tip.TR")}`,
|
message: result.Data.Note
|
}).then(() => {
|
this.downloadWgt(result.Data.Version, result.Data.Langugae);
|
});
|
}
|
}
|
}
|
})
|
.catch(err => {
|
console.log(err);
|
});
|
},
|
// 下载wgt包
|
downloadWgt(newVersion, lang) {
|
let plus = window.plus;
|
let resultLang = "";
|
if (lang == 0) {
|
resultLang = "cn";
|
localStorage.setItem("locale", resultLang);
|
} else if (lang == 2) {
|
resultLang = "en";
|
localStorage.setItem("locale", resultLang);
|
}
|
let currentLang = localStorage.getItem("locale") || resultLang;
|
let wgtUrl =
|
"http://47.100.245.85:8086//AppUpdate/" +
|
currentLang +
|
"_" +
|
newVersion +
|
".wgt";
|
console.log(wgtUrl, 319);
|
plus.nativeUI.showWaiting(`${this.$t("header.updateFile.TR")}`);
|
plus.downloader
|
.createDownload(wgtUrl, { filename: "_doc/update/" }, (d, status) => {
|
// console.log(JSON.stringify(d),JSON.stringify(status),279)
|
if (status === 200) {
|
plus.nativeUI.closeWaiting();
|
this.installWgt(d.filename); // 安装wgt包
|
} else {
|
plus.nativeUI.closeWaiting();
|
plus.nativeUI.alert(`${this.$t("header.updateFail.TR")}`);
|
}
|
})
|
.start();
|
},
|
// 安装wgt包
|
installWgt(path) {
|
let _this = this;
|
let plus = window.plus;
|
plus.nativeUI.showWaiting(`${_this.$t("header.installFile.TR")}`);
|
plus.runtime.install(
|
path,
|
{},
|
function() {
|
plus.nativeUI.closeWaiting();
|
plus.nativeUI.alert(
|
`${_this.$t("header.installCompleted.TR")}`,
|
function() {
|
plus.runtime.restart();
|
}
|
);
|
},
|
function(e) {
|
plus.nativeUI.closeWaiting();
|
plus.nativeUI.alert(
|
`${_this.$t("header.installFail.TR")}` +
|
"[" +
|
e.code +
|
"]:" +
|
e.message
|
);
|
}
|
);
|
},
|
//显示左侧菜单
|
showLeftMenu() {
|
this.m_isShowLeftMenu = true;
|
},
|
//跳转到行业
|
navigatorToHangYe() {
|
this.$router.push({
|
path: `/${this.getCurrentLanguageUrl()}/EBook/ApplicationHangYeMain`
|
});
|
},
|
//跳转到电子样本界面
|
navigatorToEBook() {
|
let page_url = `/EBook/SeriesListLXBySelectCatalog`;
|
this.gotoPage(page_url, "", null);
|
},
|
//跳转到智能选型界面
|
navigatorToSelect() {
|
let page_url = `/Select/SelParms`;
|
this.gotoPage(page_url, "", null);
|
},
|
//跳转到管路损失
|
toPipeLoss() {
|
this.gotoPage("/PipeLoss/Index", "", null);
|
},
|
//跳转到bim模型界面
|
toBimModel() {},
|
//跳转到隐私声明页面
|
toPrivacyStatement() {
|
this.$router.push({
|
path: `/${this.getCurrentLanguageUrl()}/privacyStatement`
|
});
|
},
|
//跳转到用户协议页面
|
toUserAgreement() {
|
this.$router.push({
|
path: `/${this.getCurrentLanguageUrl()}/userAgreement`
|
});
|
},
|
//跳转到公司信息界面
|
toCorpInfo() {
|
this.$router.push({
|
path: `/${this.getCurrentLanguageUrl()}/CorpInfo`
|
});
|
},
|
//跳转到字母列表
|
navigatorSeriesZM() {
|
this.gotoPage("/EBook/SeriesListZM", "", null);
|
},
|
//跳转到管路损失
|
navigatorToPipeCalc() {
|
this.gotoPage("/PipeLoss/Index", "", null);
|
},
|
//跳转到bim模型库界面
|
toModelLibrary() {
|
this.gotoPage("/ModelLibrary/ModelSeriesList", "", null);
|
},
|
//跳转到厂家列表
|
toFactoryList() {
|
this.gotoPage("/CorpList", "", null);
|
},
|
//退出登录
|
LoginOut() {
|
Dialog.confirm({
|
title: "提示",
|
message: "您确定要退出登录?"
|
})
|
.then(() => {
|
localStorage.removeItem("ViewPageNumber");
|
this.$store.dispatch("instante/account/logout");
|
})
|
.catch(() => {
|
return;
|
});
|
},
|
//跳转到我的收藏页面
|
toCollectList() {
|
let collectList = localStorage.getItem("collectList");
|
collectList = collectList != null ? JSON.parse(collectList) : [];
|
if (collectList.length == 0) {
|
this.$toast({ message: "您暂未收藏产品", type: "fail" });
|
this.m_isShowLeftMenu = false;
|
return;
|
}
|
this.gotoPage("/Collect/Index", "", null);
|
},
|
//跳转到比较列表页面
|
toCompareList() {
|
//从本地存储读取比较数据
|
let compareList = localStorage.getItem("compareList");
|
compareList = compareList != null ? JSON.parse(compareList) : [];
|
if (compareList.length < 2) {
|
this.$toast({ message: "比较列表至少需要两项", type: "fail" });
|
this.m_isShowLeftMenu = false;
|
return;
|
}
|
this.gotoPage("/Compare/Index", "", null);
|
},
|
//跳转到关于页面
|
toAbout() {
|
this.$router.push({
|
path: `/${this.getCurrentLanguageUrl()}/aboutEventech`
|
});
|
},
|
//跳转到帮助手册界面
|
toHelpManual() {
|
this.$router.push({
|
path: `/${this.getCurrentLanguageUrl()}/helpManual`
|
});
|
},
|
//跳转到搜索界面
|
navigatorFindKeyWords() {
|
this.gotoPage("/FindDataList", "", null);
|
},
|
//跳转登陆界面
|
toLogin() {
|
this.$store.dispatch("instante/account/logout");
|
this.gotoPage("/login/simpleLogin", "", null);
|
},
|
//重置密码
|
resetPwd() {
|
this.gotoPage("/resetPwd", "", null);
|
},
|
//联系我
|
contactMe(){
|
let qqNumberUrl = "1723298894"
|
let appQQUrl = "mqqwpa://im/chat?chat_type=wpa&uin="+qqNumber+"&version=1&src_type=web&web_src=oicqzone.com"
|
let weChatQQUrl = "http://wpa.qq.com/msgrd?v=3&uin="+qqNumberUrl +"&site=qq&menu=yes"
|
|
window.location.href=appQQUrl
|
|
},
|
}
|
};
|
</script>
|
<style lang="scss">
|
// @import url("/static/css/indexV3.css");
|
.zjny_home {
|
height: 100vh;
|
width: 100%;
|
font-size: 14px;
|
.my-swipe {
|
width: 100%;
|
height: 100%;
|
a {
|
position: relative;
|
width: 100%;
|
|
img {
|
width: 100%;
|
height: 100%;
|
}
|
}
|
.van-swipe-item {
|
color: #fff;
|
width: 100%;
|
height: 100%;
|
}
|
.van-swipe__indicators {
|
left: 92% !important;
|
}
|
}
|
.swipe-box {
|
background-color: #000000;
|
width: 100%;
|
height: 30%;
|
.img-box {
|
width: 50px;
|
height: 50px;
|
img {
|
height: 100%;
|
width: 100%;
|
}
|
}
|
}
|
.slider-title {
|
position: absolute;
|
line-height: 30px;
|
font-size: 14px;
|
color: #ffffff;
|
z-index: 10;
|
bottom: 0px;
|
margin: 0px;
|
width: 100%;
|
text-align: start;
|
padding-left: 10px;
|
opacity: 0.7;
|
}
|
.van-image__error,
|
.van-image__img,
|
.van-image__loading {
|
max-width: 100%;
|
max-height: 100%;
|
width: auto;
|
height: auto;
|
}
|
.van-col {
|
height: 100px;
|
.item_box {
|
position: relative;
|
height: 100%;
|
background-color: #e7f0f2;
|
img {
|
position: absolute;
|
max-width: 65%;
|
max-height: 50%;
|
width: auto;
|
height: auto;
|
right: 5px;
|
top: 5px;
|
}
|
p {
|
position: absolute;
|
bottom: 0;
|
span:nth-child(1) {
|
font-size: 14px;
|
color: #4884b8;
|
display: block;
|
position: relative;
|
top: 9px;
|
left: 5px;
|
text-align: left;
|
}
|
span:nth-child(2) {
|
font-size: 12px;
|
color: #5781be;
|
left: 5px;
|
display: block;
|
position: relative;
|
top: 6px;
|
}
|
}
|
}
|
}
|
.leftMenuTitle {
|
width: 100%;
|
height: 80px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
font-size: 22px;
|
color: #ffffff;
|
padding: 0px 10px;
|
box-sizing: border-box;
|
}
|
.van-cell {
|
color: #fff;
|
background-color: #000000;
|
}
|
.van-cell__title,
|
.van-cell__value {
|
flex: 1;
|
text-align: initial;
|
font-size: 16px;
|
}
|
.van-collapse-item__content {
|
padding: unset;
|
background-color: #000000;
|
}
|
.leftMenuItem {
|
.van-cell {
|
padding-left: 55px;
|
}
|
}
|
}
|
</style>
|