Browse Source

展示二维码,登录页样式

jw-featrue-zhanlibiao
mk 2 years ago
parent
commit
4b723ccbe7
  1. BIN
      images/cancle.png
  2. BIN
      images/login/right_bg.png
  3. BIN
      images/work/sqmp.png
  4. 5
      pages/login/login.wxml
  5. 14
      pages/login/login.wxss
  6. 5
      pages/work/work.js
  7. 81
      subpages/communitySelfInsp/pages/synthesis/synthesis.js
  8. 16
      subpages/communitySelfInsp/pages/synthesis/synthesis.wxml
  9. 80
      subpages/communitySelfInsp/pages/synthesis/synthesis.wxss

BIN
images/cancle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/login/right_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
images/work/sqmp.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 66 KiB

5
pages/login/login.wxml

@ -1,8 +1,13 @@
<!--pages/register/register.wxml-->
<view class="header">
<view class="left">
<image src="../../images/login/hi.png" mode=""/>
<view->欢迎加入e联社区</view->
</view>
<view class="right">
<image src="../../images/login/right_bg.png" mode=""/>
</view>
</view>
<view class="login">
<view class="input_box">
<image src="../../images/login/user.png" mode=""/>

14
pages/login/login.wxss

@ -9,15 +9,25 @@ page {
width: 100%;
background: linear-gradient(180deg, #1673ee 0%, #66A6FD 63%, #F7F7F7 100%);
box-sizing: border-box;
padding: 224rpx 0rpx 100rpx 50rpx;
padding: 140rpx 0rpx 100rpx 50rpx;
font-size: 40rpx;
color: #FFFFFF;
display: flex;
}
.header .left{
display: flex;
flex-direction: column;
}
.header image {
.header .left image {
width: 106rpx;
height: 94rpx;
}
.header .right image {
width: 280rpx;
height: 280rpx;
position: relative;
top: -60rpx;
left: 100rpx;
}
.header view {
margin-top:30rpx ;

5
pages/work/work.js

@ -199,7 +199,7 @@ Page({
},
toSynthesis(){
wx.navigateTo({
url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${this.data.communitySelfInspTop.id}`,
url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${this.data.communitySelfInspTop.id}&qrCodeImgUrl=${this.data.communitySelfInspTop.qrCodeImgUrl}&agencyName=${this.data.communitySelfInspTop.agencyName}&monthName=${this.data.communitySelfInspTop.monthName}&questionnaireUrl=${this.data.communitySelfInspTop.questionnaireUrl}`,
})
},
toWebView(){
@ -209,7 +209,7 @@ Page({
},
toDetail(e){
wx.navigateTo({
url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${e.currentTarget.dataset.item.id}`,
url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${e.currentTarget.dataset.item.id}&qrCodeImgUrl=${e.currentTarget.dataset.item.qrCodeImgUrl}&agencyName=${e.currentTarget.dataset.item.agencyName}&monthName=${e.currentTarget.dataset.item.monthName}&questionnaireUrl=${e.currentTarget.dataset.item.questionnaireUrl}`,
})
},
handelClickShare(e) {
@ -252,7 +252,6 @@ Page({
wx.showShareImageMenu({
menus:['shareAppMessage', 'shareTimeline']
})
},
toDemandCheck(){
wx.navigateTo({

81
subpages/communitySelfInsp/pages/synthesis/synthesis.js

@ -13,7 +13,8 @@ Page({
personQty:'',//提交人数
synthesisScore:'',//综合得分
inspRecordId:'',//自查表Id
fontSize:''
fontSize:'',
maskStatus:false
},
/**
@ -24,9 +25,12 @@ Page({
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
inspRecordId:options.inspRecordId
inspRecordId:options.inspRecordId,
agencyName:options.agencyName,
monthName:options.monthName,
qrCodeImgUrl:options.qrCodeImgUrl,
questionnaireUrl:options.questionnaireUrl
})
this.getSynthesis()
},
@ -38,7 +42,7 @@ Page({
getSynthesis(parm).then(res=>{
this.setData({
tableData:res.data.categoryDatas,
monthName:res.data.monthName,
// monthName:res.data.monthName,
synthesisScore:res.data.synthesisScore,
personQty:res.data.personQty,
agencyName:res.data.agencyName,
@ -101,8 +105,13 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
return{
title:`${this.data.agencyName}${this.data.monthName}月份满意度调查`,
path:'/pages/webView/webView?url=' + this.data.questionnaireUrl,
imageUrl:'../../../../images/work/shareBg.png'
}
},
toDissatisfactionDetails(e){
console.log(e);
let category = e.currentTarget.dataset.item.satisfactionCategory
@ -110,6 +119,68 @@ Page({
url: `/subpages/communitySelfInsp/pages/dissatisfactionDetails/dissatisfactionDetails?inspRecordId=${this.data.inspRecordId}&category=${category}`,
})
},
showCodeImg(){
this.setData({
maskStatus:true
})
},
hideCodeImg(){
this.setData({
maskStatus:false
})
},
downImage(){
let imageUrl = this.data.qrCodeImgUrl; // 替换为您要下载的图片的URL
// 下载图片
wx.downloadFile({
url: imageUrl,
success: function(res) {
console.log(res);
let imagePath = res.tempFilePath;
// 请求保存到相册的权限
wx.getSetting({
success (res) {
if (!res.authSetting['scope.writePhotosAlbum']) {
wx.authorize({
scope: 'scope.writePhotosAlbum',
success() {
saveImage(imagePath);
}
})
} else {
saveImage(imagePath);
}
}
});
},
fail: function() {
wx.showToast({
title: '下载失败',
icon: 'none'
});
}
});
function saveImage(imagePath) {
// 保存图片到相册
wx.saveImageToPhotosAlbum({
filePath: imagePath,
success: function() {
wx.showToast({
title: '保存成功',
icon: 'success'
});
},
fail: function() {
wx.showToast({
title: '保存失败',
icon: 'none'
});
}
});
}
},
back(){
wx.navigateBack({
delta: 1

16
subpages/communitySelfInsp/pages/synthesis/synthesis.wxml

@ -57,7 +57,17 @@
</view>
</view>
</view>
<!--
<view class="bto_btn">
<view>分享给好友参与测评</view>
</view> -->
<button hover-class="btn-hover" class="btn_blue" open-type="share">分享给好友参与测评</button>
<button bind:tap="showCodeImg" class="btn_yellow">满意度自查二维码</button>
</view>
<view class="mask" wx:if="{{maskStatus}}">
<view class="bg-box">
<image src="../../../../images/cancle.png" class="cancle" mode="" bind:tap="hideCodeImg"/>
<image src="{{qrCodeImgUrl}}" style="width: 100%;" mode="" class="qrCodeImg" show-menu-by-longpress="true"/>
<view class="top20 font32">{{agencyName}}</view>
<view class="gray top20">2023年{{monthName}}月份满意度自查二维码</view>
<view class="mask_btn" bind:tap="downImage">下载二维码</view>
</view>
</view>

80
subpages/communitySelfInsp/pages/synthesis/synthesis.wxss

@ -5,6 +5,9 @@ page {
overflow-y: scroll;
background-color: #f7f7f7;
}
.top20{
margin-top: 20rpx;
}
.header {
width: 100%;
height: 464rpx;
@ -37,6 +40,13 @@ page {
position: relative;
z-index: 100;
}
.gray{
color:#999 ;
font-size: 28rpx;
}
.font32{
font-size: 32rpx;
}
.back{
width: 30rpx;
height: 30rpx;
@ -160,3 +170,73 @@ page {
width: 24rpx;
height: 24rpx;
}
.mask {
background-color: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
padding: 0 70rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
}
.mask .bg-box{
position: relative;
width: 100%;
min-height: 400rpx;
display: flex;
background-image: url('https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20231007/e094eeeeb2e6406daa18530b648d973d.png');
background-size: 100% 100%;
background-position: center;
padding:90rpx 90rpx 60rpx;
box-sizing: border-box;
align-items: center;
justify-content: center;
flex-direction: column;
}
.bg-box .cancle{
position: absolute;
right: -20rpx;
top: -20rpx;
width: 26rpx;
height: 26rpx;
}
.bg-box .mask_btn{
padding:23rpx 60rpx;
text-align: center;
color: #fff;
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%);
border-radius:43rpx ;
margin-top: 40rpx;
}
.bg-box .qrCodeImg{
border-radius: 20rpx;
}
.bto_btn{
display: flex;
padding: 0 20rpx 30rpx;
}
.btn_blue ,
.btn_yellow{
border-radius: 40rpx;
color: #fff;
width: fit-content;
padding:20rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
}
.btn_blue{
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%);
}
.btn_yellow{
margin-left: 20rpx !important;
background: linear-gradient(87deg, #ff793c 0%, #fb9d5b 100%);
}
Loading…
Cancel
Save