123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654 |
- <template>
- <view class="container" v-show="isShow">
- <image class="bgImg" :src="bgImg"></image>
- <view class="headerBox">
- <view class="osNavigationBar" :style="{height: statusBarHeight + 'px'}"></view>
- <view class="viewTopTitle" :style="{height: navBarHeight + 'px', 'line-height': navBarHeight + 'px'}">
- <view class="topTitleBackButton" @tap="onBackTo" :style="{top: (navBarHeight - 20) / 2 + 'px'}">
- <image class="topTitleBackButtonImg" src="/static/img/common/back_black.png"></image>
- </view>
- <text class="topTitleText">积分荣誉榜</text>
- </view>
- </view>
- <view class="contentBox" :style="{height: 'calc(100% - ' + (statusBarHeight + navBarHeight) + 'px)'}">
- <view class="numberBox">
- <view class="userNumber">{{userPoints}}</view>
- <view class="userNumberTips">
- <image class="userNumberTipsIcon" src="../static/img/pointsIndex/goldCoin.png"></image>
- <text class="userNumberTipsText">当前可用积分</text>
- </view>
- <view class="numberBtnBox">
- <view class="numberBtn" @tap="onDetailTo">积分详情</view>
- <view class="numberBtn" @tap="onDescribeTo">积分说明</view>
- </view>
- </view>
- <view class="moduleBox">
- <view class="pointShopBox">
- <image class="pointShopBG" :src="pointShopBG"></image>
- <view class="pointShopBtn" @tap="onTapPointShop">我要兑换</view>
- </view>
- <view class="noticeBox">
- <image class="noticeBG" :src="noticeBG"></image>
- <view class="noticeInfoBox">
- <view class="noticeInfo">
- <view class="noticeInfoTitle">宣传视频</view>
- <view class="noticeInfoText">{{noticeInfoText}}</view>
- <view class="noticeInfoBtn" @tap="onNoticeTo">点击学习</view>
- </view>
- <view class="noticeInfoVedioBox">
- <video class="noticeInfoVedio" :src="noticeVideoSrc"></video>
- </view>
- </view>
- <text class="unReadCountTips" v-if="noticeUnReadCount">{{noticeUnReadCount}}</text>
- </view>
- <view class="publicizeBox">
- <image class="publicizeBG" :src="publicizeBG"></image>
- <view class="publicizeInfoBox" @tap="onPublicizeTo">
- <view class="publicizeInfoTitle">通知公告</view>
- <view class="publicizeInfo" v-for="(item, index) in publicizeList" @tap.stop="onPublicizeViewTo(item.notificationId)">
- <image class="publicizeInfoIcon" src="../static/img/pointsIndex/noticeIcon.png"></image>
- <text class="publicizeInfoText">{{item.title}}</text>
- <text class="publicizeInfoRight"> > </text>
- </view>
- <!-- <view class="publicizeInfo">
- <image class="publicizeInfoIcon" src="../static/img/pointsIndex/noticeIcon.png"></image>
- <text class="publicizeInfoText">积分累计规则变动啦!</text>
- <text class="publicizeInfoRight"> > </text>
- </view> -->
- </view>
- <text class="unReadCountTips" v-if="publicizeUnReadCount">{{publicizeUnReadCount}}</text>
- </view>
- </view>
- <view class="pointsRankBox">
- <view class="pointsRankTitle">
- <image class="pointsRankTitleIcon" src="../static/img/pointsIndex/circle.png"></image>
- <text class="pointsRankTitleText">年度排名</text>
- <image class="pointsRankTitleIcon" src="../static/img/pointsIndex/circle.png"></image>
- </view>
- <view class="pointsRankBody">
- <view class="rankListHeader">
- <text class="rankList_rank">排名</text>
- <text class="rankList_tel">联系号码</text>
- <text class="rankList_point">累计积分</text>
- </view>
- <view class="rankList">
- <view class="rankListItem" v-if="listData.length > 0" v-for="(item, index) in listData" :class="index == 0 ? 'rankListItem_mine' : ''" >
- <image class="rankListItem_rankImg" :src="'../static/img/pointsIndex/rank' + item.rank + '.png'" v-if="[1,2,3].includes(item.rank)"></image>
- <text class="rankListItem_rank" v-else>{{item.rank}}</text>
- <view class="rankListItem_telBox">
- <image class="rankListItem_userImg" :src="item.headUrl" v-if="index == 0" @tap="onSecurityMaxImg(item.isSecurityMax)"></image>
- <image class="rankListItem_userImg" :src="item.headUrl" v-else></image>
- <text class="rankListItem_tel">{{item.phoneNumber}}</text>
- </view>
- <text class="rankListItem_point">{{item.points}}</text>
- </view>
- <view class="noneBox" v-else>
- <image class="noneImg" src="../../static/img/home/noneImg.png"></image>
- <view class="noneTips">暂无数据</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 安全卫士荣誉证书 -->
- <view class="popMask" v-if="isPopShow">
- <view class="popContent">
- <image class="popClose" src="../../static/img/common/close.png" @tap="onSecurityMaxImgCloseTo"></image>
- <image class="popImg" :src="certificateBG"></image>
- </view>
- </view>
- </view>
- </template>
- <script>
- var that;
- export default {
- data() {
- return {
- isShow: false,
- statusBarHeight: 0,
- navBarHeight: 0,
- bgImg: '../../static/img/home/noneImg.png',
- pointShopBG: '/static/logo.png',
- noticeBG: '/static/logo.png',
- noticeInfoText: '学习安全知识',
- noticeUnReadCount: 1,
- noticeVideoSrc: 'http://171.94.154.2:50105/hlfs//file/files_indefinitely?id=08dd7e3a-c12b-406a-8bbb-ab9db09f57f2&expires=1744958097&clientid=hotline&signature=BF5AD8DBEF553CDA6FD49AB9FEF1B6900177B1960682E722124EDFB8304556D64CC0040CC8DD796387EF704E8BD673ADE23E4D5CA32498CD',
- publicizeBG: '/static/logo.png',
- publicizeUnReadCount: 1,
- publicizeList: [],
- // pointShopBG: '../../static/img/home/noneImg.png',
- // noticeBG: '../../static/img/home/noneImg.png',
- // publicizeBG: '../../static/img/home/noneImg.png',
- userPoints: '0',
- listData: [],
- isPopShow: false,
- certificateBG :'../../static/img/home/noneImg.png'
- }
- },
- onLoad() {
- that = this;
- that.statusBarHeight = that.$systemInfo.statusBarHeight;
- that.navBarHeight = that.$systemInfo.navBarHeight;
- that.onGetData(function() {
- that.onGetPointData(function() {
- that.onGetListData(function() {
- that.isShow = true;
- });
- });
- });
- },
- methods: {
- onGetData(fun) {
- that.$admin.req({
- method: 'GET',
- url: '/api/v1/Snapshot/page/setting?PageType=1&Name=Points_Index'
- }).then(res => {
- if (res && res.length > 0) {
- res.forEach(item => {
- if (item.tagValue){
- that[item.tagName] = that.$admin.config.getfileurl + item.tagValue;
- }
- })
- }
- typeof fun === 'function' && fun();
- })
- },
- onGetPointData(fun) {
- that.$admin.req({
- method: 'GET',
- url: '/api/v1/Snapshot/points/total'
- }).then(res => {
- if (res) {
- that.userPoints = res;
- }
- typeof fun === 'function' && fun();
- })
- },
- onGetListData(fun) {
- that.$admin.req({
- method: 'GET',
- url: '/api/v1/Snapshot/points/rank'
- }).then(res => {
- that.listData = res.ranks || [];
- if (res.videoBulletin){
- that.noticeInfoText = res.videoBulletin.title || that.noticeInfoText;
- that.noticeUnReadCount = res.videoBulletin.unReadCount || 0;
- that.noticeVideoSrc = res.videoBulletin.videoPath ? (that.$admin.config.getfileurl + res.videoBulletin.videoPath) : that.noticeVideoSrc;
- console.log(that.noticeVideoSrc)
- }
- if (res.bulletins){
- that.publicizeUnReadCount = res.bulletins.unReadCount || 0;
- that.publicizeList = res.bulletins.items;
- }
- typeof fun === 'function' && fun();
- })
- },
- onDetailTo() {
- uni.navigateTo({
- url: '/pagesPointsBase/Points/Detail'
- })
- },
- onDescribeTo() {
- uni.navigateTo({
- url: '/pagesPointsBase/Points/Describe'
- })
- },
- onTapPointShop() {
- that.$util.msg("功能即将上线,敬请期待!");
- },
- onNoticeTo() {
- uni.navigateTo({
- url: '/pagesPointsBase/Publicize/Index?type=1'
- })
- },
- onPublicizeTo() {
- uni.navigateTo({
- url: '/pagesPointsBase/Publicize/Index?type=0'
- })
- },
- onPublicizeViewTo(id){
- uni.navigateTo({
- url: '/pagesPointsBase/Publicize/View?type=0&id=' + encodeURIComponent(id)
- })
- },
- onSecurityMaxImg(isSecurityMax){
- if (isSecurityMax){
- that.isPopShow = true;
- }
- },
- onSecurityMaxImgCloseTo() {
- that.isPopShow = false;
- },
- // 返回按钮点击事件
- onBackTo() {
- uni.navigateBack();
- },
- }
- }
- </script>
- <style lang="less">
- .container{
- background-color: #f5f5f5;
- }
-
- .bgImg {
- height: 520rpx;
- width: 100%;
- position: absolute;
- top: 0;
- left: 0;
- }
-
- .topTitleText {
- color: #000;
- font-size: 36rpx;
- font-weight: bold;
- }
- .contentBox {
- overflow-y: auto;
- position: relative;
- z-index: 9;
- }
- .numberBox {
- text-align: center;
- font-size: 32rpx;
- color: #fff;
- padding: 50rpx 0 40rpx;
- display: flex;
- justify-content: center;
- flex-wrap: wrap;
- }
- .userNumber {
- width: 100%;
- color: #000;
- font-size: 64rpx;
- font-weight: bold;
- vertical-align: text-bottom;
- margin-left: 4rpx;
- margin-bottom: 20rpx;
- }
- .userNumberTips {
- background-color: #e8ebfc;
- border-radius: 50rpx;
- text-align: center;
- padding: 10rpx 40rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
-
- .userNumberTipsIcon {
- width: 40rpx;
- height: 40rpx;
- margin-right: 20rpx;
- }
-
- .userNumberTipsText{
- font-weight: bold;
- color: #555;
- }
-
- .numberBtnBox {
- position: absolute;
- right: 0;
- height: 150rpx;
- width: 160rpx;
- display: flex;
- flex-wrap: wrap;
- align-content: space-between;
- justify-content: right;
- }
-
- .numberBtn{
- width: 160rpx;
- height: 60rpx;
- line-height: 60rpx;
- text-align: center;
- border-radius: 60rpx 0 0 60rpx;
- background: linear-gradient(45deg, #0bbafb, #4285ec);
- color: #fff;
- }
-
- .moduleBox{
- display: flex;
- width: calc(100% - 40rpx);
- height: 420rpx;
- padding: 30rpx 20rpx;
- justify-content: space-between;
- flex-wrap: wrap;
- align-content: space-between;
- }
-
- .pointShopBox {
- width: 100%;
- height: 200rpx;
- position: relative;
- }
- .pointShopBG {
- height: 200rpx;
- width: 100%;
- border-radius: 20rpx;
- position: absolute;
- top: 0;
- left: 0;
- }
- .pointShopBtn {
- background: url(../static/img/pointsIndex/button2.png) no-repeat;
- background-size: 100% 100%;
- background-attachment: fixed;
- color: #fff;
- padding: 20rpx 40rpx;
- border-radius: 50rpx;
- position: absolute;
- bottom: 14rpx;
- left: 60rpx;
- }
- .noticeBox {
- width: calc(60% - 20rpx);
- height: 200rpx;
- position: relative;
- }
- .noticeBG {
- height: 200rpx;
- width: 100%;
- border-radius: 20rpx;
- position: absolute;
- top: 0;
- left: 0;
- z-index: -1;
- }
- .noticeInfoBox {
- display: flex;
- justify-content: space-evenly;
- align-items: center;
- width: 100%;
- height: 100%;
- }
- .noticeInfoTitle {
- width: 100%;
- color: #000;
- font-size: 36rpx;
- font-weight: bold;
- margin-bottom: 20rpx;
- text-align: center;
- }
- .noticeInfoText {
- width: 100%;
- color: #596bbd;
- margin-bottom: 20rpx;
- text-align: center;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .noticeInfoBtn {
- background: url(../static/img/pointsIndex/button1.png) no-repeat;
- background-size: 100% 100%;
- background-attachment: fixed;
- color: #000;
- padding: 10rpx 0;
- border-radius: 50rpx;
- text-align: center;
- }
- .noticeInfoVedio {
- width: 160rpx;
- height: 160rpx;
- }
-
- .publicizeBox {
- width: 40%;
- height: 200rpx;
- position: relative;
- }
- .publicizeBG {
- height: 200rpx;
- width: 100%;
- border-radius: 20rpx;
- position: absolute;
- top: 0;
- left: 0;
- z-index: -1;
- }
- .publicizeInfoBox{
- width: calc(100% - 40rpx);
- height: 100%;
- padding: 0 20rpx;
- display: flex;
- flex-wrap: wrap;
- justify-content: left;
- align-content: space-evenly;
- }
-
- .publicizeInfoTitle {
- width: 100%;
- font-size: 36rpx;
- font-weight: bold;
- }
-
- .publicizeInfo {
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
-
- .publicizeInfoIcon {
- width: 40rpx;
- height: 40rpx;
- margin-right: 10rpx;
- }
-
- .publicizeInfoText {
- width: calc(100% - 80rpx);
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- color: #333;
- }
-
- .publicizeInfoRight {
- width: 30rpx;
- height: 30rpx;
- line-height: 30rpx;
- text-align: center;
- font-size: 36rpx;
- font-weight: bold;
- }
-
- .unReadCountTips{
- position: absolute;
- text-align: center;
- top: -10rpx;
- right: -10rpx;
- width: 40rpx;
- height: 40rpx;
- line-height: 40rpx;
- border-radius: 50%;
- background-color: #d9001a;
- color: #fff;
- }
-
- .pointsRankBox {
- background-color: #fff;
- margin: 0 20rpx;
- border-radius: 30rpx;
- }
-
- .pointsRankTitle {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100rpx;
- }
-
- .pointsRankTitleIcon {
- width: 20rpx;
- height: 20rpx;
- }
-
- .pointsRankTitleText {
- padding: 0 20rpx;
- font-size: 40rpx;
- font-weight: bold;
- color: #478dff;
- }
-
- .pointsRankBody {
- padding: 0 30rpx 20rpx;
- margin-bottom: 20rpx;
- }
-
- .rankListHeader {
- display: flex;
- justify-content: space-between;
- font-size: 32rpx;
- color: #333;
- padding: 20rpx 0 30rpx;
- text-align: center;
- }
-
- .rankList_rank {
- width: 120rpx;
- }
-
- .rankList_tel {}
-
- .rankList_point {
- }
-
- .rankList {}
-
- .rankListItem {
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size: 32rpx;
- font-weight: bold;
- text-align: center;
- color: #000;
- height: 120rpx;
- border-bottom: 2rpx #e5ecff solid;
- }
-
- .rankListItem_mine {
- border-bottom: none;
- border: 2rpx #e5ecff solid;
- border-radius: 100rpx;
- position: relative;
- }
-
- .rankListItem_mine::after{
- content: "本人";
- padding: 10rpx 40rpx;
- position: absolute;
- top: -10rpx;
- right: 0;
- background-color: #639dff;
- border-radius: 50rpx;
- color: #fff;
- font-size: 24rpx;
- }
-
- .rankListItem_rankImg {
- width: 60rpx;
- height: 60rpx;
- padding: 0 20rpx;
- }
-
- .rankListItem_rank {
- width: 100rpx;
- }
-
- .rankListItem_telBox{
- display: flex;
- justify-content: center;
- align-items: center;
- }
-
- .rankListItem_userImg {
- width: 80rpx;
- height: 80rpx;
- margin-right: 20rpx;
- }
-
- .rankListItem_tel {}
-
- .rankListItem_point{
- width: 120rpx;
- color: #fe0000;
- }
- .noneBox {
- background-color: #fff;
- border-radius: 50rpx 50rpx 0 0;
- padding: 50rpx 20rpx;
- text-align: center;
- }
-
- .noneImg {
- width: 200rpx;
- height: 200rpx;
- }
-
- .noneTips {
- font-size: 26rpx;
- color: #aaaaaa;
- text-align: center;
- margin-top: 10rpx;
- }
-
- /* 自定提示弹窗 */
- .popMask {
- position: fixed;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- justify-content: center;
- align-items: center;
- background-color: rgba(0, 0, 0, 1);
- line-height: 1 !important;
- z-index: 99;
- }
-
- .popContent {
- width: 100%;
- height: 70%;
- line-height: 1 !important;
- position: relative;
- }
-
- .popImg {
- width: 100%;
- height: 100%;
- border-radius: 0 0 30rpx 30rpx;
- }
-
- .popClose {
- width: 40rpx;
- height: 40rpx;
- position: absolute;
- top: -80rpx;
- left: 20rpx;
- }
- </style>
|