tanyanfei 3 年之前
父节点
当前提交
6492a5ca8f
共有 1 个文件被更改,包括 6 次插入6 次删除
  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
+      })
+    })
   },
 
   /**