2020年5月10日

摘要: 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 阅读(2313) 评论(0) 推荐(0) 编辑
 

2020年4月26日

摘要: 连接数据库 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 阅读(471) 评论(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 阅读(85) 评论(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 阅读(133) 评论(0) 推荐(0) 编辑
 
摘要: 根目录中新建一个vue.config.js文件 粘贴以下代码 module.exports = { configureWebpack:{ resolve: { alias: { 'assets': '@/assets', 'common': '@/common', 'components': '@/ 阅读全文
posted @ 2020-04-14 10:57 dengsicode 阅读(782) 评论(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 阅读(263) 评论(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 阅读(1041) 评论(0) 推荐(0) 编辑
 

2020年4月8日

摘要: _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 阅读(160) 评论(0) 推荐(0) 编辑
 
摘要: text标签不要换行 不然会布局会占两行 影响样式的显示 阅读全文
posted @ 2020-04-08 20:09 dengsicode 阅读(1952) 评论(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 阅读(406) 评论(0) 推荐(0) 编辑