Authored by htoooth

add request login

... ... @@ -46,12 +46,6 @@ const yoho = {
*/
data: window.yohoInterfaceData,
/**
* 判断是否是 登录
*/
isLogin() {
return cookie.get('_YOHOUID');
},
ready(callback) {
if (this.isApp || this.isYohoBuy) {
... ...
... ... @@ -130,7 +130,9 @@ export default {
},
methods: {
async onSubmit() {
if (!this.$yoho.isLogin()) {
const user = await this.$sdk.getUser();
if (!user) {
this.$sdk.goLogin();
return;
}
... ...
<template>
<LayoutApp>
<FormPage v-if="status === -1"></FormPage>
<StatusPage v-else></StatusPage>
<div></div>
<Scroll>
<FormPage v-if="status === -1"></FormPage>
<StatusPage v-else></StatusPage>
</Scroll>
</LayoutApp>
</template>
... ... @@ -11,6 +12,7 @@ import { createNamespacedHelpers } from 'vuex';
import FormPage from './form';
import StatusPage from './status';
import LayoutApp from '../components/layout/layout-app';
import {Scroll} from 'cube-ui';
const { mapState } = createNamespacedHelpers(
'license/form'
... ... @@ -32,7 +34,8 @@ export default {
components: {
FormPage,
StatusPage,
LayoutApp
LayoutApp,
Scroll
},
mounted() {
}
... ...