Browse Source

--分享海报,第一次登陆邀请码弹窗--

featrue/v4.4
DESKTOP-A1SENDA\HUzy 4 years ago
parent
commit
1236de6221
15 changed files with 140 additions and 14 deletions
  1. BIN
      assets/image/hbbj21524.jpg
  2. BIN
      assets/image/ic_create_poster.png
  3. BIN
      assets/image/ic_save_poster.png
  4. BIN
      assets/image/im_poster_header_no_title.png
  5. BIN
      assets/image/img_poster_bg.png
  6. BIN
      assets/image/img_poster_footer.png
  7. BIN
      assets/image/img_poster_header_has_title.png
  8. BIN
      assets/image/pyqicon.png
  9. BIN
      assets/image/ssxiyzc.png
  10. BIN
      assets/image/weixinicon.png
  11. 4
      pages/article/detail/index.js
  12. 63
      pages/article/detail/index.wxml
  13. 78
      pages/article/detail/index.wxss
  14. 8
      pages/home/tab1/index.js
  15. 1
      pages/index/index.js

BIN
assets/image/hbbj21524.jpg

Before After
Width: 1125  |  Height: 2436  |  Size: 344 KiB

BIN
assets/image/ic_create_poster.png

Before After
Width: 104  |  Height: 104  |  Size: 3.9 KiB

BIN
assets/image/ic_save_poster.png

Before After
Width: 64  |  Height: 64  |  Size: 2.8 KiB

BIN
assets/image/im_poster_header_no_title.png

Before After
Width: 670  |  Height: 174  |  Size: 25 KiB

BIN
assets/image/img_poster_bg.png

Before After
Width: 670  |  Height: 1190  |  Size: 37 KiB

BIN
assets/image/img_poster_footer.png

Before After
Width: 670  |  Height: 214  |  Size: 22 KiB

BIN
assets/image/img_poster_header_has_title.png

Before After
Width: 670  |  Height: 174  |  Size: 21 KiB

BIN
assets/image/pyqicon.png

Before After
Width: 64  |  Height: 64  |  Size: 5.1 KiB

BIN
assets/image/ssxiyzc.png

Before After
Width: 670  |  Height: 174  |  Size: 27 KiB

BIN
assets/image/weixinicon.png

Before After
Width: 64  |  Height: 64  |  Size: 4.5 KiB

4
pages/article/detail/index.js

