|
@@ -283,10 +283,10 @@
|
|
|
<script>
|
|
|
import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
|
|
|
import paymentRecord from '@/components/cm-module/orderDetails/paymentRecord'
|
|
|
- import { uploadFileImage , uploadFilePdf } from "@/services/public.js"
|
|
|
+ import { uploadFileImage , uploadFilePdf } from '@/services/public.js'
|
|
|
import authorize from '@/common/config/authorize.js'
|
|
|
import $reg from '@/common/config/common.js'
|
|
|
- import { mapState,mapMutations } from 'vuex';
|
|
|
+ import { mapState,mapMutations } from 'vuex'
|
|
|
export default{
|
|
|
name:'secondHandrelease',
|
|
|
components:{
|
|
@@ -364,14 +364,14 @@
|
|
|
},
|
|
|
methods:{
|
|
|
onTextareaInputInfo(e){
|
|
|
- this.secondParams.productDetails = e.detail.value;
|
|
|
+ this.secondParams.productDetails = e.detail.value
|
|
|
},
|
|
|
radioChange(e){//品牌
|
|
|
- this.secondParams.brandId = e.target.value;
|
|
|
+ this.secondParams.brandId = e.target.value
|
|
|
this.BrandList.forEach((item,index)=>{
|
|
|
if(item.id==this.secondParams.brandId){
|
|
|
- this.brandname = item.name;
|
|
|
- this.popupShow = false;
|
|
|
+ this.brandname = item.name
|
|
|
+ this.popupShow = false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -380,58 +380,59 @@
|
|
|
this.$refs.mpvueCityPicker.show()
|
|
|
},
|
|
|
onConfirm(e) {//获取选择的地址信息
|
|
|
- this.addressData.address = e.name;
|
|
|
- this.addressData.townID = e.townCode;
|
|
|
- this.addressData.cityID = e.cityCode;
|
|
|
- this.addressData.provinceID = e.provinceCode;
|
|
|
- this.secondParams.townId = this.addressData.townID;
|
|
|
+ this.addressData.address = e.name
|
|
|
+ this.addressData.townID = e.townCode
|
|
|
+ this.addressData.cityID = e.cityCode
|
|
|
+ this.addressData.provinceID = e.provinceCode
|
|
|
+ this.secondParams.townId = this.addressData.townID
|
|
|
},
|
|
|
hanldOperationConfim(){
|
|
|
- this.popupShow = true;
|
|
|
+ this.popupShow = true
|
|
|
},
|
|
|
hidePopup(){
|
|
|
- this.popupShow = false;
|
|
|
+ this.popupShow = false
|
|
|
},
|
|
|
secondHandRidio(e) {
|
|
|
- this.secondParams.secondHandType = e.target.value;
|
|
|
+ this.secondParams.secondHandType = e.target.value
|
|
|
if (e.target.value == 1){
|
|
|
- this.isShow = true;
|
|
|
+ this.isShow = true
|
|
|
+ this.secondParams.instrumentType = '1'
|
|
|
}else {
|
|
|
- this.isShow = false;
|
|
|
+ this.isShow = false
|
|
|
}
|
|
|
},
|
|
|
secondHandType(e){ //二手仪器
|
|
|
- this.secondParams.instrumentType = e.target.value.toString();
|
|
|
+ this.secondParams.instrumentType = e.target.value.toString()
|
|
|
},
|
|
|
Detailed(){
|
|
|
- this.vShow_detailTalkFlag = !this.vShow_detailTalkFlag;
|
|
|
+ this.vShow_detailTalkFlag = !this.vShow_detailTalkFlag
|
|
|
if(this.vShow_detailTalkFlag){
|
|
|
- this.secondParams.detailTalkFlag = 2 ;//启用价格详聊
|
|
|
+ this.secondParams.detailTalkFlag = 2 //启用价格详聊
|
|
|
}else {
|
|
|
- this.secondParams.detailTalkFlag = 1 ;//不启用价格详聊
|
|
|
+ this.secondParams.detailTalkFlag = 1 //不启用价格详聊
|
|
|
}
|
|
|
},
|
|
|
uploadGoodsImagesFn(event){//上传商品图片
|
|
|
uploadFileImage().then(res =>{
|
|
|
- this.GoodsImagesList.push(JSON.parse(res.data).data);
|
|
|
- this.secondParams.image =this.GoodsImagesList.toString()+',';
|
|
|
+ this.GoodsImagesList.push(JSON.parse(res.data).data)
|
|
|
+ this.secondParams.image =this.GoodsImagesList.toString()+','
|
|
|
})
|
|
|
},
|
|
|
uploadUserImageFn(event){//上传身份图片
|
|
|
uploadFileImage().then(res =>{
|
|
|
- this.secondParams.authenticationImage = JSON.parse(res.data).data;
|
|
|
+ this.secondParams.authenticationImage = JSON.parse(res.data).data
|
|
|
})
|
|
|
},
|
|
|
uploadCommitmentImageFn(event){//上传承诺函图片
|
|
|
uploadFileImage().then(res =>{
|
|
|
- this.secondParams.commitmentImage = JSON.parse(res.data).data;
|
|
|
+ this.secondParams.commitmentImage = JSON.parse(res.data).data
|
|
|
})
|
|
|
},
|
|
|
uploadCommitmentFile(){//上传承诺函文件
|
|
|
uploadFilePdf().then(res =>{
|
|
|
let data = JSON.parse(res.data).data
|
|
|
- this.secondParams.fileName = uni.getStorageSync('fileName');
|
|
|
- this.secondParams.ossName = data.ossName;
|
|
|
+ this.secondParams.fileName = uni.getStorageSync('fileName')
|
|
|
+ this.secondParams.ossName = data.ossName
|
|
|
console.log('fileName',this.secondParams.fileName)
|
|
|
console.log('ossName',this.secondParams.ossName)
|
|
|
})
|
|
@@ -440,8 +441,8 @@
|
|
|
this.secondParams.fileName = ''
|
|
|
},
|
|
|
removeGoodsImagesFn(index){//删除商品图片
|
|
|
- this.GoodsImagesList.splice(index,1);
|
|
|
- this.secondParams.image =this.GoodsImagesList.toString()+',';
|
|
|
+ this.GoodsImagesList.splice(index,1)
|
|
|
+ this.secondParams.image =this.GoodsImagesList.toString()+','
|
|
|
},
|
|
|
removeUserImageFn(index){//删除身份图片
|
|
|
this.secondParams.authenticationImage = ''
|
|
@@ -450,25 +451,25 @@
|
|
|
this.secondParams.commitmentImage = ''
|
|
|
},
|
|
|
getProductType(e){
|
|
|
- this.secondParams.secondProductType = e.target.value ;
|
|
|
+ this.secondParams.secondProductType = e.target.value
|
|
|
},
|
|
|
submitBtn () {
|
|
|
if(this.secondParams.secondHandType == ''){
|
|
|
- this.$util.msg('请选择分类',2000);
|
|
|
- return;
|
|
|
+ this.$util.msg('请选择分类',2000)
|
|
|
+ return
|
|
|
}
|
|
|
if(this.secondParams.secondHandType == 1 ){
|
|
|
if(this.secondParams.instrumentType ==''){
|
|
|
- this.$util.msg('请完善仪器分类',2000);
|
|
|
- return;
|
|
|
+ this.$util.msg('请完善仪器分类',2000)
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
if(this.secondParams.brandId == ''){
|
|
|
- this.$util.msg('请选择商品品牌',2000);
|
|
|
- return;
|
|
|
+ this.$util.msg('请选择商品品牌',2000)
|
|
|
+ return
|
|
|
}
|
|
|
if(this.secondParams.name == ''){
|
|
|
- this.$util.msg('请输入商品名称',2000);
|
|
|
+ this.$util.msg('请输入商品名称',2000)
|
|
|
return
|
|
|
}
|
|
|
// if(this.secondParams.secondHandType ==2) {
|
|
@@ -478,7 +479,7 @@
|
|
|
// }
|
|
|
// }
|
|
|
if(!this.$api.isNumber(this.secondParams.price)){
|
|
|
- this.$util.msg('请输入交易价',2000);
|
|
|
+ this.$util.msg('请输入交易价',2000)
|
|
|
return
|
|
|
}
|
|
|
// if(this.secondParams.secondHandType ==2) {
|
|
@@ -496,52 +497,52 @@
|
|
|
// }
|
|
|
// }
|
|
|
if(this.secondParams.productQuality == ''){
|
|
|
- this.$util.msg('请输入商品成色',2000);
|
|
|
+ this.$util.msg('请输入商品成色',2000)
|
|
|
return
|
|
|
}
|
|
|
if(this.secondParams.contactName == ''){
|
|
|
- this.$util.msg('请输入联系人姓名',2000);
|
|
|
+ this.$util.msg('请输入联系人姓名',2000)
|
|
|
return
|
|
|
}
|
|
|
if(this.secondParams.contactMobile == ''){
|
|
|
console.log(this.secondParams.contactMobile)
|
|
|
- this.$util.msg('请输入联系方式',2000);
|
|
|
+ this.$util.msg('请输入联系方式',2000)
|
|
|
return
|
|
|
}
|
|
|
if(!$reg.isMobile(this.secondParams.contactMobile)){
|
|
|
- this.$util.msg('请填写正确的手机号',2000);
|
|
|
+ this.$util.msg('请填写正确的手机号',2000)
|
|
|
return
|
|
|
}
|
|
|
if(this.userIdentity === 1){
|
|
|
if(this.secondParams.dockingPeopleName == ''){
|
|
|
- this.$util.msg('请输入采美对接人姓名',2000);
|
|
|
+ this.$util.msg('请输入采美对接人姓名',2000)
|
|
|
return
|
|
|
}
|
|
|
if(this.secondParams.dockingPeopleMobile == ''){
|
|
|
- this.$util.msg('请输入采美对接人手机号',2000);
|
|
|
+ this.$util.msg('请输入采美对接人手机号',2000)
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
if(this.secondParams.dockingPeopleMobile !=''){
|
|
|
if(!$reg.isMobile(this.secondParams.dockingPeopleMobile)){
|
|
|
- this.$util.msg('请填写正确的采美对接人手机号',2000);
|
|
|
+ this.$util.msg('请填写正确的采美对接人手机号',2000)
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
if(this.secondParams.townId == ''|| this.secondParams.townId == undefined){
|
|
|
- this.$util.msg('请完善联系地址',2000);
|
|
|
+ this.$util.msg('请完善联系地址',2000)
|
|
|
return
|
|
|
}
|
|
|
if(this.secondParams.address == ''){
|
|
|
- this.$util.msg('请填写详细地址',2000);
|
|
|
+ this.$util.msg('请填写详细地址',2000)
|
|
|
return
|
|
|
}
|
|
|
if(this.GoodsImagesList ==''){
|
|
|
- this.$util.msg('请上传图片',2000);
|
|
|
- return;
|
|
|
+ this.$util.msg('请上传图片',2000)
|
|
|
+ return
|
|
|
}
|
|
|
if(this.checkbox==false){
|
|
|
- this.$util.msg('请勾选已阅读',2000);
|
|
|
+ this.$util.msg('请勾选已阅读',2000)
|
|
|
return
|
|
|
}
|
|
|
console.log(this.secondParams)
|
|
@@ -551,7 +552,7 @@
|
|
|
this.cancelButtonText = '继续发布'
|
|
|
this.confirmButtonText = '去上传'
|
|
|
this.isButtonsType = 1
|
|
|
- return;
|
|
|
+ return
|
|
|
}
|
|
|
if(this.secondParams.commitmentImage == '' || this.secondParams.ossName == ''){
|
|
|
this.PopupShow = true
|
|
@@ -559,21 +560,21 @@
|
|
|
this.cancelButtonText = '继续发布'
|
|
|
this.confirmButtonText = '去上传'
|
|
|
this.isButtonsType = 1
|
|
|
- return;
|
|
|
+ return
|
|
|
}
|
|
|
this.SecondHandProduct(this.secondParams)
|
|
|
},
|
|
|
SecondHandProduct(params){//提交发布
|
|
|
this.SecondService.SecondHandProduct(params).then(res=>{
|
|
|
- this.PopupShow = true;
|
|
|
+ this.PopupShow = true
|
|
|
this.tipsContentText = '发布二手商品,采美需要收取您每个商品100元的展示费,展示期为3个月支付完成后,商品会在1-2个工作日内进行审核,审核通过后,商品会立即上线'
|
|
|
this.cancelButtonText = '取消发布'
|
|
|
this.confirmButtonText = '去支付'
|
|
|
this.isButtonsType = 2
|
|
|
- this.playid= res.data;
|
|
|
+ this.playid= res.data
|
|
|
}).catch(error =>{
|
|
|
this.$util.msg(error.msg,2000)
|
|
|
- this.secondBj = false;
|
|
|
+ this.secondBj = false
|
|
|
return
|
|
|
})
|
|
|
},
|
|
@@ -581,21 +582,21 @@
|
|
|
switch(this.isButtonsType){
|
|
|
case 1:
|
|
|
this.SecondHandProduct(this.secondParams)
|
|
|
- break;
|
|
|
+ break
|
|
|
case 2:
|
|
|
- this.PopupShow = false;
|
|
|
- break;
|
|
|
+ this.PopupShow = false
|
|
|
+ break
|
|
|
}
|
|
|
},
|
|
|
confirmButtonFn(){//弹窗操作按钮
|
|
|
switch(this.isButtonsType){
|
|
|
case 1:
|
|
|
- this.PopupShow = false;
|
|
|
- break;
|
|
|
+ this.PopupShow = false
|
|
|
+ break
|
|
|
case 2:
|
|
|
this.MiniWxPayFor()
|
|
|
- this.PopupShow = false;
|
|
|
- break;
|
|
|
+ this.PopupShow = false
|
|
|
+ break
|
|
|
}
|
|
|
},
|
|
|
MiniWxPayFor(){
|
|
@@ -605,7 +606,7 @@
|
|
|
productId:this.playid
|
|
|
}
|
|
|
this.PayService.SecondHandPay(params).then(response =>{
|
|
|
- let PayInfo = JSON.parse(response.data.data.payInfo);
|
|
|
+ let PayInfo = JSON.parse(response.data.data.payInfo)
|
|
|
this.WxRequestPayment(PayInfo)
|
|
|
}).catch(error =>{
|
|
|
this.$util.msg(error.msg,2000)
|
|
@@ -621,7 +622,7 @@
|
|
|
'signType': data.signType,
|
|
|
'paySign': data.paySign,
|
|
|
'success':function(res){
|
|
|
- wx.reLaunch({url: '/pages/second/product/product-list'});
|
|
|
+ wx.reLaunch({url: '/pages/second/product/product-list'})
|
|
|
},
|
|
|
'fail':function(res){
|
|
|
self.$util.msg('用户取消支付~')
|
|
@@ -632,13 +633,13 @@
|
|
|
})
|
|
|
},
|
|
|
changeBox:function () {
|
|
|
- this.checkbox = !this.checkbox;
|
|
|
+ this.checkbox = !this.checkbox
|
|
|
},
|
|
|
},
|
|
|
onShow() {
|
|
|
this.SecondService.brandList().then(res =>{//品牌列表
|
|
|
if(res.code == 0){
|
|
|
- this.BrandList = res.data;
|
|
|
+ this.BrandList = res.data
|
|
|
}
|
|
|
})
|
|
|
this.$api.getComStorage('userInfo').then((resolve) =>{
|