Skip to content

Commit 40a24ad

Browse files
committed
feat: cross-platform
1 parent 0f5b534 commit 40a24ad

3 files changed

Lines changed: 46 additions & 139 deletions

File tree

‎pages.json‎

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"pages": [
3-
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
3+
// pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
44
{
55
"path": "pages/tabBar/component/component",
66
"style": {
@@ -503,36 +503,55 @@
503503
"onReachBottomDistance": 20
504504
}
505505
},
506+
// #ifdef APP-PLUS || MP-WEIXIN || H5
506507
{
507508
"path": "mdparse/mdparse",
508509
"style": {
509510
"navigationBarTitleText": "markdown富文本渲染"
510511
}
511512
},
513+
{
514+
"path": "md-editor/md-editor",
515+
"style": {
516+
"navigationBarTitleText": "md富文本编辑器"
517+
}
518+
},
519+
// #endif
512520
{
513521
"path": "qrcode/qrcode",
514522
"style": {
515523
"navigationBarTitleText": "二维码生成"
516524
}
517525
},
526+
// #ifndef H5
518527
{
519528
"path": "crop/crop",
520529
"style": {
521530
"navigationBarTitleText": "图片裁剪"
522531
}
523532
},
533+
// #endif
534+
// #ifdef APP-PLUS || MP-WEIXIN
524535
{
525536
"path": "echarts/echarts",
526537
"style": {
527538
"navigationBarTitleText": "ECharts图表"
528539
}
529540
},
541+
{
542+
"path": "gesture-lock/gesture-lock",
543+
"style": {
544+
"navigationBarTitleText": "手势图案锁屏"
545+
}
546+
},
547+
// #endif
530548
{
531549
"path": "nav-default/nav-default",
532550
"style": {
533551
"navigationBarTitleText": "默认导航栏"
534552
}
535553
},
554+
// #ifdef APP-PLUS || H5
536555
{
537556
"path": "nav-transparent/nav-transparent",
538557
"style": {
@@ -561,6 +580,7 @@
561580
}
562581
}
563582
},
583+
// #endif
564584
{
565585
"path": "mpvue-picker/mpvue-picker",
566586
"style": {
@@ -589,12 +609,6 @@
589609
"navigationBarTitleText": "加载更多"
590610
}
591611
},
592-
{
593-
"path": "md-editor/md-editor",
594-
"style": {
595-
"navigationBarTitleText": "md富文本编辑器"
596-
}
597-
},
598612
{
599613
"path": "left-category/left-category",
600614
"style": {
@@ -622,6 +636,7 @@
622636
"navigationBarTitleText": "三行列表"
623637
}
624638
},
639+
// #ifndef MP-ALIPAY
625640
{
626641
"path": "list2detail-list/list2detail-list",
627642
"style": {
@@ -640,6 +655,7 @@
640655
}
641656
}
642657
},
658+
// #endif
643659
{
644660
"path": "popup/popup",
645661
"style": {
@@ -658,11 +674,11 @@
658674
"titleText": "可拖动顶部选项卡(原生)"
659675
}
660676
},
661-
"h5": {
662-
"titleNView": {
663-
"titleText": "可拖动顶部选项卡"
664-
}
665-
}
677+
"h5": {
678+
"titleNView": {
679+
"titleText": "可拖动顶部选项卡"
680+
}
681+
}
666682
}
667683
},
668684
{
@@ -760,12 +776,6 @@
760776
}
761777
}
762778
},
763-
{
764-
"path": "gesture-lock/gesture-lock",
765-
"style": {
766-
"navigationBarTitleText": "手势图案锁屏"
767-
}
768-
},
769779
{
770780
"path": "scrollmsg/scrollmsg",
771781
"style": {
@@ -823,13 +833,16 @@
823833
"navigationBarTextStyle": "black",
824834
"navigationBarTitleText": "Hello uniapp",
825835
"navigationBarBackgroundColor": "#F8F8F8",
826-
"backgroundColor": "#F8F8F8"
836+
"backgroundColor": "#F8F8F8",
837+
"mp-alipay": {
838+
"titleBarColor": "#FFFFFF"
839+
}
827840
},
828841
"tabBar": {
829842
"color": "#7A7E83",
830843
"selectedColor": "#007AFF",
831844
"borderStyle": "black",
832-
"backgroundColor": "#ffffff",
845+
"backgroundColor": "#F8F8F8",
833846
"list": [{
834847
"pagePath": "pages/tabBar/component/component",
835848
"iconPath": "static/component.png",

‎pages/tabBar/API/API.vue‎

Lines changed: 6 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,7 @@
3232
name: '图片',
3333
url: 'image'
3434
},
35-
// #ifdef APP-PLUS
36-
{
37-
name: '录音',
38-
url: 'voice'
39-
}, {
40-
name: '背景音频',
41-
url: 'background-audio'
42-
},
43-
// #endif
44-
// #ifdef MP-WEIXIN
45-
{
46-
name: '录音',
47-
url: 'voice'
48-
}, {
49-
name: '背景音频',
50-
url: 'background-audio'
51-
},
52-
// #endif
53-
// #ifdef MP-BAIDU
35+
// #ifdef APP-PLUS || MP-WEIXIN || MP-BAIDU
5436
{
5537
name: '录音',
5638
url: 'voice'
@@ -193,39 +175,7 @@
193175
url: 'storage'
194176
}]
195177
},
196-
//#ifdef MP-WEIXIN
197-
{
198-
id: 'login',
199-
name: '登录',
200-
open: false,
201-
pages: [{
202-
name: '登录',
203-
url: 'login'
204-
}, {
205-
name: '获取用户信息',
206-
url: 'get-user-info'
207-
}]
208-
},
209-
{
210-
id: 'payment',
211-
name: '支付',
212-
open: false,
213-
pages: [{
214-
name: '发起支付',
215-
url: 'request-payment'
216-
}]
217-
},
218-
{
219-
id: 'share',
220-
name: '分享',
221-
open: false,
222-
pages: [{
223-
name: '分享',
224-
url: 'share'
225-
}]
226-
},
227-
//#endif
228-
//#ifdef MP-BAIDU
178+
// #ifndef H5
229179
{
230180
id: 'login',
231181
name: '登录',
@@ -247,20 +197,8 @@
247197
url: 'share'
248198
}]
249199
},
250-
//#endif
251-
//#ifdef APP-PLUS
252-
{
253-
id: 'login',
254-
name: '登录',
255-
open: false,
256-
pages: [{
257-
name: '登录',
258-
url: 'login'
259-
}, {
260-
name: '获取用户信息',
261-
url: 'get-user-info'
262-
}]
263-
},
200+
// #endif
201+
// #ifdef APP-PLUS || MP-WEIXIN
264202
{
265203
id: 'payment',
266204
name: '支付',
@@ -270,15 +208,8 @@
270208
url: 'request-payment'
271209
}]
272210
},
273-
{
274-
id: 'share',
275-
name: '分享',
276-
open: false,
277-
pages: [{
278-
name: '分享',
279-
url: 'share'
280-
}]
281-
},
211+
// #endif
212+
// #ifdef APP-PLUS
282213
{
283214
id: 'speech',
284215
name: '语音',

‎pages/tabBar/template/template.vue‎

Lines changed: 7 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,7 @@
4747
name: '默认样式',
4848
url: 'nav-default'
4949
},
50-
// #ifdef APP-PLUS
51-
{
52-
name: '透明渐变样式',
53-
url: 'nav-transparent'
54-
}, {
55-
name: '导航栏带自定义按钮',
56-
url: 'nav-button'
57-
},
58-
// #endif
59-
// #ifdef H5
50+
// #ifdef APP-PLUS || H5
6051
{
6152
name: '透明渐变样式',
6253
url: 'nav-transparent'
@@ -70,7 +61,7 @@
7061
url: 'nav-bar'
7162
}
7263
]
73-
},
64+
},
7465
// #ifndef MP-ALIPAY
7566
{
7667
id: 'tabbar',
@@ -86,7 +77,7 @@
8677
url: 'tabbar'
8778
}]
8879
// #endif
89-
},
80+
},
9081
// #endif
9182
{
9283
name: '顶部分段器 segment',
@@ -159,17 +150,7 @@
159150
name: '标签 tag',
160151
url: 'tag'
161152
},
162-
// #ifdef APP-PLUS
163-
{
164-
name: 'ECharts 图表',
165-
url: 'echarts'
166-
},
167-
{
168-
name: '手势图案锁屏',
169-
url: 'gesture-lock'
170-
},
171-
// #endif
172-
// #ifdef MP-WEIXIN
153+
// #ifdef APP-PLUS || MP-WEIXIN
173154
{
174155
name: 'ECharts 图表',
175156
url: 'echarts'
@@ -179,10 +160,12 @@
179160
url: 'gesture-lock'
180161
},
181162
// #endif
163+
// #ifndef MP-ALIPAY
182164
{
183165
name: '列表到详情示例',
184166
url: 'list2detail-list'
185167
},
168+
// #endif
186169
// #ifdef APP-PLUS
187170
{
188171
name: '问题反馈',
@@ -199,27 +182,7 @@
199182
url: 'crop'
200183
},
201184
// #endif
202-
// #ifdef APP-PLUS
203-
{
204-
name: 'markdown 富文本渲染',
205-
url: 'mdparse'
206-
},
207-
{
208-
name: 'markdown 富文本编辑器',
209-
url: 'md-editor'
210-
},
211-
// #endif
212-
// #ifdef MP-WEIXIN
213-
{
214-
name: 'markdown 富文本渲染',
215-
url: 'mdparse'
216-
},
217-
{
218-
name: 'markdown 富文本编辑器',
219-
url: 'md-editor'
220-
},
221-
// #endif
222-
// #ifdef H5
185+
// #ifdef APP-PLUS || MP-WEIXIN || H5
223186
{
224187
name: 'markdown 富文本渲染',
225188
url: 'mdparse'

0 commit comments

Comments
 (0)