|
@@ -209,6 +209,7 @@
|
|
|
},
|
|
|
head(){
|
|
|
return {
|
|
|
+ SystemWidthFlag:false,// 判断是否是手机端,默认为false,默认为PC端
|
|
|
title: '课程资源_学习平台_精品课程资源开发建设_学习平台开发建设',
|
|
|
meta: [
|
|
|
{
|
|
@@ -224,6 +225,16 @@
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
+ // 判断是否为移动端
|
|
|
+ getSystemWidth(){
|
|
|
+ var browserWidth=document.documentElement.clientWidth;
|
|
|
+ if(browserWidth <= 768){
|
|
|
+ this.SystemWidthFlag = true;
|
|
|
+ }else{
|
|
|
+ this.SystemWidthFlag = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
// 滑块
|
|
|
sliderFun() {
|
|
|
const nc_token = [this.appKey, (new Date()).getTime(), Math.random()].join(':');
|
|
@@ -302,8 +313,13 @@
|
|
|
},
|
|
|
|
|
|
applyFun() {
|
|
|
- this.telDl = true;
|
|
|
- this.sliderFun();
|
|
|
+ this.getSystemWidth();
|
|
|
+ if(this.SystemWidthFlag){
|
|
|
+ this.$router.push({ name: 'CourseDevelopPhone', query: {pageName: 'resources',} });
|
|
|
+ }else {
|
|
|
+ this.telDl = true;
|
|
|
+ this.sliderFun();
|
|
|
+ }
|
|
|
},
|
|
|
delDlClose(){
|
|
|
this.telDl =false
|
|
@@ -456,6 +472,7 @@
|
|
|
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.getSystemWidth();
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
},
|