摘要: ``` export const BASE_URL = `http://192.168.**.***:****` export const request = (options) =>{ return new Promise((resolve,reject)=>{ uni.request({ url 阅读全文
posted @ 2023-08-02 14:12 你笑的好瓜 阅读(28) 评论(0) 推荐(0)
摘要: ``` JSON.parse(JSON.stringify(data).replace(/title/g, 'label').replace(/id/g, 'value').replace(/childList/g, 'children')) 阅读全文
posted @ 2023-07-24 21:51 你笑的好瓜 阅读(53) 评论(0) 推荐(0)
摘要: ``` .replace('','').replace('','') ``` 阅读全文
posted @ 2023-07-12 17:49 你笑的好瓜 阅读(115) 评论(0) 推荐(0)
摘要: const time = new Date() console.log(time) //Fri Jul 07 2023 14:50:28 GMT+0800 (中国标准时间) console.log(time.toLocaleString()) //2023/7/7 14:50:28 console. 阅读全文
posted @ 2023-07-07 14:51 你笑的好瓜 阅读(199) 评论(0) 推荐(0)
摘要: .box{ overflow: hidden; text-overflow: ellipsis; white-space: normal; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; word- 阅读全文
posted @ 2023-07-05 11:12 你笑的好瓜 阅读(70) 评论(0) 推荐(0)
摘要: 对应在methods中的方法 ``` typeInput(event) { // 只能输入数字和字母的验证; const inputType = /[\W]/g //想限制什么类型在这里换换正则就可以了 this.$nextTick(function() { //这里的 this.request.i 阅读全文
posted @ 2023-07-03 11:57 你笑的好瓜 阅读(81) 评论(0) 推荐(0)
摘要: 在对应的路由模块儿中 ``` path: 'courseList/:id?' ``` router-link中书写方法如下 ``` 跳转按钮 ``` 跳转页面获得传递的参数 ``` console.log(this.$route.params) ``` 阅读全文
posted @ 2023-07-01 15:06 你笑的好瓜 阅读(181) 评论(0) 推荐(0)
摘要: 我们只需给image标签加上 mode="widthFix" 的属性即可 阅读全文
posted @ 2023-06-30 20:01 你笑的好瓜 阅读(716) 评论(0) 推荐(0)
摘要: let timeFormatSeconds = function(time) { let d = time ? new Date(time) : new Date(); let year = d.getFullYear(); let month = d.getMonth() + 1; let day 阅读全文
posted @ 2023-06-29 18:36 你笑的好瓜 阅读(59) 评论(0) 推荐(0)
摘要: const zangSan = { name:'张三', money:20, addMoney:function(arg1,arg2){ this.money = arg1 + arg2 } } const liSi = { name: '李四', money:10 } //bind方法 conso 阅读全文
posted @ 2023-06-20 15:22 你笑的好瓜 阅读(18) 评论(0) 推荐(0)