feat: 增加数据统计,销量统计,桌台统计
This commit is contained in:
@@ -79,12 +79,13 @@
|
||||
<script setup>
|
||||
import { encrypt } from "@/utils/rsaEncrypt";
|
||||
import $API_login from "@/api/account/login";
|
||||
import { $douyin_checkIn } from "@/api/coup/index";
|
||||
import Cookies from "js-cookie";
|
||||
import Background from "@/assets/images/background_img.jpg";
|
||||
import { useUserStore } from "@/store";
|
||||
import { useRoute } from "vue-router";
|
||||
import router from "@/router";
|
||||
import { $douyin_checkIn } from "@/api/coup/index";
|
||||
import { getToken, getDouyinToken, setDouyinToken } from "@/utils/auth";
|
||||
const route = useRoute();
|
||||
|
||||
const state = reactive({
|
||||
@@ -191,10 +192,21 @@ function handleLogin() {
|
||||
userStore
|
||||
.login(user)
|
||||
.then(async (res) => {
|
||||
const token = getToken();
|
||||
console.log("token", token);
|
||||
$douyin_checkIn({
|
||||
loginName: userStore.userInfo.phone,
|
||||
token,
|
||||
}).then((checkInfo) => {
|
||||
console.log("checkInfo", checkInfo.userInfo);
|
||||
userStore.meituan_douyin_info = checkInfo.userInfo;
|
||||
setDouyinToken(checkInfo.userInfo.token);
|
||||
});
|
||||
await userStore.getUserInfo();
|
||||
await $douyin_checkIn();
|
||||
|
||||
const { path, queryParams } = parseRedirect();
|
||||
router.push({ path: path, query: queryParams });
|
||||
console.log(path, queryParams);
|
||||
router.replace({ path: path, query: queryParams });
|
||||
})
|
||||
.catch(() => {
|
||||
state.loading = false;
|
||||
|
||||
Reference in New Issue
Block a user