Skip to content

Commit 50e719e

Browse files
committed
feat: mp-toutiao
1 parent f6faefb commit 50e719e

7 files changed

Lines changed: 100 additions & 77 deletions

File tree

‎pages.json‎

Lines changed: 67 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@
7373
"navigationBarTitleText" : "swiper"
7474
}
7575
},
76+
// #ifndef MP-TOUTIAO
7677
{
77-
"path" : "pages/component/movable-view/movable-view",
78-
"style" : {
79-
"navigationBarTitleText" : "movable-view"
80-
}
78+
"path": "pages/component/movable-view/movable-view",
79+
"style": {
80+
"navigationBarTitleText": "movable-view"
81+
}
8182
},
83+
// #endif
8284
{
8385
"path" : "pages/component/text/text",
8486
"style" : {
@@ -189,26 +191,28 @@
189191
},
190192
// #ifdef H5 || APP-PLUS || MP-BAIDU
191193
{
192-
"path" : "pages/component/audio/audio",
193-
"style" : {
194-
"navigationBarTitleText" : "audio"
195-
}
194+
"path": "pages/component/video/video",
195+
"style": {
196+
"navigationBarTitleText": "video"
197+
}
196198
},
197199
// #endif
198-
// #ifndef MP-ALIPAY
200+
// #ifndef MP-ALIPAY || MP-TOUTIAO
199201
{
200-
"path" : "pages/component/video/video",
201-
"style" : {
202-
"navigationBarTitleText" : "video"
203-
}
202+
"path": "pages/component/audio/audio",
203+
"style": {
204+
"navigationBarTitleText": "audio"
205+
}
204206
},
205207
// #endif
208+
// #ifndef MP-TOUTIAO
206209
{
207-
"path" : "pages/component/map/map",
208-
"style" : {
209-
"navigationBarTitleText" : "map"
210-
}
210+
"path": "pages/component/map/map",
211+
"style": {
212+
"navigationBarTitleText": "map"
213+
}
211214
},
215+
// #endif
212216
{
213217
"path" : "pages/component/canvas/canvas",
214218
"style" : {
@@ -332,12 +336,12 @@
332336
"navigationBarTitleText" : "获取手机系统信息"
333337
}
334338
},
335-
{
336-
"path" : "pages/API/add-phone-contact/add-phone-contact",
337-
"style" : {
338-
"navigationBarTitleText" : "添加手机联系人"
339-
}
340-
},
339+
{
340+
"path" : "pages/API/add-phone-contact/add-phone-contact",
341+
"style" : {
342+
"navigationBarTitleText" : "添加手机联系人"
343+
}
344+
},
341345
{
342346
"path" : "pages/API/on-accelerometer-change/on-accelerometer-change",
343347
"style" : {
@@ -434,12 +438,14 @@
434438
"navigationBarTitleText" : "查看位置"
435439
}
436440
},
441+
// #ifndef MP-TOUTIAO
437442
{
438-
"path" : "pages/API/choose-location/choose-location",
439-
"style" : {
440-
"navigationBarTitleText" : "使用地图选择位置"
441-
}
443+
"path": "pages/API/choose-location/choose-location",
444+
"style": {
445+
"navigationBarTitleText": "使用地图选择位置"
446+
}
442447
},
448+
// #endif
443449
{
444450
"path" : "pages/API/storage/storage",
445451
"style" : {
@@ -482,12 +488,14 @@
482488
"navigationBarTitleText" : "问题反馈"
483489
}
484490
},
491+
// #ifdef H5 || APP-PLUS
485492
{
486-
"path" : "pages/about/about",
487-
"style" : {
488-
"navigationBarTitleText" : "关于"
489-
}
493+
"path": "pages/about/about",
494+
"style": {
495+
"navigationBarTitleText": "关于"
496+
}
490497
},
498+
// #endif
491499
{
492500
"path" : "platforms/app-plus/tabbar/tabbar",
493501
"style" : {
@@ -549,12 +557,12 @@
549557
"navigationBarTitleText" : "图片裁剪"
550558
}
551559
},
552-
// #ifndef MP-ALIPAY
560+
// #ifndef MP-ALIPAY || MP-TOUTIAO
553561
{
554-
"path" : "echarts/echarts",
555-
"style" : {
556-
"navigationBarTitleText" : "ECharts图表"
557-
}
562+
"path": "echarts/echarts",
563+
"style": {
564+
"navigationBarTitleText": "ECharts图表"
565+
}
558566
},
559567
// #endif
560568
// #ifdef APP-PLUS || H5 || MP-WEIXIN
@@ -643,28 +651,28 @@
643651
}
644652
}
645653
},
646-
{
647-
"path" : "nav-dot/nav-dot",
648-
"style" : {
649-
"navigationBarTitleText" : "导航栏带红点和角标",
650-
"app-plus" : {
651-
"titleNView" : {
652-
"buttons" : [
653-
{
654-
"text" : "消息",
655-
"fontSize" : "14",
656-
"redDot" : true
657-
},
658-
{
659-
"text" : "关注",
660-
"fontSize" : "14",
661-
"badgeText" : "12"
662-
}
663-
]
664-
}
665-
}
666-
}
667-
},
654+
{
655+
"path" : "nav-dot/nav-dot",
656+
"style" : {
657+
"navigationBarTitleText" : "导航栏带红点和角标",
658+
"app-plus": {
659+
"titleNView": {
660+
"buttons": [
661+
{
662+
"text": "消息",
663+
"fontSize": "14",
664+
"redDot": true
665+
},
666+
{
667+
"text": "关注",
668+
"fontSize": "14",
669+
"badgeText": "12"
670+
}
671+
]
672+
}
673+
}
674+
}
675+
},
668676
// #endif
669677
{
670678
"path" : "mpvue-picker/mpvue-picker",
@@ -950,4 +958,4 @@
950958
}
951959
]
952960
}
953-
}
961+
}

