12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- import { routers, viewImage, sharePage, isFn } from '../../utils/util.js'
- const { navigateTo, redirectTo, navigateBack } = routers()
- Page({
-
- data: {
- canIUseWebview: wx.canIUse('web-view'),
- isLoaded: 0
- },
-
- onLoad: function (options) {
- const { title = '' } = options
- if (title) {
- wx.setNavigationBarTitle({ title })
- }
- this.setData({ options, isLoaded: 1 })
- },
-
- onReady: function () {
- const obj = { navigateTo, redirectTo, navigateBack, viewImage }
- for (const i in obj) {
- this[i] = obj[i]
- }
- },
-
- onShow: function () {
- },
-
- onHide: function () {
- },
-
- onUnload: function () {
- },
-
- onPullDownRefresh: function () {
- },
-
- onReachBottom: function () {
- },
-
- onShareAppMessage: function () {
- if (isFn(sharePage)) return sharePage()
- }
- })
|