UNPKG
wapp-cli
Version:
latest (0.0.82)
0.0.82
0.0.81
0.0.80
0.0.79
0.0.78
0.0.77
0.0.76
0.0.75
0.0.74
0.0.73
0.0.72
0.0.71
0.0.70
0.0.69
0.0.68
0.0.67
0.0.66
0.0.65
0.0.64
0.0.63
0.0.62
0.0.61
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
微信小程序cli
github.com/fupengl/miniprogram-cli
fupengl/miniprogram-cli
wapp-cli
/
test
/
src
/
store
/
actions
/
config.ts
14 lines
(10 loc)
•
303 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export
default
{
async
detectNetwork
(
state
:
any
) {
const
self =
getApp
() ||
this
; self.
commit
(
'networkStatus'
,
await
wx.
Promise
.
getNetworkType
()); wx.
onNetworkStatusChange
(
(
res
:
any
) =>
{ self.
commit
(
'networkStatus'
, res); });
return
; } };