提交 0a2e53c5 编写于 作者: zhangzhiwei's avatar zhangzhiwei

.

上级 227b065b
......@@ -70,6 +70,7 @@
},
})
const that = reactive({
temId:null,
inited:false,
temMuneId:null,
good: {
......@@ -135,7 +136,9 @@
if (!data||!data.hasNextPage){
that.good.finished = true
}
if(that.temId==that.temMuneId){
that.good.list.push(...data.list)
}
})
.catch(() => {
that.good.fail = true
......@@ -150,6 +153,7 @@
if(res.benDiMenu&&res.benDiMenu.length>0){
that.getList(res.benDiMenu[0].id)
that.temMuneId=res.benDiMenu[0].id
that.temId=res.benDiMenu[0].id
}
})
},
......@@ -161,10 +165,13 @@
pageSize: 20,
link: uni.getStorageSync("subdomain") ? uni.getStorageSync("subdomain") : 'alisa'
}).then((data: any) => {
if(that.temId==menuId){
that.good.list=data.list
}
})
},
onChange: (e) => {
that.temId=e
that.good.page=1
that.good.list=[]
that.getList(e)
......
<template>
<view class="bg-max bg-gray" style="background: #ffffff;height: 100vh">
<van-sticky>
<view class="justify-center bg-white sh pd-px-20 mg-b-20">
<view class="justify-center bg-white sh pd-px-20 mg-b-20" >
<van-icon class="top-left" name="arrow-left" @tap="goBack" />
<view class="top-center">店铺名片</view>
</view>
</van-sticky>
<view style="margin: 20rpx 30rpx">
<view id="aa" style="position: relative;margin: 20rpx 30rpx">
<van-image src="../../static/haibao1.png"/>
<!--<view style="position: absolute;top: 120px;left: 450rpx">-->
<!--<van-image src="../../static/img/dz/jyx-logo.jpg" alt=""/>-->
<!--</view>-->
</view>
<!--<view style="margin: 20rpx 30rpx">-->
<!--<img :src="state.temIMg" alt="" style="width: 100%">-->
<!--</view>-->
</view>
</template>
<script setup lang="ts">
import { reactive } from 'vue';
const state = reactive({
temIMg:''
})
import html2Canvas from "html2canvas"
import { PageUtils } from '@/utils/utils';
function goBack() {
PageUtils.goBack()
}
// 再画卡片
function drawBg() {
const ctx = uni.createCanvasContext('cardbg')
ctx.drawImage('../../static/haibao1.png', 0, 0, 320, 314)
ctx.draw()
// 等待1s画完卡片
setTimeout(() => {
const cardDom = document.getElementById("aa")
if (!cardDom) return
html2Canvas(cardDom, { useCORS: false }).then(canvas => {
state.temIMg=canvas.toDataURL("image/png")
})
}, 500);
}
</script>
<style lang="scss" scoped>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册