05 2021 档案
摘要:父页面 <iframe src="http://localhost:8080/index.html" id="vrId"></iframe> 父页面接收子页面的参数 mounted(){ window.addEventListener('message', function(e){ console.
阅读全文
摘要:说起来也奇怪,我在react中使用的是axios来请求数据,pc端和安卓端都能成功,部分iOS机型请求状态为0(status为0),回调 res为undefined。找了大半天也不知道原因,后来用 fetch 来请求数据如图(1-1)在iOS中正常。后面猜想是不是请求头上的原因,结果还真是这个问题,
阅读全文
摘要:import React,{ useState ,useRef} from 'react' const VrCornucopiaHome = () => { const [projectContent,setProjectContent] = useState() const [projectCon
阅读全文
摘要:html import React,{ useState } from 'react' const VrCornucopiaHome = () => { const bbbbb = () => { alert(1) } return ( <button type="button" onClick={
阅读全文
摘要:使用route 之前需要先安装 react-router-dom yarn add react-router-dom -D 在src根目录下新建router.js文件 //router.jsimport React,{ Component } from 'react' import {Route,
阅读全文
摘要:this.props.history.push('/home') 推荐使用 路由方式为 HashRouter
阅读全文
摘要:C:\Users\DELL\AppData\Local\Yarn\Data\global\node_modules\.bin
阅读全文
摘要:废话不多说,只讲干货axios的封装请移步到 https://www.cnblogs.com/tlfe/p/11911915.html 挂载在React原型上的时候是这么写的: 在index.js文件中 引入axios文件 import axios from './api/api' React.Co
阅读全文
摘要:在做H5页面支付的时候,提交后台返回的form表单,拉取支付宝支付,但是取消支付,或者支付失败与成功就会出现空白页 我刚开始这么写的,结果就是处理起来非常的麻烦。 document.querySelector('body').innerHTML = res.msg; // 调用submit 方法 d
阅读全文
摘要:import React from 'react' import './earnings.scss' import { ListView, PullToRefresh } from 'antd-mobile'; export default class Earnings extends React.
阅读全文

浙公网安备 33010602011771号