zoukankan      html  css  js  c++  java
  • 微信小程序之文本输出

    和轮播图相似首先建立一个wtml

    <view class=''>
          <text>文本输出:</text>
          <block wx:for="{{custom_data}}" wx:key="*this"> 
          <text>{{item.notification}}</text>
          </block> 
    </view>

    接下来是js,

    wx.request({ // 获取后台输入的文本
          url: ,
          data: {
            custom_server:,
          },
          success: function (res) {
            let arr=res.data;
            var data=arr.data;
            that.setData({
              custom_data: data,
            });
    
          }
        })

    后台PHPSQL查找文本内容

     $config=M('info')->find();
     $arr['notification']=$config['notification'];

    前台HTML的输入略过,notification 是输入文本

  • 相关阅读:
    正则表达式
    匿名函数作业
    内置函数&匿名函数
    模拟面试题一
    迭代器
    生成器
    装饰器
    函数
    疑问?
    3,app信息抽取
  • 原文地址:https://www.cnblogs.com/luosong3/p/10564611.html
Copyright © 2011-2022 走看看