SHORT {{ appinfos.short }}
@@ -19,7 +19,7 @@
width="288">
import {apputils} from "../restful";
import VueQr from 'vue-qr';
- import {ImgToBase64} from "../utils"
export default {
name: "FirAppInfosBase",
@@ -103,19 +102,6 @@
},
data() {
return {
- save_qr() {
- let dtype = "I";
- if (this.master_release.release_type === 0) {
- dtype = "A";
- }
- let a = document.createElement('a');
- // 下载图名字
- a.download = this.appinfos.name + '_' + dtype + "_下载码";
- //url
- a.href = this.$refs.qr.$el.src;
- //合成函数,执行下载
- a.dispatchEvent(new MouseEvent('click'))
- },
qrinfo: {
logoScale: 0.3,
logoCornerRadius: 12,
@@ -123,7 +109,6 @@
margin: 20
},
icon_url: "",
- b64_icon_url: '',
appinfos: {},
master_release: {},
allapp: [],
@@ -133,6 +118,19 @@
}
},
methods: {
+ save_qr() {
+ let dtype = "I";
+ if (this.master_release.release_type === 0) {
+ dtype = "A";
+ }
+ let a = document.createElement('a');
+ // 下载图名字
+ a.download = this.appinfos.name + '_' + dtype + "_下载码";
+ //url
+ a.href = this.$refs.qr.$el.src;
+ //合成函数,执行下载
+ a.dispatchEvent(new MouseEvent('click'))
+ },
short_url() {
return location.origin + '/' + this.appinfos.short;
},
@@ -186,9 +184,6 @@
},
set_icon_url() {
this.icon_url = this.$store.state.currentapp.master_release.icon_url;
- ImgToBase64(this.icon_url, dataURL => {
- this.b64_icon_url = dataURL;
- })
},
}, created() {
diff --git a/fir_client/src/utils/index.js b/fir_client/src/utils/index.js
index fde4c37..f241c9e 100644
--- a/fir_client/src/utils/index.js
+++ b/fir_client/src/utils/index.js
@@ -276,7 +276,7 @@ export function ImgToBase64(url, callback) {
let Img = new Image(),
dataURL = '';
Img.src = url + '?v=' + Math.random();
- Img.setAttribute('crossOrigin', 'Anonymous');
+ Img.crossOrigin = 'Anonymous';
Img.onload = function () {
let canvas = document.createElement('canvas'),
width = Img.width,
diff --git a/fir_ser/fir_ser/settings.py b/fir_ser/fir_ser/settings.py
index 5650d74..2d52c8f 100644
--- a/fir_ser/fir_ser/settings.py
+++ b/fir_ser/fir_ser/settings.py
@@ -196,7 +196,9 @@ THIRD_PART_CONFIG = {
'name': 'local',
'type': 0,
'auth': {
- 'domain_name': 'app.hehelucky.cn', # 正式环境需要填写正式的访问域名,如果配置cdn,可以填写cdn的域名,仅支持阿里云 cdn
+ 'domain_name': 'app.hehelucky.cn',
+ # 正式环境需要填写正式的访问域名,如果配置cdn,可以填写cdn的域名,仅支持阿里云 cdn,
+ # 开启cdn之后,如果该域名和服务器域名不相同,需要设置阿里云cdn 缓存配置,自定义HTTP响应头 添加 Access-Control-Allow-Origin * 才可以
'is_https': True,
'download_auth_type': 0, # 0:不开启token 1:本地token 2:cdn 开启cdn,并且使用本地存储,使用阿里云cdn进行url鉴权,
'cnd_auth_key': '', # 当cdn为阿里云并且 download_auth_type=2 的时候 生效,需要 开启阿里云OSS私有Bucket回源