‎pages/API/file/file.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<button class="btn-savefile" @click="saveFile">保存文件</button>
1616
<button @click="clear">删除文件</button>
1717
</view>
18-
<!-- #ifndef MP-ALIPAY -->
18+
<!-- #ifndef MP-ALIPAY || MP-TOUTIAO -->
1919
<view class="btn-area">
2020
<button @click="openDocument">打开pdf文件</button>
2121
</view>

‎pages/API/get-user-info/get-user-info.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<!-- #ifdef APP-PLUS || MP-ALIPAY -->
2020
<button type="primary" @click="getUserInfo">获取用户信息</button>
2121
<!-- #endif -->
22-
<!-- #ifdef MP-WEIXIN || MP-BAIDU -->
22+
<!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO -->
2323
<button type="primary" open-type="getUserInfo" @getuserinfo="mpGetUserInfo">获取用户信息</button>
2424
<!-- #endif -->
2525
<button @click="clear">清空</button>

‎pages/tabBar/API/API.vue‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,14 @@
165165
}, {
166166
name: '使用地图查看位置',
167167
url: 'open-location'
168-
}, {
168+
},
169+
// #ifndef MP-TOUTIAO
170+
{
169171
name: '使用地图选择位置',
170172
url: 'choose-location'
171-
}]
173+
},
174+
// #endif
175+
]
172176
}, {
173177
id: 'storage',
174178
name: '数据',

‎pages/tabBar/component/component.vue‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
'view',
3636
'scroll-view',
3737
'swiper',
38-
'movable-view'
38+
// #ifndef MP-TOUTIAO
39+
'movable-view',
40+
// #endif
3941
]
4042
}, {
4143
id: 'content',
@@ -59,22 +61,25 @@
5961
id: 'media',
6062
name: '媒体组件',
6163
open: false,
62-
// #ifdef MP-ALIPAY
63-
pages: ['image'],
64-
// #endif
65-
// #ifdef MP-ALIPAY || MP-TOUTIAO
66-
pages: ['image', 'video'],
67-
// #endif
68-
// #ifdef MP-BAIDU || APP-PLUS || H5
69-
pages: ['image', 'audio' ,'video'],
70-
// #endif
71-
}, {
64+
pages: [
65+
'image',
66+
// #ifndef MP-ALIPAY
67+
'video',
68+
// #endif
69+
// #ifndef MP-ALIPAY || MP-TOUTIAO
70+
'audio',
71+
// #endif
72+
],
73+
},
74+
// #ifndef MP-TOUTIAO
75+
{
7276
id: 'map',
7377
name: '地图',
7478
open: false,
7579
pages: ['map']
76-
80+
7781
},
82+
// #endif
7883
{
7984
id: 'web-view',
8085
name: '网页',

‎pages/tabBar/template/template.vue‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,12 @@
135135
url: 'list-triplex-row'
136136
}]
137137
},
138+
// #ifndef MP-BAIDU
138139
{
139140
name: '右侧索引列表 indexList',
140141
url: 'index-list'
141142
},
143+
// #endif
142144
{
143145
name: '图文列表',
144146
url: 'media-list'
@@ -170,7 +172,7 @@
170172
name: '标签 tag',
171173
url: 'tag'
172174
},
173-
// #ifndef MP-ALIPAY
175+
// #ifndef MP-ALIPAY || MP-TOUTIAO
174176
{
175177
name: 'ECharts 图表',
176178
url: 'echarts'
@@ -196,11 +198,13 @@
196198
name: '二维码生成',
197199
url: 'qrcode'
198200
},
199-
// #ifdef APP-PLUS || MP-WEIXIN || H5
201+
// #ifdef APP-PLUS || MP-WEIXIN || H5 || MP-BAIDU
200202
{
201203
name: '图片裁剪',
202204
url: 'crop'
203205
},
206+
// #endif
207+
// #ifdef APP-PLUS || MP-WEIXIN || H5
204208
{
205209
id: 'uparse',
206210
name: '富文本渲染',

‎pages/template/nav-default/nav-default.vue‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
</view>
88
<view class="uni-btn-v">
99
<button type="default" @click="setText">改变标题栏文字</button>
10+
<!-- #ifndef MP-TOUTIAO -->
1011
<button type="primary" @click="setBg">改变标题栏颜色</button>
12+
<!-- #endif -->
1113
</view>
1214
</view>
1315
</view>

0 commit comments

Comments
 (0)