|
|
@@ -401,6 +401,29 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="mask" v-if="posters" @click="closePosters"></view>
|
|
|
+ <view class="mask" v-if="canvasStatus"></view>
|
|
|
+ <!-- #ifdef MP -->
|
|
|
+ <!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
|
|
+ <!-- #endif -->
|
|
|
+ <!-- 海报展示 -->
|
|
|
+ <view class='poster-pop' v-if="canvasStatus">
|
|
|
+ <image src='@/static/images/poster-close.png' class='close' @click="posterImageClose"></image>
|
|
|
+ <image :src='imagePath'></image>
|
|
|
+ <!-- #ifndef H5 -->
|
|
|
+ <view class='save-poster' @click="savePosterPath">保存到手机</view>
|
|
|
+ <!-- #endif -->
|
|
|
+ <!-- #ifdef H5 -->
|
|
|
+ <view class="keep">长按图片可以保存到手机</view>
|
|
|
+ <!-- #endif -->
|
|
|
+ </view>
|
|
|
+ <view class="canvas" v-else>
|
|
|
+ <canvas style="width:750px;height:1190px;" canvas-id="firstCanvas"></canvas>
|
|
|
+ <canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}" />
|
|
|
+ </view>
|
|
|
+ <!-- 发送给朋友图片 -->
|
|
|
+ <view class="share-box" v-if="H5ShareBox">
|
|
|
+ <image src="/static/images/share-info.png" @click="H5ShareBox = false"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -411,7 +434,7 @@ import { useToast } from "@/hooks/useToast";
|
|
|
import { useAppStore } from "@/stores/app.js";
|
|
|
// import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js';
|
|
|
import UQRCode from "uqrcodejs";
|
|
|
-import { getProductDetail, postCartAdd,collectDel,collectAdd } from "@/api/store.js";
|
|
|
+import { getProductDetail, postCartAdd,collectDel,collectAdd,getProductCode } from "@/api/store.js";
|
|
|
import { spread } from "@/api/user";
|
|
|
import { getCoupons, getQrcode } from "@/api/api.js";
|
|
|
import { getCartCounts } from "@/api/order.js";
|
|
|
@@ -427,6 +450,9 @@ import $util from "@/utils/util.js";
|
|
|
import { HTTP_REQUEST_URL_SHARE } from "@/config/app.js";
|
|
|
import UniIcons from "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue";
|
|
|
const { Toast } = useToast();
|
|
|
+import {
|
|
|
+ base64src
|
|
|
+} from '@/utils/base64src.js'
|
|
|
|
|
|
const app = getApp();
|
|
|
const instance = getCurrentInstance();
|
|
|
@@ -477,6 +503,7 @@ const lock = ref(false);
|
|
|
const scrollTop = ref(0);
|
|
|
const sliderImage = ref([]);
|
|
|
const canvasStatus = ref(false);
|
|
|
+const qrcodeSize = ref(600);
|
|
|
const imagePath = ref("");
|
|
|
const imgTop = ref("");
|
|
|
const errT = ref("");
|
|
|
@@ -488,6 +515,7 @@ const showProductPopup = ref(false); // 商品规格弹窗
|
|
|
const showCouponPopup = ref(false); // 优惠券弹窗
|
|
|
const handleBtnTpe = ref(""); // "buy" or "cart"
|
|
|
const sbMerchantInfo = ref({});
|
|
|
+const H5ShareBox = false;
|
|
|
|
|
|
watch(
|
|
|
isLogin,
|
|
|
@@ -1047,8 +1075,6 @@ const goPoster = async () => {
|
|
|
mask: true,
|
|
|
});
|
|
|
posters.value = false;
|
|
|
- console.log('PromotionCode.value',PromotionCode.value)
|
|
|
- console.log('imgTop.value',imgTop.value)
|
|
|
if (!PromotionCode.value) {
|
|
|
uni.hideLoading();
|
|
|
Toast({
|
|
|
@@ -1077,7 +1103,7 @@ const goPoster = async () => {
|
|
|
PromotionCode.value,
|
|
|
];
|
|
|
const storeName = productInfo.value.storeName;
|
|
|
- const price = productInfo.value.storePrice;
|
|
|
+ const price = attr.value.productSelect.storePrice;
|
|
|
setTimeout(() => {
|
|
|
$util.PosterCanvas(
|
|
|
arrImages,
|