|
@@ -27,8 +27,8 @@
|
|
|
class="card"
|
|
|
v-for="item in articledata"
|
|
|
:key="item.id">
|
|
|
- <img :src="item.cover_url"
|
|
|
- alt="">
|
|
|
+ <p style="width: 20vw; height: 20vw;"> <img style="width: 100%; height: 100%; " :src="item.cover_url"
|
|
|
+ alt=""></p>
|
|
|
<div class="cardtit">
|
|
|
<h4>{{ item.title }}</h4>
|
|
|
<p>{{ item.intro }}</p>
|
|
@@ -69,28 +69,28 @@ export default {
|
|
|
Swipe, SwipeItem, Tab, Tabs, List,
|
|
|
},
|
|
|
async created () {
|
|
|
- let auth_code = "";
|
|
|
- if (this.$route.query.auth_code) {
|
|
|
- auth_code = this.$route.query.auth_code
|
|
|
- }
|
|
|
- if (!auth_code) {
|
|
|
- let userid = sessionStorage.getLocalstorage("user_id");
|
|
|
- if (userid && userid !== undefined && userid !== "") {
|
|
|
- this.myId = userid
|
|
|
- } else {
|
|
|
- this.$router.push({ name: 'GetUserIndex' })
|
|
|
- }
|
|
|
- } else {
|
|
|
- let result = await getUser_Id(auth_code);
|
|
|
- if (result.code !== 2000) {
|
|
|
- Toast(result.msg)
|
|
|
- return false
|
|
|
- }
|
|
|
- let { user_id } = result.data;
|
|
|
- this.myId = user_id;
|
|
|
- sessionStorage.setLocalstorage('user_id', user_id);
|
|
|
- }
|
|
|
- // this.myId ='WeiQiJia';
|
|
|
+ // let auth_code = "";
|
|
|
+ // if (this.$route.query.auth_code) {
|
|
|
+ // auth_code = this.$route.query.auth_code
|
|
|
+ // }
|
|
|
+ // if (!auth_code) {
|
|
|
+ // let userid = sessionStorage.getLocalstorage("user_id");
|
|
|
+ // if (userid && userid !== undefined && userid !== "") {
|
|
|
+ // this.myId = userid
|
|
|
+ // } else {
|
|
|
+ // this.$router.push({ name: 'GetUserIndex' })
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // let result = await getUser_Id(auth_code);
|
|
|
+ // if (result.code !== 2000) {
|
|
|
+ // Toast(result.msg)
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ // let { user_id } = result.data;
|
|
|
+ // this.myId = user_id;
|
|
|
+ // sessionStorage.setLocalstorage('user_id', user_id);
|
|
|
+ // }
|
|
|
+ this.myId ='WeiQiJia';
|
|
|
|
|
|
},
|
|
|
mounted () {
|
|
@@ -154,7 +154,6 @@ export default {
|
|
|
.van-tabs__wrap {
|
|
|
height: 3rem !important;
|
|
|
}
|
|
|
-
|
|
|
.van-tab {
|
|
|
line-height: 5rem;
|
|
|
font-size: 1.4rem;
|
|
@@ -203,37 +202,50 @@ export default {
|
|
|
.card {
|
|
|
margin-top: 2rem;
|
|
|
width: 100%;
|
|
|
- height: 15rem;
|
|
|
+ // height: 8rem;
|
|
|
display: flex;
|
|
|
margin-bottom: 5vw;
|
|
|
- justify-content: space-between;
|
|
|
+ // justify-content: space-between;
|
|
|
|
|
|
.cardtit {
|
|
|
- width: 57%;
|
|
|
+ width: 70%;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
- justify-content: space-between;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding-left: 2vw;
|
|
|
|
|
|
h4 {
|
|
|
color: black;
|
|
|
font-size: 1.4rem;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-line-clamp: 1;
|
|
|
+ /* 显示两行文本 */
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
p:nth-child(2) {
|
|
|
font-size: 1.4rem;
|
|
|
color: gray;
|
|
|
display: -webkit-box;
|
|
|
- -webkit-line-clamp: 2;
|
|
|
+ -webkit-line-clamp: 1;
|
|
|
/* 显示两行文本 */
|
|
|
-webkit-box-orient: vertical;
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding-top: 3vw;
|
|
|
}
|
|
|
|
|
|
p:nth-child(3) {
|
|
|
font-size: 1.2rem;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding-top: 3vw;
|
|
|
}
|
|
|
}
|
|
|
|