|
@@ -10,23 +10,21 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="two">
|
|
|
- <view class="two_1" v-if="list&&list.length>0">
|
|
|
- <scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
|
|
|
- <view class="list-scroll-view">
|
|
|
- <view class="list" v-for="(item, index) in list" :key="index">
|
|
|
- <view class="other">
|
|
|
- <view class="other_1">积分: <text class="integral">{{item.point}}</text></view>
|
|
|
- <view class="other_1">状态: <text>{{item.zhStatus}}</text></view>
|
|
|
- <view class="other_1">来源: <text>{{item.zhSource}}</text></view>
|
|
|
- <view class="other_1">时间: <text>{{item.time}}</text></view>
|
|
|
- </view>
|
|
|
+ <scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
|
|
|
+ <view class="list-scroll-view">
|
|
|
+ <view class="list" v-for="(item, index) in list" :key="index">
|
|
|
+ <view class="other">
|
|
|
+ <view class="other_1">积分: <text class="integral">{{item.point}}</text></view>
|
|
|
+ <view class="other_1">状态: <text>{{item.zhStatus}}</text></view>
|
|
|
+ <view class="other_1">来源: <text>{{item.zhSource}}</text></view>
|
|
|
+ <view class="other_1">时间: <text>{{item.time}}</text></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </scroll-view>
|
|
|
- </view>
|
|
|
- <view class="two_2" v-else>
|
|
|
- 已加载完全部
|
|
|
- </view>
|
|
|
+ <view class="is_bottom" v-if="is_bottom">
|
|
|
+ <text>{{config.bottom_title}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</mobile-frame>
|
|
@@ -36,6 +34,8 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 系统设置
|
|
|
+ config: {},
|
|
|
user: {},
|
|
|
integral: '',
|
|
|
list: [],
|
|
@@ -47,14 +47,31 @@
|
|
|
statusList: [],
|
|
|
// 来源
|
|
|
sourceList: [],
|
|
|
+ // 数据是否触底
|
|
|
+ is_bottom: false,
|
|
|
+ scrollTop: 0,
|
|
|
};
|
|
|
},
|
|
|
onShow: async function() {
|
|
|
const that = this;
|
|
|
+ that.searchConfig();
|
|
|
await that.searchOther();
|
|
|
await that.watchLogin();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 查询基本设置
|
|
|
+ searchConfig() {
|
|
|
+ const that = this;
|
|
|
+ uni.getStorage({
|
|
|
+ key: 'config',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.data) that.$set(that, `config`, res.data)
|
|
|
+ },
|
|
|
+ fail: function(err) {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
watchLogin() {
|
|
|
const that = this;
|
|
|
uni.getStorage({
|
|
@@ -113,6 +130,7 @@
|
|
|
that.$set(that, `sourceList`, res.data)
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
// 分页
|
|
|
toPage(e) {
|
|
|
const that = this;
|
|
@@ -129,10 +147,14 @@
|
|
|
that.$set(that, `skip`, skip)
|
|
|
that.search();
|
|
|
uni.hideLoading();
|
|
|
- } else uni.showToast({
|
|
|
- title: '没有更多数据了',
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
+ } else that.$set(that, `is_bottom`, true)
|
|
|
+ },
|
|
|
+ toScroll(e) {
|
|
|
+ const that = this;
|
|
|
+ let up = that.scrollTop;
|
|
|
+ that.$set(that, `scrollTop`, e.detail.scrollTop);
|
|
|
+ let num = Math.sign(up - e.detail.scrollTop);
|
|
|
+ if (num == 1) that.$set(that, `is_bottom`, false);
|
|
|
},
|
|
|
// 清空列表
|
|
|
clearPage() {
|
|
@@ -186,40 +208,30 @@
|
|
|
flex-grow: 1;
|
|
|
padding: 2vw 0 0 0;
|
|
|
|
|
|
- .two_1 {
|
|
|
- .list {
|
|
|
- width: 92vw;
|
|
|
- border: 0.5vw solid var(--f1Color);
|
|
|
- margin: 2vw 2vw 0 1.5vw;
|
|
|
- padding: 2vw;
|
|
|
- border-radius: 5px;
|
|
|
-
|
|
|
- .other {
|
|
|
- .other_1 {
|
|
|
- font-size: var(--font16Size);
|
|
|
- margin: 0 0 1vw 0;
|
|
|
-
|
|
|
- .integral {
|
|
|
- color: #ff0000;
|
|
|
- }
|
|
|
-
|
|
|
- text {
|
|
|
- margin: 0 0 0 2vw;
|
|
|
- color: var(--f85Color);
|
|
|
- font-size: var(--font14Size);
|
|
|
- }
|
|
|
+ .list {
|
|
|
+ width: 92vw;
|
|
|
+ border: 0.5vw solid var(--f1Color);
|
|
|
+ margin: 2vw 2vw 0 1.5vw;
|
|
|
+ padding: 2vw;
|
|
|
+ border-radius: 5px;
|
|
|
+
|
|
|
+ .other {
|
|
|
+ .other_1 {
|
|
|
+ font-size: var(--font16Size);
|
|
|
+ margin: 0 0 1vw 0;
|
|
|
+
|
|
|
+ .integral {
|
|
|
+ color: #ff0000;
|
|
|
+ }
|
|
|
+
|
|
|
+ text {
|
|
|
+ margin: 0 0 0 2vw;
|
|
|
+ color: var(--f85Color);
|
|
|
+ font-size: var(--font14Size);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .two_2 {
|
|
|
- text-align: center;
|
|
|
- color: #858585;
|
|
|
- font-size: 14px;
|
|
|
- margin: 5vw 0;
|
|
|
- }
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -235,4 +247,15 @@
|
|
|
flex-direction: column;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .is_bottom {
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ text {
|
|
|
+ padding: 2vw 0;
|
|
|
+ display: inline-block;
|
|
|
+ color: #858585;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|