龙风
龙风
## 本地环境如何配置https 当我们需要对高德地图本地联调时,发现需要的是https环境。这时无法调用定位接口~此时需要给本地环境配置一个https环境 ### 准备工作 需要解决以下两个问题: 1. 配置https环境,首先需要配置https相关证书,那么如何获取证书呢? 2. 证书配置完成后,如何配置到开发环境中 ### 如何获取https证书 证书一般有两个 - `cert-file` - `key-file` 这里我们使用 `mkcert` 来生成证书,对于`mkcert` 可以[点击这里了解](https://www.npmjs.com/package/mkcert) ```bash brew install mkcert // 对于mac环境我们可以使用brew安装 ``` 开始生成相关证书。----- 以域名**framework.bnq.com.cn**举例子...
### 需求背景: - 每当前端更改代码,测试总是反馈还有bug,我明明已经改好了,还要通知测试刷新页面,好累喔! - 用户不能及时刷新获取最新功能代码 ```jsx import React from 'react'; import axios from 'axios'; import { notification, Button } from 'antd'; const CRMSYSTEMFRONTVERSION = 'crmSystemFrontVersion'; function CheckHash() { this.uploadNotificationShow...
IOS active 状态失效问题解决方案 ```js useEffect(() => { document.addEventListener('touchstart', () => {}, false); return () => { document.removeEventListener('touchstart', () => {}, false); }; }, []); ```
```jsx import React, { useEffect, useState } from 'react' import { Button, Avatar, Spin } from 'antd' import { toPng, toJpeg, toBlob, toPixelData, toSvg } from 'html-to-image' import F2 from...
```js // 构造函数的参数是一个异步任务 function Promise(task) { // 初始化工作 let that = this // 缓存this that.status = 'pending' // 默认状态为pending that.value = undefined // 此变量是promise的结果,成功的结果或失败的原因 // 成功回调函数 that.onResolvedCallbacks = [] //...
```tsx import React, { useEffect, useRef, useState } from 'react' import { createUseStyles } from 'react-jss' import AMapLoader from '@amap/amap-jsapi-loader' import zhizhen from '@/assets/images/zhizhen.png' const styles = createUseStyles({ content: {...
## 01 - for ```js const files = [ 'foo.txt ', '.bar', ' ', 'baz.foo' ]; let filePaths = []; for (let file of files) { const fileName = file.trim();...
 ## 效果代码 ```js import React from 'react' import SimulateInput from './component/SimulateInput/SimulateInput' const App = () => { return ( 请输入8位工号 {}} /> 请输入6位工号 {}} /> 请输入6位数密码 {}} /> )...
```js import React, { useState, useEffect } from 'react' import { Table } from 'antd' const App = () => { const [tableData, setTableData] = useState([]) const getTableData = ()...
## 实现快照沙箱 ```js // 沙箱就是互不影响,创造一个干净的环境, 当切换时,可以选择丢弃属性或恢复属性 // js沙箱 proxy // 快照沙箱 将区别保存起来 class SnpashotSandBox { constructor() { this.proxy = window this.modifyPropsMap = {} this.active() } active() { this.windowSnpashot = {}...