浏览代码

添加onshow函数

306132416@qq.com 4 年之前
父节点
当前提交
b29eda34bd
共有 5 个文件被更改,包括 9 次插入4 次删除
  1. 1 0
      App.vue
  2. 1 1
      pages/activity/activity_deatil.vue
  3. 4 1
      pages/activity/index.vue
  4. 2 1
      pages/index/index.vue
  5. 1 1
      pages/policy/policy_rich_card.vue

+ 1 - 0
App.vue

@@ -59,6 +59,7 @@ export default {
 	  				getApp().globalData.open_id = res.data.data.openid;
 					getApp().globalData.user_status = res.data.data.status;
 					getApp().globalData.user_phone = res.data.data.phone;
+					uni.hideLoading()
 	  			}
 	  		},
 	  		fail: () => {

+ 1 - 1
pages/activity/activity_deatil.vue

@@ -227,7 +227,7 @@ export default {
             this.model.way = data.sponsor;
             // this.model.max_person = data.max_person;
             // this.model.person_count = data.person_count;
-                    this.model.max_person = 1;
+            this.model.max_person = 1;
             this.model.person_count = 2;
             this.model.share =
               parseInt(data.real_repost_count) +

+ 4 - 1
pages/activity/index.vue

@@ -143,7 +143,10 @@ export default {
     };
   },
   onLoad() {
-    this.getActive();
+    
+  },
+  onShow() {
+  	this.getActive();
   },
   methods: {
     bindPickerChange(e, op) {

+ 2 - 1
pages/index/index.vue

@@ -446,12 +446,13 @@ export default {
   },
   onShow() {
     uni.hideTabBar({});
+	this.getActive();
   },
   onLoad() {
+	uni.showLoading({});  
     this.getSwiperList();
     this.getPark();
     this.getNotice();
-    this.getActive();
     this.getAttract(); //招商接口
   },
   onShareAppMessage() {

+ 1 - 1
pages/policy/policy_rich_card.vue

@@ -79,7 +79,7 @@ export default {
 
 <style lang="scss" scoped>
 .card-situation {
-  margin-top: 20rpx;
+  // margin-top: 20rpx;
   padding: 20rpx;
   border-top: 8rpx solid #f2f2f2;
   box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);