|
|
@ -45,7 +45,9 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
import { |
|
|
|
|
|
queryCreatorTypeImgNum |
|
|
|
|
|
} from '@/api/index.js' |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
@ -71,46 +73,40 @@ |
|
|
url: '/pages/index/upload/upload' |
|
|
url: '/pages/index/upload/upload' |
|
|
}], |
|
|
}], |
|
|
list: [{ |
|
|
list: [{ |
|
|
url: '/static/c1.png', |
|
|
typeId: 1, |
|
|
text: '头像', |
|
|
text: '头像', |
|
|
num: '16' |
|
|
num: '' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
url: '/static/c2.png', |
|
|
typeId: 2, |
|
|
text: '背景图', |
|
|
text: 'Gif动图', |
|
|
num: '1' |
|
|
num: '' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
url: '/static/c3.png', |
|
|
typeId: 3, |
|
|
text: '手机壁纸', |
|
|
text: '手机壁纸', |
|
|
num: '99' |
|
|
num: '' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
url: '/static/c4.png', |
|
|
typeId: 4, |
|
|
text: '动态壁纸', |
|
|
text: '朋友圈动图', |
|
|
num: '23', |
|
|
num: '', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
url: '/static/c5.png', |
|
|
typeId: 5, |
|
|
text: 'apple watch', |
|
|
text: '表情包', |
|
|
num: '15' |
|
|
num: '' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
url: '/static/c6.png', |
|
|
typeId: 6, |
|
|
text: '表情包', |
|
|
text: 'apple watch', |
|
|
num: '31' |
|
|
num: '' |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
created(){ |
|
|
created(){ |
|
|
const userInfo = uni.getStorageSync('userInfo') |
|
|
this.queryCreatorTypeImgNum(); |
|
|
if (!userInfo) { |
|
|
|
|
|
console.log('havent userInfo') |
|
|
|
|
|
//this.getUserInfo() |
|
|
|
|
|
} else { |
|
|
|
|
|
console.log('have userInfo') |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
changeSwiper(e){ |
|
|
changeSwiper(e){ |
|
|
@ -128,6 +124,32 @@ |
|
|
this.swiperDotIndex = e |
|
|
this.swiperDotIndex = e |
|
|
console.log('this.swiperDotIndex', this.swiperDotIndex) |
|
|
console.log('this.swiperDotIndex', this.swiperDotIndex) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
async queryCreatorTypeImgNum() { |
|
|
|
|
|
const userInfo = uni.getStorageSync('userInfo') |
|
|
|
|
|
if (!userInfo) { |
|
|
|
|
|
console.log('havent userInfo') |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
console.log('have userInfo') |
|
|
|
|
|
} |
|
|
|
|
|
const res = await queryCreatorTypeImgNum(userInfo.id) |
|
|
|
|
|
console.log('res',res) |
|
|
|
|
|
if (res.data.code === 200) { |
|
|
|
|
|
this.list[0].num = res.data.data.headNum |
|
|
|
|
|
this.list[1].num = res.data.data.gifNum |
|
|
|
|
|
this.list[2].num = res.data.data.backNum |
|
|
|
|
|
this.list[3].num = res.data.data.friendNum |
|
|
|
|
|
this.list[4].num = res.data.data.emoNum |
|
|
|
|
|
this.list[5].num = res.data.data.watchNum |
|
|
|
|
|
console.log('list',this.list) |
|
|
|
|
|
} else { |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
content: '图片分页数量加载失败!', |
|
|
|
|
|
showCancel: false |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|