Browse Source

上传代码

master
前端-胡立永 10 months 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",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh" : true
"navigationBarTitleText": ""
}
},
{


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

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


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

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


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

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


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

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


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

@ -12,12 +12,21 @@
<!--搜索条件-->
<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
@change="keyWordChange"></uv-input>
</view>
<!--开始时间-->
开始时间
<view class="dateTimeCls">
<view class="date" @click="startDateOpen">
{{ queryParams.startDate }}
@ -28,7 +37,7 @@
<image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image>
</view>
</view>
<!--结束时间-->
结束时间
<view class="dateTimeCls">
<view class="date" @click="endDateOpen">
{{ queryParams.endDate }}
@ -39,7 +48,7 @@
<view class="image">
<image src="../static/promotionRecord/2.svg" style="width: 100%;height: 100%"></image>
</view>
</view>
</view> -->
</view>
<!--推广列表-->
<view style="" class="publishListClass">
@ -70,9 +79,10 @@
queryParams: {
pageNo: 1,
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) {
this.queryParams.keyWord = val
// this.queryParams.keyWord = val
this.getData()
},


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

@ -11,15 +11,23 @@
</view>
<!--标签栏-->
<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 class="" @click="tabChange(2)">
<!-- <view class="" @click="tabChange(2)">
<span :class="checkedIndex==2 ? 'tabbarItemActive' : 'tabbarItemNoActive'">贴子</span>
</view>
<view class="" @click="tabChange(1)">
<span :class="checkedIndex==1 ? 'tabbarItemActive' : 'tabbarItemNoActive'">名片</span>
</view>
<view class="" @click="tabChange(3)">
<span :class="checkedIndex==3 ? 'tabbarItemActive' : 'tabbarItemNoActive'">作品</span>
</view> -->
</view>
<!--发布列表-->
<view style="" class="publishListClass">
@ -43,18 +51,15 @@
data() {
return {
recordsList: [],
total: 0,
total: 0,
checkedIndex: 0,
queryParams: {
pageNo: 1,
pageSize: 10,
},
tabs : ['帖子', '名片', '作品'],
};
},
mounted() {
this.getData()
},
onReachBottom() {
console.log("===我的发布页面到底部了,开始加载数据===")
let allTotal = this.queryParams.pageNo * this.queryParams.pageSize
@ -72,6 +77,7 @@
// this.$refs.showLogin.checkLogin()
//
this.$store.commit('getUserInfo')
this.getData()
},
methods: {
getData() {
@ -79,7 +85,7 @@
pageNo: this.queryParams.pageNo,
pageSize: this.queryParams.pageSize,
// type
state: this.checkedIndex
type: this.checkedIndex
}, res => {
if (res.code == 200) {
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>
<view class="text">
<view class="title">
{{ item.title }}
{{ item.title || item.name }}
</view>
<view class="createBy">
<view class="">
@ -16,6 +16,11 @@
是否付费{{ item.isPay=='Y'?"是":"否" }}
</view>
</view>
<view class="isPay">
<view class="">
状态{{ state[item.state] }}
</view>
</view>
<view class="createTime">
发布时间{{ item.createTime }}
</view>
@ -36,6 +41,7 @@
pageSize: 5,
},
checkedIndex: 0,
state : ['待审核', '审核通过', '审核不通过,请编辑后重新提交'],
};
},
onShow() {
@ -65,15 +71,49 @@
})
},
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') {
// ()
console.log("跳转到动态(贴子)详情页面")
this.$utils.navigateTo('/publish/postDetail?id=' + item.id)
} else {
} else if(item.phone) {
// ()
console.log("跳转到演员(名片)详情页面")
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>
<submit @submit="submit" @preview="preview" @draft="draft" />
<submit @submit="submit" @preview="preview" @draft="draft"
:submitTitle="id ? '修改' : '发布'"/>
<!-- <confirmationPopup
@ -155,6 +156,7 @@
],
fileListImage: [],//
upTopList: [],
id: 0,
};
},
computed : {
@ -167,10 +169,46 @@
return {}
}
},
onLoad(options) {
// this.$route.query
this.id = options.id
},
onShow() {
// this.indexTopPayList()
this.getDateil()
},
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() {
this.$api('indexTopPayList', res => {
@ -211,11 +249,18 @@
pay() {
let data = {
...this.form,
isCard: 1,
// ...this.form,
title : this.form.title,
context : this.form.context,//
vod : this.fileList.map((item) => item.url).join(","),
image : this.fileListImage.map((item) => item.url).join(","),
}
if(this.id){
data.id = this.id
}
this.$api('releaseWorks', data,
res => {


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

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


Loading…
Cancel
Save