Browse Source

上传代码

master
前端-胡立永 1 year ago
parent
commit
09f2cb1956
10 changed files with 193 additions and 213 deletions
  1. +19
    -13
      api/api.js
  2. +1
    -0
      api/http.js
  3. +1
    -1
      config.js
  4. +0
    -6
      pages.json
  5. +0
    -92
      pages/order/payOrder.vue
  6. +13
    -12
      pages/publish/actorDetail.vue
  7. +132
    -49
      pages/publish/actorRelease.vue
  8. +26
    -39
      pages/publish/publishPost.vue
  9. +1
    -1
      pages_mine/mine/purse.vue
  10. BIN
      static/image/+.png

+ 19
- 13
api/api.js View File

@ -23,16 +23,6 @@ const config = {
url: '/api/index/getActorDetail',
method: 'GET'
},
//发布演员接口
publishActor: {
url: '/api/index/releaseActorSet',
method: 'POST'
},
//发布动态接口
publishDynamicState: {
url: '/api/index/releaseTrends',
method: 'POST'
},
//获取认证演员
indexGetActorList: {
url: '/api/index/getActorList',
@ -89,8 +79,16 @@ const config = {
//发布动态
infoReleaseTrends: {
url: '/api/info/releaseTrends',
method: 'GET',
auth: true
method: 'POST',
auth: true,
limit : 1000,
},
//发布演员接口
publishActor: {
url: '/api/info/releaseActorSet',
method: 'POST',
auth: true,
limit : 1000,
},
//获取银行卡列表带分页
infoGetBankCardPage: {
@ -162,7 +160,7 @@ const config = {
infoSubmitCertification: {
url: '/api/info/submitCertification',
method: 'GET',
auth: true
auth: true,
},
// 企业认证提交
infoSubmitCompanyCertification: {
@ -182,6 +180,13 @@ const config = {
method: 'POST',
auth: true
},
// 获取用户平台数据
infoGetInfoMoney: {
url: '/api/info/getInfoMoney',
method: 'GET',
auth: true
},
//小程序-登录相关接口
@ -242,6 +247,7 @@ export function api(key, data, callback, loadingTitle) {
let storageKey = 'limit:' + req.url
let storage = uni.getStorageSync(storageKey)
if (storage && new Date().getTime() - parseInt(storage) < req.limit) {
console.log(storageKey);
return
}
uni.setStorageSync(storageKey, new Date().getTime())


+ 1
- 0
api/http.js View File

@ -25,6 +25,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
}
if(res.statusCode == 401 ||
res.data.code == 401 ||
res.data.message == '操作失败,token非法无效!'){
uni.removeStorageSync('token')
console.error('登录过期');


+ 1
- 1
config.js View File

@ -5,7 +5,7 @@ import utils from './utils/utils.js'
// 当前环境
const type = 'dev'
const type = 'prod'
// 环境配置


+ 0
- 6
pages.json View File

@ -23,12 +23,6 @@
"navigationBarTitleText": ""
}
},
{
"path": "pages/order/payOrder",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/auth/wxUserInfo",
"style": {


+ 0
- 92
pages/order/payOrder.vue View File

@ -1,92 +0,0 @@
<template>
<view class="payOrder">
<navbar
leftClick
@leftClick="$utils.navigateBack"
title="订单支付"/>
<view class="pay">
<view class="">
金额
</view>
<view class="">
100
</view>
</view>
<view class="submit"
@click="submit">
支付
</view>
<confirmationPopup
ref="confirmationPopup"
title="提示"
confirmText="确认">
<view class="confirmationPopup">
<!-- <image src="/static/image/publish/upload.png"
style="width: 150rpx;height: 150rpx;"
mode=""></image> -->
<view>
支付成功
</view>
</view>
</confirmationPopup>
</view>
</template>
<script>
import confirmationPopup from '@/components/toast/confirmationPopup.vue'
export default {
components : {
confirmationPopup,
},
data() {
return {
}
},
methods: {
submit(){
this.$refs.confirmationPopup.open()
},
}
}
</script>
<style scoped lang="scss">
.payOrder{
padding: 30rpx;
.pay{
display: flex;
color: #999;
justify-content: space-between;
padding: 20rpx 0;
border-bottom: 1px solid #999;
}
.submit{
background: $uni-linear-gradient-btn-color;
color: #fff;
padding: 20rpx 0;
text-align: center;
margin-top: 100rpx;
}
.confirmationPopup{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 200rpx;
image{
margin-top: 40rpx;
}
.info{
margin-top: 40rpx;
font-size: 26rpx;
}
}
}
</style>

+ 13
- 12
pages/publish/actorDetail.vue View File

@ -1,6 +1,6 @@
<template>
<view class="postDetail">
<navbar leftClick @leftClick="$utils.navigateBack" />
<navbar leftClick @leftClick="leftClick" />
<view class="swipe">
<uv-swiper
@ -50,13 +50,11 @@
<view class="works">
<view class="item"
v-for="(item, index) in list"
v-for="(t, index) in item.isImage && item.isImage.split(',')"
:key="index">
<view class="item-title">
{{ item.title }}
</view>
<view class="item-image">
<image :src="item.image" mode=""></image>
<!-- <v :src="t" mode=""></v> -->
<video src="t">
</view>
</view>
</view>
@ -85,16 +83,19 @@
onLoad(options) {
// this.$route.query
this.getData(options.id)
this.getList()
// this.getList()
},
//
onReachBottom() {
if(this.queryParams.pageSize < this.total){
this.queryParams.pageSize += 10
this.getList()
}
// if(this.queryParams.pageSize < this.total){
// this.queryParams.pageSize += 10
// this.getList()
// }
},
methods: {
leftClick(){
uni.navigateBack(-1)
},
getData(id){
this.$api('indexGetActorDetail', {
id
@ -194,7 +195,7 @@
background-color: #999;
width: 100%;
height: 250rpx;
image{
video{
width: 100%;
height: 100%;
}


+ 132
- 49
pages/publish/actorRelease.vue View File

@ -1,11 +1,17 @@
<template>
<view class="actorRelease">
<navbar leftClick @leftClick="$utils.navigateBack" title="演员发布" />
<view class="avatarFace" @click="uploadImage('image')">
<image v-if="form.image" :src="form.image" style="width: 100%;height: 100%"></image>
<image v-else src="../../static/image/+.png" style="width: 100%;height: 100%"></image>
<view class="images box">
<uv-upload
:fileList="fileListImage"
:maxCount="1"
multiple
width="150rpx"
height="150rpx"
@delete="deleteImage2"
@afterRead="afterRead2"
:previewFullImage="true"></uv-upload>
</view>
@ -45,7 +51,7 @@
详情介绍
</view>
<view class="textarea">
<uv-textarea v-model="form.content" :maxlength="200" count placeholder="输入详情介绍"></uv-textarea>
<uv-textarea v-model="form.photographerContent" :maxlength="200" count placeholder="输入详情介绍"></uv-textarea>
</view>
</view>
<view class="form-item-content">
@ -54,9 +60,15 @@
</view>
<view class="textarea">
<uv-radio-group v-model="form.isUser">
<uv-radio size="35rpx" icon-size="35rpx" label="本人发布" labelSize="28rpx" name="1">
<uv-radio size="35rpx"
icon-size="35rpx"
label="本人发布"
labelSize="28rpx" name="1">
</uv-radio>
<uv-radio size="35rpx" icon-size="35rpx" label="经纪人发布" labelSize="28rpx" name="0">
<uv-radio size="35rpx"
icon-size="35rpx"
label="经纪人发布"
labelSize="28rpx" name="0">
</uv-radio>
</uv-radio-group>
</view>
@ -74,7 +86,7 @@
</uv-radio-group>
</view>
</view>
<view class="form-item-content">
<!-- <view class="form-item-content">
<view class="label">
是否置顶
</view>
@ -86,24 +98,31 @@
</uv-radio>
</uv-radio-group>
</view>
<!-- 新版方法401暂时注释 -->
<!-- <view class="title">
</view> -->
<view class="upTop">
<view class="title">
<uv-icon name="pushpin-fill"></uv-icon>
是否置顶
</view>
<uv-radio-group v-model="form.upTop">
<uv-radio-group v-model="form.topId">
<view class="list">
<view class="item" v-for="(item, index) in upTopList" :key="index">
<view class="item"
v-for="(item, index) in upTopList"
:key="index">
<view class="left">
置顶{{ item.day }}{{ item.money }}
</view>
<view class="right">
<uv-radio size="35rpx" icon-size="35rpx" :name="item.id">
<uv-radio
size="35rpx"
icon-size="35rpx"
:name="item.id">
</uv-radio>
</view>
</view>
</view>
</uv-radio-group> -->
</uv-radio-group>
</view>
<view class="form-item-content">
@ -118,6 +137,22 @@
</view>
<submit @submit="submit" @preview="preview" @draft="draft" />
<confirmationPopup
ref="confirmationPopup"
title="提示"
@confirm="pay"
confirmText="确认支付">
<view class="confirmationPopup">
<image src="/static/image/publish/pay.png"
style="width: 150rpx;height: 150rpx;"
mode=""></image>
<view class="info">
确认支付{{ topInfo.money }}可置顶{{ topInfo.day }}
</view>
</view>
</confirmationPopup>
<confirmationPopup ref="confirmationPopupUpload" title="提示" confirmText="确认" @confirm="confirm()">
<view class="confirmationPopup">
@ -145,26 +180,37 @@
data() {
return {
form: {
phonePrice: '1',
upTop: '1',
createType: '1',
money: '',
name : '',
phone : '',
isUser : '1',//
phonePay : '1',//
photographerContent : '',//
},
fileList: [
fileList: [//
// {
// url: 'https://cdn.uviewui.com/uview/swiper/2.jpg'
// },
],
fileListImage: [],
fileListImage: [],//
upTopList: [],
};
},
computed: {
...mapState(['certifiedIndividual']),
computed : {
topInfo(){
for (var i = 0; i < this.upTopList.length; i++) {
if(this.upTopList[i].id == this.form.topId){
return this.upTopList[i]
}
}
return {}
}
},
mounted() {
// this.indexTopPayList()
onShow() {
this.indexTopPayList()
},
methods: {
//
indexTopPayList() {
this.$api('indexTopPayList', res => {
if (res.code == 200) {
@ -172,19 +218,12 @@
}
})
},
uploadImage(key) {
this.$Oss.ossUploadImage({
success: url => {
this.$set(this.form, "image", url)
// this.certifiedIndividual[key] = url
}
})
},
//
deleteImage(e) {
this.fileList.splice(e.index, 1)
},
//
afterRead(e) {
let self = this
e.file.forEach(file => {
@ -210,19 +249,15 @@
},
pay() {
let arr = []
this.fileList.forEach(n => {
arr.push(n.url)
})
let data = {
...this.form,
isCard: 1,
image: arr.join(',')
isImage : this.fileList.map((item) => item.url).join(","),
image : this.fileListImage.map((item) => item.url).join(","),
isTop : this.form.topId ? 'Y' : 'N',
}
this.$api('infoReleaseTrends', data,
this.$api('publishActor', data,
res => {
if (res.code == 200) {
this.$refs.confirmationPopupUpload.open()
@ -230,16 +265,40 @@
})
},
submit() {
console.log("fileList", this.fileList.map((item) => item.url).join(","))
this.form.magnumOpus = this.fileList.map((item) => item.url).join(",")
this.$api('publishActor', this.form, res => {
if (res.code == 200) {
this.$refs.confirmationPopupUpload.open()
}
})
if(this.fileListImage.length == 0){
return uni.showToast({
title: '请上传封面',
icon : 'none'
})
}
if(this.fileList.length == 0){
return uni.showToast({
title: '请上传代表作',
icon : 'none'
})
}
if (this.$utils.verificationAll(this.form, {
name: '请输入演员名称',
photographerContent: '请输入演员介绍',
phone: '请输入手机号',
money: '请输入价格',
})) {
return
}
if(this.form.topId){
//
this.$refs.confirmationPopup.open()
}else{
//
this.pay()
}
},
confirm() {
this.$refs.confirmationPopupUpload.close()
// this.$refs.confirmationPopupUpload.close()
uni.navigateTo({
url: "/pages/index/index"
})
@ -270,6 +329,30 @@
// border: 1px solid #000000;
margin-left: 10rpx;
}
.upTop{
margin-top: 40rpx;
.title{
padding-top: 20rpx;
padding-left: 30rpx;
border-top: 1px solid #00000015;
display: flex;
align-items: center;
}
.list{
padding-top: 30rpx;
width: 100%;
.item{
display: flex;
padding: 20rpx;
padding-left: 80rpx;
justify-content: space-between;
width: 600rpx;
border-bottom: 1px solid #00000015;
align-items: center;
}
}
}
.form {
.label {


+ 26
- 39
pages/publish/publishPost.vue View File

@ -31,11 +31,11 @@
</view>
<view class="upTop">
<!-- <view class="title">
<view class="title">
<uv-icon name="pushpin-fill"></uv-icon>
是否置顶
</view>
<uv-radio-group v-model="form.upTop">
<uv-radio-group v-model="form.topId">
<view class="list">
<view class="item"
v-for="(item, index) in upTopList"
@ -52,18 +52,7 @@
</view>
</view>
</view>
</uv-radio-group> -->
<view class="label">
是否置顶
</view>
<view class="textarea">
<uv-radio-group v-model="form.isTop">
<uv-radio size="35rpx" icon-size="35rpx" label="是" labelSize="28rpx" name="1">
</uv-radio>
<uv-radio size="35rpx" icon-size="35rpx" label="否" labelSize="28rpx" name="0">
</uv-radio>
</uv-radio-group>
</view>
</uv-radio-group>
</view>
<view class="configBtn"
@ -88,7 +77,7 @@
style="width: 150rpx;height: 150rpx;"
mode=""></image>
<view class="info">
确认支付3元可置顶1
确认支付{{ topInfo.money }}可置顶{{ topInfo.day }}
</view>
</view>
</confirmationPopup>
@ -129,7 +118,7 @@
form : {
// image : [],
content : '',
// upTop : '',
// topId : '',
title : '',
},
fileList: [
@ -139,8 +128,18 @@
],
};
},
computed : {
topInfo(){
for (var i = 0; i < this.upTopList.length; i++) {
if(this.upTopList[i].id == this.form.topId){
return this.upTopList[i]
}
}
return {}
}
},
onShow() {
// this.indexTopPayList()
this.indexTopPayList()
},
methods : {
deleteImage(e){
@ -165,16 +164,11 @@
},
pay(){
let arr = []
this.fileList.forEach(n => {
arr.push(n.url)
})
let data = {
...this.form,
isCard : 1,
image : arr.join(',')
image : this.fileList.map((item) => item.url).join(","),
isTop : this.form.topId ? 'Y' : 'N',
}
this.$api('infoReleaseTrends', data,
@ -186,8 +180,6 @@
},
submit(){
console.log(this.form);
if(this.fileList.length == 0){
return uni.showToast({
title: '请上传图片',
@ -201,19 +193,14 @@
})) {
return
}
console.log("图片集", this.fileList.map((item) => item.url).join(","))
this.form.image = this.fileList.map((item) => item.url).join(",")
this.$api('publishDynamicState', this.form, res => {
if (res.code == 200) {
this.$refs.confirmationPopupUpload.open()
}
})
// if(this.form.upTop){
// }else{
// this.$refs.confirmationPopup.open()
// }
if(this.form.topId){
//
this.$refs.confirmationPopup.open()
}else{
//
this.pay()
}
},
preview(){},
draft(){},
@ -253,7 +240,7 @@
.upTop{
.title{
padding-top: 20rpx;
padding-left: 30rpx;
padding-left: 20rpx;
border-top: 1px solid #00000015;
display: flex;
align-items: center;


+ 1
- 1
pages_mine/mine/purse.vue View File

@ -36,7 +36,7 @@
<view class="cards" >
<view class="cardItem" v-for="(item, index) in list" :key="index">
<view class="cardImage">
<image src="../static/addBankCard/1.svg" style="width: 100%;height: 100%;"></image>
<!-- <image src="../static/addBankCard/1.svg" style="width: 100%;height: 100%;"></image> -->
</view>
<view class="cardInfo">
<view class="cardNum">


BIN
static/image/+.png View File

Before After
Width: 40  |  Height: 40  |  Size: 585 B

Loading…
Cancel
Save