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

.

上级 43d7457c
......@@ -6,11 +6,11 @@
<view class="top-center" >店铺名片</view>
</view>
</van-sticky>
<view id="aa" style="position: relative;margin: 20rpx 30rpx" v-if="!state.temIMg">
<view id="aa" style="position: absolute;margin: 20rpx 30rpx;top: -99999px" v-if="!state.temIMg" >
<van-image src="../../static/img/dz/info-bg.png"/>
<view style="position: absolute; left: 50%;top: 50%;transform: translate(-50%, -50%);">
<view style="text-align: center">
<van-image style="border-radius: 50%;border: 2rpx solid #DDDDDD;width: 140rpx;height: 140rpx" radius="20rpx" :src="state.useInfo.headImg"
<img crossOrigin='anonymous' style="border-radius: 50%;border: 2rpx solid #DDDDDD;width: 140rpx;height: 140rpx" radius="20rpx" :src="state.useInfo.headImg+'?t='+new Date().getTime()"
/>
<view style="font-size: 34rpx;font-weight: bold;margin-top: 20rpx">{{state.useInfo.storeName}}</view>
</view>
......@@ -32,8 +32,8 @@
</van-col>
</van-row>
<van-row class="e-logo" >
<van-image style="width: 300rpx;height: 300rpx"
:src="state.useInfo.appletCode" />
<img crossOrigin='anonymous' style="width: 300rpx;height: 300rpx"
:src="state.useInfo.appletCode+'?t='+new Date().getTime()" />
</van-row>
</view>
<view class="e-text">
......@@ -42,7 +42,7 @@
</view>
</view>
<view style="margin: 20rpx 30rpx" v-else>
<img :src="state.temIMg" alt="" style="width: 100%">
<img crossOrigin='anonymous' :src="state.temIMg" alt="" style="width: 100%">
</view>
</view>
......@@ -67,14 +67,17 @@
api.storeInfo({ link: uni.getStorageSync("subdomain") }).then(res=>{
state.useInfo=res
})
drawBg()
}
// 再画卡片
function drawBg() {
// 等待1s画完卡片
setTimeout(() => {
const cardDom = document.getElementById("aa")
if (!cardDom) return
html2Canvas(cardDom, { useCORS: false }).then(canvas => {
html2Canvas(cardDom, { useCORS: true }).then(canvas => {
state.temIMg=canvas.toDataURL("image/png")
})
}, 500);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册