"use strict"; const common_vendor = require("../../common/vendor.js"); const utils_inviteBase64 = require("../../utils/inviteBase64.js"); const _sfc_main = { data() { return {}; }, methods: { // 保存图片 // async saveImage(){ // const shareImagesObj = this.shareImagesArr[this.shareImagesIndex]; // const params = { // id:this.shareId, // imgId:shareImagesObj.id, // } // const response = await uni.$httpHeader.post(mergeImage,params); // this.saveHeadImgFile(response.data); // }, saveBaseImgFile() { common_vendor.index.showLoading({ title: "保存中..." }); const currentBase64 = utils_inviteBase64.base64; const bitmap = new plus.nativeObj.Bitmap("base64"); bitmap.loadBase64Data( currentBase64, () => { const url = "_doc/" + (/* @__PURE__ */ new Date()).getTime() + ".png"; bitmap.save( url, { overwrite: false // 是否覆盖 // quality: 'quality' // 图片清晰度 }, (i) => { common_vendor.index.saveImageToPhotosAlbum({ filePath: url, success: () => { common_vendor.index.hideLoading(); this.$refs.uToastRef.show({ type: "success", message: "图片保存到相册成功" }); bitmap.clear(); } }); }, (e) => { common_vendor.index.hideLoading(); common_vendor.index.__f__("log", "at pages/invite_friends/invite_friends.vue:74", "图片保存失败", e); this.$refs.uToastRef.show({ type: "error", message: "图片保存失败" }); bitmap.clear(); } ); }, (e) => { common_vendor.index.hideLoading(); common_vendor.index.__f__("log", "at pages/invite_friends/invite_friends.vue:85", "图片保存失败", e); this.$refs.uToastRef.show({ type: "error", message: "图片保存失败" }); bitmap.clear(); } ); } } }; if (!Array) { const _easycom_up_image2 = common_vendor.resolveComponent("up-image"); const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast"); (_easycom_up_image2 + _easycom_up_toast2)(); } const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js"; const _easycom_up_toast = () => "../../uni_modules/uview-plus/components/u-toast/u-toast.js"; if (!Math) { (_easycom_up_image + _easycom_up_toast)(); } function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return { a: common_vendor.p({ src: "/static/invite/bg.png", width: "100%", height: "460", bgColor: "#f1f6ff00", shape: "square", radius: "10" }), b: common_vendor.o((...args) => $options.saveBaseImgFile && $options.saveBaseImgFile(...args)), c: common_vendor.sr("uToastRef", "2c3d3045-1") }; } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2c3d3045"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/invite_friends/invite_friends.js.map