|
@@ -5,21 +5,42 @@ Page({
|
|
|
* 页面的初始数据
|
|
|
*/
|
|
|
data: {
|
|
|
-
|
|
|
+ dataPositionObj:{
|
|
|
+ top:'156rpx',
|
|
|
+ left:'286rpx'
|
|
|
+ },
|
|
|
+ propSize:{
|
|
|
+ top:'8cm',
|
|
|
+ right:'8cm',
|
|
|
+ bottom: '8cm',
|
|
|
+ left:'8cm',
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
-
|
|
|
+ console.log('页面加载完成')
|
|
|
+ wx.getSystemInfo({
|
|
|
+ success: function (res) {
|
|
|
+ let rpx = res.windowWidth / 750;
|
|
|
+ console.log(res.windowWidth)
|
|
|
+ const ctx = wx.createCanvasContext('madeContent');
|
|
|
+ ctx.drawImage('/images/customized/cup_black_big.png', 0, 0, 750 * rpx, 588 * rpx)
|
|
|
+ ctx.draw()
|
|
|
+ },
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
*/
|
|
|
onReady: function () {
|
|
|
-
|
|
|
+ // console.log('页面开始准备中')
|
|
|
+
|
|
|
+ const ctx = wx.createCanvasContext('madeBox');
|
|
|
+ // Canvas.SetLeft(ctx, '10rpx');
|
|
|
},
|
|
|
|
|
|
/**
|