? ????? ??? ???? ???? ? ? ?? ???? ??? ?? ?? ????? ?? ? ?? ????. WeChat ???? ?? ??? ???? ???? ??? ???? ? ? ?? ???? ????? ????. ???? ??? ? ???!
? ??? ? ?????. ?? ?? ????? ??? ? ??? ?? ??? ? ??? ???? ?? ????. ?? ?? ??? ? ?? ?? ????? ?? ??????, ??? ?? ????. ??? ??? ??? ???.
?? ?? ???:
?? ????? ?? ???? ?????.
1??: ?? WeChat ??? ?? ???? ?? ??? ??? ????. ????? ?? ??? ??? ?? ????. -definition. ?? ? ???? ???? ?? ????? ?? ??? ???? ???? ???.
getUserProfile(e) { console.log(e) let that = this; wx.getUserProfile({ desc: '僅用于生成頭像使用', success: (res) => { var url = res.userInfo.avatarUrl; while (!isNaN(parseInt(url.substring(url.length - 1, url.length)))) { url = url.substring(0, url.length - 1) } url = url.substring(0, url.length - 1) + "/0"; res.userInfo.avatarUrl = url; console.log(JSON.stringify(res.userInfo)); that.setData({ userInfo: res.userInfo, hasUserInfo: true }) that.drawImg(); } }); },
2??: ??? ?? 1???? ?? ?? ??? ??? ???? ?? ??? ??? ?, ?? ????? cavas ????? ??? ?????.
drawImg() { let that = this; wx.showLoading({ title: '生成頭像中...', }) let promise1 = new Promise(function (resolve, reject) { wx.getImageInfo({ src: that.data.userInfo.avatarUrl, success: function (res) { resolve(res); } }) }); var mask_id = that.data.now_mask; let promise2 = new Promise(function (resolve, reject) { wx.getImageInfo({ src: `../../assets/img/mask0${mask_id}.png`, success: function (res) { console.log(res) resolve(res); } }) }); Promise.all([ promise1, promise2 ]).then(res => { console.log(res) var windowWidth = wx.getSystemInfoSync().windowWidth var context = wx.createCanvasContext('myAvatar'); var size = windowWidth /750 * 500 // var size = 500 context.drawImage(res[0].path, 0, 0, size, size); context.draw(true) context.save(); context.drawImage('../../'+res[1].path, 0, 0, size, size); context.draw(true) context.save(); }) wx.hideLoading() },
3??: ??? ??? ?? ??? ???????.
canvasToTempFile(){ if(!this.data.userInfo){ wx.showModal({ title: '溫馨提示', content: '請先點擊上方獲取微信頭像', showCancel: false, }) return } var windowWidth = wx.getSystemInfoSync().windowWidth var size = 500 // var dpr = 750 / windowWidth wx.canvasToTempFilePath({ x: 0, y: 0, height: size, width: size, canvasId: 'myAvatar', success: (res) => { wx.saveImageToPhotosAlbum({ filePath: res.tempFilePath, success: result => { wx.hideLoading(); wx.showModal({ content: '圖片已保存到相冊,請前往微信去設置喲!', showCancel: false, success: function(res) { if (res.confirm) { console.log('用戶點擊確定'); } } }) }, fail(e) { wx.hideLoading(); console.log("err:" + e); } }) } }); },
??? ?? ?? ??? ?????.
????? ?? ???? ??? ????. ??? ??? ???? ??? ? ????.
????? ?? ????? ?? ?????: https://github.com/hackun666/new-year- ??
?? ??? ? ?? ????, ??? ??? ??? ????? ????!
???? : https://juejin.cn/post/7057807283463389191
??? : hackun
[?? ?? ?? : ?? ???? ?? ????]
? ??? ??? ? ? ??? ?? ???? ???? ?? ?? ????? ??? ???.? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??? ??? ????? ???? ?? WeChat? ???? ?? ???? ?? ??????? ?????. WeChat ?? ????? ???? ???? ??????? ?????? ???? ??? ?? ????? ?? ???? ? ?? ??? ?? ??? ??? ? ????. ? ????? Python? ???? WeChat ???? ???? ??? ?????. 1. ?? Python? ???? WeChat ???? ???? ?? ?? Python ?????? ???? ???. ???? wxpy? itchat ? ?????? ???? ?? ????. wxpy? ?? ?????

WeChat ?? ?????? ?? ??? ?? ?? WeChat ?? ?????? ?? ??? ??? ???? ?? ??? ??? ????? ?? ??? ??? ???? ? ?? ???? ????? ?????. ??? WeChat ????? ?? ??? ??? ???? ??? ??? ???? ?? ?? ??? ?????. ??, ?? ????? ??? ???? ??? ? ?? ?? ??? ???? ???. ??? ?? ??? ???? ?? ??? ?? ??? ?? ??? ???? ?? ????. <--index.wxml- ->&l

10? 31? ? ???? ??? ??? ?? 5? 27? Ant Group? '?? ?? ????'? ????? ????? ?? ??? ??? ?????. Alipay? '?? ?? - ??? ?? ??' ?? ????? ??????. ?? ???? ?? ??? ?????? ???? ?? ???? ?? ??? ?? ??? ???? Alipay? ?? ??? ?? ??? ???? ? ??? ???. ?? ???? "????", "????" ?? ???? ???? "????" ???? ??? ? ????. ?? ?????? ???? ????? ?? ? ???? ?? ?? ??? ??? ??? ? ??? ?? ? Alipay ????? ?? ?????? ?? ??? ?????. ? ??????? ?? ??????? ?? ?? ?? ?? ??? ??? ? ??? ?????. ? ?? ??? ??? ???? ?? ??? ?? ???????. ??? ??

?? ????? ??? ??? ? ????. ?? ??: 1. "react-reconciler"? ???? ???? ???? DSL? ?????. 2. DSL? ?? ???? ????? ?? ?? ???? ?? ??? ????. 3. npm? ???? ???? ?????. ???? npm? ?????. 4. ??? ???? ???? ??? ?? API? ???? ??? ?????.

???? ?? ????? H5 ??? ??? ????? ???? ?? ??? ?????. ?? ??? ???? ??? ????? ???? ?? ?? ????? H5? ?? ?????? ??? ?????. ??? ??? ?? ?????? uniapp? ?? ??? ???? ?? ????? H5 ?? ??? ???? ???? ?? ???? ?? ???? ? ????. ? ????? uniapp? ?? ????? H5 ?? ??? ??? ???? ??? ???? ???? ?? ??? ?????. 1. ??? ??? ??

?? ?? ?? ?? ????? ??? ? ?? ??? ?? ????, ?? ?????? ?? ?? ??? ???? ???? ??? ?? ???????.

?? ???? x01 ?? ?? ??, ?? ???? ??? ???? ???? ?????. ?? ??? ??? ??? ? ???? ?? ??? ?? ? ??? ?????. ?? ???? ???? ???? ??? ?? ??? ?????. x02 ?????? ??? ???? ?? ?????. ?????? ??? ???? ??? ?? ???? ?? ??? ???? ?????. ??? ??? ??? ????? ????? ??? ? ?? ???? ???? ???. ??? ??? ?? ???? ?? ??? ??? ?? ?????. ????, ??

PHP ? ?? ????? ??? ?? ?? ? ?? ?? ??? ?? ?? ? ?? ??? ?? ???? ??? ?? ? ??? ?????. ??? ??? ??? ?? ?? ?? ? ?? ??? ?? ???? ??? ???? ????. ?? ???? PHP? ???? ? ?? ???? ?? ?????. ? ????? PHP ? ?? ?????? ??? ?? ?? ? ?? ?? ?? ??? ???? ?? ?? ??? ?????. 1. PHP? ???? PHP??? ?? ????? ??? ? ????.
