Browse Source

添加积分列表及用户界面积分显示

dev
396316021 1 year ago
parent
commit
8c95b31b60
  1. 9
      api/user.js
  2. 5
      pages.json
  3. 20
      pages/Index/components/UserPage/components/index.scss
  4. 270
      pages/Index/components/UserPage/index.vue
  5. 63
      pages/Integral/components/detail.scss
  6. 225
      pages/Integral/detail.vue

9
api/user.js

@ -55,6 +55,15 @@ export function cronList(data) {
data
});
}
export function integralList(data) {
return request({
url: `${host}/user/my-integral`,
method: "get",
data
});
}
export function userEdit(data) {
return request({

5
pages.json

@ -256,6 +256,11 @@
"style" : {
"navigationBarTitleText" : "社区留言板"
}
},{
"path" : "pages/Integral/detail",
"style" : {
"navigationBarTitleText" : "积分明细"
}
}
],
"globalStyle" : {

20
pages/Index/components/UserPage/components/index.scss

@ -166,6 +166,26 @@
}
}
}
.advisor-card{
// background-color: red;
margin-bottom:50rpx;
padding:0 26rpx;
.card-container{
padding:30rpx;
background: {
size:100% 100%;
position: center center;
repeat: no-repeat;
}
.top-container{
margin-bottom:14rpx;
align-items: center;
justify-content: space-between;
}
}
}
.phone-login-button{
display: inline;
background-color:transparent;

270
pages/Index/components/UserPage/index.vue

@ -1,15 +1,15 @@
<template>
<view class="body-background">
<image class="img" mode="widthFix" :src="staticImage.bodyBackground"/>
<image class="img" mode="widthFix" :src="staticImage.bodyBackground" />
</view>
<view class="app-wallpaper">
<u-row :custom-style="{padding:'26rpx'}">
<u-row :custom-style="{ padding: '26rpx' }">
<u-col :span="12">
<view class="user-container row">
<view class="user-avatar">
<button open-type="chooseAvatar" @chooseavatar="uploadAvatar" class="avatarBtn" v-if="userInfo"
style="background:transparent;">
style="background:transparent;">
<view class="avatar-container">
<u-avatar :src="userInfo.avatar" size="160" :default-url="staticImage.defaultAvatar"></u-avatar>
</view>
@ -21,7 +21,7 @@
<u-avatar :src="userInfo.avatar" size="160" :default-url="staticImage.defaultAvatar"></u-avatar>
</view>
</view>
<view class="user-content col " :class="{name_center:(!(userInfo?.fxx?.number))}">
<view class="user-content col " :class="{ name_center: (!(userInfo?.fxx?.number)) }">
<view class="user-content-top row col">
@ -35,29 +35,28 @@
</view>
</view>
<view class="user-icon-group row" v-if="userInfo?.advisor?.id" :class="{gray:userInfo.advisor_status === 0}">
<u-image :src="staticImage.userAdvisor" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>
<view class="user-icon-group row" v-if="userInfo?.advisor?.id"
:class="{ gray: userInfo.advisor_status === 0 }">
<u-image :src="staticImage.userAdvisor" :lazy-load="true" width="48" height="48"
mode="widthFix"></u-image>
<view class="user-icon-title">
社区顾问
</view>
<u-image :src="staticImage.userAdvisorV" :lazy-load="true" width="32" height="32" mode="widthFix"></u-image>
<u-image :src="staticImage.userAdvisorV" :lazy-load="true" width="32" height="32"
mode="widthFix"></u-image>
</view>
<view class="user-icon-group row" v-if="userInfo?.fxx?.number">
<u-image :src="staticImage.userFxx" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>
<view class="user-icon-title">
丰行侠
</view>
<u-rate
readonly
:count="userInfo.fxx.rank"
v-model="userInfo.fxx.rank"
size="30"
activeColor="#FF9545"
></u-rate>
<u-rate readonly :count="userInfo.fxx.rank" v-model="userInfo.fxx.rank" size="30"
activeColor="#FF9545"></u-rate>
</view>
</view>
<view class="top-right">
<view class="user-edit" @click="navTo('/pages/User/edit',true)" v-if="userInfo?.fxx?.id || this.userInfo?.advisor?.id">
<view class="user-edit" @click="navTo('/pages/User/edit', true)"
v-if="userInfo?.fxx?.id || this.userInfo?.advisor?.id">
编辑资料
</view>
<view class="user-edit" @click="logoutShow = true" v-if="userInfo">
@ -71,12 +70,8 @@
<view class="user-id-content">
专属ID{{ userInfo.fxx.number }}
</view>
<u-text prefix-icon="file-text"
text="复制"
@click="copyId(userInfo.fxx.number)"
size="28"
icon-style="font-size:28rpx"
color="#AA4900"></u-text>
<u-text prefix-icon="file-text" text="复制" @click="copyId(userInfo.fxx.number)" size="28"
icon-style="font-size:28rpx" color="#AA4900"></u-text>
</view>
</view>
</view>
@ -84,7 +79,7 @@
</view>
</u-col>
</u-row>
<view class="user-card border-box" :style="{backgroundImage:'url('+staticImage.userCard+')'}">
<view class="user-card border-box" :style="{ backgroundImage: 'url(' + staticImage.userCard + ')' }">
<view class="user-card-content-container border-box">
<view class="card-container">
<view class="card-title">我的暖新币</view>
@ -97,112 +92,95 @@
&nbsp;&nbsp;
|&nbsp;&nbsp; 已兑换
<u-text mode="price" size="28" color="#fff"
:text="(userInfo.get_coin_number - userInfo.coin_number)"></u-text>
:text="(userInfo.get_coin_number - userInfo.coin_number)"></u-text>
</view>
<view class="card-hr"></view>
<view class="card-btn-group row">
<view class="card-btn col" @click="navTo('/pages/Cron/detail',true)">暖新币明细</view>
<view class="card-btn col" @click="navTo('/pages/Cron/detail', true)">暖新币明细</view>
<view class="card-hhr"></view>
<view class="card-btn col" @click="navTo('/pages/Cron/rule')">兑换制度</view>
</view>
</view>
</view>
</view>
<view class="advisor-card" v-if="userInfo?.advisor?.id">
<view class="card-container" :style="{backgroundImage:'url('+staticImage.userAdvisorBg+')'}">
<view class="top-container row">
<view class="title">
<u-text :text="'我的顾问积分'" size="32rpx" color="#fff" line-height="48rpx"></u-text>
</view>
<view @click="navTo('/pages/Integral/detail',true)" class="text-btn row col" style="flex: 0 0 160rpx;">
<u-text :text="'积分明细'" size="32rpx" color="#fff" line-height="48rpx"></u-text>
<u-icon name="arrow-right" color="#fff" size="35rpx"></u-icon>
</view>
</view>
<view class="content">
<u-text :text="userInfo.integral || 0" size="64rpx" color="#fff" line-height="76rpx"></u-text>
</view>
</view>
</view>
<u-cell-group :border="false" custom-style="margin-bottom:26rpx;">
<u-cell
:border="false"
:rightIconStyle="{fontSize:'28rpx'}"
:isLink="true"
title="我的兑换订单"
@click="navTo('/pages/User/order',true)"
>
<u-cell :border="false" :rightIconStyle="{ fontSize: '28rpx' }" :isLink="true" title="我的兑换订单"
@click="navTo('/pages/User/order', true)">
<template #icon>
<view class="cell-icon" :style="{marginRight:'56rpx'}">
<view class="cell-icon" :style="{ marginRight: '56rpx' }">
<u-image :src="staticImage.userOrder" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>
</view>
</template>
</u-cell>
<u-cell
:border="false"
:rightIconStyle="{fontSize:'28rpx'}"
:isLink="true"
title="我的活动报名"
@click="navTo('/pages/User/activity',true)"
>
<u-cell :border="false" :rightIconStyle="{ fontSize: '28rpx' }" :isLink="true" title="我的活动报名"
@click="navTo('/pages/User/activity', true)">
<template #icon>
<view class="cell-icon" :style="{marginRight:'56rpx'}">
<view class="cell-icon" :style="{ marginRight: '56rpx' }">
<u-image :src="staticImage.userActivity" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>
</view>
</template>
</u-cell>
<u-cell
:border="false"
:rightIconStyle="{fontSize:'28rpx'}"
:isLink="true"
title="我的项目报名"
@click="navTo('/pages/User/project',true)"
v-if="userInfo.advisor?.id"
>
<u-cell :border="false" :rightIconStyle="{ fontSize: '28rpx' }" :isLink="true" title="我的项目报名"
@click="navTo('/pages/User/project', true)" v-if="userInfo.advisor?.id">
<template #icon>
<view class="cell-icon" :style="{marginRight:'56rpx'}">
<view class="cell-icon" :style="{ marginRight: '56rpx' }">
<u-image :src="staticImage.userActivity" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>
</view>
</template>
</u-cell>
<u-cell
:border="false"
:rightIconStyle="{fontSize:'28rpx'}"
:isLink="true"
title="我的留言"
@click="navTo('/pages/User/leave',true)"
>
<u-cell :border="false" :rightIconStyle="{ fontSize: '28rpx' }" :isLink="true" title="我的留言"
@click="navTo('/pages/User/leave', true)">
<template #icon>
<view class="cell-icon" :style="{marginRight:'56rpx'}">
<view class="cell-icon" :style="{ marginRight: '56rpx' }">
<u-image :src="staticImage.userMessage" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>
</view>
</template>
</u-cell>
<u-cell
:border="false"
:rightIconStyle="{fontSize:'28rpx'}"
:isLink="true"
title="我的线索"
@click="navTo('/pages/Line/user',true)"
>
<u-cell :border="false" :rightIconStyle="{ fontSize: '28rpx' }" :isLink="true" title="我的线索"
@click="navTo('/pages/Line/user', true)">
<template #icon>
<view class="cell-icon" :style="{marginRight:'56rpx'}">
<view class="cell-icon" :style="{ marginRight: '56rpx' }">
<u-image :src="staticImage.userLine" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>
</view>
</template>
</u-cell>
<u-cell
:border="false"
:rightIconStyle="{fontSize:'28rpx'}"
:isLink="true"
title="地址管理"
@click="navTo('/pages/Address/index',true)"
>
<u-cell :border="false" :rightIconStyle="{ fontSize: '28rpx' }" :isLink="true" title="地址管理"
@click="navTo('/pages/Address/index', true)">
<template #icon>
<view class="cell-icon" :style="{marginRight:'56rpx'}">
<view class="cell-icon" :style="{ marginRight: '56rpx' }">
<u-image :src="staticImage.userAddr" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>
</view>
</template>
</u-cell>
<u-cell
:border="false"
:rightIconStyle="{fontSize:'28rpx'}"
:isLink="true"
title="我的关注"
@click="navTo('/pages/User/follow',true)"
>
<u-cell :border="false" :rightIconStyle="{ fontSize: '28rpx' }" :isLink="true" title="我的关注"
@click="navTo('/pages/User/follow', true)">
<template #icon>
<view class="cell-icon" :style="{marginRight:'56rpx'}">
<view class="cell-icon" :style="{ marginRight: '56rpx' }">
<u-image :src="staticImage.userFollow" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>
</view>
</template>
@ -210,74 +188,59 @@
</u-cell-group>
<u-gap height="8" bgColor="#F5F5F6"></u-gap>
<u-cell-group :border="false" custom-style="margin-top:26rpx;">
<u-cell
:border="false"
:rightIconStyle="{fontSize:'28rpx'}"
:isLink="true"
title="党员报到码"
@click="navTo('/pages/Report/qrcode')"
>
<u-cell-group :border="false" custom-style="margin-top:26rpx;">
<u-cell :border="false" :rightIconStyle="{ fontSize: '28rpx' }" :isLink="true" title="党员报到码"
@click="navTo('/pages/Report/qrcode')">
<template #icon>
<view class="cell-icon" :style="{marginRight:'56rpx'}">
<view class="cell-icon" :style="{ marginRight: '56rpx' }">
<u-image :src="staticImage.userQrcode" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>
</view>
</template>
</u-cell>
<!-- <u-cell-->
<!-- :border="false"-->
<!-- :rightIconStyle="{fontSize:'28rpx'}"-->
<!-- :isLink="true"-->
<!-- title="意见箱/意见栏"-->
<!-- @click="navTo('/pages/Feed/index',true)"-->
<!-- >-->
<!-- <template #icon>-->
<!-- <view class="cell-icon" :style="{marginRight:'56rpx'}">-->
<!-- <u-image :src="staticImage.userFeed" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>-->
<!-- </view>-->
<!-- </template>-->
<!-- </u-cell>-->
<u-cell
:border="false"
:rightIconStyle="{fontSize:'28rpx'}"
:isLink="true"
title="社区留言板"
@click="navTo('/pages/Feed/index',true)"
>
<!-- <u-cell-->
<!-- :border="false"-->
<!-- :rightIconStyle="{fontSize:'28rpx'}"-->
<!-- :isLink="true"-->
<!-- title="意见箱/意见栏"-->
<!-- @click="navTo('/pages/Feed/index',true)"-->
<!-- >-->
<!-- <template #icon>-->
<!-- <view class="cell-icon" :style="{marginRight:'56rpx'}">-->
<!-- <u-image :src="staticImage.userFeed" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>-->
<!-- </view>-->
<!-- </template>-->
<!-- </u-cell>-->
<u-cell :border="false" :rightIconStyle="{ fontSize: '28rpx' }" :isLink="true" title="社区留言板"
@click="navTo('/pages/Feed/index', true)">
<template #icon>
<view class="cell-icon" :style="{marginRight:'56rpx'}">
<view class="cell-icon" :style="{ marginRight: '56rpx' }">
<u-image :src="staticImage.userFeed" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>
</view>
</template>
</u-cell>
<u-cell
:border="false"
:rightIconStyle="{fontSize:'28rpx'}"
:isLink="true"
title="街道联系方式"
@click="navTo('/pages/Street/index')"
>
<u-cell :border="false" :rightIconStyle="{ fontSize: '28rpx' }" :isLink="true" title="街道联系方式"
@click="navTo('/pages/Street/index')">
<template #icon>
<view class="cell-icon" :style="{marginRight:'56rpx'}">
<view class="cell-icon" :style="{ marginRight: '56rpx' }">
<u-image :src="staticImage.userPhone" :lazy-load="true" width="48" height="48" mode="widthFix"></u-image>
</view>
</template>
</u-cell>
</u-cell-group>
<!-- <view class="button" style="margin:30rpx 0;padding:26rpx;" v-if="userInfo">-->
<!-- <u-button-->
<!-- :plain="true"-->
<!-- type="warning"-->
<!-- size="large"-->
<!-- text="退出登录"-->
<!-- shape="circle"-->
<!-- @click="logout()"></u-button>-->
<!-- </view>-->
<!-- <view class="button" style="margin:30rpx 0;padding:26rpx;" v-if="userInfo">-->
<!-- <u-button-->
<!-- :plain="true"-->
<!-- type="warning"-->
<!-- size="large"-->
<!-- text="退出登录"-->
<!-- shape="circle"-->
<!-- @click="logout()"></u-button>-->
<!-- </view>-->
</view>
<u-modal :show="logoutShow" content="是否退出登录" @confirm="logout" @cancel="this.logoutShow = false;"
:closeOnClickOverlay="true" showCancelButton></u-modal>
:closeOnClickOverlay="true" showCancelButton></u-modal>
</template>
<script>
@ -288,7 +251,7 @@ import HeaderNav from '@/components/HeaderNav/Index.vue';
import FooterNav from '@/components/FooterNav/Index.vue';
import RightNav from '@/components/RightNav/Index.vue';
import api from '@/utils/functions.js';
import {appletLogin, avatarUpload} from "@/api/user";
import { appletLogin, avatarUpload } from "@/api/user";
export default {
components: {
@ -300,7 +263,7 @@ export default {
return {
title: 'Hello',
loading: true,
logoutShow:false,
logoutShow: false,
staticImage: {
userOrder: imghost + '/user-order.png',
userActivity: imghost + '/user-activity.png',
@ -316,8 +279,9 @@ export default {
userAdvisor: imghost + '/user-advisor.png',
userAdvisorV: imghost + '/user-advisor-v.png',
userCard: imghost + '/user-card.png',
editIcon:imghost + '/edit-icon.png',
defaultAvatar:imghost + '/default-avatar.png',
editIcon: imghost + '/edit-icon.png',
defaultAvatar: imghost + '/default-avatar.png',
userAdvisorBg: imghost + '/consultant-bg.png',
},
starCount: 10,
starValue: 10,
@ -352,20 +316,20 @@ export default {
},
methods: {
uploadAvatar(e) {
api.uploadOssFile(e.detail.avatarUrl).then(res => {
console.log('res', res)
this.userInfo.avatar = res.show_path
avatarUpload({
url: res.show_path
}).then(res => {
if (res.code === 200) {
uni.$u.toast('修改成功')
} else {
uni.$u.toast(res.msg)
}
}).catch(err => {
uni.$u.toast('服务器开小差了')
})
api.uploadOssFile(e.detail.avatarUrl).then(res => {
console.log('res', res)
this.userInfo.avatar = res.show_path
avatarUpload({
url: res.show_path
}).then(res => {
if (res.code === 200) {
uni.$u.toast('修改成功')
} else {
uni.$u.toast(res.msg)
}
}).catch(err => {
uni.$u.toast('服务器开小差了')
})
})
// console.log(res,'--------');
@ -379,7 +343,7 @@ export default {
}
})
},
reLunchTo(url){
reLunchTo(url) {
uni.navigateTo({
url: url
})
@ -419,11 +383,11 @@ export default {
},
logout() {
uni.removeStorage({key:'user'});
uni.removeStorage({key:'token'});
uni.removeStorage({key:'address'});
uni.removeStorage({key:'detailInfo'});
uni.removeStorage({key:'shopMore'});
uni.removeStorage({ key: 'user' });
uni.removeStorage({ key: 'token' });
uni.removeStorage({ key: 'address' });
uni.removeStorage({ key: 'detailInfo' });
uni.removeStorage({ key: 'shopMore' });
this.reLunchTo('/pages/Index/index')
}
},

63
pages/Integral/components/detail.scss

@ -0,0 +1,63 @@
.app-wallpaper{
padding:16rpx 26rpx;
}
.top-container{
padding:50rpx 26rpx 66rpx;
.top-price{
font-size: 72rpx;
font-family: ShiShangZhongHeiJianTi-Regular, ShiShangZhongHeiJianTi;
font-weight: 400;
color: #020B18;
line-height: 50rpx;
margin-bottom:26rpx;
}
.top-desc{
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 400;
color: #3D3D3D;
line-height: 50rpx;
}
}
.body-background{
background: {
color:#F5F5F6;
};
height:100vh;
}
::v-deep .u-tabs__wrapper__nav__line{
left:24rpx;
}
.cell-value-add{
font-size: 32rpx;
font-weight: 400;
color: #FF9545;
}
.cell-value-dec{
font-size: 32rpx;
font-weight: 400;
color: #0EAF4E;
}
.cell-label{
font-size: 28rpx;
font-weight: 400;
color: #AFB5BE;
line-height:50rpx;
}
.cell-image{
margin-right:20rpx;
}
.foot-button{
padding:10rpx 26rpx 40rpx 26rpx;
position: fixed;
bottom:0;
left:0;
z-index: 9999;
width: 100%;
background: {
color:#FFFFFF;
};
}
::v-deep .u-text__price{
display:none;
}

225
pages/Integral/detail.vue

@ -0,0 +1,225 @@
<template>
<view class="body-background">
<u-image
:show-loading="true"
:src="staticImage.bg"
width="100%"
height="420"
radius="10"
mode="widthFix"
class="img"
></u-image>
</view>
<u-navbar
:title="title"
:auto-back="true"
left-icon-size="40rpx"
:safe-area-inset-top="true"
:placeholder="true"
bgColor="transparent"
></u-navbar>
<view class="top-container">
<view class="top-price">
<u-text size="72" color="#020B18" :text="integral"></u-text>
</view>
<view class="top-desc">
积分余额
</view>
</view>
<view class="app-wallpaper">
<!-- <u-tabs-->
<!-- :list="list"-->
<!-- u-sticky-->
<!-- lineWidth="64"-->
<!-- lineHeight="8"-->
<!-- :inactiveStyle="{color:'#AFB5BE'}"-->
<!-- :activeStyle="{color:'#F47210'}"-->
<!-- lineColor="#F47210"-->
<!-- @change="tabChange"-->
<!-- ></u-tabs>-->
</view>
<u-list
@scrolltolower="getIntegral(true)"
:height="(size.height)+'px'"
:custom-style="{padding:'0 26rpx',boxSizing:'border-box'}"
>
<u-list-item
v-for="(item, index) in lists[this.current]"
:key="index"
>
<u-cell
:title="item.describe"
:label="item.create_time"
:icon="staticImage.bg"
:icon-style="{width:'64rpx',height:'64rpx',marginRight:'22rpx'}"
:border="false"
:custom-style="{backgroundColor:'#ffffff',borderRadius:'20rpx',marginBottom:'16rpx'}"
:title-style="{fontSize: '28rpx',fontWeight: '400',color: '#020B18',marginBottom:'20rpx'}"
>
<template #value v-if="item.type === (current+1)">
<view class="cell-value-add" v-if="item.type === 1">
+{{ item.number }}
</view>
<view class="cell-value-dec" v-else>
{{ item.number }}
</view>
</template>
<template #label>
<view class="cell-label">
{{item.create_time}}
</view>
</template>
<template #icon>
<view class="cell-image">
<u-image mode="widthFix" width="64" height="64" :src="staticImage.cronAdd" v-if="item.type === 1"></u-image>
<u-image mode="widthFix" width="50" height="50" :src="staticImage.cronDec" v-else></u-image>
</view>
</template>
</u-cell>
</u-list-item>
</u-list>
</template>
<script>
import {
imghost
} from '@/config/host.js'
import MzSubsection from '@/components/MzSubsection/Index.vue';
import api from '@/utils/functions.js';
import {cronBalance, cronList} from "@/api/user";
import {integralList} from "../../api/user";
export default {
components: {
MzSubsection
},
data() {
return {
list: [{
name: '积分获得'
}, {
name: '积分兑换'
},],
current: 0,
title: '积分明细',
loading: true,
staticImage: {
bg: imghost + '/cron-bg.png',
newIcon: imghost + '/new-icon.png',
cronAdd: imghost + '/cron-add.png',
cronDec: imghost + '/cron-dec.png',
},
balance: 0,
isTop: false,
lists: [[],[]],
end: [false, false],
listsAdd: [],
listsDec: [],
page: [1, 1],
size: {
height: 0,
},
integral:0,
}
},
onLoad() {
let userinfo = uni.getStorageSync('user');
if(userinfo){
this.integral = userinfo.integral;
}
},
onReady() {
let that = this;
let height = api.wxSystemInfo().system.windowHeight
let headerHeight = uni.$u.getPx(44) + uni.$u.sys().statusBarHeight
let info = uni.createSelectorQuery().in(this);
info.select('.top-container').boundingClientRect(function (data) {
}).exec(function (res) {
});
info.select('.app-wallpaper').boundingClientRect(function (data) {
}).exec(function (res) {
let otherHeight = 0;
res.forEach((item, index) => {
otherHeight += item.height;
});
that.size.height = that.size.height = height - headerHeight - otherHeight - uni.$u.getPx('40rpx');
});
},
computed: {
api() {
return api
},
sectionStyle() {
const style = {};
style.padding = '0 26rpx';
style.position = 'sticky';
style.zIndex = '9999';
style.top = api.navHeight().systemBarHeight + 'px'
return style;
},
},
methods: {
chatDetail(item) {
wx.navigateTo({
url: '/pages/ChatDetail/index?id=' + item.id
});
},
getBalance() {
cronBalance().then((res) => {
this.balance = res.data.balance;
})
},
getIntegral(nextPage = false) {
if (this.end[this.current]) {
return false;
}
integralList({
type: (this.current+1),
limit: 10,
page: this.page[this.current],
}).then((res) => {
this.lists[this.current] = this.lists[this.current].concat(res.data)
if (res.data.length === 0) {
this.end[this.current] = true;
}
})
if (nextPage) {
this.page[this.current]++;
}
},
tabChange(e) {
this.page[e.index] = 1;
this.end[e.index] = false;
this.lists = [[],[]];
this.current = e.index;
this.getIntegral(true);
}
},
options: {
styleIsolation: 'shared'
},
onPageScroll(res) {
if (res.scrollTop <= 20) {
uni.$emit('isTop', true);
} else {
uni.$emit('isTop', false);
}
},
created() {
// this.pagePadding = (api.navHeight().navPaddingTop +
// api.navHeight().navHeight + (api.navHeight().headerPadding * 2))
},
mounted() {
this.getBalance();
this.getIntegral(true);
}
}
</script>
<style lang="scss">
@import './components/detail.scss';
</style>
Loading…
Cancel
Save