Authored by yyq

Merge branch 'feature/invite' of git.yoho.cn:fe/ufo-app-web into feature/invite

... ... @@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="telephone=yes" name="format-detection">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<script type="text/javascript">
(function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=750){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/750)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window);
... ...
... ... @@ -28,7 +28,8 @@ export default {
},
props: {
card: {
type: Object,
type: Boolean,
default: false
}
},
methods: {
... ...
... ... @@ -15,7 +15,7 @@
<tbody class="tbody">
<tr v-for="item in list">
<td align="left">
<span>{{item.nickName}}</span>
<span class="nick-name">{{item.nickName}}</span>
</td>
<td align="center">
<span>{{item.enterTime}}</span>
... ... @@ -72,15 +72,23 @@ export default {
tbody {
tr {
height: 110px;
box-shadow: inset 0 -1px 0 0 rgba(255,255,255,0.09);
border-bottom: 1px solid rgba(255, 255, 255, 0.09);
span {
color: #94b0c4;
display: inline-block;
display: block;
height: 110px;
line-height: 110px;
}
}
}
}
.nick-name {
width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
... ...
... ... @@ -41,6 +41,7 @@
<script>
import ClipboardJS from 'clipboard';
import {get} from 'lodash';
export default {
name: 'InviteCode',
... ... @@ -80,7 +81,7 @@ export default {
async onClick() {
const result = await this.$store.dispatch('license/form/getStoreStatus', null, { root: true});
if (result.data === true || result.data.isStoredSeller) {
if (result.data === true || get(result, 'data.isStoredSeller', false)) {
this.$yoho.goPage('go.ufo', {
pagename: 'merchantsSettled',
isnavhidden: 1,
... ...
... ... @@ -86,7 +86,7 @@ export default {
tbody {
tr {
height: 110px;
box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, 0.09);
border-bottom: 1px solid rgba(255, 255, 255, 0.09);
span {
color: #94b0c4;
... ...
... ... @@ -4,7 +4,7 @@
<div class="body-wrapper">
<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>
<BankStatus class="mg" :card="getBandLength"></BankStatus>
<RecordList class="mg" :list="recordList"></RecordList>
<DescPage class="mg"></DescPage>
</div>
... ... @@ -20,12 +20,20 @@ import DescPage from '../components/desc';
import BannerPage from './components/banner';
import {createNamespacedHelpers} from 'vuex';
const {mapState} = createNamespacedHelpers('invite/invite');
const {mapState, mapGetters} = createNamespacedHelpers('invite/invite');
export default {
name: 'detailPage',
computed: {
...mapState(['card', 'recordList', 'inviteCode'])
...mapState(['recordList', 'inviteCode']),
...mapGetters(['getBandLength'])
},
data() {
return {
card: null
};
},
mounted() {
},
components: {
InviteCode,
... ...
import * as Types from './types';
import {get} from 'lodash';
export default {
async fetchOrderList({ commit }) {
const result = await this.$api.get('/api/ufo/invite/recordList');
if (result.code === 200) {
commit(Types.FETCH_INVITE_ORDERLIST, { list: result.data.list });
commit(Types.FETCH_INVITE_ORDERLIST, { list: get(result, 'data.list', []) });
}
},
... ... @@ -13,7 +14,9 @@ export default {
const result = await this.$api.get('/api/ufo/invite/friendList');
if (result.code === 200) {
commit(Types.FETCH_INVITE_CODE, result.data);
commit(Types.FETCH_INVITE_CODE, Object.assign({
inviteRecordList: []
}, result.data));
}
},
... ... @@ -32,8 +35,7 @@ export default {
async fetchAll({ dispatch }) {
return Promise.all([
dispatch('fetchFriendList'),
dispatch('fetchOrderList'),
dispatch('mine/bankCard/fetchBankCard', null, { root: true })
dispatch('fetchOrderList')
]);
}
};
... ...
... ... @@ -16,6 +16,11 @@ export default function() {
status: 0
},
actions,
mutations
mutations,
getters: {
getBandLength(state, getters, rootState) {
return rootState.mine.bankCard.bankCardList.length === 1;
}
}
};
}
... ...