Browse Source

上传文件至 'hangout-master/Pages/travel/evaluation/index'

master
曹天怡 2 years ago
parent
commit
b482a7542f
4 changed files with 174 additions and 0 deletions
  1. +94
    -0
      hangout-master/Pages/travel/evaluation/index/index.js
  2. +7
    -0
      hangout-master/Pages/travel/evaluation/index/index.json
  3. +24
    -0
      hangout-master/Pages/travel/evaluation/index/index.wxml
  4. +49
    -0
      hangout-master/Pages/travel/evaluation/index/index.wxss

+ 94
- 0
hangout-master/Pages/travel/evaluation/index/index.js View File

@ -0,0 +1,94 @@
// Pages/travel/evaluation/index/index.js
Page({
/**
* 页面的初始数据
*/
data: {
currentTab: 0,
list: [
{
iconPath: "/asset/img/icon-eval.png",
selectedIconPath: "/asset/img/icon-eval0.png",
text: "行程评测",
},
{
iconPath: "/asset/img/icon-bill.png",
selectedIconPath: "/asset/img/icon-bill0.png",
text: "旅行手札",
},
{
iconPath: "/asset/img/icon-comshare.png",
selectedIconPath: "/asset/img/icon-comshare0.png",
text: "计划分享",
},
],
},
switchTab: function (e) {
let that = this;
if (this.data.currentTab === e.target.dataset.current) {
return false;
} else {
that.setData({
currentTab: e.target.dataset.current,
});
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

+ 7
- 0
hangout-master/Pages/travel/evaluation/index/index.json View File

@ -0,0 +1,7 @@
{
"usingComponents": {
"eval":"/components/eval/eval",
"note":"/components/note/note",
"share":"/components/share/share"
}
}

+ 24
- 0
hangout-master/Pages/travel/evaluation/index/index.wxml View File

@ -0,0 +1,24 @@
<!--Pages/travel/evaluation/index/index.wxml-->
<view hidden="{{currentTab == 0? false: true}}">
<eval />
</view>
<view hidden="{{currentTab == 1? false: true}}">
<note></note>
</view>
<view hidden="{{currentTab == 2? false: true}}">
<share />
</view>
<view style="position: absolute;bottom: 0;width: 100vw;">
<view class="tab-bar">
<view wx:for="{{list}}" wx:for-index="idx" wx:for-item="item" wx:key="prototype" class="tab-bar-item {{currentTab == idx ? 'active' : 'default'}}" data-current="{{idx}}" bindtap="switchTab">
<cover-image src="{{currentTab === idx ? item.selectedIconPath : item.iconPath}}"></cover-image>
<text wx:for-index="idx" data-current="{{idx}}" src="{{currentTab == idx ? item.selectedIconPath : item.iconPath }}">{{item.text}}</text>
</view>
<view>
<image src="/asset/img/hangou1.png" mode="heightFix" class="hg"></image>
</view>
</view>
</view>

+ 49
- 0
hangout-master/Pages/travel/evaluation/index/index.wxss View File

@ -0,0 +1,49 @@
/* Pages/travel/evaluation/index/index.wxss */
.tab-bar {
width: 100%;
padding: 0;
margin: 0;
padding-left: 6vw;
justify-content: center;
display: flex;
align-items: center;
}
.tab-bar-item {
width: 20%;
padding: 0;
margin: 0;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
height: 30%;
}
.default {
font-weight: 550;
font-size: 12px;
color: #7b8b6f;
}
.active {
font-size: 13px;
font-weight: 900;
color: black;
}
.tab-bar-item cover-image {
width: 30px;
height: 30px;
}
.hg {
padding: 0;
height: 120px;
padding-bottom: 6vh;
justify-content: center;
display: flex;
align-items: center;
flex-direction: column;
}

||||||
x
 
000:0
Loading…
Cancel
Save