Authored by TaoHuang

fix

... ... @@ -9,7 +9,7 @@
3. 邀请成功后,自新入驻卖家入驻成功之日起30天内,均可获得新卖家每单10元的奖励金。 <br/>
4. 新入驻卖家在首次入驻UFO时,正确填写邀请码,即与邀请人绑定,绑定关系不可重复及更改。 <br/>
5. 绑定关系建立后,一旦退出UFO, 即使在活动期间内再次入驻,都将不再享有新入驻卖家订单的奖励金。 <br/>
6. 已经入驻UFO的卖家,退出UFO后,再次入驻无法参加本次活动。 <br/>
6. 活动期间,已经入驻UFO的卖家,退出UFO后,再次入驻无法参加本次活动。 <br/>
7. 当月的奖励金在该月最后一个工作日结算,次月10日进行发放。
</p>
</div>
... ...
... ... @@ -3,16 +3,16 @@
<div class="title-wrapper">
<TitleComp txt="我的收款银行"></TitleComp>
</div>
<template v-if="status === 1">
<template v-if="!card">
<div class="item">
<span>您还未绑定银行卡,将无法收款</span>
<span class="link">添加银行卡</span>
<span class="link" @click="goCardAdd">添加银行卡</span>
</div>
</template>
<template v-else>
<div class="item">
<span>您已绑定银行卡</span>
<span class="link">查看银行卡</span>
<span class="link" @click="goCardList">查看银行卡</span>
</div>
</template>
</div>
... ... @@ -27,9 +27,20 @@ export default {
TitleComp
},
props: {
status: {
type: Number,
default: 1
card: {
type: Object,
}
},
methods: {
goCardList() {
this.$router.push({
name: 'bankcard'
});
},
goCardAdd() {
this.$router.push({
name: 'bankcard.add'
});
}
}
};
... ...
... ... @@ -15,13 +15,13 @@
<tbody class="tbody">
<tr v-for="item in list">
<td align="left">
<span>{{item.name}}</span>
<span>{{item.nickName}}</span>
</td>
<td align="center">
<span>{{item.time}}</span>
<span>{{item.enterTime}}</span>
</td>
<td align="center">
<span>{{item.count}}</span>
<span>{{item.orderNum}}</span>
</td>
</tr>
</tbody>
... ... @@ -38,26 +38,10 @@ export default {
TitleComp
},
props: {
count: {
type: Number,
default: 10
},
orderCount: {
type: Number,
default: 20
},
list: {
type: Array,
default() {
return [{
name: '1212',
time: '2019.04.24 12:15:00',
count: 10
}, {
name: '1212',
time: '2019.04.24 12:15:00',
count: 10
}];
return [];
}
}
}
... ...
<template>
<div class="wrapper">
<template v-if="code">
<template v-if="data.showInviteCode">
<div class="item title mg4">我的邀请码</div>
<div class="item code mg3">{{code}}</div>
<div class="item code mg3">{{data.showInviteCode}}</div>
<div class="item mg2">
<div class="btn copy">
... ... @@ -12,12 +12,12 @@
<div class="item count-wrapper">
<div >
<div class="count">22</div>
<div class="count">{{data.inviteeUidNum}}</div>
<div class="tip">已经邀请好友</div>
</div>
<div >
<div class="count">325</div>
<div class="count">{{data.finishedOrderNum}}</div>
<div class="tip">好友完成订单数</div>
</div>
</div>
... ... @@ -45,10 +45,10 @@ import ClipboardJS from 'clipboard';
export default {
name: 'InviteCode',
props: {
code: {
type: String,
data: {
type: Object,
default() {
return '';
return {};
}
}
},
... ... @@ -57,7 +57,7 @@ export default {
this.clipboard = new ClipboardJS(this.$el.getElementsByClassName('copy'), {
text: () => {
return this.code;
return this.data.showInviteCode;
}
});
... ...
<template>
<div class="wrapper">
<div class="record-wrapper">
<div class="title-wrapper" style="display: flex; justify-content: space-between; align-items: baseline;">
<TitleComp txt="我的收款记录"></TitleComp>
<span class="font" style="display: inline-block; color: white;">每月29日结算下一周期的佣金</span>
</div>
<template v-if="list.length > 0">
<table class="table">
<thead class="header">
<tr>
<th width="28%" align="left">处理流水</th>
<th width="57%" align="center">收款时间</th>
<th width="35%" align="left">处理流水</th>
<th width="50%" align="center">收款时间</th>
<th width="15%" align="left">交易金额</th>
</tr>
</thead>
<tbody class="tbody">
<tr v-for="item in list">
<tr v-for="item in list" v-if="list.length > 0">
<td align="left">
<span>{{item.name}}</span>
<span>{{item.settleCode}}</span>
</td>
<td align="center">
<span>{{item.time}}</span>
<span>{{item.settleTime}}</span>
</td>
<td align="center">
<span>{{item.count}}</span>
<span>{{item.settleAmount}}</span>
</td>
</tr>
</tbody>
</table>
</template>
<template v-else>
<span>当前暂无收款记录。</span>
</template>
</div>
</template>
... ... @@ -39,26 +44,10 @@ export default {
TitleComp
},
props: {
count: {
type: Number,
default: 10
},
orderCount: {
type: Number,
default: 20
},
list: {
type: Array,
default() {
return [{
name: '1212',
time: '2019.04.24 12:15:00',
count: 10
}, {
name: '1212',
time: '2019.04.24 12:15:00',
count: 10
}];
return [];
}
}
}
... ... @@ -66,8 +55,8 @@ export default {
</script>
<style lang="scss" scoped>
.wrapper {
text-align: center;
.record-wrapper {
text-align: left !important;
color: white;
}
... ...
<template>
<div class="body-wrapper">
<BannerPage></BannerPage>
<InviteCode class="mg"></InviteCode>
<FriendList class="mg"></FriendList>
<BankStatus class="mg"></BankStatus>
<RecordList class="mg"></RecordList>
<InviteCode class="mg" :data="inviteCode"></InviteCode>
<FriendList class="mg" :list="inviteCode.inviteRecordList" v-if="inviteCode.inviteRecordList.length > 0"></FriendList>
<BankStatus class="mg" :card="card"></BankStatus>
<RecordList class="mg" :list="recordList"></RecordList>
<DescPage class="mg"></DescPage>
</div>
</template>
... ... @@ -16,9 +16,15 @@ import BankStatus from './components/bankcard-status';
import RecordList from './components/record-list';
import DescPage from '../components/desc';
import BannerPage from './components/banner';
import {createNamespacedHelpers} from 'vuex';
const {mapState} = createNamespacedHelpers('invite/invite');
export default {
name: 'detailPage',
computed: {
...mapState(['card', 'recordList', 'inviteCode'])
},
components: {
InviteCode,
FriendList,
... ...
<template>
<LayoutApp :title="title">
<Scroll>
<!-- <WelcomePage></WelcomePage>-->
<DetailPage></DetailPage>
<DetailPage v-if="status"></DetailPage>
<WelcomePage v-else></WelcomePage>
</Scroll>
</LayoutApp>
</template>
... ... @@ -13,13 +13,27 @@ import WelcomePage from './welcome/welcome';
import DetailPage from './detail/detail';
import {Scroll} from 'cube-ui';
import {createNamespacedHelpers} from 'vuex';
const {mapState} = createNamespacedHelpers('invite/invite');
export default {
name: 'InvitePage',
async asyncData({store}) {
const {status} = await store.dispatch('invite/invite/fetchStatus');
if (status) {
await store.dispatch('invite/invite/fetchAll');
}
},
data() {
return {
title: '卖家邀新返利'
};
},
computed: {
...mapState(['status'])
},
components: {
LayoutApp,
WelcomePage,
... ...
... ... @@ -5,6 +5,7 @@ import storeYoho from './yoho';
import storeUfo from './order';
import storeLicense from './license';
import storeMine from './mine';
import storeInvite from './invite';
Vue.use(Vuex);
... ... @@ -15,7 +16,8 @@ export function createStore(context) {
yoho: storeYoho(),
ufo: storeUfo(),
license: storeLicense(),
mine: storeMine()
mine: storeMine(),
invite: storeInvite()
},
strict: process.env.NODE_ENV !== 'production'
});
... ...
import invite from './invite';
export default function() {
return {
namespaced: true,
modules: {
invite: invite()
}
};
}
... ...
import * as Types from './types';
import { get, pick } from 'lodash';
export default {
async fetchBankCard({ commit }) {
commit(Types.FETCH_BANK_CARD_REQUEST);
const result = await this.$api.get('/api/ufo/bankcard/getBankCard');
if (result && result.code === 200) {
commit(Types.FETCH_BANK_CARD_SUCCESS, {
card: result.data
});
} else {
commit(Types.FETCH_BANK_CARD_FAILD);
}
return result || {};
},
async fetchFriendList({ commit }) {
const result = await this.$api.get('/api/ufo/invite/recordList');
if (result.code === 200) {
commit(Types.FETCH_INVITE_FRIENDLIST, { list: result.data.list });
}
},
async fetchOrderList({ commit }) {
const result = await this.$api.get('/api/ufo/invite/friendList');
if (result.code === 200) {
commit(Types.FETCH_INVITE_CODE, result.data);
}
},
async fetchStatus({ commit }) {
const result = await this.$api.get('/api/ufo/invite/status');
if (result.code === 200) {
commit(Types.FETCH_INVITE_STATUS, { status: result.data });
return { status: result.data };
}
return { status: 0 };
},
async fetchAll({ dispatch }) {
return Promise.all([
dispatch('fetchFriendList'),
dispatch('fetchOrderList'),
dispatch('fetchBankCard')
]);
}
};
... ...
import actions from './actions';
import mutations from './mutations';
export default function() {
return {
namespaced: true,
state: {
card: null,
recordList: [],
inviteCode: {
showInviteCode: '',
inviteeUidNum: 0,
finishedOrderNum: 0,
inviteRecordList: []
},
status: 0
},
actions,
mutations
};
}
... ...
import * as Types from './types';
export default {
[Types.FETCH_BANK_CARD_REQUEST](state) {
state.card = null;
state.fetchingBank = true;
},
[Types.FETCH_BANK_CARD_FAILD](state) {
state.fetchingBank = false;
},
[Types.FETCH_BANK_CARD_SUCCESS](state, {card}) {
state.fetchingBank = false;
state.card = card;
},
[Types.FETCH_INVITE_STATUS](state, {status}) {
state.status = status;
},
[Types.FETCH_INVITE_ORDERLIST](state, {list}) {
state.orderList = list;
}
};
... ...
export const FETCH_BANK_CARD_REQUEST = 'FETCH_BANK_CARD_REQUEST';
export const FETCH_BANK_CARD_FAILD = 'FETCH_BANK_CARD_FAILD';
export const FETCH_BANK_CARD_SUCCESS = 'FETCH_BANK_CARD_SUCCESS';
export const FETCH_INVITE_STATUS = 'FETCH_INVITE_STATUS';
export const FETCH_INVITE_FRIENDLIST = 'FETCH_INVITE_FRIENDLIST';
export const FETCH_INVITE_ORDERLIST = 'FETCH_INVITE_ORDERLIST';
export const FETCH_INVITE_CODE = 'FETCH_INVITE_CODE';
... ...
... ... @@ -121,5 +121,23 @@ module.exports = {
bankBranch: {type: String, require: true},
bankCode: {type: String, require: true}
}
}
},
'/api/ufo/invite/recordList': {
ufo: true,
api: 'ufo.inviter.getInviteSettlementList',
params: {
}
},
'/api/ufo/invite/status': {
ufo: true,
api: 'ufo.invite.toEnter',
params: {
}
},
'/api/ufo/invite/friendList': {
ufo: true,
api: 'ufo.invite.code',
params: {
}
},
};
... ...