Commit ac83def6 authored by zhengke's avatar zhengke

修改

parent d6c6a414
...@@ -147,7 +147,6 @@ export default { ...@@ -147,7 +147,6 @@ export default {
}; };
}, },
onLoad(option) { onLoad(option) {
console.log(option,'option')
this.mc = this.$uiConfig.mainColor; this.mc = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary; this.secondary = this.$uiConfig.secondary;
let c = this.$uiConfig.is_bang ? 80 : 52; let c = this.$uiConfig.is_bang ? 80 : 52;
......
...@@ -87,7 +87,6 @@ export default { ...@@ -87,7 +87,6 @@ export default {
(res) => { (res) => {
uni.hideNavigationBarLoading(); uni.hideNavigationBarLoading();
that.fenxqrcode = that.host2 + res.data; that.fenxqrcode = that.host2 + res.data;
console.log(that.fenxqrcode);
let tmpTimeout = setTimeout(() => { let tmpTimeout = setTimeout(() => {
that.drawCtx(); that.drawCtx();
clearTimeout(tmpTimeout); clearTimeout(tmpTimeout);
...@@ -104,7 +103,6 @@ export default { ...@@ -104,7 +103,6 @@ export default {
uni.getImageInfo({ uni.getImageInfo({
src: that.bgPic, src: that.bgPic,
success: function (image) { success: function (image) {
console.log("绘制");
ctx.drawImage(image.path, 0, 0, 750, 1344); //绘制图 ctx.drawImage(image.path, 0, 0, 750, 1344); //绘制图
uni.getImageInfo({ uni.getImageInfo({
//头像 //头像
...@@ -112,12 +110,13 @@ export default { ...@@ -112,12 +110,13 @@ export default {
success: function (image) { success: function (image) {
ctx.save(); ctx.save();
ctx.beginPath(); ctx.beginPath();
// ctx.arc(595 + 63, 1200 + 63, 63, 0, Math.PI * 2); if(that.type==0){
ctx.arc(that.qrCodeLeft + that.halfCode, that.qrCodeTop + that.halfCode, that.halfCode, 0, Math.PI * 2);
ctx.arc(that.qrCodeLeft + that.halfCode, that.qrCodeTop + that.halfCode, that.halfCode, 0, Math.PI * 2); ctx.clip();
}
ctx.setFillStyle("#ffffff"); ctx.setFillStyle("#ffffff");
ctx.fill(); ctx.fill();
ctx.clip();
// ctx.drawImage(image.path, 595, 1200, 126, 126); //绘制头像 // ctx.drawImage(image.path, 595, 1200, 126, 126); //绘制头像
ctx.drawImage(image.path, that.qrCodeLeft, that.qrCodeTop, that.qrCodeSize, that.qrCodeSize); //绘制头像 ctx.drawImage(image.path, that.qrCodeLeft, that.qrCodeTop, that.qrCodeSize, that.qrCodeSize); //绘制头像
that.drawQrCode(ctx); that.drawQrCode(ctx);
...@@ -202,7 +201,6 @@ export default { ...@@ -202,7 +201,6 @@ export default {
}, },
drawQrCode(ctx) { drawQrCode(ctx) {
let that = this; let that = this;
console.log("生成海报12");
setTimeout(() => { setTimeout(() => {
ctx.draw(false, () => { ctx.draw(false, () => {
uni.canvasToTempFilePath( uni.canvasToTempFilePath(
...@@ -217,7 +215,6 @@ export default { ...@@ -217,7 +215,6 @@ export default {
success: (res) => { success: (res) => {
uni.hideLoading(); uni.hideLoading();
that.tempPic = res.tempFilePath; that.tempPic = res.tempFilePath;
console.log(res,'res');
}, },
fail(e) { fail(e) {
console.log(e); console.log(e);
...@@ -254,7 +251,6 @@ export default { ...@@ -254,7 +251,6 @@ export default {
uni.authorize({ uni.authorize({
scope: "scope.writePhotosAlbum", scope: "scope.writePhotosAlbum",
success: (res) => { success: (res) => {
console.log("11111");
}, },
fail: (res) => { fail: (res) => {
uni.showModal({ uni.showModal({
...@@ -266,7 +262,6 @@ export default { ...@@ -266,7 +262,6 @@ export default {
if (res.confirm) { if (res.confirm) {
uni.openSetting({ uni.openSetting({
success: (res) => { success: (res) => {
console.log(res);
if (res.authSetting["scope.writePhotosAlbum"]) { if (res.authSetting["scope.writePhotosAlbum"]) {
that.preservation(); that.preservation();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment