Browse Source

上传代码

master
前端-胡立永 1 year ago
parent
commit
4b708b830f
10 changed files with 276 additions and 53 deletions
  1. +1
    -2
      pages.json
  2. +1
    -0
      pages/index/index.vue
  3. +14
    -2
      pages/publish/actorDetail.vue
  4. +88
    -19
      pages/publish/actorRelease.vue
  5. +45
    -5
      pages/publish/publishPost.vue
  6. +18
    -8
      pages_mine/mine/promotionRecord.vue
  7. +15
    -9
      pages_mine/mine/releaseRecord.vue
  8. +44
    -4
      pages_mine/mine/sonPage/release/releaseList.vue
  9. +49
    -4
      pages_mine/publish/addWorks.vue
  10. +1
    -0
      pages_mine/publish/competition.vue

+ 1
- 2
pages.json View File

@ -46,8 +46,7 @@
{ {
"path": "pages/index/center", "path": "pages/index/center",
"style": { "style": {
"navigationBarTitleText": "",
"enablePullDownRefresh" : true
"navigationBarTitleText": ""
} }
}, },
{ {


+ 1
- 0
pages/index/index.vue View File

@ -149,6 +149,7 @@
} }
}, },
onPullDownRefresh(){ onPullDownRefresh(){
this.queryParams.pageNo = 1
this.indexGetTrendsPage() this.indexGetTrendsPage()
this.getData() this.getData()
}, },


+ 14
- 2
pages/publish/actorDetail.vue View File

@ -66,8 +66,11 @@
<view class="works"> <view class="works">
<view class="item" <view class="item"
v-for="(t, index) in item.details.isImage && item.details.isImage.split(',')"
v-for="(t, index) in item.details.isImage"
:key="index"> :key="index">
<view class="item-title">
{{ item.details.workName[index] || '' }}
</view>
<view class="item-image"> <view class="item-image">
<video :src="t" /> <video :src="t" />
</view> </view>
@ -85,7 +88,7 @@
style="width: 150rpx;height: 150rpx;" style="width: 150rpx;height: 150rpx;"
mode=""></image> mode=""></image>
<view class="info"> <view class="info">
请支付1010小时内可查看任意联系方式
请支付{{ item.details.price }}10小时内可查看任意联系方式
</view> </view>
</view> </view>
</confirmationPopup> </confirmationPopup>
@ -147,6 +150,15 @@
}, res => { }, res => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
if(res.code == 200){ if(res.code == 200){
res.result.details.isImage =
res.result.details.isImage ?
res.result.details.isImage.split(',') : [],
res.result.details.workName =
res.result.details.workName ?
res.result.details.workName.split(',') : []
this.item = res.result this.item = res.result
} }
}) })


+ 88
- 19
pages/publish/actorRelease.vue View File

