diff --git a/pageBwc/index/index.vue b/pageBwc/index/index.vue
index 5c393b3..c91d0e9 100644
--- a/pageBwc/index/index.vue
+++ b/pageBwc/index/index.vue
@@ -83,6 +83,9 @@
title: '保存成功'
})
Object.assign(form, res)
+ setTimeout(()=>{
+ uni.navigateBack()
+ },1500)
}
onShow(() => {
getlist()
diff --git a/pageConsumables/editConsumables.vue b/pageConsumables/editConsumables.vue
index 759bda4..e548a7b 100644
--- a/pageConsumables/editConsumables.vue
+++ b/pageConsumables/editConsumables.vue
@@ -25,7 +25,7 @@
耗材价格
-
+
@@ -33,7 +33,7 @@
预警值
-
+
+
+
{
})
-
const saveImage = () => {
- // #ifdef APP-PLUS
uni.downloadFile({
url: vdata.QrcodeUrl,
success: (res) => {
@@ -65,64 +63,10 @@ const saveImage = () => {
infoBox.showErrorToast('保存失败')
}
})
- // #endif
- //#ifdef MP-WEIXIN
- downloadQR()
- //#endif
-}
-//#ifdef MP-WEIXIN
-function downloadQR() {
- wx.getSetting({
- //获取权限
- success(res) {
- console.log(res)
- if (res.authSetting['scope.writePhotosAlbum']) {
- saveWxQrcodeImg(vdata.QrcodeUrl)
- } else {
- wx.authorize({
- scope: 'scope.writePhotosAlbum',
- success() {
- saveWxQrcodeImg(vdata.QrcodeUrl)
- },
- })
- }
- },
- })
-}
-//#endif
-
-const saveWxQrcodeImg = (data) => {
- const fileManager = wx.getFileSystemManager()
- console.log( )
- const filePath = wx.env.USER_DATA_PATH + '/qrCode'+new Date().getTime()+'.png'
- //这块是定义图片的名称,可自定义其他
- fileManager.writeFile({
- filePath: filePath,
- data: data.slice(22),
- encoding: 'base64',
- success: (res) => {
- wx.saveImageToPhotosAlbum({
- filePath: filePath,
- success: function (res) {
- //保存成功
- infoBox.showSuccessToast('保存成功')
- },
- fail: function (err) {
- console.log(err)
- //保存失败
- infoBox.showErrorToast('保存失败')
- },
- })
- },
- fail: (err) => {
- infoBox.showErrorToast('保存失败')
- },
- })
}
-