Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop
This commit is contained in:
+2
-2
@@ -5,11 +5,11 @@ ENV = 'development'
|
||||
#VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
|
||||
|
||||
|
||||
#VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
|
||||
|
||||
# DEV
|
||||
VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
||||
#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
||||
|
||||
# sit
|
||||
#VITE_APP_BASE_API_Url = 'http://25.18.122.91:9786'
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
ref="pagingRef"
|
||||
v-model="data_list"
|
||||
@query="queryList"
|
||||
:fixed="false"
|
||||
class="scroll_div"
|
||||
:auto="true"
|
||||
empty-view-text="暂无学习任务"
|
||||
@@ -17,6 +16,7 @@
|
||||
<view class="title font_pf">积分商城</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="eye-area-div">
|
||||
<view class="mascot-div">
|
||||
<image src="@/static/images/pointsMall/mascot.png" class="img" mode="widthFix"></image>
|
||||
@@ -24,12 +24,18 @@
|
||||
<view class="text-tip-div">
|
||||
<view class="fl1"></view>
|
||||
<view class="now-points-title">当前积分</view>
|
||||
<view class="now-points">{{points}}</view>
|
||||
<view class="now-points-target" @click="common.navigateTo('/pages/pointsAndRank/points');">积分明细></view>
|
||||
<view class="now-points">
|
||||
<uv-count-to :startVal="startVal" :endVal="endVal" :useEasing="true" ref="countToRef"></uv-count-to>
|
||||
</view>
|
||||
<view class="now-points-target" @click="common.navigateTo('/pages/pointsAndRank/points')">积分明细></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-list-div">
|
||||
<view class="item" v-for="item in data_list" @click="common.navigateTo('/pages/pointsRedemption/index?id=' + item.actId);">
|
||||
<view
|
||||
class="item"
|
||||
v-for="item in data_list"
|
||||
@click="common.navigateTo('/pages/pointsRedemption/index?id=' + item.actId)"
|
||||
>
|
||||
<view class="product-image">
|
||||
<image-preview :src="item.ossAddr" class="img_100"></image-preview>
|
||||
</view>
|
||||
@@ -44,35 +50,67 @@
|
||||
{{ item.excPoints }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="product-time">
|
||||
{{ item.endTm.substr(0,10) }}截止
|
||||
</view>
|
||||
<view class="product-time">{{ item.endTm.substr(0, 10) }}截止</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
import numImg from '@/static/images/pointsMall/num.png';
|
||||
import common from '@/common/common';
|
||||
import { queryPointsActivityPaging } from '@/api/pointsMall';
|
||||
import { queryCurrentStatus } from '@/api/pointsAndRank.js';
|
||||
import useZpaging from '@/composables/useZpaging.js';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { ref } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { ref } from 'vue';
|
||||
const startVal = ref(0);
|
||||
const endVal = ref(0);
|
||||
const countToRef = ref(null);
|
||||
const points_data = ref({});
|
||||
const isFirstLoad = ref(true);
|
||||
const reloadCurrentStatus = () => {
|
||||
queryCurrentStatus().then(({ body }) => {
|
||||
const { currentPoints } = body;
|
||||
if (currentPoints !== endVal.value) {
|
||||
startVal.value = endVal.value;
|
||||
endVal.value = currentPoints;
|
||||
points_data.value = {
|
||||
badgeNum: body['badgeNum'], // 徽章数
|
||||
currentPoints: body['currentPoints'], // 当前积分
|
||||
currentRankAddr: body['ossAddr'], // 当前段位图片
|
||||
currentRankName: body['currentRankName'] // 当前段位名称
|
||||
};
|
||||
common.setValue('points_data', points_data.value);
|
||||
countToRef.value.start();
|
||||
}
|
||||
});
|
||||
};
|
||||
const fetchFunction = (params) => {
|
||||
if(!isFirstLoad .value) {
|
||||
reloadCurrentStatus();
|
||||
} else {
|
||||
isFirstLoad .value = false
|
||||
}
|
||||
return queryPointsActivityPaging({ ...params });
|
||||
};
|
||||
const { pagingRef, queryList, data_list, reload, search, total, clear } = useZpaging({
|
||||
fetchFunction:queryPointsActivityPaging
|
||||
fetchFunction: fetchFunction
|
||||
});
|
||||
const points = ref(0);
|
||||
onLoad((e) => {
|
||||
points.value = e.points??0;
|
||||
})
|
||||
startVal.value = e.points ?? 0;
|
||||
endVal.value = e.points ?? 0;
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if(!isFirstLoad .value) {
|
||||
reloadCurrentStatus();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.scroll_div{
|
||||
.scroll_div {
|
||||
background-color: #efefef;
|
||||
}
|
||||
// 主要列表区域
|
||||
@@ -82,7 +120,7 @@ import { ref } from 'vue';
|
||||
height: calc(100% - 240rpx);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.item{
|
||||
.item {
|
||||
width: calc(50% - 24rpx);
|
||||
margin: 12rpx 12rpx;
|
||||
border-radius: 18rpx;
|
||||
@@ -91,32 +129,32 @@ import { ref } from 'vue';
|
||||
flex-direction: column;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 4rpx 4rpx #c0c0c0;
|
||||
.product-image{
|
||||
.product-image {
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
box-shadow: 0 4rpx 8rpx #f3f3f3;
|
||||
}
|
||||
.product-title-div{
|
||||
.product-title-div {
|
||||
display: flex;
|
||||
padding: 10rpx 20rpx 4rpx 20rpx;
|
||||
.title{
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.number{
|
||||
.number {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-size: 32rpx;
|
||||
color: rgb(230, 38, 44);
|
||||
}
|
||||
.img-div{
|
||||
.img{
|
||||
.img-div {
|
||||
.img {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
}
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
}
|
||||
.product-time{
|
||||
.product-time {
|
||||
// background-color: brown;
|
||||
padding: 4rpx 20rpx;
|
||||
font-size: 28rpx;
|
||||
@@ -132,7 +170,7 @@ import { ref } from 'vue';
|
||||
padding-top: 30rpx;
|
||||
height: 240rpx;
|
||||
background-color: #fff;
|
||||
|
||||
|
||||
// 左侧百禄形象图
|
||||
.mascot-div {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user