123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <template>
- <view class="hdetail" :style="'padding-top:'+nvaHeight+'px;'">
- <view class="navbox">
- <uni-nav-bar color="#ffffff" left-icon="left" title="积分商城" :background-color="backgroundColor" :border="false" statusBar='true' fixed="true" @clickLeft="getBackFn">
- </uni-nav-bar>
- <!-- 家人 -->
- <view class="headbox flexc" :style="'backgroundColor:'+backgroundColor">
- <view class="htop" :class="tabval==idx?'act':''" v-for="(ite,idx) in list" :key="idx" @click="getTabFn(idx)">
- <view class="img"><image :src="heada" class="imaga"></image></view>
- <view class="tit">{{ite.tit}}</view>
- </view>
- <view class="htop" @click="getAddFn">
- <view class="img add"><image :src="addimg"></image></view>
-
- </view>
-
- </view>
- </view>
- <!-- 主体 -->
- <view class="wymain" >
-
- </view>
- <loading></loading>
- </view>
- </template>
- <script>
- export default {
- components:{},
- data(){
- return{
- nvaHeight:44,
- // activeColor:'#A7CDF9',
- // nactiveColor:'#DADADA',
- backgroundColor: "transparent",
-
- }
- },
- watch:{
- lookfalg(val){
- if(val){
-
- }
- }
- },
- onPageScroll(e) {
- var scrollTop = Number(e.scrollTop);
- if (scrollTop > 0) {
- this.backgroundColor = '#48CC9A'
- } else {
- this.backgroundColor = 'transparent'
- }
- },
- onLoad: function() {
- uni.getSystemInfo({
- success: (e) => {
- this.nvaHeight = Number(e.statusBarHeight)+44;
- }
- })
- },
- methods:{
- getClose(){
- this.type="";
- },
- getCodeFn(){
- this.type='code'
- },
- getAddFn(){
- this.$tab.navigateTo(`/health/pages/health/add`)
- },
- getZhanFn(idx){
- this.zhanList[idx].zhanflag=!this.zhanList[idx].zhanflag
- },
- getBackFn(){
- uni.navigateBack({
- delta:1
- })
- },
- getCode(code){
- var idCard='123456789'
- const firstPart = idCard.slice(0, 1);
- // 生成中间8位的星号
- const middlePart = '*'.repeat(idCard.length-2);
- // 获取后4位
- const lastPart = idCard.slice(idCard.length-1);
- var s= firstPart + middlePart + lastPart;
- console.log(s)
- // return firstPart + middlePart + lastPart;
- },
- getTabFn(val){
- this.tabval=val;
- },
- getDataFn(){
- var params={
- pageSize:this.pageSize,
- pageNum: this.pageNum,
- }
- params.noticeType=this.tabidx
- getNoticeList(params).then(res=>{
- if(res.code==200){
-
- }else{
- this.$toast(res.msg)
- }
- })
-
- },
-
- }
- }
- </script>
- <style>
- page{background:#F4F6F8;}
- </style>
- <style lang="scss" scoped>
- .w100{width: 100%;}
- .hdetail{
- background: linear-gradient(180deg, #FFB132 0%, #FE5A0E 49%, #FFFFFF 100%) no-repeat;background-size: 100% 722rpx;min-height: 100vh;box-sizing: border-box;
- }
- .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4; }
- .wymain{z-index: 2;position: relative;padding: 0 24rpx 24rpx;}
- </style>
|