Merge remote-tracking branch 'origin/main'

main
13233904609 4 months ago
commit 237ef21714

@ -2,4 +2,4 @@
# SHOPRO_DEV_BASE_URL = http://192.168.1.114:48080 # SHOPRO_DEV_BASE_URL = http://192.168.1.114:48080
# 线上地址 # 线上地址
SHOPRO_DEV_BASE_URL = https://zda.huamar.com SHOPRO_DEV_BASE_URL = https://zd.huamar.com

@ -273,6 +273,30 @@
"group": "用户中心" "group": "用户中心"
} }
}, },
{
"path": "discounts",
"style": {
"navigationBarTitleText": "活动"
},
"meta": {
"auth": true,
"sync": true,
"title": "活动",
"group": "用户中心"
}
},
{
"path": "alternative",
"style": {
"navigationBarTitleText": "幸运五选一"
},
"meta": {
"auth": true,
"sync": true,
"title": "幸运五选一",
"group": "用户中心"
}
},
{ {
"path": "PrizesWon", "path": "PrizesWon",
"style": { "style": {

@ -2,17 +2,18 @@
<template> <template>
<s-layout title="我的团队" :class="state.scrollTop ? 'team-wrap' : ''" navbar="inner"> <s-layout title="我的团队" :class="state.scrollTop ? 'team-wrap' : ''" navbar="inner">
<view class="promoter-list"> <view class="promoter-list">
<view <view class="promoterHeader bg-color" style="backgroundcolor: #e93323 !important; height: 218rpx; color: #fff">
class="promoterHeader bg-color"
style="backgroundcolor: #e93323 !important; height: 218rpx; color: #fff"
>
<view class="headerCon acea-row row-between" style="padding: 28px 29px 0 29px"> <view class="headerCon acea-row row-between" style="padding: 28px 29px 0 29px">
<view> <view>
<view class="name" style="color: #fff">推广人数</view> <view class="name" style="color: #fff">推广人数</view>
<view> <view>
<text class="num" style="color: #fff"> <text class="num" style="color: #fff">
<!-- {{
state.summary.firstBrokerageUserCount + state.summary.secondBrokerageUserCount ||
0
}} -->
{{ {{
state.summary.firstBrokerageUserCount + state.summary.secondBrokerageUserCount || state.summary.secondBrokerageUserCount ||
0 0
}} }}
</text> </text>
@ -25,48 +26,27 @@
<view style="padding: 0 30rpx"> <view style="padding: 0 30rpx">
<view class="nav acea-row row-around l1"> <view class="nav acea-row row-around l1">
<view :class="state.level == 1 ? 'item on' : 'item'" @click="setType(1)"> <view :class="state.level == 1 ? 'item on' : 'item'" @click="setType(1)">
({{ state.summary.firstBrokerageUserCount || 0 }}) 直属下({{ state.summary.firstBrokerageUserCount || 0 }})
</view> </view>
<view :class="state.level == 2 ? 'item on' : 'item'" @click="setType(2)"> <view :class="state.level == 2 ? 'item on' : 'item'" @click="setType(2)">
二级({{ state.summary.secondBrokerageUserCount || 0 }}) 我的团队({{ state.summary.secondBrokerageUserCount || 0 }})
</view> </view>
</view> </view>
<view <view class="search acea-row row-between-wrapper" style="display: flex; height: 100rpx; align-items: center">
class="search acea-row row-between-wrapper"
style="display: flex; height: 100rpx; align-items: center"
>
<view class="input"> <view class="input">
<input <input placeholder="点击搜索会员名称" v-model="state.nickname" confirm-type="search" name="search"
placeholder="点击搜索会员名称" @confirm="submitForm" />
v-model="state.nickname"
confirm-type="search"
name="search"
@confirm="submitForm"
/>
</view> </view>
<image <image src="/static/images/search.png" mode="" style="width: 60rpx; height: 64rpx" @click="submitForm" />
src="/static/images/search.png"
mode=""
style="width: 60rpx; height: 64rpx"
@click="submitForm"
/>
</view> </view>
<view class="list"> <view class="list">
<view class="sortNav acea-row row-middle" style="display: flex; align-items: center"> <view class="sortNav acea-row row-middle" style="display: flex; align-items: center">
<view <view class="sortItem" @click="setSort('userCount', 'asc')" v-if="sort === 'userCountDESC'">
class="sortItem"
@click="setSort('userCount', 'asc')"
v-if="sort === 'userCountDESC'"
>
团队排序 团队排序
<!-- TODO 芋艿看看怎么从项目里拿出去 --> <!-- TODO 芋艿看看怎么从项目里拿出去 -->
<image src="/static/images/sort1.png" /> <image src="/static/images/sort1.png" />
</view> </view>
<view <view class="sortItem" @click="setSort('userCount', 'desc')" v-else-if="sort === 'userCountASC'">
class="sortItem"
@click="setSort('userCount', 'desc')"
v-else-if="sort === 'userCountASC'"
>
团队排序 团队排序
<image src="/static/images/sort3.png" /> <image src="/static/images/sort3.png" />
</view> </view>
@ -78,11 +58,7 @@
金额排序 金额排序
<image src="/static/images/sort1.png" /> <image src="/static/images/sort1.png" />
</view> </view>
<view <view class="sortItem" @click="setSort('price', 'desc')" v-else-if="sort === 'priceASC'">
class="sortItem"
@click="setSort('price', 'desc')"
v-else-if="sort === 'priceASC'"
>
金额排序 金额排序
<image src="/static/images/sort3.png" /> <image src="/static/images/sort3.png" />
</view> </view>
@ -90,19 +66,11 @@
金额排序 金额排序
<image src="/static/images/sort2.png" /> <image src="/static/images/sort2.png" />
</view> </view>
<view <view class="sortItem" @click="setSort('orderCount', 'asc')" v-if="sort === 'orderCountDESC'">
class="sortItem"
@click="setSort('orderCount', 'asc')"
v-if="sort === 'orderCountDESC'"
>
订单排序 订单排序
<image src="/static/images/sort1.png" /> <image src="/static/images/sort1.png" />
</view> </view>
<view <view class="sortItem" @click="setSort('orderCount', 'desc')" v-else-if="sort === 'orderCountASC'">
class="sortItem"
@click="setSort('orderCount', 'desc')"
v-else-if="sort === 'orderCountASC'"
>
订单排序 订单排序
<image src="/static/images/sort3.png" /> <image src="/static/images/sort3.png" />
</view> </view>
@ -113,10 +81,7 @@
</view> </view>
<block v-for="(item, index) in state.pagination.list" :key="index"> <block v-for="(item, index) in state.pagination.list" :key="index">
<view class="item acea-row row-between-wrapper" style="display: flex"> <view class="item acea-row row-between-wrapper" style="display: flex">
<view <view class="picTxt acea-row row-between-wrapper" style="display: flex; align-items: center">
class="picTxt acea-row row-between-wrapper"
style="display: flex; align-items: center"
>
<view class="pictrue"> <view class="pictrue">
<image :src="item.avatar" /> <image :src="item.avatar" />
</view> </view>
@ -128,25 +93,20 @@
</view> </view>
</view> </view>
</view> </view>
<view <view class="right" style="
class="right"
style="
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
display: flex; display: flex;
margin-left: auto; margin-left: auto;
" ">
>
<view> <view>
<text class="num font-color">{{ item.brokerageUserCount || 0 }} </text> <text class="num font-color">{{ item.brokerageUserCount || 0 }} </text>
</view> </view>
<view> <view>
<text class="num">{{ item.orderCount || 0 }}</text <text class="num">{{ item.brokerageOrderCount || 0 }}</text>
></view </view>
>
<view> <view>
<text class="num">{{ item.brokeragePrice || 0 }}</text <text class="num">{{ Number(item.brokeragePrice|| 0 )/100 }}</text>
>
</view> </view>
</view> </view>
</view> </view>
@ -282,7 +242,7 @@
let { code, data } = await BrokerageApi.getBrokerageUserChildSummaryPage({ let { code, data } = await BrokerageApi.getBrokerageUserChildSummaryPage({
pageNo: state.pagination.pageNo, pageNo: state.pagination.pageNo,
pageSize: state.pagination.pageSize, pageSize: state.pagination.pageSize,
level: state.level, level: state.level== 1 ? state.level : '',
'sortingField.order': state.isAsc, 'sortingField.order': state.isAsc,
'sortingField.field': state.sortKey, 'sortingField.field': state.sortKey,
nickname: state.nickname, nickname: state.nickname,

@ -39,4 +39,8 @@
onPageScroll(() => {}); onPageScroll(() => {});
</script> </script>
<style></style> <style>
.page-app .page-main .page-body{
padding-top: 100rpx;
}
</style>

@ -0,0 +1,152 @@
<template>
<s-layout class="set-wrap" title="五选一" :bgStyle="{ color: '#FFF' }">
<view class="_bgc">
<view class="body">
<view class="top">
<view>
<view class="txt">总人数</view> {{ rankingData.totalNum }}
</view>
<view>
<view class="txt">我的排名</view> {{ rankingData.rankNum }}
</view>
</view>
<view class="content">
<view class="title">已出线人数列表</view>
<view class="table">
<scroll-view lower-threshold="300" scroll-y @scrolltolower="onPageScroll"
class="scroll-content">
<view v-for="(i, v) in ListData" :key="v" class="item">
<view>{{ v }}</view>
<view>{{ i.userName }}</view>
<view>{{ formattedDateTime(i.outTime)}}</view>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
</s-layout>
</template>
<script setup>
import { ref } from 'vue'
import { onLoad, onReachBottom, onShow, onUnload, onHide } from '@dcloudio/uni-app';
import MineApi from '@/sheep/api/prize/index'
import sheep from '@/sheep';
import { name } from 'dayjs/locale/zh-cn';
let params = ref({
pageNo: 1,
pageSize: 50,
})
onLoad(async () => {
getRanking()//
getListData()// 线
})
let rankingData = ref([])
const getRanking = async () => {
const res = await MineApi.ranking()
rankingData.value = res.data
}
let ListData = ref([])
const getListData = async () => {
const res = await MineApi.wzyycx(params.value)
ListData.value.push(...res.data.list)
}
const onPageScroll = (event) => {
console.log(event, '12312313213132');
params.value.pageNo += 1
getListData()
}
const formattedDateTime = (timestampInMilliseconds) => {
const date = new Date(timestampInMilliseconds);
const year = date.getFullYear();
const month = ('0' + (date.getMonth() + 1)).slice(-2);
const day = ('0' + date.getDate()).slice(-2);
const hours = ('0' + date.getHours()).slice(-2);
const minutes = ('0' + date.getMinutes()).slice(-2);
const seconds = ('0' + date.getSeconds()).slice(-2);
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
};
</script>
<style lang="scss" scoped>
._bgc {
width: 100%;
height: 89vh;
padding-top: 10rpx;
}
.body {
.top {
display: flex;
height: 150rpx;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
justify-content: space-around;
align-items: center;
font-size: 35rpx;
border: 5rpx solid #e6e6e6;
border-radius: 20rpx;
background-color: #fff6f6;
width: 95%;
margin: 0 auto;
font-weight: 600;
&>view {
text-align: center;
}
.txt {
font-size: 42rpx;
}
}
.content {
background-color: #f5eaea;
border-radius: 20rpx;
width: 95%;
margin: 0 auto;
margin-top: 20rpx;
.title {
font-size: 35rpx;
text-align: center;
line-height: 88rpx;
}
.table {
// background-color: red;
width: 100%;
margin: 0 auto;
height: 72vh;
border-radius: 20rpx;
.scroll-content {
height: 100%;
.item {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
height: 88rpx;
&>view:nth-of-type(1) {
width: 5%;
}
}
}
}
}
}
</style>

@ -0,0 +1,81 @@
<template>
<s-layout class="set-wrap" title="活动中心" :bgStyle="{ color: '#FFF' }">
<view class="_bgc">
<view class="menu">
<view v-for="(v, i) in menulist" :key="i">
<view class="menu_item" @tap="sheep.$router.go(v?.path)">
<image class="menu_item_img" :src="v?.url"></image>
<text class="menu_item_text">{{ v.title }}</text>
</view>
</view>
</view>
<!-- <view class="menu">
<view class="menu_item" >
<image class="item_img"
src="http://zda.huamar.com/admin-api/infra/file/4/get/d4b717094fa8162e981eb8c17cd4cef1f25da1327d4d214fece3375962b5e59f.png">
</image>
<text class="menu_item_text">抽奖</text>
</view>
<view class="menu_item">
<image class="item_img"
src="http://zda.huamar.com/admin-api/infra/file/4/get/d4b717094fa8162e981eb8c17cd4cef1f25da1327d4d214fece3375962b5e59f.png">
</image>
<text class="menu_item_text">幸运五占一</text>
</view>
</view> -->
</view>
</s-layout>
</template>
<script setup>
import { ref } from 'vue'
import { onLoad, onReachBottom, onShow, onUnload, onHide } from '@dcloudio/uni-app';
import MineApi from '@/sheep/api/prize/index'
import sheep from '@/sheep';
let menulist = ref([
{
title: '抽奖',
path: '/pages/user/prize',
url: 'http://zda.huamar.com/admin-api/infra/file/4/get/d4b717094fa8162e981eb8c17cd4cef1f25da1327d4d214fece3375962b5e59f.png'
},
{
title: '幸运五选一',
path: '/pages/user/alternative',
url: 'http://zda.huamar.com/admin-api/infra/file/4/get/082a147eb0480692b717a010b42b0299b27a563b0c85840708b9c53247dcb52f.png'
},
])
</script>
<style lang="scss" scoped>
._bgc {
width: 100%;
height: 100vh;
}
.menu {
display: flex;
// justify-content: space-around;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-content: center;
align-items: center;
.menu_item {
margin: 40rpx;
display: flex;
flex-direction: column;
align-items: center;
align-content: center;
.menu_item_img {
width: 100rpx;
height: 100rpx;
}
}
}
</style>

@ -1,7 +1,6 @@
import request from '@/sheep/request'; import request from '@/sheep/request';
const PayOrderApi = { const PayOrderApi = {
// 开始抽奖 // 开始抽奖
lottery: (id) => { lottery: (id) => {
return request({ return request({
@ -18,16 +17,12 @@ const PayOrderApi = {
params: { activityId: id }, params: { activityId: id },
}); });
}, },
// 获得抽奖照片
// 获得抽奖照片
prizeImg: (id) => { prizeImg: (id) => {
return request({ return request({
url: '/promotion/prize-draw/activity-prize/list-by-activity-id', url: '/promotion/prize-draw/activity-prize/list-by-activity-id',
method: 'GET', method: 'GET',
params: { activityId:id }, params: { activityId: id },
}); });
}, },
// 规则 // 规则
@ -38,6 +33,26 @@ const PayOrderApi = {
params, params,
}); });
}, },
// 五占一接口--------------------------------
// 今日已出线列表
wzyycx: (params) => {
return request({
url: '/member/distribution-log/outTodaypage',
method: 'GET',
params,
});
},
// 排名
ranking: (params) => {
return request({
url: '/member/distribution-log/getUserId',
method: 'GET',
params,
});
},
}; };
export default PayOrderApi; export default PayOrderApi;

Loading…
Cancel
Save