Browse Source

我的-签到功能

feature/optimise
ZhaoTongYao 5 years ago
parent
commit
95510a7c53
  1. 10
      components/activity/activity.wxss
  2. 2
      dist/popup/index.wxss
  3. BIN
      images/mine/signedup.png
  4. BIN
      images/mine/signup.png
  5. 2
      pages/mine/components/issueItem/issueItem.wxml
  6. 34
      pages/mine/mine.js
  7. 3
      pages/mine/mine.json
  8. 33
      pages/mine/mine.wxml
  9. 28
      pages/mine/mine.wxss
  10. 2
      project.config.json
  11. 11
      utils/api.js

10
components/activity/activity.wxss

@ -1,10 +1,10 @@
.layout {
display: table;
width: calc(100% - 40rpx);
/* width: calc(100% - 40rpx); */
height: 276rpx;
border-radius: 10rpx;
/* border-radius: 10rpx; */
background: #fff;
margin: 20rpx 20rpx 0rpx 20rpx;
margin: 20rpx 0rpx 0rpx 0rpx;
/* flex-direction: column;
justify-content: space-between;
box-sizing: border-box; */
@ -52,7 +52,7 @@
line-height: 37rpx;
text-align: center;
border-radius: 16rpx 0;
background: #d1d1d1;
background: rgba(0, 0, 0, 0.3);
}
.signed-logo {
@ -152,7 +152,7 @@
.total, .signed {
display: block;
font-size: 28rpx;
padding: 0px 20rpx 0px 20rpx;
padding: 0px 20rpx 0px 0rpx;
height: 40rpx;
line-height: 40rpx;
border-radius: 20rpx;

2
dist/popup/index.wxss

@ -12,7 +12,7 @@
}
.wux-popup-position.wux-popup-position--center .wux-popup__content {
border-radius: 6rpx
border-radius: 16rpx
}
.wux-popup-position.wux-popup-position--center .wux-popup__hd {

BIN
images/mine/signedup.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
images/mine/signup.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

2
pages/mine/components/issueItem/issueItem.wxml

@ -7,7 +7,7 @@
catchtap="previewImage"
data-src="{{item}}"
wx:for="{{issueObj.images}}"
wx:key="{{index}}"
wx:key="index"
wx:for-item="item"
wx:for-index="index"
src="{{item}}" />

34
pages/mine/mine.js

@ -20,12 +20,16 @@ Page({
faceImg: "",
nickname: "",
partyFlag: "",
isSignUp: 0,
points: 0,
grade: 0
},
completeInfoDialogVisible: false,
infoCompleted: 0,
changeName:false
changeName:false,
visible: false,
signMsg: '',
signCode: 0
},
onLoad () {
if(app.globalData.infoCompleted == 0 || app.globalData.infoCompleted == 4){//当状态为0 或者 4 的时候 显示完善个人信息其余状态为更改个人信息
@ -328,5 +332,33 @@ Page({
icon: "none",
duration: 1000
})
},
//签到 2020.07.24
toSignUp () {
api.userInfoSignUp().then(res => {
console.log(res.data)
if (res.code === 0) {
// 显示提醒
this.setData({
signCode: res.code,
signMsg: res.data,
visible: true
});
} else {
this.setData({
signCode: res.code,
signMsg: res.msg,
visible: true
});
}
})
},
// 关闭签到提醒
onClose() {
this.getUserInfo()
this.setData({
visible: false
});
}
})

3
pages/mine/mine.json

@ -8,6 +8,7 @@
"topic-item": "./components/topicItemNew/topicItemNew",
"preload-topic-item": "./components/preloadTopicItem/preloadTopicItem",
"load-more": "../../components/loadMore/loadMore",
"completeInfo-dialog": "../../components/completeInfoDialog/completeInfoDialog"
"completeInfo-dialog": "../../components/completeInfoDialog/completeInfoDialog",
"wux-popup": "../../dist/popup/index"
}
}

33
pages/mine/mine.wxml

