This commit is contained in:
lnn19986213 2022-05-06 09:01:30 +08:00
parent c776e7eb50
commit 9cd72c6ef2
9 changed files with 709 additions and 229 deletions

View File

@ -112,7 +112,8 @@
"path": "pages/ArtWorks/ArtWorks", "path": "pages/ArtWorks/ArtWorks",
"style": { "style": {
"navigationBarTitleText": "文艺作品", "navigationBarTitleText": "文艺作品",
"enablePullDownRefresh": false "enablePullDownRefresh": true,
"onReachBottomDistance": 20
} }
} }

View File

@ -1,80 +1,194 @@
<template> <template>
<view> <view>
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false" <view class="">
v-model="artValue" placeholder="请输入名家名称"></u-search> <u-loading-page :loading="load"></u-loading-page>
<u-tabs :scrollable="false" :list="list1" :activeStyle="{ </view>
color: '#251B1D', <view v-if="load == false">
fontWeight: 'bold', <u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
transform: 'scale(1.05)' v-model="artValue" placeholder="请输入名家名称"></u-search>
}" :inactiveStyle="{ <u-tabs :scrollable="false" @click="clickTabs" :list="list1" :activeStyle="{
color: '#AFADB0 ', color: '#251B1D',
transform: 'scale(1)' fontWeight: 'bold',
}" itemStyle=" height: 50px; "> transform: 'scale(1.05)'
</u-tabs> }" :inactiveStyle="{
<view class="artworks"> color: '#AFADB0 ',
<view class="art_item" v-for="(v,i) in isLoveList" :key="i"> transform: 'scale(1)'
<view class="art_item_top"> }" itemStyle=" height: 50px; ">
<image src="../../static/artWork.png" mode="" @click="toDetail(i)"></image> </u-tabs>
<view class="like" @click="like(i)"> <view class="artworks">
<view :class=" isLoveList[i] ? 'img_selected' : 'img'"> <view class="art_item" v-for="(v,i) in isLoveList" :key="i">
<!-- 红心 --> <view class="art_item_top">
</view> <image src="../../static/artWork.png" mode="" @click="toDetail(i)"></image>
<view class="select_num"> <view class="like" @click="like(i)">
513 <view :class=" isLoveList[i] ? 'img_selected' : 'img'">
</view> <!-- 红心 -->
</view>
</view>
<view class=" art_item_bott" @click="toDetail(i)">
<view class="title">
摄影作品自由生活向美而生作品
</view>
<view class="sub_title">
摄影作品
</view>
<view class="img_box">
<view class=" puber">
<view class="avtor">
<image src="../../static/artWork.png" mode=""></image>
</view> </view>
<view class="autor"> <view class="select_num">
谢xx 513
</view> </view>
</view> </view>
</view>
<view class="time"> <view class=" art_item_bott" @click="toDetail(i)">
58分钟前 <view class="title">
摄影作品自由生活向美而生作品
</view>
<view class="sub_title">
摄影作品
</view>
<view class="img_box">
<view class=" puber">
<view class="avtor">
<image src="../../static/artWork.png" mode=""></image>
</view>
<view class="autor">
谢xx
</view>
</view>
<view class="time">
58分钟前
</view>
</view> </view>
</view> </view>
</view> </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);
} }
} }
} }

View File

@ -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>
<view class="gap">
作品内容可上传图片/音频/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>
</u-upload>
<view class="operation">
<u-upload class="upload" accept="media" width="172rpx" height="172rpx" :fileList="fileList3" <button type="default" class="next" @click="next">下一步</button>
@afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="2"> </view>
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload>
<view class="operation">
<button type="default" class="next" @click="next">下一步</button>
</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;
} }

View File

