0
点赞
收藏
分享

微信扫一扫

使用Django 搭建自动化平台

爱做梦的夏夏 2024-09-25 阅读 13

首先

1.从这里下载开发工具

https://developers.weixin.qq.com/miniprogram/dev/framework/quickstart/getstart.htm

2. 等下载完毕后 创建一个空白项目

    在pages目录下右键创建一个page : testUI,这时候会生成四个文件

  新建一个文件夹 testUI 给他们放一起

3.增加一个按钮  然后增加点击事件

index.wxml 增加跳转按钮

<button class="testbutton" bindtap="clickMe">点击跳转</button>

index.wxss 增加按钮尺寸

.testbutton {
padding: 6px;
width: 80px;
border-radius: 8px;
margin-top: 30px;
color: rgb(175, 28, 72);
background-color: rgb(150, 172, 73);
margin-bottom: 40px;
}

index.json 增加跳转方法:

clickMe: function() {
wx.navigateTo({
url:'/pages/testUI/testUI'
})
}

4.同理可以再testUI增加一个按钮  然后点击返回:

按钮创建方式参考第三步,返回上一页是这个代码:

    wx.navigateBack()

______________________________________________________________________

深海也是刚开始学做,就写点基础的供小白参考.

如果您感觉文章有用的话麻烦点个赞吧.

举报

相关推荐

0 条评论