feat: 添加静态资源文件及基础组件
- 新增大量图片资源,包括图标、背景图、海报等,用于页面展示 - 添加字体文件及样式配置,支持自定义字体 - 引入 uni-ui 组件库,包括图标、弹窗、日期选择器等常用组件 - 添加网络状态监听、加密工具等基础工具函数 - 配置 Vuex 状态管理,包括购物车数量、热门搜索词等 - 增加页面组件,如用户协议、分销信息、提现状态等 - 配置项目构建和忽略文件,优化开发体验
This commit is contained in:
104
pages/users/user_vip_areer/index.vue
Normal file
104
pages/users/user_vip_areer/index.vue
Normal file
@@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="px-20">
|
||||
<view v-if="expList.length" class="list">
|
||||
<view class="item" v-for="(item,index) in expList" :key="index">
|
||||
<view class="pt-32 pb-24 fs-24 lh-34rpx text--w111-999">{{ item.time }}</view>
|
||||
<view class="px-24 rd-24rpx bg--w111-fff">
|
||||
<view class="flex py-32" v-for="cell in item.list" :key="cell.id">
|
||||
<view class="flex-1">
|
||||
<view class="fs-28 lh-40rpx">{{cell.title}}</view>
|
||||
<view class="mt-12 text--w111-999 fs-24 lh-34rpx">{{cell.add_time}}</view>
|
||||
</view>
|
||||
<view class="Regular fs-36 lh-40rpx" v-if="cell.pm">+{{cell.number}}</view>
|
||||
<view class="Regular fs-36 lh-40rpx" v-else>-{{cell.number}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="!expList.length && !loading" class="mt-20">
|
||||
<emptyPage title="暂无经验记录~" src="/statics/images/noOrder.gif"></emptyPage>
|
||||
</view>
|
||||
</view>
|
||||
<view class='loadingicon flex-center' v-if="expList.length">
|
||||
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
|
||||
</view>
|
||||
<home></home>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getUserInfo,
|
||||
getlevelInfo,
|
||||
getlevelExpList
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app';
|
||||
import emptyPage from '@/components/emptyPage.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
loadend: false,
|
||||
loadTitle: '加载更多', //提示语
|
||||
page: 1,
|
||||
limit: 20,
|
||||
expList: [],
|
||||
list: [],
|
||||
imgHost: HTTP_REQUEST_URL
|
||||
}
|
||||
},
|
||||
components: {
|
||||
emptyPage
|
||||
},
|
||||
created() {
|
||||
this.getlevelList();
|
||||
},
|
||||
onShow() {
|
||||
uni.removeStorageSync('form_type_cart');
|
||||
},
|
||||
methods: {
|
||||
getlevelList: function() {
|
||||
if (this.loadend) return false;
|
||||
if (this.loading) return false;
|
||||
getlevelExpList({
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
}).then(res => {
|
||||
const {
|
||||
list,
|
||||
} = res.data;
|
||||
this.list = [...this.list, ...list];
|
||||
let expData = [...this.list];
|
||||
let expList = [];
|
||||
for (let i = 0; i < expData.length; i++) {
|
||||
expList.push({
|
||||
time: expData[i].time,
|
||||
list: [expData[i]],
|
||||
});
|
||||
for (let j = i + 1; j < expData.length; j++) {
|
||||
if (expData[i].time == expData[j].time) {
|
||||
expList[expList.length - 1].list.push(expData[j]);
|
||||
expData.splice(j, 1);
|
||||
j--;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.expList = expList;
|
||||
this.loadend = list.length < this.limit;;
|
||||
this.loadTitle = this.loadend ? '没有更多了~' : '加载更多';
|
||||
this.page = this.page + 1;
|
||||
this.loading = false;
|
||||
}).catch(err => {
|
||||
this.loading = false;
|
||||
this.loadTitle = '加载更多';
|
||||
});
|
||||
}
|
||||
},
|
||||
onReachBottom: function() {
|
||||
this.getlevelList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user