【fix】优化代码
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
-->
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { useMainStore } from "@/store/store";
|
||||
import { useMainStore } from "@/store/modules/useMainStore";
|
||||
import { distributionShareBg } from '@/utils/images'
|
||||
import { useImage } from "@/hooks/useImage";
|
||||
import { generateMiniProgramQrCode } from "@/api/global";
|
||||
@ -69,7 +69,7 @@ async function save() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<u-overlay
|
||||
<uv-overlay
|
||||
:show="show"
|
||||
@click="close">
|
||||
<view
|
||||
@ -109,7 +109,7 @@ async function save() {
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
</uv-overlay>
|
||||
</template>
|
||||
|
||||
<style
|
||||
|
@ -8,7 +8,7 @@
|
||||
<script setup>
|
||||
import { getCurrentInstance, nextTick, ref } from "vue";
|
||||
import { useImage } from "@/hooks/useImage";
|
||||
import { useMainStore } from "@/store/store";
|
||||
import { useMainStore } from "@/store/modules/useMainStore";
|
||||
import { useShare } from "@/hooks/useShare";
|
||||
import { generateMiniProgramQrCode } from "@/api/global";
|
||||
|
||||
@ -270,7 +270,7 @@ async function generatePoster() {
|
||||
// #ifdef MP-WEIXIN
|
||||
wx.canvasToTempFilePath({
|
||||
canvasId: 'goods-canvas',
|
||||
canvas:canvasRef.value,//这里是重点,获取实例的时候保存为全局变量就行了
|
||||
canvas: canvasRef.value,//这里是重点,获取实例的时候保存为全局变量就行了
|
||||
success: async (res) => {
|
||||
posterImagePath.value = res.tempFilePath;
|
||||
uni.hideLoading()
|
||||
@ -279,7 +279,7 @@ async function generatePoster() {
|
||||
console.log(err)
|
||||
uni.hideLoading()
|
||||
}
|
||||
},_this)
|
||||
}, _this)
|
||||
// #endif
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ async function save() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<u-overlay
|
||||
<uv-overlay
|
||||
@touchmove="(e)=>{e.preventDefault();}"
|
||||
:show="show"
|
||||
@click="close">
|
||||
@ -332,7 +332,7 @@ async function save() {
|
||||
style="width:654rpx;height: 1032rpx;margin: 20rpx auto;position: absolute;z-index:999;top: -999px;"
|
||||
id="goods-canvas" />
|
||||
|
||||
</u-overlay>
|
||||
</uv-overlay>
|
||||
</template>
|
||||
|
||||
<style
|
||||
|
@ -8,7 +8,7 @@
|
||||
<script setup>
|
||||
import { getCurrentInstance, nextTick, ref } from "vue";
|
||||
import { useImage } from "@/hooks/useImage";
|
||||
import { useMainStore } from "@/store/store";
|
||||
import { useMainStore } from "@/store/modules/useMainStore";
|
||||
import { generateMiniProgramQrCode } from "@/api/global";
|
||||
|
||||
// =================================== hooks ============================================
|
||||
@ -268,7 +268,7 @@ async function generatePoster() {
|
||||
// #ifdef MP-WEIXIN
|
||||
wx.canvasToTempFilePath({
|
||||
canvasId: 'goods-canvas',
|
||||
canvas:canvasRef.value,//这里是重点,获取实例的时候保存为全局变量就行了
|
||||
canvas: canvasRef.value,//这里是重点,获取实例的时候保存为全局变量就行了
|
||||
success: async (res) => {
|
||||
posterImagePath.value = res.tempFilePath;
|
||||
uni.hideLoading()
|
||||
@ -277,7 +277,7 @@ async function generatePoster() {
|
||||
console.log(err)
|
||||
uni.hideLoading()
|
||||
}
|
||||
},_this)
|
||||
}, _this)
|
||||
// #endif
|
||||
}
|
||||
|
||||
@ -297,7 +297,7 @@ async function save() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<u-overlay
|
||||
<uv-overlay
|
||||
@touchmove="(e)=>{e.preventDefault();}"
|
||||
:show="show"
|
||||
@click="close">
|
||||
@ -330,7 +330,7 @@ async function save() {
|
||||
style="width:654rpx;height: 1032rpx;margin: 20rpx auto;position: absolute;z-index:999;top: -999px;"
|
||||
id="goods-canvas" />
|
||||
|
||||
</u-overlay>
|
||||
</uv-overlay>
|
||||
</template>
|
||||
|
||||
<style
|
||||
|
@ -7,7 +7,7 @@
|
||||
-->
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { useMainStore } from "@/store/store";
|
||||
import { useMainStore } from "@/store/modules/useMainStore";
|
||||
import { distributionShareBg } from '@/utils/images'
|
||||
import { useImage } from "@/hooks/useImage";
|
||||
import { generateMiniProgramQrCode } from "@/api/global";
|
||||
@ -66,7 +66,7 @@ async function save() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<u-overlay
|
||||
<uv-overlay
|
||||
:show="show"
|
||||
@click="close">
|
||||
<view
|
||||
@ -105,7 +105,7 @@ async function save() {
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
</uv-overlay>
|
||||
</template>
|
||||
|
||||
<style
|
||||
|
Reference in New Issue
Block a user