Skip to content

Commit

Permalink
修复手机版某些bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Linzecong committed Mar 22, 2020
1 parent 3ae6009 commit 1f1f10c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 22 deletions.
2 changes: 0 additions & 2 deletions Frontend/src/components/problem/problemdetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,6 @@ export default {
})
.then(res => {
this.imgcode = res.data;
console.log(res);
console.log(res.data);
});
Expand Down
2 changes: 1 addition & 1 deletion FrontendMobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"axios": "<0.18.0",
"codemirror": "^5.44.0",
"echarts": "^4.2.1",
"element-ui": "^2.12.0",
"element-ui": "~2.12.0",
"html-webpack-plugin": "^3.2.0",
"js-md5": "^0.7.3",
"mavon-editor": "^2.7.3",
Expand Down
14 changes: 14 additions & 0 deletions FrontendMobile/src/components/problem/problemdetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

<mu-card-text>
<div style="word-break:break-all;white-space:pre-line;" v-html="des" :key="des"></div>
<img :src="'data:image/jpeg;base64,'+imgcode"
class="img-responsive" v-if="imgcode!=''">
</mu-card-text>

<mu-card-text>
Expand Down Expand Up @@ -125,6 +127,7 @@ export default {
theme: "base16-light",
lineNumbers: true
},
imgcode: "",
title: "",
des: "",
input: "",
Expand Down Expand Up @@ -201,6 +204,17 @@ export default {
response.data["addtime"]
).format("YYYY-MM-DD HH:mm:ss");
this.$axios
.get("/showpic/", {
params: {
ProblemId: this.ID
}
})
.then(res => {
this.imgcode = res.data;
});
this.oj = response.data.oj;
this.source = response.data.source;
this.time = response.data.time + "MS";
Expand Down
2 changes: 1 addition & 1 deletion FrontendMobile/src/components/utils/welcomemessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<mu-card>
<mu-card-title :title="'Welcome to '+school"></mu-card-title>
<mu-card-text>
<b>Mobile Version:1.0</b>
<b>Mobile Version:1.1</b>
<br />
<h3>
<a
Expand Down
2 changes: 1 addition & 1 deletion FrontendMobile/src/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
this.dialogLoginVisible = false;
this.$axios
.post("/userlogindata/", {
.post("/setlogindata/", {
username: this.form.username,
ip: this.$store.state.loginip,
msg: this.$store.state.logininfo
Expand Down
20 changes: 3 additions & 17 deletions FrontendMobile/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ Vue.prototype.$axios = axios;

const store = new Vuex.Store({
state: {
loginip:""
loginip:"",
logininfo:"",
},
})

Expand Down Expand Up @@ -71,19 +72,6 @@ if (sessionStorage.username != ""&&sessionStorage.username!=undefined) {
sessionStorage.setItem("acpro", "");
}

function getYourIP(){

store.state.loginip='mobile';

}


try {
getYourIP()
store.state.logininfo = 'mobile'
} catch (error) {
console.log(error)
}



Expand All @@ -95,9 +83,7 @@ new Vue({
template: '<App/>',
render: h => h(App),
created() {
if(this.$store.state.loginip.indexOf("请使用主流浏览器")>=0){
this.$toast.success("推荐使用主流浏览器,例如Chrome,Firefox,Opera,Safari等,如果是360浏览器,请关闭极速模式!")
}

}
})

0 comments on commit 1f1f10c

Please sign in to comment.