机缘
我是通过老师下达的学习任务自学VUE并在CSDN上发布一条博客,渐渐地就养成了写作的习惯,慢慢成为了创作者中的一员,我创作的初心是
- 实战项目中的经验分享
- 日常学习过程中的记录
- 通过文章进行技术交流
- 通过文章表达解决问题思路
- 相当于自己的遗忘录及帮助他人解决难题
收获
- 获得了200多粉丝的关注
- 获得了192赞、59评论、2.8w阅读量
- 认识了java,python等志同道合的领域同行
- 深深爱上了写作
日常
- 创作已经是我生活的一部分
- 有限的精力下,在学习中创作,在创作中学习
- 通过自己解决问题就会把所有的错误示例及方法合集写在文章中
成就
我认为我写的好的一段代码是【微信小程序调用百度API实现图像识别功能】----项目实战
微信小程序利用百度API实现图像识别
// // pages/usercenter/shopping/shopping.js
// Page({
// /**
// * 页面的初始数据
// */
// data: {
// imageUrl: '',
// result: ''
// },
// /**
// * 生命周期函数--监听页面加载
// */
// onLoad(options) {
// },
// /**
// * 用户上传图片
// */
// chooseMedia: function() {
// const that = this
// wx.chooseMedia({
// count: 1,
// mediaType: ['image'],
// sourceType: ['album', 'camera'],
// // maxDuration: 30,
// camera: 'back',
// success: function (res) {
// const imageBase64 = res.data
// // 图片上传至百度AI接口进行图像识别
// wx.request({
// url: 'https://aip.baidubce.com/rest/2.0/image-classify/v2/advanced_general',
// method: 'POST',
// dataType: 'json',
// header: {
// 'content-type': 'application/x-www-form-urlencoded'
// },
// data: {
// access_token: '', // 替换为自己的access_token
// image: imageBase64,
// BaiDuClassify: 'true'
// },
// success: function(res) {
// console.log('图像识别成功')
// console.log(res)
// const result = res.data.result
// if (result && result.length > 0) {
// that.setData({
// classification: result[0].keyword
// })
// } else {
// that.setData({
// classification: '无法识别'
// })
// }
// },
// fail: function(res) {
// console.log('图像识别失败')
// console.log(res)
// that.setData({
// classification: '无法识别'
// })
// }
// })
// }
// })
// },
// /**
// * 生命周期函数--监听页面初次渲染完成
// */
// onReady() {
// },
// /**
// * 生命周期函数--监听页面显示
// */
// onShow() {
// },
// /**
// * 生命周期函数--监听页面隐藏
// */
// onHide() {
// },
// /**
// * 生命周期函数--监听页面卸载
// */
// onUnload() {
// },
// /**
// * 页面相关事件处理函数--监听用户下拉动作
// */
// onPullDownRefresh() {
// },
// /**
// * 页面上拉触底事件的处理函数
// */
// onReachBottom() {
// },
憧憬
我会向非常优秀的同行们努力学习,坚持创作,并把更好更有质量的创作分享给大家