添加:装修 - 积分组件
This commit is contained in:
parent
0116317c59
commit
81aa141a1b
|
|
@ -25,6 +25,7 @@
|
||||||
"slideshow": "../../mycomponent/slideshow/slideshow",
|
"slideshow": "../../mycomponent/slideshow/slideshow",
|
||||||
"suspendbutton": "../../mycomponent/suspendbutton/suspendbutton",
|
"suspendbutton": "../../mycomponent/suspendbutton/suspendbutton",
|
||||||
"title": "../../mycomponent/title/title",
|
"title": "../../mycomponent/title/title",
|
||||||
"videos": "../../mycomponent/video/video"
|
"videos": "../../mycomponent/video/video",
|
||||||
|
"integral": "../../mycomponent/integral/integral"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,9 @@
|
||||||
<template name="videos">
|
<template name="videos">
|
||||||
<videos datas="{{remote_data}}" component_id="{{id}}"></videos>
|
<videos datas="{{remote_data}}" component_id="{{id}}"></videos>
|
||||||
</template>
|
</template>
|
||||||
|
<template name="integral">
|
||||||
|
<integral datas="{{remote_data}}" component_id="{{id}}"></integral>
|
||||||
|
</template>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<block wx:for="{{store_components}}" wx:key="index">
|
<block wx:for="{{store_components}}" wx:key="index">
|
||||||
|
|
@ -68,6 +71,7 @@
|
||||||
<template wx:if="{{item.component_key =='U_suspendbutton'}}" is="suspendbutton" data="{{...item}}" />
|
<template wx:if="{{item.component_key =='U_suspendbutton'}}" is="suspendbutton" data="{{...item}}" />
|
||||||
<template wx:if="{{item.component_key =='U_title'}}" is="title" data="{{...item}}" />
|
<template wx:if="{{item.component_key =='U_title'}}" is="title" data="{{...item}}" />
|
||||||
<template wx:if="{{item.component_key =='U_video'}}" is="videos" data="{{...item}}" />
|
<template wx:if="{{item.component_key =='U_video'}}" is="videos" data="{{...item}}" />
|
||||||
|
<template wx:if="{{item.component_key =='U_integral'}}" is="integral" data="{{...item}}" />
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
// packageE/article/article.js
|
||||||
|
var app = getApp();
|
||||||
|
Component({
|
||||||
|
properties: {
|
||||||
|
datas: {
|
||||||
|
type: null
|
||||||
|
},
|
||||||
|
component_id: {
|
||||||
|
type: null
|
||||||
|
},
|
||||||
|
U_tabcontrol: {
|
||||||
|
type: null
|
||||||
|
},
|
||||||
|
bottomShowBolIndex: {
|
||||||
|
type: null
|
||||||
|
},
|
||||||
|
index: {
|
||||||
|
type: null
|
||||||
|
},
|
||||||
|
plugin_active: String
|
||||||
|
},
|
||||||
|
// 私有数据,可用于模板渲染
|
||||||
|
data: {},
|
||||||
|
lifetimes: {
|
||||||
|
// 生命周期函数,可以为函数,或一个在methods段中定义的方法名
|
||||||
|
attached() {},
|
||||||
|
moved() {},
|
||||||
|
detached() {},
|
||||||
|
},
|
||||||
|
// 生命周期函数,可以为函数,或一个在methods段中定义的方法名
|
||||||
|
attached() {},
|
||||||
|
// 此处attached的声明会被lifetimes字段中的声明覆盖
|
||||||
|
ready() {},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
// 进入积分明细
|
||||||
|
goToDetail(){
|
||||||
|
wx.navigateTo({
|
||||||
|
url: `/packageB/member/integrallist/integrallist`,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 进入积分详情
|
||||||
|
goToDetails(){
|
||||||
|
wx.navigateTo({
|
||||||
|
url: `/packageB/member/integral/integral`,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {
|
||||||
|
"van-icon": "../../../dist/icon/index"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<view class="component-wrapper {{'component-'+component_id}}">
|
||||||
|
<view class="integral">
|
||||||
|
<view class="integral-content" style="{{ datas.preview_color.isColor == 1 ? 'background-color:' + datas.preview_color.color : 'background-image:url(' + datas.preview_color.image +')' }}">
|
||||||
|
<view class="top">
|
||||||
|
<view class="my-point-color" style="{{ 'color:' + datas.my_point_color }}">我的积分</view>
|
||||||
|
<view class="detail" style="{{ 'color:' + datas.detail_color }}" catchtap="goToDetail">
|
||||||
|
明细<van-icon name="arrow" class="arrow-icon" size="14"></van-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="point" style="{{ 'color:' + datas.my_point_color }}">{{ datas.credit1 }}</view>
|
||||||
|
<view class="point-detail" style="{{ 'color:' + datas.point_detail_color+';background-color:' + datas.point_detail_bg }}" catchtap="goToDetails">积分详情</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
.integral{
|
||||||
|
width: 100vw;
|
||||||
|
padding: 10rpx 24rpx;
|
||||||
|
}
|
||||||
|
.integral-content{
|
||||||
|
background-size: 100% auto;
|
||||||
|
bakcground-position: center;
|
||||||
|
/*height: 180rpx;*/
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 38rpx 30rpx;
|
||||||
|
}
|
||||||
|
.integral-content .top{
|
||||||
|
width: 100%;
|
||||||
|
height: 40rpx;
|
||||||
|
display: inline-flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
.integral-content .top .my-point-color{
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
height: 40rpx;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
display: inline-flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
.integral-content .top .detail{
|
||||||
|
display: inline-flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
font-size: 28rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
.integral-content .top .detail .arrow-icon{
|
||||||
|
margin: 0!important;
|
||||||
|
height: 40rpx!important;
|
||||||
|
line-height: 40rpx!important;
|
||||||
|
}
|
||||||
|
.integral-content .bottom{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
.integral-content .bottom .point{
|
||||||
|
font-size: 50rpx;
|
||||||
|
color: #61310F;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.integral-content .bottom .point-detail{
|
||||||
|
height: 52rpx;
|
||||||
|
padding: 12rpx 24rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
margin-top: 16rpx;
|
||||||
|
border: 0;
|
||||||
|
line-height: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -39,7 +39,8 @@
|
||||||
"stargroup": "../mycomponent/stargroup/stargroup",
|
"stargroup": "../mycomponent/stargroup/stargroup",
|
||||||
"top_navigation": "../mycomponent/top_navigation/top_navigation",
|
"top_navigation": "../mycomponent/top_navigation/top_navigation",
|
||||||
"videos": "../mycomponent/video/video",
|
"videos": "../mycomponent/video/video",
|
||||||
"multistageTab":"../mycomponent/multistageTab/multistageTab",
|
"multistageTab":"../mycomponent/multistageTab/multistageTab",
|
||||||
"selfpick": "../mycomponent/selfpick/selfpick"
|
"selfpick": "../mycomponent/selfpick/selfpick",
|
||||||
|
"integral": "../mycomponent/integral/integral"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,9 @@
|
||||||
<template name="multistageTab">
|
<template name="multistageTab">
|
||||||
<multistageTab datas="{{remote_data}}" btnFlag="{{btnFlag}}" component_id="{{id}}" page_id="{{page_id}}" index="{{index}}" bottomShowBolIndex="{{bottomShowBolIndex}}" bottomShowBol="{{bottomShowBol}}" ></multistageTab>
|
<multistageTab datas="{{remote_data}}" btnFlag="{{btnFlag}}" component_id="{{id}}" page_id="{{page_id}}" index="{{index}}" bottomShowBolIndex="{{bottomShowBolIndex}}" bottomShowBol="{{bottomShowBol}}" ></multistageTab>
|
||||||
</template>
|
</template>
|
||||||
|
<template name="integral">
|
||||||
|
<integral datas="{{remote_data}}" btnFlag="{{btnFlag}}" component_id="{{id}}" page_id="{{page_id}}" index="{{index}}" bottomShowBolIndex="{{bottomShowBolIndex}}" bottomShowBol="{{bottomShowBol}}" ></integral>
|
||||||
|
</template>
|
||||||
|
|
||||||
<view wx:if="{{isWatch}}">
|
<view wx:if="{{isWatch}}">
|
||||||
<template is="top_navigation" data="{{top_info,btnFlag,page_id}}" wx:if="{{top_info.group_title}}" />
|
<template is="top_navigation" data="{{top_info,btnFlag,page_id}}" wx:if="{{top_info.group_title}}" />
|
||||||
|
|
@ -167,6 +170,7 @@
|
||||||
<template wx:if="{{item.component_key =='U_video'}}" is="videos" data="{{...item}}" />
|
<template wx:if="{{item.component_key =='U_video'}}" is="videos" data="{{...item}}" />
|
||||||
<template wx:if="{{item.component_key =='U_moretabcontrol'}}" is="multistageTab" data="{{...item,page_id,btnFlag,bottomShowBolIndex,bottomShowBol,index}}"></template>
|
<template wx:if="{{item.component_key =='U_moretabcontrol'}}" is="multistageTab" data="{{...item,page_id,btnFlag,bottomShowBolIndex,bottomShowBol,index}}"></template>
|
||||||
<template wx:if="{{item.component_key =='U_selfpick'}}" is="selfpick" data="{{...item}}"/>
|
<template wx:if="{{item.component_key =='U_selfpick'}}" is="selfpick" data="{{...item}}"/>
|
||||||
|
<template wx:if="{{item.component_key =='U_integral'}}" is="integral" data="{{...item}}"/>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<view class="cover">
|
<view class="cover">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue