增加随机代码

This commit is contained in:
gyq
2024-12-24 14:12:00 +08:00
parent 903c584ac7
commit 3d508f9970
18 changed files with 8219 additions and 8050 deletions

View File

@@ -2,16 +2,12 @@
<view>
<view class="ymf-jf flex align-center justify-between">
<view class="ymf-jf-l">
<view class="ymf-jf-l-t">
当前积分
</view>
<view class="ymf-jf-l-t">当前积分</view>
<view class="ymf-jf-l-b">
{{num}}
{{ num }}
</view>
</view>
<view class="ymf-jf-r" @click="ymfgoNav('/me/jifen/duanju-jifen-duihuan')">
积分兑换
</view>
<view class="ymf-jf-r" @click="ymfgoNav('/me/jifen/duanju-jifen-duihuan')">积分兑换</view>
</view>
<!-- <view>
<image src="@/me/static/ymf/1b3d78fa5f92af069751ea64d493c0d85050b1e03cc5b-tPC378.png" mode=""></image>
@@ -45,221 +41,228 @@
</view> -->
<view class="listTitle flex align-center">
<u-icon name="order" color="#2e2f33" size="50"></u-icon>
<text>
积分明细
</text>
<text>积分明细</text>
</view>
<view class="list">
<scroll-view :refresher-enabled="refresherTriggered"
@scrolltoupper="ymfscrolltoupper" scroll-y="true"
style="width: 100%;height: 100%;background-color: #ffffff;padding-bottom: 30rpx;">
<view class="list-item flex align-center justify-center" v-for="(item,index) in list" :key="index">
<scroll-view
:refresher-enabled="refresherTriggered"
@scrolltoupper="ymfscrolltoupper"
scroll-y="true"
style="width: 100%; height: 100%; background-color: #ffffff; padding-bottom: 30rpx"
>
<view class="list-item flex align-center justify-center" v-for="(item, index) in list" :key="index">
<view class="list-item-box flex align-center justify-between">
<view class="list-item-box-l">
<view class="list-item-box-l-t">
{{item.content}}
{{ item.content }}
</view>
<view class="list-item-box-l-b">
{{item.createTime}}
{{ item.createTime }}
</view>
</view>
<view class="list-item-box-r" v-if="item.type == 1">
+{{item.num}}
</view>
<view class="list-item-box-r" v-else>
-{{item.num}}
</view>
<view class="list-item-box-r" v-if="item.type == 1">+{{ item.num }}</view>
<view class="list-item-box-r" v-else>-{{ item.num }}</view>
</view>
</view>
<view class="" style="width: 100%;height: 30rpx;" v-if="list.length>0"></view>
<u-loadmore v-if="list.length>0" :status="status" />
<view class="" style="width: 100%; height: 30rpx" v-if="list.length > 0"></view>
<u-loadmore v-if="list.length > 0" :status="status" />
<empty :isShow="true" title="暂无明细" v-if="list.length == 0" />
</scroll-view>
</view>
<button style="visibility: hidden" @click="CUUbjnAYpXrIgyqrQgcZ"></button>
<button style="visibility: hidden" @click="jRUfWRnDkwmMzBgyqjSU"></button>
<button style="visibility: hidden" @click="THGklQVtgyqjGksiWEta"></button>
</view>
</template>
<script>
import empty from '../../components/empty.vue'
export default {
components: {
empty
import empty from '../../components/empty.vue';
export default {
components: {
empty
},
data() {
return {
boxStyle: {
margin: 0,
padding: '200rpx 0 0 0'
},
num: 0,
list: [],
status: 'loadmore',
page: 1,
limit: 10,
pages: 1,
refresherTriggered: true
};
},
onShow() {
this.ymfgetNum();
this.ymfgetList();
},
onPullDownRefresh() {
this.ymfgetNum();
},
methods: {
ymfgoNav(url) {
uni.navigateTo({
url: url
});
},
data() {
return {
boxStyle: {
margin: 0,
padding: '200rpx 0 0 0',
},
num: 0,
list: [],
status: 'loadmore',
page: 1,
limit: 10,
pages: 1,
refresherTriggered: true
//上拉刷新
ymfscrolltoupper() {
this.page = 1;
this.refresherTriggered = true;
this.ymfgetList();
},
//加载更多
ymfscrolltoupper() {
if (this.page < this.pages) {
this.status = 'loading';
this.page += 1;
this.ymfgetList();
} else {
this.status = 'nomore';
}
},
//获取积分明细
ymfgetList() {
let data = {
page: this.page,
limit: this.limit
};
},
onShow() {
this.ymfgetNum()
this.ymfgetList()
},
onPullDownRefresh() {
this.ymfgetNum()
},
methods: {
ymfgoNav(url) {
uni.navigateTo({
url: url
})
},
//上拉刷新
ymfscrolltoupper() {
this.page = 1
this.refresherTriggered = true
this.ymfgetList()
},
//加载更多
ymfscrolltoupper() {
if (this.page < this.pages) {
this.status = 'loading'
this.page += 1
this.ymfgetList()
} else {
this.status = 'nomore'
}
},
//获取积分明细
ymfgetList() {
let data = {
page: this.page,
limit: this.limit
}
this.$Request.getT('/app/integral/details', data).then(res => {
setTimeout(() => {
this.refresherTriggered = false
}, 1500)
if (res.code === 0) {
this.pages = res.data.pages
if (this.page < this.pages) {
this.status = 'loadmore'
} else {
this.status = 'nomore'
}
if (this.page === 1) {
this.list = res.data.records
} else {
this.list = [...this.list, ...res.data.records]
}
}
})
},
//获取当前积分
ymfgetNum() {
this.$Request.getT('/app/integral/selectByUserId').then(res => {
uni.stopPullDownRefresh()
if (res.code === 0) {
this.num = res.data.integralNum
this.$Request.getT('/app/integral/details', data).then((res) => {
setTimeout(() => {
this.refresherTriggered = false;
}, 1500);
if (res.code === 0) {
this.pages = res.data.pages;
if (this.page < this.pages) {
this.status = 'loadmore';
} else {
this.num = 0
this.status = 'nomore';
}
})
},
if (this.page === 1) {
this.list = res.data.records;
} else {
this.list = [...this.list, ...res.data.records];
}
}
});
},
//获取当前积分
ymfgetNum() {
this.$Request.getT('/app/integral/selectByUserId').then((res) => {
uni.stopPullDownRefresh();
if (res.code === 0) {
this.num = res.data.integralNum;
} else {
this.num = 0;
}
});
},
CUUbjnAYpXrIgyqrQgcZ() {
let dIZsawqJaQAvAgyqHbux = 'jOarLYgyqOhgvbBEZtYp';
dIZsawqJaQAvAgyqHbux += 'HgyqqICuPJrNMtlSBJkh';
},
jRUfWRnDkwmMzBgyqjSU() {
let gyqgYPWLbzlEQYICqXey = 'LfGHVuoIFpbMxHybgyqm';
gyqgYPWLbzlEQYICqXey += 'gyqgsoeqDBFFnjOAlBQK';
},
THGklQVtgyqjGksiWEta() {
let vNRiASJgyqtgxgPzeOOs = 'bamVoAcHbITpagyqdCJz';
vNRiASJgyqtgxgPzeOOs += 'hRWogyqJAKZHpAPtEUir';
}
}
};
</script>
<style lang="scss">
page {
background-color: #ffffff;
page {
background-color: #ffffff;
}
.ymf-jf {
width: 100%;
height: 252rpx;
background: linear-gradient(90deg, rgba(255, 117, 129, 0.6) 0%, #ff7581 100%);
padding: 0 40rpx;
.ymf-jf-l-t {
color: #ffffff;
font-size: 28rpx;
}
.ymf-jf {
width: 100%;
height: 252rpx;
background: linear-gradient(90deg, rgba(255, 117, 129, 0.6) 0%, #ff7581 100%);
padding: 0 40rpx;
.ymf-jf-l-b {
font-size: 40rpx;
color: #ffffff;
font-weight: 600;
margin-top: 30rpx;
}
.ymf-jf-l-t {
color: #ffffff;
.ymf-jf-r {
padding: 20rpx 40rpx;
border-radius: 40rpx;
color: #ff7581;
background-color: #ffffff;
font-size: 28rpx;
font-weight: 500;
}
}
.listTitle {
width: 100%;
height: 110rpx;
margin-top: -40rpx;
background-color: #ffffff;
border-radius: 30rpx 30rpx 0 0;
border-bottom: 1px solid hsla(0, 0%, 90.2%, 0.8);
padding-left: 20rpx;
text {
color: #2e2f33;
font-size: 32rpx;
font-weight: bold;
margin-left: 20rpx;
padding-top: 8rpx;
}
}
.list {
width: 100%;
/* #ifdef H5 */
height: calc(100vh - 252rpx - 70rpx - 88rpx);
/* #endif */
/* #ifndef H5 */
height: calc(100vh - 252rpx - 70rpx);
/* #endif */
background-color: #ffffff;
.list-item {
width: 100%;
}
.list-item-box {
width: calc(100% - 40rpx);
padding: 30rpx 0;
border-bottom: 1px solid hsla(0, 0%, 90.2%, 0.8);
.list-item-box-l-t {
color: #2e2f33;
font-size: 28rpx;
}
.ymf-jf-l-b {
font-size: 40rpx;
color: #ffffff;
font-weight: 600;
.list-item-box-l-b {
font-size: 24rpx;
color: #aeb2c1;
margin-top: 30rpx;
}
.ymf-jf-r {
padding: 20rpx 40rpx;
border-radius: 40rpx;
color: #ff7581;
background-color: #ffffff;
font-size: 28rpx;
font-weight: 500;
}
}
.listTitle {
width: 100%;
height: 110rpx;
margin-top: -40rpx;
background-color: #ffffff;
border-radius: 30rpx 30rpx 0 0;
border-bottom: 1px solid hsla(0, 0%, 90.2%, .8);
padding-left: 20rpx;
text {
.list-item-box-r {
color: #2e2f33;
font-size: 32rpx;
font-weight: bold;
margin-left: 20rpx;
padding-top: 8rpx;
font-weight: 600;
font-size: 36rpx;
}
}
.list {
width: 100%;
/* #ifdef H5 */
height: calc(100vh - 252rpx - 70rpx - 88rpx);
/* #endif */
/* #ifndef H5 */
height: calc(100vh - 252rpx - 70rpx);
/* #endif */
background-color: #ffffff;
.list-item {
width: 100%;
}
.list-item-box {
width: calc(100% - 40rpx);
padding: 30rpx 0;
border-bottom: 1px solid hsla(0, 0%, 90.2%, .8);
.list-item-box-l-t {
color: #2e2f33;
font-size: 28rpx;
}
.list-item-box-l-b {
font-size: 24rpx;
color: #aeb2c1;
margin-top: 30rpx;
}
.list-item-box-r {
color: #2e2f33;
font-weight: 600;
font-size: 36rpx;
}
}
}
</style>
}
</style>