先看一下效果
// 觸控開始
touchstart:function(e))
this.recordermanager.start();
},// 觸控結束
touchend:function (e) )
this.recordermanager.stop();
console.log('按了' + shijian+'秒');
console.log('width是',width);
},// 實時監測變化呼叫這些方法
onshow:function(e));
// 錄音結束
this.recordermanager.onstop(function (res)
list.push(aa);
console.log('list的2是', list)
that.setdata()
// that.tip("錄音完成!")
});this.inneraudiocontext = wx.createinneraudiocontext();
this.inneraudiocontext.onerror((res) => )
},tip: function (msg) )
},audioplay: function (e)
this.inneraudiocontext.src = src;
this.inneraudiocontext.play();
},})
下面是wxml**
以下是css**錄音}
鬆開結束
按住說話
.body
.bt.bttouch
.myluyin
.center
(微信小程式)一 初識微信小程式
需要看的 先是檔案目錄 一 pages 他存放於多個頁面 如 index log頁面。可以把他裡面的每個資料夾看成乙個整體。這個整體存放著 html css 和 資料 1 index資料夾 存放的index頁面的目錄。2 index.js 他可以處理得到 ajax 或自定義定義的資料。把得到的值封裝...
微信小程式開發 微信繫結
官方api提供的request請求的url wx.login 請求引數 傳送請求 解析相應內容 換成json物件 jsonobject json jsonobject.fromobject sr 獲取會話金鑰 session key string session key json.get sessi...
微信小程式 一 微信登入
前端 請求伺服器 wx.request method get header 設定請求的 header success function res console.log 伺服器返回 res.data.result console.log 伺服器返回 res.data.msg fail function...