Commit 1bdfc5b7 by 胡悦

添加菜单模板

1 parent bd841376
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
"pages/tab/index/index", "pages/tab/index/index",
"pages/applicationAccount/applicationAccount", "pages/applicationAccount/applicationAccount",
"pages/applicationPartener/applicationPartener", "pages/applicationPartener/applicationPartener",
"pages/applySuccess/applySuccess" "pages/applySuccess/applySuccess",
"pages/tab/introduction/introduction"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
......
import componentsMixin from './componentsMixin' import componentsMixin from './componentsMixin'
import menuMixin from './menuMixin'
module.exports = { module.exports = {
componentsMixin componentsMixin,
menuMixin
} }
\ No newline at end of file \ No newline at end of file
module.exports = Behavior({
data: {
menuList: [
{
name: '企微魔方'
},
{
name: '数字化权益'
},
{
name: '智能线索'
},
{
name: 'D+增值转化'
}
]
}
})
\ No newline at end of file \ No newline at end of file
...@@ -19,6 +19,10 @@ ...@@ -19,6 +19,10 @@
<block wx:if="{{introduceName == '公司介绍'}}"> <block wx:if="{{introduceName == '公司介绍'}}">
<template is="company"></template> <template is="company"></template>
</block> </block>
<import src="../../template/menu/menu.wxml"></import>
<block wx:if="{{introduceName == '方案介绍'}}">
<template is="menu" data="{{menuList}}"></template>
</block>
<view class="menu-list" hidden="{{introduceName != '方案介绍'}}"> <view class="menu-list" hidden="{{introduceName != '方案介绍'}}">
<view class="menu-item menu-active">企微魔方</view> <view class="menu-item menu-active">企微魔方</view>
<view class="menu-item">数字化权益</view> <view class="menu-item">数字化权益</view>
......
/* pages/tab/index/index.wxss */ /* pages/tab/index/index.wxss */
@import '../../template/demo/demo.wxss'; @import '../../template/demo/demo.wxss';
@import '../../template/channel/channel.wxss'; @import '../../template/channel/channel.wxss';
@import '../../template/menu/menu.wxss';
page { page {
background-color: #F5F5F7; background-color: #F5F5F7;
} }
...@@ -54,30 +56,3 @@ right: 0; ...@@ -54,30 +56,3 @@ right: 0;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
} }
/* 方案介绍 */
.menu-list {
display: flex;
justify-content: space-evenly;
}
.menu-item {
position: relative;
font-size: 26rpx;
color: #6E6E7A;
height: 88rpx;
line-height: 88rpx;
}
.menu-active {
color: #5850ff;
}
.menu-active::after {
content: '';
display: inline-block;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 48rpx;
height: 6rpx;
background-color: #5850ff;
border-radius: 0.8rpx;
}
\ No newline at end of file \ No newline at end of file
// pages/tab/introduction/introduction.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/introduction/introduction.wxml-->
<text>pages/tab/introduction/introduction.wxml</text>
/* pages/tab/introduction/introduction.wxss */
\ No newline at end of file \ No newline at end of file
<template name="menu">
<view class="menu-list">
<block wx:for="{{menuList}}">
<view class="menu-item">{{item.name}}</view>
</block>
</view>
</template>
\ No newline at end of file \ No newline at end of file
/* 方案介绍 */
.menu-list {
display: flex;
justify-content: space-evenly;
}
.menu-item {
position: relative;
font-size: 26rpx;
color: #6E6E7A;
height: 88rpx;
line-height: 88rpx;
}
.menu-active {
color: #5850ff;
}
.menu-active::after {
content: '';
display: inline-block;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 48rpx;
height: 6rpx;
background-color: #5850ff;
border-radius: 0.8rpx;
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!