2021-10-22 03:07:32 +00:00
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<!-- 状态栏 -->
|
|
|
|
|
<status-nav :titleVal="'积分管理'" :statusTitle="true"></status-nav>
|
2022-04-11 02:12:11 +00:00
|
|
|
|
<view :style="{paddingTop: statusHeight+'px'}" class="pad-zy30 fon28 col3">
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<view class="mar-s20 bacf pad20 radius20 bold">
|
|
|
|
|
<view class="mar-x30">当前积分</view>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view style="font-size: 56rpx;">{{dangScore}}</view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
<view class="mar-s20 disjbac">
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view class="disjbac pad20 bacf radius20 width48" style="box-sizing: border-box;">
|
|
|
|
|
<image src="../../static/public/integral-01-108.png" class="score-img" mode=""></image>
|
|
|
|
|
<view class="width100 score-people-box">
|
|
|
|
|
<view class="font4">我的分享人</view>
|
|
|
|
|
<view class="fon36 bold">{{sharePeople}}<span class="fon26 font4">人</span></view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view class="disjbac pad20 bacf radius20" style="box-sizing: border-box;">
|
|
|
|
|
<image src="../../static/public/integral-02-108.png" class="score-img" mode=""></image>
|
|
|
|
|
<view class="width100 score-people-box">
|
|
|
|
|
<view class="font4">签到记录</view>
|
|
|
|
|
<view @tap="goSigin" class="score-sigin-btn">立即签到</view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 积分列表,消费列表 -->
|
|
|
|
|
<view class="mar-s20 bacf pad20 radius20">
|
|
|
|
|
<view class="mar-x50 fon28 disja">
|
|
|
|
|
<view @tap="switchState(true)" :class="activeJF?'col3 bold':'col9'">积分列表</view>
|
|
|
|
|
<view @tap="switchState(false)" :class="!activeJF?'col3 bold':'col9'">消费列表</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 积分列表 -->
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<block v-if="dataList.length!=0">
|
|
|
|
|
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
|
|
|
|
|
<view>
|
|
|
|
|
<view class="fon26 col3">{{item.title}}</view>
|
|
|
|
|
<view class="mar-s10 fon20 col9">{{item.time}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-show="activeJF" class="fon36 bold pcol">+{{item.num}}</view>
|
|
|
|
|
<view v-show="!activeJF" class="fon36 bold">{{item.num}}</view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
</block>
|
|
|
|
|
<view v-if="isHave" class="disjcac fon24 col9 bold">暂无更多列表信息</view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
<!-- 分享按钮 -->
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view class="disjcac score-share-box">
|
|
|
|
|
<image src="/static/public/bottom-shear.png" mode=""></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<view class="fon40 colf bold mar-z10">分享给好友</view>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<button class="posia-op" open-type="share"></button>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
activeJF:true,
|
|
|
|
|
dataList:[
|
2021-11-02 10:23:53 +00:00
|
|
|
|
// {title:'签到兑换',time:'2021.09.06 10:30:10',num:'1'},
|
|
|
|
|
// {title:'分享注册',time:'2021.09.06 10:30:10',num:'1'},
|
|
|
|
|
// {title:'二级分销',time:'2021.09.06 10:30:10',num:'1'},
|
|
|
|
|
// {title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
|
|
|
|
|
],
|
|
|
|
|
dangScore:0,//当前积分
|
|
|
|
|
sharePeople:0,//我的分享人
|
|
|
|
|
page:1,
|
|
|
|
|
size:10,
|
|
|
|
|
total:0,
|
|
|
|
|
isZanw:true,
|
|
|
|
|
ntype:'in',
|
2021-12-02 09:31:26 +00:00
|
|
|
|
isHave:false,
|
2021-11-02 10:23:53 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
2022-04-11 02:12:11 +00:00
|
|
|
|
computed:{
|
|
|
|
|
statusHeight() {
|
|
|
|
|
return this.$store.state.statusHeight
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-11-02 10:23:53 +00:00
|
|
|
|
onReachBottom() {
|
|
|
|
|
if(this.total!=this.dataList.length){
|
|
|
|
|
this.page++
|
|
|
|
|
this.checkList(this.ntype)//调用自主预约列表事件
|
|
|
|
|
} else {
|
|
|
|
|
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多记录','none',1000)
|
|
|
|
|
this.isZanw = false
|
2021-10-22 03:07:32 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
2022-03-04 08:48:40 +00:00
|
|
|
|
onShow() {
|
2022-03-09 10:06:05 +00:00
|
|
|
|
// 禁用小程序分享
|
|
|
|
|
this.$toolAll.tools.disableShareEv();
|
2022-02-09 00:52:28 +00:00
|
|
|
|
},
|
2021-12-02 09:31:26 +00:00
|
|
|
|
onLoad(options) {
|
2022-04-02 09:56:53 +00:00
|
|
|
|
this.checkInfo();
|
|
|
|
|
this.checkList();
|
2021-10-22 03:07:32 +00:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
2021-11-02 10:23:53 +00:00
|
|
|
|
checkList(){//查询积分列表
|
|
|
|
|
this.$requst.post('user/score-log',{page:this.page,size:this.size,type:this.ntype}).then(res=>{
|
|
|
|
|
if(res.code==0){
|
|
|
|
|
if(this.page==1) this.dataList = [];
|
|
|
|
|
this.total = res.data.total;
|
|
|
|
|
if(res.data.list.length!=0){
|
|
|
|
|
res.data.list.forEach(item=>{
|
|
|
|
|
let obj = {
|
|
|
|
|
title:item.name,
|
|
|
|
|
time:item.created_at,
|
|
|
|
|
num:item.num
|
|
|
|
|
}
|
|
|
|
|
this.dataList.push(obj);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(this.dataList.length==0)this.isHave = true;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
checkInfo(){//查询个人积分信息
|
|
|
|
|
this.$requst.post('user/score-load').then(res=>{
|
|
|
|
|
if(res.code==0){
|
|
|
|
|
this.dangScore = res.data.score;
|
|
|
|
|
this.sharePeople = res.data.share.total;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
switchState(flag){//切换事件
|
|
|
|
|
this.dataList = [];
|
2021-10-22 03:07:32 +00:00
|
|
|
|
this.activeJF = flag;
|
2021-11-02 10:23:53 +00:00
|
|
|
|
this.page =1;
|
|
|
|
|
this.isZanw = true;
|
2021-10-22 03:07:32 +00:00
|
|
|
|
if(flag) {
|
2021-11-02 10:23:53 +00:00
|
|
|
|
this.ntype ='in';
|
|
|
|
|
this.checkList(this.ntype);
|
2021-10-22 03:07:32 +00:00
|
|
|
|
} else {
|
2021-11-02 10:23:53 +00:00
|
|
|
|
this.ntype ='out';
|
|
|
|
|
this.checkList(this.ntype);
|
2021-10-22 03:07:32 +00:00
|
|
|
|
}
|
2021-11-02 10:23:53 +00:00
|
|
|
|
},
|
|
|
|
|
goSigin(){
|
|
|
|
|
uni.navigateTo({url:'/pagesA/signIn/signIn'})
|
2021-10-22 03:07:32 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
</style>
|