|
@@ -21,17 +21,13 @@ export default { |
|
@@ -21,17 +21,13 @@ export default { |
21
|
data() {
|
21
|
data() {
|
22
|
return {
|
22
|
return {
|
23
|
toHomeHref: '//m.yohobuy.com?openby:yohobuy= {"action":"go.guangchannel","params":{"index":"1"}}',
|
23
|
toHomeHref: '//m.yohobuy.com?openby:yohobuy= {"action":"go.guangchannel","params":{"index":"1"}}',
|
24
|
- hasBackToHome: 1
|
24
|
+ hasBackToHome: 0,
|
|
|
25
|
+ isShow: false
|
25
|
};
|
26
|
};
|
26
|
},
|
27
|
},
|
27
|
- computed: {
|
|
|
28
|
- isShow() {
|
|
|
29
|
- return this.hasBackToHome === 1 && this.$yoho.isApp;
|
|
|
30
|
- }
|
|
|
31
|
- },
|
|
|
32
|
mounted() {
|
28
|
mounted() {
|
33
|
// 地址栏携带参数过来,并且当前页面不在app中
|
29
|
// 地址栏携带参数过来,并且当前页面不在app中
|
34
|
- this.hasBackToHome = _.chain(window.location.href)
|
30
|
+ const hasBackToHome = _.chain(window.location.href)
|
35
|
.thru(n => n.split('?'))
|
31
|
.thru(n => n.split('?'))
|
36
|
.get('[1]', '')
|
32
|
.get('[1]', '')
|
37
|
.thru(qs.parse)
|
33
|
.thru(qs.parse)
|
|
@@ -39,6 +35,8 @@ export default { |
|
@@ -39,6 +35,8 @@ export default { |
39
|
.thru(JSON.parse)
|
35
|
.thru(JSON.parse)
|
40
|
.thru(n => n === 1 ? 1 : 0)
|
36
|
.thru(n => n === 1 ? 1 : 0)
|
41
|
.value();
|
37
|
.value();
|
|
|
38
|
+
|
|
|
39
|
+ this.isShow = hasBackToHome === 1 && this.$yoho.isApp;
|
42
|
}
|
40
|
}
|
43
|
};
|
41
|
};
|
44
|
</script>
|
42
|
</script>
|