Authored by shuiling.wang@yoho.cn

个人中心资源位添加

... ... @@ -2,6 +2,8 @@ const Vue = require('vue');
const home = require('me/home.vue');
const yoho = require('yoho');
require('common/vue-filter')(Vue);
yoho.ready(() => {
new Vue({
el: '#home',
... ...
... ... @@ -5,7 +5,7 @@
<div class="my-header" v-if="data.nickName">
<a class="user-info auth" id="user-info" href='/me/mydetails'>
<img class="user-avatar" :src="headIco" @error="setEmptyimg">
<span class="username">{{ data.nickName }}</span>
<span class="username" :class="{'username-top': !data.vipLevel}">{{ data.nickName }}</span>
<div class="account-mg">账号管理<span class="icon icon-right"></span></div>
</a>
<a class="vip-level level-{{data.vipLevel}}" v-if="data.vipLevel" href='/me/grade'></a>
... ... @@ -108,8 +108,14 @@
</p>
</div>
<div class="group-list">
<img class="home-banner">
<div class="group-list swiper-area" v-if="floor.length > 0">
<swipe class="swipe" style="height: 8.35rem">
<swipe-item v-for="item in floor" :style="{backgroundColor: item.bgColor}">
<a :href="item.url | transformBlk" :title="item.title">
<img :src="item.src | resize 690 334">
</a>
</swipe-item>
</swipe>
</div>
</template>
... ... @@ -119,6 +125,8 @@
const interceptClick = require('common/intercept-click');
const cheader = require('component/header.vue');
const cookie = require('yoho-cookie');
require('vue-swipe/dist/vue-swipe.css');
const swipe = require('vue-swipe');
function getRecordsNum(that) {
... ... @@ -139,11 +147,14 @@
headIco: '',
recordNum: '',
productNum: '',
editorialNum: ''
editorialNum: '',
floor: []
};
},
components: {
cheader
cheader,
swipe: swipe.Swipe,
swipeItem: swipe.SwipeItem
},
methods: {
setEmptyimg() {
... ... @@ -155,6 +166,26 @@
$('.auth').off('click', this.authClick);
$('.auth').removeClass('no-intercept');
$.get('/channel/resources.json', {
contentCode: 'dfdda9e519bafc0a248d71ebc0c11d4e'
}).then(ret => {
console.log(ret)
this.floor = [
{
bgColor: '',
url: 'https://m.yohoblk.com/product/shop/joyrich',
title: '',
src: 'http://img10.static.yhbimg.com/yhb-img01/2017/07/19/09/016a37d6f181d31a55a964d903d940d26a.jpg?imageView2/{mode}/w/{width}/h/{height}'
},
{
bgColor: '',
url: 'https://m.yohoblk.com/product/shop/joyrich',
title: '',
src: 'http://img10.static.yhbimg.com/yhb-img01/2017/07/19/09/016a37d6f181d31a55a964d903d940d26a.jpg?imageView2/{mode}/w/{width}/h/{height}'
}
];
});
if (yoho.isLogin()) {
$.ajax({
... ... @@ -393,6 +424,10 @@
top: -15px;
}
.username-top {
top: 10px;
}
.unlisted {
padding: 0;
... ... @@ -609,6 +644,19 @@
display: block;
margin: 30px auto;
}
.swiper-area {
padding-bottom: 30px;
}
.swipe {
width: 690px;
margin: 30px auto 0;
img {
width: 100%;
}
}
}
.app.ios {
... ...