You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
1.8 KiB

// miniprogram/pages/txtDubbing/txtDubbing.js
Page({
/**
* 页面的初始数据
*/
data: {
list:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.request({
url:'https://6475-dunning-bar-enr-3e46z-1300499016.tcb.qcloud.la/txt/%E7%99%BD%E9%9B%AA%E5%85%AC%E4%B8%BB.txt?sign=818727931597dc72ea2db421b0577e3b&t=1578100879',
header: { 'cntent-type':'application/json;charset=utf-8'},
success: (res)=> {
console.log(res.data);
var json = res.data;
this.setData({
list: res.data,
});
/*
if(typeof json !='object'){
if (json != null) {
json = json.replace("\ufeff", "")
var ob = JSON.parse(json);
wx.setStorageSync('list', ob.list);
}
}else{
wx.setStorageSync('list', json.list);
}
*/
}
/*
this.setData({
list: res.data,
})
try {
wx.setStorageSync('list', json)
} catch (e) {
};//和页面进行绑定可以动态的渲染到页面
*/
})
} ,
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
})