更新检验报告页面、版本号2.1.0(5)、首页活动改为下拉刷新
diff --git a/pages/sub_tabbar/active.vue b/pages/sub_tabbar/active.vue
index 3dfd6b1..3f6b446 100644
--- a/pages/sub_tabbar/active.vue
+++ b/pages/sub_tabbar/active.vue
@@ -119,27 +119,32 @@
totalPageOff: ""
}
},
- onShow() {
+ async onPullDownRefresh(){
let that = this
- // #ifdef APP-PLUS
- let stopShowTwice = uni.getStorageSync("stopShowTwice")
- if (stopShowTwice) {
- return false
- }
- // #endif
+ // // #ifdef APP-PLUS
+ // let stopShowTwice = uni.getStorageSync("stopShowTwice")
+ // if (stopShowTwice) {
+ // return false
+ // }
+ // // #endif
let token = uni.getStorageSync('token')
that.pagenoOn = 1
that.list[0].list = []
that.pagenoOff = 1
that.list[1].list = []
- that.getActivity(1, "OnlineActivities")
- that.getActivity(1, "OfflineActivities")
- // #ifdef APP-PLUS
- uni.setStorageSync("stopShowTwice", true)
- // #endif
+ await that.getActivity(1, "OnlineActivities")
+ await that.getActivity(1, "OfflineActivities")
+ // // #ifdef APP-PLUS
+ // uni.setStorageSync("stopShowTwice", true)
+ // // #endif
if (token) {
that.getIntegralStatus()
}
+ uni.stopPullDownRefresh()
+ },
+ onLoad() {
+ this.getActivity(1, "OnlineActivities")
+ this.getActivity(1, "OfflineActivities")
},
methods: {
getActivity(no, code) {
diff --git a/pages/sub_tabbar/index.vue b/pages/sub_tabbar/index.vue
index b410b23..a2f261e 100644
--- a/pages/sub_tabbar/index.vue
+++ b/pages/sub_tabbar/index.vue
@@ -142,7 +142,6 @@
}
},
onShow() {
- this.getActivityList()
},
methods: {
search(e) {
@@ -158,27 +157,18 @@
// #ifndef H5
// 只允许通过相机扫码
uni.scanCode({
- // onlyFromCamera: true,
- // scanType: ['qrCode',"barCode","datamatrix","pdf417"],
success: function(res) {
- //uni.vibrate({})
- //console.log('条码类型:' + res.scanType);
- //console.log('条码内容:' + res.result);
let url = res.result
uni.showToast({
title: "扫描成功",
icon: "none",
duration: 800,
complete() {
- // setTimeout(() => {
- // uni.navigateTo({
- // url: "/pages/sub_index/scanView/index?url=" + url
- // })
- // }, 1500)
let param = {
url: url
}
that.$u.get('/v1/qrcode/auth', param).then(ret => {
+ //console.log(ret.data.url)
if (ret.data.permit) {
if (ret.data.action == 'water') {
setTimeout(() => {
@@ -285,6 +275,10 @@
// #endif
+ },
+ async onPullDownRefresh(){
+ await this.getActivityList()
+ uni.stopPullDownRefresh()
}
}
</script>