uniapp
学魔学编程
这个作者很懒,什么都没留下…
展开
-
uniapp复制
代码】uniapp复制。原创 2022-07-24 12:14:25 · 544 阅读 · 0 评论 -
阳历和农历互相转换的js代码
/* @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0] * @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0] */ var calendar = { /** * 农历1900-2100的润大小信息表 * @Array Of Pro...原创 2022-05-02 22:44:25 · 1119 阅读 · 0 评论 -
uniapp getStorageSync,setStorageSync,removeStorageSync,clearStorageSync如何封装缓存进行取值,赋值,移除,清空
//取值function get(key,sync = true) { try { if(sync){ return uni.getStorageSync(key); }else{ let data = ''; uni.getStorage({ key:key, success: function (res) { data = res.data; } }); return data; } } catch (e) .原创 2021-12-10 14:33:35 · 4036 阅读 · 0 评论 -
uniapp吸顶和自定义导航
<template> <view> <u-navbar :is-back="false" :background="background"> <view class="slot-wrap"> <view class="slot-content"> <u-icon name="search" color="#fff" size="35"></u-icon> .原创 2021-12-10 11:21:03 · 1470 阅读 · 0 评论 -
uniapp获取手机唯一标识
getClientIdd() { const client = plus.push.getClientInfo(); console.log('当前设备ID', client.clientid) return client.clientid },原创 2021-12-09 20:07:58 · 2592 阅读 · 1 评论 -
uniapp 顶部绝对定位
.subsection { margin-top: 1px;position: sticky; /* #ifdef H5 */ top: 45px; /* #endif */ /* #ifndef H5 */ top: 1; /* #endif */ width: 100%; height:35px; z-index: 99; background: #fff;;原创 2021-11-20 22:17:44 · 1843 阅读 · 0 评论 -
uniapp接口请求封装
uniapp接口请求封装//功能:暴露接口const BASE_URL = 'http://43.129.176.116:8787' //域名或选取所有接口不变的那一部分export const myRequest = (options) => { //暴露一个function:myRequest,使用options接收页面传过来的参数 return new Promise((resolve, reject) => { //异步封装接口,使用Promise处理异步请求原创 2021-11-16 18:28:09 · 1382 阅读 · 0 评论 -
uniApp 请求接口封装
commons目录下加request.js// 引入配置文件import config from "./config.js";import User from "./user.js";export default{ config:{ baseUrl:config.webUrl, header:{ 'Content-Type':'application/json;charset=UTF-8', 'Content-Type':'application/x-www-form-u.原创 2021-11-15 22:10:48 · 504 阅读 · 0 评论