微信小程序提交數據到後臺服務漢字亂碼

wx.request({
        url: app.globalData.yzmUrl + "?method=sendsmsCode",
        method: 'POST',
        header: { 'content-type': 'application/x-www-form-urlencoded;charset=utf-8' },
        data: { phone: param.phone},
        success: function (data) {
          console.log(data);
        }
      });

wx.request({})使用POST請求,添加header屬性{ 'content-type': 'application/x-www-form-urlencoded;charset=utf-8' }app

相關文章
相關標籤/搜索