This commit is contained in:
lll 2023-11-11 17:51:05 +08:00
parent 1024847b5d
commit edae32b8f0
5 changed files with 21 additions and 14 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -1,6 +1,6 @@
import axios from "axios"; import axios from "axios";
axios.defaults.baseURL = "http://inspur.dev.umayle.com/"; axios.defaults.baseURL = "http://inspur.dev.umayle.com/";
// //
export const SaveUserAnswer = (data) => { export const SaveUserAnswer = (data) => {
return axios.post( return axios.post(
`/Handler/Config.ashx?action=updatecache&mark=${data.mark}&user_id=${data.user_id}&mark_value=${data.mark_value}&step=${data.step}` `/Handler/Config.ashx?action=updatecache&mark=${data.mark}&user_id=${data.user_id}&mark_value=${data.mark_value}&step=${data.step}`

View File

@ -167,6 +167,7 @@
<script> <script>
import { SaveUserAnswer, GetUserAnswer } from "@/api/user"; import { SaveUserAnswer, GetUserAnswer } from "@/api/user";
import { isValidPrimaryDNS } from "../validate"; import { isValidPrimaryDNS } from "../validate";
import { Alert } from "element-ui";
export default { export default {
data() { data() {
return { return {
@ -255,8 +256,9 @@ export default {
}; };
}, },
methods: { methods: {
getParameter(data) { getParameter1(data) {
console.log(data); alert(data, "信息");
console.log(data, "信息");
this.user_id = data; this.user_id = data;
}, },
// //
@ -327,6 +329,7 @@ export default {
} }
}, },
async GetUserAnswer() { async GetUserAnswer() {
this.loading = true;
let answers = await GetUserAnswer({ let answers = await GetUserAnswer({
mark: "CKFWQ_yx", mark: "CKFWQ_yx",
user_id: this.user_id, user_id: this.user_id,
@ -361,6 +364,7 @@ export default {
this.ippz_dns_by4 = obj.ippz_dns_by.split(".")[3]; this.ippz_dns_by4 = obj.ippz_dns_by.split(".")[3];
} }
} }
this.loading = false;
}, },
submitForm() { submitForm() {
this.$refs["ruleForm"].validate((valid) => { this.$refs["ruleForm"].validate((valid) => {
@ -522,11 +526,13 @@ export default {
}, },
}, },
created() { created() {
let that = this; this.user_id = window.location.href.split("?")[1];
window.getParameter = that.getParameter; alert(this.user_id, "信息111111111111111111111");
this.Loading = true; console.log(this.user_id, "信息1111111111111111111");
this.GetUserAnswer(); this.GetUserAnswer();
this.Loading = false; },
destroyed() {
window.getParameter = null;
}, },
}; };
</script> </script>

View File

@ -178,8 +178,9 @@ export default {
}; };
}, },
methods: { methods: {
getParameter(data) { getParameter2(data) {
console.log(data); alert(data, "信息11");
console.log(data, "信息111111");
this.user_id = data; this.user_id = data;
}, },
// //
@ -230,9 +231,7 @@ export default {
this.loading = false; this.loading = false;
}, },
// //
getParameter(data) {
console.log(data);
},
submitForm(formName) { submitForm(formName) {
this.$refs["ruleForm"].validate((valid) => { this.$refs["ruleForm"].validate((valid) => {
if (valid) { if (valid) {
@ -245,8 +244,9 @@ export default {
}, },
}, },
created() { created() {
let that = this; this.user_id = window.location.href.split("?")[1];
window.getParameter = that.getParameter; alert(this.user_id, "信息111111111111111111111");
console.log(this.user_id, "信息1111111111111111111");
this.GetUserAnswer(); this.GetUserAnswer();
}, },
}; };

View File

@ -17,6 +17,7 @@ Vue.filter("datefmt", function (input, fmtstring) {
Vue.prototype.$moment = moment; Vue.prototype.$moment = moment;
Vue.prototype.$store = store; Vue.prototype.$store = store;
Vue.prototype.$answerObj = answerObj; Vue.prototype.$answerObj = answerObj;
Vue.use(ElementUI); Vue.use(ElementUI);
new Vue({ new Vue({
router, router,