小程序
曾泳锋
有机会多多请教
展开
-
小程序获取地址api
uni.chooseAddress({ success:(res)=>{ this.adress = res uni.setStorageSync('adress', this.adress) } })原创 2021-01-12 22:01:53 · 331 阅读 · 0 评论 -
小程序空标签block
<block></block>原创 2021-01-12 20:09:00 · 568 阅读 · 0 评论 -
小程序跳转页面的api
uni-app框架写法也一样原创 2021-01-12 20:05:00 · 243 阅读 · 0 评论 -
小程序显示加载隐藏弹层
uni.showLoading({ title: "疯狂加载中..." });uni.hideLoading();原创 2021-01-12 13:33:16 · 169 阅读 · 0 评论 -
小程序增添发送给朋友的功能
未增加此功能之前,按钮不可点击增加分享功能 onShareAppMessage(res) { if (res.from === 'button') {// 来自页面内分享按钮 console.log(res.target) } return { title: '自定义分享标题', path: '/pages/test/test?id=123' }...原创 2021-01-11 17:21:40 · 497 阅读 · 3 评论 -
小程序监听上拉触底事件
小程序监听上拉触底事件async onReachBottom() { const hasMore = this.isOK!==this.isLength if(hasMore){ this.pagenum++; const length = await this.getPageData(); this.isLength += length console.log(length); }else{ this.dibu = true原创 2021-01-11 17:10:53 · 697 阅读 · 0 评论 -
小程序下拉刷新
小程序下拉刷新1.对要下拉刷新的页面进行配置{ "path": "pages/goods_list/main", "style": { "navigationBarTitleText": "商品列表", "navigationBarBackgroundColor":"#eb4450", "navigationBarTextStyle":"white", "enablePullDownRefresh": true } },2.使用下拉监听事件原创 2021-01-11 16:43:10 · 255 阅读 · 0 评论 -
小程序封装请求
封装axios// 封装 request// 请求基本路径const baseURL = 'xxxxx'// 准备计数器变量,用于记录请求个数,???? 注意这里是变量let requestCount = 0// 解构出 url,...config 接收所有剩余参数const request = (config) => { // 返回 Promise 对象 return new Promise((resolve, reject) => { // 请求前用户提示原创 2021-01-11 16:17:43 · 151 阅读 · 0 评论 -
小程序本地存储
小程序本地存储其实小程序本地存储跟浏览器大致是一样的,只不过小程序可以存任何数据类型的数据,而浏览器只能存字符串uni.setStorageSync('storage_key', 'hello')uni.getStorageSync('storage_key')原创 2021-01-11 16:13:03 · 272 阅读 · 0 评论 -
uni-app配置页面参数
uni-app配置页面参数//开发工具编译模式 "condition":{ "current": 1, "list": [{ "name": "index", //模式名称 "path": "pages/index/main" //启动页面,必选 }, { "name": "category", "path": "pages/category/main" },原创 2021-01-11 15:34:21 · 1536 阅读 · 0 评论 -
小程序进度条progress
进度条<progress :percent="aiqi1" :border-radius="30" show-info :font-size="12" color="#10AEFF" backgroundColor="#000000" bindactiveend="aiqi" active-mode="forwards" :duration="100" active></progress>小程序进度条必须active才能播放进度条的动画...原创 2021-01-07 22:22:59 · 215 阅读 · 0 评论 -
小程序富文本rich-text对不是小程序的标签进行解析
rich-text属性node接收html标签字符串进行解析<rich-text nodes="<h1>aiqi</h1>"></rich-text>原创 2021-01-07 22:03:26 · 246 阅读 · 0 评论 -
小程序获取页面地址参数
获取页面地址参数小程序是通过生命周期onLoad进行获取的 onLoad(query){ console.log(query); } //通过onload生命参数进行获取页面参数原创 2021-01-07 21:53:05 · 942 阅读 · 0 评论 -
小程序组件scroll-view基本使用
记住滚动得设置固定高度<view class="tab"> <scroll-view scroll-y class="scroll_left"> <view v-for="(item,index) in cateNum" :key="item.id" class="left_item" @tap="tab(index)" :class="{active:index===cateIndex}"> <text>{{原创 2021-01-07 21:43:34 · 167 阅读 · 0 评论 -
小程序配置自动检验合法域名
uni-app项目配置原生项目设置原创 2021-01-05 23:14:09 · 174 阅读 · 0 评论 -
小程序去掉跳转引起的索引警告
小程序调试器经常会报索引警告我举的例子是uni-app开发项目设置在此文件中设置"checkSiteMap":false,方可去掉索引如果是用原生开发 则在project.config.json进行设置uni-app原生"checkSiteMap":false原创 2021-01-05 23:05:16 · 335 阅读 · 0 评论 -
小程序navigator标签去掉点击灰块
给navigator标签设置hover-class = “none”属性即可去掉点击灰块<navigator :url="item.navigator_url" :open-type="item.open_type" hover-class="none">原创 2021-01-05 22:51:48 · 288 阅读 · 1 评论 -
小程序请求
小程序的请求一般请求页面请求放在onLoad的生命周期请求模板wx.request({ // 请求地址 url: '', // 请求方式(get请求默认可不写) method: 'GET', // 请求参数 data: { }, // 请求成功的回调函数 success:(res)=>{ console.log(res); }, // 请求失败的回调函数原创 2021-01-03 20:58:20 · 122 阅读 · 0 评论 -
小程序的生命周期
App应用程序入口中的生命回调函数在此入口中可以定义全局变量globalDataonLaunch()第一次打开小程序的时候初始化一次(就就触发一次)onShow() 启动小程序或切换前台时触发onHide() 小程序切后台时触发...原创 2021-01-03 20:37:58 · 135 阅读 · 0 评论 -
小程序基础
小程序基础组件viewview相当于div标签text相当于span 但是有点区别的<!--pages/classify/classify.wxml--><text user-select>1111/n</text><text user-select>1111 aiqi</text>//输出 1111 //aiqitext中user-select属性可以使文本可以复制image图片组件支持懒加载懒加载就是可以节原创 2021-01-01 01:25:39 · 452 阅读 · 0 评论