ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] > [官方文档](https://www.uviewui.com/) ## 教程 ### js #### toast 通知 `this.$u.toast('Hello uView!');` #### Http请求 ``` // 不带header this.$u.post('http://www.example.com', { id: 3, menu: 1 }).then(res => { console.log(res); }); // 带上header(对象形式),由于header为第三个参数,如果不需要请求参数,第二个参数传一个空对象"{ }"即可 this.$u.get('http://www.example.com', {}, { token: 'xyz' }).then(res => { console.log(res); }); ``` #### API集中管理 - 封装http 把api 放入一个文件中 [参考](https://www.uviewui.com/js/apiManage.html) ``` this.$u.api.getSearch().then(res => { console.log(res); }) ``` ### 工具库 * [时间格式化](https://www.uviewui.com/js/time.html) * [路由跳转](https://www.uviewui.com/js/route.html) * [数组乱序](https://www.uviewui.com/js/randomArray.html) * [全局唯一标识符](https://www.uviewui.com/js/guid.html) * [颜色转换](https://www.uviewui.com/js/colorSwitch.html) * [颜色值](https://www.uviewui.com/js/color.html) * [对象转URL参数](https://www.uviewui.com/js/queryParams.html) * [规则校验](https://www.uviewui.com/js/test.html) * [md5加密](https://www.uviewui.com/js/md5.html) * [随机数值](https://www.uviewui.com/js/random.html) * [去除空格](https://www.uviewui.com/js/trim.html) * [节点布局信息](https://www.uviewui.com/js/getRect.html) * [小程序分享](https://www.uviewui.com/js/mpShare.html) ### 页面 * [垂直分类(类似外卖索引页)](https://www.uviewui.com/layout/menu.html) * [提交订单栏](https://www.uviewui.com/layout/submitBar.html) * [评论列表](https://www.uviewui.com/layout/comment.html) * [订单列表](https://www.uviewui.com/layout/order.html) * [登录界面](https://www.uviewui.com/layout/login.html) * [收货地址](https://www.uviewui.com/layout/address.html) * [城市选择](https://www.uviewui.com/layout/citySelect.html)