File tree Expand file tree Collapse file tree 8 files changed +74
-27
lines changed Expand file tree Collapse file tree 8 files changed +74
-27
lines changed Original file line number Diff line number Diff line change 92
92
" pages/api/get-user-info/get-user-info" ,
93
93
" pages/api/request-payment/request-payment" ,
94
94
" pages/api/jump/jump" ,
95
+ " pages/api/official-account/official-account" ,
95
96
" pages/api/share/share" ,
96
97
" pages/api/share-button/share-button" ,
97
98
" pages/api/custom-message/custom-message" ,
523
524
],
524
525
"multiSelectSupportedMaterials" : [
525
526
{
526
- "materialType" : [" image/*" ],
527
+ "materialType" : [
528
+ " image/*"
529
+ ],
527
530
"desc" : " 聊天内容长按多选打开" ,
528
531
"path" : " packageAPI/pages/chattool/material_open/material_open" ,
529
532
"scopes" : []
Original file line number Diff line number Diff line change @@ -55,26 +55,6 @@ Page({
55
55
}
56
56
} )
57
57
} ,
58
- // 打开公众号主页
59
- openofficialaccountprofile ( ) {
60
- wx . openOfficialAccountProfile ( {
61
- username : 'gh_56fc3b00cc4f' ,
62
- success : ( res ) => {
63
- } ,
64
- fail : ( res ) => {
65
- }
66
- } )
67
- } ,
68
- // 打开公众号文章
69
- openofficialaccountarticle ( ) {
70
- wx . openOfficialAccountArticle ( {
71
- url : 'https://mp.weixin.qq.com/s/vTt8sZ_tTkTEVYgcydKqew' , // 此处填写公众号文章连接
72
- success : ( res ) => {
73
- } ,
74
- fail : ( res ) => {
75
- }
76
- } )
77
- } ,
78
58
onUnload ( ) {
79
59
if ( wx . offThemeChange ) {
80
60
wx . offThemeChange ( )
Original file line number Diff line number Diff line change 16
16
<view class="btn-area">
17
17
<button type="primary" data-mode="fingerPrint" bindtap="exitminiprogram">退出当前小程序</button>
18
18
</view>
19
- <view class="btn-area">
20
- <button type="primary" data-mode="fingerPrint" bindtap="openofficialaccountprofile">打开公众号主页</button>
21
- </view>
22
- <view class="btn-area">
23
- <button type="primary" data-mode="fingerPrint" bindtap="openofficialaccountarticle">打开公众号文章</button>
24
- </view>
25
19
</view>
26
20
<template is="foot" />
27
21
</view>
Original file line number Diff line number Diff line change
1
+ Page ( {
2
+ onShareAppMessage ( ) {
3
+ return {
4
+ title : '公众号' ,
5
+ path : 'packageAPI/pages/api/official-account/official-account'
6
+ }
7
+ } ,
8
+
9
+ data : {
10
+ theme : 'light' ,
11
+ setting : { }
12
+ } ,
13
+ // 打开公众号主页
14
+ openofficialaccountprofile ( ) {
15
+ wx . openOfficialAccountProfile ( {
16
+ username : 'gh_56fc3b00cc4f' ,
17
+ success : ( res ) => {
18
+ } ,
19
+ fail : ( res ) => {
20
+ }
21
+ } )
22
+ } ,
23
+ // 打开公众号文章
24
+ openofficialaccountarticle ( ) {
25
+ wx . openOfficialAccountArticle ( {
26
+ url : 'https://mp.weixin.qq.com/s/vTt8sZ_tTkTEVYgcydKqew' , // 此处填写公众号文章连接
27
+ success : ( res ) => {
28
+ } ,
29
+ fail : ( res ) => {
30
+ }
31
+ } )
32
+ } ,
33
+ onUnload ( ) {
34
+ if ( wx . offThemeChange ) {
35
+ wx . offThemeChange ( )
36
+ }
37
+ } ,
38
+ onLoad ( ) {
39
+ this . setData ( {
40
+ theme : getApp ( ) . globalData . theme || 'light'
41
+ } )
42
+
43
+ if ( wx . onThemeChange ) {
44
+ wx . onThemeChange ( ( { theme } ) => {
45
+ this . setData ( { theme } )
46
+ } )
47
+ }
48
+ }
49
+ } )
Original file line number Diff line number Diff line change
1
+ {
2
+ "navigationBarTitleText" : " 公众号" ,
3
+ "renderer" : " webview"
4
+ }
Original file line number Diff line number Diff line change
1
+ <import src="../../../../common/head.wxml" />
2
+ <import src="../../../../common/foot.wxml" />
3
+ <view class="container page" data-weui-theme="{{theme}}">
4
+ <template is="head" data="{{title: 'officialAccount'}}" />
5
+ <view class="page-body">
6
+ <view class="btn-area">
7
+ <button type="primary" data-mode="fingerPrint" bindtap="openofficialaccountprofile">打开公众号主页</button>
8
+ </view>
9
+ <view class="btn-area">
10
+ <button type="primary" data-mode="fingerPrint" bindtap="openofficialaccountarticle">打开公众号文章</button>
11
+ </view>
12
+ </view>
13
+ <template is="foot" />
14
+ </view>
Original file line number Diff line number Diff line change 31
31
} , {
32
32
zh : '跳转' ,
33
33
url : 'jump/jump'
34
+ } , {
35
+ zh : '公众号' ,
36
+ url : 'official-account/official-account'
34
37
} , {
35
38
zh : '转发' ,
36
39
url : 'share/share'
You can’t perform that action at this time.
0 commit comments