Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
yanghao | 36f3ddd251 | 3 years ago |
yanghao | b4cf818c61 | 3 years ago |
yanghao | 5ecf4ebd30 | 3 years ago |
yanghao | bcdb86f31c | 3 years ago |
yanghao | 19ab1980ba | 3 years ago |
yanghao | ba4626eb42 | 3 years ago |
@ -0,0 +1,95 @@
|
||||
<template> |
||||
<swiper class="swiper-block" circular="true" previous-margin="100rpx" next-margin="100rpx" current="0" @change="swiperChange"> |
||||
<swiper-item v-for="(item, index) in list" :key="index"> |
||||
<view class="swiper-item" :class="(swiperIndex == index ? 'active' : '')" @click="toDetail(item.id)"> |
||||
<image mode="aspectFill" :src="item.imageInput" class="slide-image"></image> |
||||
<view class="title line1">{{item.title}}</view> |
||||
<view class="intro line2">{{item.synopsis}}</view> |
||||
</view> |
||||
</swiper-item> |
||||
</swiper> |
||||
</template> |
||||
|
||||
<script> |
||||
export default{ |
||||
props: { |
||||
imgs: { |
||||
type: Array, |
||||
default: [] |
||||
}, |
||||
list: { |
||||
type: Array, |
||||
default: [] |
||||
} |
||||
}, |
||||
data(){ |
||||
return { |
||||
swiperIndex: 0 |
||||
} |
||||
}, |
||||
methods: { |
||||
swiperChange(e) { |
||||
this.swiperIndex = e.detail.current |
||||
}, |
||||
toDetail(id){ |
||||
this.$yrouter.push({ |
||||
path: '/pages/knowledge/detail', |
||||
query: { |
||||
id: id, |
||||
}, |
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="less"> |
||||
.swiper-block { |
||||
width: 100%; |
||||
height: 780rpx; |
||||
} |
||||
swiper-item{ |
||||
width: 100%; |
||||
height: 780rpx; |
||||
} |
||||
.swiper-item { |
||||
width: 420rpx; |
||||
height: 740rpx; |
||||
margin: 0 auto; |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: center; |
||||
align-items: flex-start; |
||||
overflow: unset; |
||||
position: relative; |
||||
} |
||||
.slide-image { |
||||
width: 420rpx; |
||||
height: 578rpx; |
||||
border-radius: 230rpx 230rpx 34rpx 34rpx; |
||||
border: 1rpx solid #B67827; |
||||
z-index: 1; |
||||
} |
||||
.title{ |
||||
width: 420rpx; |
||||
height: 96rpx; |
||||
background: #B67827; |
||||
color: #FFCB85; |
||||
text-align: center; |
||||
line-height: 96rpx; |
||||
margin-top: -96rpx; |
||||
padding: 0 12rpx; |
||||
border-radius: 0rpx 0rpx 34rpx 34rpx; |
||||
z-index: 99; |
||||
} |
||||
.intro{ |
||||
font-size: 28rpx; |
||||
color: #222; |
||||
margin-top: 20rpx; |
||||
} |
||||
.active { |
||||
transform: scale(1.1); |
||||
transition: all 0.2s linear; |
||||
z-index: 20; |
||||
} |
||||
</style> |
@ -1,9 +1,10 @@
|
||||
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
|
||||
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'
|
||||
// export const VUE_APP_API_URL = 'http://10.11.32.109:8088/api'
|
||||
// export const VUE_APP_API_URL = 'http://192.168.1.34:8088/api/'
|
||||
// export const VUE_APP_API_URL = 'http://192.168.0.112:8088/api'
|
||||
// export const VUE_APP_API_URL = 'http://192.168.68.126:8088/api'
|
||||
export const VUE_APP_API_URL = 'https://www.cyjyyjy.com/api' |
||||
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
|
||||
// export const VUE_APP_API_URL = 'https://thapi.xinxintuan.co/api'
|
||||
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
|
||||
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
|
||||
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
|
||||
export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static' |
@ -0,0 +1,108 @@
|
||||
<template> |
||||
<view class="article-list"> |
||||
<view class="article-item" v-for="(item,index) in list" :key="index" @click="toArticleDetail(item.id)"> |
||||
<image :src="item.imageInput" mode="aspectFill"></image> |
||||
<view class="article-content"> |
||||
<view class="article-title line1">{{item.title}}</view> |
||||
<view class="article-desc line1">{{item.synopsis}}</view> |
||||
<view class="author-box acea-row row-between"> |
||||
<view class="acea-row"> |
||||
<view class="author">{{item.author}}</view> |
||||
<view class="time">{{item.addTime.split(' ')[0]}}</view> |
||||
<view>{{item.visit}}人阅读</view> |
||||
</view> |
||||
<view class="tips" |
||||
:class="item.chargeType == 0 ? 'free-bg' : item.chargeType == 1 ? '' : 'jifen'"> |
||||
{{item.chargeType == 0 ? '免费' : item.chargeType == 1 ? '收费' : '积分'}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default{ |
||||
props:{ |
||||
list: { |
||||
type: Array, |
||||
default: [] |
||||
} |
||||
}, |
||||
methods:{ |
||||
toArticleDetail(id){ |
||||
this.$yrouter.push({ |
||||
path: '/pages/knowledge/detail', |
||||
query: { |
||||
id:id, |
||||
}, |
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="less"> |
||||
.article-list{ |
||||
width: 100%; |
||||
margin-top: 20rpx; |
||||
.article-item{ |
||||
width: 100%; |
||||
background: #fff; |
||||
box-sizing: border-box; |
||||
margin-bottom: 52rpx; |
||||
box-shadow: 0px 2rpx 8rpx rgba(0, 0, 0, 0.16); |
||||
image{ |
||||
width: 100%; |
||||
height: 266rpx; |
||||
border-radius: 10rpx; |
||||
margin-bottom: 20rpx; |
||||
} |
||||
.article-content{ |
||||
padding: 28rpx 32rpx; |
||||
} |
||||
.article-title{ |
||||
font-size: 36rpx; |
||||
font-weight: 500; |
||||
color: #333333; |
||||
line-height: 50rpx; |
||||
margin-bottom: 8rpx; |
||||
} |
||||
.article-desc{ |
||||
font-size: 24rpx; |
||||
font-weight: 400; |
||||
color: #999999; |
||||
line-height: 40rpx; |
||||
margin-bottom: 30rpx; |
||||
} |
||||
.author-box{ |
||||
font-size: 24rpx; |
||||
color: #999; |
||||
.author{ |
||||
color: #EA533E; |
||||
} |
||||
.time{ |
||||
margin: 0 12rpx; |
||||
} |
||||
.tips{ |
||||
width: 100rpx; |
||||
font-size: 20rpx; |
||||
color: #FFAD3A; |
||||
height: 34rpx; |
||||
text-align: center; |
||||
line-height: 34rpx; |
||||
background: #fcd391; |
||||
border-radius: 44rpx; |
||||
} |
||||
.free-bg{ |
||||
background: #8FB85B; |
||||
color: #D7FFA4; |
||||
} |
||||
.jifen{ |
||||
background: #AAC8FA; |
||||
color: #5693F9; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
</style> |
@ -0,0 +1,124 @@
|
||||
<template> |
||||
<view class="recommend-list-box acea-row row-between"> |
||||
<view class="recommend-item" v-for="(item,index) in list" :key="index" @click="toCourseDetail(item.id)"> |
||||
<view class="img-box"><image :src="item.coverImg" mode="aspectFill"></image></view> |
||||
<view class="course-content"> |
||||
<view class="course-title line1">{{item.courseName}}</view> |
||||
<view class="course-tips-box acea-row"> |
||||
<view class="course-tip-item blue">{{item.categoryName}}</view> |
||||
</view> |
||||
<!-- <view class="price" v-if="item.level > 2">{{item.level}}级课程</view> |
||||
<view class="price" v-if="item.level == 2">¥{{item.courseCharge}}</view> |
||||
<view class="price colG" v-if="item.chargeType == 0 || item.level == 1">免费</view> --> |
||||
<view class="course-address acea-row row-between-wrapper"> |
||||
<view class="address">{{item.coursePlace}}</view> |
||||
<view class="course-time">{{item.enterStartTime}}-{{item.enterEndTime}}</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default{ |
||||
props: { |
||||
list: { |
||||
type: Array, |
||||
default: [] |
||||
} |
||||
}, |
||||
data(){ |
||||
return { |
||||
titImg: '../../../static/tit1.png', |
||||
titleWord: '查看更多课程' |
||||
} |
||||
}, |
||||
methods:{ |
||||
toCourseDetail(id){ |
||||
this.$yrouter.push({ |
||||
path: '/pages/course/detail', |
||||
query: { |
||||
id:id, |
||||
}, |
||||
}) |
||||
}, |
||||
seeMoreClick(){ |
||||
uni.switchTab({ |
||||
url: "/pages/course/index" |
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="less"> |
||||
.recommend-list-box{ |
||||
width: 100%; |
||||
.recommend-item{ |
||||
width: 334rpx; |
||||
background: #fff; |
||||
border-radius: 10rpx; |
||||
font-size: 28rpx; |
||||
color: #333; |
||||
margin-right: 22rpx; |
||||
margin-bottom: 22rpx; |
||||
box-shadow: 0px 2rpx 4rpx rgba(0, 0, 0, 0.16); |
||||
image{ |
||||
width: 334rpx; |
||||
height: 216rpx; |
||||
border-top-left-radius: 10rpx; |
||||
border-top-right-radius: 10rpx; |
||||
} |
||||
.course-content{ |
||||
width: 100%; |
||||
box-sizing: border-box; |
||||
padding:0 10rpx 20rpx; |
||||
} |
||||
.course-title{ |
||||
line-height: 40rpx; |
||||
} |
||||
.course-tips-box{ |
||||
margin: 12rpx 0 24rpx; |
||||
font-size: 24rpx; |
||||
color: #999; |
||||
.course-tip-item{ |
||||
min-width: 60rpx; |
||||
height: 34rpx; |
||||
line-height: 32rpx; |
||||
text-align: center; |
||||
background: #EDEFF8; |
||||
border-radius: 4rpx; |
||||
border: 1px solid #6E85EB; |
||||
padding: 0 6rpx; |
||||
font-size: 22rpx; |
||||
margin-right: 20rpx; |
||||
box-sizing: border-box; |
||||
margin-right: 10rpx; |
||||
} |
||||
.blue{ |
||||
color: #6E85EB; |
||||
background: #EDEFF8; |
||||
border-color: #6E85EB; |
||||
} |
||||
.yellow{ |
||||
color: #F99C10; |
||||
background: #FFEDCC; |
||||
border-color: #F99C10; |
||||
} |
||||
} |
||||
.price{ |
||||
font-size: 32rpx; |
||||
color: #EA533E; |
||||
font-weight: 500; |
||||
margin: 16rpx 0; |
||||
} |
||||
.course-address{ |
||||
font-size: 24rpx; |
||||
color: #999999; |
||||
} |
||||
} |
||||
.recommend-item:nth-child(2n){ |
||||
margin-right: 0; |
||||
} |
||||
} |
||||
</style> |
@ -1,216 +1,214 @@
|
||||
<template> |
||||
<view class="group-goods pa20 mx20 mb10" v-if="detail.length>0"> |
||||
<view class="title-box x-bc" @tap="$yrouter.push({ path: '/pages/shop/HotNewGoods/index',query:{type:3} })"> |
||||
<text class="title">首发新品</text> |
||||
<view class="group-people x-f"> |
||||
<text class="tip">更多</text> |
||||
<text class="cuIcon-right"></text> |
||||
</view> |
||||
</view> |
||||
<view class="goods-box swiper-box x-f"> |
||||
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000"> |
||||
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item"> |
||||
<view class="goods-list-box x-f"> |
||||
<block v-for="mgoods in goods" :key="mgoods.id"> |
||||
<view class="min-goods" |
||||
@tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:mgoods.id} })"> |
||||
<view class="img-box"> |
||||
<view class="tag">new</view> |
||||
<image class="img" :src="mgoods.image" mode="widthFix"></image> |
||||
</view> |
||||
<view class="price-box"> |
||||
<view class="y-f"> |
||||
<text class="seckill-current">¥{{ mgoods.price }}</text> |
||||
<text class="original">销量{{ mgoods.sales }}{{mgoods.unitName}}</text> |
||||
</view> |
||||
</view> |
||||
<view class="title"> |
||||
<slot name="titleText"></slot> |
||||
</view> |
||||
</view> |
||||
</block> |
||||
</view> |
||||
</swiper-item> |
||||
</swiper> |
||||
<view class="swiper-dots" v-if="goodsList.length > 1"> |
||||
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length" |
||||
:key="index"></text> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import shActivityGoods from '@/components/sh-activity-goods.vue'; |
||||
|
||||
export default { |
||||
name: "FirstNewProduct", |
||||
components: { |
||||
shActivityGoods |
||||
}, |
||||
data() { |
||||
return { |
||||
goodsList: [], |
||||
swiperCurrent: 0 |
||||
}; |
||||
}, |
||||
props: { |
||||
detail: Array |
||||
}, |
||||
computed: {}, |
||||
created() {}, |
||||
watch: { |
||||
detail(next) { |
||||
this.goodsList = this.sortData(next, 4); |
||||
} |
||||
}, |
||||
methods: { |
||||
swiperChange(e) { |
||||
this.swiperCurrent = e.detail.current; |
||||
}, |
||||
// 数据分层 |
||||
sortData(oArr, length) { |
||||
let arr = []; |
||||
let minArr = []; |
||||
oArr.forEach(c => { |
||||
if (minArr.length === length) { |
||||
minArr = []; |
||||
} |
||||
if (minArr.length === 0) { |
||||
arr.push(minArr); |
||||
} |
||||
minArr.push(c); |
||||
}); |
||||
|
||||
return arr; |
||||
}, |
||||
jump(path, query) { |
||||
this.$yrouter.push({ |
||||
path, |
||||
query, |
||||
}); |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
|
||||
<style lang="scss" scoped> |
||||
.group-goods { |
||||
position: relative; |
||||
z-index: 9; |
||||
} |
||||
|
||||
.swiper-box, |
||||
.carousel { |
||||
width: 700rpx; |
||||
height: 240upx; |
||||
position: relative; |
||||
border-radius: 20rpx; |
||||
|
||||
.carousel-item { |
||||
width: 100%; |
||||
height: 100%; |
||||
// padding: 0 28upx; |
||||
overflow: hidden; |
||||
} |
||||
|
||||
.swiper-image { |
||||
width: 100%; |
||||
height: 100%; |
||||
// border-radius: 10upx; |
||||
background: #ccc; |
||||
} |
||||
} |
||||
|
||||
.swiper-dots { |
||||
display: flex; |
||||
position: absolute; |
||||
left: 50%; |
||||
transform: translateX(-50%); |
||||
bottom: 0rpx; |
||||
z-index: 66; |
||||
|
||||
.dot { |
||||
width: 45rpx; |
||||
height: 3rpx; |
||||
background: #eee; |
||||
border-radius: 50%; |
||||
margin-right: 10rpx; |
||||
} |
||||
|
||||
.dot-active { |
||||
width: 45rpx; |
||||
height: 3rpx; |
||||
background: #a8700d; |
||||
border-radius: 50%; |
||||
margin-right: 10rpx; |
||||
} |
||||
} |
||||
|
||||
// 今日必拼+限时抢购 |
||||
.group-goods { |
||||
background: #fff; |
||||
border-radius: 20rpx; |
||||
overflow: hidden; |
||||
|
||||
.title-box { |
||||
padding-bottom: 20rpx; |
||||
|
||||
.title { |
||||
font-size: 32rpx; |
||||
font-weight: bold; |
||||
} |
||||
|
||||
.group-people { |
||||
.time-box { |
||||
font-size: 26rpx; |
||||
color: #edbf62; |
||||
|
||||
.count-text-box { |
||||
width: 30rpx; |
||||
height: 34rpx; |
||||
background: #edbf62; |
||||
text-align: center; |
||||
line-height: 34rpx; |
||||
font-size: 24rpx; |
||||
border-radius: 6rpx; |
||||
color: rgba(#fff, 0.9); |
||||
margin: 0 8rpx; |
||||
} |
||||
} |
||||
|
||||
.head-box { |
||||
.head-img { |
||||
width: 40rpx; |
||||
height: 40rpx; |
||||
border-radius: 50%; |
||||
background: #ccc; |
||||
} |
||||
} |
||||
|
||||
.tip { |
||||
font-size: 28rpx; |
||||
padding-left: 30rpx; |
||||
color: #666; |
||||
} |
||||
|
||||
.cuIcon-right { |
||||
font-size: 30rpx; |
||||
line-height: 28rpx; |
||||
color: #666; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.goods-box { |
||||
.goods-item { |
||||
margin-right: 22rpx; |
||||
|
||||
&:nth-child(4n) { |
||||
margin-right: 0; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
<template> |
||||
<view class="group-goods pa20 mx20 mb10" v-if="detail.length>0"> |
||||
<view class="title-box x-bc" @tap="$yrouter.push({ path: '/pages/shop/HotNewGoods/index',query:{type:3} })"> |
||||
<text class="title">首发新品</text> |
||||
<view class="group-people x-f"> |
||||
<text class="tip">更多</text> |
||||
<text class="cuIcon-right"></text> |
||||
</view> |
||||
</view> |
||||
<view class="goods-box swiper-box x-f"> |
||||
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000"> |
||||
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item"> |
||||
<view class="goods-list-box x-f"> |
||||
<block v-for="mgoods in goods" :key="mgoods.id"> |
||||
<view class="min-goods" @tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:mgoods.id} })"> |
||||
<view class="img-box"> |
||||
<view class="tag">new</view> |
||||
<image class="img" :src="mgoods.image" mode="widthFix"></image> |
||||
</view> |
||||
<view class="price-box"> |
||||
<view class="y-f"> |
||||
<text class="seckill-current">¥{{ mgoods.price }}</text> |
||||
<text class="original">销量{{ mgoods.sales }}{{mgoods.unitName}}</text> |
||||
</view> |
||||
</view> |
||||
<view class="title"> |
||||
<slot name="titleText"></slot> |
||||
</view> |
||||
</view> |
||||
</block> |
||||
</view> |
||||
</swiper-item> |
||||
</swiper> |
||||
<view class="swiper-dots" v-if="goodsList.length > 1"> |
||||
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length" :key="index"></text> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import shActivityGoods from '@/components/sh-activity-goods.vue'; |
||||
|
||||
export default { |
||||
name: "FirstNewProduct", |
||||
components: { |
||||
shActivityGoods |
||||
}, |
||||
data() { |
||||
return { |
||||
goodsList: [], |
||||
swiperCurrent: 0 |
||||
}; |
||||
}, |
||||
props: { |
||||
detail: Array |
||||
}, |
||||
computed: {}, |
||||
created() {}, |
||||
watch: { |
||||
detail(next) { |
||||
this.goodsList = this.sortData(next, 4); |
||||
} |
||||
}, |
||||
methods: { |
||||
swiperChange(e) { |
||||
this.swiperCurrent = e.detail.current; |
||||
}, |
||||
// 数据分层 |
||||
sortData(oArr, length) { |
||||
let arr = []; |
||||
let minArr = []; |
||||
oArr.forEach(c => { |
||||
if (minArr.length === length) { |
||||
minArr = []; |
||||
} |
||||
if (minArr.length === 0) { |
||||
arr.push(minArr); |
||||
} |
||||
minArr.push(c); |
||||
}); |
||||
|
||||
return arr; |
||||
}, |
||||
jump(path, query) { |
||||
this.$yrouter.push({ |
||||
path, |
||||
query, |
||||
}); |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
|
||||
<style lang="scss" scoped> |
||||
.group-goods { |
||||
position: relative; |
||||
z-index: 9; |
||||
} |
||||
|
||||
.swiper-box, |
||||
.carousel { |
||||
width: 700rpx; |
||||
height: 240upx; |
||||
position: relative; |
||||
border-radius: 20rpx; |
||||
|
||||
.carousel-item { |
||||
width: 100%; |
||||
height: 100%; |
||||
// padding: 0 28upx; |
||||
overflow: hidden; |
||||
} |
||||
|
||||
.swiper-image { |
||||
width: 100%; |
||||
height: 100%; |
||||
// border-radius: 10upx; |
||||
background: #ccc; |
||||
} |
||||
} |
||||
|
||||
.swiper-dots { |
||||
display: flex; |
||||
position: absolute; |
||||
left: 50%; |
||||
transform: translateX(-50%); |
||||
bottom: 0rpx; |
||||
z-index: 66; |
||||
|
||||
.dot { |
||||
width: 45rpx; |
||||
height: 3rpx; |
||||
background: #eee; |
||||
border-radius: 50%; |
||||
margin-right: 10rpx; |
||||
} |
||||
|
||||
.dot-active { |
||||
width: 45rpx; |
||||
height: 3rpx; |
||||
background: #a8700d; |
||||
border-radius: 50%; |
||||
margin-right: 10rpx; |
||||
} |
||||
} |
||||
|
||||
// 今日必拼+限时抢购 |
||||
.group-goods { |
||||
background: #fff; |
||||
border-radius: 20rpx; |
||||
overflow: hidden; |
||||
|
||||
.title-box { |
||||
padding-bottom: 20rpx; |
||||
|
||||
.title { |
||||
font-size: 32rpx; |
||||
font-weight: bold; |
||||
} |
||||
|
||||
.group-people { |
||||
.time-box { |
||||
font-size: 26rpx; |
||||
color: #edbf62; |
||||
|
||||
.count-text-box { |
||||
width: 30rpx; |
||||
height: 34rpx; |
||||
background: #edbf62; |
||||
text-align: center; |
||||
line-height: 34rpx; |
||||
font-size: 24rpx; |
||||
border-radius: 6rpx; |
||||
color: rgba(#fff, 0.9); |
||||
margin: 0 8rpx; |
||||
} |
||||
} |
||||
|
||||
.head-box { |
||||
.head-img { |
||||
width: 40rpx; |
||||
height: 40rpx; |
||||
border-radius: 50%; |
||||
background: #ccc; |
||||
} |
||||
} |
||||
|
||||
.tip { |
||||
font-size: 28rpx; |
||||
padding-left: 30rpx; |
||||
color: #666; |
||||
} |
||||
|
||||
.cuIcon-right { |
||||
font-size: 30rpx; |
||||
line-height: 28rpx; |
||||
color: #666; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.goods-box { |
||||
.goods-item { |
||||
margin-right: 22rpx; |
||||
|
||||
&:nth-child(4n) { |
||||
margin-right: 0; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
</style> |
||||
|
@ -0,0 +1,54 @@
|
||||
<template> |
||||
<view class="title-box acea-row row-between-wrapper"> |
||||
<view class="title"><image :src="titImg"></image></view> |
||||
<view class="more" @click="seeMoreClick">{{titWord}}</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default{ |
||||
name: 'ListTitleBox', |
||||
props:{ |
||||
// 标题图片 |
||||
titImg:{ |
||||
type: String, |
||||
default: '' |
||||
}, |
||||
// 标题内容 |
||||
titWord: { |
||||
type: String, |
||||
default: '' |
||||
}, |
||||
// 图片尺寸 |
||||
width: { |
||||
type: String, |
||||
default: '' |
||||
}, |
||||
height: { |
||||
type: String, |
||||
default: '' |
||||
} |
||||
}, |
||||
|
||||
methods:{ |
||||
seeMoreClick(){ |
||||
this.$emit('seeMoreClick') |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="less"> |
||||
.title-box{ |
||||
width: 100%; |
||||
margin-bottom: 28rpx; |
||||
image{ |
||||
width: 206rpx; |
||||
height: 58rpx; |
||||
} |
||||
.more{ |
||||
font-size: 28rpx; |
||||
color: #999; |
||||
} |
||||
} |
||||
</style> |
@ -0,0 +1,95 @@
|
||||
<template> |
||||
<view class="study-list uni-padding-wrap uni-common-mt"> |
||||
<scroll-view class="scroll-view_H" scroll-x="true"> |
||||
<view class="study-item scroll-view-item_H" v-for="(item,index) in list" :key="index" @click="toStudyDetail(item.id)"> |
||||
<view class="day-box acea-row row-middle"> |
||||
<image src="../../../static/date-icon.png" v-if="index%2 == 0"></image> |
||||
<image src="../../../static/date-icon2.png" v-if="index%2 != 0"></image> |
||||
<text>{{item.clockTimes}}</text> |
||||
</view> |
||||
<view class="study-content"> |
||||
<view class="study-title line1">{{item.listName}}</view> |
||||
<view class="study-time acea-row-nowrap row-between-wrapper"> |
||||
<view>{{item.listStartTime}}开始</view> |
||||
<view>{{item.enterNum}}人已参与</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</scroll-view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default{ |
||||
props:{ |
||||
list: { |
||||
type: Array, |
||||
default: [] |
||||
} |
||||
}, |
||||
methods:{ |
||||
toStudyDetail(id){ |
||||
this.$yrouter.push({ |
||||
path: '/pages/study/detail', |
||||
query: { |
||||
id:id, |
||||
}, |
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="less"> |
||||
.study-list{ |
||||
width: 100%; |
||||
.scroll-view_H{ |
||||
white-space: nowrap; |
||||
width: 100%; |
||||
} |
||||
.study-item{ |
||||
width: 334rpx; |
||||
height: 180rpx; |
||||
display: inline-block; |
||||
background: linear-gradient(143deg, #FDAF97 0%, #ED5E48 100%); |
||||
box-shadow: 0px 4rpx 8rpx 4rpx rgba(250,194,183,0.32); |
||||
border-radius: 10rpx; |
||||
margin-right: 20rpx; |
||||
.day-box{ |
||||
color: #E73D21; |
||||
font-size: 48rpx; |
||||
line-height: 58rpx; |
||||
margin-left: 10rpx; |
||||
image{ |
||||
width: 34rpx; |
||||
height: 34rpx; |
||||
margin-right: 10rpx; |
||||
} |
||||
} |
||||
.study-content{ |
||||
width: calc(100% - 12rpx); |
||||
background: #fff; |
||||
font-size: 24rpx; |
||||
color: #999; |
||||
box-shadow: 0px 4rpx 8rpx 4rpx rgba(250,194,183,0.32); |
||||
border-radius: 10rpx; |
||||
margin: 2rpx auto; |
||||
padding:16rpx 10rpx 10rpx; |
||||
box-sizing: border-box; |
||||
.study-title{ |
||||
font-size: 28rpx; |
||||
font-weight: 500; |
||||
color: #222222; |
||||
line-height: 40rpx; |
||||
margin-bottom: 12rpx; |
||||
} |
||||
} |
||||
} |
||||
.study-item:nth-child(2n){ |
||||
background: linear-gradient(143deg, #C4DBFF 0%, #7FAAF2 100%); |
||||
.day-box{ |
||||
color: #557AB3; |
||||
} |
||||
} |
||||
} |
||||
</style> |
@ -1,435 +0,0 @@
|
||||
<template> |
||||
<view class="index"> |
||||
<view class="header header-search acea-row row-center-wrapper"> |
||||
<view @click="goGoodSearch()" class="search acea-row row-middle"> |
||||
<text class="iconfont icon-xiazai5"></text> |
||||
搜索商品 |
||||
</view> |
||||
<!-- #ifndef H5 --> |
||||
<view class="qr" @click="startQr()" v-if="$deviceType !== 'weixin'"> |
||||
<image :src="`${$VUE_APP_RESOURCES_URL}/images/qr.png`" /> |
||||
</view> |
||||
<!-- #endif --> |
||||
</view> |
||||
<view v-for="(item, index) in homeData" :key="index"> |
||||
<!-- <view class="head_box" v-if="item.type == 'header'" :style="{ background: bgcolor }" :class="{ active: bgcolor }"> |
||||
<cu-custom :isBack="true" :bgColor="bgcolor"> |
||||
<block slot="backText"> |
||||
<text class="nav-title shopro-selector-rect">{{ item.componentContent.title }}</text> |
||||
</block> |
||||
</cu-custom> |
||||
</view> --> |
||||
<Banner v-if="item.type == 'banner'" :detail="item.componentContent.bannerData" @getbgcolor="getbgcolor"></Banner> |
||||
<uni-notice-bar v-if="item.type == 'noticeBar'" scrollable="true" @click="goRoll(item.componentContent.roll[0])" single="true" :speed="10" showIcon="true" :text="item.componentContent.roll[0].info"></uni-notice-bar> |
||||
<view class="content_box home_content_box" v-if="item.type == 'menu' && item.componentContent.menus"> |
||||
<!-- 菜单 --> |
||||
<Menu :list="item.componentContent.menus"></Menu> |
||||
</view> |
||||
<!-- 滚动新闻 --> |
||||
<!-- 广告 --> |
||||
<Adv v-if="item.type == 'adv' && item.componentContent.detail" :detail="item.componentContent.detail" /> |
||||
<!-- 热门榜单 --> |
||||
<HotCommodity v-if="item.type == 'hotCommodity'" :detail="likeInfo"></HotCommodity> |
||||
<!-- 超值拼团 --> |
||||
<Groupon v-if="item.type == 'groupon'" :detail="combinationList" /> |
||||
<!-- 首发新品->秒杀 --> |
||||
<FirstNewProduct v-if="item.type == 'firstNewProduct'" :detail="firstList"></FirstNewProduct> |
||||
<!-- 精品推荐 --> |
||||
<ProductsRecommended v-if="item.type == 'productsRecommended'" :detail="bastList"></ProductsRecommended> |
||||
<!-- 促销单品 --> |
||||
<PromoteProduct v-if="item.type == 'promoteProduct'" :detail="benefit"></PromoteProduct> |
||||
<!-- 直播 --> |
||||
<!-- #ifdef MP-WEIXIN --> |
||||
<Live v-if="item.type == 'liveList'" :detail="liveList"></Live> |
||||
<!-- #endif --> |
||||
<!-- 为您推荐 --> |
||||
<PromotionGood v-if="item.type == 'promotionGood'" :benefit="benefit"></PromotionGood> |
||||
<Coupon-window :coupon-list="couponList" v-if="showCoupon" @checked="couponClose" @close="couponClose"> </Coupon-window> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
<script> |
||||
import { mapState, mapMutations, mapActions } from 'vuex' |
||||
import GoodList from '@/components/GoodList' |
||||
import PromotionGood from '@/components/PromotionGood' |
||||
import CouponWindow from '@/components/CouponWindow' |
||||
import Menu from '@/components/Menu' |
||||
import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar' |
||||
import Adv from '@/components/sh-adv' |
||||
import Groupon from '@/components/sh-groupon.vue' |
||||
|
||||
import Banner from './components/Banner' |
||||
import HotCommodity from './components/HotCommodity' |
||||
import FirstNewProduct from './components/FirstNewProduct' |
||||
import ProductsRecommended from './components/ProductsRecommended' |
||||
import Live from './components/Live' |
||||
|
||||
import { getHomeData, getShare, getCanvas } from '@/api/public' |
||||
import cookie from '@/utils/store/cookie' |
||||
import { isWeixin, handleUrlParam } from '@/utils/index' |
||||
|
||||
import { openShareAll } from '@/libs/wechat' |
||||
|
||||
const HAS_COUPON_WINDOW = 'has_coupon_window' |
||||
|
||||
export default { |
||||
name: 'Index', |
||||
components: { |
||||
// swiper, |
||||
// swiperSlide, |
||||
UniNoticeBar, |
||||
GoodList, |
||||
PromotionGood, |
||||
CouponWindow, |
||||
Menu, |
||||
Adv, |
||||
Groupon, |
||||
Banner, |
||||
HotCommodity, |
||||
FirstNewProduct, |
||||
ProductsRecommended, |
||||
Live, |
||||
}, |
||||
props: {}, |
||||
data: function() { |
||||
return { |
||||
homeData: [], |
||||
CustomBar: this.CustomBar, |
||||
StatusBar: this.StatusBar, |
||||
formatMenus: [], |
||||
categoryCurrent: 0, |
||||
menuNum: 4, |
||||
bgcolor: '', |
||||
bgColor: '', |
||||
swiperCurrent: 0, //轮播下标 |
||||
webviewId: 0, |
||||
showCoupon: false, |
||||
logoUrl: '', |
||||
banner: [], |
||||
menus: [], |
||||
combinationList: [], |
||||
roll: [], |
||||
activity: [], |
||||
activityOne: {}, |
||||
bastList: [], |
||||
firstList: [], |
||||
info: { |
||||
fastList: [], |
||||
bastBanner: [], |
||||
|
||||
bastList: [], |
||||
}, |
||||
likeInfo: [], |
||||
live: [], |
||||
lovely: [], |
||||
benefit: [], |
||||
couponList: [], |
||||
swiperOption: { |
||||
pagination: { |
||||
el: '.swiper-pagination', |
||||
clickable: true, |
||||
}, |
||||
autoplay: { |
||||
disableOnInteraction: false, |
||||
delay: 2000, |
||||
}, |
||||
loop: true, |
||||
speed: 1000, |
||||
observer: true, |
||||
observeParents: true, |
||||
}, |
||||
swiperRoll: { |
||||
direction: 'vertical', |
||||
autoplay: { |
||||
disableOnInteraction: false, |
||||
delay: 2000, |
||||
}, |
||||
loop: true, |
||||
speed: 1000, |
||||
observer: true, |
||||
observeParents: true, |
||||
}, |
||||
swiperScroll: { |
||||
freeMode: true, |
||||
freeModeMomentum: false, |
||||
slidesPerView: 'auto', |
||||
observer: true, |
||||
observeParents: true, |
||||
}, |
||||
swiperBoutique: { |
||||
pagination: { |
||||
el: '.swiper-pagination', |
||||
clickable: true, |
||||
}, |
||||
autoplay: { |
||||
disableOnInteraction: false, |
||||
delay: 2000, |
||||
}, |
||||
loop: true, |
||||
speed: 1000, |
||||
observer: true, |
||||
observeParents: true, |
||||
}, |
||||
swiperProducts: { |
||||
freeMode: true, |
||||
freeModeMomentum: false, |
||||
slidesPerView: 'auto', |
||||
observer: true, |
||||
observeParents: true, |
||||
}, |
||||
bgImage: '', |
||||
} |
||||
}, |
||||
computed: { |
||||
singNew() { |
||||
return this.roll.length > 0 ? this.roll[0] : '你还没添加通知哦!' |
||||
}, |
||||
customStyle() { |
||||
var bgImage = this.bgImage |
||||
// var style = `height:${this.CustomBar}px;padding-top:${0}px;background: ${this.bgcolor}`; |
||||
var style = `height:${this.CustomBar}px;padding-top:${this.StatusBar}px;background: ${this.bgcolor}` |
||||
if (this.bgImage) { |
||||
style = `${style}background-image:url(${bgImage});` |
||||
} |
||||
return style |
||||
}, |
||||
}, |
||||
onLoad: function() { |
||||
this.getLocation() |
||||
let that = this |
||||
// uni.showLoading({ |
||||
// title: "加载中", |
||||
// }); |
||||
getCanvas() |
||||
.then(res => {}) |
||||
.catch(error => { |
||||
this.homeData = JSON.parse(error.data.json) |
||||
console.log(this.homeData) |
||||
}) |
||||
getHomeData().then(res => { |
||||
that.logoUrl = res.data.logoUrl |
||||
res.data.banner.map(item => (item.bgcolor = item.color || '')) |
||||
that.$set(that, 'info', res.data.info) |
||||
that.$set(that, 'firstList', res.data.firstList) |
||||
that.$set(that, 'bastList', res.data.bastList) |
||||
that.$set(that, 'likeInfo', res.data.likeInfo) |
||||
that.$set(that, 'live', res.data.liveList) |
||||
that.$set(that, 'lovely', res.data.lovely) |
||||
that.$set(that, 'benefit', res.data.benefit) |
||||
that.$set(that, 'couponList', res.data.couponList) |
||||
that.$set(that, 'combinationList', res.data.combinationList) |
||||
uni.hideLoading() |
||||
that.setOpenShare() |
||||
// that.doColorThief() |
||||
}) |
||||
}, |
||||
methods: { |
||||
...mapActions(['getLocation']), |
||||
onShareTimeline: function() { |
||||
return { |
||||
title: this.miniHomeRemark, |
||||
imageUrl: this.miniHomeImg, |
||||
path: 'pages/home/index?spread=' + uni.getStorageSync('uid'), |
||||
} |
||||
}, |
||||
onShareAppMessage: function() { |
||||
return { |
||||
title: this.miniHomeRemark, |
||||
imageUrl: this.miniHomeImg, |
||||
path: 'pages/home/index?spread=' + uni.getStorageSync('uid'), |
||||
} |
||||
}, |
||||
goRoll(item) { |
||||
if (item.uniapp_url) { |
||||
this.$yrouter.push(item.uniapp_url) |
||||
} |
||||
}, |
||||
goGoodSearch() { |
||||
// this.$yrouter.push('/pages/shop/GoodsEvaluate/index'); |
||||
this.$yrouter.push('/pages/shop/GoodSearch/index') |
||||
}, |
||||
goWxappUrl(item) { |
||||
this.$yrouter.push(item.uniapp_url) |
||||
}, |
||||
goHotNewGoods(type) { |
||||
this.$yrouter.push({ |
||||
path: '/pages/shop/HotNewGoods/index', |
||||
query: { |
||||
type, |
||||
}, |
||||
}) |
||||
}, |
||||
goGoodsCon(item) { |
||||
this.$yrouter.push({ |
||||
path: '/pages/shop/GoodsCon/index', |
||||
query: { |
||||
id: item.id, |
||||
}, |
||||
}) |
||||
}, |
||||
goGoodsPromotion() { |
||||
this.$yrouter.push('/pages/shop/GoodsPromotion/index') |
||||
}, |
||||
setOpenShare: function() { |
||||
if (this.$deviceType == 'weixin') { |
||||
getShare().then(res => { |
||||
var data = res.data.data |
||||
var configAppMessage = { |
||||
desc: data.synopsis, |
||||
title: data.title, |
||||
link: location.href, |
||||
imgUrl: data.img, |
||||
} |
||||
openShareAll(configAppMessage) |
||||
}) |
||||
} |
||||
}, |
||||
startQr: function() { |
||||
uni.scanCode({ |
||||
success: res => { |
||||
let option = handleUrlParam(res.result) |
||||
switch (option.pageType) { |
||||
case 'good': |
||||
// 跳转商品详情 |
||||
this.$yrouter.push({ |
||||
path: '/pages/shop/GoodsCon/index', |
||||
query: { |
||||
q: res.result, |
||||
}, |
||||
}) |
||||
break |
||||
case 'group': |
||||
// 跳转团购 |
||||
this.$yrouter.push({ |
||||
path: '/pages/activity/GroupRule/index', |
||||
query: { |
||||
q: res.result, |
||||
}, |
||||
}) |
||||
break |
||||
case 'dargain': |
||||
// 跳转砍价 |
||||
this.$yrouter.push({ |
||||
path: '/pages/activity/DargainDetails/index', |
||||
query: { |
||||
q: res.result, |
||||
}, |
||||
}) |
||||
break |
||||
default: |
||||
// 跳转分销 |
||||
this.$yrouter.push({ |
||||
path: '/pages/Loading/index', |
||||
query: {}, |
||||
}) |
||||
break |
||||
} |
||||
}, |
||||
}) |
||||
}, |
||||
getbgcolor(e) { |
||||
this.bgcolor = e |
||||
}, |
||||
}, |
||||
created: async function() { |
||||
// await this.doColorThief(); |
||||
}, |
||||
} |
||||
</script> |
||||
<style scoped lang="less"> |
||||
.content_box { |
||||
background: #f3f3f3; |
||||
} |
||||
.index { |
||||
background-color: #f3f3f3; |
||||
} |
||||
.swiper-item { |
||||
height: 100%; |
||||
} |
||||
.fixed-header { |
||||
position: fixed; |
||||
z-index: 99; |
||||
// #ifdef H5 |
||||
top: 88rpx; |
||||
// #endif |
||||
|
||||
// #ifndef H5 |
||||
top: 0; |
||||
// #endif |
||||
left: 0; |
||||
right: 0; |
||||
background: #fff; |
||||
box-shadow: 0 0 20rpx -10rpx #aaa; |
||||
|
||||
& + .fixed-header-box { |
||||
height: 98rpx; |
||||
} |
||||
} |
||||
|
||||
.head_box { |
||||
width: 750rpx; |
||||
// background: #fff; |
||||
transition: all linear 0.3s; |
||||
|
||||
/deep/.cuIcon-back { |
||||
display: none; |
||||
} |
||||
|
||||
.nav-title { |
||||
font-size: 38rpx; |
||||
font-family: PingFang SC; |
||||
font-weight: 500; |
||||
color: #fff; |
||||
} |
||||
} |
||||
|
||||
.cu-bar.fixed { |
||||
position: fixed; |
||||
width: 100%; |
||||
top: 0; |
||||
z-index: 1024; |
||||
// box-shadow: 0 1upx 6upx rgba(0, 0, 0, 0.1); |
||||
} |
||||
|
||||
.cu-bar { |
||||
box-sizing: border-box; |
||||
.index .header { |
||||
height: 64rpx; |
||||
} |
||||
} |
||||
|
||||
.header-search { |
||||
transition: all linear 0.3s; |
||||
background: #fff; |
||||
.search{ |
||||
border: 2rpx solid #EA533E; |
||||
background-color: #fff; |
||||
} |
||||
} |
||||
|
||||
.cu-bar .action { |
||||
display: -webkit-box; |
||||
display: -webkit-flex; |
||||
display: flex; |
||||
align-items: center; |
||||
height: 100%; |
||||
max-height: 100%; |
||||
|
||||
&:first-child { |
||||
margin-left: 15px; |
||||
font-size: 15px; |
||||
} |
||||
} |
||||
|
||||
.home_content_box { |
||||
margin-top: -20rpx; |
||||
} |
||||
|
||||
.head_box { |
||||
} |
||||
|
||||
.nav-title { |
||||
margin-left: 20rpx; |
||||
line-height: 40px; |
||||
} |
||||
</style> |
@ -0,0 +1,108 @@
|
||||
<template> |
||||
<view class="bindcard-page"> |
||||
<view class="form"> |
||||
<view class="form-item"> |
||||
<view class="label">持卡人</view> |
||||
<input type="text" v-model="form.name" placeholder="请输入持卡人姓名" /> |
||||
</view> |
||||
<view class="form-item"> |
||||
<view class="label">银行卡号</view> |
||||
<input type="text" v-model="form.card" placeholder="请输入银行卡号" /> |
||||
</view> |
||||
<view class="form-item"> |
||||
<view class="label">开户行</view> |
||||
<input type="text" v-model="form.bank" placeholder="请输入开户行" /> |
||||
</view> |
||||
</view> |
||||
<view class="submit" @click="submit">确定</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { bingCard } from '@/api/user.js' |
||||
export default { |
||||
data() { |
||||
return { |
||||
form: { |
||||
name: '', |
||||
card: '', |
||||
bank: '' |
||||
} |
||||
} |
||||
}, |
||||
methods: { |
||||
submit(){ |
||||
if(this.form.name == '' ){ |
||||
return this.alertMessage('请输入持卡人姓名') |
||||
} else if(this.form.card == ''){ |
||||
return this.alertMessage('请输入银行卡号') |
||||
} else if(this.form.bank == ''){ |
||||
return this.alertMessage('请输入开户行') |
||||
} |
||||
bingCard({ |
||||
bankName: this.form.bank, |
||||
cardNumber: this.form.card, |
||||
cardholderName: this.form.name |
||||
}).then((res)=>{ |
||||
uni.showToast({ |
||||
title: '绑定成功!', |
||||
}) |
||||
setTimeout(()=>{ |
||||
uni.navigateBack({ |
||||
delta: 1, |
||||
}) |
||||
},1500) |
||||
}) |
||||
}, |
||||
alertMessage(msg){ |
||||
uni.showToast({ |
||||
title: msg, |
||||
icon: 'none' |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
page{ |
||||
width: 100%; |
||||
height: 100%; |
||||
background: #F8F8F8; |
||||
} |
||||
.bindcard-page{ |
||||
width: 100%; |
||||
padding: 32rpx 38rpx; |
||||
} |
||||
.form{ |
||||
width: 100%; |
||||
background: #fff; |
||||
border-radius: 18rpx; |
||||
} |
||||
.form-item{ |
||||
width: 100%; |
||||
height: 100rpx; |
||||
padding: 0 36rpx; |
||||
font-size: 34rpx; |
||||
color: #000; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
border: 2rpx solid #F5F5F5; |
||||
} |
||||
.form-item input{ |
||||
text-align: right; |
||||
font-size: 32rpx; |
||||
} |
||||
.submit{ |
||||
width: 440rpx; |
||||
height: 88rpx; |
||||
background: #F7C37A; |
||||
border-radius: 44rpx; |
||||
text-align: center; |
||||
line-height: 88rpx; |
||||
font-size: 46rpx; |
||||
color: #fff; |
||||
margin: 60rpx auto; |
||||
} |
||||
</style> |
@ -0,0 +1,167 @@
|
||||
<template> |
||||
<view class="cashout-page"> |
||||
<view class="profit-box"> |
||||
<image src="../../../static/profit.png" class="profit-bg"></image> |
||||
<view class="profit-info"> |
||||
<view>当前可提现积分<text class="s-word">(积分比例为1:1)</text></view> |
||||
<view class="fz70">{{userInfo.brokeragePrice || 0}}</view> |
||||
</view> |
||||
</view> |
||||
<view class="tips">注:提现需在每月20-26日进行,其他时间不可提现</view> |
||||
<view class="handle-box"> |
||||
<view class="tit">提现金额</view> |
||||
<view class="inp-box acea-row row-between row-middle"> |
||||
<text class="fz50">¥</text> |
||||
<input type="text" v-model="cashNum" placeholder="最低提现100积分" /> |
||||
<view class="colO" @click="allCash">全部提现</view> |
||||
</view> |
||||
</view> |
||||
<view class="submit-btn" @click="cashClick">提现</view> |
||||
</view> |
||||
|
||||
</template> |
||||
|
||||
<script> |
||||
import { getUserInfo, cash } from '@/api/user.js' |
||||
import cookie from '@/utils/store/cookie' |
||||
export default { |
||||
data() { |
||||
return { |
||||
cashNum: '', |
||||
userInfo: {}, |
||||
} |
||||
}, |
||||
mounted() { |
||||
getUserInfo().then((res)=>{ |
||||
this.userInfo = res.data |
||||
}) |
||||
}, |
||||
methods: { |
||||
allCash(){ |
||||
this.cashNum = this.userInfo.brokeragePrice |
||||
}, |
||||
cashClick(){ |
||||
if(this.userInfo.userBank){ |
||||
if(this.cashNum == '' || Number(this.cashNum) <= 100 || Number(this.cashNum) > this.userInfo.brokeragePrice){ |
||||
return this.alertMessage('请输入正确的积分') |
||||
} |
||||
cash({ |
||||
extractType: 'bank', |
||||
money: this.cashNum |
||||
}).then((res)=>{ |
||||
uni.showToast({ |
||||
title: '申请提现成功', |
||||
}) |
||||
setTimeout(()=>{ |
||||
uni.navigateBack({ |
||||
delta: 1, |
||||
}) |
||||
},1500) |
||||
}) |
||||
} else{ |
||||
uni.showModal({ |
||||
title: '提示!', |
||||
content: '您还未绑定银行卡,点击确定按钮立即绑定。', |
||||
success: (res)=> { |
||||
if(res.confirm){ |
||||
this.$yrouter.push({ |
||||
path: '/pages/user/bindCard/index' |
||||
}) |
||||
} |
||||
} |
||||
}) |
||||
} |
||||
}, |
||||
alertMessage(msg){ |
||||
uni.showToast({ |
||||
title: msg, |
||||
icon: 'none' |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
/* pages/user/cashOut/index.wxss */ |
||||
.cashout-page{ |
||||
width: 100%; |
||||
min-height: 100vh; |
||||
padding: 40rpx; |
||||
background: #F8F8F8; |
||||
} |
||||
.profit-box{ |
||||
width: 100%; |
||||
height: 256rpx; |
||||
position: relative; |
||||
margin-top: 20rpx; |
||||
} |
||||
.profit-box image{ |
||||
width: 100%; |
||||
height: 256rpx; |
||||
position: absolute; |
||||
top: 0; |
||||
} |
||||
.profit-info{ |
||||
width: 100%; |
||||
height: 100%; |
||||
position: absolute; |
||||
top: 0; |
||||
z-index: 3; |
||||
padding: 48rpx 94rpx 0 36rpx; |
||||
color: #fff; |
||||
font-weight: 500; |
||||
} |
||||
.s-word{ |
||||
font-size: 22rpx; |
||||
} |
||||
.fz70{ |
||||
font-size: 70rpx; |
||||
font-weight: 500; |
||||
line-height: 98rpx; |
||||
} |
||||
.tips{ |
||||
font-size: 20rpx; |
||||
color:#FF3434; |
||||
margin: 62rpx 0 20rpx; |
||||
font-weight: 600; |
||||
} |
||||
.handle-box{ |
||||
background: #fff; |
||||
border-radius: 18rpx; |
||||
font-size: 28rpx; |
||||
} |
||||
.handle-box .tit{ |
||||
width: 100%; |
||||
height: 98rpx; |
||||
line-height: 98rpx; |
||||
text-indent: 2em; |
||||
border-bottom: 2rpx solid #F5F5F5; |
||||
font-size: 28rpx; |
||||
} |
||||
.inp-box{ |
||||
width: 100%; |
||||
padding: 0 32rpx; |
||||
height: 108rpx; |
||||
} |
||||
.inp-box input{ |
||||
margin-left: -100rpx; |
||||
} |
||||
.fz50{ |
||||
font-size: 50rpx; |
||||
} |
||||
.colO{ |
||||
color: #F68514; |
||||
} |
||||
.submit-btn{ |
||||
width: 440rpx; |
||||
height: 88rpx; |
||||
background: #F7C37A; |
||||
border-radius: 44rpx; |
||||
text-align: center; |
||||
line-height: 88rpx; |
||||
font-size: 42rpx; |
||||
color: #FFFFFF; |
||||
margin: 110rpx auto 0; |
||||
} |
||||
</style> |
@ -0,0 +1,114 @@
|
||||
<template> |
||||
<view class="index-page"> |
||||
<view class="data-panel-box acea-row row-between"> |
||||
<view> |
||||
<view>今日新增</view> |
||||
<view class="fz40">{{teamInfo.todayNum}}人</view> |
||||
</view> |
||||
<view> |
||||
<view>一级</view> |
||||
<view class="fz40">{{teamInfo.firstNum}}人</view> |
||||
</view> |
||||
<view> |
||||
<view>二级</view> |
||||
<view class="fz40">{{teamInfo.secondNum}}人</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view class="t-header acea-row row-middle row-between"> |
||||
<view class="h-item">成员名称</view> |
||||
<view class="h-item w180">一级积分收益</view> |
||||
<view class="h-item w180">二级积分收益</view> |
||||
</view> |
||||
<view class="t-body"> |
||||
<view class="b-item acea-row row-middle row-between" v-for="(item,index) in teamInfo.teamList" wx:key="index"> |
||||
<view class="name">{{item.name}}</view> |
||||
<view class="name w180">{{item.firstNum}}积分</view> |
||||
<view class="name w180">{{item.secondNum}}积分</view> |
||||
</view> |
||||
</view> |
||||
<view class="loading-status">{{loadingStatus}}</view> |
||||
</view> |
||||
|
||||
</template> |
||||
|
||||
<script> |
||||
import { getMyTeam } from '@/api/user.js' |
||||
import cookie from '@/utils/store/cookie' |
||||
export default { |
||||
data() { |
||||
return { |
||||
userInfo: {}, |
||||
teamInfo: {}, |
||||
loadingStatus: '没有更多了。。。' |
||||
} |
||||
}, |
||||
mounted() { |
||||
this.userInfo = cookie.get('userInfo') |
||||
this.getTeam() |
||||
}, |
||||
onPullDownRefresh: function () { |
||||
this.getTeam() |
||||
}, |
||||
methods: { |
||||
getTeam(){ |
||||
getMyTeam().then((res)=>{ |
||||
this.teamInfo = res.data |
||||
console.log(this.teamInfo) |
||||
uni.stopPullDownRefresh() |
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
.index-page{ |
||||
width: 100%; |
||||
min-height: 100vh; |
||||
background: #F8F8F8; |
||||
padding: 32rpx 38rpx; |
||||
} |
||||
.data-panel-box{ |
||||
width: 100%; |
||||
padding: 38rpx 66rpx; |
||||
background: #FFD092; |
||||
border-radius: 24rpx; |
||||
color: #fff; |
||||
} |
||||
.data-panel-box view{ |
||||
text-align: center; |
||||
} |
||||
.fz40{ |
||||
font-size: 40rpx; |
||||
line-height: 56rpx; |
||||
} |
||||
.t-header{ |
||||
width: 100%; |
||||
height: 48rpx; |
||||
border-radius: 16rpx; |
||||
color: #AF681B; |
||||
font-size: 28rpx; |
||||
background: #fff; |
||||
padding: 0 22rpx; |
||||
margin: 16rpx 0; |
||||
} |
||||
.b-item{ |
||||
width: 100%; |
||||
padding: 22rpx; |
||||
background: #fff; |
||||
border-radius: 24rpx; |
||||
margin-bottom: 24rpx; |
||||
font-size: 28rpx; |
||||
color: #CC8E46; |
||||
} |
||||
.w180{ |
||||
width: 180rpx; |
||||
text-align: center; |
||||
} |
||||
.loading-status{ |
||||
text-align: center; |
||||
font-size: 28rpx; |
||||
color: #B9B9B9; |
||||
} |
||||
</style> |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 838 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 665 B |
After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 1007 B After Width: | Height: | Size: 560 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 565 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 852 B |
Before Width: | Height: | Size: 912 B After Width: | Height: | Size: 990 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.5 KiB |