Browse Source

志愿者功能调整;未认证浏览新闻不加分;积分中心增加总积分;

release
ZhaoTongYao 4 years ago
parent
commit
127c5da300
  1. 15
      pages/complete/components/personalInfo/personalInfo.js
  2. 5
      pages/indexNew/indexNew.js
  3. 4
      pages/toRegister/toRegister.js
  4. 17
      subpages/heart/pages/leaderboardNew/leaderboardNew.wxml
  5. 7
      subpages/heart/pages/leaderboardNew/leaderboardNew.wxss
  6. 2
      subpages/heart/pages/volunteer/volunteer.wxml
  7. 3
      subpages/home/pages/newsDetail/newsDetail.js
  8. 2
      subpages/integralCentre/pages/index/index.js
  9. 12
      subpages/integralCentre/pages/index/index.wxml
  10. 28
      subpages/integralCentre/pages/index/index.wxss

15
pages/complete/components/personalInfo/personalInfo.js

@ -535,6 +535,11 @@ Component({
} }
}) })
} }
}).catch(err => {
this.setData({
lock: false
})
return false
}) })
} else if (e.cancel) { } else if (e.cancel) {
this.setData({ this.setData({
@ -579,6 +584,11 @@ Component({
} }
}) })
} }
}).catch(err => {
this.setData({
lock: false
})
return false
}) })
} else if (this.data.type === "resident") { } else if (this.data.type === "resident") {
api.completeResidentInfo(para).then(res => { api.completeResidentInfo(para).then(res => {
@ -611,6 +621,11 @@ Component({
} }
}) })
} }
}).catch(err => {
this.setData({
lock: false
})
return false
}) })
} }
} }

5
pages/indexNew/indexNew.js

