File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
pages/API/get-network-type Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 16
16
</view >
17
17
</view >
18
18
<view class =" uni-btn-v uni-common-mt" >
19
- <button type =" primary" @tap =" getNetworkType" >获取设备网络状态</button >
20
- <!-- #ifdef MP-WEIXIN -->
21
- <button v-if =" hasNetworkType === true && networkType === 'wifi'" class =" uni-common-mt" type =" primary" @tap =" getConnectedWifi" >获取 wifi 信息</button >
22
- <!-- #endif -->
19
+ <button type =" primary" @tap =" getNetworkType" >获取设备网络状态</button >
20
+ <!-- #ifdef MP-WEIXIN -->
21
+ <button v-if =" hasNetworkType === true && networkType === 'wifi'" class =" uni-common-mt" type =" primary" @tap =" getConnectedWifi" >获取 wifi 信息</button >
22
+ <!-- #endif -->
23
23
<button class =" uni-common-mt" @tap =" clear" >清空</button >
24
24
</view >
25
25
</view >
26
26
</view >
27
27
</template >
28
28
<script >
29
- import { mapState } from ' vuex'
30
29
export default {
31
30
data () {
32
31
return {
58
57
this .hasNetworkType = false ,
59
58
this .networkType = ' ' ,
60
59
this .connectedWifi = ' '
61
- },
62
- // #ifdef MP-WEIXIN
60
+ },
61
+ // #ifdef MP-WEIXIN
63
62
getConnectedWifi () {
64
63
const that = this
65
64
uni .startWifi ({
76
75
fail : function (res ) {
77
76
}
78
77
})
79
- }
80
- // #endif
78
+ }
79
+ // #endif
81
80
}
82
81
}
83
82
</script >
You can’t perform that action at this time.
0 commit comments