|
|
@ -120,6 +120,7 @@ |
|
|
|
<uv-radio |
|
|
|
size="35rpx" |
|
|
|
icon-size="35rpx" |
|
|
|
:disabled="!!id" |
|
|
|
:name="0"> |
|
|
|
</uv-radio> |
|
|
|
</view> |
|
|
@ -135,6 +136,7 @@ |
|
|
|
<uv-radio |
|
|
|
size="35rpx" |
|
|
|
icon-size="35rpx" |
|
|
|
:disabled="!!id" |
|
|
|
:name="item.id"> |
|
|
|
</uv-radio> |
|
|
|
</view> |
|
|
@ -164,7 +166,8 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<submit @submit="submit" @preview="preview" @draft="draft" /> |
|
|
|
<submit @submit="submit" @preview="preview" @draft="draft" |
|
|
|
:submitTitle="id ? '修改' : '发布'"/> |
|
|
|
|
|
|
|
|
|
|
|
<confirmationPopup |
|
|
@ -224,8 +227,13 @@ |
|
|
|
fileListImage: [],//封面 |
|
|
|
upTopList: [], |
|
|
|
inputs : [], |
|
|
|
id : 0, |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
// this.$route.query的参数 |
|
|
|
this.id = options.id |
|
|
|
}, |
|
|
|
computed : { |
|
|
|
topInfo(){ |
|
|
|
for (var i = 0; i < this.upTopList.length; i++) { |
|
|
@ -238,8 +246,48 @@ |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.indexTopPayList() |
|
|
|
this.getDateil() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getDateil(){ |
|
|
|
if(!this.id){ |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
let self = this |
|
|
|
|
|
|
|
this.$api('indexGetActorDetail', { |
|
|
|
id : this.id |
|
|
|
}, res => { |
|
|
|
if (res.code == 200) { |
|
|
|
|
|
|
|
res.result.details.image.split(',') |
|
|
|
.forEach(url => { |
|
|
|
self.fileListImage.push({ |
|
|
|
url |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
res.result.details.isImage.split(',') |
|
|
|
.forEach(url => { |
|
|
|
self.fileList.push({ |
|
|
|
url |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
res.result.details.workName && res.result.details.workName.split(',') |
|
|
|
.forEach(title => { |
|
|
|
self.inputs.push({ |
|
|
|
title |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
res.result.details.topId = res.result.details.topId || 0 |
|
|
|
|
|
|
|
this.form = res.result.details |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取置顶方式 |
|
|
|
indexTopPayList() { |
|
|
|
this.$api('indexTopPayList', res => { |
|
|
@ -286,21 +334,33 @@ |
|
|
|
let self = this |
|
|
|
|
|
|
|
let data = { |
|
|
|
...this.form, |
|
|
|
// ...this.form, |
|
|
|
money: this.form.money, |
|
|
|
name : this.form.name, |
|
|
|
phone : this.form.phone, |
|
|
|
isUser : this.form.isUser,//是否本人发布 |
|
|
|
phonePay : this.form.phonePay,//联系方式是否付费查看 |
|
|
|
photographerContent : this.form.photographerContent,//演员介绍 |
|
|
|
topId : this.form.topId, |
|
|
|
|
|
|
|
state : 0, |
|
|
|
isCard: 'N', |
|
|
|
isImage : this.fileList.map((item) => item.url).join(","),//代表作视频列表 |
|
|
|
image : this.fileListImage.map((item) => item.url).join(","),//封面 |
|
|
|
|
|
|
|
// 字段名称待确认 |
|
|
|
titles : this.inputs.map((item) => item.title).join(","),//代表作名称列表 |
|
|
|
workName : this.inputs.map((item) => item.title).join(","),//代表作名称列表 |
|
|
|
isTop : this.form.topId ? 'Y' : 'N', |
|
|
|
} |
|
|
|
|
|
|
|
if(this.id){ |
|
|
|
data.id = this.id |
|
|
|
} |
|
|
|
|
|
|
|
this.$api('publishActor', data, |
|
|
|
res => { |
|
|
|
if (res.code == 200) { |
|
|
|
// this.$refs.confirmationPopupUpload.open() |
|
|
|
if(self.form.topId){ |
|
|
|
if(self.form.topId && !this.id){ |
|
|
|
uni.requestPayment({ |
|
|
|
provider: 'wxpay', // 服务提提供商 |
|
|
|
timeStamp: res.result.timeStamp, // 时间戳 |
|
|
@ -330,6 +390,7 @@ |
|
|
|
}, |
|
|
|
submit() { |
|
|
|
|
|
|
|
|
|
|
|
if(this.fileListImage.length == 0){ |
|
|
|
return uni.showToast({ |
|
|
|
title: '请上传封面', |
|
|
@ -337,6 +398,23 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(!this.$utils.verificationPhone(this.form.phone)){ |
|
|
|
return uni.showToast({ |
|
|
|
title: `请输入正确的手机号`, |
|
|
|
icon : 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
if (this.$utils.verificationAll(this.form, { |
|
|
|
name: '请输入演员名称', |
|
|
|
photographerContent: '请输入演员介绍', |
|
|
|
phone: '请输入手机号', |
|
|
|
money: '请输入价格', |
|
|
|
})) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if(this.fileList.length == 0){ |
|
|
|
return uni.showToast({ |
|
|
|
title: '请上传代表作', |
|
|
@ -353,17 +431,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.$utils.verificationAll(this.form, { |
|
|
|
name: '请输入演员名称', |
|
|
|
photographerContent: '请输入演员介绍', |
|
|
|
phone: '请输入手机号', |
|
|
|
money: '请输入价格', |
|
|
|
})) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if(this.form.topId){ |
|
|
|
if(this.form.topId && !this.id){ |
|
|
|
// 选择付费模式 |
|
|
|
this.$refs.confirmationPopup.open() |
|
|
|
}else{ |
|
|
@ -373,9 +441,10 @@ |
|
|
|
}, |
|
|
|
confirm() { |
|
|
|
// this.$refs.confirmationPopupUpload.close() |
|
|
|
uni.navigateTo({ |
|
|
|
url: "/pages/index/index" |
|
|
|
}) |
|
|
|
// uni.navigateTo({ |
|
|
|
// url: "/pages/index/index" |
|
|
|
// }) |
|
|
|
uni.navigateBack(-1) |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|