Kaynağa Gözat

分享返回按钮展示优化

viczhq 4 ay önce
ebeveyn
işleme
fc90aff429

+ 8 - 1
src/pages/indexSub/activity/index.jsx

@@ -32,7 +32,14 @@ export default class Index extends Component {
32 32
       },
33 33
       () => {
34 34
         if (this.state.isShare) {
35
-          this.getShareSwitch(); //获取分享开关
35
+          this.setState(
36
+            {
37
+              shareSwitch: 0,
38
+            },
39
+            () => {
40
+              this.getShareSwitch(); //获取分享开关
41
+            }
42
+          );
36 43
         }
37 44
         this.getTab(); //获取tab
38 45
         handleLog({

+ 9 - 2
src/pages/indexSub/productDetail/index.jsx

@@ -98,8 +98,15 @@ export default class Index extends Component {
98 98
       () => {
99 99
         // 分享页面才判断是否展示
100 100
         if (this.state.isShare) {
101
-          // 获取分享开关
102
-          this.getShareSwitch();
101
+          this.setState(
102
+            {
103
+              shareSwitch: 0,
104
+            },
105
+            () => {
106
+              // 获取分享开关
107
+              this.getShareSwitch();
108
+            }
109
+          );
103 110
         }
104 111
         // 获取分享跳转标识
105 112
         shareJump &&

+ 8 - 1
src/pages/indexSub/seckillIndex/index.jsx

@@ -62,7 +62,14 @@ export default class Index extends Component {
62 62
           title: this.state.title || "鱼市",
63 63
         });
64 64
         if (isShare) {
65
-          this.getShareSwitch(); //获取分享开关
65
+          this.setState(
66
+            {
67
+              shareSwitch: 0,
68
+            },
69
+            () => {
70
+              this.getShareSwitch(); //获取分享开关
71
+            }
72
+          );
66 73
         }
67 74
         handleLog({
68 75
           event_type: isDirect

+ 8 - 1
src/pages/memberSub/storeManagement/index.jsx

@@ -84,7 +84,14 @@ export default class Index extends Component {
84 84
         this.getMyShopDetail(); //获取店铺详情
85 85
         this.getMyShopList(true); //获取店铺数据
86 86
         if (isShare) {
87
-          this.getShareSwitch(); //获取分享开关
87
+          this.setState(
88
+            {
89
+              shareSwitch: 0,
90
+            },
91
+            () => {
92
+              this.getShareSwitch(); //获取分享开关
93
+            }
94
+          );
88 95
         }
89 96
         // 获取分享跳转标识
90 97
         shareJump &&