@ -662,7 +662,7 @@ Page({
api.getUserInfo().then(res => { api.getUserInfo().then(res => {
// console.log('用户信息', res) // console.log('用户信息', res)
wx.navigateTo({ wx.navigateTo({
url: "../../subpages/integralCentre/pages/index/index?points=" + res.data.points url: "../../subpages/integralCentre/pages/index/index?points=" + res.data.points + '&pointsTotle=' + (res.data.pointsTotle || 0)
}) })
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
@ -746,6 +746,9 @@ Page({
}, },
//签到 2020.07.31 //签到 2020.07.31
toSignIn () { toSignIn () {
if (this.verifyCompleteInfo()) {
return
}
if (this.data.isSignUp == 1) { if (this.data.isSignUp == 1) {
return return
} }

4
pages/toRegister/toRegister.js

@ -21,10 +21,10 @@ Page({
// } // }
// }) // })
let that = this let that = this
const versionNum = "1.7.9" const versionNum = "1.7.10"
api.getScanSwitch(versionNum).then(function (res) { api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data) console.log(res.data)
let state = res.data.scanFlag let state = res.data ? res.data.scanFlag : '1'
that.setData({ that.setData({
experience: state experience: state
}) })

17
subpages/heart/pages/leaderboardNew/leaderboardNew.wxml

@ -16,18 +16,18 @@
</view> </view>
<!-- 积分排行 --> <!-- 积分排行 -->
<block wx:if="{{selectTab === 'tab1'}}"> <block wx:if="{{selectTab === 'tab1'}}">
<!-- <scroll-view scroll-x="{{true}}" class="scroll-tag"> <scroll-view scroll-x="{{true}}" class="scroll-tag">
<view class="volunteer-tag"> <view class="volunteer-tag">
<view class="tag {{rankId == item.id ? 'sel' : ''}}" wx:for="{{rankTabList}}" wx:key="index" data-id="{{item.id}}" bindtap="changeTag">{{item.label}}</view> <view class="tag {{rankId == item.id ? 'sel' : ''}}" wx:for="{{rankTabList}}" wx:key="index" data-id="{{item.id}}" bindtap="changeTag">{{item.label}}</view>
</view> </view>
</scroll-view> --> </scroll-view>
<view class="bottom {{loveRankingList.length > 0 ? 'padding' : ''}}"> <view class="bottom {{loveRankingList.length > 0 ? 'padding' : ''}}">
<block wx:if="{{loveRankingList.length === 0 && preloadVisible}}"> <block wx:if="{{loveRankingList.length === 0 && preloadVisible}}">
<preload-loveranking-item wx:for="{{[1,2,3,4]}}" wx:for-index="index" wx:key="index"> <preload-loveranking-item wx:for="{{[1,2,3,4]}}" wx:for-index="index" wx:key="index">
</preload-loveranking-item> </preload-loveranking-item>
</block> </block>
<block wx:elif="{{loveRankingList.length > 0 }}"> <!-- <block wx:elif="{{loveRankingList.length > 0 }}">
<view class="list-item" wx:for-item="item" wx:key="index" wx:for-index="index" wx:for="{{loveRankingList}}"> <view class="list-item" wx:for-item="item" wx:key="index" wx:for-index="index" wx:for="{{loveRankingList}}">
<view class="num {{index === 0 ? 'color1' : index === 1 ? 'color2' : index === 2 ? 'color3' : ''}}"> <view class="num {{index === 0 ? 'color1' : index === 1 ? 'color2' : index === 2 ? 'color3' : ''}}">
{{index + 1}}</view> {{index + 1}}</view>
@ -50,8 +50,8 @@
</view> </view>
</view> </view>
</view> </view>
</block> </block> -->
<!-- <block wx:elif="{{loveRankingList.length > 0 && rankId != '3'}}"> <block wx:elif="{{loveRankingList.length > 0 && rankId != '3'}}">
<view class="list-item" wx:for-item="item" wx:key="index" wx:for-index="index" wx:for="{{loveRankingList}}"> <view class="list-item" wx:for-item="item" wx:key="index" wx:for-index="index" wx:for="{{loveRankingList}}">
<view class="num {{index === 0 ? 'color1' : index === 1 ? 'color2' : index === 2 ? 'color3' : ''}}"> <view class="num {{index === 0 ? 'color1' : index === 1 ? 'color2' : index === 2 ? 'color3' : ''}}">
{{index + 1}}</view> {{index + 1}}</view>
@ -86,12 +86,17 @@
</view> </view>
</view> </view>
</view> </view>
</block> --> </block>
<block wx:if="{{datalenght == 0}}"> <block wx:if="{{datalenght == 0}}">
<view class="project-nodata"> <view class="project-nodata">
<image class="nodata-image" src="../../../../images/mine/project-nodata.png" /> <image class="nodata-image" src="../../../../images/mine/project-nodata.png" />
<block wx:if="{{rankId == '3'}}">
<view class="nodata-tip">暂无记录</view>
</block>
<block wx:else>
<view class="nodata-tip">暂无排名</view> <view class="nodata-tip">暂无排名</view>
<view class="nodata-tip">快来参加吧</view> <view class="nodata-tip">快来参加吧</view>
</block>
</view> </view>
</block> </block>
</view> </view>

7
subpages/heart/pages/leaderboardNew/leaderboardNew.wxss

@ -274,6 +274,9 @@ button::after {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10rpx; margin-bottom: 10rpx;
background-color: #fff;
padding: 0 30rpx;
box-sizing: border-box;
} }
.volunteer-tag { .volunteer-tag {
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
@ -281,7 +284,7 @@ button::after {
white-space: nowrap; white-space: nowrap;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: flex-start;
height: 80rpx; height: 80rpx;
} }
.volunteer-tag .tag { .volunteer-tag .tag {
@ -293,7 +296,7 @@ button::after {
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
min-width: 140rpx; min-width: 180rpx;
text-align: center; text-align: center;
height: 48rpx; height: 48rpx;
line-height: 48rpx; line-height: 48rpx;

2
subpages/heart/pages/volunteer/volunteer.wxml

@ -98,7 +98,7 @@
</view> </view>
</picker> </picker>
</view> </view>
<view class="head-portrait" wx:if="{{false}}"> <!-- 2021.07.20 暂时不上线该功能 --> <view class="head-portrait" >
<view class="head-portrait-name">选择部门</view> <view class="head-portrait-name">选择部门</view>
<!-- <view class="time">{{volunteerTag.tag}}</view> --> <!-- <view class="time">{{volunteerTag.tag}}</view> -->
<picker bindchange="choosePicker2" value="{{deptIndex}}" range="{{deptList}}" range-key="deptName"> <picker bindchange="choosePicker2" value="{{deptIndex}}" range="{{deptList}}" range-key="deptName">

3
subpages/home/pages/newsDetail/newsDetail.js

@ -187,6 +187,9 @@ Page({
}, },
// 倒计时 // 倒计时
countDown () { countDown () {
if (this.data.infoCompleted == 0) {
return
}
this.data.timer = setInterval(() => { this.data.timer = setInterval(() => {
console.log("加积分倒计时"+this.data.residentValue) console.log("加积分倒计时"+this.data.residentValue)
if (this.data.residentValue > 1) { if (this.data.residentValue > 1) {

2
subpages/integralCentre/pages/index/index.js

@ -44,6 +44,7 @@ Page({
loadMoreVisible: false, loadMoreVisible: false,
infoCompleted: 0, //是否完善了用户信息 infoCompleted: 0, //是否完善了用户信息
completeInfoDialogVisible: false, completeInfoDialogVisible: false,
pointsTotle: 0,
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
@ -51,6 +52,7 @@ Page({
onLoad: function (options) { onLoad: function (options) {
this.setData({ //前面页面传过来的积分总数 this.setData({ //前面页面传过来的积分总数
points: options.points, points: options.points,
pointsTotle: options.pointsTotle,
infoCompleted: app.globalData.infoCompleted infoCompleted: app.globalData.infoCompleted
}) })
this.pointsRankinglist(); //初始化加载积分记录列表 this.pointsRankinglist(); //初始化加载积分记录列表

12
subpages/integralCentre/pages/index/index.wxml

@ -1,7 +1,5 @@
<view class="home"> <view class="home">
<view class='title'> <view class='title'>
<text class="number">{{points}}</text>
<text class="name">可用积分</text>
<view class="rule"> <view class="rule">
<view class="exchange-box"> <view class="exchange-box">
<image src='../../images/exchange.png' class="exchange" bind:tap="goExchangeIndex" /> <image src='../../images/exchange.png' class="exchange" bind:tap="goExchangeIndex" />
@ -9,6 +7,16 @@
<text bindtap="bindtapIntegralRule">积分规则</text> <text bindtap="bindtapIntegralRule">积分规则</text>
<image src="../../images/note.png" class="note" bindtap="bindtapIntegralRule" /> <image src="../../images/note.png" class="note" bindtap="bindtapIntegralRule" />
</view> </view>
<view class="points">
<view class="points-item">
<text class="number">{{pointsTotle}}</text>
<text class="name">总积分</text>
</view>
<view class="points-item">
<text class="number">{{points}}</text>
<text class="name">可用积分</text>
</view>
</view>
</view> </view>
<!-- tabbar --> <!-- tabbar -->
<view class="tab-bar"> <view class="tab-bar">

28
subpages/integralCentre/pages/index/index.wxss

@ -18,31 +18,26 @@ page {
.title .number { .title .number {
height: 100rpx; height: 100rpx;
font-size: 100rpx; font-size: 54rpx;
line-height: 100rpx; line-height: 100rpx;
font-weight: bold; font-weight: 500;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
margin-top: 100rpx;
} }
.title .name { .title .name {
height: 34rpx; height: 50rpx;
font-size: 34rpx; font-size: 38rpx;
line-height: 34rpx; line-height: 50rpx;
font-weight: 500; font-weight: 500;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
margin-top: 29rpx;
} }
.title .rule { .title .rule {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
color: white; color: white;
position: absolute;
display: flex; display: flex;
align-items: center; align-items: center;
/* left: 570rpx; */
top: 10rpx;
font-size: 28rpx; font-size: 28rpx;
padding-left: 20rpx; padding-left: 20rpx;
} }
@ -54,6 +49,19 @@ page {
/* margin-right: 382rpx; */ /* margin-right: 382rpx; */
} }
.title .points {
width: 100%;
display: flex;
align-items: center;
justify-content: space-around;
}
.title .points .points-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
}
.exchange-box { .exchange-box {
margin-right: 360rpx; margin-right: 360rpx;
} }

Loading…
Cancel
Save