Commit 808313a7 by zhangzhen

功能优化

parent 3426f2fb
......@@ -50,4 +50,9 @@ export const equityFundExcess=(data)=>{
export const equityBindUser=(data)=>{
let url=`/activities/list`
return http.get(url,data)
}
export const equityDuration=(data)=>{
let url=`/durationLog/sumVariableDuration`
return http.get(url,data)
}
\ No newline at end of file
......@@ -157,6 +157,13 @@
{
"navigationBarTitleText" : "分享"
}
},
{
"path" : "pages/activity/index",
"style" :
{
"navigationBarTitleText" : "活动中心"
}
}
],
"subPackages": [
......
<template>
<view class="flex-col activity">
<view class="act-header">
<image :src="assetsPath+'/act_header.png'" mode="widthFix"></image>
</view>
<view class="box-1">
<view class="box-2">
<view class="flex-col part-left">
<text class="text-1">分享好友送时长</text>
<view class="flex-row-center">
<text class="text-2">已赠送</text>
<text class="text-time text-pink">{{countDuration}}</text>
<text class="text-2">小时,已分享成功{{countNum}}</text>
</view>
</view>
<view class="line">
</view>
<view class="flex-col part-right">
<view class="amount-icon">
<image :src="assetsPath+'/amount_icon.png'" mode="widthFix"></image>
</view>
<button class="relative btn-box" open-type="share">
<image :src="assetsPath+'/btn_bg.png'" mode="scaleToFill"></image>
<view class="flex-row-center absolute">
<text class="text-pink">分享好友</text>
</view>
</button>
</view>
</view>
</view>
<view class="empty-box">
<u-empty text="更多活动,敬请期待!" textColor='#C1C1C1' width="120" icon="" iconSize="0">
</u-empty>
</view>
<view class="banner-box">
<swiper class="banner-swiper" :indicator-dots="true" :circular="true" :autoplay="true"
:duration="1000" :interval="3000" indicator-active-color="#FFD600" indicator-color="rgba(0,0,0,0.5)">
<swiper-item v-for="(item,k) in bannerList" :key="k">
<view class="banner-item" @tap="onNavTo(item)">
<image class="img-bg" :src="item.imgUrl" mode="scaleToFill"></image>
</view>
</swiper-item>
</swiper>
</view>
</view>
</template>
<script>
import {
equityBindUser,
equityDuration
} from "@/api/recharge.js"
import config from "@/config/index.config"
export default {
data() {
return {
assetsPath: config.assetsPath,
countNum: 0,
countDuration:0,
bannerList:[
{
imgUrl:config.assetsPath+'/banner/1.png',
routePath:''
},
{
imgUrl:config.assetsPath+'/banner/2.png',
routePath:''
},
{
imgUrl:config.assetsPath+'/banner/3.png',
routePath:'/pages/storeList/storeList'
},
],
};
},
onLoad() {
this.onLoading()
},
onShareAppMessage() {
return {
title: "邀请扫码注册",
path: `/pages/my/myInfo?uid=${this.userInfo.id}`
}
},
methods:{
onLoading() {
equityBindUser().then(res => {
this.countNum = res.data.total
})
equityDuration().then(res => {
console.log(res,9999)
this.countDuration = res.data.data
})
},
onNavTo(val){
if(val.routePath){
uni.navigateTo({
url:val.routePath
})
}
}
}
}
</script>
<style>
page{
width: 100vw;
min-height: 100vh;
background-color: #ffffff;
}
</style>
<style lang="scss">
.activity{
position: relative;
width: 100%;
min-height: 100vh;
.act-header{
width: 690upx;
margin: 12upx auto 4upx;
image{
width: 100%;
max-height: 160upx;
}
}
}
.box-1{
display: flex;
justify-content: center;
align-items: center;
width: 690upx;
height: 138upx;
background: linear-gradient(180deg, #E23970 0%, #E12255 99%);
border-radius: 8upx;
margin: 20upx auto;
.box-2{
display: flex;
flex-direction: row;
align-items: center;
width: 682upx;
height: 130upx;
background: linear-gradient(90deg, #FDE0E6 0%, #FEFEFE 54%, #FEDFE6 100%);
border-radius: 8upx;
.part-left{
display: flex;
flex: 1;
padding-left: 18upx;
.text-1{
font-weight: bold;
font-size: 32rpx;
color: #000000;
margin-bottom: 4upx;
}
.flex-row-center{
margin-bottom: -16upx;
}
.text-2{
font-size: 24upx;
color: #775960;
}
.text-time{
font-weight: 600;
font-size: 46px;
color: #B5B5B6;
margin: 0 5upx;
}
.text-pink{
font-weight: 600;
font-size: 60upx;
color: #E73E92;
margin: 0 5upx;
}
}
.line{
height: 104rpx;
border-left: 1upx dashed #E23970;
}
.part-right{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 170upx;
.amount-icon{
width: 68upx;
image{
width: 100%;
max-height: 52upx;
}
}
.btn-box{
position: relative;
width: 140upx;
height: 42upx;
margin-top: -16upx;
z-index: 2;
image{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.absolute{
justify-content: center;
.text-pink{
margin-bottom: 5upx;
font-size: 20upx;
color: #FA260F;
background: linear-gradient(0deg, #FF7D02 1.0009765625%, #FD200D 99.21875%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
}
}
}
}
.banner-box{
position: absolute;
bottom: 10upx;
display: flex;
justify-content: center;
width: 100%;
margin: 24upx 0 10upx;
.banner-swiper{
height: 100px;
width: 100%;
.banner-item{
width: 700upx;
height: 100%;
margin: 0 auto;
.img-bg{
width: 100%;
height: 100%;
}
}
}
}
</style>
......@@ -200,7 +200,7 @@
</view>
</view>
<view class="act-slogan-box">
<view class="act-slogan-box" @tap="onNavByPath('activity')">
<image class="act-slogan" :src="assetsPath+'/user/act_slogan.png'" mode="widthFix"></image>
</view>
<!-- 我的订单 -->
......@@ -553,7 +553,8 @@
couponList:"/pages/couponList/index",
equityDetail:"/setting/rule/rule?keyData=user_equity_details",
levelDetail:"/setting/levelDetail/index",
dataStatistics: "/setting/dataStatistics/index"
dataStatistics: "/setting/dataStatistics/index",
activity:"/pages/activity/index"
},
list:'',
consumerMemberStatus:false,
......
......@@ -247,10 +247,10 @@
</view>
<view class="part-text-lg">
<text>铜角会员9.5折预定优惠</text>
<text>铁角会员9.8折预定优惠</text>
</view>
<view class="part-text-lg">
<text>银角会员9.2折预定优惠</text>
<text>银角会员9.5折预定优惠</text>
</view>
<view class="part-text-lg">
<text>金角会员8.8折预定优惠</text>
......@@ -441,7 +441,7 @@
<text class="circle-text">赠送会员优惠券</text>
</view>
<view class="part-text-lg">
<text>成为角会员可领取2小时</text>
<text>成为角会员可领取2小时</text>
</view>
<view class="part-text-lg">
......
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