• 小程序开发问题


    数据内容换行:

    1. 必须在text标签内
    2. 
    换行,
    Enter, 	空格

     导航页面跳转传参:

    方法:通过Page中的onLoad自动接收参数
    <view class="btn-area"> <navigator url="/page/navigate/navigate?title=navigate" hover-class="navigator-hover">跳转到新页面</navigator> <navigator url="../../redirect/redirect/redirect?title=redirect" open-type="redirect" hover-class="other-navigator-hover">在当前页打开</navigator> <navigator url="/page/index/index" open-type="switchTab" hover-class="other-navigator-hover">切换 Tab</navigator> </view> Page({ onLoad: function(options) { this.setData({ title: options.title }) } })

    wx.request里的this不指向外部:

    onLoad (options) {
        let that = this
        wx.request({
          url: app.config.host + '/weiphp/index.php?s=/w16/Cms/Cms/getDetail',
          data: {id: options.id},
          success (res) {
            that.setData({info: res.data})
            // console.log(res.data)
          }
        })
      }

    域名问题:

    1. 使用安全域:
    必须为被认证的已备案的域名,在小程序后台中设置
    
    2. 使用非安全域:
    开发阶段可以使用未校验的域名访问方式,在微信开发者工具中进行设置
  • 相关阅读:
    A1083. List Grades
    A1075. PAT Judge
    uva 10054 The Necklace 欧拉回路
    uva 1423 / Guess
    poj3164 最小树形图
    uva 11865 stream my contest 最小树形图 朱刘算法
    uva 1494
    获取android源码中遇到的问题
    MTK平台Android项目APK预置方案
    Android Lights
  • 原文地址:https://www.cnblogs.com/maoriaty/p/9013822.html
Copyright © 2020-2023  润新知