@ -120,6 +120,7 @@
<uv-radio <uv-radio
size="35rpx" size="35rpx"
icon-size="35rpx" icon-size="35rpx"
:disabled="!!id"
:name="0"> :name="0">
</uv-radio> </uv-radio>
</view> </view>
@ -135,6 +136,7 @@
<uv-radio <uv-radio
size="35rpx" size="35rpx"
icon-size="35rpx" icon-size="35rpx"
:disabled="!!id"
:name="item.id"> :name="item.id">
</uv-radio> </uv-radio>
</view> </view>
@ -164,7 +166,8 @@
</view> </view>
</view> </view>
<submit @submit="submit" @preview="preview" @draft="draft" />
<submit @submit="submit" @preview="preview" @draft="draft"
:submitTitle="id ? '修改' : '发布'"/>
<confirmationPopup <confirmationPopup
@ -224,8 +227,13 @@
fileListImage: [],// fileListImage: [],//
upTopList: [], upTopList: [],
inputs : [], inputs : [],
id : 0,
}; };
}, },
onLoad(options) {
// this.$route.query
this.id = options.id
},
computed : { computed : {
topInfo(){ topInfo(){
for (var i = 0; i < this.upTopList.length; i++) { for (var i = 0; i < this.upTopList.length; i++) {
@ -238,8 +246,48 @@
}, },
onShow() { onShow() {
this.indexTopPayList() this.indexTopPayList()
this.getDateil()
}, },
methods: { 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() { indexTopPayList() {
this.$api('indexTopPayList', res => { this.$api('indexTopPayList', res => {
@ -286,21 +334,33 @@
let self = this let self = this
let data = { 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', isCard: 'N',
isImage : this.fileList.map((item) => item.url).join(","),// isImage : this.fileList.map((item) => item.url).join(","),//
image : this.fileListImage.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', isTop : this.form.topId ? 'Y' : 'N',
} }
if(this.id){
data.id = this.id
}
this.$api('publishActor', data, this.$api('publishActor', data,
res => { res => {
if (res.code == 200) { if (res.code == 200) {
// this.$refs.confirmationPopupUpload.open() // this.$refs.confirmationPopupUpload.open()
if(self.form.topId){
if(self.form.topId && !this.id){
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', // provider: 'wxpay', //
timeStamp: res.result.timeStamp, // timeStamp: res.result.timeStamp, //
@ -330,6 +390,7 @@
}, },
submit() { submit() {
if(this.fileListImage.length == 0){ if(this.fileListImage.length == 0){
return uni.showToast({ return uni.showToast({
title: '请上传封面', 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){ if(this.fileList.length == 0){
return uni.showToast({ return uni.showToast({
title: '请上传代表作', 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() this.$refs.confirmationPopup.open()
}else{ }else{
@ -373,9 +441,10 @@
}, },
confirm() { confirm() {
// this.$refs.confirmationPopupUpload.close() // this.$refs.confirmationPopupUpload.close()
uni.navigateTo({
url: "/pages/index/index"
})
// uni.navigateTo({
// url: "/pages/index/index"
// })
uni.navigateBack(-1)
}, },
} }
} }


+ 45
- 5
pages/publish/publishPost.vue View File

@ -46,6 +46,7 @@
<uv-radio <uv-radio
size="35rpx" size="35rpx"
icon-size="35rpx" icon-size="35rpx"
:disabled="!!id"
:name="0"> :name="0">
</uv-radio> </uv-radio>
</view> </view>
@ -60,6 +61,7 @@
<view class="right"> <view class="right">
<uv-radio <uv-radio
size="35rpx" size="35rpx"
:disabled="!!id"
icon-size="35rpx" icon-size="35rpx"
:name="item.id"> :name="item.id">
</uv-radio> </uv-radio>
@ -78,7 +80,7 @@
@submit="submit" @submit="submit"
@preview="preview" @preview="preview"
@draft="draft" @draft="draft"
submitTitle="发布帖子"
:submitTitle="id ? '修改帖子' : '发布帖子'"
/> />
<confirmationPopup <confirmationPopup
@ -99,7 +101,7 @@
<confirmationPopup <confirmationPopup
ref="confirmationPopupUpload" ref="confirmationPopupUpload"
title="提示" title="提示"
@confirm="$utils.redirectTo('/index/index')"
@confirm="$utils.navigateBack"
confirmText="确认"> confirmText="确认">
<view class="confirmationPopup"> <view class="confirmationPopup">
<image src="/static/image/publish/upload.png" <image src="/static/image/publish/upload.png"
@ -140,6 +142,7 @@
// url: 'https://cdn.uviewui.com/uview/swiper/2.jpg' // url: 'https://cdn.uviewui.com/uview/swiper/2.jpg'
// }, // },
], ],
id : 0,
}; };
}, },
computed : { computed : {
@ -152,10 +155,39 @@
return {} return {}
} }
}, },
onLoad(args) {
this.id = args.id
},
onShow() { onShow() {
this.indexTopPayList() this.indexTopPayList()
this.getDateil()
}, },
methods : { methods : {
getDateil(){
if(!this.id){
return
}
let self = this
this.$api('indexGetTrendsDetail', {
id : this.id
}, res => {
if (res.code == 200) {
res.result.details.image.split(',')
.forEach(url => {
self.fileList.push({
url
})
})
res.result.details.topId = res.result.details.topId || 0
this.form = res.result.details
}
})
},
deleteImage(e){ deleteImage(e){
this.fileList.splice(e.index, 1) this.fileList.splice(e.index, 1)
}, },
@ -182,16 +214,24 @@
let self = this let self = this
let data = { let data = {
...this.form,
// ...this.form,
content : this.form.content,
topId : this.form.topId,
title : this.form.title,
isCard : 'Y', isCard : 'Y',
state : 0,
image : this.fileList.map((item) => item.url).join(","), image : this.fileList.map((item) => item.url).join(","),
isTop : this.form.topId ? 'Y' : 'N', isTop : this.form.topId ? 'Y' : 'N',
} }
if(this.id){
data.id = this.id
}
this.$api('infoReleaseTrends', data, this.$api('infoReleaseTrends', data,
res => { res => {
if(res.code == 200){ if(res.code == 200){
if(self.form.topId){
if(self.form.topId && !this.id){
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', // provider: 'wxpay', //
timeStamp: res.result.timeStamp, // timeStamp: res.result.timeStamp, //
@ -239,7 +279,7 @@
return return
} }
if(this.form.topId){
if(this.form.topId && !this.id){
// //
this.$refs.confirmationPopup.open() this.$refs.confirmationPopup.open()
}else{ }else{


+ 18
- 8
pages_mine/mine/promotionRecord.vue View File

@ -12,12 +12,21 @@
<!--搜索条件--> <!--搜索条件-->
<view class="search"> <view class="search">
<uv-search
bgColor="#fff"
@search="keyWordChange"
@custom="keyWordChange"
placeholder="请输入搜索关键字..."
v-model="queryParams.title"></uv-search>
<!--搜索框--> <!--搜索框-->
<view style="width:30%;height:100%">
<!-- <view style="width:30%;height:100%">
<uv-input v-model="queryParams.keyWord" placeholder="请输入内容" border="surround" clearable <uv-input v-model="queryParams.keyWord" placeholder="请输入内容" border="surround" clearable
@change="keyWordChange"></uv-input> @change="keyWordChange"></uv-input>
</view> </view>
<!--开始时间-->
开始时间
<view class="dateTimeCls"> <view class="dateTimeCls">
<view class="date" @click="startDateOpen"> <view class="date" @click="startDateOpen">
{{ queryParams.startDate }} {{ queryParams.startDate }}
@ -28,7 +37,7 @@
<image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image> <image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image>
</view> </view>
</view> </view>
<!--结束时间-->
结束时间
<view class="dateTimeCls"> <view class="dateTimeCls">
<view class="date" @click="endDateOpen"> <view class="date" @click="endDateOpen">
{{ queryParams.endDate }} {{ queryParams.endDate }}
@ -39,7 +48,7 @@
<view class="image"> <view class="image">
<image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image> <image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image>
</view> </view>
</view>
</view> -->
</view> </view>
<!--推广列表--> <!--推广列表-->
<view style="" class="publishListClass"> <view style="" class="publishListClass">
@ -70,9 +79,10 @@
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
startDate: dayjs(new Date()).subtract(30,'day').format('YYYY-MM-DD'),
endDate: dayjs(new Date()).format('YYYY-MM-DD'),
keyWord: '',
// startDate: dayjs(new Date()).subtract(30,'day').format('YYYY-MM-DD'),
// endDate: dayjs(new Date()).format('YYYY-MM-DD'),
// keyWord: '',
title : '',
}, },
} }
}, },
@ -104,7 +114,7 @@
}) })
}, },
keyWordChange(val) { keyWordChange(val) {
this.queryParams.keyWord = val
// this.queryParams.keyWord = val
this.getData() this.getData()
}, },


+ 15
- 9
pages_mine/mine/releaseRecord.vue View File

@ -11,15 +11,23 @@
</view> </view>
<!--标签栏--> <!--标签栏-->
<view class="tabbar"> <view class="tabbar">
<view class="" @click="tabChange(0)">
<span :class="checkedIndex==0 ? 'tabbarItemActive' : 'tabbarItemNoActive'">全部</span>
<view class=""
@click="tabChange(index)"
:key="index"
v-for="(item, index) in tabs">
<span :class="checkedIndex==index ?
'tabbarItemActive' :
'tabbarItemNoActive'">{{ item }}</span>
</view> </view>
<view class="" @click="tabChange(2)">
<!-- <view class="" @click="tabChange(2)">
<span :class="checkedIndex==2 ? 'tabbarItemActive' : 'tabbarItemNoActive'">贴子</span> <span :class="checkedIndex==2 ? 'tabbarItemActive' : 'tabbarItemNoActive'">贴子</span>
</view> </view>
<view class="" @click="tabChange(1)"> <view class="" @click="tabChange(1)">
<span :class="checkedIndex==1 ? 'tabbarItemActive' : 'tabbarItemNoActive'">名片</span> <span :class="checkedIndex==1 ? 'tabbarItemActive' : 'tabbarItemNoActive'">名片</span>
</view> </view>
<view class="" @click="tabChange(3)">
<span :class="checkedIndex==3 ? 'tabbarItemActive' : 'tabbarItemNoActive'">作品</span>
</view> -->
</view> </view>
<!--发布列表--> <!--发布列表-->
<view style="" class="publishListClass"> <view style="" class="publishListClass">
@ -43,18 +51,15 @@
data() { data() {
return { return {
recordsList: [], recordsList: [],
total: 0,
total: 0,
checkedIndex: 0, checkedIndex: 0,
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
}, },
tabs : ['帖子', '名片', '作品'],
}; };
}, },
mounted() {
this.getData()
},
onReachBottom() { onReachBottom() {
console.log("===我的发布页面到底部了,开始加载数据===") console.log("===我的发布页面到底部了,开始加载数据===")
let allTotal = this.queryParams.pageNo * this.queryParams.pageSize let allTotal = this.queryParams.pageNo * this.queryParams.pageSize
@ -72,6 +77,7 @@
// this.$refs.showLogin.checkLogin() // this.$refs.showLogin.checkLogin()
// //
this.$store.commit('getUserInfo') this.$store.commit('getUserInfo')
this.getData()
}, },
methods: { methods: {
getData() { getData() {
@ -79,7 +85,7 @@
pageNo: this.queryParams.pageNo, pageNo: this.queryParams.pageNo,
pageSize: this.queryParams.pageSize, pageSize: this.queryParams.pageSize,
// type // type
state: this.checkedIndex
type: this.checkedIndex
}, res => { }, res => {
if (res.code == 200) { if (res.code == 200) {
this.recordsList = res.result.records this.recordsList = res.result.records


+ 44
- 4
pages_mine/mine/sonPage/release/releaseList.vue View File

@ -4,7 +4,7 @@
<image :src="item.image" style="width: 40%"></image> <image :src="item.image" style="width: 40%"></image>
<view class="text"> <view class="text">
<view class="title"> <view class="title">
{{ item.title }}
{{ item.title || item.name }}
</view> </view>
<view class="createBy"> <view class="createBy">
<view class=""> <view class="">
@ -16,6 +16,11 @@
是否付费{{ item.isPay=='Y'?"是":"否" }} 是否付费{{ item.isPay=='Y'?"是":"否" }}
</view> </view>
</view> </view>
<view class="isPay">
<view class="">
状态{{ state[item.state] }}
</view>
</view>
<view class="createTime"> <view class="createTime">
发布时间{{ item.createTime }} 发布时间{{ item.createTime }}
</view> </view>
@ -36,6 +41,7 @@
pageSize: 5, pageSize: 5,
}, },
checkedIndex: 0, checkedIndex: 0,
state : ['待审核', '审核通过', '审核不通过,请编辑后重新提交'],
}; };
}, },
onShow() { onShow() {
@ -65,15 +71,49 @@
}) })
}, },
gotoDetail(item) { gotoDetail(item) {
//
if(item.state == 0){
return uni.showToast({
title: '审核中',
icon:'none'
})
}
//
if(item.state == 2){
//
if (item.isCard == 'Y') {
// ()
uni.navigateTo({
url: '/pages/publish/publishPost?id=' + item.id
})
} else if(item.phone) {
// ()
uni.navigateTo({
url: '/pages/publish/actorRelease?id=' + item.id
})
}else{
//
uni.navigateTo({
url: '/pages_mine/publish/addWorks?id=' + item.id
})
}
return
}
// //
if (item.isCard == 'Y') { if (item.isCard == 'Y') {
// () // ()
console.log("跳转到动态(贴子)详情页面")
this.$utils.navigateTo('/publish/postDetail?id=' + item.id) this.$utils.navigateTo('/publish/postDetail?id=' + item.id)
} else {
} else if(item.phone) {
// () // ()
console.log("跳转到演员(名片)详情页面")
this.$utils.navigateTo('/publish/actorDetail?id=' + item.id) this.$utils.navigateTo('/publish/actorDetail?id=' + item.id)
}else{
//
uni.navigateTo({
url: '/pages_mine/publish/worksDetail?id=' + item.id
})
} }
} }
} }


+ 49
- 4
pages_mine/publish/addWorks.vue View File

@ -101,7 +101,8 @@
</view> </view>
</view> </view>
<submit @submit="submit" @preview="preview" @draft="draft" />
<submit @submit="submit" @preview="preview" @draft="draft"
:submitTitle="id ? '修改' : '发布'"/>
<!-- <confirmationPopup <!-- <confirmationPopup
@ -155,6 +156,7 @@
], ],
fileListImage: [],// fileListImage: [],//
upTopList: [], upTopList: [],
id: 0,
}; };
}, },
computed : { computed : {
@ -167,10 +169,46 @@
return {} return {}
} }
}, },
onLoad(options) {
// this.$route.query
this.id = options.id
},
onShow() { onShow() {
// this.indexTopPayList()
this.getDateil()
}, },
methods: { methods: {
getDateil(){
if(!this.id){
return
}
let self = this
this.$api('indexGetGetWorkDetail', {
id : this.id
}, res => {
if (res.code == 200) {
res.result.details.image.split(',')
.forEach(url => {
self.fileListImage.push({
url
})
})
res.result.details.vod.split(',')
.forEach(url => {
self.fileList.push({
url
})
})
res.result.details.topId = res.result.details.topId || 0
this.form = res.result.details
}
})
},
// //
indexTopPayList() { indexTopPayList() {
this.$api('indexTopPayList', res => { this.$api('indexTopPayList', res => {
@ -211,11 +249,18 @@
pay() { pay() {
let data = { let data = {
...this.form,
isCard: 1,
// ...this.form,
title : this.form.title,
context : this.form.context,//
vod : this.fileList.map((item) => item.url).join(","), vod : this.fileList.map((item) => item.url).join(","),
image : this.fileListImage.map((item) => item.url).join(","), image : this.fileListImage.map((item) => item.url).join(","),
} }
if(this.id){
data.id = this.id
}
this.$api('releaseWorks', data, this.$api('releaseWorks', data,
res => { res => {


+ 1
- 0
pages_mine/publish/competition.vue View File

@ -130,6 +130,7 @@
} }
}, },
onPullDownRefresh(){ onPullDownRefresh(){
this.queryParams.pageNo = 1
this.getList(res => { this.getList(res => {
this.list = res.result.records this.list = res.result.records
}) })


Loading…
Cancel
Save