Merge branch 'dev' of 47.94.45.65:angelo/web-zk-h5 into test

This commit is contained in:
woody 2025-09-30 09:09:34 +08:00
commit 5790869c61
4 changed files with 4 additions and 114 deletions

View File

@ -45,7 +45,7 @@
></area-product-list> ></area-product-list>
</view> </view>
</view> </view>
<!-- 半价 --> <!-- 五折 -->
<view key="halfPrice" v-if="halfPriceList.length > 0" class="goods-flexs"> <view key="halfPrice" v-if="halfPriceList.length > 0" class="goods-flexs">
<view class="goods-view"> <view class="goods-view">
<area-product-list <area-product-list

View File

@ -20,7 +20,7 @@ module.exports = vm => {
//#ifdef DEV_SERVER //#ifdef DEV_SERVER
console.log('DEV_SERVER') console.log('DEV_SERVER')
config.baseURL = 'http://192.168.2.105:8080/' config.baseURL = 'http://192.168.2.86:8080/'
//#endif //#endif
//#ifdef QA_SERVER //#ifdef QA_SERVER

View File

@ -353,50 +353,9 @@ export default {
if (!isNormal) { if (!isNormal) {
return return
} }
// this.getUserAwardss()
}) })
}, },
computed: { computed: {
sprintProgress() {
const targetPvStr = this.awards.targetPv
const sumRealPvStr = this.awards.sumRealPv // ""
const targetPv = parseFloat(targetPvStr)
const sumRealPv = parseFloat(sumRealPvStr)
let achievedPv = 0
let percentage = 0
const numericTargetPv =
Math.floor((isNaN(targetPv) ? 0 : targetPv) * 100) / 100
if (!isNaN(targetPv) && targetPv > 0) {
// sumRealPv targetPv - sumRealPv
achievedPv = targetPv - (isNaN(sumRealPv) ? 0 : sumRealPv)
achievedPv = Math.max(0, Math.min(achievedPv, targetPv))
percentage = (sumRealPvStr / targetPv) * 100
} else if (
!isNaN(targetPv) &&
targetPv === 0 &&
!isNaN(sumRealPv) &&
sumRealPv <= 0
) {
// 000100%
achievedPv = 0
percentage = 100
}
const clampedPercentage = Math.min(100, Math.max(0, percentage))
return {
percentageString: `${Math.floor(clampedPercentage)}%`,
achieved: (Math.floor(achievedPv * 100) / 100).toFixed(2),
target: numericTargetPv.toFixed(2),
rawPercentage: clampedPercentage,
}
},
formattedTotalSumPv() { formattedTotalSumPv() {
const value = String(this.totalSumPv || '0.00') const value = String(this.totalSumPv || '0.00')
const parts = value.split('.') const parts = value.split('.')
@ -421,8 +380,6 @@ export default {
pkBigMember: this.userInfo.memberCode, pkBigMember: this.userInfo.memberCode,
}).then(res => { }).then(res => {
if (res.code == 200) { if (res.code == 200) {
// this.totalBox = res.data?.totalBox || 0
// this.smallAreaBox = res.data?.smallAreaBox || 0
this.totalSumPv = res.data?.totalSumPv || 0 this.totalSumPv = res.data?.totalSumPv || 0
this.smallAreaPv = res.data?.smallAreaPv || 0 this.smallAreaPv = res.data?.smallAreaPv || 0
} }
@ -435,62 +392,7 @@ export default {
} }
}) })
}, },
openRegionSelect() {
uni.showLoading({
title: '加载中...',
})
this.$refs.regionSelect
?.open()
.then(() => {
uni.hideLoading()
})
.catch(() => {
uni.hideLoading()
})
},
goYear() {
uni.navigateTo({
url: '/pages/mine/yearGift/index',
})
},
closeShow() {
this.drShow = false
},
goHonoray() {
uni.navigateTo({
url: '/pages/mine/honoraryAwards/honoraryAwards',
})
},
//
getUserAwardss() {
api.getUserAwards().then(res => {
this.awards = res.data || {}
})
},
GetPercent(num, total) {
num = parseFloat(num)
total = parseFloat(total)
if (isNaN(num) || isNaN(total)) {
return '-'
}
if (total == 0) {
return '0%'
} else if (total < 0) {
return 100 + '%'
} else {
return Math.round((num / total) * 10000) / 100.0 + '%'
}
},
yesPercent(left, right) {
left = parseFloat(left)
right = parseFloat(right)
if (isNaN(left) || isNaN(right)) {
return '0%'
}
return right + left == 0
? '0%'
: Math.round((left / (right + left)) * 10000) / 100.0 + '%'
},
orderNum() { orderNum() {
api.orderNum().then(res => { api.orderNum().then(res => {
this.waitPayNum = res.data.waitPayNum this.waitPayNum = res.data.waitPayNum
@ -536,18 +438,6 @@ export default {
url: '/pages/mine/order/index?isTab=' + index, url: '/pages/mine/order/index?isTab=' + index,
}) })
}, },
goRoad(index) {
//12
if (index == 1) {
uni.navigateTo({
url: '/pages/mine/growthRoad/gradeRoad',
})
} else if (index == 2) {
uni.navigateTo({
url: '/pages/mine/growthRoad/awardRoad',
})
}
},
loginOut() { loginOut() {
uni.setStorageSync('pkCountry', '') uni.setStorageSync('pkCountry', '')
uni.setStorageSync('showInfo', 0) uni.setStorageSync('showInfo', 0)

View File

@ -20,5 +20,5 @@ export const REPURCHASE_AREA = {
export const HALF_PRICE_AREA = { export const HALF_PRICE_AREA = {
id: 47, id: 47,
name: '半价专区', name: '五折专区',
} }