优化小程序生成逻辑
This commit is contained in:
parent
e6b20f74a3
commit
8d234e2b3a
1
dist/css/chunk-45f2d0f2.83e7f2fe.css
vendored
1
dist/css/chunk-45f2d0f2.83e7f2fe.css
vendored
@ -1 +0,0 @@
|
||||
.el-image-viewer__wrapper{z-index:3000!important}[data-v-336e9018]:export{menuBg:#304156;menuText:#bfcbd9;menuActiveText:#409eff}.bottom[data-v-336e9018]{margin-top:13px;line-height:12px;display:flex;justify-content:space-between;align-items:center}.bottom span[data-v-336e9018]{font-size:13px;color:#999}.sub-bottom[data-v-336e9018]{display:flex;justify-content:space-between}.button[data-v-336e9018]{padding:0;min-height:auto;float:right}.image[data-v-336e9018]{width:100%;display:block}.one-block[data-v-336e9018]{border:1px solid #ebebeb;border-radius:3px;transition:.2s;padding:24px;margin-bottom:24px;box-shadow:0 2px 12px 0 rgba(0,0,0,.1)}.infinite-list .infinite-list-item[data-v-336e9018]{display:flex;align-items:center;justify-content:space-between;height:30px;background:#e8f3fe;margin:10px;color:#7dbcfc}.infinite-list[data-v-336e9018]{height:300px;-webkit-padding-start:0;padding-inline-start:0}.history_content[data-v-336e9018]{width:80%;line-height:30px;padding:0 10px}
|
1
dist/css/chunk-628878f0.5ab99601.css
vendored
Normal file
1
dist/css/chunk-628878f0.5ab99601.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.el-image-viewer__wrapper{z-index:3000!important}[data-v-cdbb6910]:export{menuBg:#304156;menuText:#bfcbd9;menuActiveText:#409eff}.bottom[data-v-cdbb6910]{margin-top:13px;line-height:12px;display:flex;justify-content:space-between;align-items:center}.bottom span[data-v-cdbb6910]{font-size:13px;color:#999}.sub-bottom[data-v-cdbb6910]{display:flex;justify-content:space-between}.button[data-v-cdbb6910]{padding:0;min-height:auto;float:right}.image[data-v-cdbb6910]{width:100%;display:block}.one-block[data-v-cdbb6910]{border:1px solid #ebebeb;border-radius:3px;transition:.2s;padding:24px;margin-bottom:24px;box-shadow:0 2px 12px 0 rgba(0,0,0,.1)}.infinite-list .infinite-list-item[data-v-cdbb6910]{display:flex;align-items:center;justify-content:space-between;height:30px;background:#e8f3fe;margin:10px;color:#7dbcfc}.infinite-list[data-v-cdbb6910]{height:300px;-webkit-padding-start:0;padding-inline-start:0}.history_content[data-v-cdbb6910]{width:80%;line-height:30px;padding:0 10px}
|
2
dist/index.html
vendored
2
dist/index.html
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
dist/js/chunk-45f2d0f2.ee27028a.js
vendored
2
dist/js/chunk-45f2d0f2.ee27028a.js
vendored
File diff suppressed because one or more lines are too long
1
dist/js/chunk-45f2d0f2.ee27028a.js.map
vendored
1
dist/js/chunk-45f2d0f2.ee27028a.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-628878f0.3fa967f7.js
vendored
Normal file
2
dist/js/chunk-628878f0.3fa967f7.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/js/chunk-628878f0.3fa967f7.js.map
vendored
Normal file
1
dist/js/chunk-628878f0.3fa967f7.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
"url": "/css/404.96fe1c26.css"
|
||||
},
|
||||
{
|
||||
"revision": "e437fc0fa9aabcee124d",
|
||||
"revision": "839ababd763a6d1f69e8",
|
||||
"url": "/css/app.82284a16.css"
|
||||
},
|
||||
{
|
||||
@ -59,10 +59,6 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
"revision": "fea717fde85b2cb071d2",
|
||||
"url": "/css/chunk-41e8e32c.ab6179cd.css"
|
||||
},
|
||||
{
|
||||
"revision": "b74a26d597f4b7a864d5",
|
||||
"url": "/css/chunk-45f2d0f2.83e7f2fe.css"
|
||||
},
|
||||
{
|
||||
"revision": "bf76dc2b5c75d5dae3bb",
|
||||
"url": "/css/chunk-4bf5c744.d25b5fbc.css"
|
||||
@ -91,6 +87,10 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
"revision": "4642b2be19b2a29c2c0f",
|
||||
"url": "/css/chunk-5823cdba.be777eac.css"
|
||||
},
|
||||
{
|
||||
"revision": "e55842235561775a1c8e",
|
||||
"url": "/css/chunk-628878f0.5ab99601.css"
|
||||
},
|
||||
{
|
||||
"revision": "676ed1246366b884b4a7",
|
||||
"url": "/css/chunk-676093fc.ed4053e6.css"
|
||||
@ -168,7 +168,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
"url": "/img/404.a57b6f31.png"
|
||||
},
|
||||
{
|
||||
"revision": "34ede3e4ff42a702e6a71b85d315890e",
|
||||
"revision": "79aaa45d8f24fd38201c17bed9e6f5fc",
|
||||
"url": "/index.html"
|
||||
},
|
||||
{
|
||||
@ -180,8 +180,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
"url": "/js/404.ec607ed7.js"
|
||||
},
|
||||
{
|
||||
"revision": "e437fc0fa9aabcee124d",
|
||||
"url": "/js/app.277d4f51.js"
|
||||
"revision": "839ababd763a6d1f69e8",
|
||||
"url": "/js/app.9389fcc9.js"
|
||||
},
|
||||
{
|
||||
"revision": "4308fe0503e593d27da4",
|
||||
@ -247,10 +247,6 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
"revision": "fea717fde85b2cb071d2",
|
||||
"url": "/js/chunk-41e8e32c.f321db3b.js"
|
||||
},
|
||||
{
|
||||
"revision": "b74a26d597f4b7a864d5",
|
||||
"url": "/js/chunk-45f2d0f2.ee27028a.js"
|
||||
},
|
||||
{
|
||||
"revision": "bf76dc2b5c75d5dae3bb",
|
||||
"url": "/js/chunk-4bf5c744.2cc73a2e.js"
|
||||
@ -283,6 +279,10 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
"revision": "4642b2be19b2a29c2c0f",
|
||||
"url": "/js/chunk-5823cdba.1a7dbab6.js"
|
||||
},
|
||||
{
|
||||
"revision": "e55842235561775a1c8e",
|
||||
"url": "/js/chunk-628878f0.3fa967f7.js"
|
||||
},
|
||||
{
|
||||
"revision": "676ed1246366b884b4a7",
|
||||
"url": "/js/chunk-676093fc.e71a7688.js"
|
2
dist/service-worker.js
vendored
2
dist/service-worker.js
vendored
@ -14,7 +14,7 @@
|
||||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
|
||||
|
||||
importScripts(
|
||||
"/precache-manifest.c8b23c56f1a1e2c02a4be5ff4ed62b6f.js"
|
||||
"/precache-manifest.ad4c97d167b284aadb37ecda00d59c20.js"
|
||||
);
|
||||
|
||||
workbox.core.setCacheNameDetails({prefix: "pyxis-fe"});
|
||||
|
@ -101,7 +101,7 @@
|
||||
title="自定义小程序码"
|
||||
>
|
||||
<el-row style="display: flex; flex-wrap: wrap;">
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" style="width: 430px;">
|
||||
<el-image
|
||||
style="width: 100%;"
|
||||
:src="qrUrl"
|
||||
@ -244,7 +244,7 @@ export default class extends Vue {
|
||||
this.shop = UserModule.department
|
||||
}
|
||||
if (this.shop) {
|
||||
// this.getShopInfo(this.shop)
|
||||
this.getShopInfo(this.shop)
|
||||
}
|
||||
EventBus.$on(EVENT_GAME_UPDATE, () => {
|
||||
this.getList()
|
||||
@ -263,7 +263,7 @@ export default class extends Vue {
|
||||
if (this.shop) {
|
||||
this.getShopGameSetting(this.shop)
|
||||
this.$local.set(LAST_SHOP, { id: this.shop })
|
||||
// this.getShopInfo(this.shop)
|
||||
this.getShopInfo(this.shop)
|
||||
}
|
||||
}
|
||||
|
||||
@ -388,7 +388,6 @@ export default class extends Vue {
|
||||
private showPreview(data: IGameVersion, gameId: string, logo: string) {
|
||||
this.preGameId = gameId
|
||||
this.preVersionId = data._id!
|
||||
this.shopLogo = logo
|
||||
if (data.type === 1 && data.qr) {
|
||||
this.qrUrl = data.qr!
|
||||
// this.showViewer = true
|
||||
@ -482,14 +481,16 @@ export default class extends Vue {
|
||||
const context = canvas.getContext('2d')
|
||||
context!.clearRect(0, 0, 430, 430)
|
||||
const img = new Image()
|
||||
img.src = this.qrUrl
|
||||
img.src = this.qrUrl + '?t=' + new Date().getDate()
|
||||
img.setAttribute('crossOrigin', 'Anonymous')
|
||||
// 加载图片
|
||||
img.onload = () => {
|
||||
if (img.complete) {
|
||||
// 绘制图片
|
||||
context!.drawImage(img, 0, 0, img.width, img.height)
|
||||
this.drawLogo(context)
|
||||
if (this.shopLogo) {
|
||||
this.drawLogo(context)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -517,7 +518,10 @@ export default class extends Vue {
|
||||
}
|
||||
|
||||
private exportCanvasAsPNG() {
|
||||
const fileName = `${this.shop}.png`
|
||||
let fileName = `${this.shop}.png`
|
||||
if (this.qrParam) {
|
||||
fileName = `${this.shop}_${this.qrParam}.png`
|
||||
}
|
||||
const canvasElement = document.getElementById('qr_canvas') as HTMLCanvasElement
|
||||
if (!canvasElement) {
|
||||
return false
|
||||
|
Loading…
x
Reference in New Issue
Block a user