Merge pull request 'chenxuelian' (#108) from chenxuelian into dev
Reviewed-on: http://git.feashow.cn/feashow/pupil/pulls/108
This commit is contained in:
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
"name": "pupil",
|
||||||
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -184,9 +184,9 @@
|
|||||||
},
|
},
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
tabsList: [{
|
tabsList: [{
|
||||||
name: '上架时间'
|
name: '新品发布' // 上架时间(改)
|
||||||
}, {
|
}, {
|
||||||
name: '点赞量'
|
name: '新创意' // 点赞量(改)
|
||||||
}],
|
}],
|
||||||
tagsList: [],
|
tagsList: [],
|
||||||
scrollTop: 0, //tab标题的滚动条位置
|
scrollTop: 0, //tab标题的滚动条位置
|
||||||
|
|||||||
@@ -190,7 +190,7 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "newProductRelease/newProductRelease",
|
"path": "newProductRelease/newProductRelease",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "新品发布",
|
"navigationBarTitleText": "企业需求",
|
||||||
"navigationBarTextStyle": "white",
|
"navigationBarTextStyle": "white",
|
||||||
"navigationBarBackgroundColor": "#12CA64",
|
"navigationBarBackgroundColor": "#12CA64",
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
|
|||||||
@@ -79,10 +79,39 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="background-color: #fff;">
|
<view style="background-color: #fff;">
|
||||||
<u-form-item label="手机" borderBottom>
|
<u-form-item label="联系方式" borderBottom>
|
||||||
|
<u-radio-group
|
||||||
|
v-model="needsPublishForm.contactWay"
|
||||||
|
placement="row"
|
||||||
|
>
|
||||||
|
<u-radio
|
||||||
|
:customStyle="{marginRight: '16px'}"
|
||||||
|
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 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--input placeholder="请输入邮箱地址" :border="false" v-model="needsPublishForm.email" :disabled="btnDisabled"
|
||||||
|
placeholder-style="color:#CCCCCC"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<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>
|
||||||
|
</view>
|
||||||
<!-- <u-form-item label="验证" borderBottom>
|
<!-- <u-form-item label="验证" borderBottom>
|
||||||
<view style="display: flex;padding-right: 20rpx;align-items: center;">
|
<view style="display: flex;padding-right: 20rpx;align-items: center;">
|
||||||
<u--input placeholder="请输入验证码" :border="false" v-model="needsPublishForm.invalidCode"
|
<u--input placeholder="请输入验证码" :border="false" v-model="needsPublishForm.invalidCode"
|
||||||
@@ -224,7 +253,8 @@
|
|||||||
// return item
|
// return item
|
||||||
// })
|
// })
|
||||||
// this.productPickerColumn[0] = [...temp]
|
// this.productPickerColumn[0] = [...temp]
|
||||||
}).finally(_ => {})
|
}).finally(_ => {
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// getProductPickerList() {
|
// getProductPickerList() {
|
||||||
// const data = {}
|
// const data = {}
|
||||||
@@ -354,66 +384,55 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
if (this.btnDisabled == false) {
|
if (this.needsPublishForm.contactWay === 'mobile' && !/^1[3456789]\d{9}$/.test(this.needsPublishForm.mobile)) {
|
||||||
|
this.$toast.warn('请输入正确的手机号')
|
||||||
if (!/^1[3456789]\d{9}$/.test(this.needsPublishForm.mobile)) {
|
return false
|
||||||
this.$toast.warn('请输入正确的手机号')
|
} else if (this.needsPublishForm.contactWay === 'email' && !/^([0-9a-zA-Z_\.\-\])+\@([0-9a-zA-Z_\.\-\])+\.([a-zA-Z]+)$/.test(this.needsPublishForm.email)) {
|
||||||
return false
|
this.$toast.warn('请输入正确的邮箱地址')
|
||||||
}
|
return false
|
||||||
this.needsPublishForm.type = Number(this.tabCurrent + 1)
|
}
|
||||||
this.needsPublishForm.pub_time = this.needsPublishForm.pub_time ? this.needsPublishForm.pub_time :
|
this.needsPublishForm.type = Number(this.tabCurrent + 1)
|
||||||
|
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 => {
|
||||||
const url = item.url
|
const url = item.url
|
||||||
temp.push(url.replace(this.imgUrl + '/', ''))
|
temp.push(url.replace(this.imgUrl + '/', ''))
|
||||||
})
|
|
||||||
}
|
|
||||||
this.needsPublishForm.images = temp.join(';')
|
|
||||||
const data = {
|
|
||||||
type: null,
|
|
||||||
name: null,
|
|
||||||
pname: null,
|
|
||||||
area_code: null,
|
|
||||||
area_name: null,
|
|
||||||
images: null,
|
|
||||||
mobile: null,
|
|
||||||
class: null,
|
|
||||||
product: null,
|
|
||||||
loc: null,
|
|
||||||
desc: null,
|
|
||||||
pub_time: null,
|
|
||||||
...this.needsPublishForm
|
|
||||||
}
|
|
||||||
apiService.submitIdeasAndNeeds(data).then(res => {
|
|
||||||
this.$toast.success('提交成功')
|
|
||||||
if (res.data.code == 1) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.tabCurrent = 0
|
|
||||||
this.fileList1 = []
|
|
||||||
this.needsPublishForm = {}
|
|
||||||
// this.$toast.success(res.data.msg)
|
|
||||||
}).catch(error => {
|
|
||||||
this.$toast.warn(error)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
this.needsPublishForm.images = temp.join(';')
|
||||||
reOnLoad() {
|
const data = {
|
||||||
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
|
type: null,
|
||||||
this.$toast.warn('登录失败请重试')
|
name: null,
|
||||||
this.isLoad = false
|
pname: null,
|
||||||
// uni.navigateTo({
|
area_code: null,
|
||||||
// url: '../../pages/my/login/login'
|
area_name: null,
|
||||||
// })
|
images: null,
|
||||||
return
|
mobile: null,
|
||||||
|
class: null,
|
||||||
|
product: null,
|
||||||
|
loc: null,
|
||||||
|
desc: null,
|
||||||
|
pub_time: null,
|
||||||
|
...this.needsPublishForm
|
||||||
}
|
}
|
||||||
this.token = uni.getStorageSync('loginToken')
|
console.log(data)
|
||||||
this.isLoad = true
|
apiService.submitIdeasAndNeeds(data).then(res => {
|
||||||
this.getFormData()
|
this.$toast.success('提交成功')
|
||||||
|
console.log('esf=', res);
|
||||||
|
if (this.needsPublishForm.id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.tabCurrent = 0
|
||||||
|
this.fileList1 = []
|
||||||
|
this.needsPublishForm = {}
|
||||||
|
// this.$toast.success(res.data.msg)
|
||||||
|
}).catch(error => {
|
||||||
|
this.$toast.warn(error)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
failToLoad() {
|
failToLoad() {
|
||||||
this.$toast.warn('登录失败请重试')
|
this.$toast.warn('登录失败请重试')
|
||||||
@@ -422,7 +441,6 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -56,10 +56,10 @@
|
|||||||
classifyList: [],
|
classifyList: [],
|
||||||
tabCurrent: 0,
|
tabCurrent: 0,
|
||||||
tabList: [{
|
tabList: [{
|
||||||
name: '新品发布'
|
name: '新品发布' // 上架时间(改)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '新创意'
|
name: '新创意' // 点赞量(改)
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
imgUrl: '',
|
imgUrl: '',
|
||||||
|
|||||||
Reference in New Issue
Block a user