Skip to content

Commit 1f1f10c

Browse files
committed
修复手机版某些bug
1 parent 3ae6009 commit 1f1f10c

File tree

6 files changed

+20
-22
lines changed

6 files changed

+20
-22
lines changed

Frontend/src/components/problem/problemdetail.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ export default {
303303
})
304304
.then(res => {
305305
this.imgcode = res.data;
306-
console.log(res);
307-
console.log(res.data);
308306
});
309307
310308

FrontendMobile/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"axios": "<0.18.0",
1414
"codemirror": "^5.44.0",
1515
"echarts": "^4.2.1",
16-
"element-ui": "^2.12.0",
16+
"element-ui": "~2.12.0",
1717
"html-webpack-plugin": "^3.2.0",
1818
"js-md5": "^0.7.3",
1919
"mavon-editor": "^2.7.3",

FrontendMobile/src/components/problem/problemdetail.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

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

1517
<mu-card-text>
@@ -125,6 +127,7 @@ export default {
125127
theme: "base16-light",
126128
lineNumbers: true
127129
},
130+
imgcode: "",
128131
title: "",
129132
des: "",
130133
input: "",
@@ -201,6 +204,17 @@ export default {
201204
response.data["addtime"]
202205
).format("YYYY-MM-DD HH:mm:ss");
203206
207+
this.$axios
208+
.get("/showpic/", {
209+
params: {
210+
ProblemId: this.ID
211+
}
212+
})
213+
.then(res => {
214+
this.imgcode = res.data;
215+
});
216+
217+
204218
this.oj = response.data.oj;
205219
this.source = response.data.source;
206220
this.time = response.data.time + "MS";

FrontendMobile/src/components/utils/welcomemessage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<mu-card>
33
<mu-card-title :title="'Welcome to '+school"></mu-card-title>
44
<mu-card-text>
5-
<b>Mobile Version:1.0</b>
5+
<b>Mobile Version:1.1</b>
66
<br />
77
<h3>
88
<a

FrontendMobile/src/login.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default {
4949
this.dialogLoginVisible = false;
5050
5151
this.$axios
52-
.post("/userlogindata/", {
52+
.post("/setlogindata/", {
5353
username: this.form.username,
5454
ip: this.$store.state.loginip,
5555
msg: this.$store.state.logininfo

FrontendMobile/src/main.js

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ Vue.prototype.$axios = axios;
3333

3434
const store = new Vuex.Store({
3535
state: {
36-
loginip:""
36+
loginip:"",
37+
logininfo:"",
3738
},
3839
})
3940

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

74-
function getYourIP(){
75-
76-
store.state.loginip='mobile';
77-
78-
}
79-
80-
81-
try {
82-
getYourIP()
83-
store.state.logininfo = 'mobile'
84-
} catch (error) {
85-
console.log(error)
86-
}
8775

8876

8977

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

0 commit comments

Comments
 (0)