Merge pull request '邓洁 : 修改小程序bug' (#110) from dj into dev
Reviewed-on: http://git.feashow.cn/feashow/pupil/pulls/110
This commit is contained in:
@@ -45,6 +45,9 @@
|
|||||||
pageSize: 4, // 每页条数
|
pageSize: 4, // 每页条数
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
reportPageSize: String
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
// uni.$on("getCurrent", data => {
|
// uni.$on("getCurrent", data => {
|
||||||
// if (data == 0) {
|
// if (data == 0) {
|
||||||
@@ -54,18 +57,24 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
this.imgUrl = uni.getStorageSync('img_url')
|
this.imgUrl = uni.getStorageSync('img_url')
|
||||||
|
if (this.reportPageSize == 6) {
|
||||||
|
this.pageSize = this.reportPageSize
|
||||||
|
}
|
||||||
this.getProductsByThumb()
|
this.getProductsByThumb()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取按点赞量排列的产品列表
|
//获取按点赞量排列的产品列表
|
||||||
getProductsByThumb() {
|
getProductsByThumb() {
|
||||||
this.$apiServe.getProducts({
|
this.$apiServe.getProductList({
|
||||||
sortType: 2,
|
cateId: 0,
|
||||||
|
tagIds: 0,
|
||||||
|
sortType: 1,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
pageNum: this.pageNum
|
pageNum: this.pageNum
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('产品列表2', res.data);
|
|
||||||
let tags = res.data.data
|
let tags = res.data.data
|
||||||
|
console.log('企业需求列表', tags);
|
||||||
for (const item of tags) {
|
for (const item of tags) {
|
||||||
let tag = item.tags
|
let tag = item.tags
|
||||||
this.tagsArray = tag.split(',')
|
this.tagsArray = tag.split(',')
|
||||||
@@ -76,16 +85,8 @@
|
|||||||
this.productList = [...this.productList, ...res.data.data]
|
this.productList = [...this.productList, ...res.data.data]
|
||||||
//这用于上架时间和点赞量的数据切换
|
//这用于上架时间和点赞量的数据切换
|
||||||
// this.productList = res.data.data
|
// this.productList = res.data.data
|
||||||
}).finally(_ => {
|
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//点击图片跳转到详情页
|
|
||||||
toDetailPage(item) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/detail/productsDetail/productsDetail?id=' + item.id
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #C8C8C8;
|
color: #C8C8C8;
|
||||||
line-height: 28rpx;
|
line-height: 30rpx;
|
||||||
margin: 40rpx 66rpx;
|
margin: 40rpx 66rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<productsByTime ref="productsByTime" @getTimeLength="getTimeLength"></productsByTime>
|
<productsByThumb ref="productsByThumb" :reportPageSize="6" @getThumbLength="getThumbLength"></productsByThumb>
|
||||||
<view style="font-size: 24rpx;color: #A3A3A3;text-align: center;padding: 26rpx 0;"
|
<view style="font-size: 24rpx;color: #A3A3A3;text-align: center;padding: 26rpx 0;"
|
||||||
v-show="reachBottomLength===0">
|
v-show="reachBottomLength===0||reachBottomLength<=4">
|
||||||
没有更多数据了</view>
|
没有更多数据了</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -11,26 +11,20 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
reachBottomLength: ''
|
reachBottomLength: '',
|
||||||
|
reportPageSize: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.$refs.productsByTime.pageNum++
|
this.$refs.productsByThumb.pageSize = 4
|
||||||
this.$refs.productsByTime.getProductsByTime()
|
this.$refs.productsByThumb.pageNum++
|
||||||
},
|
this.$refs.productsByThumb.getProductsByThumb()
|
||||||
onLoad() {
|
|
||||||
this.$refs.productsByTime.pageSize = 2
|
|
||||||
this.$refs.productsByTime.getProductsByTime()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取按上架时间排列的产品列表length
|
//获取按上架时间排列的产品列表length
|
||||||
getTimeLength(e) {
|
getThumbLength(e) {
|
||||||
this.reachBottomLength = e
|
this.reachBottomLength = e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -184,9 +184,9 @@
|
|||||||
},
|
},
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
tabsList: [{
|
tabsList: [{
|
||||||
name: '新品发布' // 上架时间(改)
|
name: '上架时间' // 上架时间(改)
|
||||||
}, {
|
}, {
|
||||||
name: '新创意' // 点赞量(改)
|
name: '点赞量' // 点赞量(改)
|
||||||
}],
|
}],
|
||||||
tagsList: [],
|
tagsList: [],
|
||||||
scrollTop: 0, //tab标题的滚动条位置
|
scrollTop: 0, //tab标题的滚动条位置
|
||||||
|
|||||||
@@ -80,35 +80,24 @@
|
|||||||
|
|
||||||
<view style="background-color: #fff;">
|
<view style="background-color: #fff;">
|
||||||
<u-form-item label="联系方式" borderBottom>
|
<u-form-item label="联系方式" borderBottom>
|
||||||
<u-radio-group
|
<u-radio-group v-model="needsPublishForm.contactWay" placement="row">
|
||||||
v-model="needsPublishForm.contactWay"
|
<u-radio :customStyle="{marginRight: '16px'}" label="手机" name="mobile" :disabled="btnDisabled">
|
||||||
placement="row"
|
</u-radio>
|
||||||
>
|
<u-radio label="邮箱" name="email" :disabled="btnDisabled">
|
||||||
<u-radio
|
</u-radio>
|
||||||
:customStyle="{marginRight: '16px'}"
|
</u-radio-group>
|
||||||
label="手机"
|
|
||||||
name="mobile"
|
|
||||||
:disabled="btnDisabled"
|
|
||||||
>
|
|
||||||
</u-radio>
|
|
||||||
<u-radio
|
|
||||||
label="邮箱"
|
|
||||||
name="email"
|
|
||||||
:disabled="btnDisabled"
|
|
||||||
>
|
|
||||||
</u-radio>
|
|
||||||
</u-radio-group>
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item v-if="needsPublishForm.contactWay === 'mobile'" label="手机" borderBottom>
|
<u-form-item v-if="needsPublishForm.contactWay === 'mobile'" 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 v-if="needsPublishForm.contactWay === 'email'" label="邮箱" borderBottom>
|
||||||
<u--input placeholder="请输入邮箱地址" :border="false" v-model="needsPublishForm.email" :disabled="btnDisabled"
|
<u--input placeholder="请输入邮箱地址" :border="false" v-model="needsPublishForm.email"
|
||||||
placeholder-style="color:#CCCCCC"></u--input>
|
:disabled="btnDisabled" placeholder-style="color:#CCCCCC"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view style="padding: 6rpx 20rpx 0;text-align: left;background-color: #fff;">
|
<view style="padding: 6rpx 20rpx 0;text-align: left;background-color: #fff;">
|
||||||
<text style="font-size: 24rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #C8C8C8;line-height: 28rpx;">
|
<text
|
||||||
|
style="font-size: 24rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #C8C8C8;line-height: 28rpx;">
|
||||||
联系方式将不对外发布。如有相关意向,平台会以您留下的联系方式通知您。
|
联系方式将不对外发布。如有相关意向,平台会以您留下的联系方式通知您。
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -216,6 +205,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.needsPublishForm = publishFormList
|
this.needsPublishForm = publishFormList
|
||||||
|
console.log('this.needsPublishForm', this.needsPublishForm);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.warn(error)
|
this.$toast.warn(error)
|
||||||
}
|
}
|
||||||
@@ -253,8 +243,7 @@
|
|||||||
// return item
|
// return item
|
||||||
// })
|
// })
|
||||||
// this.productPickerColumn[0] = [...temp]
|
// this.productPickerColumn[0] = [...temp]
|
||||||
}).finally(_ => {
|
}).finally(_ => {})
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// getProductPickerList() {
|
// getProductPickerList() {
|
||||||
// const data = {}
|
// const data = {}
|
||||||
@@ -384,16 +373,18 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
if (this.needsPublishForm.contactWay === 'mobile' && !/^1[3456789]\d{9}$/.test(this.needsPublishForm.mobile)) {
|
if (this.needsPublishForm.contactWay === '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' && !/^([0-9a-zA-Z_\.\-\])+\@([0-9a-zA-Z_\.\-\])+\.([a-zA-Z]+)$/.test(this.needsPublishForm.email)) {
|
} else if (this.needsPublishForm.contactWay === '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
|
||||||
}
|
}
|
||||||
this.needsPublishForm.type = Number(this.tabCurrent + 1)
|
this.needsPublishForm.type = Number(this.tabCurrent + 1)
|
||||||
this.needsPublishForm.pub_time = this.needsPublishForm.pub_time ? this.needsPublishForm.pub_time :
|
this.needsPublishForm.pub_time = this.needsPublishForm.pub_time ? this.needsPublishForm.pub_time :
|
||||||
Math.round(new Date().getTime() / 1000)
|
Math.round(new Date().getTime() / 1000)
|
||||||
const temp = []
|
const temp = []
|
||||||
if (this.fileList1.length > 0) {
|
if (this.fileList1.length > 0) {
|
||||||
this.fileList1.map(item => {
|
this.fileList1.map(item => {
|
||||||
@@ -410,6 +401,7 @@
|
|||||||
area_name: null,
|
area_name: null,
|
||||||
images: null,
|
images: null,
|
||||||
mobile: null,
|
mobile: null,
|
||||||
|
email: null,
|
||||||
class: null,
|
class: null,
|
||||||
product: null,
|
product: null,
|
||||||
loc: null,
|
loc: null,
|
||||||
@@ -419,11 +411,11 @@
|
|||||||
}
|
}
|
||||||
apiService.submitIdeasAndNeeds(data).then(res => {
|
apiService.submitIdeasAndNeeds(data).then(res => {
|
||||||
this.$toast.success('提交成功')
|
this.$toast.success('提交成功')
|
||||||
if (this.needsPublishForm.id) {
|
// if (this.needsPublishForm.id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1)
|
url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1)
|
||||||
})
|
})
|
||||||
}
|
// }
|
||||||
this.tabCurrent = 0
|
this.tabCurrent = 0
|
||||||
this.fileList1 = []
|
this.fileList1 = []
|
||||||
this.needsPublishForm = {}
|
this.needsPublishForm = {}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
name: '新品发布' // 上架时间(改)
|
name: '新品发布' // 上架时间(改)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '新创意' // 点赞量(改)
|
name: '企业需求' // 点赞量(改)
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
imgUrl: '',
|
imgUrl: '',
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</u--image>
|
</u--image>
|
||||||
<text class="xpfb_text text">企业需求</text>
|
<text class="xpfb_text text">企业需求</text>
|
||||||
</view>
|
</view>
|
||||||
<productsByTime></productsByTime>
|
<productsByThumb></productsByThumb>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 认证厂家 -->
|
<!-- 认证厂家 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user