// succ.wxml手机IP:{{motto.query}} // succ.js var app = getApp() Page({ data: { motto: \'\' // IP地址 }, onLoad: function (e) { // 获取参数 var that = this; wx.request({ // 获取ip url: \'http://ip-api.com/json\', success: function (e) { that.setData({ motto: e.data }) } }) } })