This commit is contained in:
parent
2b13a9dd52
commit
b736e4d160
|
@ -39,15 +39,30 @@
|
|||
</view>
|
||||
<u-popup :show="showTab" @close="close" closeOnClickOverlay :round="5"
|
||||
customStyle="padding: 16px;">
|
||||
<u-checkbox-group @change="selectForm2" v-model="radiovalue2" :borderBottom="true" placement="column"
|
||||
iconPlacement="right">
|
||||
<u-checkbox :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist2" :key="index"
|
||||
:label="item.tagName" labelSize="28rpx" labelColor="#231F1C" :name="item.tagName"
|
||||
activeColor="#99241B ">
|
||||
</u-checkbox>
|
||||
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
|
||||
type="default" @click="showTab=false">确认</u-button>
|
||||
</u-checkbox-group>
|
||||
<view style="display: flex; padding: 20rpx 0; color: #3c9cff;" @click="addNewTab">
|
||||
添加标签<u-icon name="plus-circle" color="#3c9cff"></u-icon>
|
||||
</view>
|
||||
<scroll-view style='height: 500rpx;' scroll-y="true">
|
||||
<u-checkbox-group @change="selectForm2" v-model="radiovalue2" :borderBottom="true" placement="column"
|
||||
iconPlacement="right">
|
||||
<u-checkbox :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist2" :key="index"
|
||||
:label="item.tagName" labelSize="28rpx" labelColor="#231F1C" :name="item.tagName"
|
||||
activeColor="#99241B ">
|
||||
</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</scroll-view>
|
||||
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
|
||||
type="default" @click="showTab=false">确认</u-button>
|
||||
</u-popup>
|
||||
<u-popup :show="addTab" @close="closeAdd" closeOnClickOverlay :round="5"
|
||||
customStyle="padding: 16px;">
|
||||
<view style="display: flex; padding: 20rpx 0; font-size: 36rpx;">
|
||||
添加标签
|
||||
</view>
|
||||
<u--input placeholder="请输入标签" v-model="newTab" clearable>
|
||||
</u--input>
|
||||
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
|
||||
type="default" @click="upDataTab">确认添加</u-button>
|
||||
</u-popup>
|
||||
|
||||
<u--textarea style="padding: 32rpx;" v-model="detailValue" placeholder="请输入作品说明" border="none" maxlength="-1">
|
||||
|
@ -88,6 +103,7 @@
|
|||
iswx: null,
|
||||
showType: false,
|
||||
showTab: false,
|
||||
addTab: false,
|
||||
v1: "",
|
||||
v2: "",
|
||||
tabs:[],
|
||||
|
@ -106,7 +122,8 @@
|
|||
type: "",
|
||||
usePermission: "",
|
||||
wpPath: "",
|
||||
}
|
||||
},
|
||||
newTab: '',
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
|
@ -279,7 +296,39 @@
|
|||
let data = form
|
||||
this.tabs = form
|
||||
this.v2 = data.join(',')
|
||||
}
|
||||
},
|
||||
addNewTab(){
|
||||
this.showTab = false
|
||||
this.addTab = true
|
||||
},
|
||||
closeAdd(){
|
||||
this.addTab = false
|
||||
this.getTab()
|
||||
this.showTab = true
|
||||
},
|
||||
upDataTab() {
|
||||
let data = {
|
||||
tagName: this.newTab
|
||||
}
|
||||
this.http.request('/works/addTag', data, "POST").then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '添加成功',
|
||||
icon: "none",
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.newTab = ''
|
||||
this.closeAdd()
|
||||
}, 1200)
|
||||
|
||||
}
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title: e.data.message,
|
||||
icon: "none",
|
||||
});
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -5,9 +5,10 @@
|
|||
</view>
|
||||
<view v-if="load == false">
|
||||
<view class="bg">
|
||||
<image src="../../static/puplishBG.png" mode=""></image>
|
||||
<image :src="image" mode=""></image>
|
||||
</view>
|
||||
|
||||
<u-gap height="1" bgColor="#fff"></u-gap>
|
||||
|
||||
<view class="rightBox" @click="showBuy=true">
|
||||
<text class="right_titl" style="color: #251B1D; font-weight: 600;margin-left: 32rpx;">作品使用权限</text>
|
||||
<u--input fontSize="28rpx" border="none" readonly v-model="v2" disabledColor="#ffffff"
|
||||
|
@ -15,7 +16,7 @@
|
|||
<u-icon slot="suffix" name="arrow-right"></u-icon>
|
||||
</u--input>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="rightBox" @click="showSex=true" v-if="v2=='可购买'">
|
||||
<text class="right_titl" style="color: #251B1D; font-weight: 600;margin-left: 32rpx;">支付方式</text>
|
||||
<u--input fontSize="28rpx" border="none" readonly v-model="v1" disabledColor="#ffffff"
|
||||
|
@ -23,75 +24,99 @@
|
|||
<u-icon slot="suffix" name="arrow-right"></u-icon>
|
||||
</u--input>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="sub_ti_box" v-if="v2=='可购买' && v1=='付费购买'">
|
||||
<text class="right_titl">使用费用</text>
|
||||
<u--input placeholder="请输入使用费用" inputAlign="right" border="none" type="number" v-model="price"></u--input> <text
|
||||
style="margin-left: 16rpx;">元</text>
|
||||
<u--input placeholder="请输入使用费用" inputAlign="right" border="none" type="number" v-model="price">
|
||||
</u--input> <text style="margin-left: 16rpx;">元</text>
|
||||
</view>
|
||||
<view class="sub_ti_box" v-if="v2=='可购买' && v1=='积分购买'">
|
||||
<text class="right_titl">使用积分</text>
|
||||
<u--input placeholder="请输入使用积分" inputAlign="right" type="number" border="none" v-model="price"></u--input> <text
|
||||
style="margin-left: 16rpx;">积分</text>
|
||||
<u--input placeholder="请输入使用积分" inputAlign="right" type="number" border="none" v-model="price">
|
||||
</u--input> <text style="margin-left: 16rpx;">积分</text>
|
||||
</view>
|
||||
|
||||
<view class="sub_ti_box" v-if="v2=='可购买'">
|
||||
|
||||
<view class="sub_ti_box" v-if="v2=='可购买'" @click="showType=true">
|
||||
<text class="right_titl">发货方式</text>
|
||||
<u--input fontSize="28rpx" border="none" readonly v-model="v3" disabledColor="#ffffff"
|
||||
placeholder="请选择发货方式" inputAlign="right">
|
||||
<u-icon slot="suffix" name="arrow-right"></u-icon>
|
||||
</u--input>
|
||||
</view>
|
||||
|
||||
<view class="sub_ti_box" v-if="v2=='可购买' && v3=='虚拟物品'">
|
||||
<text class="right_titl">网盘地址</text>
|
||||
<u--input placeholder="请输入网盘地址" inputAlign="right" border="none" v-model="wpPath"></u--input> <text
|
||||
style="margin-left: 16rpx;"></text>
|
||||
</view>
|
||||
<view class="sub_ti_box" v-if="v2=='可购买'">
|
||||
<view class="sub_ti_box" v-if="v2=='可购买' && v3=='虚拟物品'">
|
||||
<text class="right_titl">提取码</text>
|
||||
<u--input placeholder="请输入提取码" inputAlign="right" border="none" v-model="code"></u--input> <text
|
||||
style="margin-left: 16rpx;"></text>
|
||||
</view>
|
||||
|
||||
<u-popup :show="showBuy" @close="close" closeOnClickOverlay :round="5"
|
||||
customStyle="padding: 16px;">
|
||||
|
||||
<u-popup :show="showBuy" @close="close" closeOnClickOverlay :round="5" customStyle="padding: 16px;">
|
||||
<u-radio-group @change="selectFormB" v-model="radiovalue1" :borderBottom="true" placement="column"
|
||||
iconPlacement="right">
|
||||
<u-radio :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist1" :key="index"
|
||||
:label="item.label" labelSize="28rpx" labelColor="#231F1C" :name="item.label" activeColor="#99241B ">
|
||||
:label="item.label" labelSize="28rpx" labelColor="#231F1C" :name="item.label"
|
||||
activeColor="#99241B ">
|
||||
</u-radio>
|
||||
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
|
||||
type="default" @click="showBuy=false">确认</u-button>
|
||||
</u-radio-group>
|
||||
</u-popup>
|
||||
|
||||
<u-popup :show="showSex" @close="close" closeOnClickOverlay :round="5"
|
||||
customStyle="padding: 16px;">
|
||||
|
||||
<u-popup :show="showSex" @close="close" closeOnClickOverlay :round="5" customStyle="padding: 16px;">
|
||||
<u-radio-group @change="selectForm" v-model="radiovalue7" :borderBottom="true" placement="column"
|
||||
iconPlacement="right">
|
||||
<u-radio :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist7" :key="index"
|
||||
:label="item.label" labelSize="28rpx" labelColor="#231F1C" :name="item.label" activeColor="#99241B ">
|
||||
:label="item.label" labelSize="28rpx" labelColor="#231F1C" :name="item.label"
|
||||
activeColor="#99241B ">
|
||||
</u-radio>
|
||||
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
|
||||
type="default" @click="showSex=false">确认</u-button>
|
||||
</u-radio-group>
|
||||
</u-popup>
|
||||
|
||||
<u-popup :show="showType" @close="close" closeOnClickOverlay :round="5" customStyle="padding: 16px;">
|
||||
<u-radio-group @change="selectFormC" v-model="radiovalue2" :borderBottom="true" placement="column"
|
||||
iconPlacement="right">
|
||||
<u-radio :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist2" :key="index"
|
||||
:label="item.name" labelSize="28rpx" labelColor="#231F1C" :name="item.name" :disabled="item.disabled"
|
||||
activeColor="#99241B ">
|
||||
</u-radio>
|
||||
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
|
||||
type="default" @click="showType=false">确认</u-button>
|
||||
</u-radio-group>
|
||||
</u-popup>
|
||||
|
||||
<view style="height: 160rpx; width: 750rpx;">
|
||||
|
||||
</view>
|
||||
<view class="operation">
|
||||
<button type="default" class="collection" @click="goPre">上一步</button>
|
||||
<button type="default" class="apply" @click="cfmPub()">确认发布</button>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
load:true,
|
||||
load: true,
|
||||
showBuy: false,
|
||||
showSex: false,
|
||||
showType: false,
|
||||
v1: "",
|
||||
v2: "",
|
||||
price:'',
|
||||
wpPath:'',
|
||||
code:'',
|
||||
v3: "",
|
||||
price: '',
|
||||
wpPath: '',
|
||||
code: '',
|
||||
radiovalue1: '',
|
||||
radiolist1: [],
|
||||
radiovalue7: '',
|
||||
|
@ -99,10 +124,32 @@
|
|||
radio: '',
|
||||
switchVal: false,
|
||||
worksVo: {},
|
||||
radiovalue2: '',
|
||||
radiolist2: [{
|
||||
name: '虚拟物品',
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: '实物发货',
|
||||
disabled: true
|
||||
},
|
||||
],
|
||||
image: ''
|
||||
};
|
||||
},
|
||||
onLoad(op) {
|
||||
this.worksVo = JSON.parse(decodeURIComponent(op.worksVo));
|
||||
if (this.worksVo.file) {
|
||||
let fileArr = this.worksVo.file.split(',')
|
||||
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
|
||||
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
|
||||
this.image = fileArr[0]
|
||||
}
|
||||
else if (gs == 'pdf') {
|
||||
this.image = '../../static/fileImg/pdfS.png'
|
||||
}
|
||||
}
|
||||
console.log(this.image)
|
||||
},
|
||||
onShow() {
|
||||
this.getQx()
|
||||
|
@ -145,41 +192,41 @@
|
|||
},
|
||||
cfmPub() {
|
||||
let _this = this
|
||||
if(this.v2 == ''){
|
||||
if (this.v2 == '') {
|
||||
uni.showToast({
|
||||
title: '使用权限不能为空',
|
||||
icon: "none",
|
||||
});
|
||||
return
|
||||
}
|
||||
if(this.v2 == '可购买' && this.v1 == ''){
|
||||
if (this.v2 == '可购买' && this.v1 == '') {
|
||||
uni.showToast({
|
||||
title: '支付方式不能为空',
|
||||
icon: "none",
|
||||
});
|
||||
return
|
||||
}
|
||||
if(this.v2 == '可购买' && this.v1 == '面议'){
|
||||
if (this.v2 == '可购买' && this.v1 == '面议') {
|
||||
this.price = '0'
|
||||
}
|
||||
if(this.v2 == '可购买' && this.v1 == '免费使用'){
|
||||
if (this.v2 == '可购买' && this.v1 == '免费使用') {
|
||||
this.price = '0'
|
||||
}
|
||||
if(this.v2 == '可购买' && this.v1 != '' && this.price == ''){
|
||||
if (this.v2 == '可购买' && this.v1 != '' && this.price == '') {
|
||||
uni.showToast({
|
||||
title: '价格不能为空',
|
||||
icon: "none",
|
||||
});
|
||||
return
|
||||
}
|
||||
if(this.v2 == '可购买' && this.v1 != '' && this.wpPath == ''){
|
||||
if (this.v2 == '可购买' && this.v1 != '' && this.wpPath == '') {
|
||||
uni.showToast({
|
||||
title: '网盘地址不能为空',
|
||||
icon: "none",
|
||||
});
|
||||
return
|
||||
}
|
||||
if(this.v2 == '可购买' && this.v1 != '' && this.code == ''){
|
||||
if (this.v2 == '可购买' && this.v1 != '' && this.code == '') {
|
||||
uni.showToast({
|
||||
title: '提取码不能为空,若不需要提取码请填‘无’',
|
||||
icon: "none",
|
||||
|
@ -207,22 +254,22 @@
|
|||
// });
|
||||
// return
|
||||
// }
|
||||
this.radiolist1.forEach((item) =>{
|
||||
if(_this.v2 == item.label){
|
||||
this.radiolist1.forEach((item) => {
|
||||
if (_this.v2 == item.label) {
|
||||
_this.worksVo.usePermission = item.value
|
||||
}
|
||||
})
|
||||
this.radiolist7.forEach((item) =>{
|
||||
if(_this.v1 == item.label){
|
||||
this.radiolist7.forEach((item) => {
|
||||
if (_this.v1 == item.label) {
|
||||
_this.worksVo.buy = item.value
|
||||
}
|
||||
})
|
||||
this.worksVo.price = this.price
|
||||
this.worksVo.wpPath = this.wpPath
|
||||
this.worksVo.code = this.code
|
||||
|
||||
if(this.wpPath != ''){
|
||||
this.http.request('/works/isValid?strLink='+this.wpPath, "POST").then(res => {
|
||||
|
||||
if (this.wpPath != '') {
|
||||
this.http.request('/works/isValid?strLink=' + this.wpPath, "POST").then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/pageHome/pageHome"
|
||||
|
@ -235,10 +282,10 @@
|
|||
icon: "none",
|
||||
});
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.pushWork()
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
pushWork() {
|
||||
this.http.request('/works/addWork', this.worksVo, "POST").then(res => {
|
||||
|
@ -279,7 +326,11 @@
|
|||
close() {
|
||||
this.showSex = false
|
||||
this.showBuy = false
|
||||
}
|
||||
this.showType = false
|
||||
},
|
||||
selectFormC(form) {
|
||||
this.v3 = form
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -291,7 +342,7 @@
|
|||
}
|
||||
|
||||
.bg {
|
||||
height: 520rpx;
|
||||
height: 500rpx;
|
||||
}
|
||||
|
||||
.rightBox {
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
this.http.request('/indexImage/recommend', {}, "GET").then(res => {
|
||||
if (res.code == 200) {
|
||||
res.data.forEach(function(item){
|
||||
if (item.file != undefined) {
|
||||
if (item.file) {
|
||||
let fileArr = item.file.split(',')
|
||||
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
|
||||
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<view style="padding-bottom:55px;">
|
||||
<view class="">
|
||||
<u-loading-page :loading="load"></u-loading-page>
|
||||
</view>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<view style="padding-bottom:55px;">
|
||||
<view class="">
|
||||
<u-loading-page :loading="load"></u-loading-page>
|
||||
</view>
|
||||
|
|
Loading…
Reference in New Issue