v-console

parent 955db463
...@@ -12,6 +12,8 @@ node_modules ...@@ -12,6 +12,8 @@ node_modules
dist dist
build build
*.local *.local
yarn.lock
package-lock.json
# Editor directories and files # Editor directories and files
.idea .idea
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
"dayjs": "^1.11.12", "dayjs": "^1.11.12",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"pinia": "2.0.36", "pinia": "2.0.36",
"vconsole": "^3.15.1",
"vue": "^3.3.11", "vue": "^3.3.11",
"vue-i18n": "^9.1.9", "vue-i18n": "^9.1.9",
"wot-design-uni": "^1.3.2" "wot-design-uni": "^1.3.2"
......
import { createSSRApp } from 'vue'; import { createSSRApp } from 'vue';
import App from './App.vue'; import App from './App.vue';
import store from './store'; import store from './store';
import Vconsole from 'vconsole';
export function createApp() { export function createApp() {
const app = createSSRApp(App); const app = createSSRApp(App);
app.use(store); app.use(store);
app.use(vConsole);
return { return {
app, app,
}; };
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<script setup> <script setup>
import NavBar from "@/components/navBar/index.vue"; import NavBar from "@/components/navBar/index.vue";
import { xinhuaMpLogin } from "@/api/user.js"; import { xinhuaMpLogin } from "@/api/user.js";
import { setToken } from "@/utils/token";
const res = ref(""); const res = ref("");
const login = () => { const login = () => {
xma.xh.getUserProfile({ xma.xh.getUserProfile({
...@@ -27,6 +28,7 @@ const login = () => { ...@@ -27,6 +28,7 @@ const login = () => {
xinhuaMpLogin({ encryptedData: info.data.uMobile,userType:'consumer' }) xinhuaMpLogin({ encryptedData: info.data.uMobile,userType:'consumer' })
.then(data => { .then(data => {
res.value = data; res.value = data;
setToken(data.token);
}) })
.catch(err => { .catch(err => {
res.value = err; res.value = err;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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 to comment