logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

axios请求封装

文件路径/utils/request.jsimport axios from 'axios'// create an axios instanceconst service = axios.create({baseURL: import.meta.env.VITE_BASE_MYAPI, // url = base url + request url// withCredentials: true

#前端#javascript#vue.js
关于tab栏切换时数据接口的调用

关于tab栏切换时数据接口的调用<template><view class="container"><view class="tabBox" :style="{ position: headerPosition, top: headerTop }"><u-tabs:is-scroll="tabs.length > 4":current="curren

#uni-app
在vue项目中封装并使用WebSocket

封装websocketexport default class SocketService {/*** 单例*/static instance = nullstatic get Instance () {if (!this.instance) {this.instance = new SocketService()}return this.instance}// 和服务端连接的socket对象ws

#websocket#javascript#vue.js
JS获取数组中对象的某些值

<script>var data = [ {value: 1048, name: 'jack' ,code:123},{ value: 735, name: 'zerk' ,code:234},{ value: 580, name: 'mark' ,code:456},];var newData = [];data.map((item,index) =&

#javascript
到底了