Browse Source

上传代码

master
前端-胡立永 10 months ago
parent
commit
fc29cdc7a9
14 changed files with 78 additions and 38 deletions
  1. +5
    -7
      api/api.js
  2. +3
    -0
      components/config/configPopup.vue
  3. +15
    -5
      components/content/contentControls.vue
  4. +1
    -1
      config.js
  5. +2
    -1
      pages.json
  6. +10
    -12
      pages/auth/login.vue
  7. +4
    -3
      pages/index/index.vue
  8. +8
    -1
      pages/publish/actorDetail.vue
  9. +11
    -1
      pages/publish/postDetail.vue
  10. +1
    -1
      pages/publish/publishPost.vue
  11. +9
    -4
      pages_mine/publish/competition.vue
  12. +8
    -1
      pages_mine/publish/worksDetail.vue
  13. BIN
      static/image/login/logo.png
  14. +1
    -1
      store/store.js

+ 5
- 7
api/api.js View File

@ -256,6 +256,11 @@ const config = {
url: '/api/login/getPrivacyPolicy', url: '/api/login/getPrivacyPolicy',
method: 'GET', method: 'GET',
}, },
// 获取发布帖子发布需知
getPublishPostNotice: {
url: '/api/login/getPublishPostNotice',
method: 'GET',
},
// 获取用户协议 // 获取用户协议
getUserAgreement: { getUserAgreement: {
url: '/api/login/getUserAgreement', url: '/api/login/getUserAgreement',
@ -302,13 +307,6 @@ const config = {
}, },
// 立即支付
payOrder: {
url: '/api/order/payOrder',
method: 'POST',
showLoading : true,
},
} }
export function api(key, data, callback, loadingTitle) { export function api(key, data, callback, loadingTitle) {


+ 3
- 0
components/config/configPopup.vue View File

@ -41,6 +41,9 @@
.configPopup { .configPopup {
.content{ .content{
padding: 30rpx 20rpx; padding: 30rpx 20rpx;
overflow-x: scroll;
height: 100%;
box-sizing: border-box;
} }
} }
</style> </style>

+ 15
- 5
components/content/contentControls.vue View File

@ -14,10 +14,13 @@
<uv-icon v-else size="35rpx" name="thumb-up"></uv-icon> <uv-icon v-else size="35rpx" name="thumb-up"></uv-icon>
点赞 点赞
</view> </view>
<view class=""
@click="share">
<uv-icon size="35rpx" name="share"></uv-icon>
分享
<view class="">
<button
border="none"
open-type="share" class="share">
<uv-icon size="35rpx" name="share"></uv-icon>
分享
</button>
</view> </view>
<view class="" <view class=""
v-if="!isWork" v-if="!isWork"
@ -52,7 +55,6 @@
}, },
isWork : { isWork : {
default : false, default : false,
} }
}, },
data() { data() {
@ -121,5 +123,13 @@
align-items: center; align-items: center;
margin-right: 40rpx; margin-right: 40rpx;
} }
.share{
display: flex;
justify-content: center;
align-items: center;
}
.share::after{
border: none;
}
} }
</style> </style>

+ 1
- 1
config.js View File

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


+ 2
- 1
pages.json View File

@ -204,7 +204,8 @@
"navigationBarTitleText": "unapp模板", "navigationBarTitleText": "unapp模板",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8",
"navigationStyle": "custom"
"navigationStyle": "custom",
"onReachBottomDistance": 100
}, },
"uniIdRouter": {} "uniIdRouter": {}
} }

+ 10
- 12
pages/auth/login.vue View File

