url认证
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<div v-loading="loading">
|
||||
<div class="heior_box">
|
||||
<el-button size="small" type="primary" icon="el-icon-sold-out" @click="showDialog=true">认领</el-button>
|
||||
我认领的订单数:{{order_num}}
|
||||
<div class="search-box">
|
||||
<el-input v-model="searchModel.Channel" size="small" placeholder="请输入销售员"></el-input>
|
||||
<el-date-picker
|
||||
@@ -62,6 +63,7 @@ export default {
|
||||
loading: false,
|
||||
showDialog:false,
|
||||
retData:[],
|
||||
order_num:0,
|
||||
seller:'',
|
||||
|
||||
takeModel:{
|
||||
@@ -84,6 +86,7 @@ export default {
|
||||
created() {
|
||||
this.$store.commit("setCurrentNav","销售管理>>销售员统计分析")
|
||||
this.get();
|
||||
|
||||
},
|
||||
methods: {
|
||||
get() {
|
||||
@@ -107,6 +110,9 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$api.get(this.$api.phpURL + 'order/order/takeOrderNum', this.searchModel).then(res => {
|
||||
this.order_num = res.num;
|
||||
})
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<div class="heior_box">
|
||||
<el-button size="small" type="primary" @click="useDanPrice">使用专项价</el-button>
|
||||
|
||||
<div class="search-box">
|
||||
<el-input v-model="searchModel.keyWord" placeholder="请输入套餐名称/标题" clearable size="small">
|
||||
|
||||
@@ -290,10 +290,30 @@ let router = new Router({
|
||||
|
||||
// 使用 router.beforeEach 注册一个全局前置守卫,判断用户是否登陆
|
||||
router.beforeEach((to, from, next) => {
|
||||
let userInfo = local.getUserByCache()
|
||||
if(userInfo != null){
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'http://juip.wyk/api/Allow/urlCheck',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: {'url':to.fullPath,'id':userInfo.Manager.ID},
|
||||
success: function (res) {
|
||||
if(res.Code == -10000){
|
||||
router.replace({
|
||||
path: '/login',
|
||||
query: {
|
||||
redirect: router.currentRoute.fullPath
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (to.path === '/login' || to.path === '/' || to.path === '/r') {
|
||||
next()
|
||||
} else {
|
||||
let userInfo = local.getUserByCache()// localStorage.getItem('etorcurrentuser');
|
||||
// localStorage.getItem('etorcurrentuser');
|
||||
if (!userInfo || userInfo === '') {
|
||||
router.replace({
|
||||
path: '/login',
|
||||
|
||||
Reference in New Issue
Block a user