10 changed files with 221 additions and 6 deletions
@ -0,0 +1,101 @@ |
|||
// subpages/heart/pages/noticeNewDetail/noticeNewDetail.js
|
|||
const api = require("../../../../utils/home") |
|||
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
noticeId: '', |
|||
noticeType: '', //0,2 顺道捎 1,3 拼团购
|
|||
details: {}, |
|||
content: '', //屏蔽原因
|
|||
time: '', //屏蔽时间
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
noticeId: options.id, |
|||
noticeType: options.type, |
|||
content: options.content, |
|||
time: options.time |
|||
}) |
|||
this.getNoticeDetail() |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
// onShareAppMessage: function () {
|
|||
|
|||
// },
|
|||
|
|||
getNoticeDetail () { |
|||
wx.showLoading({ |
|||
title: '加载中...' |
|||
}) |
|||
if (this.data.noticeType == 'sds') { |
|||
api.getSdsDetail(this.data.noticeId).then(res => { |
|||
// console.log(res.data)
|
|||
wx.hideLoading() |
|||
this.setData({ |
|||
details: res.data |
|||
}) |
|||
}) |
|||
} else { |
|||
api.getGroupBuyDetail(this.data.noticeId).then(res => { |
|||
// console.log(res.data)
|
|||
wx.hideLoading() |
|||
this.setData({ |
|||
details: res.data |
|||
}) |
|||
}) |
|||
} |
|||
} |
|||
}) |
@ -0,0 +1,4 @@ |
|||
{ |
|||
"navigationBarTitleText": "详情", |
|||
"usingComponents": {} |
|||
} |
@ -0,0 +1,39 @@ |
|||
<!--subpages/heart/pages/noticeNewDetail/noticeNewDetail.wxml--> |
|||
<view class="notice-new"> |
|||
<view class="notice-detail" wx:if="{{noticeType == 'sds'}}"> |
|||
<view class="apply-item"> |
|||
<view class="item-title">标题</view> |
|||
<view class="item-content">{{details.departure}} 到 {{details.destination}}</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">内容</view> |
|||
<view class="item-content">{{details.carryContent}}</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">消息时间</view> |
|||
<view class="item-content">{{time}}</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">消息内容</view> |
|||
<view class="item-content">{{content}}</view> |
|||
</view> |
|||
</view> |
|||
<view class="notice-detail" wx:else> |
|||
<view class="apply-item"> |
|||
<view class="item-title">标题</view> |
|||
<view class="item-content">{{details.groupBuyTitle}}</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">内容</view> |
|||
<view class="item-content">{{details.groupBuyContent}}</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">消息时间</view> |
|||
<view class="item-content">{{time}}</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">消息内容</view> |
|||
<view class="item-content">{{content}}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
@ -0,0 +1,55 @@ |
|||
/* subpages/heart/pages/noticeNewDetail/noticeNewDetail.wxss */ |
|||
page { |
|||
width: 100%; |
|||
height: auto; |
|||
overflow-y: auto; |
|||
background: #f7f7f7; |
|||
} |
|||
.notice-detail { |
|||
margin-bottom: 60rpx; |
|||
} |
|||
.notice-detail .apply-item { |
|||
width: 100%; |
|||
background-color: white; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: flex-start; |
|||
justify-content: center; |
|||
padding: 40rpx 30rpx; |
|||
margin-top: 16rpx; |
|||
box-sizing: border-box; |
|||
} |
|||
.notice-detail .apply-item .item-title { |
|||
font-size: 32rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
} |
|||
.notice-detail .apply-item .item-content { |
|||
font-size: 32rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #666666; |
|||
margin-top: 28rpx; |
|||
} |
|||
.notice-detail .apply-item .item-mobile { |
|||
width: 100%; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
.notice-detail .apply-item .item-mobile .call-img { |
|||
width: 176rpx; |
|||
height: 76rpx; |
|||
} |
|||
.notice-detail .apply-item .item-mobile .call-img image{ |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
.notice-detail .apply-item .line { |
|||
width: 100%; |
|||
height: 1px; |
|||
background: #F2F2F2; |
|||
border-radius: 1px; |
|||
margin: 28rpx 0rpx; |
|||
} |
Loading…
Reference in new issue