|
|
@@ -8,8 +8,7 @@
|
|
|
v-for="(item, index) in TabList"
|
|
|
:key="index"
|
|
|
@tap="SetStatus(index)"
|
|
|
- >{{ item.title }}</view
|
|
|
- >
|
|
|
+ >{{ item.title }}</view>
|
|
|
</view>
|
|
|
<!-- 顶部导航-end -->
|
|
|
<!-- 积分列表 -->
|
|
|
@@ -23,7 +22,7 @@
|
|
|
<view class="head_name" v-else-if="item.type == 4">提现转茶宝</view>
|
|
|
<view class="head_name" v-else-if="item.type == 5">赠送茶宝</view>
|
|
|
<view class="head_name" v-else-if="item.type == 6">消费茶宝</view>
|
|
|
- <view class="head_name" v-else-if="item.type == 7">核销后送茶宝</view>
|
|
|
+ <view class="head_name" v-else-if="item.type == 8">核销后送茶宝</view>
|
|
|
<view class="head_price g_color">{{item.act}}{{ item.num }}</view>
|
|
|
</view>
|
|
|
<view class="list_con flex_r flex_ac flex_jb">
|
|
|
@@ -44,7 +43,7 @@ import { get, post } from "@/request/api.js";
|
|
|
import notGoods from "@/components/not-goods/index.vue";
|
|
|
export default {
|
|
|
components: {
|
|
|
- notGoods,
|
|
|
+ notGoods
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -53,27 +52,27 @@ export default {
|
|
|
TabList: [
|
|
|
{ title: "全部", sauts: "" },
|
|
|
{ title: "收益", sauts: 1 },
|
|
|
- { title: "支出", sauts: 2 },
|
|
|
+ { title: "支出", sauts: 2 }
|
|
|
],
|
|
|
list: [],
|
|
|
- page: 1,
|
|
|
+ page: 1
|
|
|
};
|
|
|
},
|
|
|
- onShow: function () {
|
|
|
+ onShow: function() {
|
|
|
this.page = 1;
|
|
|
this.list = [];
|
|
|
this.loadData();
|
|
|
},
|
|
|
methods: {
|
|
|
- loadData: function () {
|
|
|
+ loadData: function() {
|
|
|
let that = this;
|
|
|
let data = {
|
|
|
type: this.current == 0 ? "" : this.current,
|
|
|
page: page,
|
|
|
- limit: 10,
|
|
|
+ limit: 10
|
|
|
};
|
|
|
uni.showLoading({ mask: true });
|
|
|
- post("/my/chabao", data).then((res) => {
|
|
|
+ post("/my/chabao", data).then(res => {
|
|
|
uni.hideLoading();
|
|
|
if (res.code === 0) {
|
|
|
if (res.data.data.data.length > 0) {
|
|
|
@@ -98,26 +97,26 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- SetStatus: function (i) {
|
|
|
+ SetStatus: function(i) {
|
|
|
this.current = i;
|
|
|
page = 1;
|
|
|
this.list = [];
|
|
|
this.haveGoods = false;
|
|
|
this.loadData();
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
- onReachBottom: function () {
|
|
|
+ onReachBottom: function() {
|
|
|
if (page != -1) {
|
|
|
var that = this;
|
|
|
- setTimeout(function () {
|
|
|
+ setTimeout(function() {
|
|
|
++page;
|
|
|
that.loadData();
|
|
|
}, 800);
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss">
|