![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
imooc-news
月光浇在石子路上
这个作者很懒,什么都没留下…
展开
-
unicloud云函数请求数据的一般过程
'use strict';const db=uniCloud.database()const $ = db.commandexports.main = async (event, context) => { //event为客户端上传的参数 const { user_id } const userInfo= await db.collection('user').doc(user_id).get() userInfo=userInfo.data[0] const lists=.原创 2022-03-09 10:59:52 · 1088 阅读 · 0 评论 -
js时间格式化函数
// 时间格式化export const parseTime=(time)=>{ if(typeof time ==='string'){ time= parseInt(time) } const format='{y}-{d}-{m} {h}:{i}:{s}' const date = new Date(time); const formatObj={ y:date.getFullYear(), m:date.getMonth()+1, d:date.getDate().原创 2022-03-02 16:17:33 · 1194 阅读 · 0 评论 -
Error: errCode: InternalServerError | errMsg: ‘$addToSet‘ is empty. You must specify a field like s
传参!云函数配置传参的时候一定要注意搞了半天,原来是把article_id写错了原创 2022-03-02 08:41:10 · 670 阅读 · 0 评论 -
AtoB,BtoA评论回复--递归实现xBulid
引用自身组件 import commentsBox from '@/components/comments-box/comments-box.vue'components:{ commentsBox,}, 在页面引用即可,注意:没有限制会陷入无限引用的情况,需要条件限制一下,本项目中使用的是 ...原创 2022-02-16 16:37:06 · 242 阅读 · 0 评论 -
imooc-news项目开发知识点回顾(一)
目前完成了首页的学习开发,包括搜索、tab切换、收藏按钮的实现、标签管理工程uniCloud的配置创建项目是要勾选启用uniCloud云开发 注意mainfest中的配置appId ,需要注意的是,现在db_init.json在database中配置底部tab目录的配置"tabBar":{ "color":"#666", "selectedColor":"#f07373",//选中后的颜色 "backgroundColor":"#fff", "list":[{...原创 2022-01-21 16:43:43 · 484 阅读 · 0 评论