# uniapp-web **Repository Path**: littleFishShop/uniapp-web ## Basic Information - **Project Name**: uniapp-web - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-04-02 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 用户登录相关 在方法中直接使用 * 判断是否登录 > 一般的操作就是判断下,如果没有登录,就跳转到登录页 ``` this.$store.state.isLogin 返回true,false ``` * 获取手机号 ``` this.$store.state.telphone ``` * 获取userid ``` this.$store.state.userId ``` 以上这两个必须要登录,但是在开发期间就可以直接使用 ## 发送请求 1. 在main.js中修改下边这个链接为你的后端地址(大概在23行左右) ``` js interfaceUrl: function() { //接口地址,把这个改成你自己的 return "http://localhost:7001/"; }, ``` 2. 在要请求的位置这样写 ```js this.$tui.request(url, postData, method, type, hideLoading) .then(res=>{ //调用成功的操作,res就是后端返回结果 }) .catch(err=>{ //调用失败的操作 }) ```