Browse Source

上传代码

master
前端-胡立永 10 months ago
parent
commit
b2c7476a17
9 changed files with 116 additions and 26 deletions
  1. +1
    -0
      App.vue
  2. +8
    -0
      api/api.js
  3. +21
    -0
      common.scss
  4. +1
    -1
      components/post/postList.vue
  5. +27
    -13
      pages/index/index.vue
  6. +36
    -4
      pages/publish/actorDetail.vue
  7. +9
    -2
      pages/publish/actorList.vue
  8. +4
    -4
      pages/publish/postDetail.vue
  9. +9
    -2
      pages/publish/postList.vue

+ 1
- 0
App.vue View File

@ -11,6 +11,7 @@
</script>
<style>
@import url("common.scss");
*{
padding: 0;
margin: 0;


+ 8
- 0
api/api.js View File

@ -76,6 +76,14 @@ const config = {
// 小程序-个人中心接口
//点击创建支付订单支付获取联系方式
getContact: {
url: '/api/info/getContact',
method: 'GET',
auth: true,
limit : 1500,
showLoading : true,
},
//添加银行卡
infoAddBankCard: {
url: '/api/info/addBankCard',


+ 21
- 0
common.scss View File

@ -0,0 +1,21 @@
// 文字益处处理
.text-ellipsis{
overflow:hidden; //超出的文本隐藏
text-overflow:ellipsis; //溢出用省略号显示
white-space:nowrap; //溢出不换行
}
.text-ellipsis-2{
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box; //作为弹性伸缩盒子模型显示
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-webkit-line-clamp:2; //显示的行
}
.text-ellipsis-3{
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box; //作为弹性伸缩盒子模型显示
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-webkit-line-clamp:3; //显示的行
}

+ 1
- 1
components/post/postList.vue View File

@ -12,7 +12,7 @@
</view>
<view class="createBy">
<view class="">
发布人{{ item.userId_dictText }}
发布人{{ item.userId }}
</view>
<view class="">
<uv-icon


+ 27
- 13
pages/index/index.vue View File

@ -9,15 +9,24 @@
</view>
<view class="search">
<view class="icon">
<!-- <view class="icon">
<uv-icon
size="40rpx"
name="search"></uv-icon>
</view>
<input type="text" placeholder="请输入搜索关键字..."/>
<view class="text">
<input type="text" placeholder="请输入搜索关键字..."
v-model="queryParams.title"/>
<view class="text"
@click="search">
搜索
</view>
</view> -->
<!-- @change -->
<uv-search
bgColor="#fff"
@search="search"
@custom="search"
placeholder="请输入搜索关键字..."
v-model="queryParams.title"></uv-search>
</view>
<view class="swipe">
@ -48,8 +57,6 @@
:autoplay="true"
:duration="500">
<swiper-item v-for="(item, index) in actorList"
style="background-color: #fff;border-radius: 20rpx;
padding: 20rpx;"
:key="index">
<view class="swiper-item">
<image
@ -62,8 +69,9 @@
{{ item.name }}
</view>
<view class="info-from">
<text>{{ item.userId }}</text>
<text style="margin-left: 30rpx;">{{ $dayjs(item.createTime).format('YYYY-MM-DD') }}</text>
<text class="text-ellipsis"
style="width: 220rpx;">发布人:{{ item.userId }}</text>
<text style="margin-left: 20rpx;">{{ $dayjs(item.createTime).format('YYYY-MM-DD') }}</text>
</view>
</view>
<view class="right">
@ -159,6 +167,9 @@
}
})
},
search(){
this.indexGetTrendsPage()
},
indexGetTrendsPage(fn){
this.$api('indexGetTrendsPage',
this.queryParams, res => {
@ -170,10 +181,11 @@
})
},
bannerClick(index){
console.log(index);
uni.navigateTo({
url: '/pages_mine/publish/competition'
})
if(this.banner[index].toUrl){
uni.navigateTo({
url: this.banner[index].toUrl
})
}
}
}
}
@ -255,7 +267,7 @@
flex-direction: column;
width: 100%;
image{
width: 450rpx;
width: 100%;
height: 180rpx;
}
.swiper-item-content{
@ -270,6 +282,7 @@
.info-from{
font-size: 26rpx;
color: #777;
display: flex;
}
}
.right{
@ -283,6 +296,7 @@
display: flex;
justify-content: center;
align-items: center;
flex-shrink: 0;
}
}
}


+ 36
- 4
pages/publish/actorDetail.vue View File

@ -7,7 +7,7 @@
:list="item.details.image &&
item.details.image.split(',')"
indicator
height="auto"></uv-swiper>
height="820rpx"></uv-swiper>
</view>
<view class="box">
@ -25,12 +25,13 @@
</view>
<view class="phone">
<view class=""
v-if="item.details.phonePay != 'Y'">
{{ item.details.phone }}
@click="getContact"
v-if="item.details.phonePay != 'Y' || item.isPayPhone">
联系方式{{ item.details.phone }}
</view>
<view class=""
v-else>
联系方式<text>付费查看</text>
联系方式<text @click="getContact">付费查看</text>
</view>
</view>
</view>
@ -119,6 +120,37 @@
}
})
},
//
getContact(){
let self = this
this.$api('getContact', {
id : this.item.details.id
} , res => {
if(res.code == 200){
uni.requestPayment({
provider: 'wxpay', //
timeStamp: res.result.timeStamp, //
nonceStr: res.result.nonceStr, //
package: res.result.packageValue,
signType: res.result.signType, //
paySign: res.result.paySign, //
success: function (res) {
console.log('支付成功',res);
self.getData()
},
fail: function (err) {
console.log('支付失败',err);
uni.showToast({
icon:'none',
title:"支付失败"
})
}
});
}
})
},
}
}
</script>


+ 9
- 2
pages/publish/actorList.vue View File

@ -13,7 +13,7 @@
<view class="box">
<view class="search">
<view class="icon">
<!-- <view class="icon">
<uv-icon
size="40rpx"
name="search"></uv-icon>
@ -23,7 +23,14 @@
<view class="text"
@click="getData">
搜索
</view>
</view> -->
<uv-search
bgColor="#fff"
@search="getData"
@custom="getData"
placeholder="请输入搜索关键字..."
v-model="queryParams.title"></uv-search>
</view>
<actorList :list="actorList"/>


+ 4
- 4
pages/publish/postDetail.vue View File

@ -52,8 +52,8 @@
list: [
],
item: {},
isThumbs_up: {},//
isThumbs_down: {},//
isThumbs_up: undefined,//
isThumbs_down: undefined,//
id : 0,
}
},
@ -67,11 +67,11 @@
},
methods: {
getData() {
this.$api('infoGetMyReleaseDetail', {
this.$api('indexGetTrendsDetail', {
id : this.id
}, res => {
if (res.code == 200) {
this.item = res.result
this.item = res.result.details
this.isThumbs_up = res.result.isThumbs_up//
this.isThumbs_down = res.result.isThumbs_down//
}


+ 9
- 2
pages/publish/postList.vue View File

@ -12,7 +12,7 @@
<view class="box">
<view class="search">
<view class="icon">
<!-- <view class="icon">
<uv-icon
size="40rpx"
name="search"></uv-icon>
@ -23,7 +23,14 @@
<view class="text"
@click="indexGetTrendsPage">
搜索
</view>
</view> -->
<uv-search
bgColor="#fff"
@search="indexGetTrendsPage"
@custom="indexGetTrendsPage"
placeholder="请输入搜索关键字..."
v-model="queryParams.title"></uv-search>
</view>
<postList :list="postList"/>


Loading…
Cancel
Save