Merge pull request 'chenxuelian' (#111) from chenxuelian into dev
Reviewed-on: http://git.feashow.cn/feashow/pupil/pulls/111
This commit is contained in:
@@ -65,14 +65,11 @@
|
|||||||
methods: {
|
methods: {
|
||||||
//获取按点赞量排列的产品列表
|
//获取按点赞量排列的产品列表
|
||||||
getProductsByThumb() {
|
getProductsByThumb() {
|
||||||
this.$apiServe.getProductList({
|
this.$apiServe.getProductsByCateId({
|
||||||
cateId: 0,
|
cateId: '9',
|
||||||
tagIds: 0,
|
|
||||||
sortType: 1,
|
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
pageNum: this.pageNum
|
pageNum: this.pageNum
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|
||||||
let tags = res.data.data
|
let tags = res.data.data
|
||||||
console.log('企业需求列表', tags);
|
console.log('企业需求列表', tags);
|
||||||
for (const item of tags) {
|
for (const item of tags) {
|
||||||
|
|||||||
@@ -313,9 +313,9 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 36rpx;
|
font-size: 44rpx;
|
||||||
font-weight: 400;
|
font-weight: blod;
|
||||||
color: #0EBB5B;
|
color: #134b40;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -336,7 +336,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.desc {
|
.desc {
|
||||||
font-size: 30rpx;
|
font-size: 38rpx;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #3E3E3E;
|
color: #3E3E3E;
|
||||||
@@ -345,11 +345,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.classify {
|
.classify {
|
||||||
width: 80rpx;
|
width: 100rpx;
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
border: 1rpx solid #EEEEEE;
|
border: 1rpx solid #EEEEEE;
|
||||||
font-size: 20rpx;
|
font-size: 24rpx;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
@@ -362,7 +362,7 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 14rpx;
|
padding-top: 14rpx;
|
||||||
font-size: 20rpx;
|
font-size: 24rpx;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #CCCCCC;
|
color: #CCCCCC;
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="background-color: #fff;">
|
<view style="background-color: #fff;">
|
||||||
<u-form-item label="联系方式" borderBottom>
|
<u-form-item v-if="false" label="联系方式" borderBottom>
|
||||||
<u-radio-group v-model="needsPublishForm.contactWay" placement="row">
|
<u-radio-group v-model="needsPublishForm.contactWay" placement="row">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}" label="手机" name="mobile" :disabled="btnDisabled">
|
<u-radio :customStyle="{marginRight: '16px'}" label="手机" name="mobile" :disabled="btnDisabled">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
@@ -87,11 +87,11 @@
|
|||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item v-if="needsPublishForm.contactWay === 'mobile'" label="手机" borderBottom>
|
<u-form-item label="手机" borderBottom>
|
||||||
<u--input placeholder="请输入手机号" :border="false" v-model="needsPublishForm.mobile"
|
<u--input placeholder="请输入手机号" :border="false" v-model="needsPublishForm.mobile"
|
||||||
placeholder-style="color:#CCCCCC" :disabled="btnDisabled" disabledColor="#ffffff"></u--input>
|
placeholder-style="color:#CCCCCC" :disabled="btnDisabled" disabledColor="#ffffff"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item v-if="needsPublishForm.contactWay === 'email'" label="邮箱" borderBottom>
|
<u-form-item label="邮箱" borderBottom>
|
||||||
<u--input placeholder="请输入邮箱地址" :border="false" v-model="needsPublishForm.email"
|
<u--input placeholder="请输入邮箱地址" :border="false" v-model="needsPublishForm.email"
|
||||||
:disabled="btnDisabled" placeholder-style="color:#CCCCCC"></u--input>
|
:disabled="btnDisabled" placeholder-style="color:#CCCCCC"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
@@ -373,12 +373,18 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
if (this.needsPublishForm.contactWay === 'mobile' && !/^1[3456789]\d{9}$/.test(this.needsPublishForm
|
if (!this.needsPublishForm.mobile && !this.needsPublishForm.email) {
|
||||||
.mobile)) {
|
this.$toast.warn('请输入正确的手机号或者正确的邮箱地址')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (this.tabCurrent === 1 && this.fileList1.length < 1) {
|
||||||
|
this.$toast.warn('请至少上传一张图片')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (this.needsPublishForm.mobile && !/^1[3456789]\d{9}$/.test(this.needsPublishForm.mobile)) {
|
||||||
this.$toast.warn('请输入正确的手机号')
|
this.$toast.warn('请输入正确的手机号')
|
||||||
return false
|
return false
|
||||||
} else if (this.needsPublishForm.contactWay === 'email' && !
|
} else if (this.needsPublishForm.email && !/^([0-9a-zA-Z_\.\-\])+\@([0-9a-zA-Z_\.\-\])+\.([a-zA-Z]+)$/.test(this.needsPublishForm.email)) {
|
||||||
/^([0-9a-zA-Z_\.\-\])+\@([0-9a-zA-Z_\.\-\])+\.([a-zA-Z]+)$/.test(this.needsPublishForm.email)) {
|
|
||||||
this.$toast.warn('请输入正确的邮箱地址')
|
this.$toast.warn('请输入正确的邮箱地址')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -410,15 +416,19 @@
|
|||||||
...this.needsPublishForm
|
...this.needsPublishForm
|
||||||
}
|
}
|
||||||
apiService.submitIdeasAndNeeds(data).then(res => {
|
apiService.submitIdeasAndNeeds(data).then(res => {
|
||||||
this.$toast.success('提交成功')
|
if (res.data.code === 1) {
|
||||||
// if (this.needsPublishForm.id) {
|
this.$toast.success('提交成功')
|
||||||
uni.navigateTo({
|
// if (this.needsPublishForm.id) {
|
||||||
url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1)
|
uni.navigateTo({
|
||||||
})
|
url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1)
|
||||||
// }
|
})
|
||||||
this.tabCurrent = 0
|
// }
|
||||||
this.fileList1 = []
|
this.tabCurrent = 0
|
||||||
this.needsPublishForm = {}
|
this.fileList1 = []
|
||||||
|
this.needsPublishForm = {}
|
||||||
|
} else{
|
||||||
|
this.$toast.warn(res.data.msg)
|
||||||
|
}
|
||||||
// this.$toast.success(res.data.msg)
|
// this.$toast.success(res.data.msg)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$toast.warn(error)
|
this.$toast.warn(error)
|
||||||
|
|||||||
@@ -361,6 +361,13 @@ const apiService = {
|
|||||||
resolve(service.get(url, data))
|
resolve(service.get(url, data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 获取首页分类
|
||||||
|
getProductsByCateId(data) {
|
||||||
|
const url = `/home/plist`
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
resolve(service.get(url, data))
|
||||||
|
})
|
||||||
|
},
|
||||||
// 搜索发现 热搜
|
// 搜索发现 热搜
|
||||||
getDiscover() {
|
getDiscover() {
|
||||||
const url = `/home/discover`
|
const url = `/home/discover`
|
||||||
|
|||||||
Reference in New Issue
Block a user