1.app.vue
<template>
<div id="app"></div>
</template>
<script>
import sourceOS from "./mixins/sourceOS";
const ERROR_CODE = "ERRORCODE0000";
export default {
name: "Home",
mixins: [sourceOS],
components: {},
props: {},
data() {
return {};
},
watch: {},
computed: {},
methods: {
// 初始化短链
initShortURL() {
let parame1 = {
functionName: "userAppService",
methodName: "queryUserInfo",
originSource: {
OS: this.OS,
version: "H5_V1.0"
},
data: {
userId: this.getQueryString("urlId")
}
};
this.$post(JSON.stringify(parame1)).then(result => {
if (result.errorCode == ERROR_CODE) {
console.log("理财经理基本信息======>", result);
window.location.href="https://www.yihuisoft.com";
}
});
},
getQueryString(name) {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
let r = window.location.search.substr(1).match(reg);
if (r != null) {
return decodeURIComponent(r[2]);
}
return null;
}
},
created() {
this.initShortURL();
},
mounted() {}
};
</script>