-
Notifications
You must be signed in to change notification settings - Fork 31
/
game.js
43 lines (40 loc) · 1.07 KB
/
game.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import './js/libs/weapp-adapter'
import './js/libs/symbol'
import './js/umstat';
import Main from './js/main'
new Main()
wx.onShow(()=>{
wx.getSetting({
success(res) {
if (!res.authSetting['scope.userInfo']) {
wx.authorize({
scope: 'scope.userInfo',
success () {
// 用户已经同意小程序使用录音功能,后续调用 wx.startRecord 接口不会弹窗询问
},
fail:function(){
wx.openSetting({
withSubscriptions: true,
})
let button = wx.createOpenSettingButton({
type: 'text',
text: '打开设置页面',
style: {
left: 10,
top: 76,
width: 200,
height: 40,
lineHeight: 40,
backgroundColor: '#ff0000',
color: '#ffffff',
textAlign: 'center',
fontSize: 16,
borderRadius: 4
}
})
}
})
}
}
})
})