页面展示优化
This commit is contained in:
@@ -85,17 +85,7 @@
|
||||
<up-qrcode :size="200" :val="data.erweima" @result="qrR"></up-qrcode>
|
||||
<canvas id="canvas" canvas-id="poster" :style="{width: data.canvasW+'px', height: data.canvasH+'px'}"></canvas>
|
||||
</view>
|
||||
<!-- <up-image :src="data.haibaoImg" alt="" width="400rpx" mode="widthFix"></up-image> -->
|
||||
<!-- <tki-qrcode ref="qrcode" :val="erweima" :size="200" background="#fff" foreground="#000" pdground="#000"
|
||||
:onval="true" :loadMake="true" @result="qrR" :show="false"></tki-qrcode> -->
|
||||
<view class="cu-modal" :class="modalName == 'Image' ? 'show' : 'show'" @tap="hideModal">
|
||||
<view class="cu-dialog" v-if="bgImg && erweimapath && haibaoShow" @tap="hideModal">
|
||||
<view class="bg-img">
|
||||
<!-- <wm-poster @success="posterSuccess" @successH5="successH5" :imgSrc="bgImg"
|
||||
:Referrer="'我的邀请码:'+invitationCode" :QrSrc="erweimapath" :LineType="false"></wm-poster> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -115,7 +105,6 @@
|
||||
},
|
||||
erweimapath: '',
|
||||
haibaoImg: null,
|
||||
haibaoShow: false,
|
||||
customStyle: {
|
||||
background: '#DDDCFF',
|
||||
border: '8rpx',
|
||||
@@ -134,7 +123,6 @@
|
||||
tuiguang: '',
|
||||
invitationCode: uni.getStorageSync('userInfo').invitationCode,
|
||||
h5SaveImg: '',
|
||||
modalName: '',
|
||||
haibaoImgH5: '',
|
||||
inviteSignCount:0,
|
||||
canvasW: 350,
|
||||
@@ -218,7 +206,6 @@
|
||||
|
||||
function posterSuccess(haibaoImg) {
|
||||
data.haibaoImg = haibaoImg;
|
||||
data.modalName = 'Image';
|
||||
uni.hideLoading();
|
||||
}
|
||||
function successH5(haibaoImg) {
|
||||
@@ -231,9 +218,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
function hideModal() {
|
||||
data.modalName = null;
|
||||
}
|
||||
|
||||
function qrR(path) {
|
||||
data.erweimapath = path;
|
||||
}
|
||||
@@ -297,8 +282,6 @@
|
||||
canvasId: "poster",
|
||||
success: res => {
|
||||
data.haibaoImg = res.tempFilePath;
|
||||
data.modalName = 'Image';
|
||||
data.haibaoShow = true
|
||||
// #ifdef H5
|
||||
uni.previewImage({
|
||||
urls: [data.haibaoImg],
|
||||
@@ -306,14 +289,16 @@
|
||||
})
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
uni.previewImage({
|
||||
urls: [data.haibaoImg],
|
||||
current: 1,
|
||||
})
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: data.haibaoImg,
|
||||
success: function() {
|
||||
console.log('save success');
|
||||
uni.showToast({
|
||||
title: '海报已保存相册',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -348,6 +333,7 @@
|
||||
}
|
||||
.container {
|
||||
background: #F3F4F8;
|
||||
min-height: 100vh;
|
||||
.head{
|
||||
position: relative;
|
||||
.top-title {
|
||||
|
||||
Reference in New Issue
Block a user