// pages/fanti/fanti.js
Page({
/**
* 页面的初始数据
*/
data: {
inputValue:'',
shuzi:-1,
textwenzi:'',
bianhuahoudewenzi:'',
item:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
bindKeyInput:function(e)
{
this.setData({
inputValue:e.detail.value,
})
},
bindjian:function()
{
var that=this;
this.setData({
shuzi:0,
textwenzi:this.data.inputValue
})
wx.request({
url: 'http://cct.ylapi.cn/charconvert/query.u?uid=1238&appkey=85b117afbda800b1bb130d8245def62&text:inputValue&type=2',
header: {
"content-type": "application/x-www-form-urlencoded"
},
method: 'GET',
success: function (res) {
console.log("success:" + res.data);
try {
that.setData({
item:res.data,
bianhuahoudewenzi:res.data.data.out
});
} catch (e) {
}
},
})
},
为啥显示这个呀感觉代码也没多大问题
但是改成这种就没问题了