Commit 2ca60968 by 梁建民

js

parent 5c123ccf
......@@ -48,10 +48,16 @@ const actions = {
loginCheck({commit}, payload) {
Services.loginCheck().then((res) => {
let data = res.data;
if (payload.is_jump) {
if(data.err_code == 11010){
window.location.href='/h5/view/'
}
} else {
commit({
type: 'loginCheck',
data: data
});
}
}).catch(function (err) {
console.log('网络出现问题,请重试');
});
......
......@@ -42,7 +42,7 @@
import Vue from 'vue';
import {mapState} from 'vuex'
import Header from '@/views/common/Header.vue';
import { Popup } from 'vant';
import {Popup} from 'vant';
Vue.use(Popup);
......@@ -54,33 +54,35 @@
meaushow: true
}
},
beforeRouteEnter(to, from, next) {
next(vm => {
vm.$store.dispatch({
type: 'loginCheck',
is_jump: true
});
})
},
computed: {
...mapState({
walletInfoData: state => state.wallet.walletInfoData
})
},
watch: {
// $route(to,from){
// this.$store.dispatch({
// type: 'getWalletInfo',
// })
// }
},
created() {
this.$store.dispatch({
type: 'getWalletInfo'
})
},
methods: {
withdraw(){
if(this.walletInfoData.wallet_status == 1){ //钱包状态:1启用,-1未启用,-2锁定
withdraw() {
if (this.walletInfoData.wallet_status == 1) {
//钱包状态:1启用,-1未启用,-2锁定
this.$router.push({path: '/wallet/withdraw'});
}
},
activate(){
activate() {
this.$router.push({path: '/wallet/activate'});
},
recharge(){
recharge() {
this.$router.push({path: '/wallet/recharge'});
}
},
......
......@@ -37,7 +37,8 @@
import {mapState} from 'vuex'
import Header from '@/views/common/Header.vue';
import {RadioGroup, Radio, Cell, CellGroup} from 'vant';
import { productionUrlApi } from '../../api/index'
import {productionUrlApi} from '../../api/index'
console.log(productionUrlApi)
Vue.use(RadioGroup).use(Radio).use(Cell).use(CellGroup);
......@@ -60,7 +61,7 @@
},
watch: {
amountRechargeID(value) {
if(value){
if (value) {
if (this.radio == 1) { //微信支付
this.$store.dispatch({
type: 'payTodo',
......@@ -70,10 +71,10 @@
site_type: 2,
order_id: value
});
}else if (this.radio == 2) { //支付宝支付
window.location.href = productionUrlApi + "pay/todo?pay_code=alipay&rescue=1&types=1&site_type=2&order_id="+value;
}else if (this.radio == 3) { //中国银联
window.location.href = productionUrlApi + "pay/todo?pay_code=unionpay&rescue=1&types=1&pay_mode=2&order_id="+value;
} else if (this.radio == 2) { //支付宝支付
window.location.href = productionUrlApi + "pay/todo?pay_code=alipay&rescue=1&types=1&site_type=2&order_id=" + value;
} else if (this.radio == 3) { //中国银联
window.location.href = productionUrlApi + "pay/todo?pay_code=unionpay&rescue=1&types=1&pay_mode=2&order_id=" + value;
}
}
}
......@@ -85,7 +86,7 @@
},
methods: {
recharge() { //充值
if(this.inputNum !== ''){
if (this.inputNum !== '') {
console.log(this.radio)
//充值申请
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
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 sign in to comment