代码提交

main
gzy 2 months ago
parent acf3fb0f66
commit 237cde5ae0

@ -56,26 +56,26 @@
});
const typeList = [
{
// icon: '/static/img/shop/pay/wechat.png', // TODO icon
title: '钱包余额',
value: '1',
},
// {
// // icon: '/static/img/shop/pay/wechat.png', // TODO icon
// title: '',
// value: '1',
// },
{
icon: '/static/img/shop/pay/wechat.png',
title: '微信零钱',
value: '2',
},
{
icon: '/static/img/shop/pay/alipay.png',
title: '支付宝账户',
value: '3',
},
{
icon: '/static/img/shop/pay/bank.png',
title: '银行卡转账',
value: '4',
},
// {
// icon: '/static/img/shop/pay/alipay.png',
// title: '',
// value: '3',
// },
// {
// icon: '/static/img/shop/pay/bank.png',
// title: '',
// value: '4',
// },
];
function onChange(e) {

@ -12,11 +12,11 @@
<view class="ss-flex ss-row-between ss-col-center ss-m-t-30">
<view class="money-num">{{ state.showMoney ? fen2yuan(state.summary.withdrawPrice || 0) : '*****' }}</view>
<view class="ss-flex">
<view class="ss-m-r-20">
<!-- <view class="ss-m-r-20">
<button class="ss-reset-button withdraw-btn" @tap="sheep.$router.go('/pages/commission/withdraw')">
提现
</button>
</view>
</view> -->
<button class="ss-reset-button balance-btn ss-m-l-20" @tap="state.showModal = true">
转余额
</button>

@ -15,9 +15,9 @@
<view class="num-title">可提现金额</view>
<view class="wallet-num">{{ fen2yuan(state.brokerageInfo.brokeragePrice) }}</view>
</view>
<button class="ss-reset-button log-btn" @tap="sheep.$router.go('/pages/commission/wallet', { type: 2 })">
<!-- <button class="ss-reset-button log-btn" @tap="sheep.$router.go('/pages/commission/wallet', { type: 2 })">
提现记录
</button>
</button> -->
</view>
<!-- 提现输入卡片-->
<view class="draw-card">
@ -25,10 +25,10 @@
<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 === '1'" class="empty-text"></view>
<view v-if="state.accountInfo.type === '2'" class="empty-text"></view>
<view v-if="state.accountInfo.type === '3'" class="empty-text"></view>
<view v-if="state.accountInfo.type === '4'" class="empty-text"></view>
<!-- <view v-if="state.accountInfo.type === '1'" class="empty-text"></view> -->
<view v-if="state.accountInfo.type === '3'" class="empty-text"></view>
<!-- <view v-if="state.accountInfo.type === '3'" class="empty-text"></view> -->
<!-- <view v-if="state.accountInfo.type === '4'" class="empty-text"></view> -->
<text class="cicon-forward" />
</view>
</view>
@ -44,6 +44,7 @@
placeholder="请输入提现金额"
/>
</view>
<view style="font-size: 22rpx;color: #ccc;">提现抽成百分之10</view>
<!-- 提现账号 -->
<view class="card-title" v-show="['2', '3', '4'].includes(state.accountInfo.type)">
提现账号
@ -200,7 +201,12 @@
return;
}
//
let { code } = await BrokerageApi.createBrokerageWithdraw({
// let { code } = await BrokerageApi.createBrokerageWithdraw({
// ...state.accountInfo,
// price: state.accountInfo.price * 100,
// });
//
let { code } = await BrokerageApi.createBrokerageWithdraw1({
...state.accountInfo,
price: state.accountInfo.price * 100,
});
@ -215,7 +221,7 @@
confirmText: '查看记录',
success: (res) => {
if (res.confirm) {
sheep.$router.go('/pages/commission/wallet', { type: 2 })
sheep.$router.go('/pages/user/wallet/money')
return;
}
getBrokerageUser();

@ -17,8 +17,8 @@
<scroll-view lower-threshold="300" scroll-y @scrolltolower="onPageScroll"
class="scroll-content">
<view v-for="(i, v) in ListData" :key="v" class="item">
<view>{{ v }}</view>
<view>{{ i.userName }}</view>
<view>{{ v+1 }}</view>
<view>{{ i.nickname }}</view>
<view>{{ formattedDateTime(i.outTime)}}</view>
</view>
</scroll-view>

@ -14,6 +14,9 @@
</view>
<view class="ss-flex ss-row-between ss-col-center ss-m-t-64">
<view class="money-num">{{ state.showMoney ? fen2yuan(userWallet.balance) : '*****' }}</view>
<button class="ss-reset-button topup-btn" @tap="sheep.$router.go('/pages/commission/withdraw')">
提现
</button>
<button class="ss-reset-button topup-btn" @tap="sheep.$router.go('/pages/pay/recharge')">
充值
</button>

@ -6,14 +6,14 @@ const BrokerageApi = {
return request({
url: '/trade/brokerage-user/bind',
method: 'PUT',
data
data,
});
},
// 获得个人分销信息
getBrokerageUser: () => {
return request({
url: '/trade/brokerage-user/get',
method: 'GET'
method: 'GET',
});
},
// 获得个人分销统计
@ -24,12 +24,12 @@ const BrokerageApi = {
});
},
// 获得分销记录分页
getBrokerageRecordPage: params => {
getBrokerageRecordPage: (params) => {
if (params.status === undefined) {
delete params.status
delete params.status;
}
const queryString = Object.keys(params)
.map(key => encodeURIComponent(key) + '=' + params[key])
.map((key) => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/trade/brokerage-record/page?${queryString}`,
@ -37,23 +37,31 @@ const BrokerageApi = {
});
},
// 创建分销提现
createBrokerageWithdraw: data => {
createBrokerageWithdraw: (data) => {
return request({
url: '/trade/brokerage-withdraw/create',
method: 'POST',
data,
});
},
// 余额提现
createBrokerageWithdraw1: (data) => {
return request({
url: '/trade/brokerage-withdraw/create1',
method: 'POST',
data,
});
},
// 获得商品的分销金额
getProductBrokeragePrice: spuId => {
getProductBrokeragePrice: (spuId) => {
return request({
url: '/trade/brokerage-record/get-product-brokerage-price',
method: 'GET',
params: { spuId }
params: { spuId },
});
},
// 获得分销用户排行(基于佣金)
getRankByPrice: params => {
getRankByPrice: (params) => {
const queryString = `times=${params.times[0]}&times=${params.times[1]}`;
return request({
url: `/trade/brokerage-user/get-rank-by-price?${queryString}`,
@ -61,9 +69,9 @@ const BrokerageApi = {
});
},
// 获得分销用户排行分页(基于佣金)
getBrokerageUserChildSummaryPageByPrice: params => {
getBrokerageUserChildSummaryPageByPrice: (params) => {
const queryString = Object.keys(params)
.map(key => encodeURIComponent(key) + '=' + params[key])
.map((key) => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/trade/brokerage-user/rank-page-by-price?${queryString}`,
@ -71,9 +79,9 @@ const BrokerageApi = {
});
},
// 获得分销用户排行分页(基于用户量)
getBrokerageUserRankPageByUserCount: params => {
getBrokerageUserRankPageByUserCount: (params) => {
const queryString = Object.keys(params)
.map(key => encodeURIComponent(key) + '=' + params[key])
.map((key) => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/trade/brokerage-user/rank-page-by-user-count?${queryString}`,
@ -81,13 +89,13 @@ const BrokerageApi = {
});
},
// 获得下级分销统计分页
getBrokerageUserChildSummaryPage: params => {
getBrokerageUserChildSummaryPage: (params) => {
return request({
url: '/trade/brokerage-user/child-summary-page',
method: 'GET',
params,
})
}
}
});
},
};
export default BrokerageApi

@ -4,24 +4,11 @@
<view>
<!-- 布局1. 单列大图上图下内容-->
<view v-if="layoutType === LayoutTypeEnum.ONE_COL_BIG_IMG && state.goodsList.length" class="goods-sl-box">
<view
class="goods-box"
v-for="item in state.goodsList"
:key="item.id"
:style="[{ marginBottom: data.space * 2 + 'rpx' }]"
>
<s-goods-column
class=""
size="sl"
:goodsFields="data.fields"
:tagStyle="data.badge"
:data="item"
:titleColor="data.fields.name?.color"
:subTitleColor="data.fields.introduction.color"
:topRadius="data.borderRadiusTop"
:bottomRadius="data.borderRadiusBottom"
@click="sheep.$router.go('/pages/goods/index', { id: item.id })"
>
<view class="goods-box" v-for="item in state.goodsList" :key="item.id"
:style="[{ marginBottom: data.space * 2 + 'rpx' }]">
<s-goods-column class="" size="sl" :goodsFields="data.fields" :tagStyle="data.badge" :data="item"
:titleColor="data.fields.name?.color" :subTitleColor="data.fields.introduction.color"
:topRadius="data.borderRadiusTop" :bottomRadius="data.borderRadiusBottom" @click="onGoGoods(item.id)">
<!-- 购买按钮 -->
<template v-slot:cart>
<button class="ss-reset-button cart-btn" :style="[buyStyle]">
@ -33,31 +20,16 @@
</view>
<!-- 布局2. 双列每一列上图下内容-->
<view
v-if="layoutType === LayoutTypeEnum.TWO_COL && state.goodsList.length"
class="goods-md-wrap ss-flex ss-flex-wrap ss-col-top"
>
<view v-if="layoutType === LayoutTypeEnum.TWO_COL && state.goodsList.length"
class="goods-md-wrap ss-flex ss-flex-wrap ss-col-top">
<view class="goods-list-box">
<view
class="left-list"
:style="[{ paddingRight: data.space + 'rpx', marginBottom: data.space + 'px' }]"
v-for="item in state.leftGoodsList"
:key="item.id"
>
<s-goods-column
class="goods-md-box"
size="md"
:goodsFields="data.fields"
:tagStyle="data.badge"
:data="item"
:titleColor="data.fields.name?.color"
:subTitleColor="data.fields.introduction.color"
:topRadius="data.borderRadiusTop"
:bottomRadius="data.borderRadiusBottom"
:titleWidth="330 - marginLeft - marginRight"
@click="sheep.$router.go('/pages/goods/index', { id: item.id })"
@getHeight="calculateGoodsColumn($event, 'left')"
>
<view class="left-list" :style="[{ paddingRight: data.space + 'rpx', marginBottom: data.space + 'px' }]"
v-for="item in state.leftGoodsList" :key="item.id">
<s-goods-column class="goods-md-box" size="md" :goodsFields="data.fields" :tagStyle="data.badge" :data="item"
:titleColor="data.fields.name?.color" :subTitleColor="data.fields.introduction.color"
:topRadius="data.borderRadiusTop" :bottomRadius="data.borderRadiusBottom"
:titleWidth="330 - marginLeft - marginRight" @click="onGoGoods(item.id)"
@getHeight="calculateGoodsColumn($event, 'left')">
<!-- 购买按钮 -->
<template v-slot:cart>
<button class="ss-reset-button cart-btn" :style="[buyStyle]">
@ -68,26 +40,13 @@
</view>
</view>
<view class="goods-list-box">
<view
class="right-list"
:style="[{ paddingLeft: data.space + 'rpx', marginBottom: data.space + 'px' }]"
v-for="item in state.rightGoodsList"
:key="item.id"
>
<s-goods-column
class="goods-md-box"
size="md"
:goodsFields="data.fields"
:tagStyle="data.badge"
:data="item"
:titleColor="data.fields.name?.color"
:subTitleColor="data.fields.introduction.color"
:topRadius="data.borderRadiusTop"
:bottomRadius="data.borderRadiusBottom"
:titleWidth="330 - marginLeft - marginRight"
@click="sheep.$router.go('/pages/goods/index', { id: item.id })"
@getHeight="calculateGoodsColumn($event, 'right')"
>
<view class="right-list" :style="[{ paddingLeft: data.space + 'rpx', marginBottom: data.space + 'px' }]"
v-for="item in state.rightGoodsList" :key="item.id">
<s-goods-column class="goods-md-box" size="md" :goodsFields="data.fields" :tagStyle="data.badge" :data="item"
:titleColor="data.fields.name?.color" :subTitleColor="data.fields.introduction.color"
:topRadius="data.borderRadiusTop" :bottomRadius="data.borderRadiusBottom"
:titleWidth="330 - marginLeft - marginRight" @click="onGoGoods(item.id)"
@getHeight="calculateGoodsColumn($event, 'right')">
<!-- 购买按钮 -->
<template v-slot:cart>
<button class="ss-reset-button cart-btn" :style="[buyStyle]">
@ -101,24 +60,11 @@
<!-- 布局3. 单列小图左图右内容 -->
<view v-if="layoutType === LayoutTypeEnum.ONE_COL_SMALL_IMG && state.goodsList.length" class="goods-lg-box">
<view
class="goods-box"
:style="[{ marginBottom: data.space + 'px' }]"
v-for="item in state.goodsList"
:key="item.id"
>
<s-goods-column
class="goods-card"
size="lg"
:goodsFields="data.fields"
:data="item"
:tagStyle="data.badge"
:titleColor="data.fields.name?.color"
:subTitleColor="data.fields.introduction.color"
:topRadius="data.borderRadiusTop"
:bottomRadius="data.borderRadiusBottom"
@tap="sheep.$router.go('/pages/goods/index', { id: item.id })"
>
<view class="goods-box" :style="[{ marginBottom: data.space + 'px' }]" v-for="item in state.goodsList"
:key="item.id">
<s-goods-column class="goods-card" size="lg" :goodsFields="data.fields" :data="item" :tagStyle="data.badge"
:titleColor="data.fields.name?.color" :subTitleColor="data.fields.introduction.color"
:topRadius="data.borderRadiusTop" :bottomRadius="data.borderRadiusBottom" @tap="onGoGoods(item.id)">
<!-- 购买按钮 -->
<template v-slot:cart>
<button class="ss-reset-button cart-btn" :style="[buyStyle]">
@ -237,6 +183,20 @@
calculateGoodsColumn();
}
});
//
const onGoGoods = ((id)=>{
SpuApi.getSpuDetail(id).then((res) => {
if(res.code == 0){
sheep.$router.go('/pages/goods/index', { id: id })
}else{
uni.showToast({
title: res.msg,
icon: 'none',
mask: true
})
}
})
})
</script>
<style lang="scss" scoped>

@ -116,8 +116,8 @@
shareInfo: props.shareInfo,
});
await renderPoster();
return poster.views
}
defineExpose({
getPoster,
});

@ -86,15 +86,24 @@
});
//
const onShareByPoster = () => {
const onShareByPoster = async () => {
closeShareModal();
if (!sheep.$store('user').isLogin) {
showAuthModal();
return;
}
console.log(props.shareInfo);
unref(SharePosterRef).getPoster();
const res = await unref(SharePosterRef).getPoster();
const isHave = res[3].src.slice(-5)
if (isHave===",null"){
uni.showToast({
title: '无权推广',
duration: 2000,
icon: 'none'
})
}else{
state.showPosterModal = true;
}
};
//

Loading…
Cancel
Save