分销-砍价

pull/31/head
落日晚风 2023-12-21 17:58:15 +08:00
parent d6cf64be1e
commit ab77874aa5
21 changed files with 4402 additions and 2274 deletions

View File

@ -6,8 +6,7 @@
"^su-(.*)": "@/sheep/ui/su-$1/su-$1.vue"
}
},
"pages": [
{
"pages": [{
"path": "pages/index/index",
"aliasPath": "/",
"style": {
@ -85,11 +84,9 @@
}
}
],
"subPackages": [
{
"subPackages": [{
"root": "pages/goods",
"pages": [
{
"pages": [{
"path": "index",
"style": {
"navigationBarTitleText": "商品详情"
@ -153,8 +150,7 @@
},
{
"root": "pages/order",
"pages": [
{
"pages": [{
"path": "detail",
"style": {
"navigationBarTitleText": "订单详情"
@ -243,8 +239,7 @@
},
{
"root": "pages/user",
"pages": [
{
"pages": [{
"path": "info",
"style": {
"navigationBarTitleText": "我的信息"
@ -342,8 +337,7 @@
},
{
"root": "pages/commission",
"pages": [
{
"pages": [{
"path": "index",
"style": {
"navigationBarTitleText": "分销"
@ -414,13 +408,34 @@
"title": "我的团队",
"group": "分销商城"
}
}, {
"path": "promoter",
"style": {
"navigationBarTitleText": "推广人排行榜"
},
"meta": {
"auth": true,
"sync": true,
"title": "推广人排行榜",
"group": "分销商城"
}
}, {
"path": "commission-ranking",
"style": {
"navigationBarTitleText": "佣金排行榜"
},
"meta": {
"auth": true,
"sync": true,
"title": "佣金排行榜",
"group": "分销商城"
}
}
]
},
{
"root": "pages/app",
"pages": [
{
"pages": [{
"path": "sign",
"style": {
"navigationBarTitleText": "签到中心"
@ -431,13 +446,11 @@
"title": "签到中心",
"group": "应用"
}
}
]
}]
},
{
"root": "pages/public",
"pages": [
{
"pages": [{
"path": "setting",
"style": {
"navigationBarTitleText": "系统设置"
@ -486,8 +499,7 @@
},
{
"root": "pages/coupon",
"pages": [
{
"pages": [{
"path": "list",
"style": {
"navigationBarTitleText": "领券中心"
@ -514,8 +526,7 @@
},
{
"root": "pages/chat",
"pages": [
{
"pages": [{
"path": "index",
"style": {
"navigationBarTitleText": "客服"
@ -526,13 +537,11 @@
"title": "客服",
"group": "客服"
}
}
]
}]
},
{
"root": "pages/pay",
"pages": [
{
"pages": [{
"path": "index",
"style": {
"navigationBarTitleText": "收银台"
@ -596,8 +605,7 @@
},
{
"root": "pages/activity",
"pages": [
{
"pages": [{
"path": "groupon/detail",
"style": {
"navigationBarTitleText": "拼团详情"
@ -648,6 +656,28 @@
"title": "秒杀活动",
"group": "营销活动"
}
},
{
"path": "bargainingList",
"style": {
"navigationBarTitleText": "砍价列表"
},
"meta": {
"sync": true,
"title": "砍价列表",
"group": "营销活动"
}
},
{
"path": "bargainingDetail",
"style": {
"navigationBarTitleText": "砍价详情"
},
"meta": {
"sync": true,
"title": "砍价详情",
"group": "营销活动"
}
}
]
}
@ -660,8 +690,7 @@
"navigationStyle": "custom"
},
"tabBar": {
"list": [
{
"list": [{
"pagePath": "pages/index/index"
},
{

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,372 @@
<template>
<s-layout title='砍价列表'>
<view style='background-color: red;height:100vh;'>
<view class='bargain-list'>
<!-- #ifdef H5 -->
<view class='iconfont icon-xiangzuo' @tap='goBack' :style="'top:'+ (state.navH/2) +'rpx'"
v-if="state.returnShow">
</view>
<!-- #endif -->
<!-- 砍价记录的概要 -->
<view class='header'>
<view class="pic">
<view class='swipers'>
<swiper :indicator-dots="state.indicatorDots" :autoplay="state.autoplay" interval="2500"
duration="500" vertical="true" circular="true">
<block v-for="(item,index) in state.bargainSuccessList" :key='index'>
<swiper-item>
<view class="acea-row row-middle" style='display:flex'>
<image :src="item.avatar" class="mr9"></image>
<view class='mr9 nickName'>{{ item.nickname }}</view>
<text class='mr9'>拿了</text>
<view class='line1'>{{ item.activityName }}</view>
</view>
</swiper-item>
</block>
</swiper>
</view>
</view>
<view class="tit">已有{{ state.bargainTotal }}人砍成功</view>
</view>
<!-- 砍价活动列表 -->
<view class='list'>
<block v-for="(item,index) in state.bargainList" :key="index">
<view style='display:flex' class='item acea-row row-between-wrapper'
@tap="openSubscribe('/pages/activity/bargainingDetail?id='+ item.id)">
<view class='pictrue'>
<image :src='item.picUrl'></image>
</view>
<view class='text acea-row row-column-around'>
<view class='name line2'>{{ item.name }}</view>
<view class="acea-row" style="margin-bottom: 14rpx;display:flex">
<s-count-down :tipText="' '" :bgColor="state.bgColor" :dayText="':'" :hourText="':'"
:minuteText="':'" :secondText="' '" :datatime="item.endTime / 1000"
:isDay="true" />
<text class="txt">后结束</text>
</view>
<view v-if="item.stock === 0">
<view style="font-size: 22rpx;"
@tap="openSubscribe('/pages/activity/goods_bargain_details/index?id='+ item.id +'&startBargainUid='+ uid)">
已售罄</view>
</view>
<view class='money font-color'>最低: <text
class='price'>{{ fen2yuan(item.bargainMinPrice) }}</text></view>
</view>
<view v-if="item.stock > 0" class='cutBnt bg-color'>参与砍价</view>
<view v-if="item.stock === 0" class='cutBnt bg-color-hui'>已售罄</view>
</view>
</block>
<view class='loadingicon acea-row row-center-wrapper' v-if='state.bargainList.length > 0'
style='text-align: center;'>
<text class='loading iconfont icon-jiazai' :hidden='!loading'></text>{{state.loadTitle}}
</view>
</view>
</view>
</view>
</s-layout>
</template>
<script setup>
import {
computed,
reactive
} from 'vue';
import sheep from '@/sheep';
import _ from 'lodash';
import {
onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import {
useDurationTime
} from '@/sheep/hooks/useGoods';
import {
showShareModal
} from '@/sheep/hooks/useModal';
import {
isEmpty
} from 'lodash';
const state = reactive({
navH: '',
returnShow: true,
// ========== ==========
bargainTotal: 0,
bargainSuccessList: [],
autoplay: true,
indicatorDots: false,
// ========== ==========
bargainList: [],
page: 1,
limit: 10,
loading: false,
loadend: false,
bgColor: {
'bgColor': '#E93323',
'Color': '#fff',
'width': '44rpx',
'timeTxtwidth': '16rpx',
'isDay': true
},
loadTitle: '加载更多',
});
function getBargainHeader() {
sheep.$api.activity.getBargainRecordSummary().then(res => {
state.bargainTotal = res.data.successUserCount;
state.bargainSuccessList = res.data.successList;
}).catch(err => {
return state.$util.Tips({
title: err
});
})
}
function getBargainList() {
if (state.loadend || state.loading) {
return;
}
state.loading = true;
state.loadTitle = '';
sheep.$api.activity.getBargainActivityPage({
pageNo: state.page,
pageSize: state.limit
}).then(res => {
const list = res.data.list;
const bargainList = _.concat(state.bargainList, list);
const loadend = list.length < state.limit;
state.loadend = loadend;
state.loading = false;
state.loadTitle = loadend ? '已全部加载' : '加载更多';
// this.$set(this, 'bargainList', bargainList);
state.bargainList = res.data.list
// this.$set(this, 'page', this.page + 1);
state.page = state.page + 1;
}).catch(res => {
state.loading = false;
state.loadTitle = '加载更多';
});
}
function openSubscribe(e) {
console.log(e)
uni.navigateTo({
url: page,
});
return;
let page = e;
// #ifndef MP
uni.navigateTo({
url: page
});
// #endif
// #ifdef MP
uni.showLoading({
title: '正在加载',
})
openBargainSubscribe().then(res => {
uni.hideLoading();
}).catch((err) => {
uni.hideLoading();
});
// #endif
}
onLoad(function() {
getBargainHeader();
getBargainList();
})
onReachBottom(() => {
getBargainList();
});
//
function fen2yuan(price) {
return (price / 100.0).toFixed(2)
}
</script>
<style lang='scss' scoped>
page,
.page-app {
background-color: #e93323 !important;
}
.font-color {
color: red;
}
.mr9 {
margin-right: 9rpx;
}
.swipers {
height: 100%;
width: 76%;
margin: auto;
overflow: hidden;
font-size: 22rpx;
color: #fff;
image {
width: 24rpx;
height: 24rpx;
border-radius: 50%;
overflow: hidden;
}
swiper {
height: 100%;
width: 100%;
overflow: hidden;
}
.line1 {
width: 195rpx;
}
}
.bargain-list .icon-xiangzuo {
font-size: 40rpx;
color: #fff;
position: fixed;
left: 30rpx;
z-index: 99;
transform: translateY(-20%);
height: 100%
}
.bargain-list .header {
/* TODO 芋艿此处原来采用base64 但是过长编辑到小程序卡死 目前采用网络地址 需解决 */
background-image: url('https://huizhizao-1314830814.cos.ap-shanghai.myqcloud.com/huizhizao-1314830814/bdc8a9210710b83bcd88a14703f440fc7091792706b5cb71b54361488a547298.png');
babackground-repeat: no-repeat;
background-size: 100% 100%;
width: 750rpx;
height: 420rpx;
.acea-row {
height: 50rpx;
line-height: 50rpx;
left: 50rpx;
.nickName {
width: 65rpx;
overflow: hidden;
white-space: nowrap;
}
}
.pic {
width: 478rpx;
height: 50rpx;
margin: 0 auto;
/* TODO 芋艿:此处原来是本地地址小程序不支持,需改为线上 */
background-image: url('https://huizhizao-1314830814.cos.ap-shanghai.myqcloud.com/huizhizao-1314830814/d111ac53e1390618f22fcc03e415bcd584b3f409ae52421aef95c2ab9b02aa30.png');
babackground-repeat: no-repeat;
background-size: 100% 100%;
}
.tit {
color: #FFFFFF;
font-size: 24rpx;
font-weight: 400;
text-align: center;
margin-top: 304rpx;
}
}
.bargain-list .list {
padding: 0 30rpx;
}
.bargain-list .list .item {
position: relative;
height: 250rpx;
background-color: #fff;
border-radius: 14rpx;
margin-bottom: 20rpx;
padding: 30rpx 25rpx;
}
.bargain-list .list .item .pictrue {
width: 190rpx;
height: 190rpx;
}
.bargain-list .list .item .pictrue image {
width: 100%;
height: 100%;
border-radius: 14rpx;
}
.bargain-list .list .item .text {
width: 432rpx;
font-size: 28rpx;
color: #333333;
.txt {
font-size: 22rpx;
margin-left: 4rpx;
color: #666666;
line-height: 36rpx;
}
}
.bargain-list .list .item .text .name {
width: 100%;
height: 68rpx;
line-height: 36rpx;
font-size: 28rpx;
margin-bottom: 26rpx;
}
.bargain-list .list .item .text .num {
font-size: 26rpx;
color: #999;
}
.bargain-list .list .item .text .num .iconfont {
font-size: 35rpx;
margin-right: 7rpx;
}
.bargain-list .list .item .text .money {
font-size: 24rpx;
font-weight: bold;
}
.bargain-list .list .item .text .money .price {
font-size: 38rpx;
}
.bargain-list .list .item .cutBnt {
position: absolute;
width: 162rpx;
height: 52rpx;
border-radius: 50rpx;
font-size: 24rpx;
color: #fff;
text-align: center;
line-height: 52rpx;
right: 24rpx;
bottom: 30rpx;
background: linear-gradient(90deg, #FF7931 0%, #E93323 100%);
}
.bargain-list .list .item .cutBnt .iconfont {
margin-right: 8rpx;
font-size: 30rpx;
}
.bargain-list .list .load {
font-size: 24rpx;
height: 85rpx;
text-align: center;
line-height: 85rpx;
}
</style>

File diff suppressed because one or more lines are too long

View File

@ -8,61 +8,42 @@
<text class="cicon-forward"></text>
</view>
</view>
<scroll-view
scroll-y="true"
@scrolltolower="loadmore"
class="scroll-box log-scroll"
scroll-with-animation="true"
>
<scroll-view scroll-y="true" @scrolltolower="loadmore" class="scroll-box log-scroll"
scroll-with-animation="true">
<view v-if="state.pagination.data">
<view
class="log-item-box ss-flex ss-row-between"
v-for="item in state.pagination.data"
:key="item.id"
>
<view class="log-item-box ss-flex ss-row-between" v-for="item in state.pagination.data" :key="item.id">
<view class="log-item-wrap">
<view class="log-item ss-flex ss-ellipsis-1 ss-col-center">
<view class="ss-flex ss-col-center">
<image
v-if="item.oper_type === 'user'"
class="log-img"
:src="sheep.$url.cdn(item.oper?.avatar)"
mode="aspectFill"
></image>
<image
v-else-if="item.oper_type === 'admin'"
class="log-img"
<image v-if="item.oper_type === 'user'" class="log-img"
:src="sheep.$url.cdn(item.oper?.avatar)" mode="aspectFill"></image>
<image v-else-if="item.oper_type === 'admin'" class="log-img"
:src="sheep.$url.static('/static/img/shop/avatar/default_user.png')"
mode="aspectFill"
></image>
<image
v-else
class="log-img"
:src="sheep.$url.static('/static/img/shop/avatar/notice.png')"
mode="aspectFill"
></image>
mode="aspectFill"></image>
<image v-else class="log-img"
:src="sheep.$url.static('/static/img/shop/avatar/notice.png')" mode="aspectFill">
</image>
</view>
<view class="log-text ss-ellipsis-1">{{ item.remark }}</view>
<view class="log-text ss-ellipsis-1">{{ item.title }} {{item.price/100}}</view>
</view>
</view>
<text class="log-time">{{ dayjs(item.create_time).fromNow() }}</text>
<text class="log-time">{{ dayjs(item.createTime).fromNow() }}</text>
</view>
</view>
<!-- 加载更多 -->
<uni-load-more
v-if="state.pagination.total > 0"
:status="state.loadStatus"
color="#333333"
@tap="loadmore"
/>
<uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" color="#333333"
@tap="loadmore" />
</scroll-view>
</view>
</template>
<script setup>
import sheep from '@/sheep';
import { computed, reactive } from 'vue';
import {
computed,
reactive
} from 'vue';
import _ from 'lodash';
import dayjs from 'dayjs';
@ -77,16 +58,18 @@
});
async function getLog(page = 1) {
const res = await sheep.$api.commission.log({
state.pagination.current_page = page
const res = await sheep.$api.commission.order({
page,
});
if (res.error === 0) {
let list = _.concat(state.pagination.data, res.data.data);
console.log(res, '下面的数据')
if (res.code === 0) {
let list = _.concat(state.pagination.data, res.data.list);
state.pagination = {
...res.data,
data: list,
};
if (state.pagination.current_page < state.pagination.last_page) {
if (state.pagination.data.length < state.pagination.total) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
@ -111,25 +94,30 @@
border-radius: 12rpx;
z-index: 3;
position: relative;
.header-box {
width: 690rpx;
height: 76rpx;
position: relative;
.header-bg {
width: 690rpx;
height: 76rpx;
}
.header-title {
position: absolute;
left: 20rpx;
top: 24rpx;
}
.title {
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
line-height: 30rpx;
}
.cicon-forward {
font-size: 30rpx;
font-weight: 400;
@ -137,6 +125,7 @@
line-height: 30rpx;
}
}
.log-scroll {
height: 600rpx;
background: #fdfae9;
@ -146,6 +135,7 @@
.log-item-box {
margin-bottom: 20rpx;
.log-time {
// margin-left: 30rpx;
text-align: right;

View File

@ -9,17 +9,9 @@
</view>
</view>
<view class="menu-list ss-flex ss-flex-wrap">
<view
v-for="(item, index) in state.menuList"
:key="index"
class="item-box ss-flex-col ss-col-center"
@tap="sheep.$router.go(item.path)"
>
<image
class="menu-icon ss-m-b-10"
:src="sheep.$url.static(item.img)"
mode="aspectFill"
></image>
<view v-for="(item, index) in state.menuList" :key="index" class="item-box ss-flex-col ss-col-center"
@tap="sheep.$router.go(item.path)">
<image class="menu-icon ss-m-b-10" :src="sheep.$url.static(item.img)" mode="aspectFill"></image>
<view>{{ item.title }}</view>
</view>
</view>
@ -46,12 +38,16 @@
<script setup>
import sheep from '@/sheep';
import { onLoad } from '@dcloudio/uni-app';
import { computed, reactive } from 'vue';
import {
onLoad
} from '@dcloudio/uni-app';
import {
computed,
reactive
} from 'vue';
const state = reactive({
menuList: [
{
menuList: [{
img: '/static/img/shop/commission/commission_icon1.png',
title: '我的团队',
path: '/pages/commission/team',
@ -71,22 +67,31 @@
title: '推广商品',
path: '/pages/commission/goods',
},
{
img: '/static/img/shop/commission/commission_icon5.png',
title: '我的资料',
path: '/pages/commission/apply',
isAgentFrom: true,
},
// {
// img: '/static/img/shop/commission/commission_icon5.png',
// title: '',
// path: '/pages/commission/apply',
// isAgentFrom: true,
// },
// todo @
{
img: '/static/img/shop/commission/commission_icon7.png',
title: '邀请海报',
path: 'action:showShareModal',
}, {
// img: '/static/img/shop/commission/commission_icon7.png',
title: '推广人排行榜',
path: '/pages/commission/promoter',
}, {
// img: '/static/img/shop/commission/commission_icon7.png',
title: '佣金排行榜',
path: '/pages/commission/commission-ranking',
},
{
img: '/static/img/shop/commission/commission_icon8.png',
title: '分享记录',
path: '/pages/commission/share-log',
},
// {
// img: '/static/img/shop/commission/commission_icon8.png',
// title: '',
// path: '/pages/commission/share-log',
// },
],
});
</script>
@ -101,25 +106,30 @@
z-index: 3;
position: relative;
}
.header-box {
width: 690rpx;
height: 76rpx;
position: relative;
.header-bg {
width: 690rpx;
height: 76rpx;
}
.header-title {
position: absolute;
left: 20rpx;
top: 24rpx;
}
.title {
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
line-height: 30rpx;
}
.cicon-forward {
font-size: 30rpx;
font-weight: 400;
@ -133,6 +143,7 @@
background: #fdfae9;
border-radius: 0 0 12rpx 12rpx;
}
.item-box {
width: 25%;
margin-bottom: 40rpx;

View File

@ -19,8 +19,13 @@
<script setup>
import sheep from '@/sheep';
import { onShow } from '@dcloudio/uni-app';
import { computed, reactive } from 'vue';
import {
onShow
} from '@dcloudio/uni-app';
import {
computed,
reactive
} from 'vue';
import commissionInfo from './components/commission-info.vue';
import accountInfo from './components/account-info.vue';
import commissionLog from './components/commission-log.vue';
@ -43,7 +48,10 @@
};
async function getAgentInfo() {
const { error, data } = await sheep.$store('user').getAgentInfo();
const {
error,
data
} = await sheep.$store('user').getAgentInfo();
if (error !== 0) {
state.error = error;
state.errorData = data;

View File

@ -8,15 +8,15 @@
},
]">
<!-- 团队数据总览 -->
<view class="team-data-box ss-flex ss-col-center ss-row-between">
<view class="data-card">
<view class="total-item">
<view class="item-title">团队订单数量</view>
<view class="total-num">
{{ state.agentInfo.child_order_count_all || 0 }}
<view class="team-data-box ss-flex ss-col-center ss-row-between" style="width:100%">
<view class="data-card" style="width:100%">
<view class="total-item" style="width:100%">
<view class="item-title" style='text-align: center;'>累计推广订单</view>
<view class="total-num" style='text-align: center;'>
{{ state.totals||state.pagination.total|| 0 }}
</view>
</view>
<view class="category-item ss-flex">
<!-- <view class="category-item ss-flex">
<view class="ss-flex-1">
<view class="item-title">一级订单</view>
<view class="category-num">
@ -29,9 +29,9 @@
{{ state.agentInfo.child_order_count_2 || 0 }}
</view>
</view>
</view> -->
</view>
</view>
<view class="data-card">
<!-- <view class="data-card">
<view class="total-item">
<view class="item-title">团队订单金额</view>
<view class="total-num">
@ -52,10 +52,10 @@
</view>
</view>
</view>
</view>
</view> -->
</view>
<!-- 自购 -->
<view class="direct-box ss-flex ss-row-between">
<!-- <view class="direct-box ss-flex ss-row-between">
<view class="direct-item">
<view class="item-title">自购分销订单数量</view>
<view class="item-value">
@ -68,7 +68,7 @@
{{ state.agentInfo.child_order_money_0 || '0.00' }}
</view>
</view>
</view>
</view> -->
</view>
<!-- tab -->
@ -131,7 +131,7 @@
} from '@dcloudio/uni-app';
import {
computed,
reactive
reactive,
} from 'vue';
import _ from 'lodash';
import {
@ -149,10 +149,11 @@
});
const state = reactive({
totals: 0,
pagination: {
data: [],
current_page: 1,
total: 1,
total: '',
last_page: 1,
},
loadStatus: '',
@ -170,24 +171,24 @@
// value: 'no'
// },
{
name: '已计入',
name: '待结算',
value: 'yes',
},
{
name: '已扣除',
name: '已结算',
value: 'back',
},
{
name: '已取消',
value: 'cancel',
},
// {
// name: '',
// value: 'cancel',
// },
];
//
function onTabsChange(e) {
state.pagination = {
data: [],
current_page: 1,
total: 1,
total: 0,
last_page: 1,
};
state.currentTab = e.index;
@ -196,19 +197,24 @@
//
async function getOrderList(page = 1, list_rows = 5) {
// todo @,,
state.loadStatus = 'loading';
let res = await sheep.$api.commission.order({
type: tabMaps[state.currentTab].value,
list_rows,
page,
// type: tabMaps[state.currentTab].value,
pageSize: list_rows,
pageNo: page,
// status
// bizType
});
if (res.error === 0) {
let orderList = _.concat(state.pagination.data, res.data.data);
if (res.code === 0) {
let orderList = _.concat(state.pagination.data, res.data.list);
state.pagination = {
...res.data,
data: orderList,
};
if (state.pagination.current_page < state.pagination.last_page) {
state.totals = res.data.total;
console.log(state)
if (state.pagination.data.length < state.totals) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
@ -228,7 +234,7 @@
}
onLoad(() => {
getAgentInfo();
// getAgentInfo();
getOrderList();
});

File diff suppressed because one or more lines are too long

View File

@ -1,23 +1,17 @@
<!-- 页面 -->
<template>
<s-layout title="我的团队" :class="state.scrollTop ? 'team-wrap' : ''" navbar="inner">
<view
class="header-box"
:style="[
<view class="header-box" :style="[
{
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
paddingTop: Number(statusBarHeight + 108) + 'rpx',
},
]"
>
]">
<!-- 推荐人 -->
<view v-if="userInfo.parent_user" class="referrer-box ss-flex ss-col-center">
推荐人
<image
class="referrer-avatar ss-m-r-10"
:src="sheep.$url.cdn(userInfo.parent_user.avatar)"
mode="aspectFill"
>
<image class="referrer-avatar ss-m-r-10" :src="sheep.$url.cdn(userInfo.parent_user.avatar)"
mode="aspectFill">
</image>
{{ userInfo.parent_user.nickname }}
</view>
@ -26,16 +20,18 @@
<view class="data-card">
<view class="total-item">
<view class="item-title">团队总人数</view>
<view class="total-num">{{ agentInfo.child_user_count_all || 0 }}</view>
<view class="total-num">
{{ (state.getSummary.firstBrokerageUserCount+ state.getSummary.secondBrokerageUserCount)|| 0 }}
</view>
</view>
<view class="category-item ss-flex">
<view class="ss-flex-1">
<view class="item-title">一级成员</view>
<view class="category-num">{{ agentInfo.child_user_count_1 || 0 }}</view>
<view class="category-num">{{ state.getSummary.firstBrokerageUserCount || 0 }}</view>
</view>
<view class="ss-flex-1">
<view class="item-title">二级成员</view>
<view class="category-num">{{ agentInfo.child_user_count_2 || 0 }}</view>
<view class="category-num">{{ state.getSummary.secondBrokerageUserCount || 0 }}</view>
</view>
</view>
</view>
@ -59,26 +55,17 @@
</view>
<view class="list-box">
<uni-list :border="false">
<uni-list-chat
v-for="item in state.pagination.data"
:key="item.id"
:avatar-circle="true"
:title="item.nickname"
:avatar="sheep.$url.cdn(item.avatar)"
:note="filterUserNum(item.agent?.child_user_count_1)"
>
<uni-list-chat v-for="item in state.pagination.data" :key="item.id" :avatar-circle="true"
:title="item.nickname" :avatar="sheep.$url.cdn(item.avatar)"
:note="filterUserNum(item.agent?.child_user_count_1)">
<view class="chat-custom-right">
<view v-if="item.agent?.level_info" class="tag-box ss-flex ss-col-center">
<image
class="tag-img"
:src="sheep.$url.cdn(item.agent.level_info.image)"
mode="aspectFill"
>
<view v-if="item.avatar" class="tag-box ss-flex ss-col-center">
<image class="tag-img" :src="sheep.$url.cdn(item.avatar)" mode="aspectFill">
</image>
<text class="tag-title">{{ item.agent.level_info.name }}</text>
<text class="tag-title">{{ item.nickname }}</text>
</view>
<text class="time-text">{{ item.create_time }}</text>
<text
class="time-text">{{ sheep.$helper.timeFormat(item.brokerageTime, 'yyyy-mm-dd hh:MM:ss') }}</text>
</view>
</uni-list-chat>
</uni-list>
@ -90,10 +77,18 @@
<script setup>
import sheep from '@/sheep';
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
import { computed, reactive } from 'vue';
import {
onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import {
computed,
reactive
} from 'vue';
import _ from 'lodash';
import { onPageScroll } from '@dcloudio/uni-app';
import {
onPageScroll
} from '@dcloudio/uni-app';
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
const agentInfo = computed(() => sheep.$store('user').agentInfo);
@ -108,6 +103,7 @@
}
});
const state = reactive({
getSummary: {},
pagination: {
data: [],
current_page: 1,
@ -126,17 +122,25 @@
async function getTeamList(page = 1, list_rows = 8) {
state.loadStatus = 'loading';
// nickname: this.nickname,
let res = await sheep.$api.commission.team({
list_rows,
page,
pageSize: list_rows,
pageNo: page,
level: '1',
'sortingField.order': 'desc',
'sortingField.field': 'userCount',
nickname: ''
});
if (res.error === 0) {
let orderList = _.concat(state.pagination.data, res.data.data);
console.log(res, '分销团队列表');
if (res.code === 0) {
let orderList = _.concat(state.pagination.data, res.data.list);
state.pagination = {
...res.data,
data: orderList,
};
if (state.pagination.current_page < state.pagination.last_page) {
if (state.pagination.data.length < state.pagination.total) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
@ -146,6 +150,8 @@
onLoad(async () => {
getTeamList();
let res = await sheep.$api.commission.getSummary();
state.getSummary = res.data;
});
//
@ -171,6 +177,7 @@
background: v-bind(headerBg) no-repeat,
linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
background-size: 750rpx 100%;
//
.team-data-box {
.data-card {
@ -207,10 +214,12 @@
}
}
}
.list-box {
z-index: 3;
position: relative;
}
.chat-custom-right {
.time-text {
font-size: 22rpx;

View File

@ -6,22 +6,16 @@
</view>
<view class="modal-content ss-flex-1 ss-p-b-100">
<radio-group @change="onChange">
<label
class="container-list ss-p-l-34 ss-p-r-24 ss-flex ss-col-center ss-row-center"
v-for="(item, index) in typeList"
:key="index"
>
<label class="container-list ss-p-l-34 ss-p-r-24 ss-flex ss-col-center ss-row-center"
v-for="(item, index) in typeList" :key="index">
<view class="container-icon ss-flex ss-m-r-20">
<image :src="sheep.$url.static(item.icon)" />
</view>
<view class="ss-flex-1">{{ item.title }}</view>
<radio
:value="item.value"
color="var(--ui-BG-Main)"
:checked="item.value === state.currentValue"
:disabled="!methods.includes(item.value)"
/>
<radio :value="item.value" color="var(--ui-BG-Main)"
:checked="item.value === state.currentValue" />
<!-- :disabled="!methods.includes(item.value)" -->
</label>
</radio-group>
</view>
@ -33,13 +27,17 @@
</template>
<script setup>
import { reactive, onBeforeMount, nextTick } from 'vue';
import {
reactive,
onBeforeMount,
nextTick
} from 'vue';
import sheep from '@/sheep';
const props = defineProps({
modelValue: {
type: Object,
default() {},
default () {},
},
show: {
type: Boolean,
@ -52,23 +50,22 @@
});
const emits = defineEmits(['update:modelValue', 'change', 'close']);
const state = reactive({
currentValue: '',
currentValue: '0',
});
const typeList = [
{
icon: '/static/img/shop/pay/wechat.png',
title: '微信零钱',
value: 'wechat',
const typeList = [{
// icon: '/static/img/shop/pay/wechat.png',
title: '工商银行',
value: '0',
},
{
icon: '/static/img/shop/pay/alipay.png',
title: '支付宝账户',
value: 'alipay',
// icon: '/static/img/shop/pay/alipay.png',
title: '建设银行',
value: '1',
},
{
icon: '/static/img/shop/pay/bank.png',
title: '银行卡转账',
value: 'bank',
// icon: '/static/img/shop/pay/bank.png',
title: '农业',
value: '2',
},
];
const getWalletAccountInfo = async () => {

View File

@ -1,43 +1,49 @@
<template>
<s-layout title="申请提现" class="withdraw-wrap" navbar="inner">
<!-- <view class="page-bg"></view> -->
<view
class="wallet-num-box ss-flex ss-col-center ss-row-between"
:style="[
<!-- <view class="wallet-num-box ss-flex ss-col-center ss-row-between" :style="[
{
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
paddingTop: Number(statusBarHeight + 108) + 'rpx',
},
]"
>
]">
<view class="">
<view class="num-title">可提现金额</view>
<view class="wallet-num">{{ userInfo.commission }}</view>
</view>
<button class="ss-reset-button log-btn" @tap="sheep.$router.go('/pages/pay/withdraw-log')"
>提现记录</button
>
</view>
<button class="ss-reset-button log-btn" @tap="sheep.$router.go('/pages/pay/withdraw-log')"></button>
</view> -->
<!-- 提现输入卡片-->
<view class="draw-card">
<view class="card-title">提现金额</view>
<view class="input-box ss-flex ss-col-center border-bottom">
<view class="unit"></view>
<uni-easyinput
:inputBorder="false"
class="ss-flex-1 ss-p-l-10"
v-model="state.amount"
type="number"
placeholder="请输入提现金额"
/>
<uni-easyinput :inputBorder="false" class="ss-flex-1 ss-p-l-10" v-model="state.amount" type="number"
placeholder="请输入提现金额" />
</view>
<view class="card-title">持卡人</view>
<view class="input-box ss-flex ss-col-center border-bottom">
<view class="unit"></view>
<uni-easyinput :inputBorder="false" class="ss-flex-1 ss-p-l-10" v-model="state.name"
placeholder="请输入持卡人姓名" />
</view>
<view class="card-title">卡号</view>
<view class="input-box ss-flex ss-col-center border-bottom">
<view class="unit"></view>
<uni-easyinput :inputBorder="false" class="ss-flex-1 ss-p-l-10" v-model="state.accountNo"
placeholder="请输卡号" />
</view>
<view class="bank-box ss-flex ss-col-center ss-row-between ss-m-b-30">
<view class="name">提现至</view>
<view class="name">选择银行</view>
<view class="bank-list ss-flex ss-col-center" @tap="onAccountSelect(true)">
<view v-if="!state.accountInfo.type" class="empty-text"></view>
<view v-if="state.accountInfo.type === '0'" class="empty-text"></view>
<view v-if="state.accountInfo.type === '1'" class="empty-text"></view>
<view v-if="state.accountInfo.type === '2'" class="empty-text"></view>
<!-- <view v-if="!state.accountInfo.type" class="empty-text"></view>
<view v-if="state.accountInfo.type === 'wechat'" class="empty-text"></view>
<view v-if="state.accountInfo.type === 'alipay'" class="empty-text"></view>
<view v-if="state.accountInfo.type === 'bank'" class="empty-text"></view>
<view v-if="state.accountInfo.type === 'bank'" class="empty-text"></view> -->
<text class="cicon-forward"></text>
</view>
</view>
@ -45,10 +51,10 @@
<view class="placeholder-text" v-if="state.accountInfo.account_name">
{{ state.accountInfo.account_header }}|{{ state.accountInfo.account_name }}
</view>
<view class="placeholder-text" v-else></view>
<!-- <view class="placeholder-text" v-else></view>
<button class="add-btn ss-reset-button" @tap="onAccountEdit(true)">
{{ state.accountInfo.account_name ? '修改' : '添加' }}
</button>
</button> -->
</view>
<button class="ss-reset-button save-btn ui-BG-Main-Gradient ui-Shadow-Main" @tap="onConfirm">
确认提现
@ -58,39 +64,45 @@
<!-- 提现说明 -->
<view class="draw-notice">
<view class="title ss-m-b-30">提现说明</view>
<view class="draw-list" v-for="(rule, index) in state.rulesList" :key="index">
<!-- <view class="draw-list" v-for="(rule, index) in state.rulesList" :key="index">
{{ index + 1 }}.{{ rule }}
</view>-->
<view class="draw-list">
当前可提现金额<text>{{state.userGet.brokeragePrice}}</text>
</view>
<view class="draw-list">
冻结佣金<text>{{state.userGet.frozenPrice}}</text>
</view>
<view class="draw-list">
说明每笔佣金冻结期为0天到期后可提现
</view>
</view>
<!-- 选择提现账户 -->
<account-type-select
:show="state.accountSelect"
@close="onAccountSelect(false)"
round="10"
v-model="state.accountInfo"
:methods="state.rules.methods"
/>
<account-type-select :show="state.accountSelect" @close="onAccountSelect(false)" round="10"
v-model="state.accountInfo" :methods="state.rules.methods" />
<!-- 编辑账户信息 -->
<account-info-modal
v-if="state.accountInfo.type"
v-model="state.accountInfo"
:show="state.accountEdit"
@close="onAccountEdit(false)"
round="10"
/>
<account-info-modal v-if="state.accountInfo.type" v-model="state.accountInfo" :show="state.accountEdit"
@close="onAccountEdit(false)" round="10" />
</s-layout>
</template>
<script setup>
import { computed, reactive, onBeforeMount } from 'vue';
import {
computed,
reactive,
onBeforeMount
} from 'vue';
import sheep from '@/sheep';
import accountTypeSelect from './components/account-type-select.vue';
import accountInfoModal from './components/account-info-modal.vue';
import { onPageScroll } from '@dcloudio/uni-app';
import {
onPageScroll
} from '@dcloudio/uni-app';
const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png');
onPageScroll(() => {});
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
function filterRules(rules) {
let list = [];
let str1 = '';
@ -122,6 +134,9 @@
const userStore = sheep.$store('user');
const userInfo = computed(() => userStore.userInfo);
const state = reactive({
userGet: {},
accountNo: '',
name: '',
amount: '',
type: '',
accountInfo: {},
@ -149,42 +164,50 @@
const onConfirm = async () => {
let payload = {
money: state.amount,
...state.accountInfo,
accountNo: state.accountNo,
name: state.name,
bankName: state.accountInfo.type,
type: '2',
price: state.amount * 100
};
console.log(payload);
// return;
// if (payload.money > userInfo.commission || payload.money <= 0) {
// sheep.$helper.toast('');
// return;
// }
if (payload.money > userInfo.commission || payload.money <= 0) {
sheep.$helper.toast('请输入正确的提现金额');
return;
}
// if (!payload.type) {
// sheep.$helper.toast('');
// return;
// }
if (!payload.type) {
sheep.$helper.toast('请选择提现方式');
return;
}
// if (!payload.account_name || !payload.account_header || !payload.account_no) {
// sheep.$helper.toast('');
// return;
// }
if (!payload.account_name || !payload.account_header || !payload.account_no) {
sheep.$helper.toast('请完善您的账户信息');
return;
}
// if (sheep.$platform.name === 'H5' && payload.type === 'wechat') {
// sheep.$helper.toast('使');
// return;
// }
if (sheep.$platform.name === 'H5' && payload.type === 'wechat') {
sheep.$helper.toast('请使用微信浏览器操作');
return;
}
let { error, msg, data } = await sheep.$api.pay.withdraw.apply(payload);
if (error === -1) {
let {
code,
msg,
data
} = await sheep.$api.pay.withdraw.apply(payload);
if (code === -1) {
sheep.$platform.useProvider('wechat').bind();
}
if (error === 0) {
if (code === 0) {
userStore.getInfo();
uni.showModal({
title: '操作成功',
content: '您的提现申请已成功提交',
cancelText: '继续提现',
confirmText: '查看记录',
success: function (res) {
success: function(res) {
res.confirm && sheep.$router.go('/pages/pay/withdraw-log');
},
});
@ -192,15 +215,20 @@
};
async function getWithdrawRules() {
let { error, data } = await sheep.$api.pay.withdraw.rules();
let {
error,
data
} = await sheep.$api.pay.withdraw.rules();
if (error === 0) {
state.rules = data;
state.rulesList = filterRules(state.rules);
}
}
onBeforeMount(() => {
onBeforeMount(async () => {
getWithdrawRules();
let res = await sheep.$api.pay.withdraw.userGet();
state.userGet = res.data
});
</script>

View File

@ -4,21 +4,15 @@
<view class="header-box ss-flex ss-row-center ss-col-center">
<view class="card-box ui-BG-Main ui-Shadow-Main">
<view class="card-head ss-flex ss-col-center">
<view class="card-title ss-m-r-10">我的佣金</view>
<view
@tap="state.showMoney = !state.showMoney"
class="ss-eye-icon"
:class="state.showMoney ? 'cicon-eye' : 'cicon-eye-off'"
></view>
<view class="card-title ss-m-r-10">当前佣金</view>
<view @tap="state.showMoney = !state.showMoney" class="ss-eye-icon"
:class="state.showMoney ? 'cicon-eye' : 'cicon-eye-off'"></view>
</view>
<view class="ss-flex ss-row-between ss-col-center ss-m-t-30">
<view class="money-num">{{ state.showMoney ? userInfo.commission : '*****' }}</view>
<view class="money-num">{{ state.showMoney ? state.userInfo.withdrawPrice : '*****' }}</view>
<view class="ss-flex">
<view class="ss-m-r-20">
<button
class="ss-reset-button withdraw-btn"
@tap="sheep.$router.go('/pages/pay/withdraw')"
>
<button class="ss-reset-button withdraw-btn" @tap="sheep.$router.go('/pages/pay/withdraw')">
提现
</button>
</view>
@ -30,15 +24,15 @@
<view class="ss-flex">
<view class="loading-money">
<view class="loading-money-title">待入账佣金</view>
<view class="loading-money-title">冻结佣金</view>
<view class="loading-money-num">{{
state.showMoney ? agentInfo.pending_reward || '0.00' : '*****'
state.showMoney ? state.userInfo.frozenPrice || '0.00' : '*****'
}}</view>
</view>
<view class="loading-money ss-m-l-100">
<view class="loading-money-title">可提现佣金</view>
<view class="loading-money-num">{{
state.showMoney ? userInfo.commission || '0.00' : '*****'
state.showMoney ? state.userInfo.brokeragePrice || '0.00' : '*****'
}}</view>
</view>
</view>
@ -47,12 +41,7 @@
<su-sticky>
<!-- 统计 -->
<view class="filter-box ss-p-x-30 ss-flex ss-col-center ss-row-between">
<uni-datetime-picker
v-model="state.data"
type="daterange"
@change="onChangeTime"
:end="state.today"
>
<uni-datetime-picker v-model="state.data" type="daterange" @change="onChangeTime" :end="state.today">
<button class="ss-reset-button date-btn">
<text>{{ dateFilterText }}</text>
<text class="cicon-drop-down ss-seldate-icon"></text>
@ -60,87 +49,61 @@
</uni-datetime-picker>
<view class="total-box">
<view class="ss-m-b-10">总收入{{ state.pagination.income.toFixed(2) }}</view>
<view>总支出{{ (-state.pagination.expense).toFixed(2) }}</view>
<!-- <view class="ss-m-b-10">总收入{{ state.pagination.income.toFixed(2) }}</view> -->
<!-- <view>总支出{{ (-state.pagination.expense).toFixed(2) }}</view> -->
</view>
</view>
<su-tabs
:list="tabMaps"
@change="onChangeTab"
:scrollable="false"
:current="state.currentTab"
></su-tabs>
<su-tabs :list="tabMaps" @change="onChangeTab" :scrollable="false" :current="state.currentTab"></su-tabs>
</su-sticky>
<s-empty
v-if="state.pagination.total === 0"
icon="/static/data-empty.png"
text="暂无数据"
></s-empty>
<s-empty v-if="state.pagination.total === 0" icon="/static/data-empty.png" text="暂无数据"></s-empty>
<!-- 转余额弹框 -->
<su-popup
:show="state.showModal"
type="bottom"
round="20"
@close="state.showModal = false"
showClose
>
<su-popup :show="state.showModal" type="bottom" round="20" @close="state.showModal = false" showClose>
<view class="ss-p-x-20 ss-p-y-30">
<view class="model-title ss-m-b-30 ss-m-l-20">转余额</view>
<view class="model-subtitle ss-m-b-100 ss-m-l-20">将您的佣金转到余额中继续消费</view>
<view class="input-box ss-flex ss-col-center border-bottom ss-m-b-70 ss-m-x-20">
<view class="unit"></view>
<uni-easyinput
:inputBorder="false"
class="ss-flex-1 ss-p-l-10"
v-model="state.amount"
type="number"
placeholder="请输入金额"
/>
<uni-easyinput :inputBorder="false" class="ss-flex-1 ss-p-l-10" v-model="state.amount" type="number"
placeholder="请输入金额" />
</view>
<button
class="ss-reset-button model-btn ui-BG-Main-Gradient ui-Shadow-Main"
@tap="onConfirm"
>
<button class="ss-reset-button model-btn ui-BG-Main-Gradient ui-Shadow-Main" @tap="onConfirm">
确定
</button>
</view>
</su-popup>
<!-- 钱包记录 -->
<view v-if="state.pagination.total > 0">
<view
class="wallet-list ss-flex border-bottom"
v-for="item in state.pagination.data"
:key="item.id"
>
<view class="wallet-list ss-flex border-bottom" v-for="item in state.pagination.data" :key="item.id">
<view class="list-content">
<view class="title-box ss-flex ss-row-between ss-m-b-20">
<text class="title ss-line-1"
>{{ item.event_text }}{{ item.memo ? '-' + item.memo : '' }}</text
>
<!-- {{ item.memo ? '-' + item.memo : '' }} -->
<text class="title ss-line-1">{{ item.title }}</text>
<view class="money">
<text v-if="item.amount >= 0" class="add">+{{ item.amount }}</text>
<text v-else class="minus">{{ item.amount }}</text>
<text v-if="item.amount >= 0" class="add">+{{ item.price }}</text>
<text v-else class="minus">{{ item.price }}</text>
</view>
</view>
<text class="time">{{ item.create_time }}</text>
<text class="time">{{ sheep.$helper.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</text>
</view>
</view>
</view>
<!-- <u-gap></u-gap> -->
<uni-load-more
v-if="state.pagination.total > 0"
:status="state.loadStatus"
:content-text="{
<uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
contentdown: '上拉加载更多',
}"
/>
}" />
</s-layout>
</template>
<script setup>
import { computed, reactive } from 'vue';
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
import {
computed,
reactive
} from 'vue';
import {
onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import sheep from '@/sheep';
import dayjs from 'dayjs';
import _ from 'lodash';
@ -157,6 +120,7 @@
income: 0,
};
const state = reactive({
userInfo: {},
showMoney: false,
date: [],
currentTab: 0,
@ -166,19 +130,18 @@
today: '',
});
const tabMaps = [
{
name: '全部',
const tabMaps = [{
name: '分佣',
value: 'all',
},
{
name: '收入',
name: '提现',
value: 'income',
},
{
name: '支出',
value: 'expense',
},
}
// {
// name: '',
// value: 'expense',
// },
];
const userInfo = computed(() => sheep.$store('user').userInfo);
@ -192,24 +155,27 @@
}
});
async function getLogList(page = 1, list_rows = 8) {
async function getLogList(page = 1, list_rows = 4) {
state.loadStatus = 'loading';
let res = await sheep.$api.user.wallet.log({
type: 'commission',
tab: tabMaps[state.currentTab].value,
list_rows,
page,
date: appendTimeHMS(state.date),
let ress = await sheep.$api.commission.getSummary();
state.userInfo = ress.data;
let res = await sheep.$api.user.wallet.log3({
// type: 'commission',
// tab: tabMaps[state.currentTab].value,
pageSize: list_rows,
pageNo: page,
// date: appendTimeHMS(state.date),
});
if (res.error === 0) {
let list = _.concat(state.pagination.data, res.data.list.data);
if (res.code === 0) {
let list = _.concat(state.pagination.data, res.data.list);
state.pagination = {
...res.data.list,
current_page: page,
...res.data,
data: list,
income: res.data.income,
expense: res.data.expense,
// income: res.data.income,
// expense: res.data.expense,
};
if (state.pagination.current_page < state.pagination.last_page) {
if (state.pagination.data.length < state.pagination.total) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
@ -243,22 +209,29 @@
uni.showModal({
title: '提示',
content: '确认把您的佣金转入到余额钱包中?',
success: async function (res) {
success: async function(res) {
if (res.confirm) {
const { error } = await sheep.$api.commission.transfer({
const {
error
} = await sheep.$api.commission.transfer({
amount: state.amount,
});
if (error === 0) {
state.showModal = false;
sheep.$store('user').getInfo();
onChangeTab({ index: 0 });
onChangeTab({
index: 0
});
}
}
},
});
}
async function getAgentInfo() {
const { code, data } = await sheep.$store('user').getAgentInfo();
const {
code,
data
} = await sheep.$store('user').getAgentInfo();
}
onLoad(async (options) => {
state.today = dayjs().format('YYYY-MM-DD');
@ -354,6 +327,7 @@
.loading-money {
margin-top: 56rpx;
.loading-money-title {
font-size: 24rpx;
font-weight: 400;

View File

@ -60,5 +60,21 @@ export default {
url: '/app-api/member/sign-in/record/get-summary',
method: 'GET',
}),
getBargainRecordSummary: () =>
request({
url: '/app-api/promotion/bargain-record/get-summary',
method: 'GET',
}),
getBargainActivityPage: () =>
request({
url: '/app-api/promotion/bargain-activity/page',
method: 'GET',
}),
getBargainActivityDetail: (params) =>
request({
url: '/app-api/promotion/bargain-activity/get-detail',
method: 'GET',
params
}),
};

View File

@ -37,7 +37,7 @@ export default {
// 分销订单
order: (params) =>
request({
url: 'commission/order',
url: '/app-api/trade/brokerage-record/page',
method: 'GET',
params,
}),
@ -52,7 +52,7 @@ export default {
// 我的团队
team: (params) =>
request({
url: 'commission/agent/team',
url: '/app-api/trade/brokerage-user/child-summary-page',
method: 'GET',
params,
}),
@ -68,4 +68,22 @@ export default {
url: '/app-api/trade/brokerage-user/get-summary',
method: 'GET',
}),
getBrokerageRankNumber: (params) =>
request({
url: '/app-api/trade/brokerage-user/get-rank-by-price',
method: 'GET',
params
}),
getBrokerageRankList: (params) =>
request({
url: '/app-api/trade/brokerage-user/rank-page-by-price',
method: 'GET',
params
}),
getRanklist: (params) =>
request({
url: '/app-api/trade/brokerage-user/rank-page-by-user-count',
method: 'GET',
params
}),
};

View File

@ -32,13 +32,23 @@ export default {
}),
apply: (data) =>
request({
url: 'withdraw/apply',
url: '/app-api/trade/brokerage-withdraw/create',
method: 'POST',
data,
custom: {
loadingMsg: '申请中',
auth: true,
// auth: true,
},
}),
userGet: (params) =>
request({
url: '/app-api/trade/brokerage-user/get',
method: 'GET',
params,
// custom: {
// loadingMsg: '申请中',
// auth: true,
// },
}),
},
};

View File

@ -1,18 +1,20 @@
import request from '@/sheep/request';
const DiyTemplateApi = {
const DiyTemplateApi = {
// TODO 芋艿:测试
getUsedDiyTemplate: () => {
return request({
url: '/app-api/promotion/diy-template/used',
method: 'GET',
});
},
// getUsedDiyTemplate: () => {
// return request({
// url: '/app-api/promotion/diy-template/used',
// method: 'GET',
// });
// },
getDiyTemplate: (id) => {
return request({
url: '/app-api/promotion/diy-template/get',
method: 'GET',
params: { id }
params: {
id
}
});
},
};

View File

@ -293,6 +293,13 @@ export default {
params,
custom: {},
}),
log3: (params) =>
request({
url: '/app-api/trade/brokerage-record/page',
// url: 'pay/wallet-transaction/page',
method: 'GET',
params,
}),
},
account: {
info: (params) =>

View File

@ -0,0 +1,173 @@
<template>
<view class="time" :style="justifyLeft">
<text class="" v-if="tipText">{{ tipText }}</text>
<text class="styleAll p6" v-if="isDay === true"
:style="{background:bgColor.bgColor,color:bgColor.Color}">{{ day }}{{bgColor.isDay?'天':''}}</text>
<text class="timeTxt" v-if="dayText"
:style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ dayText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""'
:style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ hour }}</text>
<text class="timeTxt" v-if="hourText" :class='isCol?"whit":""'
:style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ hourText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""'
:style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ minute }}</text>
<text class="timeTxt" v-if="minuteText" :class='isCol?"whit":""'
:style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ minuteText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""'
:style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ second }}</text>
<text class="timeTxt" v-if="secondText">{{ secondText }}</text>
</view>
</template>
<script>
export default {
name: "countDown",
props: {
justifyLeft: {
type: String,
default: ""
},
//
tipText: {
type: String,
default: "倒计时"
},
dayText: {
type: String,
default: "天"
},
hourText: {
type: String,
default: "时"
},
minuteText: {
type: String,
default: "分"
},
secondText: {
type: String,
default: "秒"
},
datatime: {
type: Number,
default: 0
},
isDay: {
type: Boolean,
default: true
},
isCol: {
type: Boolean,
default: false
},
bgColor: {
type: Object,
default: null
}
},
data: function() {
return {
day: "00",
hour: "00",
minute: "00",
second: "00"
};
},
created: function() {
this.show_time();
},
mounted: function() {},
methods: {
show_time: function() {
let that = this;
function runTime() {
//
let intDiff = that.datatime - Date.parse(new Date()) / 1000; //
let day = 0,
hour = 0,
minute = 0,
second = 0;
if (intDiff > 0) {
//
if (that.isDay === true) {
day = Math.floor(intDiff / (60 * 60 * 24));
} else {
day = 0;
}
hour = Math.floor(intDiff / (60 * 60)) - day * 24;
minute = Math.floor(intDiff / 60) - day * 24 * 60 - hour * 60;
second =
Math.floor(intDiff) -
day * 24 * 60 * 60 -
hour * 60 * 60 -
minute * 60;
if (hour <= 9) hour = "0" + hour;
if (minute <= 9) minute = "0" + minute;
if (second <= 9) second = "0" + second;
that.day = day;
that.hour = hour;
that.minute = minute;
that.second = second;
} else {
that.day = "00";
that.hour = "00";
that.minute = "00";
that.second = "00";
}
}
runTime();
setInterval(runTime, 1000);
}
}
};
</script>
<style scoped>
.p6 {
padding: 0 8rpx;
}
.styleAll {
/* color: #fff; */
font-size: 24rpx;
height: 36rpx;
line-height: 36rpx;
border-radius: 6rpx;
text-align: center;
/* padding: 0 6rpx; */
}
.timeTxt {
text-align: center;
/* width: 16rpx; */
height: 36rpx;
line-height: 36rpx;
display: inline-block;
}
.whit {
color: #fff !important;
}
.time {
display: flex;
justify-content: center;
}
.red {
color: #fc4141;
margin: 0 4rpx;
}
.timeCol {
/* width: 40rpx;
height: 40rpx;
line-height: 40rpx;
text-align:center;
border-radius: 6px;
background: #fff;
font-size: 24rpx; */
color: #E93323;
}
</style>

View File

@ -128,7 +128,7 @@ http.interceptors.response.use(
// 成功时的提示
if (
(response.data.error === 0 || response.data.code === 0) &&
( response.data.msg !== '' || response.config.custom.successMsg !== '' ) &&
(response.data.msg !== '' || response.config.custom.successMsg !== '') &&
response.config.custom.showSuccess
) {
uni.showToast({
@ -215,8 +215,8 @@ const request = (config) => {
}
// TODO 芋艿:额外拼接
if (config.url.indexOf('/app-api/') >= 0) {
// config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
// config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
}
return http.middleware(config);
};

View File

@ -215,9 +215,9 @@ const request = (config) => {
// TODO 芋艿:额外拼接
if (config.url.indexOf('/app-api/') >= 0) {
// 设置接口地址
// config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
// config.url = 'https://app.test.huizhizao.vip/prod-api' + config.url; // 调用【云端】
config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
// config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
}
return http.middleware(config);
};