提交版本

This commit is contained in:
zpc 2025-04-12 18:35:12 +08:00
parent 813b19c26c
commit 5f44fd68af
3 changed files with 129 additions and 106 deletions

View File

@ -610,5 +610,25 @@ export default {
}
})
// #endif
}
},
nav(url) {
uni.navigateTo({
url: url,
fail: () => {
uni.switchTab({
url: url
});
}
})
},
red(url) {
uni.redirectTo({
url: url,
fail: () => {
uni.switchTab({
url: url
});
}
})
},
}

View File

@ -442,8 +442,9 @@
(pre, item) => pre + item.chooseNum * item.goodslist_money,
0
)
console.log("8888888", total);
return total.toFixed(2);
// console.log("8888888", total);
return this.$c.removeTrailingZeros(total.toFixed(2));
},
/* 是否全选 */

View File

@ -4,17 +4,10 @@
style="width: 100%; min-height: 100vh; display: flex; flex-direction: column; align-items: center; background-color: #FFFFFF;">
<view class="" style="position: relative;width: 100%;">
<!-- <view class="" style=" width: 100%; height: 457.64rpx; position: absolute;">
<swiper class="" style="width: 100%; height: 100%;" :autoplay="true" :indicator-dots="false"
:circular="true" :interval="3000">
<swiper-item v-for="(v, i) in advert" :key="i" @click="$c.navTo(v)">
<image class="yh_bg" :src="v.imgurl" style="width: 100%;height: 100%;"></image>
</swiper-item>
</swiper>
</view> -->
<uni-icons type="left" style="position: absolute; left: 30rpx; z-index: 100;"
:style="{top:$sys().statusBarHeight+'px'}" @tap="$c.back(1)" color="#000000"></uni-icons>
<view class="" :style="{top:$sys().statusBarHeight+'px'}"
:style="{ top: $sys().statusBarHeight + 'px' }" @tap="$c.back(1)" color="#000000"></uni-icons>
<view class="" :style="{ top: $sys().statusBarHeight + 'px' }"
style="position: absolute;width: 100%; position: absolute; font-weight: 400; text-align: center; font-size: 37rpx; color: #000000;">
邀请排行榜</view>
</view>
@ -23,22 +16,20 @@
@click="$refs.rulePop.getRule(25, '规则说明')" mode=""></image>
<view class="" v-if="list.length>0"
style="width: 100%; height: 480rpx; margin-top: 20rpx; display: flex; flex-direction: row;">
<view class="" v-if="list.length > 0" style="width: 100%; height: 480rpx; margin-top: 20rpx; display: flex; flex-direction: row;">
<!-- 第二名 -->
<view class="common_bg"
style="width: 200rpx; height: 379rpx; margin-top: 52rpx; margin-left: 32rpx; display: flex; flex-direction: column;"
:style="{'background-image': `url(${$img('/static/image/invite2.png')})`}">
:style="{ 'background-image': `url(${$img('/static/image/invite2.png')})` }">
<image :src="list[1].headimg"
style="width: 94rpx; height: 94rpx; border-radius: 50%; margin-top: 38rpx; margin-left: 55rpx;">
</image>
<text class="hang1"
style="width: 100%; text-align: center; margin-top: 24rpx;">{{list[1].nickname}}</text>
<text class="hang1" style="width: 100%; text-align: center; margin-top: 24rpx;">{{ list[1].nickname
}}</text>
<text class="hang1"
style="width: 100%; text-align: center; margin-top: 24rpx; font-size: 32rpx;">{{list[1].value}}
<text class="hang1" style="width: 100%; text-align: center; margin-top: 24rpx; font-size: 32rpx;">{{
list[1].value }}
<text style="font-size: 16rpx;"></text>
</text>
</view>
@ -46,16 +37,16 @@
<!-- 第一名 -->
<view class="common_bg"
style="width: 200rpx; height: 379rpx; margin-top: 10rpx; margin-left: 42rpx; display: flex; flex-direction: column;"
:style="{'background-image': `url(${$img('/static/image/invite1.png')})`}">
:style="{ 'background-image': `url(${$img('/static/image/invite1.png')})` }">
<image :src="list[0].headimg"
style="width: 94rpx; height: 94rpx; border-radius: 50%; margin-top: 38rpx; margin-left: 55rpx;">
</image>
<text class="hang1"
style="width: 100%; text-align: center; margin-top: 24rpx;">{{list[0].nickname}}</text>
<text class="hang1" style="width: 100%; text-align: center; margin-top: 24rpx;">{{ list[0].nickname
}}</text>
<text class="hang1"
style="width: 100%; text-align: center; margin-top: 24rpx; font-size: 32rpx;">{{list[0].value}}
<text class="hang1" style="width: 100%; text-align: center; margin-top: 24rpx; font-size: 32rpx;">{{
list[0].value }}
<text style="font-size: 16rpx;"></text>
</text>
</view>
@ -63,135 +54,146 @@
<!-- 第三名 -->
<view class="common_bg"
style="width: 200rpx; height: 379rpx; margin-top: 52rpx; margin-left: 42rpx; display: flex; flex-direction: column;"
:style="{'background-image': `url(${$img('/static/image/invite3.png')})`}">
:style="{ 'background-image': `url(${$img('/static/image/invite3.png')})` }">
<image :src="list[2].headimg"
style="width: 94rpx; height: 94rpx; border-radius: 50%; margin-top: 38rpx; margin-left: 55rpx;">
</image>
<text class="hang1"
style="width: 100%; text-align: center; margin-top: 24rpx;">{{list[2].nickname}}</text>
<text class="hang1" style="width: 100%; text-align: center; margin-top: 24rpx;">{{ list[2].nickname
}}</text>
<text class="hang1"
style="width: 100%; text-align: center; margin-top: 24rpx; font-size: 32rpx; color: #333333;">{{list[2].value}}
style="width: 100%; text-align: center; margin-top: 24rpx; font-size: 32rpx; color: #333333;">{{
list[2].value }}
<text style="font-size: 16rpx; color: #8A8A8A;"></text>
</text>
</view>
</view>
<view style="width: 683rpx; margin-bottom: 50rpx; display: flex; flex-direction: column; overflow: auto;">
<view class="" v-for="(item,index) in list" v-if="index>2"
<view style="width: 683rpx; margin-bottom:160rpx; display: flex; flex-direction: column; overflow: auto;">
<view class="" v-for="(item, index) in list" v-if="index > 2"
style="display: flex; flex-direction: row; align-items: center; margin-top:30rpx; border-radius: 14rpx; padding-top: 15rpx; padding-bottom: 15rpx;"
:style="{backgroundColor: setBgColor(index)}">
:style="{ backgroundColor: setBgColor(index) }">
<view class="" v-if="index == 0 "
<view class="" v-if="index == 0"
style="width: 43rpx; height: 47rpx;color: #B8B8B8;text-align:center; margin-left: 32rpx;">
<image :src="$img1('/image/1.png')" style="width: 43rpx; height: 47rpx;"></image>
</view>
<view class="" v-if="index == 1 "
<view class="" v-if="index == 1"
style="width: 43rpx; height: 47rpx;color: #B8B8B8;text-align:center; margin-left: 32rpx;">
<image :src="$img1('/image/2.png')" style="width: 43rpx; height: 47rpx;"></image>
</view>
<view class="" v-if="index == 2 "
<view class="" v-if="index == 2"
style="width: 43rpx; height: 47rpx;color: #B8B8B8;text-align:center; margin-left: 32rpx;">
<image :src="$img1('/image/3.png')" style="width: 43rpx; height: 47rpx;"></image>
</view>
<view class="" v-if="index > 2 "
<view class="" v-if="index > 2"
style="width: 43rpx; height: 47rpx;color: #333333;text-align:center; margin-left: 32rpx;">
{{index+1}}
{{ index + 1 }}
</view>
<view class="" style="width: 94rpx; height: 94rpx; margin-left: 30rpx;">
<image :src="item.headimg" style="width: 94rpx; height: 94rpx; border-radius: 50%;"></image>
</view>
<view class="" style="display: flex; flex-direction: column; margin-left: 28rpx;flex: 1;">
<text style="font-size: 20rpx; color: #333333;">{{item.nickname}}</text>
<text style="font-size: 20rpx; color: #333333;">{{ item.nickname }}</text>
</view>
<view class="" style="margin-right: 20rpx;">
<span style="color: #333333; font-size: 32rpx;">{{item.value}}<text
<span style="color: #333333; font-size: 32rpx;">{{ item.value }}<text
style="font-size: 16rpx; color: #8A8A8A;"></text></span>
</view>
</view>
</view>
<view class="center" style="width: 386rpx; height: 102rpx; background-color: #D8FD24; border-radius: 26rpx;">
<text style="font-size: 32rpx; color: #333333; font-weight: 600;">立即邀请</text>
<view style="position: fixed;bottom: 0px;height: 100px;display: flex;justify-content: center;align-items: center;background-color: #fff;width: 100%;">
<view class="center" style="width: 386rpx; height: 102rpx; background-color: #D8FD24; border-radius: 26rpx;"
@click="$c.nav('/pages/user/tui-guang')">
<text style="font-size: 32rpx; color: #333333; font-weight: 600;">立即邀请</text>
</view>
</view>
<rule-pop ref="rulePop"></rule-pop>
</view>
</template>
<script>
export default {
data() {
var list;
return {
advert: [], //
list: [],
colors: ['#F8DE61', '#E0E0E0', '#E5967F', '#F8F8F8'],
export default {
data() {
var list;
return {
advert: [], //
list: [],
colors: ['#F8DE61', '#E0E0E0', '#E5967F', '#F8F8F8'],
}
},
onLoad() {
this.load();
},
methods: {
load() {
let that = this
that.req({
url: 'getAdvert?type_id=4',
success(res) {
if (res.status == 1) {
that.advert = res.data
}
}
})
that.req({
url: 'getRankList?type=invite',
success(res) {
console.log(res);
if (res.status == 1) {
that.list = res.data
if (that.list.length < 3) {
let l = 13 - that.list.length;
for (let i = 0; i < l; i++) {
that.list.push({
nickname: "虚位以待",
value: 0
});
}
console.log(that.list);
}
}
}
})
},
setBgColor(index) {
if (index == 0) {
return this.colors[index];
} else if (index == 1) {
return this.colors[index];
} else if (index == 2) {
return this.colors[index];
} else {
return this.colors[3];
}
},
onLoad() {
this.load();
},
methods: {
load() {
let that = this
that.req({
url: 'getAdvert?type_id=4',
success(res) {
if (res.status == 1) {
that.advert = res.data
}
}
})
that.req({
url: 'getRankList?type=invite',
success(res) {
console.log(res);
if (res.status == 1) {
that.list = res.data
}
}
})
},
setBgColor(index) {
if (index == 0) {
return this.colors[index];
} else if (index == 1) {
return this.colors[index];
} else if (index == 2) {
return this.colors[index];
} else {
return this.colors[3];
}
},
}
}
}
</script>
<style lang="scss">
.navLeft {
.navLeft {
height: 44px;
z-index: 100;
display: flex;
height: 44px;
z-index: 100;
display: flex;
width: 100%;
align-items: center !important;
>view {
width: 100%;
align-items: center !important;
>view {
width: 100%;
// font-family: YouSheBiaoTiHei;
position: absolute;
font-weight: 400;
text-align: center;
font-size: 37rpx;
color: #FFFFFF;
}
// font-family: YouSheBiaoTiHei;
position: absolute;
font-weight: 400;
text-align: center;
font-size: 37rpx;
color: #FFFFFF;
}
}
</style>