开发积分兑换
This commit is contained in:
+3
-3
@@ -5,13 +5,13 @@ 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:7002'
|
||||
|
||||
# VITE_APP_BASE_API_Url = 'http://192.168.247.200'
|
||||
# VITE_APP_BASE_API_Url = 'http://aitscdn.jlbank.com.cn:7001'
|
||||
# VITE_APP_BASE_API_Url = 'http://192.168.108.129'
|
||||
# dev
|
||||
VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
||||
#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
||||
# sit
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://192.168.247.200'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.158:9601'
|
||||
VITE_APP_BASE_H5_API_Url_TEST = 'http://127.0.0.1:5000'
|
||||
# VITE_APP_BASE_H5_API_Url_TEST = 'http://127.0.0.1:5000'
|
||||
#VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://192.168.247.200'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.32.154:9605'
|
||||
|
||||
|
||||
@@ -35,12 +35,18 @@
|
||||
<!-- 显示当前选中的徽章 -->
|
||||
<view class="dan" @click="common.navigateTo('/pages/pointsAndRank/rank')">
|
||||
<view class="dan_img">
|
||||
<image
|
||||
<!-- <image
|
||||
class="img_100"
|
||||
:src="`/static/images/me/${badgeList[currentIndex].png}`"
|
||||
mode="heightFix"
|
||||
alt="当前徽章"
|
||||
></image>
|
||||
></image> -->
|
||||
<image-preview
|
||||
class="img_100"
|
||||
:src="statistics_data['currentRankAddr']"
|
||||
mode="heightFix"
|
||||
alt="当前徽章"
|
||||
></image-preview>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<view class="back_div" @click="common.navigateBack()">
|
||||
<view class="back-icon"></view>
|
||||
</view>
|
||||
<view>积分明细</view>
|
||||
<view>{{data.actName}}</view>
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
</view>
|
||||
@@ -28,8 +28,9 @@
|
||||
class="send_evaluate"
|
||||
color="#0066FF"
|
||||
:throttleTime="100"
|
||||
text="20积分兑换"
|
||||
loadingText="正在加载错题"
|
||||
:text="buttonText"
|
||||
:loading="buttonLoading"
|
||||
loadingText="正在兑换中"
|
||||
:custom-style="customStyle"
|
||||
></uv-button>
|
||||
</template>
|
||||
@@ -38,7 +39,7 @@
|
||||
|
||||
<script setup>
|
||||
// 竞赛列表
|
||||
import { ref, reactive, watch, onMounted } from 'vue';
|
||||
import { ref, reactive, watch, onMounted, computed } from 'vue';
|
||||
import { onLoad, onUnload } from '@dcloudio/uni-app';
|
||||
import useZpaging from '@/composables/useZpaging.js';
|
||||
import common from '@/common/common';
|
||||
@@ -46,14 +47,37 @@
|
||||
const customStyle = {
|
||||
borderRadius: '12rpx'
|
||||
};
|
||||
const startVal = ref(0);
|
||||
const endVal = ref(0);
|
||||
const countToRef = ref(null);
|
||||
const buttonText = computed(() => {
|
||||
if(data.actStatus === 'Y') {
|
||||
return data.excPoints + "积分兑换"
|
||||
} else if(data.actStatus === 'N') {
|
||||
return data.actStatusText || '正在获取'
|
||||
}
|
||||
})
|
||||
const buttonLoading = ref(false)
|
||||
const data = reactive({
|
||||
actId:'', // ID
|
||||
actName:'', // 活动名称
|
||||
ossAddr:'', // 图片
|
||||
excPoints:0, // 兑换所需积分
|
||||
actEvent:'', // 活动介绍
|
||||
remainingCnt:'', // 剩余数量,库存
|
||||
itemTyp:'', // 物品类型 0 虚拟 1实体
|
||||
actStatus:'N', // 是否可以兑换 Y 可以 N不能
|
||||
actStatusText:'', // 不可以兑换提示的内容
|
||||
});
|
||||
const fetchFunction = (params) => {
|
||||
queryPointsActivityDetail({
|
||||
actId:"TRAPOINTSACTIVITY02501812207220251113142216000003456"
|
||||
actId:data.actId
|
||||
}).then(({ body }) => {
|
||||
console.log('body', body);
|
||||
data.actName = body.actName
|
||||
data.ossAddr = body.ossAddr
|
||||
data.excPoints = body.excPoints
|
||||
data.actEvent = body.actEvent
|
||||
data.remainingCnt = body.remainingCnt
|
||||
data.itemTyp = body.itemTyp
|
||||
data.actStatus = body.actStatus
|
||||
data.actStatusText = body.actStatusText
|
||||
});
|
||||
|
||||
};
|
||||
@@ -61,14 +85,23 @@
|
||||
const { pagingRef, queryList, data_list } = useZpaging({
|
||||
fetchFunction
|
||||
});
|
||||
|
||||
const buttonClick = () => {};
|
||||
onLoad(() => {
|
||||
const points_data = common.getValue('points_data');
|
||||
if (points_data) {
|
||||
startVal.value = points_data.currentPoints; // 徽章数
|
||||
endVal.value = points_data.currentPoints; // 徽章数
|
||||
}
|
||||
|
||||
const buttonClick = () => {
|
||||
buttonLoading.value = true
|
||||
addPointsExchange({
|
||||
actId:data.actId,
|
||||
recAddr:data.recAddr??'地址',
|
||||
changeValue:data.excPoints,
|
||||
}).then(({ body }) => {
|
||||
data.actStatus = body.actStatus
|
||||
data.actStatusText = body.actStatusText
|
||||
common.msg(body.result)
|
||||
}).finally(() => {
|
||||
buttonLoading.value =false
|
||||
})
|
||||
};
|
||||
onLoad((e) => {
|
||||
data.actId = e.actId ?? 'TRAPOINTSACTIVITY02501812207220251113142216000003456'
|
||||
});
|
||||
onUnload(() => {});
|
||||
</script>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
</uv-cell>
|
||||
<uv-cell title="性别" @click="sexPicker.open()" :isLink="true" :value="showGenderText"></uv-cell>
|
||||
<uv-cell title="百禄形象" @click="gotoMascot()" :isLink="true" :border="false" :value="mascotName"></uv-cell>
|
||||
<uv-cell title="性别" @click="sexPicker.open()" :isLink="true" :value="showGenderText"></uv-cell>
|
||||
</uv-cell-group>
|
||||
</view>
|
||||
<avatar-cropper
|
||||
|
||||
Reference in New Issue
Block a user