@ -1,7 +1,8 @@
<template> <template>
<view class="login"> <view class="login">
<view class="logo"> <view class="logo">
<image src="/static/image/login/logo.png" mode=""></image>
<image src="/static/image/login/logo.png"
mode="aspectFill"></image>
</view> </view>
<view class="title"> <view class="title">
欢迎登录真视界 欢迎登录真视界
@ -52,7 +53,7 @@
components : { configPopup }, components : { configPopup },
data() { data() {
return { return {
checkboxValue : []
checkboxValue : [],
} }
}, },
methods: { methods: {
@ -85,16 +86,13 @@
flex-direction: column; flex-direction: column;
position: relative; position: relative;
.logo{ .logo{
height: 80rpx;
width: 80rpx;
padding: 40rpx 30rpx;
background-color: #ddd;
border-radius: 70rpx;
image{ image{
width: 80rpx;
height: 80rpx;
width: 160rpx;
height: 160rpx;
border-radius: 80rpx;
box-shadow: 0 0 10rpx 10rpx #00000012;
} }
margin-bottom: 20rpx;
margin-bottom: 40rpx;
} }
.title{ .title{
position: relative; position: relative;
@ -139,9 +137,9 @@
.config{ .config{
position: absolute; position: absolute;
bottom: 0; bottom: 0;
font-size: 22rpx;
font-size: 28rpx;
text-align: center; text-align: center;
line-height: 40rpx;
line-height: 50rpx;
text{ text{
color: #3c69f1; color: #3c69f1;
} }


+ 4
- 3
pages/index/index.vue View File

@ -57,6 +57,7 @@
:autoplay="true" :autoplay="true"
:duration="500"> :duration="500">
<swiper-item v-for="(item, index) in actorList" <swiper-item v-for="(item, index) in actorList"
style="background-color: #fff;"
:key="index"> :key="index">
<view class="swiper-item"> <view class="swiper-item">
<image <image
@ -141,7 +142,7 @@
console.log("======首页滑动到底部触发====") console.log("======首页滑动到底部触发====")
let total = this.queryParams.pageNo * this.queryParams.pageSize let total = this.queryParams.pageNo * this.queryParams.pageSize
if(total < this.total){ if(total < this.total){
this.queryParams.pageSize += 10
this.queryParams.pageNo += 1
this.indexGetTrendsPage(res => { this.indexGetTrendsPage(res => {
this.trends.push(...res.result.records) this.trends.push(...res.result.records)
}) })
@ -179,8 +180,8 @@
this.queryParams, res => { this.queryParams, res => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
if(res.code == 200){ if(res.code == 200){
// fn && fn(res)
this.trends = res.result.records
fn && fn(res)
// this.trends = res.result.records
this.total = res.result.total this.total = res.result.total
} }
}) })


+ 8
- 1
pages/publish/actorDetail.vue View File

@ -7,7 +7,7 @@
:list="item.details.image && :list="item.details.image &&
item.details.image.split(',')" item.details.image.split(',')"
indicator indicator
height="820rpx"></uv-swiper>
height="420rpx"></uv-swiper>
</view> </view>
<view class="box"> <view class="box">
@ -100,6 +100,13 @@
console.log(options) console.log(options)
this.id = options.id this.id = options.id
}, },
onShareAppMessage(res) {
return {
title: this.item.details.title,
desc: this.item.details.content && this.item.details.content.slice(0, 30),
path: '/pages/publish/postDetail?id=' + this.id
}
},
onShow() { onShow() {
this.getData() this.getData()
}, },


+ 11
- 1
pages/publish/postDetail.vue View File

@ -4,7 +4,7 @@
<view class="swipe"> <view class="swipe">
<uv-swiper :list="item.image && <uv-swiper :list="item.image &&
item.image.split(',')" indicator height="820rpx"></uv-swiper>
item.image.split(',')" indicator height="420rpx"></uv-swiper>
</view> </view>
<view class="box"> <view class="box">
@ -68,6 +68,16 @@
onShow() { onShow() {
this.getData() this.getData()
}, },
onShareAppMessage(res) {
// if (res.from === 'button') {//
// console.log(res.target)
// }
return {
title: this.item.title,
desc: this.item.content && this.item.content.slice(0, 30),
path: '/pages/publish/postDetail?id=' + this.id
}
},
methods: { methods: {
getData() { getData() {
this.$api('indexGetTrendsDetail', { this.$api('indexGetTrendsDetail', {


+ 1
- 1
pages/publish/publishPost.vue View File

@ -70,7 +70,7 @@
</view> </view>
<view class="configBtn" <view class="configBtn"
@click="$refs.configPopup.open()">
@click="$refs.configPopup.open('getPublishPostNotice')">
发布须知 发布须知
</view> </view>


+ 9
- 4
pages_mine/publish/competition.vue View File

@ -62,10 +62,10 @@
</view> </view>
<view class="actor"> <view class="actor">
<view class="headImage"> <view class="headImage">
<image src="" mode=""></image>
<image :src="item.userImage" mode=""></image>
</view> </view>
<view class="username">
发布人{{ item.createBy }}
<view class="username text-ellipsis">
发布人{{ item.userId }}
</view> </view>
</view> </view>
<view class="createTime"> <view class="createTime">
@ -112,6 +112,8 @@
}, },
onLoad() { onLoad() {
// this.$route.query // this.$route.query
},
onShow() {
this.getList(res => { this.getList(res => {
this.list = res.result.records this.list = res.result.records
}) })
@ -127,7 +129,9 @@
} }
}, },
onPullDownRefresh(){ onPullDownRefresh(){
this.getList()
this.getList(res => {
this.list = res.result.records
})
}, },
methods: { methods: {
// //
@ -225,6 +229,7 @@
} }
.list{ .list{
padding-bottom: 180rpx;
.item{ .item{
font-size: 20rpx; font-size: 20rpx;
&:nth-child(1){ &:nth-child(1){


+ 8
- 1
pages_mine/publish/worksDetail.vue View File

@ -7,7 +7,7 @@
:list="item.image && :list="item.image &&
item.image.split(',')" item.image.split(',')"
indicator indicator
height="320rpx"></uv-swiper>
height="420rpx"></uv-swiper>
</view> </view>
<view class="box"> <view class="box">
@ -97,6 +97,13 @@
onShow() { onShow() {
this.getData() this.getData()
}, },
onShareAppMessage(res) {
return {
title: this.item.title,
desc: this.item.content && this.item.content.slice(0, 30),
path: '/pages_mine/publish/worksDetail?id=' + this.id
}
},
methods: { methods: {
leftClick(){ leftClick(){
uni.navigateBack(-1) uni.navigateBack(-1)


BIN
static/image/login/logo.png View File

Before After
Width: 34  |  Height: 45  |  Size: 222 B Width: 132  |  Height: 132  |  Size: 5.2 KiB

+ 1
- 1
store/store.js View File

@ -27,7 +27,7 @@ const store = new Vuex.Store({
// state.configList = res.result // state.configList = res.result
// } // }
// }) // })
let config = ['getPrivacyPolicy', 'getUserAgreement']
let config = ['getPrivacyPolicy', 'getUserAgreement', 'getPublishPostNotice']
config.forEach(k => { config.forEach(k => {
api(k, res => { api(k, res => {
if (res.code == 200) { if (res.code == 200) {


Loading…
Cancel
Save