Merge pull request '创意发布&需求发布列表接口初步完成' (#42) from DJ into dev
Reviewed-on: http://git.hchyun.com/feashow/pupil/pulls/42
This commit is contained in:
@@ -53,7 +53,7 @@
|
|||||||
//获取普通会员和VIP会员
|
//获取普通会员和VIP会员
|
||||||
getUser() {
|
getUser() {
|
||||||
this.$apiServe.getUser().then(res => {
|
this.$apiServe.getUser().then(res => {
|
||||||
console.log('个人信息==', res.data.data);
|
// console.log('个人信息==', res.data.data);
|
||||||
var data = res.data.data
|
var data = res.data.data
|
||||||
this.avatar = data.avatar
|
this.avatar = data.avatar
|
||||||
this.nickname = data.nickname
|
this.nickname = data.nickname
|
||||||
|
|||||||
@@ -65,6 +65,9 @@
|
|||||||
props: {
|
props: {
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
|
options: {
|
||||||
|
styleIsolation: 'shared', // 解除样式隔离
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getHistoryOrCollection()
|
this.getHistoryOrCollection()
|
||||||
this.imgUrl = uni.getStorageSync('img_url')
|
this.imgUrl = uni.getStorageSync('img_url')
|
||||||
@@ -109,7 +112,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="less">
|
||||||
.u-modal__content {
|
.u-modal__content {
|
||||||
padding: 43rpx 104rpx !important;
|
padding: 43rpx 104rpx !important;
|
||||||
text-indent: 25rpx;
|
text-indent: 25rpx;
|
||||||
@@ -123,4 +126,12 @@
|
|||||||
margin-top: 22rpx;
|
margin-top: 22rpx;
|
||||||
margin-bottom: 50rpx;
|
margin-bottom: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.u-button__text {
|
||||||
|
font-size: 24rpx !important;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 33px;
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
<u--image src="/static/my/wo_icon_hyzxbj.png" width="750rpx" height="349rpx" :lazy-load="true">
|
<u--image src="/static/my/wo_icon_hyzxbj.png" width="750rpx" height="349rpx" :lazy-load="true">
|
||||||
</u--image>
|
</u--image>
|
||||||
<myAvatar :center="show"></myAvatar>
|
<myAvatar :center="show"></myAvatar>
|
||||||
|
<view style="height: 56rpx;"></view>
|
||||||
<myForm ref="nameAndphone"></myForm>
|
<myForm ref="nameAndphone"></myForm>
|
||||||
<view class="commitment">
|
<view class="commitment">
|
||||||
{{commitment}}
|
{{commitment}}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-button type="success" text="升级VIP" color="#0EBB5B" @click="showModal()"></u-button>
|
<u-button type="success" text="升级VIP" color="#0EBB5B" @click="showModal()"></u-button>
|
||||||
<u-modal :show="showM" closeOnClickOverlay confirmText="确定" @confirm="confirm" @close="close">
|
<u-modal :show="showM" closeOnClickOverlay confirmText="确定" @confirm="confirm" @close="close">
|
||||||
<rich-text :nodes="content"></rich-text>
|
<rich-text :nodes="content"></rich-text>
|
||||||
@@ -77,8 +77,6 @@
|
|||||||
border-radius: 20rpx !important;
|
border-radius: 20rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.u-modal__content {
|
.u-modal__content {
|
||||||
padding: 43rpx 104rpx !important;
|
padding: 43rpx 104rpx !important;
|
||||||
text-indent: 14rpx;
|
text-indent: 14rpx;
|
||||||
|
|||||||
@@ -59,6 +59,7 @@
|
|||||||
showM: false,
|
showM: false,
|
||||||
content: '您确定删除吗?',
|
content: '您确定删除吗?',
|
||||||
tabCurrent: 0,
|
tabCurrent: 0,
|
||||||
|
type: '',
|
||||||
tabsList: [{
|
tabsList: [{
|
||||||
name: '需求发布'
|
name: '需求发布'
|
||||||
}, {
|
}, {
|
||||||
@@ -84,10 +85,27 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
if (this.tabCurrent == 0) {
|
||||||
|
this.type = 2
|
||||||
|
} else if (this.tabCurrent == 1) {
|
||||||
|
this.type = 1
|
||||||
|
}
|
||||||
|
this.getIdeasAndNeeds()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//获取创意发布
|
||||||
|
getIdeasAndNeeds() {
|
||||||
|
this.$apiServe.getIdeasAndNeeds(this.type).then(res => {
|
||||||
|
console.log('获取创意发布&需求发布', res.data);
|
||||||
|
// this.productList = data
|
||||||
|
}).finally(_ => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
tabChange(data) {
|
tabChange(data) {
|
||||||
this.tabCurrent = data.index
|
this.tabCurrent = data.index
|
||||||
this.needsPublishForm = {}
|
this.getIdeasAndNeeds()
|
||||||
},
|
},
|
||||||
//删除按钮
|
//删除按钮
|
||||||
showModal() {
|
showModal() {
|
||||||
@@ -113,7 +131,6 @@
|
|||||||
editIdeas() {
|
editIdeas() {
|
||||||
console.log('修改创意');
|
console.log('修改创意');
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
// id=' + ideaId + '&
|
|
||||||
url: '/pages/ideasAndNeeds/ideasAndNeeds?index=' + 1
|
url: '/pages/ideasAndNeeds/ideasAndNeeds?index=' + 1
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -122,39 +139,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.u-modal {
|
|
||||||
width: 472rpx !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.u-modal__button-group__wrapper--cancel {
|
|
||||||
|
|
||||||
background: #D8D8D8;
|
|
||||||
|
|
||||||
.u-modal__button-group__wrapper__text {
|
|
||||||
color: #fff !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.u-modal__content {
|
.u-modal__content {
|
||||||
padding: 43rpx 104rpx !important;
|
padding: 43rpx 104rpx !important;
|
||||||
text-indent: 25rpx;
|
text-indent: 25rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-modal__content__text {
|
|
||||||
font-size: 32rpx !important;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #252421 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.u-modal__button-group__wrapper--confirm {
|
|
||||||
background: #0EBB5B;
|
|
||||||
|
|
||||||
.u-modal__button-group__wrapper__text {
|
|
||||||
color: #fff !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.u-tabs {
|
.u-tabs {
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
|
|||||||
@@ -243,6 +243,13 @@ const apiService = {
|
|||||||
resolve(service.post(url, id))
|
resolve(service.post(url, id))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//获取创意发布&需求发布
|
||||||
|
getIdeasAndNeeds(type) {
|
||||||
|
const url = `/center/rlist?type=${type}`
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
resolve(service.get(url, type))
|
||||||
|
})
|
||||||
|
},
|
||||||
//收藏按钮
|
//收藏按钮
|
||||||
collect(pid) {
|
collect(pid) {
|
||||||
const url = `/center/addfav/?pid=${pid}`
|
const url = `/center/addfav/?pid=${pid}`
|
||||||
|
|||||||
@@ -46,4 +46,7 @@
|
|||||||
margin-top: 35rpx;
|
margin-top: 35rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.u-image__error {
|
||||||
|
position: static !important;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user