Browse Source

登录失效后自动跳转到登录界面

master
wanghongjun 2 years ago
parent
commit
d7afde29fc
  1. 11
      pages/goods/payment/orderPayment.vue
  2. 11
      pages/goods/payment/verifyPayment.vue

11
pages/goods/payment/orderPayment.vue

@ -81,6 +81,7 @@ import uniTh from "@/uni_modules/uni-table/components/uni-th/uni-th"
import uniTd from "@/uni_modules/uni-table/components/uni-td/uni-td" import uniTd from "@/uni_modules/uni-table/components/uni-td/uni-td"
import uniPagination from "@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination" import uniPagination from "@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination"
import whpop from '../../login/components/WhPopup' import whpop from '../../login/components/WhPopup'
import { checkLogin } from '@/core/app'
export default { export default {
name: "payment", name: "payment",
@ -145,6 +146,13 @@ export default {
} }
} }
}, },
onShow() {
//
if(!checkLogin()){
this.$toast('登录失效了,请重新登录系统')
setTimeout(this.jumpLogin,2000)
}
},
onLoad(options) { onLoad(options) {
this.selectedIndexs = [] this.selectedIndexs = []
this.batchcode = options.batchcode this.batchcode = options.batchcode
@ -152,6 +160,9 @@ export default {
this.getTableList() this.getTableList()
}, },
methods: { methods: {
jumpLogin() {
this.$navTo('pages/login/index')
},
// //
changePayType(val) { changePayType(val) {
this.payType = val this.payType = val

11
pages/goods/payment/verifyPayment.vue

@ -45,6 +45,7 @@
import uniTh from "@/uni_modules/uni-table/components/uni-th/uni-th" import uniTh from "@/uni_modules/uni-table/components/uni-th/uni-th"
import uniTd from "@/uni_modules/uni-table/components/uni-td/uni-td" import uniTd from "@/uni_modules/uni-table/components/uni-td/uni-td"
import uniPagination from "@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination" import uniPagination from "@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination"
import { checkLogin } from '@/core/app'
export default { export default {
name: "payment", name: "payment",
@ -79,11 +80,21 @@
pay_image: '', // pay_image: '', //
} }
}, },
onShow() {
//
if(!checkLogin()){
this.$toast('登录失效了,请重新登录系统')
setTimeout(this.jumpLogin,2000)
}
},
onLoad() { onLoad() {
this.selectedIndexs = [] this.selectedIndexs = []
this.getTableList() this.getTableList()
}, },
methods: { methods: {
jumpLogin() {
this.$navTo('pages/login/index')
},
// //
changePayType(val) { changePayType(val) {
this.payType = val this.payType = val

Loading…
Cancel
Save