
微信小程序
文章平均质量分 57
微信小程序
HaanLen
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
微信小程序:全局状态变量的使用
全局变量的定义 在app.ts 文件中设置,globalData对象就是存储全局变量的。 设置全局变量的值 全局变量的使用原创 2022-06-06 20:33:13 · 2663 阅读 · 1 评论 -
微信小程序:点击事件获取当前设备信息(基础)
点击获取当前设备信息 真机调试原创 2022-06-02 21:25:18 · 1796 阅读 · 0 评论 -
微信小程序:基础复习
设置底部导航栏 设置图标Icon属性 "iconPath":"icon/shouye.png", "selectedIconPath":"icon/shouye.png" 基础组件 轮播图组件 components/swiper/swiper.wxml <!--components/swiper/swiper.wxml--> <text>{{text}}</text> <swiper indicator-dots="{{indicatorDo原创 2022-05-30 21:11:40 · 229 阅读 · 0 评论 -
微信小程序商项目(篇9)用户页面实现
用户背景区域 <!-- 背景 --> <block wx:if="{{userInfo.userInfo}}"> <view class="myBackground" > <image mode="widthFix" class="headPic" src="{{userInfo.userInfo.avatarUrl}}" /> <view class="userName" >{{userInfo.user.原创 2020-09-13 21:37:29 · 489 阅读 · 1 评论 -
微信小程序商城项目(篇8):购物车页面以及支付页面实现
效果展示 步骤1:原创 2020-09-13 21:36:41 · 7714 阅读 · 1 评论 -
微信小程序商城项目(篇7):商城详情页实现
效果展示 步骤1:获取相关数据 onLoad: function (options) { // console.log(options.goodsid,typeof options.goodsid) let goodsid=Number(options.goodsid) // console.log(goodsid) let params={ goods_id:goodsid } let url='https://api-hmugo-web.原创 2020-09-13 21:36:19 · 3745 阅读 · 0 评论 -
微信小程序商城项目(篇6):产品列表页面
效果展示 步骤1:获取相关产品列表数据 onLoad: function (options) { console.log(options) let pid=Number(options.pid) this.setData({ pid:pid }) console.log(typeof pid,pid) let url='https://api-hmugo-web.itheima.net/api/public/v1/goods/search'原创 2020-09-13 21:35:57 · 5747 阅读 · 2 评论 -
微信小程序商城项目(篇5):分类页面的实现
粗略效果演示 从后端获取数据 // 分类数据获取 let promise=getRequest('https://api-hmugo-web.itheima.net/api/public/v1/categories') promise.then((res)=>{ console.log(res) this.setData({ classifyData:res.data.message }) }) 将导航数据渲染到页面原创 2020-09-06 22:34:22 · 5774 阅读 · 1 评论 -
微信小程序商城项目(篇4):首页楼层实现
效果展示 步骤1:从后端获取楼层数据,并将数据保存到页面data中 // 楼层 let promise3=getRequest('https://api-hmugo-web.itheima.net/api/public/v1/home/floordata') promise3.then((res)=>{ // console.log(res) this.setData({ louceng:res.data.message }原创 2020-09-06 22:25:20 · 1718 阅读 · 0 评论 -
微信小程序商城项目(篇3):首页导航实现
展示效果 从后端获取数据 // 分类导航内容 let promise2=getRequest('https://api-hmugo-web.itheima.net/api/public/v1/home/catitems') promise2.then((res)=>{ // console.log(res) this.setData({ classify:res.data.message }) }) 将数据渲染到页面原创 2020-09-06 22:13:08 · 1049 阅读 · 2 评论 -
微信小程序商城项目(篇2):实现轮播效果(图片从后端获取)
效果演示 获取数据 // 获取轮播图图片资源 let promise1=getRequest('https://api-hmugo-web.itheima.net/api/public/v1/home/swiperdata') promise1.then((res)=>{ // console.log(res) this.setData({ lunbo:res.data.message }) }) 将数据渲染到页面原创 2020-09-06 22:06:15 · 1700 阅读 · 0 评论 -
微信小程序商城项目(篇1):搜索栏组件实现
效果 定义组件 <view class="searchArea"> <input class="inputContent" placeholder="请输入需要查询的商品名称" /> <text class="btn">搜索</text> </view> 组件样式 .searchArea{ height: 15%; width: 100%; background-color: rgb(109, 19, 1原创 2020-09-06 22:05:27 · 930 阅读 · 0 评论 -
微信小程序商城项目(篇0):底部导航实现
展示效果 底部导航配置 "tabBar":{ "list":[ { "pagePath":"pages/index/index", "text":"首页", "iconPath":"icon/shouye.png", "selectedIconPath":"icon/shouye.png" },{ "pagePath":"pages/classify/classify", "原创 2020-09-06 22:04:59 · 571 阅读 · 0 评论 -
微信小程序:页面中使用全局数据
全局 globalData: { developAdmin:'YanHilin', hotMusic:[],//热歌 musicData:[], audio:myaudio, searchData:[], lyricData:'',//字符串 singerImg:'' } 局部页面 let app=getApp() data: { lyric:'' }, onLoad: function (optio原创 2020-09-05 18:40:02 · 2465 阅读 · 2 评论 -
微信小程序:页面中使用component
定义compont <view class="audiopaly"> <button bindtap="isplay">播放|暂停</button> <text bindtap="preplay">上一首</text> <text bindtap="nextplay">下一首</text> </view> 页面中使用原创 2020-09-05 18:38:12 · 873 阅读 · 0 评论 -
微信小程序:音乐项目
微信小程序实现音乐项目原创 2020-09-05 18:35:46 · 5688 阅读 · 2 评论