9.17提交

This commit is contained in:
zoujiandong
2025-09-17 09:24:02 +08:00
parent 7799c04883
commit 8883dded38
14 changed files with 152 additions and 62 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ let token = wx.getStorageSync(tokenStr);
}else if (Number(res.data.code) == 30007 ) {
wx.hideLoading()
let redirectUrl=formatUrl();
wx.setStorageSync(tokenStr,'');
wx.reLaunch({
url: '/case/pages/mobileLogin/mobileLogin?redirectUrl='+redirectUrl
});
+32 -31
View File
@@ -42,9 +42,9 @@ function formatTime(date) {
}
// 点击按钮触发的事件
function tapBtn(e, _this, pageType,from) {
function tapBtn(e, _this, pageType,from,isSmall=false) {
let btnType = e.target.dataset.type;
let c = {};
switch (btnType) {
@@ -94,14 +94,14 @@ function formatTime(date) {
return;
// 保存
case 'save':
saveImg(_this, pageType,from);
saveImg(_this, pageType,from,isSmall);
return;
default:
return;
}
}
function saveImg(_this, pageType,from) {
function saveImg(_this, pageType,from,isSmall) {
let c = {};
if (pageType === 1) {
c.canvasHeight = 50;
@@ -177,7 +177,7 @@ function formatTime(date) {
// }
}
function _canvaseSaveToImg(_this,from) {
function _canvaseSaveToImg(_this,from,isSmall) {
let that=_this;
console.log(from)
console.log(_this);
@@ -187,6 +187,7 @@ function formatTime(date) {
wx.canvasToTempFilePath({
canvasId: 'myCanvas',
fileType:'png',
quality:isSmall?0.8:1,
success: function (res) {
// wx.previewImage({
// urls:[res.tempFilePath],
@@ -197,32 +198,32 @@ function formatTime(date) {
name:from
})
// 转图片成功,继续调用存储相册接口
// wx.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// // 存储成功
// success: function (r) {
// wx.hideLoading();
// wx.showToast({
// title: '保存成功',
// })
// _this.setData({
// saving: false,
// showPaint:false
// })
// },
// // 失败弹窗
// fail: function (res) {
// wx.hideLoading();
// wx.showToast({
// title: '保存失败',
// icon: 'loading',
// })
// _this.setData({
// saving: false,
// showPaint:false
// })
// }
// })
// wx.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// // 存储成功
// success: function (r) {
// wx.hideLoading();
// wx.showToast({
// title: '保存成功',
// })
// _this.setData({
// saving: false,
// showPaint:false
// })
// },
// // 失败弹窗
// fail: function (res) {
// wx.hideLoading();
// wx.showToast({
// title: '保存失败',
// icon: 'loading',
// })
// _this.setData({
// saving: false,
// showPaint:false
// })
// }
// })
},
fail: function (res) {
// canvas转图片失败