Commit 1cab81da authored by 刘帅阳's avatar 刘帅阳

Merge remote-tracking branch 'origin/master'

parents 2f925d88 9deffacc
...@@ -68,6 +68,13 @@ ...@@ -68,6 +68,13 @@
"style": { "style": {
"navigationBarTitleText": "视频详情" "navigationBarTitleText": "视频详情"
} }
},
{
"path": "pages/spokesman/index",
"style": {
"navigationBarTitleText": "代言人",
"onReachBottomDistance": 80
}
}, },
{ {
"path": "pages/favorite/favorite", "path": "pages/favorite/favorite",
......
<template>
<view class="top">
<view v-if="hotList.length>0">
<view v-for="(item,index) in hotList" :key="index" class="indexcard">
<view class="cardtitle">
<view class="viewRow">姓名:{{item.name || '-'}}</view>
<view class="viewRow">账号:{{item.username || '-'}}</view>
<u-row gutter="8" class="expressRow">
<u-col :span="6"><view class="viewRow">文章推广量:{{item.clickThroughRate || '-'}}</view></u-col>
<u-col :span="6"><view class="viewRow">视频推广量:{{item.clickThroughRateVideo || '-'}}</view></u-col>
</u-row>
<u-row gutter="8" class="expressRow">
<u-col :span="6"><view class="viewRow">文章推广次数:{{item.clickThroughRateArticle || '-'}}</view></u-col>
<u-col :span="6"><view class="viewRow">视频推广次数:{{item.clickThroughRateVideoArticle || '-'}}</view></u-col>
</u-row>
<!-- <view class="cardtitle2">{{item.details.replace(/<[^>]*>/g, '')}}</view> -->
<!-- <view class="cardtitle3">{{formatPrice(item.price)}}</view>-->
</view>
</view>
<u-loadmore :status="status" />
</view>
<view v-else style="margin-top: 200rpx;">
<u-empty
mode="data"
>
</u-empty>
</view>
</view>
</template>
<script>
export default {
data() {
return {
hotList: [],
page: 1,
rows: 10,
total: 0,
status: "loadmore"
}
},
onLoad() {
this.noToken()
},
onShow() {
this.init()
},
onReady: function(res) {
// #ifndef MP-ALIPAY
this.videoContext = uni.createVideoContext('myVideo')
// #endif
},
methods: {
noToken() {
const token = this.vuex_token
console.log("token",token);
if (token.length <=0){
this.$u.route({
url: '/login/login/passwordLogin'
})
}
},
init(){
this.status = this.page*this.rows >= this.total ?
'nomore' : 'loadmore'
this.unitList = this.vuex_unit
if(this.unitList && this.unitList.length >0) {
this.unitId = this.unitList[0].businessId
}else {
this.unitId = ''
}
this.$u.get('cmspriceclick/getCmsPriceClickByCircleId?page=1&rows=10&unitId='+this.unitId).then(res => {
if (this.page === 1) {
let list = res.records;
this.hotList = list;
this.total = res.total
} else {
let list1 = res.records;
this.hotList = [...this.hotList, ...list1]
}
})
},
},
// 触底事件 - 上拉加载
onReachBottom() {
console.log("触底加载");
// 加判断: 页码数 * 每一页获取数据的条数 >= 总条数,如果符合条件说明数据已经全部加载完毕
let that = this
if (that.page*that.rows >= that.total) {
that.status = "nomore"
return
} else {
that.status = "loading"
that.page++ // 每触发一次触底事件,页码加1
that.init()
}
}
}
</script>
<style>
.top{
padding: 30rpx 0;
}
.viewRow{
padding-bottom: 20px;
}
.indexcard{
/* height: 127px; */
background: #FFFFFF;
box-shadow: 0px 0px 15px 1px rgba(0,0,0,0.06);
border-radius: 12px 12px 12px 12px;
display: flex;
margin: 0 30rpx 22rpx 30rpx;
/* margin-bottom: 22rpx; */
padding: 22rpx;
}
.cardimage{
width: 210rpx !important;
height: 210rpx !important;
border-radius: 8px 8px 8px 8px;
margin-right: 22rpx;
/* margin: 22rpx; */
}
.cardtitle{
width: 100%;
}
.cardtitle1{
font-size: 16px;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #333333;
margin-bottom: 30rpx;
overflow: hidden;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
.cardtitle2{
font-size: 14px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #666666;
/* margin-bottom: 30rpx; */
overflow: hidden;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
</style>
...@@ -44,6 +44,13 @@ ...@@ -44,6 +44,13 @@
</view> </view>
<image src="../../static/img/image/wode_icon_jiantou@2x.png" class="rightimage"></image> <image src="../../static/img/image/wode_icon_jiantou@2x.png" class="rightimage"></image>
</view> </view>
<view v-if="vuex_user.identity !== '3'" class="card" @click="openPage('pages/spokesman/index')">
<image src="../../static/img/image/wode_icon_dingdan@2x.png" class="leftimage"></image>
<view class="cardtitle">
<span>代言人</span>
</view>
<image src="../../static/img/image/wode_icon_jiantou@2x.png" class="rightimage"></image>
</view>
<!-- <view class="u-m-t-20"> <!-- <view class="u-m-t-20">
<u-cell-group> <u-cell-group>
<u-cell-item icon="map" title="收货地址" @click="openPage('/address/address/list')"></u-cell-item> <u-cell-item icon="map" title="收货地址" @click="openPage('/address/address/list')"></u-cell-item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment