chore(env): update env
This commit is contained in:
parent
9211c37556
commit
abf485d5f9
|
@ -3,3 +3,4 @@ ENV = 'development'
|
||||||
|
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
VUE_APP_BASE_API = '/prod-api'
|
||||||
VUE_APP_ADDRESS1 = 'http://t-app.beida777.com/#/'
|
VUE_APP_ADDRESS1 = 'http://t-app.beida777.com/#/'
|
||||||
|
VUE_APP_SYSTEM_TYPE = 'KG'
|
||||||
|
|
|
@ -4,3 +4,4 @@ ENV = 'production'
|
||||||
# base api
|
# base api
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
VUE_APP_BASE_API = '/prod-api'
|
||||||
VUE_APP_ADDRESS1 = 'http://t-app.beida777.com/#/'
|
VUE_APP_ADDRESS1 = 'http://t-app.beida777.com/#/'
|
||||||
|
VUE_APP_SYSTEM_TYPE = 'KG'
|
||||||
|
|
21
src/main.js
21
src/main.js
|
@ -26,21 +26,20 @@ import App from './App'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
import './utils/rem'
|
import './utils/rem'
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from '@/components/Pagination'
|
||||||
import '@/icons' // icon
|
import '@/icons' // icon
|
||||||
import '@/permission' // permission control
|
import '@/permission' // permission control
|
||||||
//国际化
|
// 国际化
|
||||||
// import i18n from './i18n/index'
|
// import i18n from './i18n/index'
|
||||||
import i18n from '@/assets/i18n/index'
|
import i18n from '@/assets/i18n/index'
|
||||||
import permission from './directive/permission'
|
import permission from './directive/permission'
|
||||||
|
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts'
|
||||||
|
|
||||||
import moment from "moment"
|
import moment from 'moment'
|
||||||
Vue.prototype.$moment = moment;
|
Vue.prototype.$moment = moment
|
||||||
import noImgEditor from '@/components/noImgEditor'
|
import noImgEditor from '@/components/noImgEditor'
|
||||||
|
|
||||||
|
|
||||||
// 下载
|
// 下载
|
||||||
// import { download } from "@/utils/ruoyi";
|
// import { download } from "@/utils/ruoyi";
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +58,7 @@ if (process.env.NODE_ENV === 'production') {
|
||||||
Vue.component('Pagination', Pagination)
|
Vue.component('Pagination', Pagination)
|
||||||
Vue.component('noImgEditor', noImgEditor)
|
Vue.component('noImgEditor', noImgEditor)
|
||||||
|
|
||||||
import { download } from '@/utils/request';
|
import { download } from '@/utils/request'
|
||||||
Vue.prototype.download = download
|
Vue.prototype.download = download
|
||||||
|
|
||||||
// set ElementUI lang to EN
|
// set ElementUI lang to EN
|
||||||
|
@ -67,19 +66,19 @@ Vue.use(ElementUI, { locale })
|
||||||
// 如果想要中文版 element-ui,按如下方式声明
|
// 如果想要中文版 element-ui,按如下方式声明
|
||||||
// Vue.use(ElementUI)
|
// Vue.use(ElementUI)
|
||||||
|
|
||||||
import { numberToCurrencyNo, isDollar, isLocal,stateFormat,isLocalSymbol } from '@/utils/numberToCurrency'
|
import { numberToCurrencyNo, isDollar, isLocal, stateFormat, isLocalSymbol } from '@/utils/numberToCurrency'
|
||||||
Vue.prototype.stateFormat = stateFormat
|
Vue.prototype.stateFormat = stateFormat
|
||||||
Vue.prototype.isLocalSymbol = isLocalSymbol
|
Vue.prototype.isLocalSymbol = isLocalSymbol
|
||||||
Vue.prototype.systemTypes = [{value:2, label:'新零售'}]
|
Vue.prototype.systemTypes = [{ value: 2, label: '新零售' }]
|
||||||
// 配置全局过滤器,实现数字千分位格式
|
// 配置全局过滤器,实现数字千分位格式
|
||||||
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.use(permission)
|
Vue.use(permission)
|
||||||
Vue.prototype.$echarts = echarts;
|
Vue.prototype.$echarts = echarts
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
|
|
@ -1549,7 +1549,7 @@ export const constantRoutes = [
|
||||||
}, {
|
}, {
|
||||||
path: 'retailLevel',
|
path: 'retailLevel',
|
||||||
name: 'RetailLevel',
|
name: 'RetailLevel',
|
||||||
meta: { title: i18n.t('新零售级别配置') },
|
meta: { title: i18n.t('级别配置') },
|
||||||
component: ParentView,
|
component: ParentView,
|
||||||
redirect: 'retailLevel/index',
|
redirect: 'retailLevel/index',
|
||||||
children: [
|
children: [
|
||||||
|
@ -1557,7 +1557,7 @@ export const constantRoutes = [
|
||||||
path: 'retailLevel',
|
path: 'retailLevel',
|
||||||
name: 'RetailLevelPage',
|
name: 'RetailLevelPage',
|
||||||
component: () => import('@/views/configManage/retailLevel/index'),
|
component: () => import('@/views/configManage/retailLevel/index'),
|
||||||
meta: { title: i18n.t('新零售级别配置') }
|
meta: { title: i18n.t('级别配置') }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'retailJxpz',
|
path: 'retailJxpz',
|
||||||
|
@ -1683,12 +1683,12 @@ export const constantRoutes = [
|
||||||
component: () => import('@/views/configManage/systemconfiguration/index'),
|
component: () => import('@/views/configManage/systemconfiguration/index'),
|
||||||
meta: { title: '体系配置' }
|
meta: { title: '体系配置' }
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: 'groupConfiguration',
|
// path: 'groupConfiguration',
|
||||||
name: 'GroupConfigurationList',
|
// name: 'GroupConfigurationList',
|
||||||
component: () => import('@/views/configManage/systemconfiguration/groupConfiguration'),
|
// component: () => import('@/views/configManage/systemconfiguration/groupConfiguration'),
|
||||||
meta: { title: '区域体系分组' }
|
// meta: { title: '区域体系分组' }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
path: 'vertexAwardConfiguration',
|
path: 'vertexAwardConfiguration',
|
||||||
name: 'VertexAwardConfiguration',
|
name: 'VertexAwardConfiguration',
|
||||||
|
@ -2112,37 +2112,37 @@ export const constantRoutes = [
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: 'memberRetailRegion',
|
// path: 'memberRetailRegion',
|
||||||
name: 'memberRetailRegion',
|
// name: 'memberRetailRegion',
|
||||||
meta: { title: i18n.t('收益区域配置') },
|
// meta: { title: i18n.t('收益区域配置') },
|
||||||
component: ParentView,
|
// component: ParentView,
|
||||||
redirect: 'memberRetailRegion/index',
|
// redirect: 'memberRetailRegion/index',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: 'memberRetailRegion',
|
// path: 'memberRetailRegion',
|
||||||
name: 'memberRetailRegion',
|
// name: 'memberRetailRegion',
|
||||||
component: () => import('@/views/configManage/memberRetailRegion/index'),
|
// component: () => import('@/views/configManage/memberRetailRegion/index'),
|
||||||
meta: { title: i18n.t('收益区域配置') }
|
// meta: { title: i18n.t('收益区域配置') }
|
||||||
}
|
// }
|
||||||
|
|
||||||
]
|
// ]
|
||||||
}, {
|
// }, {
|
||||||
path: 'cuMemberRetailRegion',
|
// path: 'cuMemberRetailRegion',
|
||||||
name: 'cuMemberRetailRegion',
|
// name: 'cuMemberRetailRegion',
|
||||||
meta: { title: i18n.t('未配置区域') },
|
// meta: { title: i18n.t('未配置区域') },
|
||||||
component: ParentView,
|
// component: ParentView,
|
||||||
redirect: 'cuMemberRetailRegion/index',
|
// redirect: 'cuMemberRetailRegion/index',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: 'cuMemberRetailRegion',
|
// path: 'cuMemberRetailRegion',
|
||||||
name: 'cuMemberRetailRegion',
|
// name: 'cuMemberRetailRegion',
|
||||||
component: () => import('@/views/configManage/cuMemberRetailRegion/index'),
|
// component: () => import('@/views/configManage/cuMemberRetailRegion/index'),
|
||||||
meta: { title: i18n.t('未配置区域') }
|
// meta: { title: i18n.t('未配置区域') }
|
||||||
}
|
// }
|
||||||
|
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
path: 'freePostageAreas',
|
path: 'freePostageAreas',
|
||||||
name: 'FreePostageAreas',
|
name: 'FreePostageAreas',
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
<el-input v-model="queryParams.vertexName" clearable />
|
<el-input v-model="queryParams.vertexName" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<!-- <el-col :span="4">
|
||||||
<el-form-item label="区域分组" prop="regionVertexPkId">
|
<el-form-item label="区域分组" prop="regionVertexPkId">
|
||||||
<el-select v-model="queryParams.regionVertexPkId" clearable>
|
<el-select v-model="queryParams.regionVertexPkId" clearable>
|
||||||
<el-option v-for="item in groupList" :key="item.pkId" :label="item.name" :value="item.pkId" />
|
<el-option v-for="item in groupList" :key="item.pkId" :label="item.name" :value="item.pkId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<!-- <el-col :span="4">
|
<!-- <el-col :span="4">
|
||||||
<el-form-item label="体系编号" prop="memberCode">
|
<el-form-item label="体系编号" prop="memberCode">
|
||||||
<el-input clearable v-model="queryParams.memberCode"></el-input>
|
<el-input clearable v-model="queryParams.memberCode"></el-input>
|
||||||
|
@ -93,11 +93,11 @@
|
||||||
prop="memberCode"
|
prop="memberCode"
|
||||||
:label="'会员编号'"
|
:label="'会员编号'"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="regionVertexName"
|
prop="regionVertexName"
|
||||||
label="区域分组"
|
label="区域分组"
|
||||||
/>
|
/> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="creationTime"
|
prop="creationTime"
|
||||||
|
@ -208,13 +208,13 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">
|
||||||
<el-form-item label="区域分组">
|
<el-form-item label="区域分组">
|
||||||
<el-select v-model="formd.regionVertexPkId" clearable>
|
<el-select v-model="formd.regionVertexPkId" clearable>
|
||||||
<el-option v-for="item in groupList" :key="item.pkId" :label="item.name" :value="item.pkId" />
|
<el-option v-for="item in groupList" :key="item.pkId" :label="item.name" :value="item.pkId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="序号">
|
<el-form-item label="序号">
|
||||||
<el-input v-model="formd.sort" clearable />
|
<el-input v-model="formd.sort" clearable />
|
||||||
|
|
|
@ -392,7 +392,7 @@ export default {
|
||||||
this.download(
|
this.download(
|
||||||
'/bonus/manage/special/download',
|
'/bonus/manage/special/download',
|
||||||
{},
|
{},
|
||||||
`${this.$t('新零售注水业绩')}${new Date().getTime()}.xlsx`
|
`${this.$t('注水业绩')}${new Date().getTime()}.xlsx`
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
addRules() {
|
addRules() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<div class="top_item">
|
<div class="top_item">
|
||||||
<div class="title_no">全球一体化系统管理平台</div>
|
<div class="title_no">{{ systemTypes }}系统管理平台</div>
|
||||||
<dv-decoration-5
|
<dv-decoration-5
|
||||||
:color="['#4278a3', '#4278a3']"
|
:color="['#4278a3', '#4278a3']"
|
||||||
style="width: 100%; height: 100px"
|
style="width: 100%; height: 100px"
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
alt="">
|
alt="">
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="contain">
|
<div class="contain">
|
||||||
<dv-border-box-7 :color="['#0f2e66', '#139efa']"></dv-border-box-7>
|
<dv-border-box-7 :color="['#0f2e66', '#139efa']" />
|
||||||
</div>
|
</div>
|
||||||
<div class="login_contain">
|
<div class="login_contain">
|
||||||
<el-form
|
<el-form
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<h3 class="title">Login Form</h3>
|
<h3 class="title">Login Form</h3>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="tit1">
|
<div class="tit1">
|
||||||
<div class="act">密码登录</div>
|
<div class="act">密码登录({{ systemTypes }})</div>
|
||||||
<!-- <div>短信登录</div> -->
|
<!-- <div>短信登录</div> -->
|
||||||
</div>
|
</div>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
|
@ -35,15 +35,15 @@
|
||||||
<svg-icon icon-class="user" />
|
<svg-icon icon-class="user" />
|
||||||
</span>
|
</span>
|
||||||
<el-input
|
<el-input
|
||||||
clearable
|
|
||||||
ref="username"
|
ref="username"
|
||||||
v-model="loginForm.username"
|
v-model="loginForm.username"
|
||||||
@blur="getCheck"
|
clearable
|
||||||
placeholder="Username"
|
placeholder="Username"
|
||||||
name="username"
|
name="username"
|
||||||
type="text"
|
type="text"
|
||||||
tabindex="1"
|
tabindex="1"
|
||||||
auto-complete="on"
|
auto-complete="on"
|
||||||
|
@blur="getCheck"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@
|
||||||
<svg-icon icon-class="password" />
|
<svg-icon icon-class="password" />
|
||||||
</span>
|
</span>
|
||||||
<el-input
|
<el-input
|
||||||
clearable
|
|
||||||
:key="passwordType"
|
:key="passwordType"
|
||||||
ref="password"
|
ref="password"
|
||||||
v-model="loginForm.password"
|
v-model="loginForm.password"
|
||||||
|
clearable
|
||||||
:type="passwordType"
|
:type="passwordType"
|
||||||
placeholder="Password"
|
placeholder="Password"
|
||||||
name="password"
|
name="password"
|
||||||
|
@ -75,27 +75,27 @@
|
||||||
<svg-icon icon-class="password" />
|
<svg-icon icon-class="password" />
|
||||||
</span>
|
</span>
|
||||||
<el-input
|
<el-input
|
||||||
|
v-model.trim="loginForm.code"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入验证码"
|
placeholder="请输入验证码"
|
||||||
v-model.trim="loginForm.code"
|
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
></el-input>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="img">
|
<div class="img">
|
||||||
<img :src="codeUrl" @click="getVerifyCode" />
|
<img :src="codeUrl" @click="getVerifyCode">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="yzm" v-if="ismsgCode">
|
<div v-if="ismsgCode" class="yzm">
|
||||||
<el-form-item prop="smsCode" style="flex: 1">
|
<el-form-item prop="smsCode" style="flex: 1">
|
||||||
<span class="svg-container">
|
<span class="svg-container">
|
||||||
<svg-icon icon-class="password" />
|
<svg-icon icon-class="password" />
|
||||||
</span>
|
</span>
|
||||||
<el-input
|
<el-input
|
||||||
|
v-model.trim="loginForm.smsCode"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入短信验证码"
|
placeholder="请输入短信验证码"
|
||||||
v-model.trim="loginForm.smsCode"
|
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
></el-input>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="img">
|
<div class="img">
|
||||||
<div class="hqyzm1" :class="isSend ? 'hui' : ''" @click="submitForm">{{ getCode }}</div>
|
<div class="hqyzm1" :class="isSend ? 'hui' : ''" @click="submitForm">{{ getCode }}</div>
|
||||||
|
@ -106,8 +106,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
class="toLogin"
|
class="toLogin"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>登录</el-button
|
>登录</el-button>
|
||||||
>
|
|
||||||
|
|
||||||
<!-- <div class="tips">
|
<!-- <div class="tips">
|
||||||
<span style="margin-right:20px;">username: admin</span>
|
<span style="margin-right:20px;">username: admin</span>
|
||||||
|
@ -119,75 +118,76 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { validUsername } from "@/utils/validate";
|
import { validUsername } from '@/utils/validate'
|
||||||
import { getCodeImg, userCheck,userSend } from "@/api/user";
|
import { getCodeImg, userCheck, userSend } from '@/api/user'
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: 'Login',
|
||||||
data() {
|
data() {
|
||||||
const validateUsername = (rule, value, callback) => {
|
const validateUsername = (rule, value, callback) => {
|
||||||
if (!validUsername(value)) {
|
if (!validUsername(value)) {
|
||||||
callback(new Error("Please enter the correct user name"));
|
callback(new Error('Please enter the correct user name'))
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
const validatePassword = (rule, value, callback) => {
|
const validatePassword = (rule, value, callback) => {
|
||||||
if (value.length < 6) {
|
if (value.length < 6) {
|
||||||
callback(new Error("The password can not be less than 6 digits"));
|
callback(new Error('The password can not be less than 6 digits'))
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
return {
|
return {
|
||||||
loginForm: {
|
loginForm: {
|
||||||
// username: 'admin',
|
// username: 'admin',
|
||||||
// password: 'admin123',
|
// password: 'admin123',
|
||||||
username: "",
|
username: '',
|
||||||
password: "",
|
password: ''
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [
|
username: [
|
||||||
{ required: true, trigger: "blur", message: "请输入用户名" },
|
{ required: true, trigger: 'blur', message: '请输入用户名' }
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{ required: true, trigger: "blur", message: '请输入密码' },
|
{ required: true, trigger: 'blur', message: '请输入密码' }
|
||||||
],
|
],
|
||||||
code: [
|
code: [
|
||||||
{ required: true, trigger: "blur", message:"请输入验证码" },
|
{ required: true, trigger: 'blur', message: '请输入验证码' }
|
||||||
],
|
],
|
||||||
smsCode: [
|
smsCode: [
|
||||||
{ required: true, trigger: "blur", message:"请输入短信验证码" },
|
{ required: true, trigger: 'blur', message: '请输入短信验证码' }
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
passwordType: "password",
|
passwordType: 'password',
|
||||||
redirect: undefined,
|
redirect: undefined,
|
||||||
codeUrl: "",
|
codeUrl: '',
|
||||||
ismsgCode:false,
|
ismsgCode: false,
|
||||||
isSend: false,
|
isSend: false,
|
||||||
beginTime: 60,
|
beginTime: 60,
|
||||||
getCode: '获取验证码',
|
getCode: '获取验证码',
|
||||||
timer: '',
|
timer: '',
|
||||||
};
|
systemTypes: process.env.VUE_APP_SYSTEM_TYPE
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route: {
|
$route: {
|
||||||
handler: function (route) {
|
handler: function(route) {
|
||||||
this.redirect = route.query && route.query.redirect;
|
this.redirect = route.query && route.query.redirect
|
||||||
},
|
|
||||||
immediate: true,
|
|
||||||
},
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
this.getVerifyCode();
|
this.getVerifyCode()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
startTime() {
|
startTime() {
|
||||||
if (this.isSend) return
|
if (this.isSend) return
|
||||||
this.isSend = true
|
this.isSend = true
|
||||||
this.getCode = this.beginTime + 's后重新发送'
|
this.getCode = this.beginTime + 's后重新发送'
|
||||||
let that = this
|
const that = this
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
this.beginTime--
|
this.beginTime--
|
||||||
this.getCode = this.beginTime + 's后重新发送'
|
this.getCode = this.beginTime + 's后重新发送'
|
||||||
|
@ -199,17 +199,17 @@ export default {
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
submitForm(){
|
submitForm() {
|
||||||
if(!this.isSend){
|
if (!this.isSend) {
|
||||||
userSend({
|
userSend({
|
||||||
userName: this.loginForm.username
|
userName: this.loginForm.username
|
||||||
}).then(res=>{
|
}).then(res => {
|
||||||
this.startTime()
|
this.startTime()
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: "success",
|
type: 'success'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -217,53 +217,53 @@ export default {
|
||||||
getCheck() {
|
getCheck() {
|
||||||
userCheck({
|
userCheck({
|
||||||
userName: this.loginForm.username
|
userName: this.loginForm.username
|
||||||
}).then(res=>{
|
}).then(res => {
|
||||||
if(res.data == 0){
|
if (res.data == 0) {
|
||||||
this.ismsgCode = true
|
this.ismsgCode = true
|
||||||
}else{
|
} else {
|
||||||
this.ismsgCode = false
|
this.ismsgCode = false
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
getVerifyCode() {
|
getVerifyCode() {
|
||||||
getCodeImg().then((res) => {
|
getCodeImg().then((res) => {
|
||||||
this.codeUrl = "data:image/gif;base64," + res.img;
|
this.codeUrl = 'data:image/gif;base64,' + res.img
|
||||||
this.loginForm.uuid = res.uuid;
|
this.loginForm.uuid = res.uuid
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
showPwd() {
|
showPwd() {
|
||||||
if (this.passwordType === "password") {
|
if (this.passwordType === 'password') {
|
||||||
this.passwordType = "";
|
this.passwordType = ''
|
||||||
} else {
|
} else {
|
||||||
this.passwordType = "password";
|
this.passwordType = 'password'
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.password.focus();
|
this.$refs.password.focus()
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.$refs.loginForm.validate((valid) => {
|
this.$refs.loginForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch("user/login", this.loginForm)
|
.dispatch('user/login', this.loginForm)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$router.push({ path: this.redirect || "/" });
|
this.$router.push({ path: this.redirect || '/' })
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.getVerifyCode();
|
this.getVerifyCode()
|
||||||
this.loginForm.code = "";
|
this.loginForm.code = ''
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
console.log("error submit!!");
|
console.log('error submit!!')
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
@ -44,9 +44,9 @@ module.exports = {
|
||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
'/prod-api': {
|
'/prod-api': {
|
||||||
target: 'https://t-zk.beida666.com',
|
target: 'http://192.168.0.86:8080',
|
||||||
changeOrigin: true
|
changeOrigin: true,
|
||||||
// pathRewrite: { '^/prod-api': '' }
|
pathRewrite: { '^/prod-api': '' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue