feat(global): 移除国际化oss, 首页改造
This commit is contained in:
parent
4b5d8c42ec
commit
c7683ee2f7
|
@ -12,9 +12,9 @@
|
|||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<script src="https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/language/zh-CN.js"></script>
|
||||
<!-- <script src="https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/language/zh-CN.js"></script>
|
||||
<script src="https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/language/en-US.js"></script>
|
||||
<script src="https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/language/zh-TC.js"></script>
|
||||
<script src="https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/language/zh-TC.js"></script> -->
|
||||
<!-- <script src="https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/language/fr-FR.js"></script>
|
||||
<script src="https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/language/ru-RU.js"></script> -->
|
||||
</head>
|
||||
|
|
|
@ -1,41 +1,37 @@
|
|||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kBank
|
||||
* @Date: 2022-07-05 17:57:49
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import zhCn from 'zhCN'
|
||||
import enUS from 'enUS'
|
||||
import zhTC from 'zhTC'
|
||||
import Vue from "vue";
|
||||
import VueI18n from "vue-i18n";
|
||||
// import zhCn from 'zhCN'
|
||||
// import enUS from 'enUS'
|
||||
// import zhTC from 'zhTC'
|
||||
// import ruRU from 'ruRU'
|
||||
// import frFR from 'frFR'
|
||||
import enLocale from 'element-ui/lib/locale/lang/en'
|
||||
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
|
||||
import twLocale from 'element-ui/lib/locale/lang/zh-TW'
|
||||
import ruLocale from 'element-ui/lib/locale/lang/ru-RU'
|
||||
import frLocale from 'element-ui/lib/locale/lang/fr'
|
||||
const lang = localStorage.getItem('lang') || 'zh-CN'
|
||||
|
||||
Vue.use(VueI18n)
|
||||
import enLocale from "element-ui/lib/locale/lang/en";
|
||||
import zhLocale from "element-ui/lib/locale/lang/zh-CN";
|
||||
import twLocale from "element-ui/lib/locale/lang/zh-TW";
|
||||
import ruLocale from "element-ui/lib/locale/lang/ru-RU";
|
||||
import frLocale from "element-ui/lib/locale/lang/fr";
|
||||
const lang = localStorage.getItem("lang") || "zh-CN";
|
||||
|
||||
Vue.use(VueI18n);
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale: lang,
|
||||
|
||||
messages: {
|
||||
'zh-CN': { ...zhCn,...zhLocale },
|
||||
'en-US': { ...enUS,...enLocale },
|
||||
'zh-TC': { ...zhTC,...twLocale },
|
||||
// "zh-CN": { ...zhCn, ...zhLocale },
|
||||
// "en-US": { ...enUS, ...enLocale },
|
||||
// "zh-TC": { ...zhTC, ...twLocale },
|
||||
// 'ru-RU': { ...ruRU,...ruLocale },
|
||||
// 'fr-FR': { ...frFR,...frLocale },
|
||||
// 'ru-RU': { ...ruRu },
|
||||
// 'kz-KZ': { ...kzKz },
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
export default i18n
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="sidebarWai">
|
||||
<div class="sidebar-container">
|
||||
<div class="sidebarTop">
|
||||
<div class="sidebarHeader">
|
||||
<img
|
||||
|
@ -32,16 +32,8 @@
|
|||
<div class="yongyu_t">
|
||||
<div class="yongyu1">
|
||||
<div class="jxTit">
|
||||
<div>{{ '最高奖衔' }}</div>
|
||||
<div class="jxTit1">{{ awardsList.maxAwardsName }}</div>
|
||||
</div>
|
||||
<div class="jxTit">
|
||||
<div>{{ '上月奖衔' }}</div>
|
||||
<div class="jxTit1">{{ awardsList.awardsName }}</div>
|
||||
</div>
|
||||
<div class="jxTit" v-if="awardsList.historyAwards">
|
||||
<div>{{ '历史荣誉' }}</div>
|
||||
<div class="yt1">{{ awardsList.historyAwards }}</div>
|
||||
<div>荣誉奖衔</div>
|
||||
<div class="jxTit1">{{ userInfo.pkAwardsVal }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -51,119 +43,67 @@
|
|||
<div class="awardscard">
|
||||
<div class="user-cards" @click="clickTap">
|
||||
<div class="user-cards-left">
|
||||
<!-- <div class="lines"></div> -->
|
||||
<div v-if="userInfo.pkCountry == 1">
|
||||
<div class="progress-wrapper">
|
||||
<div class="progress-wrapper__label">昨日业绩</div>
|
||||
<div
|
||||
class="experience"
|
||||
v-if="awards.targetPv != '-6.40'"
|
||||
:spv="awards.sumRealPv"
|
||||
:tpv="awards.targetPv"
|
||||
:class="
|
||||
awards.aNewPv != 0 && awards.bNewPv != 0
|
||||
? 'schedule1'
|
||||
: 'schedule'
|
||||
"
|
||||
>
|
||||
<!-- <span
|
||||
>{{ '距' }}{{ awards.pkTransactionVal
|
||||
}}{{ '还需' }}:</span> -->
|
||||
<span class="ju_text1">恭喜您!已达成 </span>
|
||||
<span class="ju_text2">{{ awards.awardsName }}</span>
|
||||
<span> 奖衔,冲刺 </span>
|
||||
<span class="ju_text2">{{ awards.pkTransactionVal }}</span>
|
||||
<span>奖衔</span>
|
||||
<span>小区仅需</span>
|
||||
<span class="ju_text2">
|
||||
{{
|
||||
(awards.targetPv - awards.sumRealPv > 0
|
||||
? awards.targetPv - awards.sumRealPv
|
||||
: "0.00") | toThousandthAndKeepDecimal
|
||||
}}{{ '万' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="experience" v-else>
|
||||
<span class="ju_text1">恭喜您!已达标当月最高奖衔</span>
|
||||
<span class="ju_text2">{{ awards.awardsName }}</span>
|
||||
<span class="ju_text1">!记得保持哦!</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div
|
||||
class="experience"
|
||||
v-if="awards.targetPv != '-1.00'"
|
||||
:spv="awards.sumRealPv"
|
||||
:tpv="awards.targetPv"
|
||||
>
|
||||
<!-- <span
|
||||
>{{ '距' }}{{ awards.pkTransactionVal
|
||||
}}{{ '还需' }}:</span> -->
|
||||
<span class="ju_text1">恭喜您!已达成 </span>
|
||||
<span class="ju_text2">{{ awards.awardsName }}</span>
|
||||
<span> 奖衔,冲刺 </span>
|
||||
<span class="ju_text2">{{ awards.pkTransactionVal }}</span>
|
||||
<span>奖衔</span>
|
||||
<span>小区仅需</span>
|
||||
<span class="ju_text2">
|
||||
{{
|
||||
(awards.targetPv - awards.sumRealPv > 0
|
||||
? awards.targetPv - awards.sumRealPv
|
||||
: "0.00") | toThousandthAndKeepDecimal
|
||||
}}{{ '万' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="experience" v-else>
|
||||
<span class="ju_text1">恭喜您!已达标当月最高奖衔</span>
|
||||
<span class="ju_text2">{{ awards.awardsName }}</span>
|
||||
<span class="ju_text1">!记得保持哦!</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="yestDay">
|
||||
<div class="yes_t">{{ '当月奖衔' }}</div>
|
||||
<div class="schedule">
|
||||
<div
|
||||
class="current-schedule"
|
||||
:style="{
|
||||
width:
|
||||
awards.targetPv == '-1.00' ||
|
||||
awards.targetPv == '-1.0000' ||
|
||||
awards.sumRealPv / awards.targetPv >= 1
|
||||
? '100%'
|
||||
: GetPercent(awards.sumRealPv, awards.targetPv),
|
||||
}"
|
||||
></div>
|
||||
<div class="cha" v-if="awards.targetPv > 0">
|
||||
{{ awards.sumRealPv }}/{{ awards.targetPv }}万
|
||||
</div>
|
||||
<div class="cha" v-else>{{ awards.sumRealPv }}万</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yestDay">
|
||||
<div class="yes_t">{{ '昨日业绩' }}</div>
|
||||
<div :class="awards.aNewPv!=0&&awards.bNewPv!=0?'schedule1':'schedule'">
|
||||
<div
|
||||
class="current-schedule"
|
||||
:style="{
|
||||
width: yesPercent(awards.aNewPv, awards.bNewPv),
|
||||
}"
|
||||
></div>
|
||||
<div class="cha"> 左区 {{ awards.aNewPv }}万/右区 {{ awards.bNewPv }}万</div>
|
||||
<div class="cha">
|
||||
左区 {{ awards.aNewPv }}万/右区 {{ awards.bNewPv }}万
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yestDay">
|
||||
<div class="yes_t">{{ '历史业绩' }}</div>
|
||||
<div :class="awards.aSumPv!=0&&awards.bSumPv!=0?'schedule1':'schedule'">
|
||||
<div class="progress-wrapper">
|
||||
<div class="progress-wrapper__label">当月业绩</div>
|
||||
<div
|
||||
:class="
|
||||
awards.aMonthPv != 0 && awards.bMonthPv != 0
|
||||
? 'schedule1'
|
||||
: 'schedule'
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="current-schedule"
|
||||
:style="{
|
||||
width: yesPercent(awards.aMonthPv, awards.bMonthPv),
|
||||
}"
|
||||
></div>
|
||||
<div class="cha">
|
||||
左区 {{ awards.aMonthPv }}万/右区 {{ awards.bMonthPv }}万
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-wrapper">
|
||||
<div class="progress-wrapper__label">历史业绩</div>
|
||||
<div
|
||||
:class="
|
||||
awards.aSumPv != 0 && awards.bSumPv != 0
|
||||
? 'schedule1'
|
||||
: 'schedule'
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="current-schedule"
|
||||
:style="{
|
||||
width: yesPercent(awards.aSumPv, awards.bSumPv),
|
||||
}"
|
||||
></div>
|
||||
<div class="cha">左区 {{ awards.aSumPv }}万/右区 {{ awards.bSumPv }}万</div>
|
||||
<div class="cha">
|
||||
左区 {{ awards.aSumPv }}万/右区 {{ awards.bSumPv }}万
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="state">
|
||||
{{ '国家编码' }}:<span>{{ userInfo.countryCode }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="user-card-bg" v-if="userInfo.awardsIcon">
|
||||
<img :src="userInfo.awardsIcon" />
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- 会员有效!-->
|
||||
|
@ -174,22 +114,20 @@
|
|||
有效期:{{ userInfo.expireDate }}
|
||||
</div>
|
||||
<!-- 注册时间!-->
|
||||
<div class="create-time">
|
||||
{{ '注册时间' }}:{{ userInfo.registerTime }}
|
||||
</div>
|
||||
<div class="create-time">注册时间:{{ userInfo.registerTime }}</div>
|
||||
<div class="countDown">
|
||||
<div class="divs">{{ userDay }}</div>
|
||||
<div class="margin-s">{{ '天' }}</div>
|
||||
<div class="margin-s">天</div>
|
||||
<div class="divs">{{ userHr }}</div>
|
||||
<div class="margin-s">{{ '时' }}</div>
|
||||
<div class="margin-s">时</div>
|
||||
<div class="divs">{{ userMin }}</div>
|
||||
<div class="margin-s">{{ '分' }}</div>
|
||||
<div class="margin-s">分</div>
|
||||
<div class="divs">{{ userSec }}</div>
|
||||
<div class="margin-s">{{ '秒' }}</div>
|
||||
<div class="margin-s">秒</div>
|
||||
</div>
|
||||
<!-- 荣誉墙!-->
|
||||
<div class="celebrity">
|
||||
<div class="title">{{ '获得的荣誉' }}</div>
|
||||
<div class="title">获得的荣誉</div>
|
||||
<div class="celebrity-content">
|
||||
<div
|
||||
class="celebrity-list"
|
||||
|
@ -201,14 +139,14 @@
|
|||
<!-- <img src="@/assets/images/avatar.png" />-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="more" @click="honorMore">{{ '查看更多' }}>></div>
|
||||
<div class="more" @click="honorMore">查看更多>></div>
|
||||
</div>
|
||||
<!-- 推荐达人!-->
|
||||
<div class="recommend">
|
||||
<div class="swiper-container swiper-no-swiping">
|
||||
<div class="swiper-wrapper">
|
||||
<div class="swiper-slide">
|
||||
<div class="title-con">{{ '推荐达人' }}</div>
|
||||
<div class="title-con">推荐达人</div>
|
||||
<div class="screen">
|
||||
<div
|
||||
class="screen-view"
|
||||
|
@ -231,7 +169,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="swiper-slide">
|
||||
<div class="title-con">{{ '抗衰达人' }}</div>
|
||||
<div class="title-con">抗衰达人</div>
|
||||
<div class="screen">
|
||||
<div
|
||||
class="screen-view"
|
||||
|
@ -265,7 +203,7 @@
|
|||
</div>
|
||||
<!-- 站内信 -->
|
||||
<div class="znBox">
|
||||
<div class="zntitle">{{ '站内信' }}</div>
|
||||
<div class="zntitle">站内信</div>
|
||||
<div class="znCenter">
|
||||
<!-- <div class="znrightword" @click="goMore(2)">查看更多</div>-->
|
||||
<div class="znContent">
|
||||
|
@ -281,7 +219,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
</vue-seamless-scroll>
|
||||
<div class="kongznx" v-else>{{ '暂无站内信' }}</div>
|
||||
<div class="kongznx" v-else>暂无站内信</div>
|
||||
<!-- <vue-seamless-scroll-->
|
||||
|
||||
<!-- :class-option="optionSingleHeightTime"-->
|
||||
|
@ -296,21 +234,21 @@
|
|||
<!-- </vue-seamless-scroll>-->
|
||||
</div>
|
||||
<div class="more" @click="goMore(2)" style="margin: 20px 0 0 0">
|
||||
{{ '查看更多' }}>>
|
||||
查看更多>>
|
||||
</div>
|
||||
<!-- <div class="bottonword">{{ '时间' }}</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- 意见反馈 -->
|
||||
<div class="znBox">
|
||||
<div class="zntitle">{{ '意见反馈' }}</div>
|
||||
<div class="zntitle">意见反馈</div>
|
||||
<div class="ideaBox">
|
||||
<el-form ref="feedbackForm" :model="feedbackForm" label-width="0px">
|
||||
<el-form-item prop="tradeType">
|
||||
<el-select
|
||||
class="ideaselect"
|
||||
v-model="feedbackForm.type"
|
||||
:placeholder="'反馈类型'"
|
||||
placeholder="反馈类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in feedbackTypeList"
|
||||
|
@ -324,14 +262,14 @@
|
|||
<el-input
|
||||
type="textarea"
|
||||
class="ideainput"
|
||||
:placeholder="'反馈类型'"
|
||||
placeholder="反馈类型"
|
||||
v-model="feedbackForm.idea"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
:class="feedbackForm.idea ? 'tjbutton2' : 'tjbutton'"
|
||||
@click="submitFeed('feedbackForm')"
|
||||
>{{ '提交' }}</el-button
|
||||
>提交</el-button
|
||||
>
|
||||
</el-form>
|
||||
</div>
|
||||
|
@ -386,14 +324,14 @@ export default {
|
|||
remIndex: 6, //推荐达人下标
|
||||
remIndex1: 9, //抗衰达人下标
|
||||
screenList: [
|
||||
{ name: '年度', id: 6 },
|
||||
{ name: '季度', id: 5 },
|
||||
{ name: '月度', id: 4 },
|
||||
{ name: "年度", id: 6 },
|
||||
{ name: "季度", id: 5 },
|
||||
{ name: "月度", id: 4 },
|
||||
],
|
||||
screenList1: [
|
||||
{ name: '年度', id: 9 },
|
||||
{ name: '季度', id: 8 },
|
||||
{ name: '月度', id: 7 },
|
||||
{ name: "年度", id: 9 },
|
||||
{ name: "季度", id: 8 },
|
||||
{ name: "月度", id: 7 },
|
||||
],
|
||||
countTime: 11183423,
|
||||
userDay: 0,
|
||||
|
@ -548,29 +486,29 @@ export default {
|
|||
submitFeed(formName) {
|
||||
if (this.feedbackForm.type == "" || this.feedbackForm.type == undefined) {
|
||||
this.$message({
|
||||
message: '请选择反馈类型',
|
||||
message: "请选择反馈类型",
|
||||
type: "error",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.feedbackForm.idea == "" || this.feedbackForm.idea == undefined) {
|
||||
this.$message({
|
||||
message: '请输入反馈内容',
|
||||
message: "请输入反馈内容",
|
||||
type: "error",
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm('是否确认提交意见反馈' + "?", "", {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm("是否确认提交意见反馈" + "?", "", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}).then((_) => {
|
||||
sid.saveFeedBack(this.feedbackForm).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: '提交成功',
|
||||
message: "提交成功",
|
||||
type: "success",
|
||||
});
|
||||
this.$refs.feedbackForm.clearValidate();
|
||||
|
@ -585,6 +523,7 @@ export default {
|
|||
//获取用户的荣誉墙
|
||||
getMemberHonorWall() {
|
||||
sid.getMemberHonorWall(this.queryParams).then((res) => {
|
||||
console.log(res.data, "....resdata");
|
||||
this.getMemberHonorWallList = res.data;
|
||||
});
|
||||
},
|
||||
|
@ -761,10 +700,10 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
.sidebarWai {
|
||||
.sidebar-container {
|
||||
width: 380px;
|
||||
padding: 20px 0;
|
||||
height: 1855px;
|
||||
min-height: 1855px;
|
||||
background: #ffffff;
|
||||
box-shadow: 5px 5px 20px 0px rgba(233, 233, 233, 0.5);
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
|
@ -772,7 +711,6 @@ export default {
|
|||
opacity: 1;
|
||||
margin-right: 20px;
|
||||
.sidebarTop {
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -868,7 +806,6 @@ export default {
|
|||
}
|
||||
.awardscard {
|
||||
width: 346px;
|
||||
height: 168px;
|
||||
margin: 0 auto;
|
||||
margin-top: 10px;
|
||||
background: url("~@/assets/images/id-card-bg.png") no-repeat;
|
||||
|
@ -878,9 +815,8 @@ export default {
|
|||
position: relative;
|
||||
.user-cards {
|
||||
cursor: pointer;
|
||||
// width: 316px;
|
||||
height: 168px;
|
||||
padding: 1px 10px;
|
||||
|
||||
padding: 16px 10px;
|
||||
// position: absolute;
|
||||
z-index: 1;
|
||||
// display: flex;
|
||||
|
@ -894,8 +830,6 @@ export default {
|
|||
}
|
||||
}
|
||||
.user-cards-left {
|
||||
//width: 160px;
|
||||
// padding: 5px 0;
|
||||
.rank {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
|
@ -939,7 +873,6 @@ export default {
|
|||
border-radius: 10px 10px 10px 10px;
|
||||
margin: 5px;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
.schedule1 {
|
||||
// width: 149px;
|
||||
|
@ -949,21 +882,23 @@ export default {
|
|||
border-radius: 10px 10px 10px 10px;
|
||||
margin: 5px;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
.current-schedule {
|
||||
position: absolute;
|
||||
width: 30%;
|
||||
background: #fea43c;
|
||||
height: 16px;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
}
|
||||
.yestDay {
|
||||
position: absolute;
|
||||
width: 30%;
|
||||
background: #fea43c;
|
||||
height: 16px;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
}
|
||||
.progress-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.yes_t {
|
||||
.progress-wrapper:first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
.progress-wrapper__label {
|
||||
margin-right: 10px;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
|
@ -974,7 +909,7 @@ export default {
|
|||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 12px;
|
||||
white-space:nowrap;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.state {
|
||||
font-size: 10px;
|
||||
|
|
66
src/main.js
66
src/main.js
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kBank
|
||||
* @Date: 2022-09-28 15:22:34
|
||||
*/
|
||||
|
@ -8,54 +8,58 @@ import Vue from "vue";
|
|||
import App from "./App.vue";
|
||||
import router from "./router";
|
||||
import store from "./store";
|
||||
import './util/rem'
|
||||
import './permission' // permission control
|
||||
import ElementUI from 'element-ui';
|
||||
import 'element-ui/lib/theme-chalk/index.css'
|
||||
import '../theme/index.css'
|
||||
import * as echarts from 'echarts';
|
||||
import "./util/rem";
|
||||
import "./permission"; // permission control
|
||||
import ElementUI from "element-ui";
|
||||
import "element-ui/lib/theme-chalk/index.css";
|
||||
import "../theme/index.css";
|
||||
import * as echarts from "echarts";
|
||||
|
||||
import VueClipBoard from "vue-clipboard2";
|
||||
Vue.use(VueClipBoard);
|
||||
|
||||
import VueClipBoard from 'vue-clipboard2'
|
||||
Vue.use(VueClipBoard)
|
||||
import scroll from "vue-seamless-scroll";
|
||||
Vue.use(scroll);
|
||||
|
||||
import scroll from 'vue-seamless-scroll'
|
||||
Vue.use(scroll)
|
||||
import Vue2OrgTree from "vue-tree-color";
|
||||
Vue.use(Vue2OrgTree);
|
||||
|
||||
import Vue2OrgTree from 'vue-tree-color'
|
||||
Vue.use(Vue2OrgTree)
|
||||
import { download } from "@/util/request";
|
||||
Vue.prototype.download = download;
|
||||
|
||||
import { download } from '@/util/request';
|
||||
Vue.prototype.download = download
|
||||
|
||||
import Print from 'vue-print-nb'
|
||||
Vue.use(Print)
|
||||
import Print from "vue-print-nb";
|
||||
Vue.use(Print);
|
||||
// 全局输入框去空格
|
||||
import "@/util/el-components.js"
|
||||
import "@/util/el-components.js";
|
||||
|
||||
import { numberToCurrencyNo, isDollar, isLocal, stateFormat, toThousandthAndKeepDecimal } from '@/util/numberToCurrency'
|
||||
import {
|
||||
numberToCurrencyNo,
|
||||
isDollar,
|
||||
isLocal,
|
||||
stateFormat,
|
||||
toThousandthAndKeepDecimal,
|
||||
} from "@/util/numberToCurrency";
|
||||
import Pagination from "@/components/pagination";
|
||||
Vue.component('Pagination', Pagination)
|
||||
Vue.component("Pagination", Pagination);
|
||||
// 配置全局过滤器,实现数字千分位格式
|
||||
Vue.filter('numberToCurrency', numberToCurrencyNo)
|
||||
Vue.filter("numberToCurrency", numberToCurrencyNo);
|
||||
//海外pv添加美元
|
||||
Vue.filter('isDollar', isDollar)
|
||||
Vue.filter("isDollar", isDollar);
|
||||
// 海外添加当地币
|
||||
Vue.filter('isLocal', isLocal)
|
||||
Vue.filter('toThousandthAndKeepDecimal', toThousandthAndKeepDecimal)
|
||||
Vue.prototype.stateFormat = stateFormat
|
||||
Vue.filter("isLocal", isLocal);
|
||||
Vue.filter("toThousandthAndKeepDecimal", toThousandthAndKeepDecimal);
|
||||
Vue.prototype.stateFormat = stateFormat;
|
||||
//国际化
|
||||
import i18n from '@/assets/i18n/index'
|
||||
import i18n from "@/assets/i18n/index";
|
||||
Vue.prototype.$echarts = echarts;
|
||||
Vue.use(ElementUI)
|
||||
Vue.use(ElementUI);
|
||||
Vue.config.productionTip = false;
|
||||
router.afterEach((to, from, next) => {
|
||||
// window.scrollTo(0, 0);
|
||||
})
|
||||
});
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
i18n,
|
||||
render: (h) => h(App),
|
||||
}).$mount("#app");
|
||||
|
||||
|
|
|
@ -1,33 +1,37 @@
|
|||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kBank
|
||||
* @Date: 2023-01-10 09:59:30
|
||||
*/
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import { Message } from 'element-ui'
|
||||
import { getToken } from '@/util/auth'
|
||||
import router from "./router";
|
||||
import store from "./store";
|
||||
import { getToken } from "@/util/auth";
|
||||
|
||||
const whiteList = ['/login', '/bfPay', '/hfPay', '/freeLogin']
|
||||
const whiteList = ["/login", "/bfPay", "/hfPay", "/freeLogin"];
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (getToken()) {
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
next()
|
||||
next();
|
||||
} else {
|
||||
if (store.getters.userInfo.memberCode == undefined) {
|
||||
store.dispatch('GetInfo').then(() => {
|
||||
next()
|
||||
})
|
||||
if (!store.getters.userInfo.memberCode) {
|
||||
store
|
||||
.dispatch("GetInfo")
|
||||
.then(() => {
|
||||
next();
|
||||
})
|
||||
.catch(() => {
|
||||
next(`/login?redirect=${to.fullPath}`);
|
||||
});
|
||||
} else {
|
||||
next()
|
||||
next();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
next()
|
||||
next();
|
||||
} else {
|
||||
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||
next(`/login?redirect=${to.fullPath}`); // 否则全部重定向到登录页
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
|
|
@ -11,43 +11,42 @@ import VueRouter from "vue-router";
|
|||
Vue.use(VueRouter);
|
||||
//解决vue路由重复导航错误
|
||||
//获取原型对象上的push函数
|
||||
const originalPush = VueRouter.prototype.push
|
||||
const originalPush = VueRouter.prototype.push;
|
||||
//修改原型对象中的push方法
|
||||
VueRouter.prototype.push = function push(location) {
|
||||
return originalPush.call(this, location).catch(err => err)
|
||||
|
||||
}
|
||||
return originalPush.call(this, location).catch((err) => err);
|
||||
};
|
||||
const routes = [
|
||||
{
|
||||
path: "/",
|
||||
name: "Index",
|
||||
component: () => import("@/views/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true//控制公共顶部菜单
|
||||
}
|
||||
keepAlive: true, //控制公共顶部菜单
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/specialMember",
|
||||
name: "SpecialMember",
|
||||
component: () => import("@/views/specialMember.vue"),
|
||||
meta: {
|
||||
keepAlive: false//控制公共顶部菜单
|
||||
}
|
||||
keepAlive: false, //控制公共顶部菜单
|
||||
},
|
||||
},
|
||||
// 免密登录
|
||||
{
|
||||
path: "/freeLogin",
|
||||
name: "FreeLogin",
|
||||
component: () => import("@/views/freeLogin.vue"),
|
||||
hidden: true
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: "/shoppingMall",
|
||||
name: "ShoppingMall",
|
||||
component: () => import("@/views/shoppingMall/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 商品详情
|
||||
{
|
||||
|
@ -55,8 +54,8 @@ const routes = [
|
|||
name: "GoodsDetails",
|
||||
component: () => import("@/views/goodsDetails/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 商品详情
|
||||
{
|
||||
|
@ -64,8 +63,8 @@ const routes = [
|
|||
name: "ShareDetails",
|
||||
component: () => import("@/views/shareDetails/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// // 抽奖详情
|
||||
// {
|
||||
|
@ -82,8 +81,8 @@ const routes = [
|
|||
name: "MarketDynamics",
|
||||
component: () => import("@/views/marketDynamics/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//活动专区
|
||||
{
|
||||
|
@ -91,8 +90,8 @@ const routes = [
|
|||
name: "activeZone",
|
||||
component: () => import("@/views/marketDynamics/activeZone.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//活动详情
|
||||
{
|
||||
|
@ -100,8 +99,8 @@ const routes = [
|
|||
name: "activeDetail",
|
||||
component: () => import("@/views/marketDynamics/activeDetail.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//架构管理-安置架构
|
||||
{
|
||||
|
@ -109,32 +108,32 @@ const routes = [
|
|||
name: "architecture",
|
||||
component: () => import("@/views/frame/architecture.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/azjg2",
|
||||
name: "azjg2",
|
||||
component: () => import("@/views/frame/azjg2.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/azjg3",
|
||||
name: "azjg3",
|
||||
component: () => import("@/views/frame/azjg3.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/azjg4",
|
||||
name: "azjg4",
|
||||
component: () => import("@/views/frame/azjg4.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//推荐架构
|
||||
{
|
||||
|
@ -142,32 +141,32 @@ const routes = [
|
|||
name: "recommend",
|
||||
component: () => import("@/views/frame/recommend.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/tjjg2",
|
||||
name: "Tjjg2",
|
||||
component: () => import("@/views/frame/tjjg2.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/tjjg3",
|
||||
name: "Tjjg3",
|
||||
component: () => import("@/views/frame/tjjg3.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/tjjg4",
|
||||
name: "Tjjg4",
|
||||
component: () => import("@/views/frame/tjjg4.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//奖金明细
|
||||
{
|
||||
|
@ -175,8 +174,8 @@ const routes = [
|
|||
name: "IncomeDetail",
|
||||
component: () => import("@/views/marketDynamics/incomeDetail.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//奖金来源
|
||||
{
|
||||
|
@ -184,8 +183,8 @@ const routes = [
|
|||
name: "BonusSource",
|
||||
component: () => import("@/views/marketDynamics/bonusSource.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//考核明细
|
||||
{
|
||||
|
@ -193,8 +192,8 @@ const routes = [
|
|||
name: "Appraisal",
|
||||
component: () => import("@/views/marketDynamics/appraisal.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//考核明细-分红考核
|
||||
{
|
||||
|
@ -202,8 +201,8 @@ const routes = [
|
|||
name: "Dividend",
|
||||
component: () => import("@/views/marketDynamics/dividend.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//云代奖金
|
||||
{
|
||||
|
@ -211,8 +210,8 @@ const routes = [
|
|||
name: "Generation",
|
||||
component: () => import("@/views/marketDynamics/generation.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
|
||||
//注册列表
|
||||
|
@ -221,8 +220,8 @@ const routes = [
|
|||
name: "Registration",
|
||||
component: () => import("@/views/marketDynamics/registration.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//招商列表
|
||||
{
|
||||
|
@ -230,8 +229,8 @@ const routes = [
|
|||
name: "Investment",
|
||||
component: () => import("@/views/marketDynamics/investment.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//直推列表
|
||||
{
|
||||
|
@ -239,8 +238,8 @@ const routes = [
|
|||
name: "pushList",
|
||||
component: () => import("@/views/marketDynamics/pushList.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//海粉列表
|
||||
{
|
||||
|
@ -248,8 +247,8 @@ const routes = [
|
|||
name: "fansList",
|
||||
component: () => import("@/views/marketDynamics/fansList.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 商品详情
|
||||
{
|
||||
|
@ -257,8 +256,8 @@ const routes = [
|
|||
name: "ShoppingCart",
|
||||
component: () => import("@/views/shoppingCart/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
|
||||
// 注册
|
||||
|
@ -267,8 +266,8 @@ const routes = [
|
|||
name: "Register",
|
||||
component: () => import("@/views/register/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 升级
|
||||
{
|
||||
|
@ -276,8 +275,8 @@ const routes = [
|
|||
name: "Upgrade",
|
||||
component: () => import("@/views/upgrade/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 复购
|
||||
{
|
||||
|
@ -285,8 +284,8 @@ const routes = [
|
|||
name: "Repurchase",
|
||||
component: () => import("@/views/repurchase/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 福利
|
||||
{
|
||||
|
@ -294,8 +293,8 @@ const routes = [
|
|||
name: "Welfare",
|
||||
component: () => import("@/views/welfare/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 重消
|
||||
{
|
||||
|
@ -303,8 +302,8 @@ const routes = [
|
|||
name: "Rescission",
|
||||
component: () => import("@/views/rescission/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 分享
|
||||
{
|
||||
|
@ -312,8 +311,8 @@ const routes = [
|
|||
name: "shareConfirm",
|
||||
component: () => import("@/views/shareConfirm/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 嗨粉分享
|
||||
{
|
||||
|
@ -321,8 +320,8 @@ const routes = [
|
|||
name: "shareFansConfirm",
|
||||
component: () => import("@/views/shareFansConfirm/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 个人信息
|
||||
{
|
||||
|
@ -330,16 +329,16 @@ const routes = [
|
|||
name: "Personal",
|
||||
component: () => import("@/views/personal/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/vipCenter",
|
||||
name: "VipCenter",
|
||||
component: () => import("@/views/vipCenter/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
|
||||
// 积分
|
||||
|
@ -348,16 +347,16 @@ const routes = [
|
|||
name: "Integral",
|
||||
component: () => import("@/views/integral/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/newGiftPay",
|
||||
name: "NewGiftPay",
|
||||
component: () => import("@/views/newGiftPay/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 直播会员
|
||||
{
|
||||
|
@ -365,8 +364,8 @@ const routes = [
|
|||
name: "TvIng",
|
||||
component: () => import("@/views/tvIng/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//站内信公告意见反馈
|
||||
{
|
||||
|
@ -374,32 +373,31 @@ const routes = [
|
|||
name: "NoticLists",
|
||||
component: () => import("@/views/noticLists/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/noticeDetail",
|
||||
name: "NoticeDetail",
|
||||
component: () => import("@/views/noticLists/noticeDetail.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
// 嗨粉
|
||||
{
|
||||
path: "/hiFans",
|
||||
name: "HiFans",
|
||||
component: () => import("@/views/hiFans/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// login
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/login.vue'),
|
||||
path: "/login",
|
||||
component: () => import("@/views/login.vue"),
|
||||
},
|
||||
|
||||
//成长之路
|
||||
|
@ -408,8 +406,8 @@ const routes = [
|
|||
name: "RoadtoGrowth",
|
||||
component: () => import("@/views/roadtoGrowth/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//乡村振兴礼包
|
||||
{
|
||||
|
@ -417,8 +415,8 @@ const routes = [
|
|||
name: "SpaceMallList",
|
||||
component: () => import("@/views/spaceCreat/spaceMallList.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 乡村振兴礼包注册
|
||||
{
|
||||
|
@ -426,9 +424,8 @@ const routes = [
|
|||
name: "SpaceRegister",
|
||||
component: () => import("@/views/spaceRegister/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//抗衰能量仓
|
||||
|
||||
|
@ -437,8 +434,8 @@ const routes = [
|
|||
name: "EnergyWarehouse",
|
||||
component: () => import("@/views/energyWarehouse/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 创客空间认证
|
||||
{
|
||||
|
@ -446,8 +443,8 @@ const routes = [
|
|||
name: "MarkerSpace",
|
||||
component: () => import("@/views/markerSpace/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 超级工作室认证
|
||||
{
|
||||
|
@ -455,8 +452,8 @@ const routes = [
|
|||
name: "superStudio",
|
||||
component: () => import("@/views/superStudio/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 经销商认证
|
||||
{
|
||||
|
@ -464,8 +461,8 @@ const routes = [
|
|||
name: "dealer",
|
||||
component: () => import("@/views/dealer/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 专属礼包
|
||||
{
|
||||
|
@ -473,8 +470,8 @@ const routes = [
|
|||
name: "giftBag",
|
||||
component: () => import("@/views/giftBag/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 注册业绩
|
||||
{
|
||||
|
@ -482,8 +479,8 @@ const routes = [
|
|||
name: "performance",
|
||||
component: () => import("@/views/performance/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//创客空间列表
|
||||
{
|
||||
|
@ -491,8 +488,8 @@ const routes = [
|
|||
name: "makerspaceList",
|
||||
component: () => import("@/views/makerspaceList/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//荣誉墙列表
|
||||
{
|
||||
|
@ -500,8 +497,8 @@ const routes = [
|
|||
name: "honorList",
|
||||
component: () => import("@/views/honorList/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
//创客空间详情
|
||||
{
|
||||
|
@ -509,8 +506,8 @@ const routes = [
|
|||
name: "makerspaceDetail",
|
||||
component: () => import("@/views/makerspaceList/detail.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 提货支付
|
||||
{
|
||||
|
@ -518,25 +515,24 @@ const routes = [
|
|||
name: "PickPay",
|
||||
component: () => import("@/views/pickPay/index.vue"),
|
||||
meta: {
|
||||
keepAlive: true
|
||||
}
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// 宝付公众号支付
|
||||
{
|
||||
path: '/bfPay',
|
||||
component: () => import('@/views/bfPay.vue'),
|
||||
path: "/bfPay",
|
||||
component: () => import("@/views/bfPay.vue"),
|
||||
},
|
||||
// 汇付公众号支付
|
||||
{
|
||||
path: '/hfPay',
|
||||
component: () => import('@/views/hfPay.vue'),
|
||||
path: "/hfPay",
|
||||
component: () => import("@/views/hfPay.vue"),
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
const router = new VueRouter({
|
||||
routes,
|
||||
mode: 'history',
|
||||
mode: "history",
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
|
|
@ -1,111 +1,123 @@
|
|||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kBank
|
||||
* @Date: 2022-12-14 18:04:53
|
||||
*/
|
||||
import { login, logout, getInfo } from '@/api/login'
|
||||
import { getShoppingCount,getSmallCount } from '@/api/goods'
|
||||
import { getToken, setToken, removeToken } from '@/util/auth'
|
||||
import { login, logout, getInfo } from "@/api/login";
|
||||
import { getShoppingCount, getSmallCount } from "@/api/goods";
|
||||
import { getToken, setToken, removeToken } from "@/util/auth";
|
||||
|
||||
const user = {
|
||||
state: {
|
||||
token: getToken(),
|
||||
name: '',
|
||||
avatar: '',
|
||||
name: "",
|
||||
avatar: "",
|
||||
roles: [],
|
||||
permissions: [],
|
||||
userInfo: {},
|
||||
specialCarNum: 0,
|
||||
cont:0
|
||||
cont: 0,
|
||||
},
|
||||
|
||||
mutations: {
|
||||
SET_TOKEN: (state, token) => {
|
||||
state.token = token
|
||||
state.token = token;
|
||||
},
|
||||
SET_NAME: (state, name) => {
|
||||
state.name = name
|
||||
state.name = name;
|
||||
},
|
||||
SET_AVATAR: (state, avatar) => {
|
||||
state.avatar = avatar
|
||||
state.avatar = avatar;
|
||||
},
|
||||
SET_PERMISSIONS: (state, permissions) => {
|
||||
state.permissions = permissions
|
||||
state.permissions = permissions;
|
||||
},
|
||||
SET_USERINFO: (state, userInfo) => {
|
||||
state.userInfo = userInfo
|
||||
state.userInfo = userInfo;
|
||||
},
|
||||
SET_specialCarNum: (state, specialCarNum) => {
|
||||
state.specialCarNum = specialCarNum
|
||||
state.specialCarNum = specialCarNum;
|
||||
},
|
||||
SET_count: (state, cont) => {
|
||||
state.cont = cont
|
||||
}
|
||||
state.cont = cont;
|
||||
},
|
||||
},
|
||||
|
||||
actions: {
|
||||
// 登录
|
||||
Login({ commit }, userInfo) {
|
||||
const username = userInfo.username.trim()
|
||||
const password = userInfo.password
|
||||
const code = userInfo.code
|
||||
const uuid = userInfo.uuid
|
||||
const username = userInfo.username.trim();
|
||||
const password = userInfo.password;
|
||||
const code = userInfo.code;
|
||||
const uuid = userInfo.uuid;
|
||||
return new Promise((resolve, reject) => {
|
||||
login(username, password, code, uuid).then(res => {
|
||||
console.log('%c [ res ]-43', 'font-size:13px; background:#49028f; color:#8d46d3;', res)
|
||||
setToken(res.data.access_token, res.data.expires_in)
|
||||
commit('SET_TOKEN', res.data.access_token)
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
login(username, password, code, uuid)
|
||||
.then((res) => {
|
||||
console.log(
|
||||
"%c [ res ]-43",
|
||||
"font-size:13px; background:#49028f; color:#8d46d3;",
|
||||
res
|
||||
);
|
||||
setToken(res.data.access_token, res.data.expires_in);
|
||||
commit("SET_TOKEN", res.data.access_token);
|
||||
resolve(res);
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
// 获取用户信息
|
||||
GetInfo({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo().then(res => {
|
||||
commit('SET_USERINFO', res.data)
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
getInfo()
|
||||
.then((res) => {
|
||||
commit("SET_USERINFO", res.data);
|
||||
resolve(res);
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 退出系统
|
||||
LogOut({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
logout(state.token).then(() => {
|
||||
commit('SET_TOKEN', '')
|
||||
removeToken()
|
||||
resolve()
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
logout(state.token)
|
||||
.then(() => {
|
||||
commit("SET_TOKEN", "");
|
||||
removeToken();
|
||||
resolve();
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
SpecialQuantity({ commit, state }, data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let obj
|
||||
if (typeof (data) == 'object') {
|
||||
obj = { specialArea: data.specialArea, pkCountry: data.pkCountry }
|
||||
let obj;
|
||||
if (typeof data == "object") {
|
||||
obj = { specialArea: data.specialArea, pkCountry: data.pkCountry };
|
||||
} else {
|
||||
obj = { specialArea: data }
|
||||
obj = { specialArea: data };
|
||||
}
|
||||
getShoppingCount(obj).then(res => {
|
||||
getSmallCount(obj).then(res1 => {
|
||||
commit('SET_specialCarNum', res1.data.smallCount)
|
||||
commit('SET_count', res.data.cont)
|
||||
resolve(res)
|
||||
getShoppingCount(obj)
|
||||
.then((res) => {
|
||||
getSmallCount(obj).then((res1) => {
|
||||
commit("SET_specialCarNum", res1.data.smallCount);
|
||||
commit("SET_count", res.data.cont);
|
||||
resolve(res);
|
||||
});
|
||||
})
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default user
|
||||
export default user;
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
center
|
||||
>
|
||||
<div class="bg-color">
|
||||
<div class="bg_title">{{ '提示' }}</div>
|
||||
<div class="bg_title">{{ "提示" }}</div>
|
||||
<div class="bg_text">
|
||||
{{ '请您尽快修改' }} <span>{{ '个人密码' }}</span>
|
||||
{{ "请您尽快修改" }} <span>{{ "个人密码" }}</span>
|
||||
</div>
|
||||
<div class="bg_button">
|
||||
<img src="@/assets/images/button-icon.png" />
|
||||
<div class="bg_text_s" @click="tcShow">{{ '前往修改' }}</div>
|
||||
<div class="bg_text_s" @click="tcShow">{{ "前往修改" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--强制修改密码 上线后打开 <div class="close-tc" @click="closeTc" v-if="userInfo.pkCountry!=1">
|
||||
|
@ -85,7 +85,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" class="righTxt">
|
||||
{{ '6-26大小写字母数字组合' }}
|
||||
{{ "6-26大小写字母数字组合" }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
|
@ -108,7 +108,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" class="righTxt">
|
||||
{{ '6-26大小写字母数字组合' }}
|
||||
{{ "6-26大小写字母数字组合" }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
|
@ -135,28 +135,16 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- <span slot="footer"-->
|
||||
<!-- v-if="userInfo.pkCountry!=1"-->
|
||||
<!-- class="dialog-footer">-->
|
||||
<!-- <el-button @click="dialogVisible = false" class="cancel-button">{{'取消'}}</el-button>-->
|
||||
<!-- <el-button style="color:#fff;background: #cb2b2b;"-->
|
||||
<!-- @click="submitLoginObj('loginObj')" class="submit-button">{{'确定'}}</el-button>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span slot="footer"-->
|
||||
<!-- v-if="userInfo.pkCountry==1"-->
|
||||
<!-- class="dialog-footer">-->
|
||||
<!-- <el-button style="color:#fff;background: #cb2b2b;margin-left: 0"-->
|
||||
<!-- @click="submitLoginObj('loginObj')" class="submit-button">{{'确定'}}</el-button>-->
|
||||
<!-- </span>-->
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false" class="cancel-button">{{
|
||||
'取消'
|
||||
}}</el-button>
|
||||
<el-button @click="dialogVisible = false" class="cancel-button">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button
|
||||
style="color: #fff; background: #cb2b2b"
|
||||
@click="submitLoginObj('loginObj')"
|
||||
class="submit-button"
|
||||
>{{ '确定' }}</el-button
|
||||
>确定</el-button
|
||||
>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
@ -178,24 +166,24 @@
|
|||
<a id="link"></a>
|
||||
</div>
|
||||
<div class="add-target" v-show="menu2">
|
||||
<div class="title">{{ '新增业绩' }}</div>
|
||||
<div class="title">{{ "新增业绩" }}</div>
|
||||
<div>
|
||||
<performance />
|
||||
</div>
|
||||
</div>
|
||||
<div class="add-target" style="height: auto !important">
|
||||
<div class="title">{{ '年度奖衔' }}</div>
|
||||
<div class="title">{{ "年度奖衔" }}</div>
|
||||
<div>
|
||||
<!-- <honoraryAward /> -->
|
||||
<yearGift />
|
||||
</div>
|
||||
</div>
|
||||
<div class="add-target">
|
||||
<div class="title">{{ '我的市场' }}</div>
|
||||
<div class="title">{{ "我的市场" }}</div>
|
||||
<mySuperEcharts></mySuperEcharts>
|
||||
</div>
|
||||
<div class="add-target">
|
||||
<div class="title">{{ '全球分布' }}</div>
|
||||
<div class="title">{{ "全球分布" }}</div>
|
||||
<div>
|
||||
<globalEcharts></globalEcharts>
|
||||
</div>
|
||||
|
@ -265,10 +253,10 @@
|
|||
:before-close="closeGoods"
|
||||
>
|
||||
<div class="goodsDiag">
|
||||
<div class="dis_t">{{ '种植' }}</div>
|
||||
<div class="dis_t">{{ "种植" }}</div>
|
||||
<div class="dis_a">
|
||||
<div class="disFlex">
|
||||
<div class="dis_l">{{ '数量' }}:</div>
|
||||
<div class="dis_l">{{ "数量" }}:</div>
|
||||
<el-input-number
|
||||
size="mini"
|
||||
@change="treePrice"
|
||||
|
@ -277,14 +265,14 @@
|
|||
></el-input-number>
|
||||
</div>
|
||||
<div class="disFlex">
|
||||
<div class="dis_l">{{ '公益金' }}:</div>
|
||||
<div class="dis_l">{{ "公益金" }}:</div>
|
||||
<div class="dis_r">¥{{ treeObj.amount | numberToCurrency }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="treefooter">
|
||||
<el-button type="primary" class="delBtn" @click="payGoods">{{
|
||||
'确定'
|
||||
"确定"
|
||||
}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
@ -339,7 +327,7 @@ export default {
|
|||
data() {
|
||||
let validatePwd = (rule, value, callback) => {
|
||||
if (this.loginObj.newPassword != value) {
|
||||
callback(new Error('与新密码不一致,请重新输入'));
|
||||
callback(new Error("与新密码不一致,请重新输入"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
|
@ -355,22 +343,20 @@ export default {
|
|||
closeFlag: false,
|
||||
dialogs: false,
|
||||
flag1: false,
|
||||
getSmsCode: '获取验证码',
|
||||
getSmsCode: "获取验证码",
|
||||
flag2: false,
|
||||
dialogVisible: false,
|
||||
marketData: {},
|
||||
loginObj: {},
|
||||
rulesObj: {
|
||||
memberCode: [
|
||||
{ required: true, trigger: "blur", message: '请输入会员编号' },
|
||||
{ required: true, trigger: "blur", message: "请输入会员编号" },
|
||||
],
|
||||
newPassword: [
|
||||
{ required: true, trigger: "blur", message: '请输入新密码' },
|
||||
{ required: true, trigger: "blur", message: "请输入新密码" },
|
||||
],
|
||||
loginPassword: [{ validator: validatePwd, trigger: "blur" }],
|
||||
phone: [
|
||||
{ required: true, trigger: "blur", message: '请输入联系方式' },
|
||||
],
|
||||
phone: [{ required: true, trigger: "blur", message: "请输入联系方式" }],
|
||||
},
|
||||
treeObj: "",
|
||||
menu1: false,
|
||||
|
@ -477,7 +463,7 @@ export default {
|
|||
this.isPay = false;
|
||||
this.isGoods = false;
|
||||
} else {
|
||||
this.$confirm('确认取消支付' + "?")
|
||||
this.$confirm("确认取消支付" + "?")
|
||||
.then((_) => {
|
||||
this.isPay = false;
|
||||
this.isGoods = false;
|
||||
|
@ -574,14 +560,14 @@ export default {
|
|||
startTime() {
|
||||
if (this.isSend) return;
|
||||
this.isSend = true;
|
||||
this.getSmsCode = this.beginTime + 's后重新发送';
|
||||
this.getSmsCode = this.beginTime + "s后重新发送";
|
||||
let that = this;
|
||||
this.timer = setInterval(() => {
|
||||
this.beginTime--;
|
||||
this.getSmsCode = this.beginTime + 's后重新发送';
|
||||
this.getSmsCode = this.beginTime + "s后重新发送";
|
||||
if (this.beginTime < 0) {
|
||||
clearInterval(this.timer);
|
||||
this.getSmsCode = '获取验证码';
|
||||
this.getSmsCode = "获取验证码";
|
||||
this.beginTime = 60;
|
||||
this.isSend = false;
|
||||
}
|
||||
|
|
|
@ -23,15 +23,15 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
},
|
||||
configureWebpack: {
|
||||
externals: {
|
||||
zhCN: "zhCN",
|
||||
enUS: "enUS",
|
||||
zhTC: "zhTC",
|
||||
// 'ruRU':'ruRU',
|
||||
// 'frFR':'frFR',
|
||||
},
|
||||
},
|
||||
// configureWebpack: {
|
||||
// externals: {
|
||||
// zhCN: "zhCN",
|
||||
// enUS: "enUS",
|
||||
// zhTC: "zhTC",
|
||||
// // 'ruRU':'ruRU',
|
||||
// // 'frFR':'frFR',
|
||||
// },
|
||||
// },
|
||||
chainWebpack: (config) => {
|
||||
config.plugin("html").tap((args) => {
|
||||
args[0].title = "会员系统";
|
||||
|
@ -39,6 +39,7 @@ module.exports = {
|
|||
});
|
||||
},
|
||||
devServer: {
|
||||
port: 8066,
|
||||
proxy: {
|
||||
"/prod-api": {
|
||||
target: "http://t-mana.beida413.com",
|
||||
|
|
Loading…
Reference in New Issue