Commit 845fafda by liang ce

测试

parent 4fee4336
......@@ -7,7 +7,7 @@ let loadingInstance // 创建Loading 的实例
// axios.defaults.headers.post['Content-Type'] = 'application/json; charset=utf-8'
// axios.defaults.crossDomain = true
// axios.defaults.withCredentials = true // 设置cross跨域 并设置访问权限 允许跨域携带cookie信息
axios.defaults.headers['Authorization'] = `Bearer ${sessionStorage.getItem('token')}` // 设置请求头为 Authorization
axios.defaults.headers['Authorization'] = `Bearer ${localStorage.getItem('token')}` // 设置请求头为 Authorization
// 配置发送请求前的拦截器可以设置token信息
axios.interceptors.request.use((config) => {
// loading开始loadingInstance.start()
......
......@@ -200,7 +200,7 @@ export default {
status: this.searchSource.accountStatus,
cardNo: this.searchSource.cardNum,
cardStatus: this.searchSource.cardStatus,
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/account/queryAccountList?${AccountData}`).then((res) => {
_that.accountList = res.data.data.recordList
......@@ -323,7 +323,7 @@ export default {
let _that = this
this.rechargeData.orderPrice = this.form.getFieldsValue().orderPrice
this.rechargeData.remark = this.form.getFieldsValue().remark
this.rechargeData.orgId = sessionStorage.getItem('corpId')
this.rechargeData.orgId = localStorage.getItem('orgId')
let rechargeData = this.$qs.stringify(this.rechargeData)
$http.get(`/v1/charge/charge?${rechargeData}`).then((res) => {
if (res.data.message === 'SUCCESS') {
......@@ -350,7 +350,7 @@ export default {
let accountOperationData = this.$qs.stringify({
userId: userId,
status: status,
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
let url = type === 3 ? 'update_account_status' : 'update_card_status'
$http.get(`/v1/account/${url}?${accountOperationData}`).then((res) => {
......@@ -422,13 +422,13 @@ export default {
cardOperationData = this.$qs.stringify({
cardNo: this.updateBindCardStatusForm.getFieldsValue().cardNo,
userId: this.selsctUserId,
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
} else if (type === 1) {
cardOperationData = this.$qs.stringify({
cardNo: '',
userId: this.selsctUserId,
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
}
$http.get(`/v1/account/update_bind_card_status?${cardOperationData}`).then((res) => {
......
......@@ -168,7 +168,7 @@ export default {
// 获取收银员列表
getAgentList () {
let AgentData = this.$qs.stringify({
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/account/query_user_admin_list?${AgentData}`).then((res) => {
this.agentList = res.data.data.recordList
......@@ -192,7 +192,7 @@ export default {
pageNumber: this.pagination.defaultPageSize,
type: this.searchSource.type,
agentId: this.searchSource.agentId,
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/account/list_couponRecord?${RecordData}`).then((res) => {
let data = res.data.data
......@@ -298,7 +298,7 @@ export default {
endTime: `${values['date-picker']} 23:59:59`,
remark: values.remark,
type: values.select,
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/account/batch_create_subsidy?${RecordData}`).then((res) => {
if (res.data.message === 'SUCCESS') {
......
......@@ -81,7 +81,7 @@ export default {
let DeleteCashierData = this.$qs.stringify({
userId: record.userId,
status: '1',
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/cashier/delete_cashier?${DeleteCashierData}`).then((res) => {
if (res.data.resultCode === '0') {
......@@ -98,7 +98,7 @@ export default {
let CashierListData = this.$qs.stringify({
pageNumber: this.pagination.defaultPageSize,
currentPage: this.pagination.current,
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/cashier/list_cashier?${CashierListData}`).then((res) => {
this.pagination.total = parseInt(res.data.data.total)
......@@ -122,7 +122,7 @@ export default {
name: res[0].name,
userId: res[0].emplId,
status: '0',
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`v1/cashier/insert_cashier?${insertCashierData}`).then((res) => {
if (res.data.resultCode === '0') {
......
......@@ -114,7 +114,7 @@ export default {
// 获取收银员列表
getAgentList () {
let AgentData = this.$qs.stringify({
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/account/query_user_admin_list?${AgentData}`).then((res) => {
this.agentList = res.data.data.recordList
......@@ -204,7 +204,7 @@ export default {
agentId: this.searchSource.agentId,
status: this.searchSource.status,
userId: this.searchSource.UserMessage.emplId,
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/charge/list_charge?${RechargeData}`).then((res) => {
let data = res.data.data
......
......@@ -134,7 +134,7 @@ export default {
methods: {
queryAgentList () {
let CashierListData = this.$qs.stringify({
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/cashier/list_cashier_all?${CashierListData}`).then((res) => {
this.agentList = res.data.data.list
......@@ -159,7 +159,7 @@ export default {
let refundData = this.$qs.stringify({
orderNo: this.refundSelect.orderNo,
remark: this.form.getFieldsValue().remark || '',
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/consume/refund?${refundData}`).then((res) => {
if (res.data.message === 'SUCCESS') {
......@@ -194,7 +194,7 @@ export default {
status: this.searchSource.status,
userId: this.searchSource.UserMessage.emplId,
agentId: this.searchSource.agentId,
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/consume/list_expense_record?${RecordListData}`).then((res) => {
let data = res.data.data
......
......@@ -66,7 +66,7 @@ export default {
userId: this.userId,
currentPage: this.pagination.current,
pageNumber: this.pagination.defaultPageSize,
orgId: sessionStorage.getItem('corpId')
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/account/query_subsidyList_by_user_id?${SubsidyListData}`).then((res) => {
let data = res.data.data
......
......@@ -39,7 +39,7 @@ router.beforeEach(function (to, from, next) {
if (to.name === 'noPermission' || to.name === 'configError') {
next()
} else {
if (sessionStorage.getItem('userId')) {
if (localStorage.getItem('userId')) {
next()
} else {
localStorage.setItem('orgId', to.redirectedFrom.substr(1))
......@@ -51,7 +51,7 @@ router.beforeEach(function (to, from, next) {
config.ddready('ddpermission').then((res) => {
if (res === 'noPermission') {
next({ name: 'noPermission' })
} else {
} else {
next()
}
}).catch((err) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment