Files
yunxinwei-uniapp/package/salesman/qrcode/index.vue
2023-08-04 13:04:21 +08:00

85 lines
1.6 KiB
Vue

<template>
<view class="partner">
<!-- 表单组件 -->
<view class="form-wrapper">
<view class="item-list">
<image :src="shopPosterUrl" mode="widthFix"></image>
<text>推广商户二维码</text>
</view>
</view>
<view class="form-wrapper">
<view class="item-list">
<image :src="userPosterUrl" mode="widthFix"></image>
<text>推广用户二维码</text>
</view>
</view>
</view>
</template>
<script>
import * as Api from '@/api/dealer/poster'
export default {
components: {},
data() {
return {
isLoading: false,
shopPosterUrl: undefined,
userPosterUrl: undefined
}
},
onLoad() {
this.getPoster()
},
methods: {
// 获取推广二维码
getPoster() {
const app = this
app.isLoading = true
Api.qrcode({ channel: app.platform })
.then(result => {
// api数据赋值
app.shopPosterUrl = result.data.shopPosterUrl
app.userPosterUrl = result.data.userPosterUrl
})
.finally(() => app.isLoading = false)
},
}
}
</script>
<style lang="less">
.partner {
.banner {
width: 100%;
}
.form-wrapper {
margin: 30rpx auto 50rpx auto;
padding: 30rpx 40rpx;
width: 94%;
box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
border-radius: 16rpx;
background: #fff;
.item-list{
display: flex;
flex-direction: column;
text-align: center;
image{
width: 70%;
margin: auto;
}
text{
line-height: 2rem;
font-size: 34rpx;
font-weight: bold;
}
}
}
.footer{
width: 500rpx;
margin: 20rpx auto;
}
}
</style>