Shu-How Zの小窝

Loading...

uniCloud云开发视频教程-从基础入门到项目开发实战-uniapp进阶课文章管理系统(云函数/云数据库/云存储)

uniCloud云开发视频教程-从基础入门到项目开发实战-uniapp进阶课文章管理系统(云函数/云数据库/云存储)

https://www.bilibili.com/video/BV1PP411E7qG

513894357@qq.com

P1 1.1.uniCloud课程介绍

uni cloud 可老

P2 1.2.新建uniapp项目及创建uniCloud服务空...

2022-10-12

腾讯云收费 阿里云免费

2024-2-20 阿里云免费


P3 1.3.初识cloudFunctions云函数并调用

安装依赖 支付等...

			uniCloud.callFunction({
				name:'myCloudFun'
			}).then(res=>{
				console.log(res)
			})

P4 1.4.event云函数传参渲染列表页面

		onLoad() {
			uniCloud.callFunction({
				name:'myCloudFun',
				data:{
					name:'koo',
					age:'28'
				}
			}).then(res=>{
				console.log(res)
			})
		},
            Promise方式
            callback方式
            uniCloud.callFunction({
				name:'myCloudFun',
				data:{
					name:'koo',
					age:'28'
				},
                success(){}
			})
exports.main = async (event, context) => {
	let {name,age}=event
	return `My name is ${name},age is ${age}`
};

P5 2.1.认识数据库通过web控制台手动创建表….

微信小程序云开发

P6 2.2.获取集合Collection并get请求数据库

'use strict';
const db=uniCloud.database()
exports.main = async (event, context) => {
	let res= await db.collection('users').get()
	return res
};
云服务器

P7 2.3.count统计与add新增与批量添加

let res= await db.collection('users').count()

'use strict';
const db=uniCloud.database()
exports.main = async (event, context) => {
	let res= await db.collection('users').add({
        name:'小米',
        gender:"男"
    })
	return res
};
let res= await db.collection('users').add(
	[
        {name:'john'},
        {name:'too'}
    ]
)

P8 2.4.小案例_通过form表单采集并新增到数….
P9 2.5.doc引用与skip_orderBy_limit_field查询

'use strict';
const db=uniCloud.database()
exports.main = async (event, context) => {
	//let res= await db.collection('users').doc('id').get()
	//let res= await db.collection('users').limit(10).skip(0).get()
    //asc  desc倒序
    //let res= await db.collection('users').orderBy('_id','asc').get()
    //true保留 不显示
    let res= await db.collection('users').field({'name':true}).get()
    
    return res
};

P10 2.6.command查询筛选指令比较和逻辑运算

let res= await db.collection('users').where({
    age:28
}).get()


'use strict';
const db=uniCloud.database()
const dbCmd=db.command;
exports.main = async (event, context) => {
	let res= await db.collection('users').where({
    	//age:dbCmd.eq(30),//等于30的
        age:dbCmd.in([24,41])
        age:dbCmd.gt(20).and(dbCmd.lt(40))
    	=====
    	age:dbCmd.and(dbCmd.gt(20),dbCmd.lt(40))
    	
	}).get()
	return res
};

P11 2.7.RegExp正则模拟搜索查询

'use strict';
const db=uniCloud.database()
const dbCmd=db.command;
exports.main = async (event, context) => {
    let {keyword}=event
	let res= await db.collection('users').where({
    name:/^小$/ig	
    name:/keyword/ig	
    name:new RegExp(keyword,'ig')    
	}).get()
	return res
};

P12 2.8.update修改数据库单条或者集合

'use strict';
const db=uniCloud.database()
exports.main = async (event, context) => {
	let res= await db.collection('users').doc('id').update({
        name:'koo',
        age:77
    }),
	return {
        msg:'modify success',
        res
    }
};

let res= await db.collection('users').where({
    _id:'xx'
}).update({
        like:{ //like:['x','xx']
            0:'练琴'
        }
    tabs:{
		jobs:'xx'    
	}
    'tabs.jobs':'xxx'
    }),

P13 2.9.update结合command的数组高级操作

'use strict';
const db=uniCloud.database()
const dbCmd=db.command;
exports.main = async (event, context) => {
    let {keyword}=event
	let res= await db.collection('users').where({
    	_id:'ss' 
	}).update({
        like:dbCmd.unshift(['xx','xxx']) //like:[]向前追加
        // push  pop shift
        love:dbCmd.inc(3) //-2负数自减
    })
	return res
};

inc增加 多用户同时点赞  不覆盖 

P14 2.10.set与update的区别

let res= await db.collection('users').doc('id').set({
       name:'xx' //没写的字段会删除
    })
同set会覆盖 没写的字段会删除
dbCmd.set({
    xxx:xxx
})

let res= await db.collection('users').where({
    	_id:'ss' 
	}).update({
        like:dbCmd.push({
            each:['aaaa'],
            position:1 //从第二增加
        })
    })

P15 2.11.remove批量删除及数据库的导出与导入

let res= await db.collection('users').doc('id').remove()

P16 3.1.本地云函数与云端云函数的区别与项目介绍


P17 3.2.项目初始化及全局配置
P18 3.3.首页列表html5与css3布局


P19 3.4.跳转到新增页面布局form表单
P20 3.5.新建数据库云函数渲染列表数据


P21 3.6.form表单新增添加到云数据库中
P22 3.7.判断内容为空不准发布及发布成功后...
P23 3.8.onReachBottom触底翻页功能实现
P24 3.9.插件市场下载并使用uni-ui格式化日期...

uni-ui


P25 3.10.从列表页跳转值详情页及样式
P26 3.11.创建详情页云函数渲染到页面中

P27 3.12.uni-load-more详情页加载效果优化
P28 3.13.删除记录并对异常请求进行处理
P29 3.14.对修改页面进行数据渲染和分析
P30 3.15.完成数据的修改
P31 3.16.首页开启下拉刷新onPullDownRefresh
P32 4.1.云存储介绍及web端上传各类文件


P33 4.2.uni-file-picker上传组件的使用

P34 4.3.filepick组件其他属性及手动上传方案


P35 4.4.上传成功的回调url存储到数据库中

P36 4.5.(选学)自定义上传-flex布局上传样式

uniCloud.uploadFile

圆角还可以用0表示 border-redius:0 0 0 0;

P37 4.6.(选学)自定上传-chooselmage选择本….

uni.chooseImage选择图片

P38 4.7.(选学)自定上传-uploadFile云存储的上…..

uni.previewImage预览图片

uniCloud.uploadFile

P39 4.8.(选学)自定上传-promise封装批量上传

promise return all

P40 4.9.文章管理系统项目导入filepick上传组件
P41 4.10.实现图片上传成功后将地址存入到数...
P42 4.11.修改文章页面读取已上传的文件


P43 4.12.完成首页及详情页图片资源的显示
P44 4.13.文章管理系统在各平台效果及修改for.

P45 4.14.uniCloud打包H5配置云开发跨域

云函数上传 不上传找不到地址 云空间配置跨域

P46 4.14.(补充)前端网页托管展示打包出来.
P47 4.15.微信小程序打包配置request和uploa.
P48 4.16.安卓apk项目APP打包及知识点总结

http://ku.qingnian8.com/case/uniArticle/#/

青年帮网络 微信小程序

posted @ 2024-12-14 14:16  KooTeam  阅读(86)  评论(0)    收藏  举报