微信小程序

展示与隐藏

 data: {
    msg1:'你好',
    type:1,
    flag:true,
    },
<input value="{{msg1}}" type="text" bindinput="display"> </input>

<!-- 、条件渲染   wx:if -->
<view wx:if="{{type===1}}">男</view>
<view wx:elif="{{type===2}}">女</view>
<view wx:else>lalla</view>


<!-- <block wx:if="{{true}}"> 
<view>view1</view>
<view>view1</view>
<view>view1</view>
</block>>
 -->

 <view hidden="{{flag}}">flag为TRUE时显示</view>

wx:for

 <view wx:for="{{arr}}" wx:key="index">

 索引是:{{index}},item:{{item}}

 </view>

  data: {

    arr:['1' ,'2' ,'3'],

    },

wxss

 全局样式

页面配置一样

"enablePullDownRefresh": true 下拉刷新

tabar

在app.json中添加与Windows同级的taBar 

  "tabBar": {
        "list": [{
            "pagePath": "pages/home1/home1",
            "text": "首页",
            "iconPath": "/images/home.png",
            "selectedIconPath": "/images/home-active.png"
        },
        {
            "pagePath": "pages/contact1/contact1",
            "text": "联系我",
            "iconPath": "/images/contact.png",
            "selectedIconPath": "/images/contact-active.png"
        },
        {
            "pagePath": "pages/message1/message1",
            "text": "信息",
            "iconPath": "/images/message.png",
            "selectedIconPath": "/images/message-active.png"
        }
    ]
    },

网络数据请求

配置request合法域名 

 

发起get请求(post的将get修改就可)

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

光着膀子的宁

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值