自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 收藏
  • 关注

原创 IIS反向代理

IIS反向代理1. 安装插件a.http://www.iis.net/downloads/microsoft/application-request-routing#additionalDownloadsb.http://www.iis.net/downloads/microsoft/url-rewrite#additionalDownloads2.关闭重新打开IIS3.添加网站

2020-10-17 09:40:57 442

原创 .NET Core 3.1接收微信回调

1.编写WechatNotifyAttribute由于控制器拿不到request,需要在过滤器注入参数public class WechatNotifyAttribute: ActionFilterAttribute{ public override void OnActionExecuting(ActionExecutingContext filterContext) { var syncIOFeature = filterContext.HttpContext.Featur

2020-08-14 17:09:23 972

原创 css实现百叶窗切换图片效果

效果图布局<div class="img"> <div class="item" style="--index:0"></div> <div class="item" style="--index:1"></div> <div class="item" style="--index:2"></div> <div class="item" style="--index:3"></div>

2020-05-13 16:13:47 1425

原创 contos安装dotnet环境

sudo yum install -y epel-releasesudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpmsudo yum install dotnet-sdk-3.1sudo yum install aspnetcore-runtime-3.1sudo yum install supervisorsudo systemctl enable supervisord

2020-05-10 14:00:10 308

原创 dotnet core获取ip

1.Startup.cs添加app.UseForwardedHeaders(new ForwardedHeadersOptions{ ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto});2.扩展方法public static string GetClientUserIp(this HttpContext context){ var ip = context.

2020-05-09 16:21:34 500

原创 使用acme给nginx配置https

要先保证nginx存在需要配置https的域名1.执行curl https://get.acme.sh | sh2.执行alias acme.sh=~/.acme.sh/acme.sh3.生成证书acme.sh --issue -d baidu.com --nginx4.颁发证书acme.sh --installcert -d baidu.com --key-file /e...

2020-04-28 17:11:29 1486

原创 .NET Core生成MySQL数据库实体

1.安装Install-Package MySql.Data.EntityFrameworkCore -PreInstall-Package Pomelo.EntityFrameworkCore.MySqlInstall-Package Microsoft.EntityFrameworkCore.ToolsInstall-Package Microsoft.VisualStudio.Web...

2020-04-28 17:00:13 724

原创 nodejs使用redis发布订阅

1.发布var redis = require("redis")var client = redis.createClient();const time = 1000;function task(){ client.publish('dateStr',Math.random().toString()); console.log('发布成功');}setInterval(task,...

2020-03-08 13:50:47 1060

原创 uniapp开发原生android插件,获取浏览器cookie

由于想让app打开一个url登录后获取cookie调用接口,使用plus.navigator.getCookie获取cookie为空,只能想办法使用android原生组件了。参考:Android uni-app原生插件开发文档一.下载SDK1.解压2.使用Android Studio导入UniPlugin-Hello-AS项目项目包括app模块(主要用于测试插件)uniplugin...

2020-03-07 17:00:35 8061 1

原创 C#图像转字符串

生成方法 class ImageConvert { /// <summary> /// 图像转string /// </summary> /// <param name="bitmap">图片</param> /// <param name="zoomWidth">...

2020-03-02 20:07:06 1031 1

原创 C#将dll打包到exe(三)

此方法通过将第三方资源压缩解压一.将已完成的项目重新生成,把所有文件打包成zip二.新建一个新项目,添加资源文件三.添加程序集 System.IO.Compression.dll System.IO.Compression.FileSystem.dll四.编写解压和启动代码class Program { static void Main(string[]...

2020-02-23 21:21:30 1366

原创 C#将dll打包到exe(二)

第一篇失败可以尝试此方法一. 使用记事本打开 xxxx.csproj 文件在Project节点内追加以下片段<Target Name="AfterResolveReferences"> <ItemGroup> <EmbeddedResource Include="@(ReferenceCopyLocalPaths)" Condition="'%...

2020-02-23 18:46:26 432

原创 C#将dll打包到exe(一)

using Newtonsoft.Json.Linq;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApp1{ class Program { ...

2020-02-23 18:26:56 1736

原创 nodejs调用WinRAR解压

var cp = require("child_process");function unZIP(winRarPath, password, zipFilePath, unZipFolder) { return new Promise(async (resolve, reject) => { cp.execFile(winRarPath, ["x", "-inul...

2020-02-08 19:18:10 624

原创 CentOS安装node运行环境

下载解压cd /rootwget https://nodejs.org/dist/v12.15.0/node-v12.15.0-linux-x64.tar.xztar xvf node-v12.15.0-linux-x64.tar.xz创建软链接ln -s /root/node-v12.15.0-linux-x64/bin/node /usr/local/binln -s /root...

2020-02-07 19:25:47 144

原创 uniapp+nodejs微信支付APP版

前端代码weChatPay() { uni.request({ url: 'http://www.xxx.com/wechat/wxapporder',//调用下单接口 data: {id}, dataType: 'json', method: 'POST' }).then(response => { let pay = response[1].data.pay ...

2019-12-18 15:41:51 1405

原创 uniapp+nodejs微信支付小程序版

前端代码weChatPay() { uni.request({ url: 'http://www.xxxx.com/wechat/wxmporder',//调用下单接口 data: {id}, dataType: 'json', method: 'POST' }).then(response => { uni.requestPayment({ provider...

2019-12-18 15:32:45 776 1

原创 uniapp+nodejs微信支付h5版

安装JSSDK npm install jweixin-module --save前端代码weChatPay() { uni.request({ url: 'http://119.23.255.153:3000/wechat/h5order',//调用下单接口 data: {id}, dataType: 'json', method: 'POST' }).then(re...

2019-12-18 15:23:58 1250 2

原创 uniapp截屏并保存到相册

let pages = getCurrentPages();let page = pages[pages.length - 1];let webView = page.$getAppWebview();let bitmap = new plus.nativeObj.Bitmap('drawScreen');webView.draw(bitmap, () => { //保存到本地 ...

2019-12-14 11:18:18 4331 2

原创 linux+nginx配置https

cd ~curl https://get.acme.sh | shacme.sh --issue -d xxx.com --nginxmkdir /etc/nginx/ssl/xxx.comacme.sh --installcert -d xxx.com --key-file /etc/nginx/ssl/xxx.com/xxx.com.key --fullchain-file /et...

2019-12-10 17:02:36 141

原创 小程序微信登录获取unionid

小程序微信登录获取unionid前端登录代码服务端处理注意前端登录代码//小程序自动登录autoLogin(){ const that = this; wx.login({ success(res) { that.code = res.code wx.getSetting({ success(res) { if (res.authSetting['sco...

2019-12-09 14:18:01 748 1

原创 H5微信登录获取unionid

H5微信登录获取unionid前端跳转连接拼接接收微信重定向后的code参数服务端处理注意前端跳转连接拼接const appid = '微信appid';const scope = 'snsapi_userinfo';const path = window.location.href;const url = 'https://open.weixin.qq.com/connect/oaut...

2019-12-09 13:49:00 4512

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除