1. Create a request.js file under utils, and then export the method
const app = getApp();
//Encapsulate request requests with promises
const POST = (url, params) => {
let promise = new P
1. Create a request.js file under utils, and then export the method
const app = getApp();
//Encapsulate request requests with promises
const POST = (url, params) => {
let promise = new P
There are some object-oriented engineering principles, which express a sentence: “A class should only know the contract of the class it uses as a parameter, or any internal contract it uses. “
<
config.js
const config = {
base_url_api: “https://douban.uieee.com/v2/movie/”,
}
export {config} http.js
import {config} from “../config”;
class HTTP {
requset({ url, method = “GET”,
Recently, the concept of the Internet of Things is relatively popular. A large number of manufacturers are rushing to occupy the level of the Internet of Things, including Huawei Internet of Things
Newbie to C#, I know that encapsulation is just a way to “protect data”. But I don’t know yet. I think the point of get and set accessors is to add tests in these methods To check whether the param
The basic controls that come with mfc are not very beautiful, so most developers will customize the class to redraw the controls. I have also accumulated a lot of redrawing of controls, such as dia
First, I think you add the vertex and the scale by 1/3 to find the origin and then the maximum distance from the vertex to the origin. This will produce a sphere containing triangles, but it doesn’
1. Encapsulate Ajax
1
2 var ajax = new Promise((resolve, reject) => {
3 var xhr = new XMLHttpRequest();
4 xhr.open(‘get’,’./test1. txt’, true);
5 xhr.send();
6 xhr.onreadystatechan
High precision formula (don’t ask me where it comes from, you can’t find it on the Internet because this is what I wrote)
🙂
1. High-precision addition: add to carry and go to zero
2.
Encapsulate a timestamp
Main application: update blogs, comments, etc. with time at the end
function dateStr(d,sign){ if(!sign){ sign=’-‘ }else{ sign = sign; } let year = d.g