@ -1,117 +1,267 @@
<template> <template>
<view> <view>
<view class="bg"> <view class="">
<image src="../../static/puplishBG.png" mode=""></image> <u-loading-page :loading="load"></u-loading-page>
</view>
<view class="rightBox" @click="showSex=true">
<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"
placeholder="请选择作品使用权限" inputAlign="right">
<u-icon slot="suffix" name="arrow-right"></u-icon>
</u--input>
</view>
<view class="sub_ti_box" v-if="v1=='付费购买'" >
<text class="right_titl">使用费用</text>
<u--input placeholder="请输入使用费用" inputAlign="right" border="none" type="number" value=""></u--input> <text
style="margin-left: 16rpx;"></text>
</view> </view>
<view v-if="load == false">
<view class="bg">
<image src="../../static/puplishBG.png" mode=""></image>
</view>
<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"
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"
placeholder="请选择作品使用权限" inputAlign="right">
<u-icon slot="suffix" name="arrow-right"></u-icon>
</u--input>
</view>
<view class="sub_ti_box" v-if="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>
</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=='积分购买'">
<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>
</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>
<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"
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 ">
</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>
<view class="operation">
<button type="default" class="collection" @click="goPre">上一步</button>
<button type="default" class="apply" @click="cfmPub()">确认发布</button>
</view>
<view class="sub_ti_box" v-if="v1=='积分购买'" >
<text class="right_titl">使用积分</text>
<u--input placeholder="请输入使用积分" inputAlign="right" type="number" border="none" value=""></u--input> <text style="margin-left: 16rpx;"></text>
</view> </view>
<u-popup :show="showSex" @close="close" @open="open" 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.name" labelSize="28rpx" labelColor="#231F1C" :name="item.name" 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>
<view class="operation">
<button type="default" class="collection" @click="goPre">上一步</button>
<button type="default" class="apply" @click="cfmPub()">确认发布</button>
</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",
});
}) })
}, },
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({
title: e.data.message,
icon: "none",
});
})
},
goPre() {
uni.navigateBack()
// uni.navigateTo({
// url: "/pages/PublishWorks/PublishWorks"
// })
},
cfmPub() { cfmPub() {
let _this = this
uni.showToast({ if(this.v2 == ''){
title: '确认发布', uni.showToast({
duration: 2000 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) {
this.v1 = form
}, },
close(){ selectForm(form) {
this.showSex=false this.v1 = form
} this.price = ''
this.wpPath = ''
this.code = ''
},
selectFormB(form) {
this.v2 = form
this.v1 = ''
this.price = ''
this.wpPath = ''
this.code = ''
},
close() {
this.showSex = false
this.showBuy = false
}
} }
} }
</script> </script>
@ -135,10 +285,14 @@
margin-top: 16rpx; margin-top: 16rpx;
} }
.sub_ti_box{
display: flex; align-items: center; margin: 0 32rpx; .sub_ti_box {
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;
} }

View File

@ -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) => {

View File

@ -1,71 +1,77 @@
<template> <template>
<view> <view class="">
<view class="navbar" v-show="opCalue>0" :style="{'opacity':opCalue}"> <view class="">
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view> <u-loading-page :loading="load"></u-loading-page>
<view class="apptitle" :style="{'height':titleHeight+'px'}">
<image src="../../static/blackArrow.png" mode="" class="backImg" @click="back"></image>
<view class="barLabel">
文艺之家
</view>
</view>
</view> </view>
<u-swiper :list="list" indicator indicatorMode="dot" circular height="240"></u-swiper>
<view class="layout"> <view v-if="load == false">
<view class="activityColumn"> <view class="navbar" v-show="opCalue>0" :style="{'opacity':opCalue}">
<view class="banEle"> <view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
<view class="title"> <view class="apptitle" :style="{'height':titleHeight+'px'}">
文创展厅 <image src="../../static/blackArrow.png" mode="" class="backImg" @click="back"></image>
<view class="barLabel">
文艺之家
</view> </view>
<text class="more">
更多
</text>
</view> </view>
<u-scroll-list :indicator="false">
<view class="scroll-list">
<view class="scroll-list__goods-item" v-for="(item, index) in list2" :key="index"
:class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']" @click="GoWorksShow(index)">
<image class="scroll-list__goods-item__image" :src="item.image"></image>
<view class="scroll-list__goods-item__view overEllipsis">{{ item.title }}</view>
</view>
</view>
</u-scroll-list>
</view> </view>
<view class="activityColumn"> <u-swiper :list="list" indicator indicatorMode="dot" circular height="240"></u-swiper>
<view class="banEle"> <view class="layout">
<view class="title"> <view class="activityColumn">
活动剪影 <view class="banEle">
<view class="title">
文创展厅
</view>
<text class="more">
更多
</text>
</view> </view>
<!-- <text class="more"> <u-scroll-list :indicator="false">
更多 <view class="scroll-list">
</text> --> <view class="scroll-list__goods-item" v-for="(item, index) in list2" :key="index"
</view> :class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']" @click="GoWorksShow(index)">
<view class="activity" v-for="(v,i) in num" :key="i"> <image class="scroll-list__goods-item__image" :src="item.image"></image>
<view class="left"> <view class="scroll-list__goods-item__view overEllipsis">{{ item.title }}</view>
<view class="content">
<view class="title">
送万福进万家文艺惠民 暖人心嫁得好风扇电机接收到删掉就惊世毒妃
</view> </view>
</view> </view>
<view class="clidate"> </u-scroll-list>
<view class="cliNum">点击量:15</view> </view>
<view class="date">2022-01-11</view> <view class="activityColumn">
<view class="banEle">
<view class="title">
活动剪影
</view> </view>
<!-- <text class="more">
更多
</text> -->
</view> </view>
<view class="right"> <view class="activity" v-for="(v,i) in num" :key="i">
<image src="../../static/icon12.jpg" mode=""></image> <view class="left">
<view class="content">
<view class="title">
送万福进万家文艺惠民 暖人心嫁得好风扇电机接收到删掉就惊世毒妃
</view>
</view>
<view class="clidate">
<view class="cliNum">点击量:15</view>
<view class="date">2022-01-11</view>
</view>
</view>
<view class="right">
<image src="../../static/icon12.jpg" mode=""></image>
</view>
</view> </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()
}, },

View File

@ -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',

BIN
src/static/fileImg/pdfB.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB