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,34 +50,66 @@
|
||||
{{ 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 { 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 {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user