123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <template>
- <view class="content">
- <view class="images">
- <image class="slide-image" :src="url" mode="widthFix" show-menu-by-longpress />
- </view>
- <view class="btn-box">
- <view class="btn" @click="shareQr()">分享</view>
- </view>
-
- </view>
- </template>
- <script>
-
- import {getUserInfo,getQrImg} from '@/api/companyUser'
- export default {
- name: 'Poster',
- components: {
- },
- props: {},
- data: function() {
- return {
- url:null,
- }
- },
- mounted: function() {
- this.getQrImg()
- },
- methods: {
- getQrImg(){
- var data={token:uni.getStorageSync('CompanyUserToken')}
- getQrImg(data).then(
- res => {
- var path=uni.getStorageSync('requestPath')
- this.url =path+ "/"+res.url
- },
- rej => {}
- );
- },
- shareQr(){
- wx.downloadFile({
- url: this.url,
- success: (res) => {
- wx.showShareImageMenu({
- path: res.tempFilePath
- })
- }
- })
- },
-
-
- },
- }
- </script>
- <style lang="less">
- page {
- height: 100%;
- }
- .content {
- width: 100%;
- height: 100%;
-
- }
- .images {
- display: flex;
- align-items: center;
- justify-content: center;
- padding-bottom:140upx ;
- height: 100%;
- }
- .images .slide-image {
- width: 80%;
- height: auto;
- }
- .btn-box{
- height: 140upx;
- z-index: 9999;
- width: 100%;
- padding: 0rpx 30upx;
- position: fixed;
- bottom: 0;
- left: 0;
- box-sizing: border-box;
- background-color: #ffffff;
- display: flex;
- align-items: center;
- justify-content: center;
- .btn{
- width: 100%;
- height: 88upx;
- line-height: 88upx;
- text-align: center;
- font-size: 34upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- background:#018C39 !important;
- border-radius: 44upx;
- }
- }
- </style>
|