uniapp
saas软件销售顾问
不忘初心,砥砺前行
展开
-
uniapp跳转tab页面、跳转普通页面跳转传参
<template> <view> <navigator open-type="switchTab" url="/pages/video/video">跳转</navigator> </view></template>原创 2021-01-20 19:18:11 · 1503 阅读 · 0 评论 -
uni-app设置开发环境的测试路由
pages.json"condition": { //模式配置,仅开发期间生效 "current": 0, //当前激活的模式(list 的索引项) "list": [{ "name": "index", //模式名称 "path": "pages/index/index", //启动页面,必选 "query": "interval=4000&autoplay=false" //启动参数,在页面的onLoad函数里面得到。 }, { "na.原创 2021-01-18 20:41:52 · 191 阅读 · 0 评论 -
uniapp实现筛选栏吸顶和点击筛选条件回到顶部的需求
<template> <view class="contenting"> <view @click="poll()" :catchtouchmove="true"><Delicacy id="boxFixed" :class="{ is_fixed: isfixed }"></Delicacy></view> </view></template><script>impo.原创 2020-09-16 16:31:56 · 1246 阅读 · 1 评论 -
uniapp请求高级封装
1.根目录下创建apiapi/errdata.js// 提示const errdata = { errlist(err) { uni.showToast({ icon: 'none', title: err, duration: 2000 }) }}export { errdata}api/api.js// 封装请求:get post// 引进提示import {errdata} from 'api/errdata.js'// GETle原创 2020-09-15 19:38:12 · 282 阅读 · 0 评论 -
uniapp设置横向滚动
关键:【.scroll 设置white-space: nowrap】<template> <view class="prefer-content"> <!-- 标题 --> <view class="prefer-title">为你优选</view> <scroll-view scroll-x="true" class="scroll" scroll-with-animation="true"> <v..原创 2020-09-15 17:48:00 · 1629 阅读 · 0 评论 -
uniapp自定义轮播指示器
<template> <view class=""> <!-- 定位 --> <view class="search-view"> <image src="../../../static/coen/dingwei.svg" mode="widthFix"></image> <text class="search-text">阿里巴巴淘宝城2期西溪园区</text> <te...原创 2020-09-15 17:35:59 · 709 阅读 · 0 评论 -
uniapp中使用v-if和过滤器报错null问题处理
1.在uniapp中使用v-if和过滤器时,v-false执行优先级低于过滤器,导致报错null2.处理方式,初始化对象时,设置对象的属性,解决这个问题。3.代码<view class="product-item van-hairline--bottom"> <view class="item-name">有效期</view> <view class="item-content">{{ donateGoodsInfo.effect原创 2020-06-02 14:44:22 · 2466 阅读 · 0 评论 -
uniapp开发小程序使用vant组件开发
1.创建wxcomponents文件夹,并把vant-dist全部放入wxcomponents2.在App.vue中将vant全局样式引入<script> export default { onLaunch: function() { }, onShow: function() { }, onHide: function() { // console.log('App Hide') } }</script><sty原创 2020-06-01 17:08:30 · 3206 阅读 · 0 评论 -
uniapp中uni-request封装请求
基于Promise封装uni-app的request方法,实现类似axios形式的请求基于Promise封装uni-app的request方法,h5和小程序均可使用特别之处 支持Promise API 拦截请求和响应 转换请求和响应数据 取消请求 自动转换为JSON数据 超时请求 告别callback 支持默认请求前缀 支持并发请求 特别之处uni-app框架中安装npm install.原创 2020-05-21 14:19:24 · 2189 阅读 · 0 评论 -
uniapp实现提现校验功能
cashOut() { //点击提现 console.log('提现金额为:',this.cashOutObj.money) var regExp = /^[1-9]\d*$/; if (this.cashOutObj.accountNum == '') { uni.showToast({ title: '请输入提现账号', ic...原创 2020-04-06 19:59:38 · 3427 阅读 · 0 评论 -
在初始化请求中callback&&callback()的使用
这里的callback && callback(data);相当于 if callback {callback()};如果回调函数存在,则执行该回调函数。例子:1.带有函数返回值和不带函数返回值的调用方式this.getGoodsList(()=>{ uni.stopPullDownRefresh()});this.getGoodsList();...原创 2020-04-01 14:34:10 · 1151 阅读 · 0 评论