+
@@ -22,17 +22,29 @@
-
+
-
【{{ nav.name }}】手机二维码
-
-
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
@@ -49,6 +61,7 @@ export default {
data() {
return {
imageCode: '',
+ dialogVisible:false,
}
},
mounted() {
@@ -59,29 +72,35 @@ export default {
},
computed: {},
methods: {
- getQR(url_id, icon_url) {
+ handleClose(){
+ this.dialogVisible=false;
+ },
+ openShowQR(id){
+ this.dialogVisible=true;
+ this.getQR(id);
+ },
+ getQR(url_id) {
let _this = this;
- if(url_id && icon_url){
+ if(url_id){
axios({
method: 'post',
url: '/api/qrcode/qrc_return',
- data: {
+ params: {
url_id: url_id,
- icon_url: icon_url
}
}).then(function (res) {
- if (res.data) {
+ if (res.data!==''){
_this.imageCode = "data:image/jpg;base64," + res.data;
}
- return false;
+
+
}).catch((error) => {
- Vue.prototype.$notify.error({
- title: '错误',
- message: error === null ? '' : error,
- offset: 0
- });
+ // Vue.prototype.$notify.error({
+ // title: '错误',
+ // message: error === null ? '' : error,
+ // offset: 0
+ // });
})
- return this.imageCode
}else{
return false
}
diff --git a/src/components/hotNews/HotNews.vue b/src/components/hotNews/HotNews.vue
index b1c1a57..989f053 100644
--- a/src/components/hotNews/HotNews.vue
+++ b/src/components/hotNews/HotNews.vue
@@ -2,12 +2,47 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -26,31 +61,36 @@ export default {
category: [
{
- name:'百度热搜榜',
- childUC:[],
+ name: '百度热搜榜',
+ childUC: [],
},
{
- name:'抖音热搜榜',
- childUC:[],
+ name: '抖音热搜榜',
+ childUC: [],
},
{
- name:'微博热搜榜',
- childUC:[],
+ name: '微博热搜榜',
+ childUC: [],
},
{
- name:'知乎热搜榜',
- childUC:[],
+ name: '知乎热搜榜',
+ childUC: [],
},
{
- name:'哔哩哔哩热搜榜',
- childUC:[],
+ name: '哔哩哔哩热搜榜',
+ childUC: [],
},
{
- name:'今日头条热搜榜',
- childUC:[],
+ name: '今日头条热搜榜',
+ childUC: [],
},
- ],
- loading: true,
+ ],
+ loading1: true,
+ loading2: true,
+ loading3: true,
+ loading4: true,
+ loading5: true,
+ loading6: true,
baidu: {
title: "百度热搜榜",
hot: [],
@@ -100,8 +140,61 @@ export default {
},
computed: {},
methods: {
+ refresh1() {
+ this.loading1=true;
+ this.baidu.hot=[];
+ setTimeout(()=>{
+ this.loading1=false
+ },3000)
+ this.getBaiDuHot();
+ },
+ refresh2() {
+ this.loading2=true;
+ this.douying.hot=[];
+ setTimeout(()=>{
+ this.loading2=false
+ },3000)
+ this.getDouyingHot();
+ },
+ refresh3() {
+ this.loading3=true;
+ this.weibo.hot=[];
+ setTimeout(()=>{
+ this.loading3=false
+ },3000)
+ this.getWeiBoHot();
+ },
+ refresh4() {
+ this.loading4=true;
+ this.zhihu.hot=[];
+ setTimeout(()=>{
+ this.loading4=false
+ },3000)
+ this.getZhiHuHot();
+ },
+ refresh5() {
+ this.loading5=true;
+ this.bili.hot=[];
+ setTimeout(()=>{
+ this.loading5=false
+ },3000)
+ this.getBiliHot();
+ },
+ refresh6() {
+ this.loading6=true;
+ this.toutiao.hot=[];
+ setTimeout(()=>{
+ this.loading6=false
+ },3000)
+ this.getTouTiaoHot();
+ },
getPath() {
- document.querySelector(this.$route.query.name).scrollIntoView(true)
+ if (this.$route.query.name) {
+ document.querySelector(this.$route.query.name).scrollIntoView(true)
+ } else {
+ return false;
+ }
+
},
getBaiDuHot() {
let _this = this;
@@ -116,16 +209,16 @@ export default {
offset: 0
});
} else {
- _this.loading = false;
+ _this.loading1 = false;
_this.baidu.hot = res.data.data;
}
}).catch((error) => {
- Vue.prototype.$notify.error({
- title: '错误',
- message: error,
- offset: 0
- });
+ // Vue.prototype.$notify.error({
+ // title: '错误',
+ // message: error,
+ // offset: 0
+ // });
})
},
getDouyingHot() {
@@ -142,15 +235,15 @@ export default {
});
} else {
_this.douying.hot = res.data.data;
- _this.loading = false;
+ _this.loading2 = false;
}
}).catch((error) => {
- Vue.prototype.$notify.error({
- title: '错误',
- message: error,
- offset: 0
- });
+ // Vue.prototype.$notify.error({
+ // title: '错误',
+ // message: error,
+ // offset: 0
+ // });
})
},
getWeiBoHot() {
@@ -167,15 +260,15 @@ export default {
});
} else {
_this.weibo.hot = res.data.data;
- _this.loading = false;
+ _this.loading3 = false;
}
}).catch((error) => {
- Vue.prototype.$notify.error({
- title: '错误',
- message: error,
- offset: 0
- });
+ // Vue.prototype.$notify.error({
+ // title: '错误',
+ // message: error,
+ // offset: 0
+ // });
})
},
getZhiHuHot() {
@@ -192,15 +285,15 @@ export default {
});
} else {
_this.zhihu.hot = res.data.data;
- _this.loading = false;
+ _this.loading4 = false;
}
}).catch((error) => {
- Vue.prototype.$notify.error({
- title: '错误',
- message: error,
- offset: 0
- });
+ // Vue.prototype.$notify.error({
+ // title: '错误',
+ // message: error,
+ // offset: 0
+ // });
})
},
getBiliHot() {
@@ -217,15 +310,15 @@ export default {
});
} else {
_this.bili.hot = res.data.data;
- _this.loading = false;
+ _this.loading5 = false;
}
}).catch((error) => {
- Vue.prototype.$notify.error({
- title: '错误',
- message: error,
- offset: 0
- });
+ // Vue.prototype.$notify.error({
+ // title: '错误',
+ // message: error,
+ // offset: 0
+ // });
})
},
getTouTiaoHot() {
@@ -242,15 +335,15 @@ export default {
});
} else {
_this.toutiao.hot = res.data.data;
- _this.loading = false;
+ _this.loading6 = false;
}
}).catch((error) => {
- Vue.prototype.$notify.error({
- title: '错误',
- message: error,
- offset: 0
- });
+ // Vue.prototype.$notify.error({
+ // title: '错误',
+ // message: error,
+ // offset: 0
+ // });
})
},
}
@@ -265,4 +358,30 @@ export default {
justify-content: flex-start;
overflow: scroll;
}
+
+
+.widget {
+ color: var(--theme-color);
+ background-color: var(--theme-bg-color);
+ border-radius: 1.0rem;
+ flex-direction: column;
+ height: 540px;
+ position: relative;
+ width: 300px;
+ margin-top: 20px;
+ margin-left: 25px;
+ flex-wrap: nowrap;
+ justify-content: space-between;
+
+}
+
+.refresh {
+//font-weight: bold; font-size: 18px
+}
+
+.refresh:hover {
+ font-size: 20px;
+ color: #999ba5;
+ cursor: pointer;
+}
\ No newline at end of file
diff --git a/src/components/hotNews/NewsCard.vue b/src/components/hotNews/NewsCard.vue
index dbe0274..7cca256 100644
--- a/src/components/hotNews/NewsCard.vue
+++ b/src/components/hotNews/NewsCard.vue
@@ -1,6 +1,6 @@
-