分销佣金

version/0412
zhangtianning 9 months ago
parent 47ea94646e
commit 5ffcc59a57
  1. 17
      api/dealer/capital.js
  2. 6
      pages.json
  3. BIN
      pages/.DS_Store
  4. 246
      pages/dealer/commission.vue
  5. 4
      pages/news3/JoinDistribution.vue

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'dealer.capital/list',
submit: 'dealer.capital/submit'
}
// 分销商提现明细
export const list = (param) => {
return request.get(api.list, param)
}
// 提交提现申请
export const submit = (data) => {
return request.post(api.submit, data)
}

@ -277,6 +277,12 @@
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
}, },
{
"path": "pages/dealer/commission",
"style": {
"navigationBarTitleText": "分销佣金"
}
},
{ {
"path": "pages/dealer/withdraw/apply", "path": "pages/dealer/withdraw/apply",
"style": { "style": {

BIN
pages/.DS_Store vendored

Binary file not shown.

@ -0,0 +1,246 @@
<template>
<view class="container" :style="appThemeStyle">
<mescroll-body ref="mescrollRef" :sticky="true" @init="mescrollInit" :down="{ use: false }" :up="upOption" @up="upCallback">
<!-- tab栏 -->
<!-- <u-tabs :list="tabList" :is-scroll="false" :current="curTab" active-color="#786cff" :duration="0.2" @change="onChangeTab" /> -->
<!-- 列表数据 -->
<view class="widget-list">
<view class="widget__detail dis-flex flex-x-between" v-for="(item, index) in list.data" :key="index">
<view class="detail__left dis-flex flex-dir-column flex-x-around">
<view class="detail__money f-30">{{item.describe}} {{ item.money }}</view>
<view class="detail__time col-9 f-24">{{ item.create_time }}</view>
</view>
<view class="detail__right dis-flex flex-dir-column flex-x-center flex-y-center">
<view class="detail__status" :class="[ApplyStatusColor[item.apply_status]]">
<text>{{ ApplyStatusText[item.apply_status] }}</text>
</view>
<block v-if="item.apply_status == ApplyStatusEnum.REJECT.value">
<view class="detail__reason" @click="handleShowRejectReason(item)">驳回原因
</view>
</block>
</view>
</view>
</view>
</mescroll-body>
<!-- 驳回原因弹窗 -->
<u-modal v-model="showRejectReason" title="驳回原因">
<view class="pops-content">
<text>{{ rejectReason }}</text>
</view>
</u-modal>
</view>
</template>
<script>
import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins'
import { getEmptyPaginateObj, getMoreListData } from '@/core/app'
import * as Api from '@/api/dealer/capital'
import SettingModel from '@/common/model/dealer/Setting'
import { ApplyStatusEnum } from '@/common/enum/dealer/withdraw'
const pageSize = 15
//
const ApplyStatusText = {}
//
const ApplyStatusColor = {
[ApplyStatusEnum.WAIT.value]: 'col-8',
[ApplyStatusEnum.PASSED.value]: 'col-green',
[ApplyStatusEnum.REJECT.value]: 'col-m',
[ApplyStatusEnum.PAYMENT.value]: 'col-green'
}
export default {
mixins: [MescrollMixin],
data() {
return {
//
ApplyStatusEnum,
ApplyStatusColor,
ApplyStatusText,
//
tabList: [],
//
curTab: 0,
//
list: {},//getEmptyPaginateObj(),
//
upOption: {
//
auto: true,
// ; 10
page: { size: pageSize },
// 12
noMoreSize: 12,
//
empty: {
tip: '亲,暂无相关数据'
}
},
//
showRejectReason: false,
rejectReason: ''
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getSetting()
},
methods: {
//
getSetting() {
const app = this
SettingModel.data()
.then(setting => {
const words = setting.words.capital//withdraw_list
app.setPageTitle(words.title)
// app.setTabList(words.words)
// app.setStatusText(words.words)
})
},
//
setPageTitle(title) {
uni.setNavigationBarTitle({
title: title.value
})
},
//
setTabList(words) {
const app = this
app.tabList = [
{ value: -1, name: words.all.value },
{ value: ApplyStatusEnum.WAIT.value, name: words.apply_10.value },
{ value: ApplyStatusEnum.PASSED.value, name: words.apply_20.value },
{ value: ApplyStatusEnum.REJECT.value, name: words.apply_30.value },
{ value: ApplyStatusEnum.PAYMENT.value, name: words.apply_40.value },
]
},
//
setStatusText(words) {
const app = this
app.ApplyStatusText = {
[ApplyStatusEnum.WAIT.value]: words.apply_10.value,
[ApplyStatusEnum.PASSED.value]: words.apply_20.value,
[ApplyStatusEnum.REJECT.value]: words.apply_30.value,
[ApplyStatusEnum.PAYMENT.value]: words.apply_40.value
}
},
/**
* 上拉加载的回调 (页面初始化时也会执行一次)
* 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10
* @param {Object} page
*/
upCallback(page) {
const app = this
//
app.getList(page.num)
.then(list => {
const curPageLen = list.data.length
const totalSize = list.data.total
app.mescroll.endBySize(curPageLen, totalSize)
})
.catch(() => app.mescroll.endErr())
},
//
getList(pageNo = 1) {
const app = this
return new Promise((resolve, reject) => {
Api.list({ applyStatus: app.getTabValue(), page: pageNo })
.then(result => {
//
const newList = result.data.list
app.list.data = getMoreListData(newList, app.list, pageNo)
resolve(newList)
})
})
},
//
getTabValue() {
const app = this
if (app.tabList.length) {
return app.tabList[app.curTab].value
}
return -1
},
//
onChangeTab(index) {
const app = this
//
app.curTab = index
//
app.onRefreshList()
},
//
onRefreshList() {
this.list = getEmptyPaginateObj()
setTimeout(() => {
this.mescroll.resetUpScroll()
}, 120)
},
//
handleShowRejectReason(item) {
this.showRejectReason = true
this.rejectReason = item.reject_reason
},
}
}
</script>
<style>
page {
background: #fff;
}
</style>
<style lang="scss" scoped>
//
.widget-list {
padding: 16rpx 20rpx 40rpx 20rpx;
box-sizing: border-box;
}
.widget__detail {
padding: 26rpx 15rpx;
box-sizing: border-box;
font-size: 26rpx;
border-bottom: 1rpx solid #f2f2f2;
}
.widget__detail .detail__money {
font-size: 30rpx;
}
.widget__detail .detail__reason {
color: #8e84fc;
}
// ()
.pops-content {
padding: 30rpx 48rpx;
font-size: 28rpx;
line-height: 44rpx;
text-align: left;
color: #606266;
height: 220rpx;
box-sizing: border-box;
}
</style>

@ -13,7 +13,7 @@
<image :src="$picUrl+'/static/news3/join.png'" mode="widthFix"></image> <image :src="$picUrl+'/static/news3/join.png'" mode="widthFix"></image>
<view class="userContent"> <view class="userContent">
<view v-if="user"> <view v-if="user">
<image src="{{user.avatar_url?'/static/news3/walletBg.png':'/static/news3/walletBg.png'}}" mode="aspectFill" class="avatar"></image> <image :src="user.avatar_url" mode="aspectFill" class="avatar"></image>
</view> </view>
<view class="user"> <view class="user">
<view class="userTop"> <view class="userTop">
@ -49,7 +49,7 @@
</view> </view>
</view> </view>
<view class="gridContent"> <view class="gridContent">
<view class="gridItem"> <view class="gridItem" @click="$navTo('pages/dealer/commission')">
<image :src="$picUrl+'/static/news3/fx1.png'" mode="widthFix"></image> <image :src="$picUrl+'/static/news3/fx1.png'" mode="widthFix"></image>
<text>分销佣金</text> <text>分销佣金</text>
</view> </view>

Loading…
Cancel
Save