分销-砍价

This commit is contained in:
落日晚风 committed 2023-12-21 17:58:15 +08:00
1 parent d6cf64be1e
commit ab77874aa5
21 files changed
+4402 -2274

No files matched your search

+702 -673
View File
File diff suppressed because it is too large. Load diff
+939
View File
@@ -0,0 +1,939 @@
<template>
<s-layout title='砍价详情'>
<view class='bargain'>
<!-- :class="startBargainUid !== userInfo.uid ? 'on' : ''" -->
<view class="header">
<navigator url="/pages/activity/bargainingList" hover-class="none">
<view class="back" style='width: 234rpx;
height: 54rpx;
background: linear-gradient(233deg,#ffd169,#fe960f);
opacity: 1;
border-radius: 0 26rpx 26rpx 0;
line-height: 54rpx;
text-align: center;
color: #6e3f00;
font-size: 25rpx;'>
<text class="iconfont icon-xiangzuo"></text> 返回砍价列表
</view>
</navigator>
</view>
<view class="pad30" style="padding-bottom: 30rpx;">
<view class='wrapper'>
<view class='pictxt acea-row row-between' @tap="goProduct"
style='display:flex;box-sizing: border-box;'>
<view class='pictrue'>
<image :src='state.bargainInfo.picUrl' />
</view>
<view class='text acea-row row-column-around' style='margin-left: 10rpx;'>
<view class='line1'>{{ state.bargainInfo.name }}</view>
<view class="surplus">最低价:¥{{ fen2yuan(state.bargainInfo.bargainMinPrice) }}</view>
<view class="surplus">剩余:{{ state.bargainInfo.stock }} {{state.bargainInfo.unitName}}</view>
<view class='money font-color-red' style='color:red'>
当前: ¥ <text class='num'>{{ fen2yuan(state.buyPrice) }}</text>
</view>
<view class="acea-row" style='display:flex'
v-if="state.bargainInfo.endTime > new Date().getTime() && state.bargainInfo.stock > 0">
<s-count-down :tipText="' '" :bgColor="state.bgColor" :dayText="':'" :hourText="':'"
:minuteText="':'" :secondText="' '" :datatime="state.bargainInfo.endTime / 1000"
:isDay="true" />
<text style="font-size: 22rpx;margin-left: 4rpx;line-height: 36rpx;">后结束</text>
</view>
<view v-else-if="state.bargainInfo.endTime <= new Date().getTime()">
<view style="font-size: 22rpx;" @tap='currentBargainUser'>已结束</view>
</view>
<view v-else-if="state.bargainInfo.stock <= 0">
<view style="font-size: 22rpx;" @tap='currentBargainUser'>已售罄</view>
</view>
</view>
<text class="iconfont icon-jiantou iconfonts"></text>
</view>
</view>
<!-- 砍价记录 -->
<view class='title font-color acea-row row-center-wrapper'>
<view class='pictrue'>
<image src='../static/zuo2.png'></image>
</view>
<view class="tits">
<view class='titleCon'>砍价记录</view>
<view class="line"></view>
</view>
<view class='pictrue on'>
<image src='../static/you2.png'></image>
</view>
</view>
<view class='bargainGang borRadius14'>
<view class='list' v-if="state.bargainUserHelpList.length > 0">
<block v-for="(item, index) in state.bargainUserHelpList" :key='index'
v-if="index < 3 || !state.couponsHidden">
<view class='item acea-row row-between-wrapper'>
<view class='pictxt acea-row row-between-wrapper'>
<view class='pictrue'>
<image :src='item.avatar' />
</view>
<view class='text'>
<view class='name line1'>{{item.nickname}}</view>
<view class='line1'>{{ formatDate(item.createTime) }}</view>
</view>
</view>
<view class='money'>
已砍 <text class="font-color-red">{{ fen2yuan(item.reducePrice) }}</text>元
</view>
</view>
</block>
<view class="open acea-row row-center-wrapper" @click="openTap"
v-if="state.bargainUserHelpList.length > 3">
{{state.couponsHidden?'展开更多':'关闭展开'}}
<text class="iconfont" :class='state.couponsHidden ? "icon-xiangxia":"icon-xiangshang"' />
</view>
</view>
<view v-if="state.bargainUserHelpList.length === 0" class="contentNo">
<text class="iconfont icon-xiaolian mr8"></text>
暂无助力记录
</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({
id: '',
buyPrice: '',
bargainInfo: {},
bgColor: {
'bgColor': '#333333',
'Color': '#fff',
'width': '44rpx',
'timeTxtwidth': '16rpx',
'isDay': true
},
bargainUserHelpList: [],
couponsHidden: true,
});
function getBargainDetails() {
sheep.$api.activity.getBargainActivityDetail({
id: state.id
}).then(res => {
state.bargainInfo = res.data;
state.buyPrice = state.bargainInfo.bargainFirstPrice;
// state.pages = '/pages/activity/goods_bargain_details/index?id=' + state.id +
// '&startBargainUid=' + state.uid + '&scene=' + state.uid + '&storeBargainId=' + state
// .storeBargainId;
// uni.setNavigationBarTitle({
// title: bargainInfo.name.substring(0, 13) + '...'
// })
// 获得拼团记录
// this.gobargainUserInfo();
//#ifdef H5
// this.getImageBase64(bargainInfo.picUrl);
//#endif
}).catch(function(err) {
// 错误了可以跳转回上个页面
})
}
onLoad(function(options) {
if (options.hasOwnProperty('id')) {
options.id ? state.id = options.id : state.id = ''
}
getBargainDetails()
})
// 工具函数
function fen2yuan(price) {
return (price / 100.0).toFixed(2)
}
</script>
<style lang="scss">
page {
background-color: red !important;
}
</style>
<style lang="scss" scoped>
.userEvaluation {
i {
display: inline-block;
}
}
.go {
color: #E93323;
text-align: center;
font-size: 28rpx;
margin-top: 26rpx;
.iconfont {
font-size: 11px
}
}
.poster-pop {
width: 594rpx;
height: 850rpx;
position: fixed;
left: 50%;
transform: translateX(-50%);
z-index: 999;
top: 50%;
margin-top: -466rpx;
image {
width: 100%;
height: 100%;
display: block;
border-radius: 10rpx;
}
.close {
text-align: center;
margin-top: 55rpx;
color: #fff;
font-size: 52rpx;
}
.save-poster {
background-color: #df2d0a;
font-size: :22rpx;
color: #fff;
text-align: center;
height: 76rpx;
line-height: 76rpx;
width: 100%;
}
.keep {
color: #fff;
text-align: center;
font-size: 25rpx;
margin-top: 25rpx;
}
}
.canvas {
position: fixed;
opacity: 0;
}
.font_hui {
color: #CCCCCC !important;
}
.bg_qian {
background-color: #F5F5F5 !important;
}
.font-color-red {
font-weight: 800;
}
.huiBtn {
font-size: 30rpx;
font-weight: bold;
color: #fff;
width: 630rpx;
height: 80rpx;
text-align: center;
line-height: 80rpx;
margin: 0 auto;
background-color: #CCCCCC;
box-shadow: 0 7rpx 0 #AAAAAA;
border-radius: 40rpx;
}
.huifont {
color: #CCCCCC;
}
.buyBox {
margin-top: 40rpx;
.on {
width: 300rpx;
height: 80rpx;
border-radius: 40rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
line-height: 80rpx;
}
.buyNow {
background: linear-gradient(180deg, #FF8831 0%, #F11B09 100%);
box-shadow: 0 7rpx 0 #C11100;
}
.buyMore {
background: linear-gradient(180deg, #FFCA52 0%, #FE960F 100%);
box-shadow: 0 7rpx 0 #D87A00;
}
}
.mr8 {
margin-right: 8rpx;
}
.contentNo {
width: 100%;
padding: 50rpx 15rpx;
text-align: center;
font-size: 26rpx;
color: #AAAAAA;
}
.generate-posters {
width: 100%;
height: 170rpx;
background-color: #fff;
position: fixed;
left: 0;
bottom: 0;
z-index: 388;
transform: translate3d(0, 100%, 0);
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
border-top: 1rpx solid #eee;
}
.generate-posters.on {
transform: translate3d(0, 0, 0);
}
.generate-posters .item {
flex: 1;
text-align: center;
font-size: 30rpx;
}
.generate-posters .item .iconfont {
font-size: 80rpx;
color: #5eae72;
}
.generate-posters .item .iconfont.icon-haibao {
color: #5391f1;
}
.bargain .bargainGang {
background-color: #fff;
.list {
padding: 50rpx 30rpx 0 30rpx;
}
.open {
font-size: 24rpx;
color: #999;
margin-top: 30rpx;
}
.helpNo {
text-align: center;
font-size: 26rpx;
color: #AAAAAA;
}
}
.bargain .bargainGang .open .iconfont {
font-size: 25rpx;
margin: 5rpx 0 0 10rpx;
}
.bargain .icon-xiangzuo {
font-size: 24rpx;
margin-right: 6px;
}
.bargain .header {
/* TODO 芋艿:此处原来采用base64 但是过长编辑到小程序卡死 目前采用网络地址 需解决 */
background-image: url('https://huizhizao-1314830814.cos.ap-shanghai.myqcloud.com/huizhizao-1314830814/7e9bea1e8bbcd8a7a865a7703d65a1d0b25ec33a4b8d443698ff2e6eccf1300f.png');
background-repeat: no-repeat;
background-size: 100% 100%;
width: 100%;
height: 340rpx;
margin: 0 auto;
padding-top: 20rpx;
.back {
width: 235rpx;
height: 54rpx;
background: linear-gradient(233deg, #FFD169 0%, #FE960F 100%);
opacity: 1;
border-radius: 0px 27rpx 27rpx 0px;
line-height: 54rpx;
text-align: center;
color: #6E3F00;
font-size: 28rpx;
}
}
.bargain .header .pictxt {
margin: 330rpx auto 0 auto;
font-size: 26rpx;
color: #fff;
}
.bargain .header .pictxt .pictrue {
width: 56rpx;
height: 56rpx;
margin-right: 30rpx;
}
.bargain .header .pictxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 50%;
border: 2rpx solid #fff;
}
.bargain .header .pictxt .text {
margin-left: 20rpx;
}
.bargain .header .pictxt .text text {
margin-left: 20rpx;
}
.bargain .header .time {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbgAAACmCAMAAACfv2reAAAAk1BMVEUAAAD/nSL/oCj/oCj/nSH/nSH/oCj/mhr/mhr/oCj/oCj/oCj/nSH/niT/mhr/mhr/oCj/mhr/oCj/oCj/mhr/niP/oCj/oCj/mhr/////oCj/mhr/nyT/w3f/rkf/rEL/pjT/tlr/xXv/uF3//vz/vmv/wXP/vWr/79r/1aD/05r/wXL/nB//5MH/+/X/t1r/5MP28hXaAAAAGXRSTlMABvndiVtUVPjkOC8Dk+DarKyQC+QH86amYv5b+wAAA6JJREFUeNrs3Nlu4kAQheEyGOywBkImcR8Sh7Avycz7P920G8l3MYtccko63wXc969GXuiS20XJ6ygF1SQdvyaRiL5kDKrZOBFtgxjID7tVRjVZ7Q45EA9EV4z5ntVqttqfEIuqBKevjGr3dUIiiqIZ9hkp2GMWiZ4Ocv5Oqljl6IieCQ4ZqThgInpG2GWkYoeR6EnBX0olK6SiB8hICSAlhjOE4YxiOKMYziiGM4rhjGI4o5TCIWA4PQhqzzcPGE4PMA9q3m0fAcPpKdfYk3o47z1gOD3Ae+A8qUfuLby/C4bTA5zXOPekHktvu11v12uG0wOc13jpybWi7ku75X6yOR43bwHD6QHegmK13U/+tF+6kZS6bVfls8RweoDPkqvS7pZ/lXTVNpvNkTtOW7nj/Gq7avFACrG7YOlt196W4fQA5zVeeu6CWLyu81rT3lP1VWWBV5WKgEVQeVX51Bu2nNcViR7890Of93EKVO7j+iFYJJ1iv/XlEj450QZ8BHJJv9hzHXn0n1M+q2ze9c8qpz7Zo7T9Z4+vdZoHyJV6Pllbin0XMVzzrg/37JO1xHl8kfoLAHIt5zHcb8FwRjGcUQxnFMMZdU84HrNq3jdSxXBjHmzUssPo9nA8Sty8Aya3h+Ph/caFw/s3h+O4jMbtMXtWDCcJTv8yqqQ/oKYMx5FQDSpHQumGGww5hK1e32EI23BwTziOPWzYOBFRDydRZ8JBo/VJR5NOJHeGI1MYziiGM4rhjGI4oxjOKIYziuGMYjijGM4ohjOK4YxiOKMYziiGM4rhjGI4oxjOKIYziuH+s0cHJAAAAACC/r9uR6AXnBI3JW5K3JS4KXFT4qbETYmbEjclbkrclLgpcVPipsRNiZsSNyVuStyUuClxU+KmxE2JmxI3JW5K3JS4KXFT4qbETYmbEjclbkrclLgpcVPipsRNiZsSNyVuStyUuClxU+KmxE2JmxI3JW5K3JS4KXFT4qbETYmbEjclbkrclLgpcVPipsRNiZsSNyVuStyUuClxtUdHJwzDUAxFZTs2xInBxLQf2n/QvrTQGSLQ+ZAGuKIcTpTDiXI4UQ4nyuFEOZwohxPlcKIcTpTDiXI4UQ4nyuFEOZwohxPlcKIcThQD3jEJJmSRzCixHSakkyyYsRdMyCA5UWPzAZNxZJIVaY/bXU7G8Q32AhpDvvqCPd7qIzM0hI0mZsPtHDQp48RPKzQZpeEv1Vky7fFymTXh9gGY1gZJcqJI8QAAAABJRU5ErkJggg==');
background-repeat: no-repeat;
background-size: 100% 100%;
width: 440rpx;
height: 166rpx;
margin: 0 auto;
font-size: 22rpx;
text-align: center;
padding-top: 11rpx;
box-sizing: border-box;
}
.bargain .header .time .red {
color: #fc4141;
}
.bargain .header .people {
text-align: center;
color: #fff;
font-size: 20rpx;
position: absolute;
width: 85%;
/* #ifdef MP */
height: 44px;
line-height: 44px;
top: 40rpx;
/* #endif */
/* #ifdef H5 */
top: 58rpx;
/* #endif */
}
.bargain .header .time text {
color: #333;
}
.bargain {
.wrapper {
margin-top: -100rpx;
.pictxt {
width: 100%;
height: 260rpx;
background-color: #FFF5E6;
padding: 20rpx;
border-radius: 14rpx;
}
.surplus {
color: #999999;
font-size: 22rpx;
}
}
.content {
width: 100%;
height: auto;
background-image: url('../static/zhuangshi.png');
background-size: 100% 100%;
background-color: #fff;
border-bottom-left-radius: 14rpx;
border-bottom-right-radius: 14rpx;
padding: 40rpx 0 70rpx 0;
.money {
color: #333333;
font-size: 36rpx;
.price {}
}
}
}
.bargain .wrapper,
{
// background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArIAAAF8CAYAAAAzc1jZAAAco0lEQVR4Xu3dW4zc513H4feddWynQU1FY69zKvZuysENPqx7SFFRU4JEi+ACCVUUiQsuqYQ4VIWCchEuoAIFqRdI5QrlgkNLqQpSJA5VSWkKqKK7DkKuqIQ3RnUTe40CJRSSNDt/ZEeF1LGTmdnffuP1PLntzPf3n2fm4tMoTnrzFwECBAgQIECAAIEdKNB34DN7ZAIECBAgQIAAAQJNyPoRECBAgAABAgQI7EgBIbsjvzYPTYAAAQIECBAgIGT9BggQIECAAAECBHakgJDdkV+bhyZAgAABAgQIEBCyfgMECBAgQIAAAQI7TuD8iaX3C9kd97V5YAIECBAgQIDA/AoMrfWNlUO/2frog0J2fn8HPjkBAgQIECBAYEcJDHfdtWfj5vHvt9Z//OKDC9kd9fV5WAIECBAgQIDAfApsHN73bW3vax8eenvnNwWE7Hz+FnxqAgQIECBAgMCOETj73be/ftdr9vx57/0tL35oIbtjvkIPSoAAAQIECBCYP4GzR26/Y/euvX819PY9l396ITt/vwefmAABAgQIECCwIwS+evdtd+7ac+MjrbXlKz2wkN0RX6OHJECAAAECBAjMl8CTxw4eHC0sfKa1tnS1Ty5k5+s34dMSIECAAAECBK55gSdOLL1h1Prne2t3vtzDCtlr/qv0gAQIECBAgACB+RG4+Ae7dr9m76NX+mdiL1cQsvPzu/BJCRAgQIAAAQLXtMC5I4s39Rtu+uvW+lsneVAhO4mS1xAgQIAAAQIECGyrwNDaro2V5Ydbbz806SEhO6mU1xEgQIAAAQIECGybwMbK0u8Nvf/0NAeE7DRaXkuAAAECBAgQIFAusHFi6UND6x+edljITivm9QQIECBAgAABAmUCF1aWfmTc2p+13kfTjgrZacW8ngABAgQIECBAoERg49jSG4eF/sXW2mtnGRSys6h5DwECBAgQIECAwJYETh1uu/fduPz3Q2srsw4J2VnlvI8AAQIECBAgQGBmgfPHlx9so/aBmQdaa0J2K3reS4AAAQIECBAgMLXAuZWD9/Q++nxrfWHqN7/oDUJ2K3reS4AAAQIECBAgMJXA0FrfWFn+Yuuz/yMF3zwoZKei92ICBAgQIECAAIGtCFw4tvST44X+B1vZELIVejYIECBAgAABAgSmEji/svx3rbe3T/Wmq7zY35GtULRBgAABAgQIECAwscCFo0vfubkwvre30duH3t7cW7974je/6IVCdhY17yFAgAABAgQIECgTePL4gX297b2v99G9rbd7W+vfNcm4kJ1EyWsIECBAgAABAgRiAufvPrTYb2jfP4zakdZGR/owvHPo/XWXP4CQjX0lDhEgQIAAAQIECMwiMLQ2unD0O44Ou0b39WF039CHt7bWv13IzqLpPQQIECBAgAABAq+qwLkTB98mZF/Vr8BxAgQIECBAgACBWQX6V+6448Y7z579n1kHvI8AAQIECBAgQIDAqyHQz60sf3bh61/70X1f/renX40HcJMAAQIECBAgQIDALAL9/InloQ3DF/ozT//g/i9d+K9ZRryHAAECBAgQIECAQFrghZC9+NcwPNqfefqHxWz6K3CPAAECBAgQIEBgFoH/D9kXavbT+1fX39Nb25xlzHsIECBAgAABAgQIpAQuC9mLf2N2+MiBtfVfSD2AOwQIECBAgAABAgRmEXhJyF4cGY0337fv5JmPzTLoPQQIECBAgAABAgQSAlcM2TYMX1/4xvjNt/zTmX9OPIQbBAgQIECAAAECBKYVuHLIttb6MPzDqbX173tXa89PO+r1BAgQIECAAAECBLZb4Kohe/HwMLRfP7B2+v7tfgj7BAgQIECAAAECBKYVeNmQbW3Y3BwPP3Dbycc/N+2w1xMgQIAAAQIECBDYToFXCNlLf1/2y//5tfWjb/yX9ux2PohtAgQIECBAgAABAtMITBCyl/4ZgwcW19Z/bZphryVAgAABAgQIECCwnQKThWxr3xi15+/Zt/qva9v5MLYJECBAgAABAgQITCowache/INfq59bO/229/qvfk1q63UECBAgQIAAAQLbKDBxyF56hvHw/sWT6x/dxucxTYAAAQIECBAgQGAigelCdhj+/blnn7vrzlNnn5po3YsIECBAgAABAgQIbJPAdCH7wr9b9ncOrJ3+2W16HrMECBAgQIAAAQIEJhKYOmR7a8+P2ub33rLqP187kbAXESBAgAABAgQIbIvADCE7fGW82T504LH1P9yWJzJKgAABAgQIECBAYAKBiUK2D+2r42H8yfG4f+LWf1z/297aMMG2lxAgQIAAAQIECBDYNoGXCdnhfBvaJ/swfHzfyccfFa/b9h0YJkCAAAECBAgQmEHgW0N2aBeGNv5UH/on/ubk+iP+nbEziHoLAQIECBAgQIBARKCfX1l6amjtU70PH9+/+vhnuv/gQQTeEQIECBAgQIAAga0J9FOH2+43fak9t7UZ7yZAgAABAgQIECCQFejZc64RIECAAAECBAgQqBEQsjWOVggQIECAAAECBMICQjYM7hwBAgQIECBAgECNgJCtcbRCgAABAgQIECAQFhCyYXDnCBAgQIAAAQIEagSEbI2jFQIECBAgQIAAgbCAkA2DO0eAAAECBAgQIFAjIGRrHK0QIECAAAECBAiEBYRsGNw5AgQIECBAgACBGgEhW+NohQABAgQIECBAICwgZMPgzhEgQIAAAQIECNQICNkaRysECBAgQIAAAQJhASEbBneOAAECBAgQIECgRkDI1jhaIUCAAAECBAgQCAsI2TC4cwQIECBAgAABAjUCQrbG0QoBAgQIECBAgEBYQMiGwZ0jQIAAAQIECBCoERCyNY5WCBAgQIAAAQIEwgJCNgzuHAECBAgQIECAQI2AkK1xtEKAAAECBAgQIBAWELJhcOcIECBAgAAB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AgAABAgQI1AgI2RpHKwQIECBAgAABAmEBIRsGd44AAQIECBAgQKBGQMjWOFohQIAAAQIECBAICwjZMLhzBAgQIECAAAECNQJCtsbRCgECBAgQIECAQFhAyIbBnSNAgAABAgQIEKgRELI1jlYIECBAgAABAgTCAkI2DO4cAQIECBAgQIBAjYCQrXG0QoAAAQIECBAgEBYQsmFw5wgQIECAAAECBGoEhGyNoxUCBAgQIECAAIGwgJANgztHgAABAgQIECBQIyBkaxytECBAgAABAgQIhAWEbBjcOQIECBAgQIAAgRoBIVvjaIUAAQIECBAgQCAsIGTD4M4RIECAAAECBAjUCAjZGkcrBAgQIECAAAECYQEhGwZ3jgABAgQIECBAoEZAyNY4WiFAgAABAgQIEAgLCNkwuHMECBAgQIAAAQI1AkK2xtEKAQIECBAgQIBAWEDIhsGdI0CAAAECBAgQqBEQsjWOVggQIECAAAECBMICQjYM7hwBAgQIECBAgECNgJCtcbRCgAABAgQIECAQFhCyYXDnCBAgQIAAAQIEagSEbI2jFQIECBAgQIAAgbCAkA2DO0eAAAECBAgQIFAjIGRrHK0QIECAAAECBAiEBYRsGNw5AgQIECBAgACBGgEhW+NohQABAgQIECBAICwgZMPgzhEgQIAAAQIECNQICNkaRysECBAgQIAAAQJhASEbBneOAAECBAgQIECgRkDI1jhaIUCAAAECBAgQCAsI2TC4cwQIECBAgAABAjUCQrbG0QoBAgQIECBAgEBYQMiGwZ0jQIAAAQIECBCoERCyNY5WCBAgQIAAAQIEwgJCNgzuHAECBAgQIECAQI2AkK1xtEKAAALine truncated
// babackground-repeat: no-repeat;
// background-size: 100% 100%;
width: 100%;
background-color: #fff;
padding: 0 24rpx 10rpx 24rpx;
box-sizing: border-box;
}
.bargain .pictxt .pictrue {
width: 220rpx;
height: 220rpx;
position: relative;
}
.bargain .pictxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
}
.bargain .pictxt .text {
font-size: 30rpx;
color: #333333;
.line1 {
width: 324rpx;
}
}
.bargain .pictxt .text .money {
font-weight: bold;
font-size: 24rpx;
}
.bargain .pictxt .text .money .num {
font-size: 36rpx;
}
.bargain .pictxt .text .successNum {
font-size: 22rpx;
color: #999;
}
.bargain .cu-progress {
overflow: hidden;
height: 12rpx;
background-color: #FDEAE8;
width: 560rpx;
height: 20rpx;
border-radius: 20rpx;
margin: 20rpx auto;
}
.bargain .cu-progress .bg-red {
width: 0;
height: 100%;
transition: width 0.6s ease;
border-radius: 20rpx;
background-image: linear-gradient(to right, #ffa363 0%, #e93323 100%);
}
.bargain .money {
// font-size: 22rpx;
// color: #999;
// margin-top: 40rpx;
}
.bargain .bargainSuccess {
font-size: 26rpx;
color: #333333;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 40rpx;
image {
width: 48rpx;
height: 62rpx;
margin-right: 18rpx;
}
}
.bargain .bargainSuccess .iconfont {
font-size: 45rpx;
color: #54c762;
padding-right: 18rpx;
vertical-align: -5rpx;
}
.bargain .bargainBnt {
font-size: 30rpx;
font-weight: bold;
color: #fff;
width: 630rpx;
height: 80rpx;
background-image: url('../static/btn.png');
background-size: 100% 100%;
// border-radius: 40rpx;
// background: linear-gradient(180deg, #FF8831 0%, #F11B09 100%);
text-align: center;
line-height: 80rpx;
margin: 0 auto;
}
.bargain .bargainBnt.on {
border: 2rpx solid red;
color: red;
background-image: linear-gradient(to right, #fff 0%, #fff 100%);
width: 596rpx;
height: 76rpx;
}
.bargain .bargainBnt.grey {
color: #fff;
background-image: linear-gradient(to right, #bbbbbb 0%, #bbbbbb 100%);
}
.bargain .tip {
font-size: 22rpx;
color: #999;
text-align: center;
margin-top: 20rpx;
margin-bottom: 50rpx;
}
.bargain .lock,
.bargain .bargainGang .lock,
.bargain .goodsDetails .lock {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAiQAAABCCAYAAABnwc0eAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3ZpVFh0WE1MOmNvbS5hZG9iZS54bXA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cAkwBMAMKYnbCB5XFtZmAPv6Tqt61NdP5lr63qo6wd37Ixotnh95K/o2gLAloMnAGBMT/wjwAC10O4qfVDGDQAAAABJRU5ErkJggg==');
background-repeat: no-repeat;
background-size: 100% 100%;
width: 548rpx;
height: 66rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: -43rpx;
z-index: 5;
}
.bargain .title {
font-size: 40rpx;
font-weight: 600;
// height: 80rpx;
// margin-top: 30rpx;
}
.bargain .title .pictrue {
width: 60rpx;
height: 60rpx;
}
.bargain .title .pictrue.on,
.bargain .title .pictrue.on {
transform: rotate(180deg);
}
.bargain .title .pictrue image,
.bargain .title .pictrue image {
width: 100%;
height: 100%;
display: block;
}
.bargain .title .tits {
margin: 50rpx 15rpx 40rpx 15rpx;
}
.bargain .title .titleCon {
margin: 0 10rpx -14rpx 10rpx;
color: #fff;
border: 16rpx solid linear-gradient(0deg, #FFD136 0%, rgba(255, 213, 72, 0.12) 100%);
;
}
.bargain .title .line {
// width: 216rpx;
height: 16rpx;
background: linear-gradient(0deg, #FFD136 0%, rgba(255, 213, 72, 0.12) 100%);
opacity: 0.6;
}
.bargain .bargainGang .list .item {
padding-bottom: 50rpx;
}
.bargain .bargainGang .list .item .pictxt {
// width: 310rpx;
.num {
width: 28rpx;
height: 36rpx;
// image{
// width: 100%;
// height: 100%;
// }
}
.num1 {
background-image: url(../static/n1.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
.num2 {
background-image: url(../static/n2.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
.num3 {
background-image: url(../static/n3.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
}
.bargain .bargainGang .list .item .pictxt .pictrue {
width: 70rpx;
height: 70rpx;
margin-right: 14rpx;
}
.bargain .bargainGang .list .item .pictxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 50%;
}
.bargain .bargainGang .list .item .pictxt .text {
width: 225rpx;
font-size: 20rpx;
color: #999;
}
.bargain .bargainGang .list .item .pictxt .text .name {
font-size: 25rpx;
color: #333333;
margin-bottom: 7rpx;
}
.bargain .bargainGang .list .item .money {
font-size: 25rpx;
color: #999999;
}
.bargain .bargainGang .list .item .money .iconfont {
font-size: 35rpx;
vertical-align: middle;
margin-right: 10rpx;
}
.bargain .bargainGang .load {
font-size: 24rpx;
text-align: center;
line-height: 80rpx;
height: 80rpx;
}
.bargain .goodsDetails {
width: 100%;
background-color: #fff;
//margin: 13rpx auto 0 auto;
}
.bargain .goodsDetails~.goodsDetails {
margin-bottom: 50rpx;
}
.bargain .goodsDetails .conter {
// margin-top: 20rpx;
overflow: hidden;
}
.bargain .goodsDetails .conter image {
width: 100% !important;
display: block !important;
}
.bargain .bargainTip {
position: fixed;
top: 50%;
left: 50%;
width: 500rpx;
height: 469rpx;
margin-left: -246rpx;
z-index: 111;
border-radius: 14rpx;
background-color: #fff;
transition: all 0.3s ease-in-out 0s;
opacity: 0;
transform: scale(0);
padding-bottom: 60rpx;
margin-top: -330rpx;
background: linear-gradient(180deg, #FFFFFF 0%, #FFEEEB 100%);
.cu-progress {
width: 410rpx;
margin: 0 auto;
}
.t1 {
text-align: center;
color: #666666;
font-size: 24rpx;
margin: 20rpx 0 54rpx 0;
}
.bubbleBox {
width: 410rpx;
margin: 16rpx auto;
.bubble {
position: relative;
display: inline-block;
text {
display: inline-block;
font-size: 22rpx;
padding: 2rpx 8rpx;
border-radius: 30rpx;
background-color: #E93323;
color: #fff;
}
text::before {
content: '';
width: 0;
height: 32rpx;
border: 14rpx solid;
position: absolute;
bottom: -54rpx;
left: 14rpx;
border-color: #E93323 transparent transparent;
}
}
}
}
.bargain .bargainTip.on {
opacity: 1;
transform: scale(1);
}
.bargain .bargainTip .pictrue {
width: 500rpx;
height: 200rpx;
margin-top: -118rpx;
}
.bargain .bargainTip .pictrue image {
width: 100%;
height: 100%;
}
.bargain .bargainTip .cutOff {
font-size: 32rpx;
color: #333;
text-align: center;
margin: 12rpx 0 0rpx 0;
font-weight: 600;
text {
font-weight: 600;
font-size: 44rpx;
}
}
.bargain .bargainTip .cutOff.on {
margin-top: 26rpx;
}
.bargain .bargainTip .help {
font-size: 32rpx;
font-weight: bold;
text-align: center;
margin-top: 40rpx;
}
.bargain .bargainTip .tipBnt {
font-size: 32rpx;
color: #fff;
width: 360rpx;
height: 82rpx;
border-radius: 41rpx;
background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%);
text-align: center;
line-height: 82rpx;
margin: 0 auto;
}
.bargain_view {
width: 180rpx;
height: 48rpx;
background: rgba(0, 0, 0, 0.5);
opacity: 1;
border-radius: 0 0 6rpx 6rpx;
position: absolute;
bottom: 0;
font-size: 22rpx;
color: #fff;
text-align: center;
line-height: 48rpx;
}
.iconfonts {
font-size: 22rpx !important;
line-height: 220rpx;
}
.wxParse-div {
width: auto !important;
height: auto !important;
}
.bargain .mask {
z-index: 100;
}
.share-box {
z-index: 1000;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
image {
width: 100%;
height: 100%;
}
}
</style>
+372
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>
+241
View File
@@ -0,0 +1,241 @@
<template>
<s-layout title="佣金排行榜">
<view class="CommissionRank">
<view class="header">
<view class="rank" v-if="state.position">您目前的排名<text class="num">{{state.position}}</text>名</view>
<view class="rank" v-else>您目前暂无排名</view>
</view>
<view class="wrapper">
<view class="nav acea-row row-around" style='justify-content: space-around;display:flex'>
<view class="item" :class="state.active === index ? 'font-color' : ''"
v-for="(item,index) in state.navList" :key="index" @click="switchTap(index)">
{{ item }}
</view>
</view>
<view class="list">
<view class="item acea-row row-between-wrapper" v-for="(item,index) in state.rankList" :key="index">
<view class="num" v-if="index <= 2">
<image :src="'/static/images/medal0' + (index+1) + '.png'" />
</view>
<view class="num" v-else>
{{index + 1}}
</view>
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.avatar"></image>
</view>
<view class="text line1">{{ item.nickname }}</view>
</view>
<view class="people font-color">¥{{ fen2yuan(item.brokeragePrice) }}</view>
</view>
</view>
<view class='noCommodity'
v-if="state.rankList.length === 0 && (state.page !== 1 || state.active === 0)">
<emptyPage title="暂无排行~"></emptyPage>
</view>
</view>
</view>
</s-layout>
</template>
<script setup>
import sheep from '@/sheep';
import $share from '@/sheep/platform/share';
import {
onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import {
computed,
reactive
} from 'vue';
import _ from 'lodash';
const state = reactive({
pagination: {},
navList: ["周排行", "月排行"],
active: 0,
rankList: [],
page: 1,
limit: 20,
loadend: false,
loading: false,
loadTitle: '加载更多',
type: 'week',
position: 0,
});
function switchTap(index) {
state.active = index;
state.type = index ? 'month' : 'week';
state.page = 1;
// state.loadend = false;
state.rankList = [];
calculateTimes();
this.getBrokerageRankList();
getBrokerageRankNumber();
}
function getBrokerageRankList() {
// todo @芋艿:编码传参
sheep.$api.commission.getBrokerageRankList({
pageNo: state.page,
pageSize: state.limit,
'times[0]': state.times[0],
'times[1]': state.times[1],
}).then(res => {
console.log(res, '所有数据')
})
}
function getBrokerageRankNumber() {
sheep.$api.commission.getBrokerageRankNumber({
times: state.times.join(',')
}).then(res => {
state.position = res.data
})
}
function formatDate(date) {
return sheep.$helper.timeFormat(date, 'yyyy-mm-dd hh:MM:ss');
}
function calculateTimes() {
let times;
if (state.type === 'week') {
times = getWeekTimes();
} else {
times = getMonthTimes();
}
console.log(times)
state.times = [formatDate(times[0]), formatDate(times[1])]
}
onLoad(function() {
console.log('启动中');
calculateTimes();
getBrokerageRankList();
getBrokerageRankNumber()
})
// 此处可考虑抽离
/**
* 获得当前周的开始和结束时间
*/
function getWeekTimes() {
const today = new Date();
const dayOfWeek = today.getDay();
return [
new Date(today.getFullYear(), today.getMonth(), today.getDate() - dayOfWeek, 0, 0, 0),
new Date(today.getFullYear(), today.getMonth(), today.getDate() + (6 - dayOfWeek), 23, 59, 59)
]
}
/**
* 获得当前月的开始和结束时间
*/
function getMonthTimes() {
const today = new Date();
const year = today.getFullYear();
const month = today.getMonth();
const startDate = new Date(year, month, 1, 0, 0, 0);
const nextMonth = new Date(year, month + 1, 1);
const endDate = new Date(nextMonth.getTime() - 1);
return [startDate, endDate]
}
</script>
<style lang='scss' scoped>
.CommissionRank .header {
background: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wgARCAFYAu4DAREAAhEBAxEB/8QAHAABAAIDAQEBAAAAAAAAAAAAAAIDAQQFBwYI/8QAGwEBAAIDAQEAAAA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x4pxGJmFrVzau1+Xtb3N2N3fwavSvqdWNParhujHmI+i9fye96nm04r25aeYfIfYww3jab9zFq5M/Cx9DTybOLR3ufy7a47K1nWk4jBVe+nl2O7uc/V5eXxP6X7MAAAAAAAAAAAAAAAAAAACJFECExCYrmKpfZ+f5XpvkOKAAN3cw8W2/LXrs4sMojEzC0xXqvaq2XnbO3rZM/WjS67R2qYb4xyivV9Do8fk7+jzdj6T1vJ4HmOnr6meu1oZbY23Ar04WdPV0tjHitpScUnWskYKrZNTNn7m3z9Tl5fFfpfswAAAAAAAAAAAAAAAAAAAIkUQITEJiqYrLine truncated
width: 100%;
height: 344rpx;
background-size: 100% 100%;
}
.CommissionRank .header .rank {
font-size: 33rpx;
color: #fff;
position: absolute;
top: 160rpx;
left: 48rpx;
}
.CommissionRank .header .rank .num {
font-size: 51rpx;
font-weight: bold;
margin: 0 10rpx;
}
.CommissionRank .wrapper {
width: 710rpx;
background-color: #fff;
border-radius: 14rpx;
margin: -76rpx auto 0 auto;
}
.CommissionRank .wrapper .nav {
height: 99rpx;
border-bottom: 2.5rpx solid #f3f3f3;
font-size: 30rpx;
font-weight: bold;
color: #999;
line-height: 99rpx;
}
.CommissionRank .wrapper .nav .item.font-color {
border-bottom: 4rpx solid #e93323;
margin-top: -2rpx;
color: #e93323
}
.CommissionRank .wrapper .list {
padding: 0 30rpx;
}
.CommissionRank .wrapper .list .item {
border-bottom: 1px solid #f3f3f3;
height: 101rpx;
font-size: 28rpx;
}
.CommissionRank .wrapper .list .item .num {
color: #666;
width: 70rpx;
}
.CommissionRank .wrapper .list .item .num image {
width: 34rpx;
height: 40rpx;
display: block;
}
.CommissionRank .wrapper .list .item .picTxt {
width: 350rpx;
}
.CommissionRank .wrapper .list .item .picTxt .pictrue {
width: 68rpx;
height: 68rpx;
}
.CommissionRank .wrapper .list .item .picTxt .pictrue image {
width: 100%;
height: 100%;
display: block;
border-radius: 50%;
}
.CommissionRank .wrapper .list .item .picTxt .text {
width: 262rpx;
color: #333;
}
.CommissionRank .wrapper .list .item .people {
width: 175rpx;
text-align: right;
}
</style>
+157 -167
View File
@@ -1,184 +1,174 @@
<!-- 分销明细 -->
<template>
<view class="distribution-log-wrap">
<view class="header-box">
<image class="header-bg" :src="sheep.$url.static('/static/img/shop/commission/title2.png')" />
<view class="ss-flex header-title">
<view class="title">实时动态</view>
<text class="cicon-forward"></text>
</view>
</view>
<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-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"
: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>
</view>
<view class="log-text ss-ellipsis-1">{{ item.remark }}</view>
</view>
</view>
<text class="log-time">{{ dayjs(item.create_time).fromNow() }}</text>
</view>
</view>
<view class="distribution-log-wrap">
<view class="header-box">
<image class="header-bg" :src="sheep.$url.static('/static/img/shop/commission/title2.png')" />
<view class="ss-flex header-title">
<view class="title">实时动态</view>
<text class="cicon-forward"></text>
</view>
</view>
<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-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"
: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>
</view>
<view class="log-text ss-ellipsis-1">{{ item.title }} {{item.price/100}}元</view>
</view>
</view>
<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"
/>
</scroll-view>
</view>
<!-- 加载更多 -->
<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 _ from 'lodash';
import dayjs from 'dayjs';
import sheep from '@/sheep';
import {
computed,
reactive
} from 'vue';
import _ from 'lodash';
import dayjs from 'dayjs';
const state = reactive({
loadStatus: '',
pagination: {
data: [],
current_page: 1,
total: 1,
last_page: 1,
},
});
const state = reactive({
loadStatus: '',
pagination: {
data: [],
current_page: 1,
total: 1,
last_page: 1,
},
});
async function getLog(page = 1) {
const res = await sheep.$api.commission.log({
page,
});
if (res.error === 0) {
let list = _.concat(state.pagination.data, res.data.data);
state.pagination = {
...res.data,
data: list,
};
if (state.pagination.current_page < state.pagination.last_page) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
}
}
}
getLog();
async function getLog(page = 1) {
state.pagination.current_page = page
const res = await sheep.$api.commission.order({
page,
});
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.data.length < state.pagination.total) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
}
}
}
getLog();
// 加载更多
function loadmore() {
if (state.loadStatus !== 'noMore') {
getLog(state.pagination.current_page + 1);
}
}
// 加载更多
function loadmore() {
if (state.loadStatus !== 'noMore') {
getLog(state.pagination.current_page + 1);
}
}
</script>
<style lang="scss" scoped>
.distribution-log-wrap {
width: 690rpx;
margin: 0 auto;
margin-bottom: 20rpx;
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;
color: #ffffff;
line-height: 30rpx;
}
}
.log-scroll {
height: 600rpx;
background: #fdfae9;
padding: 10rpx 20rpx 0;
box-sizing: border-box;
border-radius: 0 0 12rpx 12rpx;
.distribution-log-wrap {
width: 690rpx;
margin: 0 auto;
margin-bottom: 20rpx;
border-radius: 12rpx;
z-index: 3;
position: relative;
.log-item-box {
margin-bottom: 20rpx;
.log-time {
// margin-left: 30rpx;
text-align: right;
font-size: 24rpx;
font-family: OPPOSANS;
font-weight: 400;
color: #c4c4c4;
}
}
.header-box {
width: 690rpx;
height: 76rpx;
position: relative;
.loadmore-wrap {
// line-height: 80rpx;
}
.header-bg {
width: 690rpx;
height: 76rpx;
}
.log-item {
// background: rgba(#ffffff, 0.2);
border-radius: 24rpx;
padding: 6rpx 20rpx 6rpx 12rpx;
.header-title {
position: absolute;
left: 20rpx;
top: 24rpx;
}
.log-img {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
margin-right: 10rpx;
}
.title {
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
line-height: 30rpx;
}
.log-text {
max-width: 480rpx;
font-size: 24rpx;
font-weight: 500;
color: #333333;
}
}
}
}
</style>
.cicon-forward {
font-size: 30rpx;
font-weight: 400;
color: #ffffff;
line-height: 30rpx;
}
}
.log-scroll {
height: 600rpx;
background: #fdfae9;
padding: 10rpx 20rpx 0;
box-sizing: border-box;
border-radius: 0 0 12rpx 12rpx;
.log-item-box {
margin-bottom: 20rpx;
.log-time {
// margin-left: 30rpx;
text-align: right;
font-size: 24rpx;
font-family: OPPOSANS;
font-weight: 400;
color: #c4c4c4;
}
}
.loadmore-wrap {
// line-height: 80rpx;
}
.log-item {
// background: rgba(#ffffff, 0.2);
border-radius: 24rpx;
padding: 6rpx 20rpx 6rpx 12rpx;
.log-img {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
margin-right: 10rpx;
}
.log-text {
max-width: 480rpx;
font-size: 24rpx;
font-weight: 500;
color: #333333;
}
}
}
}
</style>
+135 -124
View File
@@ -1,30 +1,22 @@
<!-- 分销商菜单栏 -->
<template>
<view class="menu-box ss-flex-col">
<view class="header-box">
<image class="header-bg" :src="sheep.$url.static('/static/img/shop/commission/title1.png')" />
<view class="ss-flex header-title">
<view class="title">功能专区</view>
<text class="cicon-forward"></text>
</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>{{ item.title }}</view>
</view>
</view>
<view class="menu-box ss-flex-col">
<view class="header-box">
<image class="header-bg" :src="sheep.$url.static('/static/img/shop/commission/title1.png')" />
<view class="ss-flex header-title">
<view class="title">功能专区</view>
<text class="cicon-forward"></text>
</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>{{ item.title }}</view>
</view>
</view>
<!-- <uni-grid :column="4" :showBorder="false" :highlight="false">
<!-- <uni-grid :column="4" :showBorder="false" :highlight="false">
<uni-grid-item
v-for="(item, index) in state.menuList"
:index="index"
@@ -41,113 +33,132 @@
</view>
</uni-grid-item>
</uni-grid> -->
</view>
</view>
</template>
<script setup>
import sheep from '@/sheep';
import { onLoad } from '@dcloudio/uni-app';
import { computed, reactive } from 'vue';
import sheep from '@/sheep';
import {
onLoad
} from '@dcloudio/uni-app';
import {
computed,
reactive
} from 'vue';
const state = reactive({
menuList: [
{
img: '/static/img/shop/commission/commission_icon1.png',
title: '我的团队',
path: '/pages/commission/team',
},
{
img: '/static/img/shop/commission/commission_icon2.png',
title: '佣金明细',
path: '/pages/user/wallet/commission',
},
{
img: '/static/img/shop/commission/commission_icon3.png',
title: '分销订单',
path: '/pages/commission/order',
},
{
img: '/static/img/shop/commission/commission_icon4.png',
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_icon7.png',
title: '邀请海报',
path: 'action:showShareModal',
},
{
img: '/static/img/shop/commission/commission_icon8.png',
title: '分享记录',
path: '/pages/commission/share-log',
},
],
});
const state = reactive({
menuList: [{
img: '/static/img/shop/commission/commission_icon1.png',
title: '我的团队',
path: '/pages/commission/team',
},
{
img: '/static/img/shop/commission/commission_icon2.png',
title: '佣金明细',
path: '/pages/user/wallet/commission',
},
{
img: '/static/img/shop/commission/commission_icon3.png',
title: '分销订单',
path: '/pages/commission/order',
},
{
img: '/static/img/shop/commission/commission_icon4.png',
title: '推广商品',
path: '/pages/commission/goods',
},
// {
// 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',
// },
],
});
</script>
<style lang="scss" scoped>
.menu-box {
margin: 0 auto;
width: 690rpx;
margin-bottom: 20rpx;
margin-top: 20rpx;
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;
color: #ffffff;
line-height: 30rpx;
}
}
.menu-box {
margin: 0 auto;
width: 690rpx;
margin-bottom: 20rpx;
margin-top: 20rpx;
border-radius: 12rpx;
z-index: 3;
position: relative;
}
.menu-list {
padding: 50rpx 0 10rpx 0;
background: #fdfae9;
border-radius: 0 0 12rpx 12rpx;
}
.item-box {
width: 25%;
margin-bottom: 40rpx;
}
.header-box {
width: 690rpx;
height: 76rpx;
position: relative;
.menu-icon {
width: 68rpx;
height: 68rpx;
background: #ffffff;
border-radius: 50%;
}
.header-bg {
width: 690rpx;
height: 76rpx;
}
.menu-title {
font-size: 26rpx;
font-weight: 500;
color: #ffffff;
}
</style>
.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;
color: #ffffff;
line-height: 30rpx;
}
}
.menu-list {
padding: 50rpx 0 10rpx 0;
background: #fdfae9;
border-radius: 0 0 12rpx 12rpx;
}
.item-box {
width: 25%;
margin-bottom: 40rpx;
}
.menu-icon {
width: 68rpx;
height: 68rpx;
background: #ffffff;
border-radius: 50%;
}
.menu-title {
font-size: 26rpx;
font-weight: 500;
color: #ffffff;
}
</style>
+56 -48
View File
@@ -1,61 +1,69 @@
<!-- 分销中心 -->
<template>
<s-layout navbar="inner" class="index-wrap" title="分销中心" :bgStyle="bgStyle" onShareAppMessage>
<!-- 分销商信息 -->
<commission-info />
<!-- 账户信息 -->
<account-info />
<!-- 菜单栏 -->
<commission-menu />
<!-- 分销记录 -->
<commission-log />
<!-- 弹框 -->
<commission-condition :error="state.error" :errorData="state.errorData" />
<s-layout navbar="inner" class="index-wrap" title="分销中心" :bgStyle="bgStyle" onShareAppMessage>
<!-- 分销商信息 -->
<commission-info />
<!-- 账户信息 -->
<account-info />
<!-- 菜单栏 -->
<commission-menu />
<!-- 分销记录 -->
<commission-log />
<!-- 弹框 -->
<commission-condition :error="state.error" :errorData="state.errorData" />
<!-- 权限 -->
<commission-auth :error="state.error" @getAgentInfo="getAgentInfo" />
</s-layout>
<!-- 权限 -->
<commission-auth :error="state.error" @getAgentInfo="getAgentInfo" />
</s-layout>
</template>
<script setup>
import sheep from '@/sheep';
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';
import commissionMenu from './components/commission-menu.vue';
import commissionAuth from './components/commission-auth.vue';
import commissionCondition from './components/commission-condition.vue';
import sheep from '@/sheep';
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';
import commissionMenu from './components/commission-menu.vue';
import commissionAuth from './components/commission-auth.vue';
import commissionCondition from './components/commission-condition.vue';
const state = reactive({
error: 0,
errorData: {},
config: {
background: '/storage/default/20220704/29ac76a3c9d0d983200d612e45a052ca.png',
},
});
const state = reactive({
error: 0,
errorData: {},
config: {
background: '/storage/default/20220704/29ac76a3c9d0d983200d612e45a052ca.png',
},
});
const agentInfo = computed(() => sheep.$store('user').agentInfo);
const agentInfo = computed(() => sheep.$store('user').agentInfo);
const bgStyle = {
color: '#F7D598',
};
const bgStyle = {
color: '#F7D598',
};
async function getAgentInfo() {
const { error, data } = await sheep.$store('user').getAgentInfo();
if (error !== 0) {
state.error = error;
state.errorData = data;
}
}
onShow(() => {
getAgentInfo();
});
async function getAgentInfo() {
const {
error,
data
} = await sheep.$store('user').getAgentInfo();
if (error !== 0) {
state.error = error;
state.errorData = data;
}
}
onShow(() => {
getAgentInfo();
});
</script>
<style lang="scss" scoped>
:deep(.page-main) {
background-size: 100% 100% !important;
}
</style>
:deep(.page-main) {
background-size: 100% 100% !important;
}
</style>
+34 -28
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();
});
+298
View File
@@ -0,0 +1,298 @@
<template>
<s-layout title="推广人排行榜">
<view class="PromoterRank" style='backgroundColor:red'>
<view class="redBg bg-color">
<view class="header">
<view class="nav acea-row row-center-wrapper" style='display:flex'>
<view class="item" :class="state.active === index ? 'font-color' : ''"
v-for="(item, index) in state.navList" :key="index" @click="switchTap(index)">
{{ item }}
</view>
</view>
<!-- top3 排名 -->
<view class="rank acea-row row-bottom row-around">
<view class="item" v-show="state.Two.id">
<view class="pictrue">
<image :src="state.Two.avatar"></image>
</view>
<view class="name line1">{{state.Two.nickname}}</view>
<view class="num">{{ state.Two.brokerageUserCount }}人</view>
</view>
<view class="item" v-show="state.One.id">
<view class="pictrue">
<image :src="state.One.avatar"></image>
</view>
<view class="name line1">{{state.One.nickname}}</view>
<view class="num">{{ state.One.brokerageUserCount }}人</view>
</view>
<view class="item" v-show="state.Three.id">
<view class="pictrue">
<image :src="state.Three.avatar"></image>
</view>
<view class="name line1">{{state.Three.nickname}}</view>
<view class="num">{{ state.Three.brokerageUserCount }}人</view>
</view>
</view>
</view>
</view>
<!-- 其它排名 -->
<view class="list" v-if="state.rankList.length">
<view class="item acea-row row-between-wrapper" v-for="(item,index) in state.rankList" :key="index">
<view class="num">{{ index + 4 }}</view>
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.avatar"></image>
</view>
<view class="text line1">{{item.nickname}}</view>
</view>
<view class="people font-color">{{ item.brokerageUserCount }}人</view>
</view>
</view>
</view>
</s-layout>
</template>
<script setup>
import sheep from '@/sheep';
import $share from '@/sheep/platform/share';
import {
onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import {
computed,
reactive
} from 'vue';
import _ from 'lodash';
const state = reactive({
navList: ["周榜", "月榜"],
active: 0,
page: 1,
limit: 10,
type: 'week',
loading: false,
loadend: false,
rankList: [],
times: [],
One: {}, // 排名第一
Two: {}, // 排名第二
Three: {}, // 排名第三
});
function switchTap(index) {
if (state.active === index) {
return;
}
state.active = index;
// week
state.type = index ? 'month' : 'week';
// this.page = 1;
// this.loadend = false;
// this.$set(this, 'rankList', []);
// this.Two = {};
// this.One = {};
// this.Three = {};
calculateTimes();
getRanklist();
}
function getRanklist() {
// todo @芋艿:编码传参
sheep.$api.commission.getBrokerageRankNumber({
pageNo: state.page,
pageSize: state.limit,
'times[0]': state.times[0],
'times[1]': state.times[1],
}).then(res => {
console.log(res)
})
}
function calculateTimes() {
let times;
if (state.type === 'week') {
times = getWeekTimes();
} else {
times = getMonthTimes();
}
state.times = [formatDate(times[0]), formatDate(times[1])]
}
function formatDate(date) {
return sheep.$helper.timeFormat(date, 'yyyy-mm-dd hh:MM:ss');
}
// 此处可考虑抽离
/**
* 获得当前周的开始和结束时间
*/
function getWeekTimes() {
const today = new Date();
const dayOfWeek = today.getDay();
return [
new Date(today.getFullYear(), today.getMonth(), today.getDate() - dayOfWeek, 0, 0, 0),
new Date(today.getFullYear(), today.getMonth(), today.getDate() + (6 - dayOfWeek), 23, 59, 59)
]
}
/**
* 获得当前月的开始和结束时间
*/
function getMonthTimes() {
const today = new Date();
const year = today.getFullYear();
const month = today.getMonth();
const startDate = new Date(year, month, 1, 0, 0, 0);
const nextMonth = new Date(year, month + 1, 1);
const endDate = new Date(nextMonth.getTime() - 1);
return [startDate, endDate]
}
</script>
<style lang='scss' scoped>
.PromoterRank .redBg {
padding: 45rpx 0 30rpx 0;
}
.PromoterRank .header {
background: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwkHBgoJCAkLCwoMDxkQDw4ODx4WFxIZJCAmJSMgIyIoLTkwKCo2KyIjMkQyNjs9QEBAJjBGS0U+Sjk/QD3/2wBDAQsLCw8NDx0QEB09KSMpPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT3/wgARCAHMAu4DAREAAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAAECAwQF/8QAGQEBAQEBAQEAAAAAAAAAAAAAAAECAwUH/9oADAMBAAIQAxAAAAD5nh/QwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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HSlL+RWVmTMjJFX29G98kZoyW6ei8BfC16PZ8/0Nt6JtCLine truncated
width: 100%;
height: 460rpx;
background-size: 100% 100%;
}
.PromoterRank .header .nav {
width: 450rpx;
height: 66rpx;
border: 1px solid #fff;
border-radius: 33rpx;
font-size: 30rpx;
color: #fff;
margin: 0 auto;
}
.PromoterRank .header .nav .item {
width: 223rpx;
height: 100%;
text-align: center;
line-height: 60rpx;
}
.PromoterRank .header .nav .item.font-color:nth-of-type(1) {
background-color: #fff;
border-radius: 33rpx 0 0 33rpx;
color: red
}
.PromoterRank .header .nav .item.font-color:nth-of-type(2) {
background-color: #fff;
border-radius: 0 33rpx 33rpx 0;
color: red
}
.PromoterRank .header .rank {
padding: 0 20rpx;
margin-top: 30rpx;
}
.PromoterRank .header .rank .item .pictrue {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIgAAACxCAYAAAAfz/U3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYj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P3E3vefILmCBeMY0QR0qyQ9D5ccsLQgU9RgptBWE2Q4B3SrSZxNsSPIGeY/uMLine truncated
background-size: 100% 100%;
width: 136rpx;
height: 177rpx;
position: relative;
margin: 0 auto;
}
.PromoterRank .header .rank .item .pictrue image {
position: absolute;
width: 130rpx;
height: 130rpx;
display: block;
bottom: 2rpx;
border-radius: 50%;
left: 50%;
margin-left: -65rpx;
}
.PromoterRank .header .rank .item:nth-of-type(2) .pictrue {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAADNCAYAAABNahkfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoxNGUyNzRkOS00YmQ4LTUzNGItYWZkZS02ZTlmMTgxYmZlYWUiIHhtcE1NOkRvY3VtZW50SUQ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iAaeoKrMQJc/eEofw/c+Ud0rDN9r7PlSXvtyBQM3P4x/We8Qw3YiqXWeyVU6jiE7lWjA8Qq6nBd/UcrGKxt+MdH2Vxm+P3Hbz9WyBPRiNob2LwvhXCqq0v+lpMcbcaH0P4wr3LO4XTaRCkKNq7jv/oxq8yU/LAebBc1mT7dJgLODhvoPy90QOj44IWgV3C6rnM69yzFUkNr5GVHNY1zdvpEMPGyhgcjoB8IyABwO4OJRRMM+SMkiWcuPIBp6nhrKEKkhlhpu5jYsS3YnBtIvYug+E+DiUVSd9yT0an25jTb8Iq46Jwhk1qp2NVE1f19b1ia6CyFaMxm6BYUJXDyKUdO5lGjVeHE50bBvc4dgSg73OAPs2da9SLT5N9xtSLgj1wO6bddYOMDFo4iyxcDkIY73VExmr3ZJejMAhSzMaFTfz+27JYnuQkTOVIZuXf4DF4+eRmrnS/uALgAbMUu110TpC+26qvkKQLswV419fhfmL3Dx6BV6yMM+7F8+iWjkVfzuQAHGC7XWEW3iVkvDcsc72K5m6O7KL+Di0SI93HGdPRUl3Fa7kLsNp0tbzY+23baFqlPR5niYjlrfG8Bkv//AqV2I/o9tmr0KrSQadQNR2f7Chp9q/pDoi5sTzdHiZJ8LGLqduQuc6oniD7Fvl4qpm73nSBUaZBX7BVc0TY5hclifey5D15R7wMWjWFuJfTXsJw4POJHba1dyCnoLCIHWsLu5XcdNtu0vO92BVV5nMnQ7cgc45dl+b4eN22iV5xINnSHttWy262oeJap9nBymxl7S0DWGHzjVZnvKXo0yYCMuIxp0mpR5GITORNW9TtChep3qdZvOW+DiUQx38FfHtvkzd1T3mq2qUlF4tJ1r0I2Y8LF2UBFxMoOh82xvYK9Xbf3UEbZR1wtsYdSAk1TZ2FFAWf4snB4uHsV5T/Os1ehI9mwDLine truncated
width: 156rpx;
height: 205rpx;
}
.PromoterRank .header .rank .item:nth-of-type(2) .pictrue image {
width: 150rpx;
height: 150rpx;
margin-left: -75rpx;
}
.PromoterRank .header .rank .item:nth-of-type(3) .pictrue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njdCC5gn1L9Cv9sdj0mXE9Uda0IWjkZCM7tWkW08w2eIofc/AglDnBiT9uHIF43ajiwsn96SAd0GvunpWNIIXDOf5Bo63PhHFlkv29gkuzNfIJ43VhWuEI3pMBqTJ7PsxNX5s9MrJzx7PYS1XjYmuhC86g7WcAkeSdzCeJ1Y1sDlPvJhTPFI4hm3kNUdq4iQTQ4vodo4xPsm9QHfwPWLGaS/DqzCOJ1wyT8mMRbCmRUziSasSR9o5/pCkRlN7ML1xCyjggb0fyAidKX/gQR5HiaxNrawFvxkOImmngDpdH7cjJtzCGqe10MOaTTGyz1XWaTxFyCeN2o1kGaeqHsb/AIM+NOkTtRSByH1rE1eTqUX4LC6VuYJD3pRxBhOX5LwRvNYyi58EHnBL2SBQTX1j8WqibldxpJ+tKHIOGGlYJBRP/wENHAcUqhVuDkfqIPHxF1KRYNN2YtnHpURw5kWy+qVuSwEuhb9LE+s71Y00kaWBCvGw/zC6kN5XwX/4ioZJRSYjKAqrYPlhJ16pY538lW5JnUEcTrxs44WFWWI/kcynKkZrhZWx3sk8CLvZJJsib5Q4wIn78ikQPR0dnfVeRI1XCDyUC2VFKDAOVK1tW5ySWI140qYLzLtVyKc0xfLFL1CqkBZorQgRxnKvfpSugsaRYEO+PI76+fNI9o9CVKSakGdICApAwkSZ9MDkFEPYe86x/CLine truncated
}
.PromoterRank .header .rank .item:nth-of-type(3) .pictrue image {
margin-left: -64rpx;
}
.PromoterRank .header .rank .item .name {
font-size: 30rpx;
color: #fff;
margin-top: 22rpx;
text-align: center;
width: 170rpx;
}
.PromoterRank .header .rank .item .num {
font-size: 30rpx;
color: #fff;
text-align: center;
}
.PromoterRank .list {
width: 710rpx;
background-color: #fff;
border-radius: 20rpx;
margin: -60rpx auto 0 auto;
padding: 0 30rpx;
}
.PromoterRank .list .item {
border-bottom: 1px solid #f3f3f3;
height: 101rpx;
font-size: 28rpx;
}
.PromoterRank .list .item .num {
color: #666;
width: 70rpx;
}
.PromoterRank .list .item .picTxt {
width: 350rpx;
}
.PromoterRank .list .item .picTxt .pictrue {
width: 68rpx;
height: 68rpx;
}
.PromoterRank .list .item .picTxt .pictrue image {
width: 100%;
height: 100%;
display: block;
border-radius: 50%;
}
.PromoterRank .list .item .picTxt .text {
width: 262rpx;
color: #333;
}
.PromoterRank .list .item .people {
width: 175rpx;
text-align: right;
}
</style>
+238 -229
View File
@@ -1,257 +1,266 @@
<!-- 页面 -->
<template>
<s-layout title="我的团队" :class="state.scrollTop ? 'team-wrap' : ''" navbar="inner">
<view
class="header-box"
:style="[
<s-layout title="我的团队" :class="state.scrollTop ? 'team-wrap' : ''" navbar="inner">
<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>
{{ userInfo.parent_user.nickname }}
</view>
<!-- 团队数据总览 -->
<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">{{ agentInfo.child_user_count_all || 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>
<view class="ss-flex-1">
<view class="item-title">二级成员</view>
<view class="category-num">{{ agentInfo.child_user_count_2 || 0 }}</view>
</view>
</view>
</view>
<view class="data-card">
<view class="total-item">
<view class="item-title">团队分销商人数(人)</view>
<view class="total-num">{{ agentInfo.child_agent_count_all || 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_agent_count_1 || 0 }}</view>
</view>
<view class="ss-flex-1">
<view class="item-title">二级分销商</view>
<view class="category-num">{{ agentInfo.child_agent_count_2 || 0 }}</view>
</view>
</view>
</view>
</view>
</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)"
>
<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"
>
</image>
<text class="tag-title">{{ item.agent.level_info.name }}</text>
</view>
<text class="time-text">{{ item.create_time }}</text>
</view>
</uni-list-chat>
</uni-list>
</view>
<s-empty v-if="state.pagination.total === 0" icon="/static/data-empty.png" text="暂无团队信息">
</s-empty>
</s-layout>
]">
<!-- 推荐人 -->
<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>
{{ userInfo.parent_user.nickname }}
</view>
<!-- 团队数据总览 -->
<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.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">{{ state.getSummary.firstBrokerageUserCount || 0 }}</view>
</view>
<view class="ss-flex-1">
<view class="item-title">二级成员</view>
<view class="category-num">{{ state.getSummary.secondBrokerageUserCount || 0 }}</view>
</view>
</view>
</view>
<view class="data-card">
<view class="total-item">
<view class="item-title">团队分销商人数(人)</view>
<view class="total-num">{{ agentInfo.child_agent_count_all || 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_agent_count_1 || 0 }}</view>
</view>
<view class="ss-flex-1">
<view class="item-title">二级分销商</view>
<view class="category-num">{{ agentInfo.child_agent_count_2 || 0 }}</view>
</view>
</view>
</view>
</view>
</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)">
<view class="chat-custom-right">
<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.nickname }}</text>
</view>
<text
class="time-text">{{ sheep.$helper.timeFormat(item.brokerageTime, 'yyyy-mm-dd hh:MM:ss') }}</text>
</view>
</uni-list-chat>
</uni-list>
</view>
<s-empty v-if="state.pagination.total === 0" icon="/static/data-empty.png" text="暂无团队信息">
</s-empty>
</s-layout>
</template>
<script setup>
import sheep from '@/sheep';
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
import { computed, reactive } from 'vue';
import _ from 'lodash';
import { onPageScroll } from '@dcloudio/uni-app';
import sheep from '@/sheep';
import {
onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import {
computed,
reactive
} from 'vue';
import _ from 'lodash';
import {
onPageScroll
} from '@dcloudio/uni-app';
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
const agentInfo = computed(() => sheep.$store('user').agentInfo);
const userInfo = computed(() => sheep.$store('user').userInfo);
const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png');
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
const agentInfo = computed(() => sheep.$store('user').agentInfo);
const userInfo = computed(() => sheep.$store('user').userInfo);
const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png');
onPageScroll((e) => {
if (e.scrollTop > 100) {
state.scrollTop = false;
} else {
state.scrollTop = true;
}
});
const state = reactive({
pagination: {
data: [],
current_page: 1,
total: 1,
last_page: 1,
},
loadStatus: '',
});
onPageScroll((e) => {
if (e.scrollTop > 100) {
state.scrollTop = false;
} else {
state.scrollTop = true;
}
});
const state = reactive({
getSummary: {},
pagination: {
data: [],
current_page: 1,
total: 1,
last_page: 1,
},
loadStatus: '',
});
function filterUserNum(num) {
if (_.isNil(num)) {
return '';
}
return `下级团队${num}人`;
}
function filterUserNum(num) {
if (_.isNil(num)) {
return '';
}
return `下级团队${num}人`;
}
async function getTeamList(page = 1, list_rows = 8) {
state.loadStatus = 'loading';
let res = await sheep.$api.commission.team({
list_rows,
page,
});
if (res.error === 0) {
let orderList = _.concat(state.pagination.data, res.data.data);
state.pagination = {
...res.data,
data: orderList,
};
if (state.pagination.current_page < state.pagination.last_page) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
}
}
}
async function getTeamList(page = 1, list_rows = 8) {
state.loadStatus = 'loading';
// nickname: this.nickname,
onLoad(async () => {
getTeamList();
});
// 加载更多
function loadmore() {
if (state.loadStatus !== 'noMore') {
getTeamList(state.pagination.current_page + 1);
}
}
let res = await sheep.$api.commission.team({
pageSize: list_rows,
pageNo: page,
level: '1',
'sortingField.order': 'desc',
'sortingField.field': 'userCount',
nickname: ''
});
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.data.length < state.pagination.total) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
}
}
}
// 上拉加载更多
onReachBottom(() => {
loadmore();
});
onLoad(async () => {
getTeamList();
let res = await sheep.$api.commission.getSummary();
state.getSummary = res.data;
});
// 加载更多
function loadmore() {
if (state.loadStatus !== 'noMore') {
getTeamList(state.pagination.current_page + 1);
}
}
// 上拉加载更多
onReachBottom(() => {
loadmore();
});
</script>
<style lang="scss" scoped>
.header-box {
box-sizing: border-box;
padding: 0 20rpx 20rpx 20rpx;
width: 750rpx;
z-index: 3;
position: relative;
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 {
width: 305rpx;
background: #ffffff;
border-radius: 20rpx;
padding: 20rpx;
.header-box {
box-sizing: border-box;
padding: 0 20rpx 20rpx 20rpx;
width: 750rpx;
z-index: 3;
position: relative;
background: v-bind(headerBg) no-repeat,
linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
background-size: 750rpx 100%;
.item-title {
font-size: 22rpx;
font-weight: 500;
color: #999999;
line-height: 30rpx;
margin-bottom: 10rpx;
}
// 团队信息总览
.team-data-box {
.data-card {
width: 305rpx;
background: #ffffff;
border-radius: 20rpx;
padding: 20rpx;
.total-item {
margin-bottom: 30rpx;
}
.item-title {
font-size: 22rpx;
font-weight: 500;
color: #999999;
line-height: 30rpx;
margin-bottom: 10rpx;
}
.total-num {
font-size: 38rpx;
font-weight: 500;
color: #333333;
font-family: OPPOSANS;
}
.total-item {
margin-bottom: 30rpx;
}
.category-num {
font-size: 26rpx;
font-weight: 500;
color: #333333;
font-family: OPPOSANS;
}
}
}
}
.list-box {
z-index: 3;
position: relative;
}
.chat-custom-right {
.time-text {
font-size: 22rpx;
font-weight: 400;
color: #999999;
}
.total-num {
font-size: 38rpx;
font-weight: 500;
color: #333333;
font-family: OPPOSANS;
}
.tag-box {
background: rgba(0, 0, 0, 0.2);
border-radius: 21rpx;
line-height: 30rpx;
padding: 5rpx 10rpx;
width: 140rpx;
.category-num {
font-size: 26rpx;
font-weight: 500;
color: #333333;
font-family: OPPOSANS;
}
}
}
}
.tag-img {
width: 34rpx;
height: 34rpx;
margin-right: 6rpx;
border-radius: 50%;
}
.list-box {
z-index: 3;
position: relative;
}
.tag-title {
font-size: 18rpx;
font-weight: 500;
color: rgba(255, 255, 255, 1);
line-height: 20rpx;
}
}
}
.chat-custom-right {
.time-text {
font-size: 22rpx;
font-weight: 400;
color: #999999;
}
// 推荐人
.referrer-box {
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
padding: 20rpx;
.tag-box {
background: rgba(0, 0, 0, 0.2);
border-radius: 21rpx;
line-height: 30rpx;
padding: 5rpx 10rpx;
width: 140rpx;
.referrer-avatar {
width: 34rpx;
height: 34rpx;
border-radius: 50%;
}
}
</style>
.tag-img {
width: 34rpx;
height: 34rpx;
margin-right: 6rpx;
border-radius: 50%;
}
.tag-title {
font-size: 18rpx;
font-weight: 500;
color: rgba(255, 255, 255, 1);
line-height: 20rpx;
}
}
}
// 推荐人
.referrer-box {
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
padding: 20rpx;
.referrer-avatar {
width: 34rpx;
height: 34rpx;
border-radius: 50%;
}
}
</style>
+153 -156
View File
@@ -1,178 +1,175 @@
<template>
<su-popup :show="show" class="ss-checkout-counter-wrap" @close="hideModal">
<view class="ss-modal-box bg-white ss-flex-col">
<view class="modal-header ss-flex-col ss-col-left">
<text class="modal-title ss-m-b-20">选择提现方式</text>
</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"
>
<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>
<su-popup :show="show" class="ss-checkout-counter-wrap" @close="hideModal">
<view class="ss-modal-box bg-white ss-flex-col">
<view class="modal-header ss-flex-col ss-col-left">
<text class="modal-title ss-m-b-20">选择提现方式</text>
</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">
<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)"
/>
</label>
</radio-group>
</view>
<view class="modal-footer ss-flex ss-row-center ss-col-center">
<button class="ss-reset-button save-btn" @tap="onConfirm">确定</button>
</view>
</view>
</su-popup>
<radio :value="item.value" color="var(--ui-BG-Main)"
:checked="item.value === state.currentValue" />
<!-- :disabled="!methods.includes(item.value)" -->
</label>
</radio-group>
</view>
<view class="modal-footer ss-flex ss-row-center ss-col-center">
<button class="ss-reset-button save-btn" @tap="onConfirm">确定</button>
</view>
</view>
</su-popup>
</template>
<script setup>
import { reactive, onBeforeMount, nextTick } from 'vue';
import sheep from '@/sheep';
import {
reactive,
onBeforeMount,
nextTick
} from 'vue';
import sheep from '@/sheep';
const props = defineProps({
modelValue: {
type: Object,
default() {},
},
show: {
type: Boolean,
default: false,
},
methods: {
type: Array,
default: [],
},
});
const emits = defineEmits(['update:modelValue', 'change', 'close']);
const state = reactive({
currentValue: '',
});
const typeList = [
{
icon: '/static/img/shop/pay/wechat.png',
title: '微信零钱',
value: 'wechat',
},
{
icon: '/static/img/shop/pay/alipay.png',
title: '支付宝账户',
value: 'alipay',
},
{
icon: '/static/img/shop/pay/bank.png',
title: '银行卡转账',
value: 'bank',
},
];
const getWalletAccountInfo = async () => {
return new Promise(async (resolve, reject) => {
let res = await sheep.$api.user.account.info({
type: state.currentValue,
});
if (res.error === 0) {
if (!props.methods.includes(res.data.type)) {
return;
}
state.currentValue = res.data.type;
emits('update:modelValue', {
type: res.data.type,
account_header: res.data.account_header,
account_name: res.data.account_name,
account_no: res.data.account_no,
});
} else {
emits('update:modelValue', {
type: state.currentValue,
});
}
resolve();
});
};
const props = defineProps({
modelValue: {
type: Object,
default () {},
},
show: {
type: Boolean,
default: false,
},
methods: {
type: Array,
default: [],
},
});
const emits = defineEmits(['update:modelValue', 'change', 'close']);
const state = reactive({
currentValue: '0',
});
const typeList = [{
// icon: '/static/img/shop/pay/wechat.png',
title: '工商银行',
value: '0',
},
{
// icon: '/static/img/shop/pay/alipay.png',
title: '建设银行',
value: '1',
},
{
// icon: '/static/img/shop/pay/bank.png',
title: '农业',
value: '2',
},
];
const getWalletAccountInfo = async () => {
return new Promise(async (resolve, reject) => {
let res = await sheep.$api.user.account.info({
type: state.currentValue,
});
if (res.error === 0) {
if (!props.methods.includes(res.data.type)) {
return;
}
state.currentValue = res.data.type;
emits('update:modelValue', {
type: res.data.type,
account_header: res.data.account_header,
account_name: res.data.account_name,
account_no: res.data.account_no,
});
} else {
emits('update:modelValue', {
type: state.currentValue,
});
}
resolve();
});
};
function onChange(e) {
state.currentValue = e.detail.value;
}
function onChange(e) {
state.currentValue = e.detail.value;
}
const onConfirm = async () => {
if (state.currentValue === '') {
sheep.$helper.toast('请选择提现方式');
return;
}
await getWalletAccountInfo();
emits('close');
};
const onConfirm = async () => {
if (state.currentValue === '') {
sheep.$helper.toast('请选择提现方式');
return;
}
await getWalletAccountInfo();
emits('close');
};
const hideModal = () => {
emits('close');
};
const hideModal = () => {
emits('close');
};
onBeforeMount(async () => {
await getWalletAccountInfo();
});
onBeforeMount(async () => {
await getWalletAccountInfo();
});
</script>
<style lang="scss" scoped>
.ss-modal-box {
border-radius: 30rpx 30rpx 0 0;
max-height: 1000rpx;
.ss-modal-box {
border-radius: 30rpx 30rpx 0 0;
max-height: 1000rpx;
.modal-header {
position: relative;
padding: 60rpx 40rpx 40rpx;
.modal-header {
position: relative;
padding: 60rpx 40rpx 40rpx;
.modal-title {
font-size: 32rpx;
font-weight: bold;
}
.modal-title {
font-size: 32rpx;
font-weight: bold;
}
.close-icon {
position: absolute;
top: 10rpx;
right: 20rpx;
font-size: 46rpx;
opacity: 0.2;
}
}
.close-icon {
position: absolute;
top: 10rpx;
right: 20rpx;
font-size: 46rpx;
opacity: 0.2;
}
}
.modal-content {
overflow-y: auto;
.modal-content {
overflow-y: auto;
.container-list {
height: 96rpx;
border-bottom: 2rpx solid rgba(#dfdfdf, 0.5);
font-size: 28rpx;
font-weight: 500;
color: #333333;
.container-list {
height: 96rpx;
border-bottom: 2rpx solid rgba(#dfdfdf, 0.5);
font-size: 28rpx;
font-weight: 500;
color: #333333;
.container-icon {
width: 36rpx;
height: 36rpx;
}
}
}
.container-icon {
width: 36rpx;
height: 36rpx;
}
}
}
.modal-footer {
height: 120rpx;
.modal-footer {
height: 120rpx;
.save-btn {
width: 710rpx;
height: 80rpx;
border-radius: 40rpx;
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
color: $white;
}
}
}
.save-btn {
width: 710rpx;
height: 80rpx;
border-radius: 40rpx;
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
color: $white;
}
}
}
image {
width: 100%;
height: 100%;
}
</style>
image {
width: 100%;
height: 100%;
}
</style>
+357 -329
View File
@@ -1,380 +1,408 @@
<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="[
<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="[
{
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>
<!-- 提现输入卡片-->
<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="请输入提现金额"
/>
</view>
<view class="bank-box ss-flex ss-col-center ss-row-between ss-m-b-30">
<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 === '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>
<text class="cicon-forward"></text>
</view>
</view>
<view class="bind-box ss-flex ss-col-center ss-row-between" v-if="state.accountInfo.type">
<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>
<button class="add-btn ss-reset-button" @tap="onAccountEdit(true)">
{{ state.accountInfo.account_name ? '修改' : '添加' }}
</button>
</view>
<button class="ss-reset-button save-btn ui-BG-Main-Gradient ui-Shadow-Main" @tap="onConfirm">
确认提现
</button>
</view>
]">
<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> -->
<!-- 提现输入卡片-->
<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="请输入提现金额" />
</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="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> -->
<text class="cicon-forward"></text>
</view>
</view>
<view class="bind-box ss-flex ss-col-center ss-row-between" v-if="state.accountInfo.type">
<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>
<button class="add-btn ss-reset-button" @tap="onAccountEdit(true)">
{{ state.accountInfo.account_name ? '修改' : '添加' }}
</button> -->
</view>
<button class="ss-reset-button save-btn ui-BG-Main-Gradient ui-Shadow-Main" @tap="onConfirm">
确认提现
</button>
</view>
<!-- 提现说明 -->
<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">
{{ index + 1 }}.{{ rule }}
</view>
</view>
<!-- 提现说明 -->
<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">
{{ 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-info-modal
v-if="state.accountInfo.type"
v-model="state.accountInfo"
:show="state.accountEdit"
@close="onAccountEdit(false)"
round="10"
/>
</s-layout>
<!-- 选择提现账户 -->
<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" />
</s-layout>
</template>
<script setup>
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';
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 = '';
if (rules.min_amount > 0) {
str1 += `最少 ${rules.min_amount}元; `;
}
if (rules.max_amount > 0) {
str1 += `最多 ${rules.max_amount}元;`;
}
if (str1 !== '') {
list.push('单次提现金额 ' + str1);
}
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';
const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png');
onPageScroll(() => {});
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
if (rules.max_num > 0) {
list.push(`每${rules.num_unit === 'day' ? '天' : '月'}最多可提现 ${rules.max_num} 次;`);
}
function filterRules(rules) {
let list = [];
let str1 = '';
if (rules.min_amount > 0) {
str1 += `最少 ${rules.min_amount}元; `;
}
if (rules.max_amount > 0) {
str1 += `最多 ${rules.max_amount}元;`;
}
if (str1 !== '') {
list.push('单次提现金额 ' + str1);
}
if (rules.charge_rate_format > 0) {
list.push(`每次收取提现手续费 ${rules.charge_rate_format}%;`);
}
list.push(
`提现申请后将${rules.auto_arrival ? '自动' : '审核后'}到账, 到账结果请查收对应渠道服务通知;`,
);
list.push('如有疑问请及时联系客服.');
if (rules.max_num > 0) {
list.push(`每${rules.num_unit === 'day' ? '天' : '月'}最多可提现 ${rules.max_num} 次;`);
}
return list;
}
if (rules.charge_rate_format > 0) {
list.push(`每次收取提现手续费 ${rules.charge_rate_format}%;`);
}
list.push(
`提现申请后将${rules.auto_arrival ? '自动' : '审核后'}到账, 到账结果请查收对应渠道服务通知;`,
);
list.push('如有疑问请及时联系客服.');
const userStore = sheep.$store('user');
const userInfo = computed(() => userStore.userInfo);
const state = reactive({
amount: '',
type: '',
accountInfo: {},
accountSelect: false,
accountEdit: false,
rules: {
min_amount: 0,
max_amount: 0,
max_num: 0,
num_unit: 0,
charge_rate_format: 0,
charge_rate: 0,
methods: [],
},
rulesList: [],
});
return list;
}
const onAccountEdit = (e) => {
state.accountEdit = e;
};
const userStore = sheep.$store('user');
const userInfo = computed(() => userStore.userInfo);
const state = reactive({
userGet: {},
accountNo: '',
name: '',
amount: '',
type: '',
accountInfo: {},
accountSelect: false,
accountEdit: false,
rules: {
min_amount: 0,
max_amount: 0,
max_num: 0,
num_unit: 0,
charge_rate_format: 0,
charge_rate: 0,
methods: [],
},
rulesList: [],
});
const onAccountSelect = (e) => {
state.accountSelect = e;
};
const onAccountEdit = (e) => {
state.accountEdit = e;
};
const onConfirm = async () => {
let payload = {
money: state.amount,
...state.accountInfo,
};
const onAccountSelect = (e) => {
state.accountSelect = e;
};
if (payload.money > userInfo.commission || payload.money <= 0) {
sheep.$helper.toast('请输入正确的提现金额');
return;
}
const onConfirm = async () => {
let payload = {
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.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) {
sheep.$platform.useProvider('wechat').bind();
}
if (error === 0) {
userStore.getInfo();
uni.showModal({
title: '操作成功',
content: '您的提现申请已成功提交',
cancelText: '继续提现',
confirmText: '查看记录',
success: function (res) {
res.confirm && sheep.$router.go('/pages/pay/withdraw-log');
},
});
}
};
let {
code,
msg,
data
} = await sheep.$api.pay.withdraw.apply(payload);
if (code === -1) {
sheep.$platform.useProvider('wechat').bind();
}
if (code === 0) {
userStore.getInfo();
uni.showModal({
title: '操作成功',
content: '您的提现申请已成功提交',
cancelText: '继续提现',
confirmText: '查看记录',
success: function(res) {
res.confirm && sheep.$router.go('/pages/pay/withdraw-log');
},
});
}
};
async function getWithdrawRules() {
let { error, data } = await sheep.$api.pay.withdraw.rules();
if (error === 0) {
state.rules = data;
state.rulesList = filterRules(state.rules);
}
}
async function getWithdrawRules() {
let {
error,
data
} = await sheep.$api.pay.withdraw.rules();
if (error === 0) {
state.rules = data;
state.rulesList = filterRules(state.rules);
}
}
onBeforeMount(() => {
getWithdrawRules();
});
onBeforeMount(async () => {
getWithdrawRules();
let res = await sheep.$api.pay.withdraw.userGet();
state.userGet = res.data
});
</script>
<style lang="scss" scoped>
:deep() {
.uni-input-input {
font-family: OPPOSANS !important;
}
}
:deep() {
.uni-input-input {
font-family: OPPOSANS !important;
}
}
.wallet-num-box {
padding: 0 40rpx 80rpx;
background: var(--ui-BG-Main) v-bind(headerBg) center/750rpx 100% no-repeat;
border-radius: 0 0 5% 5%;
.wallet-num-box {
padding: 0 40rpx 80rpx;
background: var(--ui-BG-Main) v-bind(headerBg) center/750rpx 100% no-repeat;
border-radius: 0 0 5% 5%;
.num-title {
font-size: 26rpx;
font-weight: 500;
color: $white;
margin-bottom: 20rpx;
}
.num-title {
font-size: 26rpx;
font-weight: 500;
color: $white;
margin-bottom: 20rpx;
}
.wallet-num {
font-size: 60rpx;
font-weight: 500;
color: $white;
font-family: OPPOSANS;
}
.wallet-num {
font-size: 60rpx;
font-weight: 500;
color: $white;
font-family: OPPOSANS;
}
.log-btn {
width: 170rpx;
height: 60rpx;
line-height: 60rpx;
border: 1rpx solid $white;
border-radius: 30rpx;
padding: 0;
font-size: 26rpx;
font-weight: 500;
color: $white;
}
}
.log-btn {
width: 170rpx;
height: 60rpx;
line-height: 60rpx;
border: 1rpx solid $white;
border-radius: 30rpx;
padding: 0;
font-size: 26rpx;
font-weight: 500;
color: $white;
}
}
// 提现输入卡片
.draw-card {
background-color: $white;
border-radius: 20rpx;
width: 690rpx;
min-height: 560rpx;
margin: -60rpx 30rpx 30rpx 30rpx;
padding: 30rpx;
position: relative;
z-index: 3;
box-sizing: border-box;
// 提现输入卡片
.draw-card {
background-color: $white;
border-radius: 20rpx;
width: 690rpx;
min-height: 560rpx;
margin: -60rpx 30rpx 30rpx 30rpx;
padding: 30rpx;
position: relative;
z-index: 3;
box-sizing: border-box;
.card-title {
font-size: 30rpx;
font-weight: 500;
margin-bottom: 30rpx;
}
.card-title {
font-size: 30rpx;
font-weight: 500;
margin-bottom: 30rpx;
}
.bank-box {
.name {
font-size: 28rpx;
font-weight: 500;
}
.bank-box {
.name {
font-size: 28rpx;
font-weight: 500;
}
.bank-list {
.empty-text {
font-size: 28rpx;
font-weight: 400;
color: $dark-9;
}
.bank-list {
.empty-text {
font-size: 28rpx;
font-weight: 400;
color: $dark-9;
}
.cicon-forward {
color: $dark-9;
}
}
.cicon-forward {
color: $dark-9;
}
}
.input-box {
width: 624rpx;
height: 100rpx;
margin-bottom: 40rpx;
.input-box {
width: 624rpx;
height: 100rpx;
margin-bottom: 40rpx;
.unit {
font-size: 48rpx;
color: #333;
font-weight: 500;
}
.unit {
font-size: 48rpx;
color: #333;
font-weight: 500;
}
.uni-easyinput__placeholder-class {
font-size: 30rpx;
height: 36rpx;
}
.uni-easyinput__placeholder-class {
font-size: 30rpx;
height: 36rpx;
}
:deep(.uni-easyinput__content-input) {
font-size: 48rpx;
}
}
:deep(.uni-easyinput__content-input) {
font-size: 48rpx;
}
}
.save-btn {
width: 616rpx;
height: 86rpx;
line-height: 86rpx;
border-radius: 40rpx;
margin-top: 80rpx;
}
}
.save-btn {
width: 616rpx;
height: 86rpx;
line-height: 86rpx;
border-radius: 40rpx;
margin-top: 80rpx;
}
}
.bind-box {
.placeholder-text {
font-size: 26rpx;
color: $dark-9;
}
.bind-box {
.placeholder-text {
font-size: 26rpx;
color: $dark-9;
}
.add-btn {
width: 100rpx;
height: 50rpx;
border-radius: 25rpx;
line-height: 50rpx;
font-size: 22rpx;
color: var(--ui-BG-Main);
background-color: var(--ui-BG-Main-light);
}
}
.add-btn {
width: 100rpx;
height: 50rpx;
border-radius: 25rpx;
line-height: 50rpx;
font-size: 22rpx;
color: var(--ui-BG-Main);
background-color: var(--ui-BG-Main-light);
}
}
.input-box {
width: 624rpx;
height: 100rpx;
margin-bottom: 40rpx;
.input-box {
width: 624rpx;
height: 100rpx;
margin-bottom: 40rpx;
.unit {
font-size: 48rpx;
color: #333;
font-weight: 500;
}
.unit {
font-size: 48rpx;
color: #333;
font-weight: 500;
}
.uni-easyinput__placeholder-class {
font-size: 30rpx;
}
.uni-easyinput__placeholder-class {
font-size: 30rpx;
}
:deep(.uni-easyinput__content-input) {
font-size: 48rpx;
}
}
:deep(.uni-easyinput__content-input) {
font-size: 48rpx;
}
}
.save-btn {
width: 616rpx;
height: 86rpx;
line-height: 86rpx;
border-radius: 40rpx;
margin-top: 80rpx;
}
}
.save-btn {
width: 616rpx;
height: 86rpx;
line-height: 86rpx;
border-radius: 40rpx;
margin-top: 80rpx;
}
}
// 提现说明
.draw-notice {
width: 684rpx;
background: #ffffff;
border: 2rpx solid #fffaee;
border-radius: 20rpx;
margin: 20rpx 32rpx 0 32rpx;
padding: 30rpx;
box-sizing: border-box;
// 提现说明
.draw-notice {
width: 684rpx;
background: #ffffff;
border: 2rpx solid #fffaee;
border-radius: 20rpx;
margin: 20rpx 32rpx 0 32rpx;
padding: 30rpx;
box-sizing: border-box;
.title {
font-weight: 500;
color: #333333;
font-size: 30rpx;
}
.title {
font-weight: 500;
color: #333333;
font-size: 30rpx;
}
.draw-list {
font-size: 24rpx;
color: #999999;
line-height: 46rpx;
}
}
</style>
.draw-list {
font-size: 24rpx;
color: #999999;
line-height: 46rpx;
}
}
</style>
+427 -453
View File
@@ -1,510 +1,484 @@
<template>
<s-layout class="wallet-wrap" title="佣金">
<!-- 钱包卡片 -->
<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>
<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="ss-flex">
<view class="ss-m-r-20">
<button
class="ss-reset-button withdraw-btn"
@tap="sheep.$router.go('/pages/pay/withdraw')"
>
提现
</button>
</view>
<button class="ss-reset-button balance-btn ss-m-l-20" @tap="state.showModal = true">
转余额
</button>
</view>
</view>
<s-layout class="wallet-wrap" title="佣金">
<!-- 钱包卡片 -->
<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>
<view class="ss-flex ss-row-between ss-col-center ss-m-t-30">
<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>
</view>
<button class="ss-reset-button balance-btn ss-m-l-20" @tap="state.showModal = true">
转余额
</button>
</view>
</view>
<view class="ss-flex">
<view class="loading-money">
<view class="loading-money-title">待入账佣金</view>
<view class="loading-money-num">{{
state.showMoney ? agentInfo.pending_reward || '0.00' : '*****'
<view class="ss-flex">
<view class="loading-money">
<view class="loading-money-title">冻结佣金</view>
<view class="loading-money-num">{{
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' : '*****'
</view>
<view class="loading-money ss-m-l-100">
<view class="loading-money-title">可提现佣金</view>
<view class="loading-money-num">{{
state.showMoney ? state.userInfo.brokeragePrice || '0.00' : '*****'
}}</view>
</view>
</view>
</view>
</view>
<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"
>
<button class="ss-reset-button date-btn">
<text>{{ dateFilterText }}</text>
<text class="cicon-drop-down ss-seldate-icon"></text>
</button>
</uni-datetime-picker>
</view>
</view>
</view>
</view>
<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">
<button class="ss-reset-button date-btn">
<text>{{ dateFilterText }}</text>
<text class="cicon-drop-down ss-seldate-icon"></text>
</button>
</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>
</view>
<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>
<!-- 转余额弹框 -->
<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="请输入金额"
/>
</view>
<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="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
>
<view class="money">
<text v-if="item.amount >= 0" class="add">+{{ item.amount }}</text>
<text v-else class="minus">{{ item.amount }}</text>
</view>
</view>
<text class="time">{{ item.create_time }}</text>
</view>
</view>
</view>
<view class="total-box">
<!-- <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-sticky>
<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>
<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="请输入金额" />
</view>
<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="list-content">
<view class="title-box ss-flex ss-row-between ss-m-b-20">
<!-- {{ 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.price }}</text>
<text v-else class="minus">{{ item.price }}</text>
</view>
</view>
<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="{
<!-- <u-gap></u-gap> -->
<uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
contentdown: '上拉加载更多',
}"
/>
</s-layout>
}" />
</s-layout>
</template>
<script setup>
import { computed, reactive } from 'vue';
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
import sheep from '@/sheep';
import dayjs from 'dayjs';
import _ from 'lodash';
import {
computed,
reactive
} from 'vue';
import {
onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import sheep from '@/sheep';
import dayjs from 'dayjs';
import _ from 'lodash';
const headerBg = sheep.$url.css('/static/img/shop/user/wallet_card_bg.png');
const headerBg = sheep.$url.css('/static/img/shop/user/wallet_card_bg.png');
// 数据
const pagination = {
data: [],
current_page: 1,
total: 1,
last_page: 1,
expense: 0,
income: 0,
};
const state = reactive({
showMoney: false,
date: [],
currentTab: 0,
pagination,
loadStatus: '',
showModal: false,
today: '',
});
// 数据
const pagination = {
data: [],
current_page: 1,
total: 1,
last_page: 1,
expense: 0,
income: 0,
};
const state = reactive({
userInfo: {},
showMoney: false,
date: [],
currentTab: 0,
pagination,
loadStatus: '',
showModal: false,
today: '',
});
const tabMaps = [
{
name: '全部',
value: 'all',
},
{
name: '收入',
value: 'income',
},
{
name: '支出',
value: 'expense',
},
];
const userInfo = computed(() => sheep.$store('user').userInfo);
const tabMaps = [{
name: '分佣',
value: 'all',
},
{
name: '提现',
value: 'income',
}
// {
// name: '支出',
// value: 'expense',
// },
];
const userInfo = computed(() => sheep.$store('user').userInfo);
const agentInfo = computed(() => sheep.$store('user').agentInfo);
const agentInfo = computed(() => sheep.$store('user').agentInfo);
const dateFilterText = computed(() => {
if (state.date[0] === state.date[1]) {
return state.date[0];
} else {
return state.date.join('~');
}
});
const dateFilterText = computed(() => {
if (state.date[0] === state.date[1]) {
return state.date[0];
} else {
return state.date.join('~');
}
});
async function getLogList(page = 1, list_rows = 8) {
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),
});
if (res.error === 0) {
let list = _.concat(state.pagination.data, res.data.list.data);
state.pagination = {
...res.data.list,
data: list,
income: res.data.income,
expense: res.data.expense,
};
if (state.pagination.current_page < state.pagination.last_page) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
}
}
}
async function getLogList(page = 1, list_rows = 4) {
state.loadStatus = 'loading';
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.code === 0) {
let list = _.concat(state.pagination.data, res.data.list);
state.pagination = {
current_page: page,
...res.data,
data: list,
// income: res.data.income,
// expense: res.data.expense,
};
if (state.pagination.data.length < state.pagination.total) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
}
}
}
function onChangeTab(e) {
state.pagination = pagination;
state.currentTab = e.index;
getLogList();
}
function onChangeTab(e) {
state.pagination = pagination;
state.currentTab = e.index;
getLogList();
}
function onChangeTime(e) {
state.date[0] = e[0];
state.date[1] = e[e.length - 1];
state.pagination = pagination;
getLogList();
}
function onChangeTime(e) {
state.date[0] = e[0];
state.date[1] = e[e.length - 1];
state.pagination = pagination;
getLogList();
}
function appendTimeHMS(arr) {
return [arr[0] + ' 00:00:00', arr[1] + ' 23:59:59'];
}
function appendTimeHMS(arr) {
return [arr[0] + ' 00:00:00', arr[1] + ' 23:59:59'];
}
// 确认操作
async function onConfirm() {
if (state.amount <= 0) {
sheep.$helper.toast('请输入正确的金额');
return;
}
uni.showModal({
title: '提示',
content: '确认把您的佣金转入到余额钱包中?',
success: async function (res) {
if (res.confirm) {
const { error } = await sheep.$api.commission.transfer({
amount: state.amount,
});
if (error === 0) {
state.showModal = false;
sheep.$store('user').getInfo();
onChangeTab({ index: 0 });
}
}
},
});
}
async function getAgentInfo() {
const { code, data } = await sheep.$store('user').getAgentInfo();
}
onLoad(async (options) => {
state.today = dayjs().format('YYYY-MM-DD');
state.date = [state.today, state.today];
getLogList();
getAgentInfo();
});
// 确认操作
async function onConfirm() {
if (state.amount <= 0) {
sheep.$helper.toast('请输入正确的金额');
return;
}
uni.showModal({
title: '提示',
content: '确认把您的佣金转入到余额钱包中?',
success: async function(res) {
if (res.confirm) {
const {
error
} = await sheep.$api.commission.transfer({
amount: state.amount,
});
if (error === 0) {
state.showModal = false;
sheep.$store('user').getInfo();
onChangeTab({
index: 0
});
}
}
},
});
}
async function getAgentInfo() {
const {
code,
data
} = await sheep.$store('user').getAgentInfo();
}
onLoad(async (options) => {
state.today = dayjs().format('YYYY-MM-DD');
state.date = [state.today, state.today];
getLogList();
getAgentInfo();
});
onReachBottom(() => {
if (state.loadStatus !== 'noMore') {
getLogList(state.pagination.current_page + 1);
}
});
onReachBottom(() => {
if (state.loadStatus !== 'noMore') {
getLogList(state.pagination.current_page + 1);
}
});
</script>
<style lang="scss" scoped>
// 钱包
.header-box {
background-color: $white;
padding: 30rpx;
// 钱包
.header-box {
background-color: $white;
padding: 30rpx;
.card-box {
width: 100%;
min-height: 300rpx;
padding: 40rpx;
background-size: 100% 100%;
border-radius: 30rpx;
overflow: hidden;
position: relative;
z-index: 1;
box-sizing: border-box;
.card-box {
width: 100%;
min-height: 300rpx;
padding: 40rpx;
background-size: 100% 100%;
border-radius: 30rpx;
overflow: hidden;
position: relative;
z-index: 1;
box-sizing: border-box;
&::after {
content: '';
display: block;
width: 100%;
height: 100%;
z-index: 2;
position: absolute;
top: 0;
left: 0;
background: v-bind(headerBg) no-repeat;
pointer-events: none;
}
&::after {
content: '';
display: block;
width: 100%;
height: 100%;
z-index: 2;
position: absolute;
top: 0;
left: 0;
background: v-bind(headerBg) no-repeat;
pointer-events: none;
}
.card-head {
color: $white;
font-size: 24rpx;
}
.card-head {
color: $white;
font-size: 24rpx;
}
.ss-eye-icon {
font-size: 40rpx;
color: $white;
}
.ss-eye-icon {
font-size: 40rpx;
color: $white;
}
.money-num {
font-size: 40rpx;
line-height: normal;
font-weight: 500;
color: $white;
font-family: OPPOSANS;
}
.money-num {
font-size: 40rpx;
line-height: normal;
font-weight: 500;
color: $white;
font-family: OPPOSANS;
}
.reduce-num {
font-size: 26rpx;
font-weight: 400;
color: $white;
}
.reduce-num {
font-size: 26rpx;
font-weight: 400;
color: $white;
}
.withdraw-btn {
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 30px;
font-size: 24rpx;
font-weight: 500;
background-color: $white;
color: var(--ui-BG-Main);
}
.withdraw-btn {
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 30px;
font-size: 24rpx;
font-weight: 500;
background-color: $white;
color: var(--ui-BG-Main);
}
.balance-btn {
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 30px;
font-size: 24rpx;
font-weight: 500;
color: $white;
border: 1px solid $white;
}
}
}
.balance-btn {
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 30px;
font-size: 24rpx;
font-weight: 500;
color: $white;
border: 1px solid $white;
}
}
}
.loading-money {
margin-top: 56rpx;
.loading-money-title {
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
line-height: normal;
margin-bottom: 30rpx;
}
.loading-money {
margin-top: 56rpx;
.loading-money-num {
font-size: 30rpx;
font-family: OPPOSANS;
font-weight: 500;
color: #fefefe;
}
}
.loading-money-title {
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
line-height: normal;
margin-bottom: 30rpx;
}
// 筛选
.loading-money-num {
font-size: 30rpx;
font-family: OPPOSANS;
font-weight: 500;
color: #fefefe;
}
}
.filter-box {
height: 120rpx;
padding: 0 30rpx;
background-color: $bg-page;
// 筛选
.total-box {
font-size: 24rpx;
font-weight: 500;
color: $dark-9;
}
.filter-box {
height: 120rpx;
padding: 0 30rpx;
background-color: $bg-page;
.date-btn {
background-color: $white;
line-height: 54rpx;
border-radius: 27rpx;
padding: 0 20rpx;
font-size: 24rpx;
font-weight: 500;
color: $dark-6;
.total-box {
font-size: 24rpx;
font-weight: 500;
color: $dark-9;
}
.ss-seldate-icon {
font-size: 50rpx;
color: $dark-9;
}
}
}
.date-btn {
background-color: $white;
line-height: 54rpx;
border-radius: 27rpx;
padding: 0 20rpx;
font-size: 24rpx;
font-weight: 500;
color: $dark-6;
// tab
.wallet-tab-card {
.tab-item {
height: 80rpx;
position: relative;
.ss-seldate-icon {
font-size: 50rpx;
color: $dark-9;
}
}
}
.tab-title {
font-size: 30rpx;
}
// tab
.wallet-tab-card {
.tab-item {
height: 80rpx;
position: relative;
.cur-tab-title {
font-weight: $font-weight-bold;
}
.tab-title {
font-size: 30rpx;
}
.tab-line {
width: 60rpx;
height: 6rpx;
border-radius: 6rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 2rpx;
background-color: var(--ui-BG-Main);
}
}
}
.cur-tab-title {
font-weight: $font-weight-bold;
}
// 钱包记录
.wallet-list {
padding: 30rpx;
background-color: #ffff;
.tab-line {
width: 60rpx;
height: 6rpx;
border-radius: 6rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 2rpx;
background-color: var(--ui-BG-Main);
}
}
}
.head-img {
width: 70rpx;
height: 70rpx;
border-radius: 50%;
background: $gray-c;
}
// 钱包记录
.wallet-list {
padding: 30rpx;
background-color: #ffff;
.list-content {
justify-content: space-between;
align-items: flex-start;
flex: 1;
.head-img {
width: 70rpx;
height: 70rpx;
border-radius: 50%;
background: $gray-c;
}
.title {
font-size: 28rpx;
color: $dark-3;
width: 400rpx;
}
.list-content {
justify-content: space-between;
align-items: flex-start;
flex: 1;
.time {
color: $gray-c;
font-size: 22rpx;
}
}
.title {
font-size: 28rpx;
color: $dark-3;
width: 400rpx;
}
.money {
font-size: 28rpx;
font-weight: bold;
font-family: OPPOSANS;
.time {
color: $gray-c;
font-size: 22rpx;
}
}
.add {
color: var(--ui-BG-Main);
}
.money {
font-size: 28rpx;
font-weight: bold;
font-family: OPPOSANS;
.minus {
color: $dark-3;
}
}
}
.add {
color: var(--ui-BG-Main);
}
.model-title {
font-size: 36rpx;
font-weight: bold;
color: #333333;
}
.minus {
color: $dark-3;
}
}
}
.model-subtitle {
font-size: 26rpx;
color: #c2c7cf;
}
.model-title {
font-size: 36rpx;
font-weight: bold;
color: #333333;
}
.model-btn {
width: 100%;
height: 80rpx;
border-radius: 40rpx;
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
line-height: normal;
}
.model-subtitle {
font-size: 26rpx;
color: #c2c7cf;
}
.input-box {
height: 100rpx;
.model-btn {
width: 100%;
height: 80rpx;
border-radius: 40rpx;
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
line-height: normal;
}
.unit {
font-size: 48rpx;
color: #333;
font-weight: 500;
line-height: normal;
}
.input-box {
height: 100rpx;
.uni-easyinput__placeholder-class {
font-size: 30rpx;
height: 40rpx;
line-height: normal;
}
}
</style>
.unit {
font-size: 48rpx;
color: #333;
font-weight: 500;
line-height: normal;
}
.uni-easyinput__placeholder-class {
font-size: 30rpx;
height: 40rpx;
line-height: normal;
}
}
</style>
+16
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
}),
};
+20 -2
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
}),
};
+51 -41
View File
@@ -1,44 +1,54 @@
import request from '@/sheep/request';
export default {
// 预支付
prepay: (data) =>
request({
url: 'pay/prepay',
method: 'POST',
data,
custom: {
loadingMsg: '支付中',
},
}),
// 发起提现
withdraw: {
list: (params) =>
request({
url: 'withdraw',
method: 'GET',
params,
custom: {
auth: true,
},
}),
rules: () =>
request({
url: 'withdraw/rules',
method: 'GET',
custom: {
auth: true,
},
}),
apply: (data) =>
request({
url: 'withdraw/apply',
method: 'POST',
data,
custom: {
loadingMsg: '申请中',
auth: true,
},
}),
},
};
// 预支付
prepay: (data) =>
request({
url: 'pay/prepay',
method: 'POST',
data,
custom: {
loadingMsg: '支付中',
},
}),
// 发起提现
withdraw: {
list: (params) =>
request({
url: 'withdraw',
method: 'GET',
params,
custom: {
auth: true,
},
}),
rules: () =>
request({
url: 'withdraw/rules',
method: 'GET',
custom: {
auth: true,
},
}),
apply: (data) =>
request({
url: '/app-api/trade/brokerage-withdraw/create',
method: 'POST',
data,
custom: {
loadingMsg: '申请中',
// auth: true,
},
}),
userGet: (params) =>
request({
url: '/app-api/trade/brokerage-user/get',
method: 'GET',
params,
// custom: {
// loadingMsg: '申请中',
// auth: true,
// },
}),
},
};
+18 -16
View File
@@ -1,20 +1,22 @@
import request from '@/sheep/request';
const DiyTemplateApi = {
// TODO 芋艿:测试
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 }
});
},
const DiyTemplateApi = {
// TODO 芋艿:测试
// 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
}
});
},
};
export default DiyTemplateApi;
export default DiyTemplateApi;
+7
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) =>
@@ -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>
+6 -6
View File
@@ -94,7 +94,7 @@ http.interceptors.request.use(
if (config.url.indexOf('/app-api/') !== -1) {
config.header['Accept'] = '*/*'
config.header['tenant-id'] = '1';
config.header['terminal'] = '20';
config.header['terminal'] = '20';
config.header['Authorization'] = 'Bearer test247';
}
return config;
@@ -113,7 +113,7 @@ http.interceptors.response.use(
if (response.header.authorization || response.header.Authorization) {
$store('user').setToken(response.header.authorization || response.header.Authorization);
}
// TODO 芋艿:如果是登录的 API,则自动设置 token
// TODO 芋艿:如果是登录的 API,则自动设置 token
response.config.custom.showLoading && closeLoading();
if (response.data.error !== 0 && response.data.code !== 0) {
@@ -125,10 +125,10 @@ http.interceptors.response.use(
});
return Promise.resolve(response.data);
}
// 成功时的提示
// 成功时的提示
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);
};
+2 -2
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);
};