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