|
|
@@ -1,17 +1,50 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
- <view class="" style="height: 1rpx;"></view>
|
|
|
- <empty v-if="loaded === true && list.length === 0"></empty>
|
|
|
- <view class="action-wrap" v-for="item in list">
|
|
|
- <image src="" mode=""></image>
|
|
|
+ <image v-if="detail.pics" :src="detail.pics.split(',')[1]" mode="widthFix" class="top-img"></image>
|
|
|
+ <view class="add-if">
|
|
|
+ <view class="jj">
|
|
|
+ <view class="if-tit">
|
|
|
+ 购买7万元宏根蒂品牌红酒成为
|
|
|
+ </view>
|
|
|
+ <view class="if-level">
|
|
|
+ 品牌经纪人
|
|
|
+ </view>
|
|
|
+ <view class="if-status">
|
|
|
+ {{userInfo.level > 0 ?'您已满足参与条件': '您未满足参与条件'}}
|
|
|
+ </view>
|
|
|
+ <view class="add-btn" :class="{'cant': userInfo.level == 0}" @click="add()">
|
|
|
+ 立即参与
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="add-recoed flex">
|
|
|
+ <view class="add-left">
|
|
|
+ <image src="../../static/icon/time.png" mode="widthFix"></image>参与记录
|
|
|
+ </view>
|
|
|
+ <view class="add-left add-right" @click="goDetail()">
|
|
|
+ 查看详情<image src="../../static/icon/write-go.png" mode="widthFix"></image>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="jj-wrap">
|
|
|
+ <view class="jj-tit">
|
|
|
+ 活动说明
|
|
|
+ </view>
|
|
|
+ <view class="jj" v-html="detail.content"></view>
|
|
|
+ </view>
|
|
|
+ <view class="" style="height: 60rpx;">
|
|
|
+
|
|
|
</view>
|
|
|
- <uni-load-more :status="loadingType"></uni-load-more>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
|
|
import empty from '@/components/empty';
|
|
|
+ import {
|
|
|
+ getActionDetail,
|
|
|
+ addAction
|
|
|
+ } from '@/api/index.js'
|
|
|
+ import { getUser } from '@/api/user.js'
|
|
|
export default {
|
|
|
components: {
|
|
|
uniLoadMore,
|
|
|
@@ -19,44 +52,51 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- page: 1,
|
|
|
- limit: 10,
|
|
|
- loadingType: 'more',
|
|
|
- loaded: false,
|
|
|
- list: []
|
|
|
+ userInfo: {
|
|
|
+
|
|
|
+ },
|
|
|
+ detail: {}
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
|
-
|
|
|
+ this.id = opt.id
|
|
|
+ this.getUser()
|
|
|
+
|
|
|
},
|
|
|
onShow() {
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
onReachBottom() {
|
|
|
|
|
|
},
|
|
|
onReady() {
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
- getList() {
|
|
|
+ goDetail() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/index/addList'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getUser() {
|
|
|
+ getUser().then(res => {
|
|
|
+ this.userInfo = res.data
|
|
|
+ this.getActionDetail()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getActionDetail() {
|
|
|
let that = this
|
|
|
- if(that.loadingType == 'loading' || that.loadingType == 'noMore') {
|
|
|
- return
|
|
|
- }
|
|
|
- getActionList({
|
|
|
- page: that.page,
|
|
|
- limit: that.limit
|
|
|
+ getActionDetail({
|
|
|
+
|
|
|
+ },that.id).then(res => {
|
|
|
+ that.detail = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ add() {
|
|
|
+ addAction({
|
|
|
+ out_id: this.id
|
|
|
}).then(res => {
|
|
|
- let list = res.data.list
|
|
|
- that.list = that.list.concat(list)
|
|
|
- that.page++
|
|
|
- if(list.length == that.limit) {
|
|
|
- that.loadingType = 'more'
|
|
|
- }else {
|
|
|
- that.loadingType = 'noMore'
|
|
|
- }
|
|
|
- that.loaded = true
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -64,15 +104,139 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
+ page {
|
|
|
+ height: auto;
|
|
|
+ min-height: 100%;
|
|
|
+ background-color: #fdd717;
|
|
|
+ }
|
|
|
+ .add-if {
|
|
|
+ width: 693rpx;
|
|
|
+ margin: 20rpx auto;
|
|
|
+ border: 3rpx solid #FED888;
|
|
|
+ background: linear-gradient(0deg, #FF9805, #FFB606);
|
|
|
+ border-radius: 20rpx;
|
|
|
+ padding: 20rpx;
|
|
|
+ .if-tit {
|
|
|
+ font-size: 43rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ text-align: center;
|
|
|
+ color: #6B4216;
|
|
|
+ }
|
|
|
+ .if-level {
|
|
|
+ width: 274rpx;
|
|
|
+ height: 76rpx;
|
|
|
+ border: 2rpx solid #6B4216;
|
|
|
+ border-radius: 14rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 76rpx;
|
|
|
+ font-size: 37rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #6B4216;
|
|
|
+ margin:40rpx auto 30rpx;
|
|
|
+ }
|
|
|
+ .if-status {
|
|
|
+ font-size: 26rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #666666;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .add-btn {
|
|
|
+ width: 366rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ background: linear-gradient(0deg, #FFB605, #FFD778);
|
|
|
+ border-radius: 40rpx;
|
|
|
+ line-height: 80rpx;
|
|
|
+ font-size: 36rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #6B4216;
|
|
|
+ text-align: center;
|
|
|
+ margin: 30rpx auto 20rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .add-recoed {
|
|
|
+ width: 693rpx;
|
|
|
+ height: 104rpx;
|
|
|
+ border: 3rpx solid #FED888;
|
|
|
+ background: linear-gradient(0deg, #FF9805, #FFB606);
|
|
|
+ border-radius: 35rpx;
|
|
|
+ margin: 20rpx auto;
|
|
|
+ padding: 0 32rpx;
|
|
|
+ .add-left {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ image {
|
|
|
+ width: 38rpx;
|
|
|
+ margin: 0 15rpx 0 0;
|
|
|
+ }
|
|
|
+ font-size: 36rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+ .add-right {
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #FFFFFF;
|
|
|
+ image {
|
|
|
+ width: 15rpx;
|
|
|
+ margin: 0 0 0 15rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
.action-wrap {
|
|
|
width: 704rpx;
|
|
|
height: 330rpx;
|
|
|
- margin:20rpx auto;
|
|
|
+ margin: 20rpx auto;
|
|
|
+
|
|
|
image {
|
|
|
-
|
|
|
+
|
|
|
width: 704rpx;
|
|
|
height: 330rpx;
|
|
|
border-radius: 20rpx;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+ .jj-wrap {
|
|
|
+ width: 693rpx;
|
|
|
+ // height: 100rpx;
|
|
|
+ padding: 49rpx 0 29rpx;
|
|
|
+ border: 3rpx solid #FED888;
|
|
|
+ background: linear-gradient(0deg, #FF9805, #FFB606);
|
|
|
+ border-radius: 35rpx;
|
|
|
+ margin: auto;
|
|
|
+ .jj-tit {
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+ font-size: 44rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #FFFFFF;
|
|
|
+ text-align: center;
|
|
|
+ position: relative;
|
|
|
+ &::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ margin: auto;
|
|
|
+ width: 418rpx;
|
|
|
+ height: 13rpx;
|
|
|
+ background: linear-gradient(0deg, #FFCA4E, #F3F4AB);
|
|
|
+ border-radius: 6rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ .jj {
|
|
|
+ background-color: #fff;
|
|
|
+ width: 653rpx;
|
|
|
+ margin: auto;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ border: 3px solid #FCE791;
|
|
|
+ padding: 20rpx;
|
|
|
+ }
|
|
|
+ .top-img {
|
|
|
+ width: 750rpx;
|
|
|
+ }
|
|
|
+ .cant {
|
|
|
+ background: #D3D3D3 !important;
|
|
|
+ color: #fff !important;
|
|
|
+ }
|
|
|
+</style>
|