UNPKG

@sdc-monitor/demo

Version:

<div align="center"> <a href="#" target="_blank"> <img src="https://i.loli.net/2021/07/28/EvPwd4NjVH3tBfO.jpg" alt="mito-logo" height="90"> </a> <p>A Lightweight SDK For Monitor Web</p>

79 lines (77 loc) 1.64 kB
// pages/automator/automator.js Page({ data: {}, onLoad: function (options) {}, onReady: function () {}, onShow: function () {}, onHide: function () {}, onUnload: function () {}, onPullDownRefresh: function () {}, onReachBottom: function () {}, onShareAppMessage: function () {}, onTapError() { this.unFun() }, onTapRejectPromise() { return Promise.reject('Promise reject str') }, // onShareTimeline(options){ // console.log('pageOnShareTimeline',options) // }, // onShareAppMessage(options) { // console.log('onShareAppMessage', options) // }, onTapRequest() { wx.request({ url: '/exception', method: 'GET', data: { a: 1, b: 2 }, success(res) { console.log('res = ', res) }, fail(err) { console.log('err = ', err) } }) }, onTapNoRoute() { wx.navigateTo({ url: '/pages/noRoute/index', fail(err) { console.log('err', err) }, success(res) { console.log('res = ', res) } }) }, onTapDownFile() { // 存在的地址 wx.downloadFile({ url: 'https://www.baidu.com/downloadFile', success(res) { console.log('下载文件成功', res) }, fail(res) { console.log('下载文件失败', res) } }) }, onTapRoute() { wx.navigateTo({ url: '/pages/index/index?telescope-info={way:"navigateTo"}' }) }, onClickTab(e) { console.log('e', e) }, onClickManualLog() { wx.MitoInstance.log({ message: 'this is log msg', tag: 'this is log tag' }) } })