提交 8848b82e 编写于 作者: guangjun.yang's avatar guangjun.yang

统一使用action中的gotoLogin

上级 71bfa620
import fetch from '@/utils/fetch' import fetch from '@/utils/fetch'
import { getBaseUrl, getApiUrl } from '@/utils/index'; import { getBaseUrl, getApiUrl } from '@/utils/index';
import { mapGetters } from 'vuex'; import { mapGetters, mapActions } from 'vuex';
// import store from '../store'; // import store from '../store';
...@@ -26,6 +26,8 @@ module.exports = { ...@@ -26,6 +26,8 @@ module.exports = {
}, },
methods: { methods: {
...mapActions(["goLogin"]),
getUrlPara(obj) { getUrlPara(obj) {
let dataStr = '' let dataStr = ''
let list = []; let list = [];
...@@ -235,6 +237,7 @@ module.exports = { ...@@ -235,6 +237,7 @@ module.exports = {
}; };
this.GET("campaign/admin/task/checkToken", param).then(res => { this.GET("campaign/admin/task/checkToken", param).then(res => {
if (res.code !== "000000") { if (res.code !== "000000") {
console.log('Window.__isWeb', Window.__isWeb);
if(Window.__isWeb) { if(Window.__isWeb) {
this.goLogin(); this.goLogin();
} else { } else {
......
...@@ -443,9 +443,9 @@ export default { ...@@ -443,9 +443,9 @@ export default {
onReplay() { onReplay() {
this.coverType = 0; this.coverType = 0;
}, },
goLogin() { // goLogin() {
this.$store.dispatch('goLogin'); // this.$store.dispatch('goLogin');
}, // },
// 去下载app // 去下载app
download() { download() {
window.location.href = "https://a.app.qq.com/o/simple.jsp?pkgname=com.picahealth.yunque"; window.location.href = "https://a.app.qq.com/o/simple.jsp?pkgname=com.picahealth.yunque";
......
...@@ -356,9 +356,9 @@ export default { ...@@ -356,9 +356,9 @@ export default {
this.curtGoodsNum = num - 1; this.curtGoodsNum = num - 1;
this.countTotalPrice(); this.countTotalPrice();
}, },
goLogin() { // goLogin() {
this.$store.dispatch('goLogin'); // this.$store.dispatch('goLogin');
}, // },
handlerAction(type) { handlerAction(type) {
if (type === 2) { if (type === 2) {
wxOauth(); wxOauth();
......
...@@ -216,7 +216,7 @@ export default { ...@@ -216,7 +216,7 @@ export default {
// 微信支付回调 // 微信支付回调
paycallback(params) { paycallback(params) {
// 0成功 -1错误 -2 用户取消 -3 没有安装微信 // 0成功 -1错误 -2 用户取消 -3 没有安装微信
let url = getHactiveUrl() + `/order?orderBack=1&id=${this.orderId}&courseUrl=${this.courseUrl}`; let url = getHactiveUrl() + `/message_push/#/order?orderBack=1&id=${this.orderId}&courseUrl=${this.courseUrl}`;
if(params.result == -3) { if(params.result == -3) {
this.$toast('您未安装微信,暂不能支付'); this.$toast('您未安装微信,暂不能支付');
} else if(params.result == -2) { } else if(params.result == -2) {
...@@ -406,9 +406,9 @@ export default { ...@@ -406,9 +406,9 @@ export default {
this.countTotalPrice(); this.countTotalPrice();
}); });
}, },
goLogin() { // goLogin() {
this.$store.dispatch('goLogin'); // this.$store.dispatch('goLogin');
}, // },
handlerAction(type) { handlerAction(type) {
if (type === 2) { if (type === 2) {
wxOauth(); wxOauth();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册