// succ.wxml
<view>手机网络状态:{{netWorkType}}</view>

// succ.js
var app = getApp()
Page({
  data: {
    netWorkType: '' // 网络类型
  },
  onLoad: function (e) {  // 获取参数
    var that = this;
    wx.getNetworkType({  // 获取网络类型
      success: function (res) {
        that.setData({
          netWorkType: res.networkType
        })
      }
    })
  }
})

 

相关文章:

  • 2022-01-06
  • 2021-11-08
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2021-06-14
  • 2022-02-19
猜你喜欢
  • 2022-03-01
  • 2021-12-05
  • 2022-12-23
  • 2022-03-03
  • 2022-01-16
  • 2021-11-19
  • 2021-07-14
相关资源
相似解决方案