@ -17,12 +17,23 @@
</view>
</view>
</view>
<view class="complete-info" bindtap="navigateToComplete">
<image class="complete-image" src="../../images/mine/wanshanxinxi.png" />
<view class="complete-content">
<view wx:if="{{changeName}}" class="tip">完善信息</view>
<view wx:else class="tip">更改信息</view>
<image class="rightsword" src="../../images/mine/mine-rightsword.png" />
<view class="right-enter">
<view class="complete-info" bindtap="navigateToComplete">
<image class="complete-image" src="../../images/mine/wanshanxinxi.png" />
<view class="complete-content">
<view wx:if="{{changeName}}" class="tip">完善信息</view>
<view wx:else class="tip">更改信息</view>
<image class="rightsword" src="../../images/mine/mine-rightsword.png" />
</view>
</view>
<view class="complete-info">
<image class="complete-image" src="../../images/mine/signup.png" wx:if="{{userInfo.isSignUp == 0}}" bindtap="toSignUp"/>
<image class="complete-image" src="../../images/mine/signedup.png" wx:else/>
<!-- <view class="complete-content">
<view wx:if="{{changeName}}" class="tip">完善信息</view>
<view wx:else class="tip">更改信息</view>
<image class="rightsword" src="../../images/mine/mine-rightsword.png" />
</view> -->
</view>
</view>
</view>
@ -31,7 +42,8 @@
<text class="text2" bindtap="navigateToIntegralCentre" data-points="{{userInfo.points}}">积分:{{userInfo.points}}</text>
<text class="text3" bindtap="jqqd">积分兑换</text>
<text class="text3"></text>
<!-- <text class="text3" bindtap="jqqd">积分兑换</text> -->
</view>
<!-- <view class="bottom">
<view class="operation" bindtap="navigateToInviteRecord">
@ -117,4 +129,9 @@
</view>
<completeInfo-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}">
</completeInfo-dialog>
</completeInfo-dialog>
<!-- 签到后提醒 -->
<wux-popup visible="{{visible}}" title="{{signCode === 0 ? '签到成功' : '签到失败'}}" content="{{signMsg}}" bind:close="onClose">
<view slot="footer" class="popup__button" bindtap="onClose">确定</view>
</wux-popup>

28
pages/mine/mine.wxss

@ -36,26 +36,27 @@ page {
overflow: hidden;
}
.personal-info .box .content .bottom {
margin-top: 50rpx !important;
margin-top: 10rpx;
box-sizing: border-box;
padding-left: 30rpx;
width: 100%;
height: 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
justify-content: space-around;
}
.personal-info .box .content .bottom text{
color: #fff;
font-size: 30rpx;
line-height: 30rpx;
flex: 1;
text-align: center;
}
.personal-info .box .content .top {
margin-top: 30rpx;
box-sizing: border-box;
padding-left: 40rpx;
padding-left: 50rpx;
width: 100%;
height: 100rpx;
height: 140rpx;
display: flex;
align-items: center;
justify-content: space-between;
@ -84,6 +85,9 @@ page {
display: flex;
flex-direction: column;
justify-content: center;
}
.personal-info .box .content .top .right-enter {
}
.personal-info .box .content .top .right .nickname {
font-size: 30rpx;
@ -116,6 +120,7 @@ page {
height: 46rpx;
position: relative;
margin-right: 14rpx;
margin-top: 22rpx;
}
.personal-info .box .content .top .complete-info .complete-image {
position: absolute;
@ -146,12 +151,6 @@ page {
object-fit: cover;
margin-left: 8rpx;
}
.personal-info .box .content .bottom {
margin-top: 30rpx;
display: flex;
align-items: center;
justify-content: space-around;
}
.personal-info .box .content .bottom .operation {
flex: 1;
display: flex;
@ -380,4 +379,11 @@ page {
align-items: center;
color: #999;
font-size: 26rpx;
}
.popup__button {
width: 100%;
text-align: center;
font-size: 36rpx;
color: #04BCA0;
}

2
project.config.json

@ -22,7 +22,7 @@
"disablePlugins": [],
"outputPath": ""
},
"useCompilerModule": false,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"compileHotReLoad": false,
"useIsolateContext": true

11
utils/api.js

@ -55,7 +55,8 @@ module.exports = {
getResidentConfig:getResidentConfig,
getScrip:getScrip,
getHomePhone:getHomePhone,
gradeRankinglist:gradeRankinglist
gradeRankinglist:gradeRankinglist,
userInfoSignUp:userInfoSignUp
}
function getToken (wxCode) {
@ -516,4 +517,12 @@ function gradeRankinglist ({
pageIndex,
pageSize
})
}
/**
* 用户签到 2020.07.24
*/
function userInfoSignUp () {
return fly.get("app-user/user/sign")
}
Loading…
Cancel
Save