
Uniapp
uniapp
清雨小竹
清明雨后 破土新竹
展开
-
uniapp使用字体图标
1.在阿里图标库下载需要的字体图标,选择好图标后点下载代码iconfont-阿里巴巴矢量图标库2.将下载的压缩包里面的ttf文件拷贝到uniapp项目的static文件夹3.如果是要用到app的标题栏右上角,代码如下。"\ue671",可以在iconfont.json文件的unicode看{ "path" : "pages/kaquan/kaquan", "style" :原创 2021-11-30 14:16:49 · 2840 阅读 · 0 评论 -
uni-app推送unipush绑定/解绑别名和标签
绑定bindAliasAndTag(alias, tags) { var isAndorid, PushManager, context, Instance, GeTuiSdk; if (plus.os.name == 'Android') { isAndorid = true; } else { isAndorid = false; } if (isAndorid)原创 2021-10-15 16:38:03 · 1669 阅读 · 0 评论 -
uniapp清理app缓存
clearCache() { let that = this; let os = plus.os.name; if (os == 'Android') { let main = plus.android.runtimeMainActivity(); let sdRoot = main.getCacheDir(); let files = plus.android.invoke(sdRoot, "listFiles"); let len = f.原创 2021-09-26 17:39:22 · 6942 阅读 · 2 评论 -
uniapp项目的.gitignore
node_modules/.projectunpackage/.DS_Storewxcomponents/**/*.vuewxcomponents/**/*.css.hbuilderx/原创 2021-08-17 15:05:48 · 619 阅读 · 0 评论 -
微信刷脸支付插件
本插件分装了微信刷脸支付Android SDK v2.21.114版本。微信刷脸支付官方文档:https://pay.weixin.qq.com/wiki/doc/wxfacepay/develop/android/facepay.html本插件实现封装了SDK中的5个方法:1、程序启动时初始化 initWxpayface2、获取数据 getWxpayfaceRawdata3、人脸识别 getWxpayfaceCode(获取用户信息)4、释放资源 releaseWxpayface5、启动防原创 2021-06-10 10:15:41 · 1429 阅读 · 0 评论 -
研科icod小票打印机SDK插件
Uniapp示例代码<template> <view> <view> <button @click="getversion()">getversion</button> <button @click="printText()">printText</button> </view> <text v-for="(item,index) in msglist">{{item}}\原创 2021-06-10 09:31:05 · 1388 阅读 · 0 评论 -
uniapp实现轮播swiper中间大两头小
html<swiper class="swiper-block" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" circular='true' previous-margin='90rpx' next-margin='90rpx' current='0' @change="swiperChange"> <swiper-item class="swiper-item" v-fo原创 2021-05-28 10:59:23 · 2967 阅读 · 0 评论 -
uniapp自定义过滤器filter.js
filter.js//自定义view数据过滤器export default { nullStr(value){ if(value!=null&&value!=undefined&&value.length>0){ return value; } return ""; }, yfSubStr(value){ if(value!=null&&value!=undefined&&value.length>原创 2021-07-20 14:35:33 · 2888 阅读 · 0 评论 -
uniapp调用芯烨xprinter打印机安卓sdk
因为xprinter的安卓sdk需要在安卓项目里配置service,但是uniapp里无法配置service,所以只能用原生插件开发方式。1.android自定义插件代码package com.yf.xprinter;import android.app.Activity;import android.content.ComponentName;import android.content.Intent;import android.content.ServiceConnection;原创 2021-06-22 13:55:23 · 3811 阅读 · 5 评论 -
uniapp使用md5
页面中引用md5.jsimport md5 from "../../md5.js";使用var md5str = md5.hex_md5("hello 中国")md5.js/** * Namespace for hashing and other cryptographic functions * Copyright (c) Andrew Valums * Licensed under the MIT license, http://valums.com/mit-licens原创 2021-06-24 11:37:25 · 7349 阅读 · 0 评论 -
Uniapp
1.uni.navigateBack之后通知上一个页面刷新 uni.navigateBack({ delta:1, success: function() { let pages = getCurrentPages(); // 当前页面 let beforePage = pages[pages.length - 2]; // 前一个页面 beforePage.$vm.refreshDataLi原创 2021-05-13 10:35:55 · 1330 阅读 · 0 评论 -
uniapp-yfCommon.js
yfCommon.js//封装过的POST请求function request(url,data,callback) { uni.showLoading({ title:'加载中' }) uni.request({ url: getApp().globalData.apiUrl + url, method: "POST", data: data, header: { "Content-Type": "application/json", "Authorizati原创 2021-07-20 14:29:41 · 362 阅读 · 0 评论 -
Node.js 开发Rest的Api示例项目(二)
app.js'use strict';console.log('Hello world');const Koa = require('koa');const bodyParser = require('koa-bodyparser');const app = new Koa();const controller = require('./controller');// parse ...原创 2018-02-10 16:42:34 · 629 阅读 · 0 评论 -
Node.js控制台示例项目(一)
////app.js'use strict';console.log('Hello world>>>>>>>>>>>>>>>>>>>>>>>>>&原创 2018-02-10 16:08:40 · 950 阅读 · 0 评论