uniapp
大湿骑码
性感码农在线笔记
展开
-
uniapp H5网页内嵌ios进行数据交互
【代码】uniapp H5网页内嵌ios进行数据交互。原创 2024-01-05 17:44:46 · 485 阅读 · 0 评论 -
uniapp转小程序导航栏横向滚动,根据点击来的数据自动描点选中
【代码】uniapp转小程序导航栏横向滚动,根据点击来的数据自动描点选中。原创 2023-09-25 10:10:48 · 106 阅读 · 0 评论 -
ubiapp转小程序 checked选择框样式修改
【代码】ubiapp转小程序 checked选择框样式修改。原创 2022-11-17 11:44:10 · 139 阅读 · 0 评论 -
vue扫描二维码
vue扫码原创 2022-05-11 10:43:12 · 1024 阅读 · 1 评论 -
vue+el-table点击行多选
<template><div class="wrap"> <div class="wrap_con"> <el-table ref="singleTable" :data="tableData" @row-click="changeRow" :row-style="isRed" class="table"> <el-table-column property="status".原创 2022-05-05 17:55:07 · 1705 阅读 · 0 评论 -
uniapp小程序onShow接收路由传参
onShow(){let pages = getCurrentPages();let currentPage = pages[pages.length-1];console.log(currentPage.options,'aaaaaaaaa')}原创 2021-08-25 16:21:06 · 1389 阅读 · 1 评论 -
uniapp,小程序倒计时结束后在哪个页面就在哪个页面弹出全局弹窗
我做的是,倒计时结束后,我把弹窗单独写了一个页面,倒计时结束后直接跳弹窗的页面,关闭弹窗就是返回上一个页面,完美解决全局弹窗原创 2021-08-19 14:24:35 · 822 阅读 · 2 评论 -
uniapp小程序自定义头部标题兼容手机
<view class='header-wrap' :style="{height: navHeight + 'px', paddingTop: statusBarHeight + 'px'}"> <view class="goback" @click="goback()" :style="{height: navHeight + 'px'}"> <image src="http://yunvjia.oss-accelerate.aliyuncs.com/news/2原创 2021-08-17 14:18:40 · 1590 阅读 · 0 评论 -
uniapp小程序button按钮去掉黑色线条
button::after{border: none;}原创 2021-08-12 17:34:17 · 623 阅读 · 0 评论 -
uniapp转微信小程序调用微信支付
//第一步先调用后端接口接口把当前的支付商品的信息传过去this.$myRequest({url: ``, method:'post', header: { 'content-type': 'application/x-www-form-urlencoded',// 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', }, data:{}}).then(data=>{ if原创 2021-08-12 10:05:49 · 909 阅读 · 0 评论 -
小程序连蓝牙,发送数据
<template> <div class="bluetooth"> 蓝牙 </div></template><script> // import 'weui-wxss' export default { data () { return { sendData: 'ACAD06A000000008BCBD', deviceId:'', tip:'', d原创 2021-08-06 15:19:59 · 721 阅读 · 0 评论 -
uniapp,小程序全局发送给朋友,分享到朋友圈。
写一个jsexport default { data() { return { } }, onShareAppMessage(res) { return { title: '自定义标题', path: '/pages/index/index', // imageUrl: this.share.imageUrl, // desc: this.share.desc, // content: this.share.content, success(res)原创 2021-07-28 16:29:06 · 549 阅读 · 1 评论 -
uniapp,小程序封装请求接口
//建一个request.js// const BASE_URL = 'url' //后端给的url // 传入请求参数 // method: method, // // 配置请求类型 // header: method == 'get' ? {'token': token, 'X-Requested-With': 'XMLHttpRequest',"Accept": `application/json, text/plain, */*`,"Content-Type": "applicati原创 2021-07-16 15:27:03 · 1185 阅读 · 3 评论 -
获取验证码倒计时60秒
<template> <view class="content"> <view class="inps"> <input class="inp" type="text" v-model="verify" value="" placeholder="请输入验证码"/> <button type="default" @click="yanzheng" v-show="show">获取验证码</button>原创 2021-07-16 11:16:38 · 932 阅读 · 0 评论 -
小程序,uniapp返回跳转页面刷新新页面数据。
onShow(){ this.getInfo() },原创 2021-07-16 10:50:07 · 1262 阅读 · 4 评论 -
uniapp上拉加载,下拉刷新
html<scroll-view scroll-y class="scrollview" @scrolltolower="onreachBottom">你要渲染的数据</scroll-view><uni-load-more :status="status" :loadingType="loadingType" style="overflow: hidden;width: 100%;margin-top: 20rpx;text-align: center;" :icon-原创 2021-07-16 09:59:50 · 453 阅读 · 0 评论 -
小程序获取手机号
<button class="phone xiabut" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">微信登录</button>import WXBizDataCrypt from "@/static/WXBizDataCrypt.js";这个js包我放入了,点击下载getPhoneNumber(phone){ if(phone.detail.errMsg=="getPhoneNumber:fai原创 2021-06-07 16:06:47 · 127 阅读 · 0 评论 -
uniapp,小程序体积太大进行分包
uniapp分包跳转转载 2021-07-15 10:28:34 · 1112 阅读 · 0 评论 -
uniapp,小程序子传父,返回传值
//子页面uni.$emit("getCity", this.name)//父页面,返回后的页面uni.$on("getCity",(rel)=>{ console.log(rel) })原创 2021-07-14 16:39:16 · 412 阅读 · 0 评论 -
uniapp,小程序使用swiper消息滚动
<view class="scllor"><view class="swiper-view"> <swiper class="swiper_container" vertical="true" autoplay="true" circular="true" interval="2000"> <block v-for="item in msgList"> <swiper-item> <view cla.原创 2021-07-14 14:29:26 · 1006 阅读 · 0 评论 -
uniapp,小程序返回到指定页面以及到指定页面左上角的房型默认返回首页
//返回到指定页面uni.reLaunch({ url:'../index/login'})//到指定页面后默认返回到首页//到指定页面时一样使用uni.reLaunch({ url:'../index/login'})//reLaunch可以返回到指定页面,也可以跳到某个页面,跳到某个页面后返回键默认是首页。...原创 2021-07-14 11:50:01 · 3482 阅读 · 0 评论 -
uniapp小程序路由跳转带参数
//需要传参uni.navigateTo({ url:`../cityOrientation/index?data=${this.citys}`})```javascript//需要接收参数的页面用onLoad接收onLoad(option) { console.log(option.data) }原创 2021-07-13 14:24:59 · 835 阅读 · 0 评论 -
uniapp小程序提示框,自带
uni.showToast({title: '提示内容',icon: 'none', //如果要纯文本,不要icon,将值设为'none'duration: 2000 //持续时间为 2秒})原创 2021-07-08 16:39:45 · 234 阅读 · 0 评论 -
uniapp小程序loading效果自带
uni.showLoading({ title: '加载中',})uni.hideLoading()原创 2021-07-08 16:38:33 · 1695 阅读 · 0 评论 -
uniapp小程序时间戳转换成年月日时分秒
//这里建立一个utils.js文件//时间戳转换成日期时间function js_date_time(unixtime) { var date = new Date(unixtime); var y = date.getFullYear(); var m = date.getMonth() + 1; m = m < 10 ? ('0' + m) : m; var d = date.getDate(); d = d < 10 ? ('0' + d) : d; va原创 2021-07-08 16:33:33 · 880 阅读 · 0 评论 -
uniapp小程序自定义改变头部导航标题
wx.setNavigationBarTitle({ title: '自定义标题'})原创 2021-07-08 11:17:59 · 535 阅读 · 0 评论 -
uniapp小程序鼠标按下抬起,@input=“down“轻松解决
<u-input v-model="value" @input="down" type="text" placeholder="输入"/>data() { return { value: '' } }, methods: { down(){ console.log(this.value) } }原创 2021-07-07 15:11:06 · 1443 阅读 · 0 评论 -
uniapp小程序点击切换字体样式
<view :class="[active==index ? 'checkno' : 'checks']" v-for="(item,index) in lists" :key="index" @click="check(index,item.area_name)">{{item.area_name}}</view>data() { return { active: 0, lists:[ { area_name:'一' }, {原创 2021-07-07 14:27:28 · 1463 阅读 · 0 评论 -
小程序新的授权登录
<template> <view class="page-login"> <view v-if="canIUse||canIGetUserProfile"> <view class='login-header'> <image style="width: 140rpx; height: 140rpx;" mode="aspectFit" src="../../static/image/login.png"></ima原创 2021-07-05 10:54:50 · 120 阅读 · 0 评论 -
uniapp,小程序嵌套H5
//url=你要嵌套的H5页面地址<web-view :src="url"></web-view>原创 2021-07-02 17:28:05 · 483 阅读 · 0 评论 -
uniapp,小程序上传图片
html<image @click="chooseImage" :src="pic" class="toux" mode=""></image>jschooseImage() { var _this = this uni.chooseImage({ count: 1, //默认9 sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 sourceType: ['album', 'came原创 2021-07-02 17:25:11 · 892 阅读 · 0 评论 -
uniapp调用摄像头,调用相册
//点击头像调用摄像头,或者直接选择图片<image @click="chooseImage" :src="imgShow" class="toux" mode=""></image>//手机真机操作测试才能调用摄像头,相册图片,网页上只能选择图片chooseImage() { var _this = this uni.chooseImage({ count: 1, //默认9 sizeType: ['original', 'compressed'], /原创 2021-06-08 10:15:31 · 9863 阅读 · 0 评论