Showing
3 changed files
with
98 additions
and
94 deletions
apps/pages/home/strategy/image.json
0 → 100644
1 | +{ | ||
2 | + "status": "0", | ||
3 | + "result": { | ||
4 | + "standardList": [ | ||
5 | + { "image": "//cdn.yoho.cn/standard/standard_01.jpg?imageView2/2/w/750/format/jpg" }, | ||
6 | + { "image": "//cdn.yoho.cn/standard/standard_02.jpg?imageView2/2/w/750/format/jpg" }, | ||
7 | + { "image": "//cdn.yoho.cn/standard/standard_03.jpg?imageView2/2/w/750/format/jpg" }, | ||
8 | + { "image": "//cdn.yoho.cn/standard/standard_04.jpg?imageView2/2/w/750/format/jpg" }, | ||
9 | + { "image": "//cdn.yoho.cn/standard/standard_05.jpg?imageView2/2/w/750/format/jpg" }, | ||
10 | + { "image": "//cdn.yoho.cn/standard/standard_06.jpg?imageView2/2/w/750/format/jpg" }, | ||
11 | + { "image": "//cdn.yoho.cn/standard/standard_07.jpg?imageView2/2/w/750/format/jpg" } | ||
12 | + ], | ||
13 | + "buyerList": [ | ||
14 | + { "image": "//cdn.yoho.cn/buyerpolicy/buyer_01.jpg?imageView2/2/w/750/format/jpg" }, | ||
15 | + { "image": "//cdn.yoho.cn/buyerpolicy/buyer_02.jpg?imageView2/2/w/750/format/jpg" }, | ||
16 | + { "image": "//cdn.yoho.cn/buyerpolicy/buyer_03.jpg?imageView2/2/w/750/format/jpg" }, | ||
17 | + { "image": "//cdn.yoho.cn/buyerpolicy/buyer_04.jpg?imageView2/2/w/750/format/jpg" }, | ||
18 | + { "image": "//cdn.yoho.cn/buyerpolicy/buyer_05.jpg?imageView2/2/w/750/format/jpg" }, | ||
19 | + { "image": "//cdn.yoho.cn/buyerpolicy/buyer_06.jpg?imageView2/2/w/750/format/jpg" }, | ||
20 | + { "image": "//cdn.yoho.cn/buyerpolicy/buyer_07.jpg?imageView2/2/w/750/format/jpg" }, | ||
21 | + { "image": "//cdn.yoho.cn/buyerpolicy/buyer_08.jpg?imageView2/2/w/750/format/jpg" }, | ||
22 | + { "image": "//cdn.yoho.cn/buyerpolicy/buyer_09.jpg?imageView2/2/w/750/format/jpg" }, | ||
23 | + { "image": "//cdn.yoho.cn/buyerpolicy/buyer_10.jpg?imageView2/2/w/750/format/jpg" } | ||
24 | + ], | ||
25 | + "sellerList": [ | ||
26 | + { "image": "//cdn.yoho.cn/sellerpolicy/seller_01.jpg?imageView2/2/w/750/format/jpg" }, | ||
27 | + { "image": "//cdn.yoho.cn/sellerpolicy/seller_0201.jpg?imageView2/2/w/750/format/jpg" }, | ||
28 | + { "image": "//cdn.yoho.cn/sellerpolicy/seller_03.jpg?imageView2/2/w/750/format/jpg" }, | ||
29 | + { "image": "//cdn.yoho.cn/sellerpolicy/seller_04.jpg?imageView2/2/w/750/format/jpg" }, | ||
30 | + { "image": "//cdn.yoho.cn/sellerpolicy/seller_05.jpg?imageView2/2/w/750/format/jpg" }, | ||
31 | + { "image": "//cdn.yoho.cn/sellerpolicy/seller_06.jpg?imageView2/2/w/750/format/jpg" }, | ||
32 | + { "image": "//cdn.yoho.cn/sellerpolicy/seller_07.jpg?imageView2/2/w/750/format/jpg" }, | ||
33 | + { "image": "//cdn.yoho.cn/sellerpolicy/seller_08.jpg?imageView2/2/w/750/format/jpg" }, | ||
34 | + { "image": "//cdn.yoho.cn/sellerpolicy/seller_09.jpg?imageView2/2/w/750/format/jpg" }, | ||
35 | + { "image": "//cdn.yoho.cn/sellerpolicy/seller_10.jpg?imageView2/2/w/750/format/jpg" } | ||
36 | + ], | ||
37 | + "qiugouList": [ | ||
38 | + { "image": "//cdn.yoho.cn/qiugou/qiugou_01.jpg?imageView2/2/w/750/format/jpg" }, | ||
39 | + { "image": "//cdn.yoho.cn/qiugou/qiugou_02.jpg?imageView2/2/w/750/format/jpg" }, | ||
40 | + { "image": "//cdn.yoho.cn/qiugou/qiugou_03.jpg?imageView2/2/w/750/format/jpg" }, | ||
41 | + { "image": "//cdn.yoho.cn/qiugou/qiugou_04.jpg?imageView2/2/w/750/format/jpg" }, | ||
42 | + { "image": "//cdn.yoho.cn/qiugou/qiugou_05.jpg?imageView2/2/w/750/format/jpg" } | ||
43 | + ], | ||
44 | + "xianyuchaoList": [ | ||
45 | + { "image": "//cdn.yoho.cn/xianyuchao/xianyu_01.png?imageView2/2/w/750/format/jpg" }, | ||
46 | + { "image": "//cdn.yoho.cn/xianyuchao/xianyu_02.png?imageView2/2/w/750/format/jpg" }, | ||
47 | + { "image": "//cdn.yoho.cn/xianyuchao/xianyu_03.png?imageView2/2/w/750/format/jpg" }, | ||
48 | + { "image": "//cdn.yoho.cn/xianyuchao/xianyu_04.png?imageView2/2/w/750/format/jpg" }, | ||
49 | + { "image": "//cdn.yoho.cn/xianyuchao/xianyu_05.png?imageView2/2/w/750/format/jpg", | ||
50 | + "urls": [ | ||
51 | + { | ||
52 | + "linkName": "strategySub", | ||
53 | + "subName": "qualityStandard", | ||
54 | + "left": "1rem", | ||
55 | + "top": "0.4rem", | ||
56 | + "width": "17rem", | ||
57 | + "height": "2.85rem" | ||
58 | + }, | ||
59 | + { | ||
60 | + "linkName": "strategySub", | ||
61 | + "subName": "buyerPolicy", | ||
62 | + "left": "2.5rem", | ||
63 | + "top": "5.3rem", | ||
64 | + "width": "6rem", | ||
65 | + "height": "3rem" | ||
66 | + }, | ||
67 | + { | ||
68 | + "linkName": "strategySub", | ||
69 | + "subName": "sellerPolicy", | ||
70 | + "left": "10.8rem", | ||
71 | + "top": "5.3rem", | ||
72 | + "width": "6rem", | ||
73 | + "height": "3rem" | ||
74 | + } | ||
75 | + ] | ||
76 | + } | ||
77 | + ] | ||
78 | + } | ||
79 | +} |
1 | <template> | 1 | <template> |
2 | - <LayoutApp title="咸鱼潮玩转攻略" :show-back="true" :back-action="goBack"> | 2 | + <LayoutApp title="闲鱼潮玩转攻略" :show-back="true" :back-action="goBack"> |
3 | <ul> | 3 | <ul> |
4 | - <li v-for="(item, index) in imageList" :key="index"> | 4 | + <li v-for="(item, index) in dataList" :key="index"> |
5 | <div v-if="item.urls && item.urls.length > 0" class="link-container"> | 5 | <div v-if="item.urls && item.urls.length > 0" class="link-container"> |
6 | <a href="javascript:;" | 6 | <a href="javascript:;" |
7 | - :style="{left: linkItem.left, top: linkItem.top, width: linkItem.width, height: linkItem.height}" | ||
8 | v-for="linkItem in item.urls" | 7 | v-for="linkItem in item.urls" |
9 | :key="linkItem.link" | 8 | :key="linkItem.link" |
9 | + :style="{left: linkItem.left, top: linkItem.top, width: linkItem.width, height: linkItem.height}" | ||
10 | @click="jumpTo" | 10 | @click="jumpTo" |
11 | :data-item="JSON.stringify(linkItem)" | 11 | :data-item="JSON.stringify(linkItem)" |
12 | > | 12 | > |
@@ -19,55 +19,13 @@ | @@ -19,55 +19,13 @@ | ||
19 | </template> | 19 | </template> |
20 | 20 | ||
21 | <script> | 21 | <script> |
22 | +import data from './image.json'; | ||
23 | + | ||
22 | export default { | 24 | export default { |
23 | name: 'Strategy', | 25 | name: 'Strategy', |
24 | data() { | 26 | data() { |
25 | return { | 27 | return { |
26 | - imageList: [ | ||
27 | - { image: '//cdn.yoho.cn/xianyu/gonglue/1.jpg?imageView2/2/w/750/format/jpg' }, | ||
28 | - { image: '//cdn.yoho.cn/xianyu/gonglue/2.jpg?imageView2/2/w/750/format/jpg' }, | ||
29 | - { image: '//cdn.yoho.cn/xianyu/gonglue/3.jpg?imageView2/2/w/750/format/jpg' }, | ||
30 | - { image: '//cdn.yoho.cn/xianyu/gonglue/4.jpg?imageView2/2/w/750/format/jpg', | ||
31 | - urls: [ | ||
32 | - { | ||
33 | - left: '1.25rem', | ||
34 | - top: '4.5rem', | ||
35 | - width: '7.75rem', | ||
36 | - height: '5.25rem', | ||
37 | - linkName: 'ChannelPage', | ||
38 | - subName: '' | ||
39 | - } | ||
40 | - ] | ||
41 | - }, | ||
42 | - { image: '//cdn.yoho.cn/xianyu/gonglue/5.jpg?imageView2/2/w/750/format/jpg', | ||
43 | - urls: [ | ||
44 | - { | ||
45 | - linkName: 'strategySub', | ||
46 | - subName: 'qualityStandard', | ||
47 | - left: '1rem', | ||
48 | - top: '14rem', | ||
49 | - width: '17rem', | ||
50 | - height: '2.85rem' | ||
51 | - }, | ||
52 | - { | ||
53 | - linkName: 'strategySub', | ||
54 | - subName: 'buyerPolicy', | ||
55 | - left: '2.5rem', | ||
56 | - top: '19rem', | ||
57 | - width: '6rem', | ||
58 | - height: '3rem' | ||
59 | - }, | ||
60 | - { | ||
61 | - linkName: 'strategySub', | ||
62 | - subName: 'sellerPolicy', | ||
63 | - left: '10.8rem', | ||
64 | - top: '19rem', | ||
65 | - width: '6rem', | ||
66 | - height: '3rem' | ||
67 | - } | ||
68 | - ] | ||
69 | - } | ||
70 | - ] | 28 | + dataList: [] |
71 | } | 29 | } |
72 | }, | 30 | }, |
73 | methods: { | 31 | methods: { |
@@ -77,11 +35,6 @@ export default { | @@ -77,11 +35,6 @@ export default { | ||
77 | jumpTo(event) { | 35 | jumpTo(event) { |
78 | let linkItem = JSON.parse(event.currentTarget.dataset.item || '{}') || {}; | 36 | let linkItem = JSON.parse(event.currentTarget.dataset.item || '{}') || {}; |
79 | 37 | ||
80 | - if (linkItem.subName === '') { | ||
81 | - this.$router.push({ | ||
82 | - name: linkItem.linkName | ||
83 | - }); | ||
84 | - } else { | ||
85 | this.$router.push({ | 38 | this.$router.push({ |
86 | name: linkItem.linkName, | 39 | name: linkItem.linkName, |
87 | params: { | 40 | params: { |
@@ -89,7 +42,10 @@ export default { | @@ -89,7 +42,10 @@ export default { | ||
89 | }, | 42 | }, |
90 | }); | 43 | }); |
91 | } | 44 | } |
92 | - } | 45 | + }, |
46 | + mounted() { | ||
47 | + let result = data.result; | ||
48 | + this.dataList = result.xianyuchaoList; | ||
93 | } | 49 | } |
94 | }; | 50 | }; |
95 | </script> | 51 | </script> |
@@ -10,42 +10,12 @@ | @@ -10,42 +10,12 @@ | ||
10 | </template> | 10 | </template> |
11 | 11 | ||
12 | <script> | 12 | <script> |
13 | +import data from './image.json'; | ||
14 | + | ||
13 | export default { | 15 | export default { |
14 | name: 'Strategy', | 16 | name: 'Strategy', |
15 | data() { | 17 | data() { |
16 | return { | 18 | return { |
17 | - standardList: [ | ||
18 | - { image: '//cdn.yoho.cn/quality/standard1.jpg?imageView2/2/w/750/format/jpg' }, | ||
19 | - { image: '//cdn.yoho.cn/quality/standard2.jpg?imageView2/2/w/750/format/jpg' }, | ||
20 | - { image: '//cdn.yoho.cn/quality/standard3.jpg?imageView2/2/w/750/format/jpg' }, | ||
21 | - { image: '//cdn.yoho.cn/quality/standard4.jpg?imageView2/2/w/750/format/jpg' }, | ||
22 | - ], | ||
23 | - buyerList: [ | ||
24 | - { image: '//cdn.yoho.cn/buyer/buyer1.jpg?imageView2/2/w/750/format/jpg' }, | ||
25 | - { image: '//cdn.yoho.cn/buyer/buyer2.jpg?imageView2/2/w/750/format/jpg' }, | ||
26 | - { image: '//cdn.yoho.cn/buyer/buyer3.jpg?imageView2/2/w/750/format/jpg' }, | ||
27 | - { image: '//cdn.yoho.cn/buyer/buyer4.jpg?imageView2/2/w/750/format/jpg' }, | ||
28 | - { image: '//cdn.yoho.cn/buyer/buyer5.jpg?imageView2/2/w/750/format/jpg' }, | ||
29 | - { image: '//cdn.yoho.cn/buyer/buyer6.jpg?imageView2/2/w/750/format/jpg' }, | ||
30 | - { image: '//cdn.yoho.cn/buyer/buyer7.jpg?imageView2/2/w/750/format/jpg' }, | ||
31 | - { image: '//cdn.yoho.cn/buyer/buyer8.jpg?imageView2/2/w/750/format/jpg' }, | ||
32 | - ], | ||
33 | - sellerList: [ | ||
34 | - { image: '//cdn.yoho.cn/seller/seller1.jpg?imageView2/2/w/750/format/jpg' }, | ||
35 | - { image: '//cdn.yoho.cn/seller/seller2.jpg?imageView2/2/w/750/format/jpg' }, | ||
36 | - { image: '//cdn.yoho.cn/seller/seller3.jpg?imageView2/2/w/750/format/jpg' }, | ||
37 | - { image: '//cdn.yoho.cn/seller/seller4.jpg?imageView2/2/w/750/format/jpg' }, | ||
38 | - { image: '//cdn.yoho.cn/seller/seller5.jpg?imageView2/2/w/750/format/jpg' }, | ||
39 | - { image: '//cdn.yoho.cn/seller/seller6.jpg?imageView2/2/w/750/format/jpg' }, | ||
40 | - { image: '//cdn.yoho.cn/seller/seller7.jpg?imageView2/2/w/750/format/jpg' }, | ||
41 | - { image: '//cdn.yoho.cn/seller/seller8.jpg?imageView2/2/w/750/format/jpg' }, | ||
42 | - ], | ||
43 | - qiugouList: [ | ||
44 | - { image: 'https://cdn.yoho.cn/qiugou/qiugou1.jpg' }, | ||
45 | - { image: 'https://cdn.yoho.cn/qiugou/qiugou2.jpg' }, | ||
46 | - { image: 'https://cdn.yoho.cn/qiugou/qiugou3.jpg' }, | ||
47 | - { image: 'https://cdn.yoho.cn/qiugou/qiugou4.jpg' }, | ||
48 | - ], | ||
49 | currentList: [], | 19 | currentList: [], |
50 | currentTitle: '' | 20 | currentTitle: '' |
51 | } | 21 | } |
@@ -57,29 +27,28 @@ export default { | @@ -57,29 +27,28 @@ export default { | ||
57 | }, | 27 | }, |
58 | mounted() { | 28 | mounted() { |
59 | let subName = this.$route.params.subName; | 29 | let subName = this.$route.params.subName; |
30 | + let result = data.result; | ||
60 | 31 | ||
61 | switch (subName) { | 32 | switch (subName) { |
62 | case 'qualityStandard': | 33 | case 'qualityStandard': |
63 | this.currentTitle = '商品质检标准'; | 34 | this.currentTitle = '商品质检标准'; |
64 | - this.currentList = this.standardList; | 35 | + this.currentList = result.standardList; |
65 | break; | 36 | break; |
66 | case 'buyerPolicy': | 37 | case 'buyerPolicy': |
67 | this.currentTitle = '买家须知'; | 38 | this.currentTitle = '买家须知'; |
68 | - this.currentList = this.buyerList; | 39 | + this.currentList = result.buyerList; |
69 | break; | 40 | break; |
70 | case 'sellerPolicy': | 41 | case 'sellerPolicy': |
71 | - this.currentTitle = '卖家须知'; | ||
72 | - this.currentList = this.sellerList; | 42 | + this.currentTitle = '卖家协议'; |
43 | + this.currentList = result.sellerList; | ||
73 | break; | 44 | break; |
74 | case 'qiugouExplain': | 45 | case 'qiugouExplain': |
75 | - this.currentTitle = '求购功能介绍'; | ||
76 | - this.currentList = this.qiugouList; | 46 | + this.currentTitle = '什么是求购?'; |
47 | + this.currentList = result.qiugouList; | ||
77 | break; | 48 | break; |
78 | default: | 49 | default: |
79 | break; | 50 | break; |
80 | } | 51 | } |
81 | - | ||
82 | - | ||
83 | } | 52 | } |
84 | }; | 53 | }; |
85 | </script> | 54 | </script> |
-
Please register or login to post a comment