代码提交

main
gzy 4 months ago
parent acf3fb0f66
commit 237cde5ae0

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save