123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- var WxParse = require("../../wxParse/wxParse.js");
- var app = getApp()
- Page({
- data: {
- type:'',
- url:'',
- detail:''
- },
- onLoad: function (options) {
- console.log(options)
- var that = this;
- this.setData({
- type:options.type,
- url:options.url,
- detail: options.detail
- })
- console.log(options.url)
- wx.setNavigationBarTitle({
- title: options.name
- })
- if(options.type=='text'){
- app.request("/ad?id="+options.url, '', "GET").then(res => {
- console.log(res)
- WxParse.wxParse("content", "html", res.data.detail, that)
- }).catch(err => {
- console.log(err)
- })
- }
- },
- onReady: function () {
- },
- onShow: function () {
- },
- onHide: function () {
- },
- onUnload: function () {
- },
- onPullDownRefresh: function () {
- },
- onReachBottom: function () {
- },
- onShareAppMessage: function () {
-
- }
- })
|