会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
dengsicode
2020年5月10日
js 一维数组转二维数组
摘要: function arrTrans(num, arr) { const newArr = []; while(arr.length > 0) { newArr.push(arr.splice(0, num)); } return newArr; }
阅读全文
posted @ 2020-05-10 15:49 dengsicode
阅读(2367)
评论(0)
推荐(0)
2020年4月26日
mongoose 系列设置
摘要: 连接数据库 const mongoose = require('mongoose') const DB_URL = 'localhost:27017' const DB_name = 'demo' mongoose.set('useCreateIndex',true) module.exports=
阅读全文
posted @ 2020-04-26 11:05 dengsicode
阅读(493)
评论(0)
推荐(0)
2020年4月18日
手写系列
摘要: 手写ajax var xmlhttp if(window.XMLHttpRequest){ xmlhttp= new XMLHttpRequest() }else{ xmlhttp =new ActiveXObject('Microsoft XMLHTTP') } xmlhttp.onreadyst
阅读全文
posted @ 2020-04-18 21:35 dengsicode
阅读(89)
评论(0)
推荐(0)
2020年4月14日
设置未登录的导航守卫
摘要: router.beforeEach((to, from, next) => { if (to.path '/login') return next() const token = sessionStorage.getItem('token') if (!token) return next('/lo
阅读全文
posted @ 2020-04-14 15:50 dengsicode
阅读(136)
评论(0)
推荐(0)
vue 添加设置别名文件
摘要: 根目录中新建一个vue.config.js文件 粘贴以下代码 module.exports = { configureWebpack:{ resolve: { alias: { 'assets': '@/assets', 'common': '@/common', 'components': '@/
阅读全文
posted @ 2020-04-14 10:57 dengsicode
阅读(793)
评论(0)
推荐(0)
2020年4月11日
移动端视口标签
摘要: <meta name="viewport" content="width=device-width, initial-scale=1.0" user-scalable=no maximum-scale =1.0 minimum-scale=1.0 >
阅读全文
posted @ 2020-04-11 13:24 dengsicode
阅读(267)
评论(0)
推荐(0)
2020年4月9日
小程序跳转页面怎么携带数据
摘要: 当数据比较少时可以直接放在query里面 发送页 wx.navigateTo({ url: '/pages/test/test?dataObj='+JSON.stringify(this.data.dataObj) } 接受页 onLoad:function(options){ this.dat.d
阅读全文
posted @ 2020-04-09 17:14 dengsicode
阅读(1062)
评论(0)
推荐(0)
2020年4月8日
data数据复杂时怎么setData
摘要: _getGoodsData(type) { const page = this.data.goods[type].page + 1 getGoodsData(type, page).then(res => { const list = res.data.data.list const oldList
阅读全文
posted @ 2020-04-08 22:51 dengsicode
阅读(168)
评论(0)
推荐(0)
小程序注意的点 text标签中一定 不要换行
摘要: text标签不要换行 不然会布局会占两行 影响样式的显示
阅读全文
posted @ 2020-04-08 20:09 dengsicode
阅读(1987)
评论(1)
推荐(0)
小程序用户登录
摘要: APP({ login() { // 登录方法 wx.login({ success: res => { const code = res.code wx.request({ url: 'http://123.207.32.32:3000/login', method: 'post', data:
阅读全文
posted @ 2020-04-08 13:24 dengsicode
阅读(475)
评论(0)
推荐(0)
下一页
公告
导航
博客园
首页
新随笔
新文章
联系
订阅
管理