跨域代理
This commit is contained in:
@@ -10,7 +10,15 @@ module.exports = {
|
|||||||
// Paths
|
// Paths
|
||||||
assetsSubDirectory: 'static',
|
assetsSubDirectory: 'static',
|
||||||
assetsPublicPath: '/',
|
assetsPublicPath: '/',
|
||||||
proxyTable: {},
|
proxyTable: {
|
||||||
|
'/api':{
|
||||||
|
target:'http://999.free.idcfengye.com',
|
||||||
|
changeOrigin:true,
|
||||||
|
pathRewrite:{
|
||||||
|
'^/api':''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// Various Dev Server settings
|
// Various Dev Server settings
|
||||||
host: '0.0.0.0', // can be overwritten by process.env.HOST
|
host: '0.0.0.0', // can be overwritten by process.env.HOST
|
||||||
|
|||||||
@@ -51,11 +51,12 @@ axios.interceptors.response.use(
|
|||||||
|
|
||||||
export const post = (sevmethod, params) => {
|
export const post = (sevmethod, params) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
axios.post(`${store.getters.baseUrl}/` + 'ZD_WMS_WebService/ZD_WMS_WebService.asmx?op=' + sevmethod, params)
|
// axios.post(`${store.getters.baseUrl}/` + 'ZD_WMS_WebService/ZD_WMS_WebService.asmx?op=' + sevmethod, params)
|
||||||
|
axios.post('/api/ZD_WMS_WebService/ZD_WMS_WebService.asmx?op=' + sevmethod, params)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
resolve(response.data)
|
resolve(response.data)
|
||||||
}, error => {
|
}, error => {
|
||||||
Dialog(error.message)
|
Dialog(error || error.message)
|
||||||
reject(error.message)
|
reject(error.message)
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<div class="fxrow check-box">
|
<div class="fxrow check-box">
|
||||||
<i class="icon-name-check" :class="{'icon-name-checked': memberName}" @click="Remember"></i>
|
<i class="icon-name-check" :class="{'icon-name-checked': memberName}" @click="Remember"></i>
|
||||||
<span class="fxcol">记住用户名</span>
|
<span class="fxcol">记住用户名</span>
|
||||||
<router-link :to="{path: '/setup'}" class="fxcol" style="text-align:right;color:#6798ef">设置</router-link>
|
<!-- <router-link :to="{path: '/setup'}" class="fxcol" style="text-align:right;color:#6798ef">设置</router-link> -->
|
||||||
</div>
|
</div>
|
||||||
<button class="login-btn" :disabled="disabled" @click="_Login">确认登录</button>
|
<button class="login-btn" :disabled="disabled" @click="_Login">确认登录</button>
|
||||||
</section>
|
</section>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {rfLogin} from '@config/getData2'
|
import {rfLogin} from '@config/getData2'
|
||||||
import {encrypt} from '../../main.js'
|
// import {encrypt} from '../../main.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
data () {
|
data () {
|
||||||
@@ -52,7 +52,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async rfLogin () {
|
async rfLogin () {
|
||||||
try {
|
try {
|
||||||
let res = await rfLogin(this.loginname, encrypt(this.password))
|
let res = await rfLogin(this.loginname, this.password)
|
||||||
if (res.ErrNO === '1') {
|
if (res.ErrNO === '1') {
|
||||||
let obj = {}
|
let obj = {}
|
||||||
if (this.memberName) {
|
if (this.memberName) {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="submit-bar">
|
<section class="submit-bar">
|
||||||
<button class="btn submit-button" :class="{'btn-disabled' : !val1 || !val2}" :disabled="disabled" @click="_rfTrayPackage">组盘</button>
|
<button class="btn submit-button" :class="{'btn-disabled' : !val1 || !val2 || !active}" :disabled="disabled" @click="_rfTrayPackage">组盘</button>
|
||||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@@ -66,19 +66,21 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@components/NavBar.vue'
|
import NavBar from '@components/NavBar.vue'
|
||||||
import SearchBox from '@components/SearchBox.vue'
|
import SearchBox from '@components/SearchBox.vue'
|
||||||
|
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||||
import {rfReadTrayStatePackage, rfReadTrayStoragePackage, rfReadMatBarCodeStatePackage, rfTrayPackage} from '@config/getData2'
|
import {rfReadTrayStatePackage, rfReadTrayStoragePackage, rfReadMatBarCodeStatePackage, rfTrayPackage} from '@config/getData2'
|
||||||
export default {
|
export default {
|
||||||
name: 'GroupDisk',
|
name: 'GroupDisk',
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
SearchBox
|
SearchBox,
|
||||||
|
DropdownMenu
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
val1: '',
|
val1: '',
|
||||||
val2: '',
|
val2: '',
|
||||||
option: [{value: '34', label: '高尺寸托盘'}, {value: '33', label: '低尺寸托盘'}],
|
option: [{value: '34', label: '高尺寸托盘'}, {value: '33', label: '低尺寸托盘'}],
|
||||||
active: '1',
|
active: '',
|
||||||
open: false,
|
open: false,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
disabled: false
|
disabled: false
|
||||||
@@ -111,7 +113,7 @@ export default {
|
|||||||
/** 读取物料条码 */
|
/** 读取物料条码 */
|
||||||
async _rfReadMatBarCodeStatePackage (val) {
|
async _rfReadMatBarCodeStatePackage (val) {
|
||||||
try {
|
try {
|
||||||
let res = await rfReadMatBarCodeStatePackage(val)
|
let res = await rfReadMatBarCodeStatePackage(this.val1, val)
|
||||||
if (res.ErrNO === '1') {
|
if (res.ErrNO === '1') {
|
||||||
this.toast(res.ErrMsg)
|
this.toast(res.ErrMsg)
|
||||||
} else {
|
} else {
|
||||||
@@ -135,13 +137,13 @@ export default {
|
|||||||
/** 组盘 */
|
/** 组盘 */
|
||||||
async _rfTrayPackage () {
|
async _rfTrayPackage () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.val2) {
|
if (!this.val1 || !this.val2 || !this.active) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let uid = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).UserPID : ''
|
let uid = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).UserPID : ''
|
||||||
let res = await rfTrayPackage(this.val1, this.val2, '', uid)
|
let res = await rfTrayPackage(this.val1, this.val2, this.option[this.active].value, uid)
|
||||||
if (res.ErrNO === '1') {
|
if (res.ErrNO === '1') {
|
||||||
this.toast(res.ErrMsg)
|
this.toast(res.ErrMsg)
|
||||||
} else {
|
} else {
|
||||||
@@ -177,5 +179,5 @@ export default {
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~@style/mixin'
|
@import '~@style/mixin'
|
||||||
.grid-wraper
|
.grid-wraper
|
||||||
height calc(100% - 2.15rem)
|
height calc(100% - 3.15rem)
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user