parent
63a81b7180
commit
c52b71ffcf
@ -0,0 +1,98 @@
|
|||||||
|
// 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 () {
|
||||||
|
|
||||||
|
},
|
||||||
|
})
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
<!--miniprogram/pages/txtDubbing/txtDubbing.wxml-->
|
||||||
|
|
||||||
|
<view>
|
||||||
|
<scroll-view scroll-y="true" style="width: 350px; height: 500px;">
|
||||||
|
<text>{{list}}</text>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view>
|
||||||
|
<button bindtap="startDub">开始录音</button>
|
||||||
|
<button bindtap="reDub">重新录制</button>
|
||||||
|
<button bindtap="endDub">完成录音</button>
|
||||||
|
</view>
|
@ -0,0 +1 @@
|
|||||||
|
/* miniprogram/pages/txtDubbing/txtDubbing.wxss */
|
Loading…
Reference in new issue