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> </script>
<style> <style>
@import url("common.scss");
*{ *{
padding: 0; padding: 0;
margin: 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: { infoAddBankCard: {
url: '/api/info/addBankCard', 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>
<view class="createBy"> <view class="createBy">
<view class=""> <view class="">
发布人{{ item.userId_dictText }}
发布人{{ item.userId }}
</view> </view>
<view class=""> <view class="">
<uv-icon <uv-icon


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

@ -9,15 +9,24 @@
</view> </view>
<view class="search"> <view class="search">
<view class="icon">
<!-- <view class="icon">
<uv-icon <uv-icon
size="40rpx" size="40rpx"
name="search"></uv-icon> name="search"></uv-icon>
</view> </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>
<view class="swipe"> <view class="swipe">
@ -48,8 +57,6 @@
: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;border-radius: 20rpx;
padding: 20rpx;"
:key="index"> :key="index">
<view class="swiper-item"> <view class="swiper-item">
<image <image
@ -62,8 +69,9 @@
{{ item.name }} {{ item.name }}
</view> </view>
<view class="info-from"> <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> </view>
<view class="right"> <view class="right">
@ -159,6 +167,9 @@
} }
}) })
}, },
search(){
this.indexGetTrendsPage()
},
indexGetTrendsPage(fn){ indexGetTrendsPage(fn){
this.$api('indexGetTrendsPage', this.$api('indexGetTrendsPage',
this.queryParams, res => { this.queryParams, res => {
@ -170,10 +181,11 @@
}) })
}, },
bannerClick(index){ 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; flex-direction: column;
width: 100%; width: 100%;
image{ image{
width: 450rpx;
width: 100%;
height: 180rpx; height: 180rpx;
} }
.swiper-item-content{ .swiper-item-content{
@ -270,6 +282,7 @@
.info-from{ .info-from{
font-size: 26rpx; font-size: 26rpx;
color: #777; color: #777;
display: flex;
} }
} }
.right{ .right{
@ -283,6 +296,7 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-shrink: 0;
} }
} }
} }


+ 36
- 4
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="auto"></uv-swiper>
height="820rpx"></uv-swiper>
</view> </view>
<view class="box"> <view class="box">
@ -25,12 +25,13 @@
</view> </view>
<view class="phone"> <view class="phone">
<view class="" <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>
<view class="" <view class=""
v-else> v-else>
联系方式<text>付费查看</text>
联系方式<text @click="getContact">付费查看</text>
</view> </view>
</view> </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> </script>


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

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


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

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


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

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


Loading…
Cancel
Save