和輪播圖類似首先創建一個wtmlthis
<view class=''> <text>文本輸出:</text> <block wx:for="{{custom_data}}" wx:key="*this"> <text>{{item.notification}}</text> </block>
</view>
接下來是js,url
wx.request({ // 獲取後臺輸入的文本 url: , data: { custom_server:, }, success: function (res) { let arr=res.data; var data=arr.data; that.setData({ custom_data: data, }); } })
後臺PHPSQL查找文本內容spa
$config=M('info')->find(); $arr['notification']=$config['notification'];
前臺HTML的輸入略過,notification 是輸入文本code