123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <template>
- <view class="qr_code flexCC">
- <image src="../../static/code_bg.png" mode="" class="code_bg"></image>
- <view class="code_box flexCC">
- <view class="img flexC">
- <image :src="info.headimg" class="store_img"></image>
- </view>
- <view class="qr_con">
- <view class="store_name">{{ info.name | getName(10) }}的店铺</view>
- <image :src="info.qrcode" class="code_img" @click="preview"></image>
- <view class="hint">点击图片-长按-加客服微信好友</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- getServiceInfo
- } from '../../../apis/shop.js'
- export default {
- data() {
- return {
- info: '' //店铺信息
- };
- },
- methods: {},
- onShow() {
- this.getInfo()
- },
- methods: {
- //点击放大
- preview() {
- uni.previewImage({
- current: this.info.qrcode,
- urls: [this.info.qrcode]
- })
- },
- //获取政委信息
- getInfo() {
- getServiceInfo().then(res => {
- if (res.code == 200) {
- this.info = res.data;
- } else {
- uni.showModal({
- content: res.msg || '获取信息失败',
- showCancel: false,
- success: model => {
- if (model.confirm) {
- uni.navigateBack()
- }
- }
- })
- }
- })
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .qr_code {
- width: 100vw;
- height: 100vh;
- position: relative;
- .code_bg {
- width: 100vw;
- height: 100vh;
- position: fixed;
- top: 0;
- left: 0;
- }
- // background: url('../../static/code_bg.png') no-repeat;
- // background-size: 100% 100%;
- .code_box {
- width: 100%;
- height: 100vh;
- z-index: 999;
- .img {
- .store_img {
- width: 200rpx;
- height: 200rpx;
- border: 6rpx solid #fff;
- border-radius: 50%;
- z-index: 99999;
- }
- }
- .qr_con {
- width: 690rpx;
- height: 70vh;
- background: rgba(255, 255, 255, 0.79);
- margin: -100rpx auto 0;
- border-radius: 24rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- .store_name {
- font-size: 44rpx;
- font-weight: bold;
- padding: 130rpx 0 30rpx;
- }
- .code_img {
- width: 450rpx;
- height: 450rpx;
- margin: 40rpx 0 40rpx;
- border-radius: 24rpx;
- }
- .hint {
- font-size: 36rpx;
- font-weight: bold;
- }
- }
- }
- }
- </style>
|