tanyanfei 3 years ago
parent
commit
6492a5ca8f
1 changed files with 6 additions and 6 deletions
  1. 6 6
      pages/choice/choice.js

+ 6 - 6
pages/choice/choice.js

@@ -14,11 +14,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-    $api.getChoice().then(res=>{
-      this.setData({
-        myList: res.data.data.list
-      })
-    })
+    
   },
 
   /**
@@ -32,7 +28,11 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow() {
-
+    $api.getChoice().then(res=>{
+      this.setData({
+        myList: res.data.data.list
+      })
+    })
   },
 
   /**