This commit is contained in:
parent
c776e7eb50
commit
9cd72c6ef2
|
@ -112,7 +112,8 @@
|
||||||
"path": "pages/ArtWorks/ArtWorks",
|
"path": "pages/ArtWorks/ArtWorks",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "文艺作品",
|
"navigationBarTitleText": "文艺作品",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": true,
|
||||||
|
"onReachBottomDistance": 20
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
|
<view class="">
|
||||||
|
<u-loading-page :loading="load"></u-loading-page>
|
||||||
|
</view>
|
||||||
|
<view v-if="load == false">
|
||||||
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
||||||
v-model="artValue" placeholder="请输入名家名称"></u-search>
|
v-model="artValue" placeholder="请输入名家名称"></u-search>
|
||||||
<u-tabs :scrollable="false" :list="list1" :activeStyle="{
|
<u-tabs :scrollable="false" @click="clickTabs" :list="list1" :activeStyle="{
|
||||||
color: '#251B1D',
|
color: '#251B1D',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
transform: 'scale(1.05)'
|
transform: 'scale(1.05)'
|
||||||
|
@ -49,32 +53,142 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
load: true,
|
||||||
isLoveList: [true, false, true, false],
|
isLoveList: [true, false, true, false],
|
||||||
artValue: '',
|
artValue: '',
|
||||||
list1: [{
|
list1: [{
|
||||||
name: '全部',
|
name: '全部',
|
||||||
}, {
|
type: '',
|
||||||
name: '书法',
|
}],
|
||||||
}, {
|
workList: [],
|
||||||
name: '绘画'
|
pages: 1,
|
||||||
}, {
|
size: 20,
|
||||||
name: '雕刻'
|
|
||||||
}, {
|
|
||||||
name: '摄影'
|
|
||||||
}, {
|
|
||||||
name: '其他'
|
|
||||||
}]
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
// 下拉刷新
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.pages = 1
|
||||||
|
this.getData()
|
||||||
|
setTimeout(function () {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
//上拉
|
||||||
|
onReachBottom(){
|
||||||
|
this.pages++
|
||||||
|
this.getMoreData();
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.list1=[{
|
||||||
|
name: '全部',
|
||||||
|
type: '',
|
||||||
|
}],
|
||||||
|
this.pages = 1
|
||||||
|
this.getData()
|
||||||
|
this.getType()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//作品分类
|
||||||
|
getType() {
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/works/select?code=work_type', {}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
res.data.forEach(function(item){
|
||||||
|
_this.list1.push({
|
||||||
|
name: item.label,
|
||||||
|
value: item.value
|
||||||
|
})
|
||||||
|
})
|
||||||
|
_this.load = false
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//作品列表
|
||||||
|
getData(){
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/works/list', {page:this.pages,size:this.size}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
_this.load = false
|
||||||
|
_this.workList = res.data.records
|
||||||
|
_this.workList.forEach(function(item){
|
||||||
|
if(item.images != undefined){
|
||||||
|
let img = JSON.parse(item.images)
|
||||||
|
item.images = img[0]
|
||||||
|
}
|
||||||
|
//判断封面图片
|
||||||
|
if(item.file != undefined){
|
||||||
|
let fileArr = item.file.split(',')
|
||||||
|
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
|
||||||
|
if(gs == 'jpg' || gs == 'jpeg' || gs == 'png'){
|
||||||
|
item.file = fileArr[0]
|
||||||
|
}else if(gs == 'doc' || gs == 'docx'){
|
||||||
|
item.file = '../../static/fileImg/workB'
|
||||||
|
}else if(gs == 'xls' || gs == 'xlsx'){
|
||||||
|
item.file = '../../static/fileImg/workB'
|
||||||
|
}else if(gs == 'pdf'){
|
||||||
|
item.file = '../../static/fileImg/pdfB'
|
||||||
|
}else if(gs == 'txt'){
|
||||||
|
item.file = '../../static/fileImg/pdfB'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log(_this.workList)
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//上拉
|
||||||
|
getMoreData(){
|
||||||
|
const _this = this
|
||||||
|
this.http.request('/works/list',{page:this.pages,size:this.size},"GET").then(res => {
|
||||||
|
res.data.records.forEach(function(item){
|
||||||
|
if(item.images != undefined){
|
||||||
|
let img = JSON.parse(item.images)
|
||||||
|
item.images = img[0]
|
||||||
|
}
|
||||||
|
//判断封面图片
|
||||||
|
if(item.file != undefined){
|
||||||
|
let fileArr = item.file.split(',')
|
||||||
|
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
|
||||||
|
if(gs == 'jpg' || gs == 'jpeg' || gs == 'png'){
|
||||||
|
item.file = fileArr[0]
|
||||||
|
}else if(gs == 'doc' || gs == 'docx'){
|
||||||
|
item.file = '../../static/fileImg/workB'
|
||||||
|
}else if(gs == 'xls' || gs == 'xlsx'){
|
||||||
|
item.file = '../../static/fileImg/workB'
|
||||||
|
}else if(gs == 'pdf'){
|
||||||
|
item.file = '../../static/fileImg/pdfB'
|
||||||
|
}else if(gs == 'txt'){
|
||||||
|
item.file = '../../static/fileImg/pdfB'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_this.workList.push(item)
|
||||||
|
})
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title:e.data.message,
|
||||||
|
icon:"none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
like(i) {
|
like(i) {
|
||||||
|
|
||||||
this.$set(this.isLoveList, i, !this.isLoveList[i])
|
this.$set(this.isLoveList, i, !this.isLoveList[i])
|
||||||
},
|
},
|
||||||
toDetail(val){
|
toDetail(val){
|
||||||
|
@ -82,6 +196,9 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/ArtWorks/artWorkDetail"
|
url:"/pages/ArtWorks/artWorkDetail"
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
clickTabs(item){
|
||||||
|
console.log('item', item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,50 +1,218 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view class="">
|
||||||
<!-- 发布作品 -->
|
<view class="">
|
||||||
|
<u-loading-page :loading="load"></u-loading-page>
|
||||||
<u--input style="padding: 32rpx;" placeholder="请输入作品名称" border="bottom" clearable></u--input>
|
|
||||||
<u--input style="padding: 32rpx;" placeholder="请选择作品类型" border="bottom" clearable>
|
|
||||||
<u-icon slot="suffix" name="arrow-right"></u-icon>
|
|
||||||
</u--input>
|
|
||||||
|
|
||||||
<u--textarea style="padding: 32rpx;" v-model="value" placeholder="请输入作品说明" border="none"></u--textarea>
|
|
||||||
<view class="gap">
|
|
||||||
作品内容可上传图片/视频/音频等
|
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="load == false">
|
||||||
|
<!-- 发布作品 -->
|
||||||
|
<view class="rightBox">
|
||||||
|
<u--input placeholder="请输入作品名称" v-model="name" clearable border="none" style="color: #251B1D;margin-left: 32rpx;">
|
||||||
|
</u--input>
|
||||||
|
</view>
|
||||||
|
<!-- 作品类型 -->
|
||||||
|
<view class="rightBox" @click="showType=true">
|
||||||
|
<text class="right_titl" style="color: #c0c4cc; font-size: 15px;margin-left: 32rpx;">请选择作品类型</text>
|
||||||
|
<u--input fontSize="30rpx" border="none" readonly v-model="v1" disabledColor="#ffffff"
|
||||||
|
inputAlign="right">
|
||||||
|
<u-icon slot="suffix" name="arrow-right" style="margin-right: 10px;"></u-icon>
|
||||||
|
</u--input>
|
||||||
|
</view>
|
||||||
|
<u-popup :show="showType" @close="close" @open="open" closeOnClickOverlay :round="5"
|
||||||
|
customStyle="padding: 16px;">
|
||||||
|
<u-radio-group @change="selectForm1" 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 ">
|
||||||
|
</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 class="rightBox" @click="showTab=true">
|
||||||
|
<text class="right_titl" style="color: #c0c4cc; font-size: 15px;margin-left: 32rpx;">请选择作品标签</text>
|
||||||
|
<u--input fontSize="30rpx" border="none" readonly v-model="v2" disabledColor="#ffffff"
|
||||||
|
inputAlign="right">
|
||||||
|
<u-icon slot="suffix" name="arrow-right" style="margin-right: 10px;"></u-icon>
|
||||||
|
</u--input>
|
||||||
|
</view>
|
||||||
|
<u-popup :show="showTab" @close="close" @open="open" 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>
|
||||||
|
</u-popup>
|
||||||
|
|
||||||
|
<u--textarea style="padding: 32rpx;" v-model="detailValue" placeholder="请输入作品说明" border="none">
|
||||||
|
</u--textarea>
|
||||||
<u-upload class="upload" accept="media" width="172rpx" height="172rpx" :fileList="fileList3"
|
<view class="gap">
|
||||||
@afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="2">
|
作品内容可上传图片/音频/word/pdf/txt等
|
||||||
|
</view>
|
||||||
|
<view class="gap" style="line-height: 30rpx;">
|
||||||
|
(若有图片请先上传图片)
|
||||||
|
</view>
|
||||||
|
<!-- H5下的上传 -->
|
||||||
|
<u-upload v-if="iswx == 1" class="upload" accept="file" width="172rpx" height="172rpx" :fileList="fileList3"
|
||||||
|
@afterRead="afterRead" @delete="deletePic" name="3" multiple>
|
||||||
|
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
|
||||||
|
</u-upload>
|
||||||
|
<!-- 微信小程序下的上传 -->
|
||||||
|
<u-upload v-else-if="iswx == 0" class="upload" accept="all" width="172rpx" height="172rpx"
|
||||||
|
:fileList="fileList3" @afterRead="afterRead" @delete="deletePic" name="3" multiple>
|
||||||
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
|
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
|
||||||
</u-upload>
|
</u-upload>
|
||||||
|
|
||||||
|
|
||||||
<view class="operation">
|
<view class="operation">
|
||||||
<button type="default" class="next" @click="next">下一步</button>
|
<button type="default" class="next" @click="next">下一步</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="zhanwei">
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import http from '../../request/interface.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value: '',
|
load: true,
|
||||||
|
detailValue: '',
|
||||||
|
name: '',
|
||||||
fileList3: [],
|
fileList3: [],
|
||||||
|
iswx: null,
|
||||||
|
showType: false,
|
||||||
|
showTab: false,
|
||||||
|
v1: "",
|
||||||
|
v2: "",
|
||||||
|
tabs:[],
|
||||||
|
imgs:[],
|
||||||
|
radiovalue1: '',
|
||||||
|
radiolist1: [],
|
||||||
|
radiovalue2: [],
|
||||||
|
radiolist2: [],
|
||||||
|
worksVo: {
|
||||||
|
buy: "",
|
||||||
|
code: "",
|
||||||
|
file: "",
|
||||||
|
introduce: "",
|
||||||
|
name: "",
|
||||||
|
price: 0,
|
||||||
|
type: "",
|
||||||
|
usePermission: "",
|
||||||
|
wpPath: "",
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getType()
|
||||||
|
this.getTab()
|
||||||
|
},
|
||||||
|
onReady() {
|
||||||
|
// this.load = false
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.iswx = 0
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifndef MP-WEIXIN
|
||||||
|
//除了小程序
|
||||||
|
this.iswx = 1
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getType() {
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/works/select?code=work_type', {}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
_this.radiolist1 = res.data
|
||||||
|
_this.load = false
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTab() {
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/works/tag', {}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
_this.radiolist2 = res.data
|
||||||
|
_this.load = false
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
next() {
|
next() {
|
||||||
|
let _this = this
|
||||||
|
if(this.name == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '作品名称不能为空',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.v1 == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '作品类型不能为空',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.v2 == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '作品标签不能为空',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.detailValue == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '作品说明不能为空',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.fileList3.length == 0){
|
||||||
|
uni.showToast({
|
||||||
|
title: '作品内容不能为空',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.worksVo.name = this.name
|
||||||
|
this.worksVo.introduce = this.detailValue
|
||||||
|
this.radiolist1.forEach((item) =>{
|
||||||
|
if(_this.v1 == item.label){
|
||||||
|
_this.worksVo.type = item.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let tabList = []
|
||||||
|
this.radiolist2.forEach((item) =>{
|
||||||
|
this.tabs.forEach((ele) =>{
|
||||||
|
if(ele == item.tagName){
|
||||||
|
tabList.push(item.id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.worksVo.workTag = tabList.join(',')
|
||||||
|
let imgList = []
|
||||||
|
this.fileList3.forEach((item) => {
|
||||||
|
imgList.push(item.url)
|
||||||
|
})
|
||||||
|
this.worksVo.file = imgList.join(',')
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/PublishWorks/PublishWorksNext"
|
url: "/pages/PublishWorks/PublishWorksNext?worksVo=" + encodeURIComponent(JSON.stringify(this.worksVo))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 删除图片
|
// 删除图片
|
||||||
|
@ -77,7 +245,7 @@
|
||||||
uploadFilePromise(url) {
|
uploadFilePromise(url) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let a = uni.uploadFile({
|
let a = uni.uploadFile({
|
||||||
url: 'http://192.168.2.21:7001/upload', // 仅为示例,非真实的接口地址
|
url: http.config.baseUrl + '/upload/upload',
|
||||||
filePath: url,
|
filePath: url,
|
||||||
name: 'file',
|
name: 'file',
|
||||||
formData: {
|
formData: {
|
||||||
|
@ -85,11 +253,23 @@
|
||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
resolve(res.data.data)
|
resolve(JSON.parse(res.data).data.path)
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
selectForm1(form) {
|
||||||
|
this.v1 = form
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.showType = false
|
||||||
|
this.showTab = false
|
||||||
|
},
|
||||||
|
selectForm2(form) {
|
||||||
|
let data = form
|
||||||
|
this.tabs = form
|
||||||
|
this.v2 = data.join(',')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,19 +281,26 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.gap {
|
.gap {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
|
||||||
color: #AFADB0;
|
color: #AFADB0;
|
||||||
height: 80rpx;
|
height: 50rpx;
|
||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
border-radius: 0px 0px 0px 0px;
|
border-radius: 0px 0px 0px 0px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
line-height: 80rpx;
|
line-height: 50rpx;
|
||||||
padding: 0 32rpx;
|
padding: 0 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rightBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 104rpx;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-bottom: 1rpx solid #dadbde;
|
||||||
|
}
|
||||||
|
|
||||||
.upload {
|
.upload {
|
||||||
padding: 32rpx;
|
padding: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
|
<view class="">
|
||||||
|
<u-loading-page :loading="load"></u-loading-page>
|
||||||
|
</view>
|
||||||
|
<view v-if="load == false">
|
||||||
<view class="bg">
|
<view class="bg">
|
||||||
<image src="../../static/puplishBG.png" mode=""></image>
|
<image src="../../static/puplishBG.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="rightBox" @click="showBuy=true">
|
||||||
<view class="rightBox" @click="showSex=true">
|
|
||||||
<text class="right_titl" style="color: #251B1D; font-weight: 600;margin-left: 32rpx;">作品使用权限</text>
|
<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"
|
||||||
|
placeholder="请选择作品使用权限" inputAlign="right">
|
||||||
|
<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"
|
<u--input fontSize="28rpx" border="none" readonly v-model="v1" disabledColor="#ffffff"
|
||||||
placeholder="请选择作品使用权限" inputAlign="right">
|
placeholder="请选择作品使用权限" inputAlign="right">
|
||||||
<u-icon slot="suffix" name="arrow-right"></u-icon>
|
<u-icon slot="suffix" name="arrow-right"></u-icon>
|
||||||
|
@ -15,102 +26,241 @@
|
||||||
|
|
||||||
<view class="sub_ti_box" v-if="v1=='付费购买'">
|
<view class="sub_ti_box" v-if="v1=='付费购买'">
|
||||||
<text class="right_titl">使用费用</text>
|
<text class="right_titl">使用费用</text>
|
||||||
<u--input placeholder="请输入使用费用" inputAlign="right" border="none" type="number" value=""></u--input> <text
|
<u--input placeholder="请输入使用费用" inputAlign="right" border="none" type="number" v-model="price"></u--input> <text
|
||||||
style="margin-left: 16rpx;">元</text>
|
style="margin-left: 16rpx;">元</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="sub_ti_box" v-if="v1=='付费购买'">
|
||||||
|
<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="v1=='付费购买'">
|
||||||
|
<text class="right_titl">提取码</text>
|
||||||
|
<u--input placeholder="请输入提取码" inputAlign="right" border="none" v-model="code"></u--input> <text
|
||||||
|
style="margin-left: 16rpx;"></text>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="sub_ti_box" v-if="v1=='积分购买'">
|
<view class="sub_ti_box" v-if="v1=='积分购买'">
|
||||||
<text class="right_titl">使用积分</text>
|
<text class="right_titl">使用积分</text>
|
||||||
<u--input placeholder="请输入使用积分" inputAlign="right" type="number" border="none" value=""></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="v1=='积分购买'">
|
||||||
|
<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="v1=='积分购买'">
|
||||||
|
<text class="right_titl">提取码</text>
|
||||||
|
<u--input placeholder="请输入提取码" inputAlign="right" border="none" v-model="code"></u--input> <text
|
||||||
|
style="margin-left: 16rpx;"></text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<u-popup :show="showBuy" @close="close" @open="open" 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 ">
|
||||||
|
</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" @open="open" closeOnClickOverlay :round="5"
|
<u-popup :show="showSex" @close="close" @open="open" closeOnClickOverlay :round="5"
|
||||||
customStyle="padding: 16px;">
|
customStyle="padding: 16px;">
|
||||||
<u-radio-group @change="selectForm" v-model="radiovalue7" :borderBottom="true" placement="column"
|
<u-radio-group @change="selectForm" v-model="radiovalue7" :borderBottom="true" placement="column"
|
||||||
iconPlacement="right">
|
iconPlacement="right">
|
||||||
<u-radio :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist7" :key="index"
|
<u-radio :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist7" :key="index"
|
||||||
:label="item.name" labelSize="28rpx" labelColor="#231F1C" :name="item.name" activeColor="#99241B ">
|
:label="item.label" labelSize="28rpx" labelColor="#231F1C" :name="item.label" activeColor="#99241B ">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
|
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
|
||||||
type="default" @click="showSex=false">确认</u-button>
|
type="default" @click="showSex=false">确认</u-button>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="operation">
|
<view class="operation">
|
||||||
<button type="default" class="collection" @click="goPre">上一步</button>
|
<button type="default" class="collection" @click="goPre">上一步</button>
|
||||||
<button type="default" class="apply" @click="cfmPub()">确认发布</button>
|
<button type="default" class="apply" @click="cfmPub()">确认发布</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
load:true,
|
||||||
|
showBuy: false,
|
||||||
showSex: false,
|
showSex: false,
|
||||||
v1: "",
|
v1: "",
|
||||||
|
v2: "",
|
||||||
|
price:'',
|
||||||
|
wpPath:'',
|
||||||
|
code:'',
|
||||||
|
radiovalue1: '',
|
||||||
|
radiolist1: [],
|
||||||
radiovalue7: '',
|
radiovalue7: '',
|
||||||
|
radiolist7: [],
|
||||||
|
|
||||||
|
|
||||||
radiolist7: [{
|
|
||||||
name: '免费使用',
|
|
||||||
disabled: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '付费购买',
|
|
||||||
disabled: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '积分购买',
|
|
||||||
disabled: false
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
name: '面议',
|
|
||||||
disabled: false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
radio: '',
|
radio: '',
|
||||||
switchVal: false
|
switchVal: false,
|
||||||
|
worksVo: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad(op) {
|
||||||
|
this.worksVo = JSON.parse(decodeURIComponent(op.worksVo));
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getQx()
|
||||||
|
this.getFs()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goPre() {
|
getQx() {
|
||||||
uni.navigateTo({
|
let _this = this
|
||||||
url: "/pages/PublishWorks/PublishWorks"
|
this.http.request('/works/select?code=use_permission', {}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
_this.radiolist1 = res.data
|
||||||
|
_this.load = false
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
cfmPub() {
|
getFs() {
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/works/select?code=purchase_method', {}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
_this.radiolist7 = res.data
|
||||||
|
_this.load = false
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '确认发布',
|
title: e.data.message,
|
||||||
duration: 2000
|
icon: "none",
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goPre() {
|
||||||
|
uni.navigateBack()
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: "/pages/PublishWorks/PublishWorks"
|
||||||
|
// })
|
||||||
|
},
|
||||||
|
cfmPub() {
|
||||||
|
let _this = this
|
||||||
|
if(this.v2 == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '使用权限不能为空',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.v2 == '可购买' && this.v1 == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '支付方式不能为空',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.v2 == '可购买' && this.v1 == '付费购买' && this.price == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '价格不能为空',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.v2 == '可购买' && this.v1 == '付费购买' && this.wpPath == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '网盘地址不能为空',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.v2 == '可购买' && this.v1 == '付费购买' && this.code == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '提取码不能为空,若不需要提取码请填‘无’',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.v2 == '可购买' && this.v1 == '积分购买' && this.price == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '价格不能为空',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.v2 == '可购买' && this.v1 == '积分购买' && this.wpPath == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '网盘地址不能为空',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.v2 == '可购买' && this.v1 == '积分购买' && this.code == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '提取码不能为空,若不需要提取码请填‘无’',
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.radiolist1.forEach((item) =>{
|
||||||
|
if(_this.v2 == item.label){
|
||||||
|
_this.worksVo.usePermission = item.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
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
|
||||||
|
console.log(this.worksVo)
|
||||||
|
this.http.request('/works/addWork', this.worksVo, "POST").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: "/pages/pageHome/pageHome"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '确认发布',
|
||||||
|
// duration: 2000
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
sexSelect(e) {
|
sexSelect(e) {
|
||||||
this.model1.userInfo.rights = e.name
|
this.model1.userInfo.rights = e.name
|
||||||
|
|
||||||
},
|
},
|
||||||
selectForm(form) {
|
selectForm(form) {
|
||||||
|
|
||||||
this.v1 = form
|
this.v1 = form
|
||||||
|
this.price = ''
|
||||||
|
this.wpPath = ''
|
||||||
|
this.code = ''
|
||||||
|
},
|
||||||
|
selectFormB(form) {
|
||||||
|
this.v2 = form
|
||||||
|
this.v1 = ''
|
||||||
|
this.price = ''
|
||||||
|
this.wpPath = ''
|
||||||
|
this.code = ''
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.showSex = false
|
this.showSex = false
|
||||||
|
this.showBuy = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -135,9 +285,13 @@
|
||||||
margin-top: 16rpx;
|
margin-top: 16rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub_ti_box {
|
.sub_ti_box {
|
||||||
display: flex; align-items: center; margin: 0 32rpx;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 0 32rpx;
|
||||||
padding: 32rpx 0;
|
padding: 32rpx 0;
|
||||||
|
|
||||||
.right_titl {
|
.right_titl {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: $black;
|
color: $black;
|
||||||
|
|
|
@ -572,9 +572,7 @@
|
||||||
console.log(option.id);
|
console.log(option.id);
|
||||||
this.pageTypeId = option.id
|
this.pageTypeId = option.id
|
||||||
},
|
},
|
||||||
|
|
||||||
onReady() {
|
onReady() {
|
||||||
|
|
||||||
this.$refs.form1.setRules(this.rules);
|
this.$refs.form1.setRules(this.rules);
|
||||||
|
|
||||||
this.http.request('/association/list', {}, "GET").then((res) => {
|
this.http.request('/association/list', {}, "GET").then((res) => {
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view class="">
|
||||||
|
<view class="">
|
||||||
|
<u-loading-page :loading="load"></u-loading-page>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="load == false">
|
||||||
<view class="navbar" v-show="opCalue>0" :style="{'opacity':opCalue}">
|
<view class="navbar" v-show="opCalue>0" :style="{'opacity':opCalue}">
|
||||||
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
|
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
|
||||||
<view class="apptitle" :style="{'height':titleHeight+'px'}">
|
<view class="apptitle" :style="{'height':titleHeight+'px'}">
|
||||||
|
@ -57,15 +62,16 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
load: true,
|
||||||
statusHeight: 0,
|
statusHeight: 0,
|
||||||
titleHeight: 50,
|
titleHeight: 50,
|
||||||
opCalue:0,
|
opCalue:0,
|
||||||
|
@ -83,7 +89,24 @@
|
||||||
num: 4
|
num: 4
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
getData(){
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/silhouette/list', {}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
console.log(res.data)
|
||||||
|
_this.load = false
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
back(){
|
back(){
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,7 +7,7 @@ export default {
|
||||||
config: {
|
config: {
|
||||||
// baseUrl: "http://192.168.0.57:8090/h5/api", //王锡
|
// baseUrl: "http://192.168.0.57:8090/h5/api", //王锡
|
||||||
// baseUrl: "http://192.168.124.110:8088/api", //周源
|
// baseUrl: "http://192.168.124.110:8088/api", //周源
|
||||||
baseUrl: "http://192.168.0.11:8080/h5/api", //俞燕红
|
baseUrl: "http://192.168.0.29:8080/h5/api", //俞燕红
|
||||||
// baseUrl: "https://wlsq.ydool.com.cn/api", //线上
|
// baseUrl: "https://wlsq.ydool.com.cn/api", //线上
|
||||||
header: {
|
header: {
|
||||||
'Content-Type': 'application/json;charset=UTF-8',
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
Loading…
Reference in New Issue