Browse Source

分享返回按钮展示优化

viczhq 4 months ago
parent
commit
fc90aff429

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

@@ -32,7 +32,14 @@ export default class Index extends Component {
32
       },
32
       },
33
       () => {
33
       () => {
34
         if (this.state.isShare) {
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
         this.getTab(); //获取tab
44
         this.getTab(); //获取tab
38
         handleLog({
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
         if (this.state.isShare) {
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
         shareJump &&
112
         shareJump &&

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

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

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

@@ -84,7 +84,14 @@ export default class Index extends Component {
84
         this.getMyShopDetail(); //获取店铺详情
84
         this.getMyShopDetail(); //获取店铺详情
85
         this.getMyShopList(true); //获取店铺数据
85
         this.getMyShopList(true); //获取店铺数据
86
         if (isShare) {
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
         shareJump &&
97
         shareJump &&