@ -306,7 +306,7 @@ Page({
success: function (res) {
var tempFilePath = res.tempFilePath;
that.setData({
imagePath: tempFilePath,
imagePathHb: tempFilePath,
canvasHidden:true,
maskHidden: true,
});
@ -316,8 +316,10 @@ Page({
}
});
}, 200);
},
baocun(){
console.log(this.data)
this.setData({
maskHidden:false
})

63
pages/article/detail/index.wxml

@ -106,15 +106,66 @@
<button class="cu-btn offer-btn" style="background-color: #008AFF" bindtap="submitComment">发表</button>
</view>
</view>
<!--生成海报 -->
<!--生成海报 bindtap='baocun' -->
<view class='imagePathBox' hidden="{{maskHidden == false}}">
<image src="{{imagePath}}" class='shengcheng'></image>
<button class='baocun' bindtap='baocun'>保存相册,分享到朋友圈</button>
<!-- <image src="{{imagePath}}" class='shengcheng'></image> -->
<!-- <view class='baocun'></view> -->
<view class='shengcheng2'>
<view class="topImg">
<image src="/assets/image/im_poster_header_no_title.png" style="width:100%;height:100%"></image>
</view>
<view class="contentText">
<image src="/assets/image/img_poster_bg.png" style="width:100%;height:100%"></image>
</view>
<view class="footzt">
<view class="footImg1">
<image src="/assets/image/img_poster_footer.png" style="width:100%;height:100%"></image>
</view>
<view class="footImg2">
<view class="footIcon">
<view class="footSmallIconArea">
<view class="footSmallIcon">
<image src="/assets/image/ic_save_poster.png" style="width:100%;height:100%"></image>
</view>
</view>
<view class="footSmalltextArea">
<view class="footSmalltext">保存相册</view>
</view>
</view>
<view class="footIcon" style="margin-left:15rpx">
<view class="footSmallIconArea">
<view class="footSmallIcon">
<image src="/assets/image/weixinicon.png" style="width:100%;height:100%"></image>
</view>
</view>
<view class="footSmalltextArea">
<view class="footSmalltext">微信</view>
</view>
</view>
<view class="footIcon" style="margin-left:15rpx">
<view class="footSmallIconArea">
<view class="footSmallIcon"><image src="/assets/image/pyqicon.png" style="width:100%;height:100%"></image> </view>
</view>
<view class="footSmalltextArea">
<view class="footSmalltext">朋友圈</view>
</view>
</view>
<view class="footIcon" style="margin-left:147rpx" bindtap='baocun'>
<view class="footSmallIconArea">
<view class="footSmallIcon">
<view class="footSmallIcon"><image src="/assets/image/ic_save_poster.png" style="width:100%;height:100%"></image> </view>
</view>
</view>
<view class="footSmalltextArea">
<view class="footSmalltext">关闭</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view hidden="{{maskHidden == false}}" class="mask"></view>
<view class="canvas-box">
<canvas style="width: 375px;height: 667px;position:fixed;top:9999px" canvas-id="mycanvas"/>
<canvas style="width: 375px;height: 667px;position:fixed;top:9999px" canvas-id="mycanvas"/>
</view>
</view>

78
pages/article/detail/index.wxss

@ -35,8 +35,8 @@
.share-btn::after{ border: none; }
.shengcheng{
width: 87%;
height: 80%;
width: 670rpx;
height: 1190rpx;
position: fixed;
top: 100rpx;
left: 50%;
@ -44,18 +44,86 @@
z-index: 10;
margin-top: 2%;
}
.shengcheng2{
width: 670rpx;
height: 80%;
position: fixed;
left: 50%;
margin-left: -44%;
z-index: 10;
top: 142rpx;
margin-top: 2%;
}
.topImg{
width: 670rpx;
height: 174rpx;
}
.contentText{
width: 670rpx;
height: 885rpx;
}
.footzt{
width: 670rpx;
height:280rpx;
position: absolute;
bottom: 0rpx;
}
.baocun{
display: block;
width: 87%;
height: 80rpx;
width: 670rpx;
height: 140rpx;
padding: 0;
line-height: 80rpx;
text-align: center;
position: fixed;
left: 6%;
background: red;
background: white;
color: white;
font-size: 32rpx;
top:82%;
z-index: 11;
}
.footImg1{
width: 670rpx;
height:240rpx;
}
.footImg2{
width: 670rpx;
height:140rpx;
background-color: white;
display: flex;
justify-content: flex-start;
}
.footIcon{
width: 120rpx;
height:140rpx;
}
.footSmallIconArea{
width: 100%;
height: 64rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 10rpx;
}
.footSmallIcon{
width: 64rpx;
height: 64rpx;
}
.footSmalltextArea{
width: 100%;
height: 33rpx;
display: flex;
justify-content: center;
align-items: center;
}
.footSmalltext{
width:120rpx;
height: 33rpx;
display: flex;
justify-content: center;
align-items: center;
}

8
pages/home/tab1/index.js

@ -16,7 +16,8 @@ Page({
*/
data: {
bidType: 0,
identityTag: ''
identityTag: '',
isFristLogin:false,
},
@ -24,6 +25,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
isFristLogin:storage.get('isfirstlogin')
})
this.getUerInfoFct()
},
toNextTab: function () {
@ -134,7 +138,7 @@ Page({
},
getUerInfoFct: function () {
getBaseInfo().then(res => {
if(res.data.hasShowedLoginTag==false){
if(res.data.hasShowedLoginTag==false||this.data.isFristLogin){
this.showDialog()
}
if (res.data.identityTag == '打包站') {

1
pages/index/index.js

@ -250,6 +250,7 @@ Page({
this.updateUserInfoFct({
hasShowedLoginTag: true
})
storage.put('isfirstlogin',true)
wx.navigateTo({
url: '/pages/home/tab1/index'
})

Loading…
Cancel
Save