xiangpei
2024-07-26 807e9577f0b1a22a3b0fbaa404d1d7215100c28e
登录测试调整
2个文件已修改
10 ■■■■■ 已修改文件
src/api/user.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/user.js
@@ -4,7 +4,7 @@
  return request({
    url: '/wx/web/login',
    method: 'post',
    data
    params: data
  })
}
export function getInfo(token) {
src/views/home/index.vue
@@ -1,6 +1,7 @@
<template>
  <div class="dashboard-container">
    <div class="dashboard-text">name: {{ name }}</div>
    <el-button @click="getUserDate">登录</el-button>
  </div>
</template>
@@ -14,14 +15,15 @@
    ...mapGetters(["name"]),
  },
  created() {
    this.getUserDate();
    // this.getUserDate();
  },
  methods: {
    getUserDate() {
      console.log(123);
      login({
        code: "031xHA00064oxS1Es0200cRzRF2xHA0t",
      }).then((res) => {
        code: "061f951w3vnwd33iLL1w3kAvmo1f951N"
      }
      ).then((res) => {
       console.log(res);
      });
    },