diff --git a/api/pagesB/Behaviorpoints/index.js b/api/pagesB/Behaviorpoints/index.js index a4157da..75cd60d 100644 --- a/api/pagesB/Behaviorpoints/index.js +++ b/api/pagesB/Behaviorpoints/index.js @@ -20,3 +20,16 @@ export function scoretotal(cardNo) { } }) } + + +//健康行为 +export function healthActlist(data) { + return request({ + url: `/applet/score/healthAct/list`, + method: 'get', + data, + header: { + region: uni.getStorageSync('region'), + } + }) +} \ No newline at end of file diff --git a/pages.json b/pages.json index 8ad3cd0..ad87721 100644 --- a/pages.json +++ b/pages.json @@ -440,6 +440,13 @@ "navigationBarTitleText": "我的评价", "enablePullDownRefresh": false } + },{ + "path": "behavior/behavior", + "style": { + "navigationBarTitleText": "健康行为", + "onReachBottomDistance": 40, //距离底部多远时触发 单位为px + "enablePullDownRefresh": true //设置参数为true + } } ] }, { diff --git a/pagesB/Behaviorpoints/Behaviorpoints.scss b/pagesB/Behaviorpoints/Behaviorpoints.scss index 8a231c7..0205634 100644 --- a/pagesB/Behaviorpoints/Behaviorpoints.scss +++ b/pagesB/Behaviorpoints/Behaviorpoints.scss @@ -1,127 +1,126 @@ -.app { - background-color: #F7F5F5; - height:100vh; - padding-top: 30rpx; - .background{ - height:100%; - background-color: #fff; - width: 95%; - margin: 0 auto; - .content { - position: relative; - margin-bottom: 50rpx; - image { - width: 100%; - height: 500rpx; - } - .wxSport{ - width: 25%; - height: 54rpx; - background: #00785C; - border-radius: 24rpx; - position: absolute; - bottom: 0%; - right: 6%; - color: #fff; - text-align: center; - border: 2rpx solid #00785C; - line-height: 54rpx; - } - .Exchangerecords { - width: 25%; - height: 54rpx; - background: #00785C; - border-radius: 24rpx; - position: absolute; - bottom: 0%; - left: 50%; - transform: translateX(-50%); - color: #fff; - text-align: center; - border: 2rpx solid #00785C; - line-height: 54rpx; - } - .PointsMall { - width: 25%; - height: 54rpx; - border: 2rpx solid #00785C; - background: #00785C; - border-radius: 24rpx; - position: absolute; - bottom: 0%; - left: 6%; - color: #fff; - text-align: center; - line-height: 54rpx; - } + .app { + background-color: #F7F5F5; + height: 100vh; + padding-top: 20rpx; - .name { - width: 90%; - height: 100rpx; - font-size: 30rpx; - font-weight: 400; - color: #FFFFFF; - position: absolute; - top: 10%; - left: 5%; - line-height: 33rpx; - - } - .number { - font-size: 56rpx; - font-weight: 400; - color: #FFFFFF; - position: absolute; - left: 50%; - top: 58%; - transform: translateX(-50%); - text-overflow: ellipsis; - white-space: nowrap; - } + .flex { + width: 100%; + display: flex; + justify-content: space-evenly; + position: absolute; + bottom: 20%; + left: 0%; } - .bottomitem{ - background-color: #FFF; + + .background { + height: 100%; + background-color: #fff; + width: 95%; margin: 0 auto; - padding-bottom: 100rpx; - .item{ + + .content { position: relative; + margin-bottom: 80rpx; + padding-bottom: 50rpx; + + .title { + position: absolute; + left: 40rpx; + top: 10rpx; + font-weight: 600; + color: #26A888; + padding-left: 20rpx; + } + + image { + width: 100%; + height: 450rpx; + } + + .item { + width: 25%; + height: 54rpx; + background: #00785C; + border-radius: 24rpx; + color: #fff; + text-align: center; + border: 2rpx solid #00785C; + line-height: 54rpx; + } + + .name { + width: 90%; + height: 100rpx; + font-size: 30rpx; + font-weight: 400; + color: #FFFFFF; + position: absolute; + top: 10%; + left: 5%; + line-height: 33rpx; + + } + + .number { + font-size: 56rpx; + font-weight: 400; + color: #FFFFFF; + position: absolute; + left: 50%; + top: 58%; + transform: translateX(-50%); + text-overflow: ellipsis; + white-space: nowrap; + } } - .Establishingarchives{ - font-size: 30rpx; - font-weight: 400; - color: #333333; - line-height: 38rpx; - padding: 8px 10px 5px 18px; - } - .integraltwo{ - color: red !important; - } - .integral{ - position: absolute; - top: 34%; - right: 3%; - color: #26A888; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - .timeone{ - font-size: 20rpx; - font-weight: 400; - color: #333333; - line-height: 38rpx; - padding: 0 10px 10px 18px; - border-bottom: 1px solid #E6E6E6; - } - .PointsRecord { - font-size: 30rpx; - font-weight: 400; - color: #000000; - line-height: 33rpx; - padding: 10px 10px 10px 15px; + + .bottomitem { + background-color: #FFF; + margin: 0 auto; + padding-bottom: 100rpx; + + .item { + position: relative; + } + + .Establishingarchives { + font-size: 30rpx; + font-weight: 400; + color: #333333; + line-height: 38rpx; + padding: 8px 10px 5px 18px; + } + + .integraltwo { + color: red !important; + } + + .integral { + position: absolute; + top: 34%; + right: 3%; + color: #26A888; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .timeone { + font-size: 20rpx; + font-weight: 400; + color: #333333; + line-height: 38rpx; + padding: 0 10px 10px 18px; + border-bottom: 1px solid #E6E6E6; + } + + .PointsRecord { + font-size: 30rpx; + font-weight: 400; + color: #000000; + line-height: 33rpx; + padding: 10px 10px 10px 15px; + } } } - } - - - } + } \ No newline at end of file diff --git a/pagesB/Behaviorpoints/Behaviorpoints.vue b/pagesB/Behaviorpoints/Behaviorpoints.vue index dd356cd..8d959e7 100644 --- a/pagesB/Behaviorpoints/Behaviorpoints.vue +++ b/pagesB/Behaviorpoints/Behaviorpoints.vue @@ -2,6 +2,9 @@ + + {{title}} + @@ -9,14 +12,21 @@ {{score?score:0}} - - 积分商城 + + + 积分商城 + + + 兑换记录 + - - 兑换记录 - - - 微信运动 + + + 微信运动 + + + 健康行为 + @@ -49,12 +59,18 @@ scorelist, scoretotal } from '@/api/pagesB/Behaviorpoints/index.js' + import { + detail, + } from '@/api/pages/homepage/homepage.js' // import { // mapActions // } from "vuex"; export default { data() { return { + noticebarlist: [ + '给自己开一个健康储蓄账户', + ], query: { identity: uni.getStorageSync('userinfo').cardNo, pageNum: 1, @@ -64,17 +80,24 @@ list: null, total: 0, score: 0, + title: '', + orgNo: '', }; }, onLoad() { + this.info(); this.scoretotalinfo(); }, onReady() { //更改导航栏文字 if (uni.getStorageSync('region') == 2) { - uni.setNavigationBarTitle({ - title: '东营健康银行' - }); + detail(this.query.identity).then(res => { + this.title = '东营健康银行' + res.data.countyName + '分行' + this.orgNo = res.data.orgNo + uni.setNavigationBarTitle({ + title: '东营健康银行' + res.data.countyName + '分行' + }); + }) } else { uni.setNavigationBarTitle({ title: '积分兑换' @@ -100,7 +123,12 @@ }, goexchange() { uni.navigateTo({ - url: '/pagesB/exchangerecords/exchangerecords' + url: `/pagesB/exchangerecords/exchangerecords` + }) + }, + gobehavior() { + uni.navigateTo({ + url: `/pagesB/behavior/behavior?orgNo=${this.orgNo}` }) }, //积分页面 @@ -122,7 +150,6 @@ // } }, }, - onReachBottom() { //下滑加载 if (this.list.length >= this.total) {} else { this.query.pageNum++ diff --git a/pagesB/behavior/behavior.vue b/pagesB/behavior/behavior.vue new file mode 100644 index 0000000..25b5f58 --- /dev/null +++ b/pagesB/behavior/behavior.vue @@ -0,0 +1,89 @@ + + + + + \ No newline at end of file diff --git a/pagesB/images/jifen.png b/pagesB/images/jifen.png index 608ec53..ddf8b10 100644 Binary files a/pagesB/images/jifen.png and b/pagesB/images/jifen.png differ