From b1a705e0f83e0d641b7aee5c455d24b64907bedc Mon Sep 17 00:00:00 2001
From: Gdpao <1341331954@qq.com>
Date: Mon, 17 Aug 2020 16:57:23 +0800
Subject: [PATCH] gdpao
---
App.vue | 8 +++++-
components/index/video-item/index.vue | 4 ++-
manifest.json | 4 +--
pageA/bindinges/bindinges.vue | 2 +-
pageB/components/userinfo/index.vue | 8 +++++-
pageB/details/index.vue | 36 +++++++++++++++++++++++++--
pageB/video/video.nvue | 34 ++++++++++++++++---------
pages/index/index.vue | 30 ++++++++++++++--------
8 files changed, 95 insertions(+), 31 deletions(-)
diff --git a/App.vue b/App.vue
index 5182421..dab60a9 100644
--- a/App.vue
+++ b/App.vue
@@ -18,8 +18,14 @@
})
// 刷新token
if (this.hasLogin) {
- this.refreshToken_function();
+ this.refreshToken_function();
}
+ // #ifdef APP-PLUS
+ //app关闭默认的启动 方法关闭启动图。但是这个时间不能太晚,6s 超时后依旧会主动关闭。
+ setTimeout(()=>{
+ plus.navigator.closeSplashscreen();
+ },3000)
+ // #endif
},
methods: {
...mapMutations(['loginIn']),
diff --git a/components/index/video-item/index.vue b/components/index/video-item/index.vue
index a9cfe18..27b5dbf 100644
--- a/components/index/video-item/index.vue
+++ b/components/index/video-item/index.vue
@@ -242,7 +242,9 @@ export default {
if(res.errCode == 0) {
this.$u.toast(res.message);
this.$emit("updateList");
- }
+ } else {
+ this.$u.toast(res.message);
+ }
})
},
toDetailsPage(id,type) {
diff --git a/manifest.json b/manifest.json
index 6916d64..7dc4eb3 100644
--- a/manifest.json
+++ b/manifest.json
@@ -11,8 +11,8 @@
"nvueCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
- "alwaysShowBeforeRender" : true,
- "waiting" : true,
+ "alwaysShowBeforeRender" : false,
+ "waiting" : false,
"autoclose" : true,
"delay" : 0
},
diff --git a/pageA/bindinges/bindinges.vue b/pageA/bindinges/bindinges.vue
index 549e2c5..7a95643 100644
--- a/pageA/bindinges/bindinges.vue
+++ b/pageA/bindinges/bindinges.vue
@@ -9,7 +9,7 @@
-
+ {{ is_sendcode ? time_count + "后可以重新发送" : "发送验证码" }}
diff --git a/pageB/components/userinfo/index.vue b/pageB/components/userinfo/index.vue
index 9f43448..c6e8df4 100644
--- a/pageB/components/userinfo/index.vue
+++ b/pageB/components/userinfo/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -238,6 +238,12 @@
cart: this.is_cart
});
},
+ gotoInfo(id) {
+ console.log(id);
+ uni.navigateTo({
+ url: "/pageB/details/index?id=" + id
+ })
+ },
// 冒泡
stopClick() {
}
diff --git a/pageB/details/index.vue b/pageB/details/index.vue
index 93196e3..b707a80 100644
--- a/pageB/details/index.vue
+++ b/pageB/details/index.vue
@@ -20,6 +20,7 @@
暂无数据
+
@@ -75,6 +76,13 @@ export default {
listInfo: [], // 列表详情
member_id: 0,
page: 1,
+ status: 'loadmore',
+ iconType: 'circle',
+ loadText: {
+ loadmore: '轻轻上拉',
+ loading: '努力加载中',
+ nomore: '实在没有了'
+ },
}
},
onLoad(option) {
@@ -84,6 +92,10 @@ export default {
this.getArticlelist();
},
+ onReachBottom() {
+ // this.page++;
+ this.getArticlelist();
+ },
methods:{
// 获取信息
getUserInfo(id) {
@@ -107,13 +119,27 @@ export default {
}).then(res => {
if (res.errCode == 0) {
// console.log(res);
- this.listInfo = res.data.list;
+ // this.listInfo = res.data.list;
// console.log(this.listInfo);
+ if (this.page == 1) {
+ this.listInfo = res.data.list;
+ this.status = "loadmore";
+ } else if (res.data.length == 0 && this.page > 1) {
+ this.status = "nomore";
+ } else {
+ this.listInfo = this.listInfo.concat(res.data.list);
+ console.log(this.listInfo)
+ }
+ if (res.data.length == 0 && this.page > 1) {
+ } else {
+ this.page++;
+ }
} else {
console.log(res.message);
}
})
},
+
dianji(a){
console.log(a);
if(typeof a == "object"){
@@ -121,7 +147,13 @@ export default {
}else{
this.num = a
}
- this.getArticlelist();
+ if (a == 0) {
+ this.page = 1;
+ this.getArticlelist();
+ } else if (a == 1) {
+ this.page = 1;
+ this.getArticlelist();
+ }
}
}
}
diff --git a/pageB/video/video.nvue b/pageB/video/video.nvue
index f1a3dc8..1fc9a5e 100644
--- a/pageB/video/video.nvue
+++ b/pageB/video/video.nvue
@@ -1,28 +1,28 @@
-
+
视频
{{ time_count }}s
- @{{ list.member_nickname }}
+ @{{ list.member_nickname }}
-
+
{{ list.article_title }}
-
+
{{ list.article_content }}
-
+
{{ item.name }}
@@ -344,11 +344,7 @@
width: "750rpx",
height: res.screenHeight + "px",
}
- this.fixTop = "400rpx";
this.fixTop = res.screenHeight / 3;
- // #ifdef H5
- this.fixTop = 400 + 'rpx'
- // #endif
}
})
},
@@ -460,6 +456,9 @@
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
})
},
+ gotoInfo(id) {
+ console.log(id);
+ },
// 收起键盘
hideEdit() {},
// stop
@@ -476,8 +475,10 @@