feat(global): 移除国际化oss, 首页改造

This commit is contained in:
woody 2025-04-23 15:14:01 +08:00
parent 4b5d8c42ec
commit c7683ee2f7
9 changed files with 396 additions and 462 deletions

View File

@ -12,9 +12,9 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <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/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/fr-FR.js"></script>
<script src="https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/language/ru-RU.js"></script> --> <script src="https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/language/ru-RU.js"></script> -->
</head> </head>

View File

@ -1,41 +1,37 @@
/* /*
* @Descripttion: * @Descripttion:
* @version: * @version:
* @Author: kBank * @Author: kBank
* @Date: 2022-07-05 17:57:49 * @Date: 2022-07-05 17:57:49
*/ */
import Vue from 'vue' import Vue from "vue";
import VueI18n from 'vue-i18n' import VueI18n from "vue-i18n";
import zhCn from 'zhCN' // import zhCn from 'zhCN'
import enUS from 'enUS' // import enUS from 'enUS'
import zhTC from 'zhTC' // import zhTC from 'zhTC'
// import ruRU from 'ruRU' // import ruRU from 'ruRU'
// import frFR from 'frFR' // import frFR from 'frFR'
import enLocale from 'element-ui/lib/locale/lang/en' import enLocale from "element-ui/lib/locale/lang/en";
import zhLocale from 'element-ui/lib/locale/lang/zh-CN' import zhLocale from "element-ui/lib/locale/lang/zh-CN";
import twLocale from 'element-ui/lib/locale/lang/zh-TW' import twLocale from "element-ui/lib/locale/lang/zh-TW";
import ruLocale from 'element-ui/lib/locale/lang/ru-RU' import ruLocale from "element-ui/lib/locale/lang/ru-RU";
import frLocale from 'element-ui/lib/locale/lang/fr' import frLocale from "element-ui/lib/locale/lang/fr";
const lang = localStorage.getItem('lang') || 'zh-CN' const lang = localStorage.getItem("lang") || "zh-CN";
Vue.use(VueI18n)
Vue.use(VueI18n);
const i18n = new VueI18n({ const i18n = new VueI18n({
locale: lang, locale: lang,
messages: { messages: {
'zh-CN': { ...zhCn,...zhLocale }, // "zh-CN": { ...zhCn, ...zhLocale },
'en-US': { ...enUS,...enLocale }, // "en-US": { ...enUS, ...enLocale },
'zh-TC': { ...zhTC,...twLocale }, // "zh-TC": { ...zhTC, ...twLocale },
// 'ru-RU': { ...ruRU,...ruLocale }, // 'ru-RU': { ...ruRU,...ruLocale },
// 'fr-FR': { ...frFR,...frLocale }, // 'fr-FR': { ...frFR,...frLocale },
// 'ru-RU': { ...ruRu }, // 'ru-RU': { ...ruRu },
// 'kz-KZ': { ...kzKz }, // 'kz-KZ': { ...kzKz },
} },
});
})
export default i18n
export default i18n;

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="sidebarWai"> <div class="sidebar-container">
<div class="sidebarTop"> <div class="sidebarTop">
<div class="sidebarHeader"> <div class="sidebarHeader">
<img <img
@ -32,16 +32,8 @@
<div class="yongyu_t"> <div class="yongyu_t">
<div class="yongyu1"> <div class="yongyu1">
<div class="jxTit"> <div class="jxTit">
<div>{{ '最高奖衔' }}</div> <div>荣誉奖衔</div>
<div class="jxTit1">{{ awardsList.maxAwardsName }}</div> <div class="jxTit1">{{ userInfo.pkAwardsVal }}</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> </div>
</div> </div>
@ -51,119 +43,67 @@
<div class="awardscard"> <div class="awardscard">
<div class="user-cards" @click="clickTap"> <div class="user-cards" @click="clickTap">
<div class="user-cards-left"> <div class="user-cards-left">
<!-- <div class="lines"></div> --> <div class="progress-wrapper">
<div v-if="userInfo.pkCountry == 1"> <div class="progress-wrapper__label">昨日业绩</div>
<div <div
class="experience" :class="
v-if="awards.targetPv != '-6.40'" awards.aNewPv != 0 && awards.bNewPv != 0
:spv="awards.sumRealPv" ? 'schedule1'
:tpv="awards.targetPv" : '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 <div
class="current-schedule" class="current-schedule"
:style="{ :style="{
width: yesPercent(awards.aNewPv, awards.bNewPv), width: yesPercent(awards.aNewPv, awards.bNewPv),
}" }"
></div> ></div>
<div class="cha"> 左区 {{ awards.aNewPv }}/右区 {{ awards.bNewPv }}</div> <div class="cha">
左区 {{ awards.aNewPv }}/右区 {{ awards.bNewPv }}
</div>
</div> </div>
</div> </div>
<div class="yestDay"> <div class="progress-wrapper">
<div class="yes_t">{{ '历史业绩' }}</div> <div class="progress-wrapper__label">当月业绩</div>
<div :class="awards.aSumPv!=0&&awards.bSumPv!=0?'schedule1':'schedule'"> <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 <div
class="current-schedule" class="current-schedule"
:style="{ :style="{
width: yesPercent(awards.aSumPv, awards.bSumPv), width: yesPercent(awards.aSumPv, awards.bSumPv),
}" }"
></div> ></div>
<div class="cha">左区 {{ awards.aSumPv }}/右区 {{ awards.bSumPv }}</div> <div class="cha">
左区 {{ awards.aSumPv }}/右区 {{ awards.bSumPv }}
</div>
</div> </div>
</div> </div>
<div class="state">
{{ '国家编码' }}<span>{{ userInfo.countryCode }}</span>
</div>
</div> </div>
<!-- <div class="user-card-bg" v-if="userInfo.awardsIcon">
<img :src="userInfo.awardsIcon" />
</div> -->
</div> </div>
</div> </div>
<!-- 会员有效!--> <!-- 会员有效!-->
@ -174,22 +114,20 @@
有效期{{ userInfo.expireDate }} 有效期{{ userInfo.expireDate }}
</div> </div>
<!-- 注册时间!--> <!-- 注册时间!-->
<div class="create-time"> <div class="create-time">注册时间{{ userInfo.registerTime }}</div>
{{ '注册时间' }}{{ userInfo.registerTime }}
</div>
<div class="countDown"> <div class="countDown">
<div class="divs">{{ userDay }}</div> <div class="divs">{{ userDay }}</div>
<div class="margin-s">{{ '天' }}</div> <div class="margin-s"></div>
<div class="divs">{{ userHr }}</div> <div class="divs">{{ userHr }}</div>
<div class="margin-s">{{ '时' }}</div> <div class="margin-s"></div>
<div class="divs">{{ userMin }}</div> <div class="divs">{{ userMin }}</div>
<div class="margin-s">{{ '分' }}</div> <div class="margin-s"></div>
<div class="divs">{{ userSec }}</div> <div class="divs">{{ userSec }}</div>
<div class="margin-s">{{ '秒' }}</div> <div class="margin-s"></div>
</div> </div>
<!-- 荣誉墙!--> <!-- 荣誉墙!-->
<div class="celebrity"> <div class="celebrity">
<div class="title">{{ '获得的荣誉' }}</div> <div class="title">获得的荣誉</div>
<div class="celebrity-content"> <div class="celebrity-content">
<div <div
class="celebrity-list" class="celebrity-list"
@ -201,14 +139,14 @@
<!-- <img src="@/assets/images/avatar.png" />--> <!-- <img src="@/assets/images/avatar.png" />-->
<!-- </div>--> <!-- </div>-->
</div> </div>
<div class="more" @click="honorMore">{{ '查看更多' }}>></div> <div class="more" @click="honorMore">查看更多>></div>
</div> </div>
<!-- 推荐达人!--> <!-- 推荐达人!-->
<div class="recommend"> <div class="recommend">
<div class="swiper-container swiper-no-swiping"> <div class="swiper-container swiper-no-swiping">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<div class="swiper-slide"> <div class="swiper-slide">
<div class="title-con">{{ '推荐达人' }}</div> <div class="title-con">推荐达人</div>
<div class="screen"> <div class="screen">
<div <div
class="screen-view" class="screen-view"
@ -231,7 +169,7 @@
</div> </div>
</div> </div>
<div class="swiper-slide"> <div class="swiper-slide">
<div class="title-con">{{ '抗衰达人' }}</div> <div class="title-con">抗衰达人</div>
<div class="screen"> <div class="screen">
<div <div
class="screen-view" class="screen-view"
@ -265,7 +203,7 @@
</div> </div>
<!-- 站内信 --> <!-- 站内信 -->
<div class="znBox"> <div class="znBox">
<div class="zntitle">{{ '站内信' }}</div> <div class="zntitle">站内信</div>
<div class="znCenter"> <div class="znCenter">
<!-- <div class="znrightword" @click="goMore(2)">查看更多</div>--> <!-- <div class="znrightword" @click="goMore(2)">查看更多</div>-->
<div class="znContent"> <div class="znContent">
@ -281,7 +219,7 @@
</li> </li>
</ul> </ul>
</vue-seamless-scroll> </vue-seamless-scroll>
<div class="kongznx" v-else>{{ '暂无站内信' }}</div> <div class="kongznx" v-else>暂无站内信</div>
<!-- <vue-seamless-scroll--> <!-- <vue-seamless-scroll-->
<!-- :class-option="optionSingleHeightTime"--> <!-- :class-option="optionSingleHeightTime"-->
@ -296,21 +234,21 @@
<!-- </vue-seamless-scroll>--> <!-- </vue-seamless-scroll>-->
</div> </div>
<div class="more" @click="goMore(2)" style="margin: 20px 0 0 0"> <div class="more" @click="goMore(2)" style="margin: 20px 0 0 0">
{{ '查看更多' }}>> 查看更多>>
</div> </div>
<!-- <div class="bottonword">{{ '时间' }}</div> --> <!-- <div class="bottonword">{{ '时间' }}</div> -->
</div> </div>
</div> </div>
<!-- 意见反馈 --> <!-- 意见反馈 -->
<div class="znBox"> <div class="znBox">
<div class="zntitle">{{ '意见反馈' }}</div> <div class="zntitle">意见反馈</div>
<div class="ideaBox"> <div class="ideaBox">
<el-form ref="feedbackForm" :model="feedbackForm" label-width="0px"> <el-form ref="feedbackForm" :model="feedbackForm" label-width="0px">
<el-form-item prop="tradeType"> <el-form-item prop="tradeType">
<el-select <el-select
class="ideaselect" class="ideaselect"
v-model="feedbackForm.type" v-model="feedbackForm.type"
:placeholder="'反馈类型'" placeholder="反馈类型"
> >
<el-option <el-option
v-for="(item, index) in feedbackTypeList" v-for="(item, index) in feedbackTypeList"
@ -324,14 +262,14 @@
<el-input <el-input
type="textarea" type="textarea"
class="ideainput" class="ideainput"
:placeholder="'反馈类型'" placeholder="反馈类型"
v-model="feedbackForm.idea" v-model="feedbackForm.idea"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-button <el-button
:class="feedbackForm.idea ? 'tjbutton2' : 'tjbutton'" :class="feedbackForm.idea ? 'tjbutton2' : 'tjbutton'"
@click="submitFeed('feedbackForm')" @click="submitFeed('feedbackForm')"
>{{ '提交' }}</el-button >提交</el-button
> >
</el-form> </el-form>
</div> </div>
@ -386,14 +324,14 @@ export default {
remIndex: 6, // remIndex: 6, //
remIndex1: 9, // remIndex1: 9, //
screenList: [ screenList: [
{ name: '年度', id: 6 }, { name: "年度", id: 6 },
{ name: '季度', id: 5 }, { name: "季度", id: 5 },
{ name: '月度', id: 4 }, { name: "月度", id: 4 },
], ],
screenList1: [ screenList1: [
{ name: '年度', id: 9 }, { name: "年度", id: 9 },
{ name: '季度', id: 8 }, { name: "季度", id: 8 },
{ name: '月度', id: 7 }, { name: "月度", id: 7 },
], ],
countTime: 11183423, countTime: 11183423,
userDay: 0, userDay: 0,
@ -548,29 +486,29 @@ export default {
submitFeed(formName) { submitFeed(formName) {
if (this.feedbackForm.type == "" || this.feedbackForm.type == undefined) { if (this.feedbackForm.type == "" || this.feedbackForm.type == undefined) {
this.$message({ this.$message({
message: '请选择反馈类型', message: "请选择反馈类型",
type: "error", type: "error",
}); });
return; return;
} }
if (this.feedbackForm.idea == "" || this.feedbackForm.idea == undefined) { if (this.feedbackForm.idea == "" || this.feedbackForm.idea == undefined) {
this.$message({ this.$message({
message: '请输入反馈内容', message: "请输入反馈内容",
type: "error", type: "error",
}); });
return; return;
} }
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.$confirm('是否确认提交意见反馈' + "?", "", { this.$confirm("是否确认提交意见反馈" + "?", "", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: "warning", type: "warning",
}).then((_) => { }).then((_) => {
sid.saveFeedBack(this.feedbackForm).then((res) => { sid.saveFeedBack(this.feedbackForm).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: '提交成功', message: "提交成功",
type: "success", type: "success",
}); });
this.$refs.feedbackForm.clearValidate(); this.$refs.feedbackForm.clearValidate();
@ -585,6 +523,7 @@ export default {
// //
getMemberHonorWall() { getMemberHonorWall() {
sid.getMemberHonorWall(this.queryParams).then((res) => { sid.getMemberHonorWall(this.queryParams).then((res) => {
console.log(res.data, "....resdata");
this.getMemberHonorWallList = res.data; this.getMemberHonorWallList = res.data;
}); });
}, },
@ -761,10 +700,10 @@ export default {
} }
} }
.sidebarWai { .sidebar-container {
width: 380px; width: 380px;
padding: 20px 0; padding: 20px 0;
height: 1855px; min-height: 1855px;
background: #ffffff; background: #ffffff;
box-shadow: 5px 5px 20px 0px rgba(233, 233, 233, 0.5); box-shadow: 5px 5px 20px 0px rgba(233, 233, 233, 0.5);
border-radius: 10px 10px 10px 10px; border-radius: 10px 10px 10px 10px;
@ -772,7 +711,6 @@ export default {
opacity: 1; opacity: 1;
margin-right: 20px; margin-right: 20px;
.sidebarTop { .sidebarTop {
margin-top: 20px;
text-align: center; text-align: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -868,7 +806,6 @@ export default {
} }
.awardscard { .awardscard {
width: 346px; width: 346px;
height: 168px;
margin: 0 auto; margin: 0 auto;
margin-top: 10px; margin-top: 10px;
background: url("~@/assets/images/id-card-bg.png") no-repeat; background: url("~@/assets/images/id-card-bg.png") no-repeat;
@ -878,9 +815,8 @@ export default {
position: relative; position: relative;
.user-cards { .user-cards {
cursor: pointer; cursor: pointer;
// width: 316px;
height: 168px; padding: 16px 10px;
padding: 1px 10px;
// position: absolute; // position: absolute;
z-index: 1; z-index: 1;
// display: flex; // display: flex;
@ -894,8 +830,6 @@ export default {
} }
} }
.user-cards-left { .user-cards-left {
//width: 160px;
// padding: 5px 0;
.rank { .rank {
font-size: 14px; font-size: 14px;
color: #fff; color: #fff;
@ -939,7 +873,6 @@ export default {
border-radius: 10px 10px 10px 10px; border-radius: 10px 10px 10px 10px;
margin: 5px; margin: 5px;
position: relative; position: relative;
} }
.schedule1 { .schedule1 {
// width: 149px; // width: 149px;
@ -949,21 +882,23 @@ export default {
border-radius: 10px 10px 10px 10px; border-radius: 10px 10px 10px 10px;
margin: 5px; margin: 5px;
position: relative; position: relative;
} }
.current-schedule { .current-schedule {
position: absolute; position: absolute;
width: 30%; width: 30%;
background: #fea43c; background: #fea43c;
height: 16px; height: 16px;
border-radius: 10px 10px 10px 10px; border-radius: 10px 10px 10px 10px;
} }
.yestDay { .progress-wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 5px; margin-top: 5px;
} }
.yes_t { .progress-wrapper:first-child {
margin-top: 0px;
}
.progress-wrapper__label {
margin-right: 10px; margin-right: 10px;
font-size: 12px; font-size: 12px;
color: #fff; color: #fff;
@ -974,7 +909,7 @@ export default {
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
font-size: 12px; font-size: 12px;
white-space:nowrap; white-space: nowrap;
} }
.state { .state {
font-size: 10px; font-size: 10px;

View File

@ -1,6 +1,6 @@
/* /*
* @Descripttion: * @Descripttion:
* @version: * @version:
* @Author: kBank * @Author: kBank
* @Date: 2022-09-28 15:22:34 * @Date: 2022-09-28 15:22:34
*/ */
@ -8,54 +8,58 @@ import Vue from "vue";
import App from "./App.vue"; import App from "./App.vue";
import router from "./router"; import router from "./router";
import store from "./store"; import store from "./store";
import './util/rem' import "./util/rem";
import './permission' // permission control import "./permission"; // permission control
import ElementUI from 'element-ui'; import ElementUI from "element-ui";
import 'element-ui/lib/theme-chalk/index.css' import "element-ui/lib/theme-chalk/index.css";
import '../theme/index.css' import "../theme/index.css";
import * as echarts from 'echarts'; import * as echarts from "echarts";
import VueClipBoard from "vue-clipboard2";
Vue.use(VueClipBoard);
import VueClipBoard from 'vue-clipboard2' import scroll from "vue-seamless-scroll";
Vue.use(VueClipBoard) Vue.use(scroll);
import scroll from 'vue-seamless-scroll' import Vue2OrgTree from "vue-tree-color";
Vue.use(scroll) Vue.use(Vue2OrgTree);
import Vue2OrgTree from 'vue-tree-color' import { download } from "@/util/request";
Vue.use(Vue2OrgTree) Vue.prototype.download = download;
import { download } from '@/util/request'; import Print from "vue-print-nb";
Vue.prototype.download = download 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"; import Pagination from "@/components/pagination";
Vue.component('Pagination', Pagination) Vue.component("Pagination", Pagination);
// 配置全局过滤器,实现数字千分位格式 // 配置全局过滤器,实现数字千分位格式
Vue.filter('numberToCurrency', numberToCurrencyNo) Vue.filter("numberToCurrency", numberToCurrencyNo);
//海外pv添加美元 //海外pv添加美元
Vue.filter('isDollar', isDollar) Vue.filter("isDollar", isDollar);
// 海外添加当地币 // 海外添加当地币
Vue.filter('isLocal', isLocal) Vue.filter("isLocal", isLocal);
Vue.filter('toThousandthAndKeepDecimal', toThousandthAndKeepDecimal) Vue.filter("toThousandthAndKeepDecimal", toThousandthAndKeepDecimal);
Vue.prototype.stateFormat = stateFormat Vue.prototype.stateFormat = stateFormat;
//国际化 //国际化
import i18n from '@/assets/i18n/index' import i18n from "@/assets/i18n/index";
Vue.prototype.$echarts = echarts; Vue.prototype.$echarts = echarts;
Vue.use(ElementUI) Vue.use(ElementUI);
Vue.config.productionTip = false; Vue.config.productionTip = false;
router.afterEach((to, from, next) => { router.afterEach((to, from, next) => {
// window.scrollTo(0, 0); // window.scrollTo(0, 0);
}) });
new Vue({ new Vue({
router, router,
store, store,
i18n, i18n,
render: (h) => h(App), render: (h) => h(App),
}).$mount("#app"); }).$mount("#app");

View File

@ -1,33 +1,37 @@
/* /*
* @Descripttion: * @Descripttion:
* @version: * @version:
* @Author: kBank * @Author: kBank
* @Date: 2023-01-10 09:59:30 * @Date: 2023-01-10 09:59:30
*/ */
import router from './router' import router from "./router";
import store from './store' import store from "./store";
import { Message } from 'element-ui' import { getToken } from "@/util/auth";
import { getToken } from '@/util/auth'
const whiteList = ['/login', '/bfPay', '/hfPay', '/freeLogin'] const whiteList = ["/login", "/bfPay", "/hfPay", "/freeLogin"];
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
if (getToken()) { if (getToken()) {
if (whiteList.indexOf(to.path) !== -1) { if (whiteList.indexOf(to.path) !== -1) {
next() next();
} else { } else {
if (store.getters.userInfo.memberCode == undefined) { if (!store.getters.userInfo.memberCode) {
store.dispatch('GetInfo').then(() => { store
next() .dispatch("GetInfo")
}) .then(() => {
next();
})
.catch(() => {
next(`/login?redirect=${to.fullPath}`);
});
} else { } else {
next() next();
} }
} }
} else { } else {
if (whiteList.indexOf(to.path) !== -1) { if (whiteList.indexOf(to.path) !== -1) {
next() next();
} else { } else {
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 next(`/login?redirect=${to.fullPath}`); // 否则全部重定向到登录页
} }
} }
}) });

View File

@ -11,43 +11,42 @@ import VueRouter from "vue-router";
Vue.use(VueRouter); Vue.use(VueRouter);
//解决vue路由重复导航错误 //解决vue路由重复导航错误
//获取原型对象上的push函数 //获取原型对象上的push函数
const originalPush = VueRouter.prototype.push const originalPush = VueRouter.prototype.push;
//修改原型对象中的push方法 //修改原型对象中的push方法
VueRouter.prototype.push = function push(location) { VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err) return originalPush.call(this, location).catch((err) => err);
};
}
const routes = [ const routes = [
{ {
path: "/", path: "/",
name: "Index", name: "Index",
component: () => import("@/views/index.vue"), component: () => import("@/views/index.vue"),
meta: { meta: {
keepAlive: true//控制公共顶部菜单 keepAlive: true, //控制公共顶部菜单
} },
}, },
{ {
path: "/specialMember", path: "/specialMember",
name: "SpecialMember", name: "SpecialMember",
component: () => import("@/views/specialMember.vue"), component: () => import("@/views/specialMember.vue"),
meta: { meta: {
keepAlive: false//控制公共顶部菜单 keepAlive: false, //控制公共顶部菜单
} },
}, },
// 免密登录 // 免密登录
{ {
path: "/freeLogin", path: "/freeLogin",
name: "FreeLogin", name: "FreeLogin",
component: () => import("@/views/freeLogin.vue"), component: () => import("@/views/freeLogin.vue"),
hidden: true hidden: true,
}, },
{ {
path: "/shoppingMall", path: "/shoppingMall",
name: "ShoppingMall", name: "ShoppingMall",
component: () => import("@/views/shoppingMall/index.vue"), component: () => import("@/views/shoppingMall/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 商品详情 // 商品详情
{ {
@ -55,8 +54,8 @@ const routes = [
name: "GoodsDetails", name: "GoodsDetails",
component: () => import("@/views/goodsDetails/index.vue"), component: () => import("@/views/goodsDetails/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 商品详情 // 商品详情
{ {
@ -64,8 +63,8 @@ const routes = [
name: "ShareDetails", name: "ShareDetails",
component: () => import("@/views/shareDetails/index.vue"), component: () => import("@/views/shareDetails/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// // 抽奖详情 // // 抽奖详情
// { // {
@ -82,8 +81,8 @@ const routes = [
name: "MarketDynamics", name: "MarketDynamics",
component: () => import("@/views/marketDynamics/index.vue"), component: () => import("@/views/marketDynamics/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//活动专区 //活动专区
{ {
@ -91,8 +90,8 @@ const routes = [
name: "activeZone", name: "activeZone",
component: () => import("@/views/marketDynamics/activeZone.vue"), component: () => import("@/views/marketDynamics/activeZone.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//活动详情 //活动详情
{ {
@ -100,8 +99,8 @@ const routes = [
name: "activeDetail", name: "activeDetail",
component: () => import("@/views/marketDynamics/activeDetail.vue"), component: () => import("@/views/marketDynamics/activeDetail.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//架构管理-安置架构 //架构管理-安置架构
{ {
@ -109,32 +108,32 @@ const routes = [
name: "architecture", name: "architecture",
component: () => import("@/views/frame/architecture.vue"), component: () => import("@/views/frame/architecture.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
{ {
path: "/azjg2", path: "/azjg2",
name: "azjg2", name: "azjg2",
component: () => import("@/views/frame/azjg2.vue"), component: () => import("@/views/frame/azjg2.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
{ {
path: "/azjg3", path: "/azjg3",
name: "azjg3", name: "azjg3",
component: () => import("@/views/frame/azjg3.vue"), component: () => import("@/views/frame/azjg3.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
{ {
path: "/azjg4", path: "/azjg4",
name: "azjg4", name: "azjg4",
component: () => import("@/views/frame/azjg4.vue"), component: () => import("@/views/frame/azjg4.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//推荐架构 //推荐架构
{ {
@ -142,32 +141,32 @@ const routes = [
name: "recommend", name: "recommend",
component: () => import("@/views/frame/recommend.vue"), component: () => import("@/views/frame/recommend.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
{ {
path: "/tjjg2", path: "/tjjg2",
name: "Tjjg2", name: "Tjjg2",
component: () => import("@/views/frame/tjjg2.vue"), component: () => import("@/views/frame/tjjg2.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
{ {
path: "/tjjg3", path: "/tjjg3",
name: "Tjjg3", name: "Tjjg3",
component: () => import("@/views/frame/tjjg3.vue"), component: () => import("@/views/frame/tjjg3.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
{ {
path: "/tjjg4", path: "/tjjg4",
name: "Tjjg4", name: "Tjjg4",
component: () => import("@/views/frame/tjjg4.vue"), component: () => import("@/views/frame/tjjg4.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//奖金明细 //奖金明细
{ {
@ -175,8 +174,8 @@ const routes = [
name: "IncomeDetail", name: "IncomeDetail",
component: () => import("@/views/marketDynamics/incomeDetail.vue"), component: () => import("@/views/marketDynamics/incomeDetail.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//奖金来源 //奖金来源
{ {
@ -184,8 +183,8 @@ const routes = [
name: "BonusSource", name: "BonusSource",
component: () => import("@/views/marketDynamics/bonusSource.vue"), component: () => import("@/views/marketDynamics/bonusSource.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//考核明细 //考核明细
{ {
@ -193,8 +192,8 @@ const routes = [
name: "Appraisal", name: "Appraisal",
component: () => import("@/views/marketDynamics/appraisal.vue"), component: () => import("@/views/marketDynamics/appraisal.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//考核明细-分红考核 //考核明细-分红考核
{ {
@ -202,8 +201,8 @@ const routes = [
name: "Dividend", name: "Dividend",
component: () => import("@/views/marketDynamics/dividend.vue"), component: () => import("@/views/marketDynamics/dividend.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//云代奖金 //云代奖金
{ {
@ -211,8 +210,8 @@ const routes = [
name: "Generation", name: "Generation",
component: () => import("@/views/marketDynamics/generation.vue"), component: () => import("@/views/marketDynamics/generation.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//注册列表 //注册列表
@ -221,8 +220,8 @@ const routes = [
name: "Registration", name: "Registration",
component: () => import("@/views/marketDynamics/registration.vue"), component: () => import("@/views/marketDynamics/registration.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//招商列表 //招商列表
{ {
@ -230,8 +229,8 @@ const routes = [
name: "Investment", name: "Investment",
component: () => import("@/views/marketDynamics/investment.vue"), component: () => import("@/views/marketDynamics/investment.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//直推列表 //直推列表
{ {
@ -239,8 +238,8 @@ const routes = [
name: "pushList", name: "pushList",
component: () => import("@/views/marketDynamics/pushList.vue"), component: () => import("@/views/marketDynamics/pushList.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//海粉列表 //海粉列表
{ {
@ -248,8 +247,8 @@ const routes = [
name: "fansList", name: "fansList",
component: () => import("@/views/marketDynamics/fansList.vue"), component: () => import("@/views/marketDynamics/fansList.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 商品详情 // 商品详情
{ {
@ -257,8 +256,8 @@ const routes = [
name: "ShoppingCart", name: "ShoppingCart",
component: () => import("@/views/shoppingCart/index.vue"), component: () => import("@/views/shoppingCart/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 注册 // 注册
@ -267,8 +266,8 @@ const routes = [
name: "Register", name: "Register",
component: () => import("@/views/register/index.vue"), component: () => import("@/views/register/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 升级 // 升级
{ {
@ -276,8 +275,8 @@ const routes = [
name: "Upgrade", name: "Upgrade",
component: () => import("@/views/upgrade/index.vue"), component: () => import("@/views/upgrade/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 复购 // 复购
{ {
@ -285,8 +284,8 @@ const routes = [
name: "Repurchase", name: "Repurchase",
component: () => import("@/views/repurchase/index.vue"), component: () => import("@/views/repurchase/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 福利 // 福利
{ {
@ -294,8 +293,8 @@ const routes = [
name: "Welfare", name: "Welfare",
component: () => import("@/views/welfare/index.vue"), component: () => import("@/views/welfare/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 重消 // 重消
{ {
@ -303,8 +302,8 @@ const routes = [
name: "Rescission", name: "Rescission",
component: () => import("@/views/rescission/index.vue"), component: () => import("@/views/rescission/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 分享 // 分享
{ {
@ -312,8 +311,8 @@ const routes = [
name: "shareConfirm", name: "shareConfirm",
component: () => import("@/views/shareConfirm/index.vue"), component: () => import("@/views/shareConfirm/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 嗨粉分享 // 嗨粉分享
{ {
@ -321,8 +320,8 @@ const routes = [
name: "shareFansConfirm", name: "shareFansConfirm",
component: () => import("@/views/shareFansConfirm/index.vue"), component: () => import("@/views/shareFansConfirm/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 个人信息 // 个人信息
{ {
@ -330,16 +329,16 @@ const routes = [
name: "Personal", name: "Personal",
component: () => import("@/views/personal/index.vue"), component: () => import("@/views/personal/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
{ {
path: "/vipCenter", path: "/vipCenter",
name: "VipCenter", name: "VipCenter",
component: () => import("@/views/vipCenter/index.vue"), component: () => import("@/views/vipCenter/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 积分 // 积分
@ -348,16 +347,16 @@ const routes = [
name: "Integral", name: "Integral",
component: () => import("@/views/integral/index.vue"), component: () => import("@/views/integral/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
{ {
path: "/newGiftPay", path: "/newGiftPay",
name: "NewGiftPay", name: "NewGiftPay",
component: () => import("@/views/newGiftPay/index.vue"), component: () => import("@/views/newGiftPay/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 直播会员 // 直播会员
{ {
@ -365,8 +364,8 @@ const routes = [
name: "TvIng", name: "TvIng",
component: () => import("@/views/tvIng/index.vue"), component: () => import("@/views/tvIng/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//站内信公告意见反馈 //站内信公告意见反馈
{ {
@ -374,32 +373,31 @@ const routes = [
name: "NoticLists", name: "NoticLists",
component: () => import("@/views/noticLists/index.vue"), component: () => import("@/views/noticLists/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
{ {
path: "/noticeDetail", path: "/noticeDetail",
name: "NoticeDetail", name: "NoticeDetail",
component: () => import("@/views/noticLists/noticeDetail.vue"), component: () => import("@/views/noticLists/noticeDetail.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 嗨粉 // 嗨粉
{ {
path: "/hiFans", path: "/hiFans",
name: "HiFans", name: "HiFans",
component: () => import("@/views/hiFans/index.vue"), component: () => import("@/views/hiFans/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// login // login
{ {
path: '/login', path: "/login",
component: () => import('@/views/login.vue'), component: () => import("@/views/login.vue"),
}, },
//成长之路 //成长之路
@ -408,8 +406,8 @@ const routes = [
name: "RoadtoGrowth", name: "RoadtoGrowth",
component: () => import("@/views/roadtoGrowth/index.vue"), component: () => import("@/views/roadtoGrowth/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//乡村振兴礼包 //乡村振兴礼包
{ {
@ -417,8 +415,8 @@ const routes = [
name: "SpaceMallList", name: "SpaceMallList",
component: () => import("@/views/spaceCreat/spaceMallList.vue"), component: () => import("@/views/spaceCreat/spaceMallList.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 乡村振兴礼包注册 // 乡村振兴礼包注册
{ {
@ -426,9 +424,8 @@ const routes = [
name: "SpaceRegister", name: "SpaceRegister",
component: () => import("@/views/spaceRegister/index.vue"), component: () => import("@/views/spaceRegister/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//抗衰能量仓 //抗衰能量仓
@ -437,8 +434,8 @@ const routes = [
name: "EnergyWarehouse", name: "EnergyWarehouse",
component: () => import("@/views/energyWarehouse/index.vue"), component: () => import("@/views/energyWarehouse/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 创客空间认证 // 创客空间认证
{ {
@ -446,8 +443,8 @@ const routes = [
name: "MarkerSpace", name: "MarkerSpace",
component: () => import("@/views/markerSpace/index.vue"), component: () => import("@/views/markerSpace/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 超级工作室认证 // 超级工作室认证
{ {
@ -455,8 +452,8 @@ const routes = [
name: "superStudio", name: "superStudio",
component: () => import("@/views/superStudio/index.vue"), component: () => import("@/views/superStudio/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 经销商认证 // 经销商认证
{ {
@ -464,8 +461,8 @@ const routes = [
name: "dealer", name: "dealer",
component: () => import("@/views/dealer/index.vue"), component: () => import("@/views/dealer/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 专属礼包 // 专属礼包
{ {
@ -473,8 +470,8 @@ const routes = [
name: "giftBag", name: "giftBag",
component: () => import("@/views/giftBag/index.vue"), component: () => import("@/views/giftBag/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 注册业绩 // 注册业绩
{ {
@ -482,8 +479,8 @@ const routes = [
name: "performance", name: "performance",
component: () => import("@/views/performance/index.vue"), component: () => import("@/views/performance/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//创客空间列表 //创客空间列表
{ {
@ -491,8 +488,8 @@ const routes = [
name: "makerspaceList", name: "makerspaceList",
component: () => import("@/views/makerspaceList/index.vue"), component: () => import("@/views/makerspaceList/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//荣誉墙列表 //荣誉墙列表
{ {
@ -500,8 +497,8 @@ const routes = [
name: "honorList", name: "honorList",
component: () => import("@/views/honorList/index.vue"), component: () => import("@/views/honorList/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
//创客空间详情 //创客空间详情
{ {
@ -509,8 +506,8 @@ const routes = [
name: "makerspaceDetail", name: "makerspaceDetail",
component: () => import("@/views/makerspaceList/detail.vue"), component: () => import("@/views/makerspaceList/detail.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 提货支付 // 提货支付
{ {
@ -518,25 +515,24 @@ const routes = [
name: "PickPay", name: "PickPay",
component: () => import("@/views/pickPay/index.vue"), component: () => import("@/views/pickPay/index.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 宝付公众号支付 // 宝付公众号支付
{ {
path: '/bfPay', path: "/bfPay",
component: () => import('@/views/bfPay.vue'), component: () => import("@/views/bfPay.vue"),
}, },
// 汇付公众号支付 // 汇付公众号支付
{ {
path: '/hfPay', path: "/hfPay",
component: () => import('@/views/hfPay.vue'), component: () => import("@/views/hfPay.vue"),
}, },
]; ];
const router = new VueRouter({ const router = new VueRouter({
routes, routes,
mode: 'history', mode: "history",
}); });
export default router; export default router;

View File

@ -1,111 +1,123 @@
/* /*
* @Descripttion: * @Descripttion:
* @version: * @version:
* @Author: kBank * @Author: kBank
* @Date: 2022-12-14 18:04:53 * @Date: 2022-12-14 18:04:53
*/ */
import { login, logout, getInfo } from '@/api/login' import { login, logout, getInfo } from "@/api/login";
import { getShoppingCount,getSmallCount } from '@/api/goods' import { getShoppingCount, getSmallCount } from "@/api/goods";
import { getToken, setToken, removeToken } from '@/util/auth' import { getToken, setToken, removeToken } from "@/util/auth";
const user = { const user = {
state: { state: {
token: getToken(), token: getToken(),
name: '', name: "",
avatar: '', avatar: "",
roles: [], roles: [],
permissions: [], permissions: [],
userInfo: {}, userInfo: {},
specialCarNum: 0, specialCarNum: 0,
cont:0 cont: 0,
}, },
mutations: { mutations: {
SET_TOKEN: (state, token) => { SET_TOKEN: (state, token) => {
state.token = token state.token = token;
}, },
SET_NAME: (state, name) => { SET_NAME: (state, name) => {
state.name = name state.name = name;
}, },
SET_AVATAR: (state, avatar) => { SET_AVATAR: (state, avatar) => {
state.avatar = avatar state.avatar = avatar;
}, },
SET_PERMISSIONS: (state, permissions) => { SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions state.permissions = permissions;
}, },
SET_USERINFO: (state, userInfo) => { SET_USERINFO: (state, userInfo) => {
state.userInfo = userInfo state.userInfo = userInfo;
}, },
SET_specialCarNum: (state, specialCarNum) => { SET_specialCarNum: (state, specialCarNum) => {
state.specialCarNum = specialCarNum state.specialCarNum = specialCarNum;
}, },
SET_count: (state, cont) => { SET_count: (state, cont) => {
state.cont = cont state.cont = cont;
} },
}, },
actions: { actions: {
// 登录 // 登录
Login({ commit }, userInfo) { Login({ commit }, userInfo) {
const username = userInfo.username.trim() const username = userInfo.username.trim();
const password = userInfo.password const password = userInfo.password;
const code = userInfo.code const code = userInfo.code;
const uuid = userInfo.uuid const uuid = userInfo.uuid;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
login(username, password, code, uuid).then(res => { login(username, password, code, uuid)
console.log('%c [ res ]-43', 'font-size:13px; background:#49028f; color:#8d46d3;', res) .then((res) => {
setToken(res.data.access_token, res.data.expires_in) console.log(
commit('SET_TOKEN', res.data.access_token) "%c [ res ]-43",
resolve(res) "font-size:13px; background:#49028f; color:#8d46d3;",
}).catch(error => { res
reject(error) );
}) 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 }) { GetInfo({ commit, state }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getInfo().then(res => { getInfo()
commit('SET_USERINFO', res.data) .then((res) => {
resolve(res) commit("SET_USERINFO", res.data);
}).catch(error => { resolve(res);
reject(error) })
}) .catch((error) => {
}) reject(error);
});
});
}, },
// 退出系统 // 退出系统
LogOut({ commit, state }) { LogOut({ commit, state }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
logout(state.token).then(() => { logout(state.token)
commit('SET_TOKEN', '') .then(() => {
removeToken() commit("SET_TOKEN", "");
resolve() removeToken();
}).catch(error => { resolve();
reject(error) })
}) .catch((error) => {
}) reject(error);
});
});
}, },
SpecialQuantity({ commit, state }, data) { SpecialQuantity({ commit, state }, data) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj let obj;
if (typeof (data) == 'object') { if (typeof data == "object") {
obj = { specialArea: data.specialArea, pkCountry: data.pkCountry } obj = { specialArea: data.specialArea, pkCountry: data.pkCountry };
} else { } else {
obj = { specialArea: data } obj = { specialArea: data };
} }
getShoppingCount(obj).then(res => { getShoppingCount(obj)
getSmallCount(obj).then(res1 => { .then((res) => {
commit('SET_specialCarNum', res1.data.smallCount) getSmallCount(obj).then((res1) => {
commit('SET_count', res.data.cont) commit("SET_specialCarNum", res1.data.smallCount);
resolve(res) commit("SET_count", res.data.cont);
resolve(res);
});
}) })
}).catch(error => { .catch((error) => {
reject(error) reject(error);
}) });
}) });
} },
} },
} };
export default user export default user;

View File

@ -22,13 +22,13 @@
center center
> >
<div class="bg-color"> <div class="bg-color">
<div class="bg_title">{{ '提示' }}</div> <div class="bg_title">{{ "提示" }}</div>
<div class="bg_text"> <div class="bg_text">
{{ '请您尽快修改' }} <span>{{ '个人密码' }}</span> {{ "请您尽快修改" }} <span>{{ "个人密码" }}</span>
</div> </div>
<div class="bg_button"> <div class="bg_button">
<img src="@/assets/images/button-icon.png" /> <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> </div>
<!--强制修改密码 上线后打开 <div class="close-tc" @click="closeTc" v-if="userInfo.pkCountry!=1"> <!--强制修改密码 上线后打开 <div class="close-tc" @click="closeTc" v-if="userInfo.pkCountry!=1">
@ -85,7 +85,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" class="righTxt"> <el-col :span="8" class="righTxt">
{{ '6-26大小写字母数字组合' }} {{ "6-26大小写字母数字组合" }}
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
@ -108,7 +108,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" class="righTxt"> <el-col :span="8" class="righTxt">
{{ '6-26大小写字母数字组合' }} {{ "6-26大小写字母数字组合" }}
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
@ -135,28 +135,16 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </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"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false" class="cancel-button">{{ <el-button @click="dialogVisible = false" class="cancel-button">
'取消' 取消
}}</el-button> </el-button>
<el-button <el-button
style="color: #fff; background: #cb2b2b" style="color: #fff; background: #cb2b2b"
@click="submitLoginObj('loginObj')" @click="submitLoginObj('loginObj')"
class="submit-button" class="submit-button"
>{{ '确定' }}</el-button >确定</el-button
> >
</span> </span>
</el-dialog> </el-dialog>
@ -178,24 +166,24 @@
<a id="link"></a> <a id="link"></a>
</div> </div>
<div class="add-target" v-show="menu2"> <div class="add-target" v-show="menu2">
<div class="title">{{ '新增业绩' }}</div> <div class="title">{{ "新增业绩" }}</div>
<div> <div>
<performance /> <performance />
</div> </div>
</div> </div>
<div class="add-target" style="height: auto !important"> <div class="add-target" style="height: auto !important">
<div class="title">{{ '年度奖衔' }}</div> <div class="title">{{ "年度奖衔" }}</div>
<div> <div>
<!-- <honoraryAward /> --> <!-- <honoraryAward /> -->
<yearGift /> <yearGift />
</div> </div>
</div> </div>
<div class="add-target"> <div class="add-target">
<div class="title">{{ '我的市场' }}</div> <div class="title">{{ "我的市场" }}</div>
<mySuperEcharts></mySuperEcharts> <mySuperEcharts></mySuperEcharts>
</div> </div>
<div class="add-target"> <div class="add-target">
<div class="title">{{ '全球分布' }}</div> <div class="title">{{ "全球分布" }}</div>
<div> <div>
<globalEcharts></globalEcharts> <globalEcharts></globalEcharts>
</div> </div>
@ -265,10 +253,10 @@
:before-close="closeGoods" :before-close="closeGoods"
> >
<div class="goodsDiag"> <div class="goodsDiag">
<div class="dis_t">{{ '种植' }}</div> <div class="dis_t">{{ "种植" }}</div>
<div class="dis_a"> <div class="dis_a">
<div class="disFlex"> <div class="disFlex">
<div class="dis_l">{{ '数量' }}:</div> <div class="dis_l">{{ "数量" }}:</div>
<el-input-number <el-input-number
size="mini" size="mini"
@change="treePrice" @change="treePrice"
@ -277,14 +265,14 @@
></el-input-number> ></el-input-number>
</div> </div>
<div class="disFlex"> <div class="disFlex">
<div class="dis_l">{{ '公益金' }}:</div> <div class="dis_l">{{ "公益金" }}:</div>
<div class="dis_r">{{ treeObj.amount | numberToCurrency }}</div> <div class="dis_r">{{ treeObj.amount | numberToCurrency }}</div>
</div> </div>
</div> </div>
</div> </div>
<span slot="footer" class="treefooter"> <span slot="footer" class="treefooter">
<el-button type="primary" class="delBtn" @click="payGoods">{{ <el-button type="primary" class="delBtn" @click="payGoods">{{
'确定' "确定"
}}</el-button> }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -339,7 +327,7 @@ export default {
data() { data() {
let validatePwd = (rule, value, callback) => { let validatePwd = (rule, value, callback) => {
if (this.loginObj.newPassword != value) { if (this.loginObj.newPassword != value) {
callback(new Error('与新密码不一致,请重新输入')); callback(new Error("与新密码不一致,请重新输入"));
} else { } else {
callback(); callback();
} }
@ -355,22 +343,20 @@ export default {
closeFlag: false, closeFlag: false,
dialogs: false, dialogs: false,
flag1: false, flag1: false,
getSmsCode: '获取验证码', getSmsCode: "获取验证码",
flag2: false, flag2: false,
dialogVisible: false, dialogVisible: false,
marketData: {}, marketData: {},
loginObj: {}, loginObj: {},
rulesObj: { rulesObj: {
memberCode: [ memberCode: [
{ required: true, trigger: "blur", message: '请输入会员编号' }, { required: true, trigger: "blur", message: "请输入会员编号" },
], ],
newPassword: [ newPassword: [
{ required: true, trigger: "blur", message: '请输入新密码' }, { required: true, trigger: "blur", message: "请输入新密码" },
], ],
loginPassword: [{ validator: validatePwd, trigger: "blur" }], loginPassword: [{ validator: validatePwd, trigger: "blur" }],
phone: [ phone: [{ required: true, trigger: "blur", message: "请输入联系方式" }],
{ required: true, trigger: "blur", message: '请输入联系方式' },
],
}, },
treeObj: "", treeObj: "",
menu1: false, menu1: false,
@ -477,7 +463,7 @@ export default {
this.isPay = false; this.isPay = false;
this.isGoods = false; this.isGoods = false;
} else { } else {
this.$confirm('确认取消支付' + "?") this.$confirm("确认取消支付" + "?")
.then((_) => { .then((_) => {
this.isPay = false; this.isPay = false;
this.isGoods = false; this.isGoods = false;
@ -574,14 +560,14 @@ export default {
startTime() { startTime() {
if (this.isSend) return; if (this.isSend) return;
this.isSend = true; this.isSend = true;
this.getSmsCode = this.beginTime + 's后重新发送'; this.getSmsCode = this.beginTime + "s后重新发送";
let that = this; let that = this;
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.beginTime--; this.beginTime--;
this.getSmsCode = this.beginTime + 's后重新发送'; this.getSmsCode = this.beginTime + "s后重新发送";
if (this.beginTime < 0) { if (this.beginTime < 0) {
clearInterval(this.timer); clearInterval(this.timer);
this.getSmsCode = '获取验证码'; this.getSmsCode = "获取验证码";
this.beginTime = 60; this.beginTime = 60;
this.isSend = false; this.isSend = false;
} }

View File

@ -23,15 +23,15 @@ module.exports = {
}, },
}, },
}, },
configureWebpack: { // configureWebpack: {
externals: { // externals: {
zhCN: "zhCN", // zhCN: "zhCN",
enUS: "enUS", // enUS: "enUS",
zhTC: "zhTC", // zhTC: "zhTC",
// 'ruRU':'ruRU', // // 'ruRU':'ruRU',
// 'frFR':'frFR', // // 'frFR':'frFR',
}, // },
}, // },
chainWebpack: (config) => { chainWebpack: (config) => {
config.plugin("html").tap((args) => { config.plugin("html").tap((args) => {
args[0].title = "会员系统"; args[0].title = "会员系统";
@ -39,6 +39,7 @@ module.exports = {
}); });
}, },
devServer: { devServer: {
port: 8066,
proxy: { proxy: {
"/prod-api": { "/prod-api": {
target: "http://t-mana.beida413.com", target: "http://t-mana.beida413.com",