Commit 8fd950ed authored by zL's avatar zL

提交部分代码

parent 3117b94e
......@@ -56,4 +56,5 @@ export class GO_URLS {
static chunkCheck = prefix_go + '/api/file/chunk/check'; // 检查分块
static chunkUpload = prefix_go + '/api/file/chunk/upload'; // 分块上传
static chunkMerge = prefix_go + '/api/file/chunk/merge'; // 合并分块
static token = prefix_go + '/api/user/demo/token'; // token
}
......@@ -2,25 +2,29 @@
<div>login</div>
</template>
<script lang="ts">
import {Component, Vue} from "vue-property-decorator";
// let UrlPrefixObj = require("@/config/UrlPrefix");
import {GO_URLS} from "@/config/URLS";
import { Component, Vue } from "vue-property-decorator";
@Component({
components: {
},
components: {},
})
export default class signIn extends Vue {
public async created() {
const id = this.$route.query.userId;
const id = this.$route.query.userId ? this.$route.query.userId : '133124';
const res = await this.$ajax({
type: "post",
url: 'http://124.71.144.118:46789/api/user/demo/token',
url: GO_URLS.token,
params: { id },
});
if (res) {
sessionStorage.setItem(`user`, JSON.stringify({
id,
token: res.data.token
}));
sessionStorage.setItem(
`user`,
JSON.stringify({
id,
token: res.data.token,
})
);
this.$router.push({ path: "/categoryManage" });
}
}
......
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