Browse Source

Merge branch 'master' into dev

zhuliu 1 year ago
parent
commit
c0c91c73e8

+ 31 - 4
app.js

@@ -22,8 +22,8 @@ App({
     that.globalData.menuHeight = menuButtonInfo.height;
     that.globalData.menuWidth = menuButtonInfo.width;
     wx.setStorageSync('height', that.globalData.navBarHeight)
-    this.getPersonRights()//获取用户权益
-
+    this.getPersonRights()
+    this.checkVersion()
     //静态图片地址
     var Path = {
       develop: {
@@ -65,6 +65,33 @@ App({
       }
     })
   },
-
- 
+  checkVersion(){
+    const updateManager = wx.getUpdateManager()  
+    updateManager.onCheckForUpdate(function (res) {  
+      // 请求完新版本信息的回调  
+      if (res.hasUpdate) {  
+        // 有新版本  
+        updateManager.onUpdateReady(function () {  
+          wx.showModal({  
+            title: '更新提示',  
+            content: '新版本已经准备好,是否立即重启应用?',  
+            success: function (res) {  
+              if (res.confirm) {  
+                // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启  
+                updateManager.applyUpdate()  
+              }  
+            }  
+          })  
+        })  
+      
+        updateManager.onUpdateFailed(function () {  
+          // 新版本下载失败  
+          wx.showModal({  
+            title: '更新提示',  
+            content: '新版本下载失败,请您删除当前小程序,到微信 “发现-小程序” 页,重新搜索打开呦~',  
+          })  
+        })  
+      }  
+    })
+  }
 })

+ 4 - 1
myComponents/scrollView/scrollView.js

@@ -69,6 +69,9 @@ Component({
       // if(!a){
       //   return 
       // }
+      if(this.properties.triggered){
+        return
+      }
       if(this.data.hasMore){
         this.triggerEvent('loadMore')
         return
@@ -86,7 +89,7 @@ Component({
         self.setData({
           show: false,
         })
-      }, 2000);
+      }, 1000);
     }
   },
 

+ 7 - 3
pages/collectPatent/collectPatent.wxml

@@ -7,8 +7,9 @@
     <text>我的收藏专利</text>
   </view>
   <view class="main">
-    <my-scroll-view wx:if="{{tableData.length>0}}" triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 300rpx)">
-      <block wx:for="{{tableData}}" wx:key="index">
+    <my-scroll-view triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 300rpx)">
+    <view  wx:if="{{tableData.length>0}}">
+      <block  wx:for="{{tableData}}" wx:key="index">
           <myCard edit="{{false}}">
             <view slot="head_left">
               <van-tag round color="#3f395c">{{index+ 1}}</van-tag>  专利号:<text class="link" data-patentNo="{{item.patentNo}}" catch:tap="checkPatentDetail">{{item.patentNo}} </text>
@@ -39,7 +40,10 @@
             </view>
           </myCard>
         </block>
+    </view>
+      
+       <van-empty wx:else description="暂无数据" /> 
     </my-scroll-view>
-    <van-empty wx:else description="暂无数据" />
+   
   </view>
 </view>

+ 4 - 3
pages/hotProduct/hotProduct.wxml

@@ -18,8 +18,9 @@
       <text>黑名单</text>
     </view>
   </view>
-  <my-scroll-view wx:if="{{tableData.length>0}}" triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 260rpx)">
-    <myProduct tableData="{{tableData}}"></myProduct>
+  <my-scroll-view  triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 260rpx)">
+    <myProduct wx:if="{{tableData.length>0}}" tableData="{{tableData}}"></myProduct>
+    <van-empty wx:else description="暂无数据" />
   </my-scroll-view>
-  <van-empty wx:else description="暂无数据" />
+ 
 </view>

+ 4 - 3
pages/monitor/monitor.wxml

@@ -7,10 +7,11 @@
     <text>我的监控</text>
   </view>
   <view class="main">
-    <my-scroll-view wx:if="{{tableData.length>0}}" triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 300rpx)">
-      <myProduct tableData="{{tableData}}" menu="{{menu}}" bindclick="click"></myProduct>
+    <my-scroll-view  triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 300rpx)">
+      <myProduct wx:if="{{tableData.length>0}}" tableData="{{tableData}}"></myProduct>
+      <van-empty wx:else description="暂无数据" />
     </my-scroll-view>
-    <van-empty wx:else description="暂无数据" />
+    
   </view>
   
   

+ 5 - 3
pages/myFollow/myFollow.wxml

@@ -16,8 +16,10 @@
   </view>
   </view>
   <view class="main myFollow">
-    <my-scroll-view wx:if="{{tableData.length>0}}" triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 320rpx)">
-      <myProduct tableData="{{tableData}}" isFollow="{{true}}" menu="{{menu}}" bindcancelFollow="cancelFollow"></myProduct>
+
+    <my-scroll-view  triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 320rpx)">
+      <myProduct wx:if="{{tableData.length>0}}" tableData="{{tableData}}" isFollow="{{true}}" bindcancelFollow="cancelFollow"></myProduct>
+      <van-empty wx:else description="暂无数据" />
     </my-scroll-view>
-    <van-empty wx:else description="暂无数据" />
+    
   </view>

+ 4 - 3
pages/myWork/myWork.wxml

@@ -9,8 +9,8 @@
   </view>
 </view>
 
-  <my-scroll-view wx:if="{{tableData.length>0}}" triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 280rpx)">
-    <view class="main myWork">
+  <my-scroll-view  triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 280rpx)">
+    <view wx:if="{{tableData.length>0}}" class="main myWork">
     <block wx:for="{{tableData}}" wx:for-item="item" wx:key="index">
       <myCard menu="{{menu}}" data="{{item}}" index="{{index}}" edit="{{(item.ticketProgress == 4 || item.ticketProgress == 5)?false:true}}" bindvalue='clickMenu'>
         <view slot="head_left" class="head_left">
@@ -120,5 +120,6 @@
       </myCard>
     </block>
   </view>
-  </my-scroll-view>
   <van-empty wx:else description="暂无数据" />
+  </my-scroll-view>
+

+ 4 - 3
pages/searchRecords/searchRecords.wxml

@@ -7,8 +7,8 @@
     <text>检索记录</text>
   </view>
 </view>
-<my-scroll-view wx:if="{{tableData.length>0}}" triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 300rpx)">
-  <view class="main searchRecords">
+<my-scroll-view triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 300rpx)">
+  <view  wx:if="{{tableData.length>0}}" class="main searchRecords">
     <block wx:for="{{tableData}}" wx:key="index">
       <myCard edit="{{false}}" menu="{{menu}}" data="{{item}}" index="{{index}}" bindvalue='clickMenu'>
         <view slot="head_left" class="head_left">
@@ -37,5 +37,6 @@
       </myCard>
     </block>
   </view>
-  </my-scroll-view>
   <van-empty wx:else description="暂无数据" />
+  </my-scroll-view>
+