|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 953 B |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
@ -0,0 +1,55 @@ |
|||
Component({ |
|||
properties: { |
|||
type: Number, |
|||
list: Array |
|||
}, |
|||
data: { |
|||
list: [], |
|||
nomore: false |
|||
}, |
|||
attached: function () {}, |
|||
ready: function () {}, |
|||
pageLifetimes: { |
|||
show: function () {}, |
|||
}, |
|||
methods: { |
|||
toNoticeDetail (e) { |
|||
const id = e.currentTarget.dataset.id |
|||
wx.navigateTo({ |
|||
url: `/subpages/heart/pages/noticeNewDetail/noticeNewDetail?id=${id}&type=${this.data.type}` |
|||
}) |
|||
}, |
|||
toModify (e) { |
|||
const id = e.currentTarget.dataset.id |
|||
console.log(id) |
|||
if (this.data.type == 2) { |
|||
wx.navigateTo({ |
|||
url: `/subpages/heart/pages/dropByPublish/dropByPublish?id=${id}` |
|||
}) |
|||
} else { |
|||
wx.navigateTo({ |
|||
url: `/subpages/heart/pages/groupBuyPublish/groupBuyPublish?id=${id}` |
|||
}) |
|||
} |
|||
}, |
|||
toDelete (e) { |
|||
let that = this |
|||
const id = e.currentTarget.dataset.id |
|||
wx.showModal({ |
|||
title: "确认删除该条发布内容?", |
|||
showCancel: true, |
|||
cancelText: "否", |
|||
confirmText: "是", |
|||
// confirmColor: "#000000",
|
|||
success: (res) => { |
|||
if (res.confirm) { |
|||
console.log("确认删除") |
|||
that.triggerEvent("delete",{id}) |
|||
} else if (res.cancel) { |
|||
console.log("取消删除") |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
@ -0,0 +1,48 @@ |
|||
<!-- 0 顺道捎列表 --> |
|||
<block wx:if="{{type == 0}}"> |
|||
<view class="notice" wx:for="{{list}}" wx:key="index"> |
|||
<view class="notice-title">{{item.departure}} 到 {{item.destination}}</view> |
|||
<view class="notice-bottom"> |
|||
<view class="notice-time">出发时间:{{item.departureTime}}</view> |
|||
<view class="notice-detail" data-id="{{item.id}}" bindtap="toNoticeDetail">查看{{">"}}</view> |
|||
</view> |
|||
</view> |
|||
</block> |
|||
<!-- 1 拼团购列表 --> |
|||
<block wx:elif="{{type == 1}}"> |
|||
<view class="notice" wx:for="{{list}}" wx:key="index"> |
|||
<view class="notice-title">{{item.groupBuyTitle}}</view> |
|||
<view class="notice-bottom"> |
|||
<view class="notice-time">团购时间:{{item.groupBuyTime}}</view> |
|||
<view class="notice-detail" data-id="{{item.id}}" bindtap="toNoticeDetail">查看{{">"}}</view> |
|||
</view> |
|||
</view> |
|||
</block> |
|||
<!-- 2 顺道捎 我的列表 --> |
|||
<block wx:elif="{{type == 2}}"> |
|||
<view class="notice" wx:for="{{list}}" wx:key="index"> |
|||
<view class="notice-title">{{item.departure}} 到 {{item.destination}}</view> |
|||
<view class="notice-bottom"> |
|||
<view class="notice-detail" data-id="{{item.id}}" bindtap="toNoticeDetail">查看{{" >"}}</view> |
|||
<view class="notice-option"> |
|||
<view class="btn" data-id="{{item.id}}" bindtap="toModify">修改</view> |
|||
<view class="notice-line"></view> |
|||
<view class="btn" data-id="{{item.id}}" bindtap="toDelete">删除</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</block> |
|||
<!-- 3 拼团购 我的列表 --> |
|||
<block wx:else> |
|||
<view class="notice" wx:for="{{list}}" wx:key="index"> |
|||
<view class="notice-title">{{item.groupBuyTitle}}</view> |
|||
<view class="notice-bottom"> |
|||
<view class="notice-detail" data-id="{{item.id}}" bindtap="toNoticeDetail">查看{{" >"}}</view> |
|||
<view class="notice-option"> |
|||
<view class="btn" data-id="{{item.id}}" bindtap="toModify">修改</view> |
|||
<view class="notice-line"></view> |
|||
<view class="btn" data-id="{{item.id}}" bindtap="toDelete">删除</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</block> |
|||
@ -0,0 +1,61 @@ |
|||
.notice { |
|||
width: 750rpx; |
|||
background-color: #fff; |
|||
margin-top: 14rpx; |
|||
padding: 40rpx 10rpx 0rpx 30rpx; |
|||
box-sizing: border-box; |
|||
} |
|||
.notice-title { |
|||
font-size: 34rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
/* overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
word-wrap: break-word; |
|||
white-space: normal !important; |
|||
-webkit-line-clamp: 2; |
|||
-webkit-box-orient: vertical; */ |
|||
} |
|||
.notice-bottom { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
height: 80rpx; |
|||
} |
|||
.notice-time { |
|||
font-size: 26rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #999999; |
|||
} |
|||
.notice-detail { |
|||
font-size: 26rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #F1551B; |
|||
width: 100rpx; |
|||
height: 80rpx; |
|||
line-height: 80rpx; |
|||
} |
|||
.notice-option { |
|||
width: 240rpx; |
|||
display: flex; |
|||
justify-content: space-around; |
|||
align-items: center; |
|||
font-size: 26rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #D60000; |
|||
height: 80rpx; |
|||
line-height: 80rpx; |
|||
} |
|||
.notice-option .btn { |
|||
text-align: center; |
|||
width: 100rpx; |
|||
} |
|||
.notice-line { |
|||
width: 1px; |
|||
height: 30rpx; |
|||
background: #BFBFBF; |
|||
} |
|||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 26 KiB |
@ -0,0 +1,187 @@ |
|||
// subpages/heart/pages/dropByList/dropByList.js
|
|||
const api = require("../../utils/api") |
|||
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
pageIndex: 1, |
|||
pageSize: 10, |
|||
nodata: false, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
dropbylist: [], |
|||
selectedTab: "tab0", |
|||
type: '0', //查询类型 0 : 我需要捎 1:我可以捎 2:我的发布
|
|||
dialogVisible: false, |
|||
dialogTitle: "", |
|||
dialogContent: "", |
|||
dialogConfirmText: "", |
|||
dialogCancelText: "", |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
// this.getSdsList()
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
this.setData({ |
|||
pageIndex: 1, |
|||
dropbylist: [] |
|||
}) |
|||
this.getSdsList() |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
// onShareAppMessage: function () {
|
|||
|
|||
// }
|
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.setData({ |
|||
loadMoreVisible: true |
|||
}) |
|||
if (this.data.loadMoreType === "loading") { |
|||
this.setData({ |
|||
pageIndex: this.data.pageIndex + 1 |
|||
}) |
|||
this.getSdsList() |
|||
} |
|||
}, |
|||
|
|||
// tab 切换
|
|||
tabBarChange (e) { |
|||
this.setData({ |
|||
loadMoreVisible: false, |
|||
loadMoreType: "none", |
|||
pageIndex: 1, |
|||
}) |
|||
if (e.currentTarget.dataset.tab == "tab0") { |
|||
this.setData({ |
|||
type: '0', |
|||
dropbylist: [] |
|||
}) |
|||
this.getSdsList() |
|||
} else if (e.currentTarget.dataset.tab == "tab1") { |
|||
this.setData({ |
|||
type: '1', |
|||
dropbylist: [] |
|||
}) |
|||
this.getSdsList() |
|||
} |
|||
this.setData({ |
|||
selectedTab: e.currentTarget.dataset.tab |
|||
}) |
|||
}, |
|||
|
|||
getSdsList () { |
|||
const para = { |
|||
type: this.data.type, |
|||
pageIndex: this.data.pageIndex, |
|||
pageSize: this.data.pageSize |
|||
} |
|||
api.getSdsList(para).then(res => { |
|||
console.log(res) |
|||
this.setData({ |
|||
dropbylist: [...this.data.dropbylist,...res.data], |
|||
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', |
|||
loadMoreVisible: res.data.length === this.data.pageSize ? false : true, |
|||
nodata: false, |
|||
}) |
|||
if (this.data.dropbylist.length == 0) { |
|||
this.setData({ |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
} |
|||
}).catch(err => { |
|||
this.setData({ |
|||
dropbylist: [], |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
|
|||
// 跳转发布
|
|||
toPublish () { |
|||
console.log('发布') |
|||
api.getVolunteerVerify().then(res => { |
|||
if (res.code == 0) { |
|||
if (res.data && res.data.id) { |
|||
wx.navigateTo({ |
|||
url: `/subpages/heart/pages/dropByPublish/dropByPublish` |
|||
}) |
|||
} else { |
|||
this.setData({ |
|||
dialogVisible: !this.data.dialogVisible, |
|||
dialogTitle: "志愿者认证", |
|||
dialogContent: ["是否认证志愿者,完成发布"], |
|||
dialogConfirmText: "是", |
|||
dialogCancelText: "否" |
|||
}) |
|||
} |
|||
} |
|||
}).catch(err => { |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
// 跳转我的发布
|
|||
toNoticeNewList () { |
|||
console.log('我的发布') |
|||
wx.navigateTo({ |
|||
url: `/subpages/heart/pages/noticeNewList/noticeNewList?type=0` |
|||
}) |
|||
}, |
|||
|
|||
//志愿者认证
|
|||
confirmDialog () { |
|||
wx.navigateTo({ |
|||
url: "/subpages/heart/pages/volunteer/volunteer" |
|||
}) |
|||
} |
|||
}) |
|||
@ -0,0 +1,9 @@ |
|||
{ |
|||
"navigationBarTitleText": "顺道捎", |
|||
"usingComponents": { |
|||
"notice": "../../components/noticeNew/noticeNew", |
|||
"coverview-dialog": "../../components/coverViewDialog/coverViewDialog", |
|||
"load-more": "/components/loadMore/loadMore", |
|||
"no-data": "/components/nodata/nodata" |
|||
} |
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
<!--subpages/heart/pages/dropByList/dropByList.wxml--> |
|||
<view class="drop-by-list"> |
|||
<view class="tab-all"> |
|||
<view class="tab-bar"> |
|||
<view class="tab tab0 {{selectedTab === 'tab0' ? 'select' : ''}}" data-tab="tab0" bindtap="tabBarChange"> |
|||
需要捎 |
|||
</view> |
|||
<view class="tab tab1 {{selectedTab === 'tab1' ? 'select' : ''}}" data-tab="tab1" bindtap="tabBarChange"> |
|||
可以捎 |
|||
</view> |
|||
<view class="select-bar {{selectedTab}}"></view> |
|||
</view> |
|||
</view> |
|||
<view class="my-publish" bindtap="toNoticeNewList" wx:if="{{dropbylist.length > 0}}"> |
|||
<image src="../../images/my-publish.png" /> |
|||
</view> |
|||
<view class="item-list"> |
|||
<notice list="{{dropbylist}}" type="{{0}}"></notice> |
|||
</view> |
|||
</view> |
|||
|
|||
<movable-area class="movable-area"> |
|||
<movable-view class="movable-view" direction="all" inertia="true" friction="10"> |
|||
<view class="img-box" bindtap="toPublish"> |
|||
<image src="../../images/publish.png" /> |
|||
</view> |
|||
</movable-view> |
|||
</movable-area> |
|||
|
|||
|
|||
<coverview-dialog bind:confirm="confirmDialog" dialogVisible="{{dialogVisible}}" title="{{dialogTitle}}" |
|||
content="{{dialogContent}}" confirmText="{{dialogConfirmText}}" cancelText="{{dialogCancelText}}"> |
|||
</coverview-dialog> |
|||
|
|||
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |
|||
@ -0,0 +1,117 @@ |
|||
/* subpages/heart/pages/dropByList/dropByList.wxss */ |
|||
page { |
|||
width: 100%; |
|||
height: auto; |
|||
overflow-y: auto; |
|||
background: #f7f7f7; |
|||
} |
|||
.drop-by-list { |
|||
position: relative; |
|||
overflow: hidden; |
|||
} |
|||
/* 悬浮按钮 start */ |
|||
.movable-area{ |
|||
pointer-events:none; |
|||
z-index: 999; |
|||
width: 100%; |
|||
height: 100%; |
|||
position: fixed; |
|||
top: 0rpx; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
} |
|||
.movable-view{ |
|||
pointer-events:auto; |
|||
width: 208rpx; |
|||
height: 122rpx; |
|||
transform: translateX(560rpx) translateY(680rpx) translateZ(0rpx) scale(1); |
|||
transform-origin: center center; |
|||
will-change: auto; |
|||
position: absolute; |
|||
top: 850rpx; |
|||
left: 520rpx; |
|||
} |
|||
.img-box { |
|||
width: 178rpx; |
|||
height: 148rpx; |
|||
} |
|||
.img-box image { |
|||
width: 100%; |
|||
height: 100%; |
|||
object-fit: cover; |
|||
} |
|||
/* 悬浮按钮 end */ |
|||
|
|||
/* tab start */ |
|||
.tab-all { |
|||
width: 100%; |
|||
height: 90rpx; |
|||
background-color: #fff; |
|||
} |
|||
|
|||
|
|||
.tab-bar { |
|||
width: 100%; |
|||
height: 90rpx; |
|||
background: #fff; |
|||
display: flex; |
|||
align-items: center; |
|||
position: relative; |
|||
} |
|||
.tab-bar-fixed { |
|||
position: fixed; |
|||
top: 0rpx; |
|||
} |
|||
.tab-bar .tab { |
|||
font-size: 34rpx; |
|||
font-weight: 500; |
|||
color: rgba(171, 171, 171, 1); |
|||
width: 50%; |
|||
height: 100%; |
|||
line-height: 92rpx; |
|||
/* text-indent: 20rpx; */ |
|||
text-align: center; |
|||
position: relative; |
|||
z-index: 10; |
|||
} |
|||
|
|||
.tab-bar .tab.select { |
|||
font-size: 36rpx; |
|||
font-weight: bold; |
|||
color: rgba(229, 15, 0, 1); |
|||
} |
|||
|
|||
.tab-bar .select-bar { |
|||
position: absolute; |
|||
left: 14rpx; |
|||
bottom: 0rpx; |
|||
width: 30rpx; |
|||
height: 8rpx; |
|||
border-radius: 4rpx; |
|||
background: #fc5555; |
|||
z-index: 1; |
|||
} |
|||
|
|||
.tab-bar .tab0.select-bar { |
|||
left: calc(25% - 15rpx); |
|||
transition: left 0.3s linear; |
|||
} |
|||
|
|||
.tab-bar .tab1.select-bar { |
|||
left: calc(75% - 15rpx); |
|||
transition: left 0.3s linear; |
|||
} |
|||
/* tab end */ |
|||
|
|||
.my-publish { |
|||
height: 76rpx; |
|||
width: 164rpx; |
|||
position: fixed; |
|||
right: -10rpx; |
|||
top: 70rpx; |
|||
} |
|||
.my-publish image { |
|||
height: 100%; |
|||
width: 100%; |
|||
} |
|||
@ -0,0 +1,287 @@ |
|||
// subpages/heart/pages/dropByPublish/dropByPublish.js
|
|||
const api = require("../../utils/api") |
|||
import { getTimestamp } from '../../../../utils/common' |
|||
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
dialogVisible: false, //提示框
|
|||
showPicker: false, //是否显示底部时间选择器插件
|
|||
dataForm: { |
|||
departure: '', //目的地
|
|||
destination: '', //出发地
|
|||
departureTime: '', //出发时间
|
|||
mobile: '', //手机
|
|||
carryContent: '', //携带内容
|
|||
carryStatus: '', //捎带状态 0:我需要捎 1:我可以捎
|
|||
id: '', //主键 更新时携带
|
|||
}, |
|||
violationsCount: 0, //内容审核计数
|
|||
isConReview: false, //内容审核标志
|
|||
lock: false, //锁定发布按钮状态,防止连击
|
|||
selectedTab: 'tab0', |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
'dataForm.id': options.id || '' |
|||
}) |
|||
if (options.id) { |
|||
this.initDataForm() |
|||
} |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
// onShareAppMessage: function () {
|
|||
|
|||
// }
|
|||
|
|||
onInputDeparture (e) { |
|||
this.setData({ |
|||
'dataForm.departure': e.detail.value |
|||
}) |
|||
}, |
|||
onInputDestination (e) { |
|||
this.setData({ |
|||
'dataForm.destination': e.detail.value |
|||
}) |
|||
}, |
|||
onInputMobile (e) { |
|||
this.setData({ |
|||
'dataForm.mobile': e.detail.value |
|||
}) |
|||
}, |
|||
onInputContent (e) { |
|||
this.setData({ |
|||
'dataForm.carryContent': e.detail.value |
|||
}) |
|||
}, |
|||
pickerCancel () { |
|||
console.log('取消日期选择') |
|||
this.setData({ |
|||
showPicker: false, |
|||
'dataForm.departureTime': '' |
|||
}) |
|||
}, |
|||
pickerConfirm (e) { |
|||
console.log('选择日期', e.detail.time) |
|||
if (e.detail.time < getTimestamp()) { |
|||
this.showToast("出发时间应该大于当前时间") |
|||
} else { |
|||
this.setData({ |
|||
showPicker: false, |
|||
'dataForm.departureTime': e.detail.time |
|||
}) |
|||
} |
|||
}, |
|||
//日期选择插件显示入口
|
|||
selectTime (e) { |
|||
this.data.showPicker = !this.data.showPicker |
|||
this.setData({ |
|||
showPicker: this.data.showPicker, |
|||
'dataForm.departureTime': this.data.dataForm.departureTime || getTimestamp() |
|||
}) |
|||
}, |
|||
|
|||
//发布
|
|||
submitApply () { |
|||
if (this.data.lock) { |
|||
return false |
|||
} |
|||
if (!this.data.dataForm.departure) { |
|||
this.showToast("请填出发地") |
|||
return false |
|||
} |
|||
if (this.data.dataForm.departure.length>100) { |
|||
this.showToast("出发地请在100字以内") |
|||
return false |
|||
} |
|||
if (!this.data.dataForm.destination) { |
|||
this.showToast("请填写目的地") |
|||
return false |
|||
} |
|||
if (this.data.dataForm.destination.length>100) { |
|||
this.showToast("目的地请在100字以内") |
|||
return false |
|||
} |
|||
if (!this.data.dataForm.departureTime) { |
|||
this.showToast("请填写出发时间") |
|||
return false |
|||
} |
|||
if (!this.data.dataForm.mobile) { |
|||
this.showToast("请填写联系电话") |
|||
return false |
|||
} |
|||
if (this.data.dataForm.mobile.length>20) { |
|||
this.showToast("联系电话请在20字以内") |
|||
return false |
|||
} |
|||
if (!this.data.dataForm.carryContent) { |
|||
this.showToast("请填写携带内容") |
|||
return false |
|||
} |
|||
if (this.data.dataForm.carryContent.length>500) { |
|||
this.showToast("携带内容请在500字以内") |
|||
return false |
|||
} |
|||
if (this.data.selectedTab == 'tab0') { |
|||
this.data.dataForm.carryStatus = '0' |
|||
} else if(this.data.selectedTab == 'tab1') { |
|||
this.data.dataForm.carryStatus = '1' |
|||
} |
|||
wx.showLoading({ |
|||
title: "发布中", |
|||
}) |
|||
this.setData({ |
|||
lock: true |
|||
}) |
|||
const para = { ...this.data.dataForm } |
|||
para.isConReview = this.data.isConReview |
|||
console.log('submit', para) |
|||
let that = this |
|||
api.sdsUpdate(para).then(res => { |
|||
this.setData({ |
|||
lock: false |
|||
}) |
|||
if(res.code == 0) { |
|||
wx.hideLoading() |
|||
this.setData({ |
|||
dialogVisible: !this.data.dialogVisible, |
|||
'dataForm.departure': '', |
|||
violationsCount: 0, |
|||
isConReview: false |
|||
}) |
|||
} else if (res.code == 533) { |
|||
wx.hideLoading() |
|||
this.data.violationsCount++ |
|||
console.log(this.data.violationsCount) |
|||
if (this.data.violationsCount == 1){ |
|||
wx.showToast({ |
|||
title: res.msg, |
|||
icon: "none", |
|||
duration: 2000 |
|||
}) |
|||
} else if (this.data.violationsCount == 2) { |
|||
wx.hideLoading() |
|||
wx.showModal({ |
|||
title: '提示', |
|||
content: '您提交的内容再次被判定为违规,您确定是否要提交?', |
|||
success (res) { |
|||
if (res.confirm) { |
|||
console.log('用户点击确定') |
|||
that.data.isConReview = true |
|||
that.submitApply() |
|||
} else if (res.cancel) { |
|||
console.log('用户点击取消') |
|||
that.setData({ |
|||
violationsCount: 0, |
|||
isConReview: false |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
}).catch(err => { |
|||
console.log('err',err) |
|||
wx.hideLoading() |
|||
this.setData({ |
|||
lock: false |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
//简化提示
|
|||
showToast (title) { |
|||
wx.showToast({ |
|||
title: title, |
|||
icon: "none", |
|||
duration: 2000 |
|||
}) |
|||
}, |
|||
|
|||
// 关闭弹框
|
|||
closeDialog () { |
|||
wx.navigateBack({ |
|||
delta: 1 |
|||
}) |
|||
}, |
|||
// 弹框确定按钮
|
|||
confirmDialog () { |
|||
wx.navigateBack({ |
|||
delta: 1 |
|||
}) |
|||
}, |
|||
|
|||
// tab 切换
|
|||
tabBarChange (e) { |
|||
this.setData({ |
|||
selectedTab: e.currentTarget.dataset.tab |
|||
}) |
|||
}, |
|||
|
|||
initDataForm () { |
|||
wx.showLoading({ |
|||
title: '加载中...' |
|||
}) |
|||
api.getSdsDetail(this.data.dataForm.id).then(res => { |
|||
wx.hideLoading() |
|||
this.data.dataForm = { ...res.data } |
|||
let tab = 'tab' + this.data.dataForm.carryStatus |
|||
this.setData({ |
|||
selectedTab: tab, |
|||
dataForm: this.data.dataForm |
|||
}) |
|||
}) |
|||
} |
|||
}) |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"navigationBarTitleText": "顺道捎", |
|||
"usingComponents": { |
|||
"date-time-picker": "../../../../components/DateTimePicker/index", |
|||
"notice": "../../components/notice/notice" |
|||
} |
|||
} |
|||
@ -0,0 +1,46 @@ |
|||
<!--subpages/heart/pages/dropByPublish/dropByPublish.wxml--> |
|||
<view class="my-apply"> |
|||
<view class="tab-all"> |
|||
<view class="tab-bar"> |
|||
<view class="tab tab0 {{selectedTab === 'tab0' ? 'select' : ''}}" data-tab="tab0" bindtap="tabBarChange"> |
|||
我需要捎 |
|||
</view> |
|||
<view class="tab tab1 {{selectedTab === 'tab1' ? 'select' : ''}}" data-tab="tab1" bindtap="tabBarChange"> |
|||
我可以捎 |
|||
</view> |
|||
<view class="select-bar {{selectedTab}}"></view> |
|||
</view> |
|||
</view> |
|||
<view class="content"> |
|||
<view class="apply-item"> |
|||
<view class="item-title">出发地</view> |
|||
<input type="text" class="item-content" maxlength="100" placeholder="请输入出发地" value="{{dataForm.departure}}" bindinput="onInputDeparture"></input> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">目的地</view> |
|||
<input type="text" class="item-content" maxlength="100" placeholder="请输入目的地" value="{{dataForm.destination}}" bindinput="onInputDestination"></input> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">出发时间</view> |
|||
<view class="select-time" bindtap="selectTime">{{dataForm.departureTime||'请选择时间'}}</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">联系电话</view> |
|||
<input type="text" class="item-content" maxlength="20" placeholder="请输入联系电话" value="{{dataForm.mobile}}" bindinput="onInputMobile"></input> |
|||
</view> |
|||
<view class="apply-item text-item"> |
|||
<view class="item-title" style="margin-top:20rpx">携带内容</view> |
|||
<textarea class="item-content text-content" maxlength="500" placeholder="请描述携带内容,如:2个人,1本书" value="{{dataForm.carryContent}}" bindinput="onInputContent"><span class="text-length">{{dataForm.carryContent.length}}/500</span></textarea> |
|||
</view> |
|||
</view> |
|||
<view class="submit" bindtap="submitApply"> |
|||
<image class="submit-bk" src="../../images/submit-bk.png" /> |
|||
<view class="submit-text">发布</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<view wx:if="{{showPicker}}"> |
|||
<date-time-picker bind:cancel="pickerCancel" bind:confirm="pickerConfirm" init-time="{{dataForm.departureTime}}"></date-time-picker> |
|||
</view> |
|||
|
|||
<notice bind:close="closeDialog" bind:confirm="confirmDialog" dialogVisible="{{dialogVisible}}" title="发布成功" content="" confirmText="知道了"></notice> |
|||
@ -0,0 +1,173 @@ |
|||
/* subpages/heart/pages/dropByPublish/dropByPublish.wxss */ |
|||
page { |
|||
width: 100%; |
|||
overflow-y: auto; |
|||
background: #f7f7f7; |
|||
} |
|||
/* tab start */ |
|||
.tab-all { |
|||
width: 100%; |
|||
height: 90rpx; |
|||
background-color: #fff; |
|||
} |
|||
|
|||
|
|||
.tab-bar { |
|||
width: 100%; |
|||
height: 90rpx; |
|||
background: #fff; |
|||
display: flex; |
|||
align-items: center; |
|||
position: relative; |
|||
} |
|||
.tab-bar-fixed { |
|||
position: fixed; |
|||
top: 0rpx; |
|||
} |
|||
.tab-bar .tab { |
|||
font-size: 34rpx; |
|||
font-weight: 500; |
|||
color: rgba(171, 171, 171, 1); |
|||
width: 50%; |
|||
height: 100%; |
|||
line-height: 92rpx; |
|||
/* text-indent: 20rpx; */ |
|||
text-align: center; |
|||
position: relative; |
|||
z-index: 10; |
|||
} |
|||
|
|||
.tab-bar .tab.select { |
|||
font-size: 36rpx; |
|||
font-weight: bold; |
|||
color: rgba(229, 15, 0, 1); |
|||
} |
|||
|
|||
.tab-bar .select-bar { |
|||
position: absolute; |
|||
left: 14rpx; |
|||
bottom: 0rpx; |
|||
width: 30rpx; |
|||
height: 8rpx; |
|||
border-radius: 4rpx; |
|||
background: #fc5555; |
|||
z-index: 1; |
|||
} |
|||
|
|||
.tab-bar .tab0.select-bar { |
|||
left: calc(25% - 15rpx); |
|||
transition: left 0.3s linear; |
|||
} |
|||
|
|||
.tab-bar .tab1.select-bar { |
|||
left: calc(75% - 15rpx); |
|||
transition: left 0.3s linear; |
|||
} |
|||
/* tab end */ |
|||
.content { |
|||
position: relative; |
|||
overflow: hidden; |
|||
} |
|||
.content .my-apply-img { |
|||
position: absolute; |
|||
right: -10rpx; |
|||
top: 16rpx; |
|||
} |
|||
.content .my-apply-img image { |
|||
width: 208rpx; |
|||
height: 76rpx; |
|||
} |
|||
.content .apply-item { |
|||
width: 100%; |
|||
height: 170rpx; |
|||
background-color: white; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: flex-start; |
|||
justify-content: center; |
|||
padding: 0rpx 30rpx; |
|||
margin-top: 16rpx; |
|||
box-sizing: border-box; |
|||
} |
|||
.content .text-item { |
|||
height: 298rpx; |
|||
} |
|||
.content .apply-item .item-title { |
|||
height: 50rpx; |
|||
line-height: 50rpx; |
|||
font-size: 32rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
margin-bottom: 28rpx; |
|||
} |
|||
.content .apply-item .item-content, .select-time { |
|||
width: 100%; |
|||
height: 44rpx; |
|||
line-height: 44rpx; |
|||
font-size: 32rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #666666; |
|||
} |
|||
.content .apply-item .text-content { |
|||
font-weight: 400; |
|||
height: 280rpx; |
|||
margin-bottom: 40rpx; |
|||
} |
|||
.text-length { |
|||
position: absolute; |
|||
right: 0rpx; |
|||
bottom: -40rpx; |
|||
font-size: 28rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 400; |
|||
color: #999999; |
|||
} |
|||
.submit { |
|||
width: 592rpx; |
|||
height: 116rpx; |
|||
position: relative; |
|||
margin: 78rpx auto 0rpx; |
|||
} |
|||
.submit .submit-bk { |
|||
width: 100%; |
|||
height: 100%; |
|||
position: absolute; |
|||
z-index: -1; |
|||
} |
|||
.submit .submit-text { |
|||
font-size: 34rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #FFFFFF; |
|||
height: 100rpx; |
|||
line-height: 100rpx; |
|||
text-align: center; |
|||
} |
|||
|
|||
.time-group { |
|||
width: 100%; |
|||
display: flex; |
|||
justify-content: space-around; |
|||
align-items: center; |
|||
} |
|||
.time-group .select-time { |
|||
width: 304rpx; |
|||
height: 50rpx; |
|||
/* background: #F7F7F7; */ |
|||
border-radius: 25rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
font-size: 24rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
} |
|||
.time-group .select-time image { |
|||
width: 26rpx; |
|||
height: 26rpx; |
|||
opacity: 0.76; |
|||
margin-right: 20rpx; |
|||
} |
|||
@ -0,0 +1,160 @@ |
|||
// subpages/heart/pages/groupBuyList/groupBuyList.js
|
|||
const api = require("../../utils/api") |
|||
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
pageIndex: 1, |
|||
pageSize: 10, |
|||
nodata: false, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
groupbuylist: [], |
|||
dialogVisible: false, |
|||
dialogTitle: "", |
|||
dialogContent: "", |
|||
dialogConfirmText: "", |
|||
dialogCancelText: "", |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
// this.getGroupBuyList()
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
this.setData({ |
|||
pageIndex: 1, |
|||
groupbuylist: [] |
|||
}) |
|||
this.getGroupBuyList() |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
// onShareAppMessage: function () {
|
|||
|
|||
// }
|
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.setData({ |
|||
loadMoreVisible: true |
|||
}) |
|||
if (this.data.loadMoreType === "loading") { |
|||
this.setData({ |
|||
pageIndex: this.data.pageIndex + 1 |
|||
}) |
|||
this.getGroupBuyList() |
|||
} |
|||
}, |
|||
|
|||
getGroupBuyList () { |
|||
const para = { |
|||
isMe: '0', |
|||
pageIndex: this.data.pageIndex, |
|||
pageSize: this.data.pageSize |
|||
} |
|||
api.getGroupBuyList(para).then(res => { |
|||
console.log(res) |
|||
this.setData({ |
|||
groupbuylist: [...this.data.groupbuylist,...res.data], |
|||
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', |
|||
loadMoreVisible: res.data.length === this.data.pageSize ? false : true, |
|||
nodata: false, |
|||
}) |
|||
if (this.data.groupbuylist.length == 0) { |
|||
this.setData({ |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
} |
|||
}).catch(err => { |
|||
this.setData({ |
|||
groupbuylist: [], |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
|
|||
// 跳转发布
|
|||
toPublish () { |
|||
console.log('发布') |
|||
api.getVolunteerVerify().then(res => { |
|||
if (res.code == 0) { |
|||
if (res.data && res.data.id) { |
|||
wx.navigateTo({ |
|||
url: `/subpages/heart/pages/groupBuyPublish/groupBuyPublish` |
|||
}) |
|||
} else { |
|||
this.setData({ |
|||
dialogVisible: !this.data.dialogVisible, |
|||
dialogTitle: "志愿者认证", |
|||
dialogContent: ["是否认证志愿者,完成发布"], |
|||
dialogConfirmText: "是", |
|||
dialogCancelText: "否" |
|||
}) |
|||
} |
|||
} |
|||
}).catch(err => { |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
// 跳转我的发布
|
|||
toNoticeNewList () { |
|||
console.log('我的发布') |
|||
wx.navigateTo({ |
|||
url: `/subpages/heart/pages/noticeNewList/noticeNewList?type=1` |
|||
}) |
|||
}, |
|||
|
|||
//志愿者认证
|
|||
confirmDialog () { |
|||
wx.navigateTo({ |
|||
url: "/subpages/heart/pages/volunteer/volunteer" |
|||
}) |
|||
} |
|||
}) |
|||
@ -0,0 +1,9 @@ |
|||
{ |
|||
"navigationBarTitleText": "拼团购", |
|||
"usingComponents": { |
|||
"notice": "../../components/noticeNew/noticeNew", |
|||
"coverview-dialog": "../../components/coverViewDialog/coverViewDialog", |
|||
"load-more": "/components/loadMore/loadMore", |
|||
"no-data": "/components/nodata/nodata" |
|||
} |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
<!--subpages/heart/pages/groupBuyList/groupBuyList.wxml--> |
|||
<view class="group-buy-list"> |
|||
<view class="my-publish" bindtap="toNoticeNewList" wx:if="{{groupbuylist.length > 0}}"> |
|||
<image src="../../images/my-publish.png" /> |
|||
</view> |
|||
<view class="item-list"> |
|||
<notice list="{{groupbuylist}}" type="{{1}}"></notice> |
|||
</view> |
|||
</view> |
|||
|
|||
<movable-area class="movable-area"> |
|||
<movable-view class="movable-view" direction="all" inertia="true" friction="10"> |
|||
<view class="img-box" bindtap="toPublish"> |
|||
<image src="../../images/publish.png" /> |
|||
</view> |
|||
</movable-view> |
|||
</movable-area> |
|||
|
|||
<coverview-dialog bind:confirm="confirmDialog" dialogVisible="{{dialogVisible}}" title="{{dialogTitle}}" |
|||
content="{{dialogContent}}" confirmText="{{dialogConfirmText}}" cancelText="{{dialogCancelText}}"> |
|||
</coverview-dialog> |
|||
|
|||
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |
|||
@ -0,0 +1,56 @@ |
|||
/* subpages/heart/pages/groupBuyList/groupBuyList.wxss */ |
|||
page { |
|||
width: 100%; |
|||
height: auto; |
|||
overflow-y: auto; |
|||
background: #f7f7f7; |
|||
} |
|||
.group-buy-list { |
|||
position: relative; |
|||
overflow: hidden; |
|||
} |
|||
/* 悬浮按钮 start */ |
|||
.movable-area{ |
|||
pointer-events:none; |
|||
z-index: 999; |
|||
width: 100%; |
|||
height: 100%; |
|||
position: fixed; |
|||
top: 0rpx; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
} |
|||
.movable-view{ |
|||
pointer-events:auto; |
|||
width: 208rpx; |
|||
height: 122rpx; |
|||
transform: translateX(560rpx) translateY(680rpx) translateZ(0rpx) scale(1); |
|||
transform-origin: center center; |
|||
will-change: auto; |
|||
position: absolute; |
|||
top: 850rpx; |
|||
left: 520rpx; |
|||
} |
|||
.img-box { |
|||
width: 178rpx; |
|||
height: 148rpx; |
|||
} |
|||
.img-box image { |
|||
width: 100%; |
|||
height: 100%; |
|||
object-fit: cover; |
|||
} |
|||
/* 悬浮按钮 end */ |
|||
|
|||
.my-publish { |
|||
height: 76rpx; |
|||
width: 164rpx; |
|||
position: fixed; |
|||
right: -10rpx; |
|||
top: 0rpx; |
|||
} |
|||
.my-publish image { |
|||
height: 100%; |
|||
width: 100%; |
|||
} |
|||
@ -0,0 +1,255 @@ |
|||
// subpages/heart/pages/groupBuyPublish/groupBuyPublish.js
|
|||
const api = require("../../utils/api") |
|||
import { getTimestamp } from '../../../../utils/common' |
|||
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
dialogVisible: false, //提示框
|
|||
showPicker: false, //是否显示底部时间选择器插件
|
|||
dataForm: { |
|||
groupBuyTitle: '', //标题
|
|||
groupBuyContent: '', //内容
|
|||
groupBuyTime: '', //团购时间
|
|||
groupBuyMobile: '', //手机
|
|||
id: '', //主键 更新时携带
|
|||
}, |
|||
violationsCount: 0, //内容审核计数
|
|||
isConReview: false, //内容审核标志
|
|||
lock: false, //锁定发布按钮状态,防止连击
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
'dataForm.id': options.id || '' |
|||
}) |
|||
if (options.id) { |
|||
this.initDataForm() |
|||
} |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
// onShareAppMessage: function () {
|
|||
|
|||
// }
|
|||
|
|||
onInputGroupBuyTitle (e) { |
|||
this.setData({ |
|||
'dataForm.groupBuyTitle': e.detail.value |
|||
}) |
|||
}, |
|||
onInputGroupBuyMobile (e) { |
|||
this.setData({ |
|||
'dataForm.groupBuyMobile': e.detail.value |
|||
}) |
|||
}, |
|||
onInputContent (e) { |
|||
this.setData({ |
|||
'dataForm.groupBuyContent': e.detail.value |
|||
}) |
|||
}, |
|||
pickerCancel () { |
|||
console.log('取消日期选择') |
|||
this.setData({ |
|||
showPicker: false, |
|||
'dataForm.groupBuyTime': '' |
|||
}) |
|||
}, |
|||
pickerConfirm (e) { |
|||
console.log('选择日期', e.detail.time) |
|||
if (e.detail.time < getTimestamp()) { |
|||
this.showToast("团购时间应该大于当前时间") |
|||
} else { |
|||
this.setData({ |
|||
showPicker: false, |
|||
'dataForm.groupBuyTime': e.detail.time |
|||
}) |
|||
} |
|||
}, |
|||
//日期选择插件显示入口
|
|||
selectTime (e) { |
|||
this.data.showPicker = !this.data.showPicker |
|||
this.setData({ |
|||
showPicker: this.data.showPicker, |
|||
'dataForm.groupBuyTime': this.data.dataForm.groupBuyTime || getTimestamp() |
|||
}) |
|||
}, |
|||
//发布
|
|||
submitApply () { |
|||
if (this.data.lock) { |
|||
return false |
|||
} |
|||
if (!this.data.dataForm.groupBuyTitle) { |
|||
this.showToast("请填标题") |
|||
return false |
|||
} |
|||
if (this.data.dataForm.groupBuyTitle.length>50) { |
|||
this.showToast("标题限制在50字以内") |
|||
return false |
|||
} |
|||
if (!this.data.dataForm.groupBuyTime) { |
|||
this.showToast("请填写团购时间") |
|||
return false |
|||
} |
|||
if (!this.data.dataForm.groupBuyContent) { |
|||
this.showToast("请填写团购内容") |
|||
return false |
|||
} |
|||
if (this.data.dataForm.groupBuyContent.length>500) { |
|||
this.showToast("团购内容限制在500字以内") |
|||
return false |
|||
} |
|||
if (!this.data.dataForm.groupBuyMobile) { |
|||
this.showToast("请填写联系电话") |
|||
return false |
|||
} |
|||
if (this.data.dataForm.groupBuyMobile.length>20) { |
|||
this.showToast("联系电话限制在20字以内") |
|||
return false |
|||
} |
|||
wx.showLoading({ |
|||
title: "发布中", |
|||
}) |
|||
this.setData({ |
|||
lock: true |
|||
}) |
|||
const para = { ...this.data.dataForm } |
|||
para.isConReview = this.data.isConReview |
|||
console.log('submit', para) |
|||
let that = this |
|||
api.groupBuyUpdate(para).then(res => { |
|||
this.setData({ |
|||
lock: false |
|||
}) |
|||
if(res.code == 0) { |
|||
wx.hideLoading() |
|||
this.setData({ |
|||
dialogVisible: !this.data.dialogVisible, |
|||
'dataForm.groupBuyTitle': '', |
|||
violationsCount: 0, |
|||
isConReview: false |
|||
}) |
|||
} else if (res.code == 533) { |
|||
wx.hideLoading() |
|||
this.data.violationsCount++ |
|||
console.log(this.data.violationsCount) |
|||
if (this.data.violationsCount == 1){ |
|||
wx.showToast({ |
|||
title: res.msg, |
|||
icon: "none", |
|||
duration: 2000 |
|||
}) |
|||
} else if (this.data.violationsCount == 2) { |
|||
wx.hideLoading() |
|||
wx.showModal({ |
|||
title: '提示', |
|||
content: '您提交的内容再次被判定为违规,您确定是否要提交?', |
|||
success (res) { |
|||
if (res.confirm) { |
|||
console.log('用户点击确定') |
|||
that.data.isConReview = true |
|||
that.submitApply() |
|||
} else if (res.cancel) { |
|||
console.log('用户点击取消') |
|||
that.setData({ |
|||
violationsCount: 0, |
|||
isConReview: false |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
}).catch(err => { |
|||
console.log('err',err) |
|||
wx.hideLoading() |
|||
this.setData({ |
|||
lock: false |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
initDataForm () { |
|||
wx.showLoading({ |
|||
title: '加载中...' |
|||
}) |
|||
api.getGroupBuyDetail(this.data.dataForm.id).then(res => { |
|||
wx.hideLoading() |
|||
this.setData({ |
|||
dataForm: res.data |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
//简化提示
|
|||
showToast (title) { |
|||
wx.showToast({ |
|||
title: title, |
|||
icon: "none", |
|||
duration: 2000 |
|||
}) |
|||
}, |
|||
|
|||
// 关闭弹框
|
|||
closeDialog () { |
|||
wx.navigateBack({ |
|||
delta: 1 |
|||
}) |
|||
}, |
|||
// 弹框确定按钮
|
|||
confirmDialog () { |
|||
wx.navigateBack({ |
|||
delta: 1 |
|||
}) |
|||
}, |
|||
}) |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"navigationBarTitleText": "拼团购发布", |
|||
"usingComponents": { |
|||
"date-time-picker": "../../../../components/DateTimePicker/index", |
|||
"notice": "../../components/notice/notice" |
|||
} |
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
<!--subpages/heart/pages/groupBuyPublish/groupBuyPublish.wxml--> |
|||
<view class="my-apply"> |
|||
<view class="content"> |
|||
<view class="apply-item"> |
|||
<view class="item-title">标题</view> |
|||
<input type="text" class="item-content" placeholder="请输入标题" value="{{dataForm.groupBuyTitle}}" bindinput="onInputGroupBuyTitle"></input> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">团购时间</view> |
|||
<view class="select-time" bindtap="selectTime">{{dataForm.groupBuyTime||'请选择时间'}}</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title" style="margin-top:20rpx">内容</view> |
|||
<textarea class="item-content text-content" maxlength="500" placeholder="请描述团购内容" value="{{dataForm.groupBuyContent}}" bindinput="onInputContent"><span class="text-length">{{dataForm.groupBuyContent.length}}/500</span></textarea> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">联系电话</view> |
|||
<input type="text" class="item-content" maxlength="20" placeholder="请输入联系电话" value="{{dataForm.groupBuyMobile}}" bindinput="onInputGroupBuyMobile"></input> |
|||
</view> |
|||
</view> |
|||
<view class="submit" bindtap="submitApply"> |
|||
<image class="submit-bk" src="../../images/submit-bk.png" /> |
|||
<view class="submit-text">发布</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<view wx:if="{{showPicker}}"> |
|||
<date-time-picker bind:cancel="pickerCancel" bind:confirm="pickerConfirm" init-time="{{dataForm.groupBuyTime}}"></date-time-picker> |
|||
</view> |
|||
|
|||
<notice bind:close="closeDialog" bind:confirm="confirmDialog" dialogVisible="{{dialogVisible}}" title="发布成功" content="" confirmText="知道了"></notice> |
|||
@ -0,0 +1,113 @@ |
|||
/* subpages/heart/pages/groupBuyPublish/groupBuyPublish.wxss */ |
|||
page { |
|||
width: 100%; |
|||
overflow-y: auto; |
|||
background: #f7f7f7; |
|||
} |
|||
.content { |
|||
position: relative; |
|||
overflow: hidden; |
|||
} |
|||
.content .my-apply-img { |
|||
position: absolute; |
|||
right: -10rpx; |
|||
top: 16rpx; |
|||
} |
|||
.content .my-apply-img image { |
|||
width: 208rpx; |
|||
height: 76rpx; |
|||
} |
|||
.content .apply-item { |
|||
width: 100%; |
|||
min-height: 170rpx; |
|||
background-color: white; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: flex-start; |
|||
justify-content: center; |
|||
padding: 0rpx 30rpx; |
|||
margin-top: 16rpx; |
|||
box-sizing: border-box; |
|||
} |
|||
.content .text-item { |
|||
height: 220rpx; |
|||
} |
|||
.content .apply-item .item-title { |
|||
height: 50rpx; |
|||
line-height: 50rpx; |
|||
font-size: 32rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
margin-bottom: 28rpx; |
|||
} |
|||
.content .apply-item .item-content, .select-time { |
|||
width: 100%; |
|||
height: 44rpx; |
|||
line-height: 44rpx; |
|||
font-size: 32rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #666666; |
|||
} |
|||
.content .apply-item .text-content { |
|||
font-weight: 400; |
|||
height: 280rpx; |
|||
margin-bottom: 80rpx; |
|||
} |
|||
.text-length { |
|||
position: absolute; |
|||
right: 0rpx; |
|||
bottom: -60rpx; |
|||
font-size: 28rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 400; |
|||
color: #999999; |
|||
} |
|||
.submit { |
|||
width: 592rpx; |
|||
height: 116rpx; |
|||
position: relative; |
|||
margin: 78rpx auto 0rpx; |
|||
} |
|||
.submit .submit-bk { |
|||
width: 100%; |
|||
height: 100%; |
|||
position: absolute; |
|||
z-index: -1; |
|||
} |
|||
.submit .submit-text { |
|||
font-size: 34rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #FFFFFF; |
|||
height: 100rpx; |
|||
line-height: 100rpx; |
|||
text-align: center; |
|||
} |
|||
|
|||
.time-group { |
|||
width: 100%; |
|||
display: flex; |
|||
justify-content: space-around; |
|||
align-items: center; |
|||
} |
|||
.time-group .select-time { |
|||
width: 304rpx; |
|||
height: 50rpx; |
|||
/* background: #F7F7F7; */ |
|||
border-radius: 25rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
font-size: 24rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
} |
|||
.time-group .select-time image { |
|||
width: 26rpx; |
|||
height: 26rpx; |
|||
opacity: 0.76; |
|||
margin-right: 20rpx; |
|||
} |
|||
@ -0,0 +1,130 @@ |
|||
// subpages/heart/pages/noticeNewDetail/noticeNewDetail.js
|
|||
const api = require("../../utils/api") |
|||
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
noticeId: '', |
|||
noticeType: '', //0,2 顺道捎 1,3 拼团购
|
|||
details: {} |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
noticeId: options.id, |
|||
noticeType: options.type |
|||
}) |
|||
this.getNoticeDetail() |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
// onShareAppMessage: function () {
|
|||
|
|||
// },
|
|||
|
|||
getNoticeDetail () { |
|||
wx.showLoading({ |
|||
title: '加载中...' |
|||
}) |
|||
if (this.data.noticeType == 0 || this.data.noticeType == 2) { |
|||
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 |
|||
}) |
|||
}) |
|||
} |
|||
}, |
|||
callNumber () { |
|||
let mobile = (this.data.noticeType == 0 || this.data.noticeType == 2) ? this.data.details.mobile : this.data.details.groupBuyMobile |
|||
console.log('拨打电话', mobile) |
|||
let that = this |
|||
wx.showModal({ |
|||
title: "拨打电话", |
|||
content: "", |
|||
cancelColor: "#29B9A5", |
|||
confirmColor: "#29B9A5", |
|||
success: (res) => { |
|||
if (res.confirm) { |
|||
console.log("用户点击确定") |
|||
that.countCall() |
|||
wx.makePhoneCall({ |
|||
phoneNumber: mobile |
|||
}) |
|||
} else if (res.cancel) { |
|||
console.log("用户点击取消") |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
countCall () { |
|||
if (this.data.noticeType == 0 || this.data.noticeType == 2) { |
|||
api.sdsCall(this.data.noticeId).then(res => { |
|||
console.log(res.data) |
|||
}) |
|||
} else { |
|||
api.groupBuyCall(this.data.noticeId).then(res => { |
|||
console.log(res.data) |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
@ -0,0 +1,4 @@ |
|||
{ |
|||
"navigationBarTitleText": "详情", |
|||
"usingComponents": {} |
|||
} |
|||
@ -0,0 +1,52 @@ |
|||
<!--subpages/heart/pages/noticeNewDetail/noticeNewDetail.wxml--> |
|||
<view class="notice-new"> |
|||
<view class="notice-detail" wx:if="{{noticeType == 0 || noticeType == 2}}"> |
|||
<!-- <view class="apply-item"> |
|||
<view class="item-title">{{details.carryStatus==0?'我需要捎':'我可以捎'}}</view> |
|||
</view> --> |
|||
<view class="apply-item"> |
|||
<view class="item-title">出发地</view> |
|||
<view class="item-content">{{details.departure}}</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">目的地</view> |
|||
<view class="item-content">{{details.destination}}</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">出发时间</view> |
|||
<view class="item-content">{{details.departureTime}}</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">联系电话</view> |
|||
<view class="item-content item-mobile"> |
|||
<view >{{details.mobile}}</view> |
|||
<view class="call-img" bindtap="callNumber"><image src="../../images/call.png" /></view> |
|||
</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">携带内容</view> |
|||
<view class="item-content">{{details.carryContent}}</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.groupBuyTime}}</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">联系电话</view> |
|||
<view class="item-content item-mobile"> |
|||
<view >{{details.groupBuyMobile}}</view> |
|||
<view class="call-img" bindtap="callNumber"><image src="../../images/call.png" /></view> |
|||
</view> |
|||
</view> |
|||
<view class="apply-item"> |
|||
<view class="item-title">内容</view> |
|||
<view class="item-content">{{details.groupBuyContent}}</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; |
|||
} |
|||
@ -0,0 +1,178 @@ |
|||
// subpages/heart/pages/noticeNewList/noticeNewList.js
|
|||
const api = require("../../utils/api") |
|||
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
pageIndex: 1, |
|||
pageSize: 10, |
|||
nodata: false, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
sdslist: [], |
|||
groupbuylist: [], |
|||
type: '0' //0 顺道捎 1 拼团购
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
type: options.type |
|||
}) |
|||
this.getMyList() |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
// onShareAppMessage: function () {
|
|||
|
|||
// }
|
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.setData({ |
|||
loadMoreVisible: true |
|||
}) |
|||
if (this.data.loadMoreType === "loading") { |
|||
this.setData({ |
|||
pageIndex: this.data.pageIndex + 1 |
|||
}) |
|||
this.getMyList() |
|||
} |
|||
}, |
|||
|
|||
getMyList () { |
|||
if (this.data.type == '0') { |
|||
this.getSdsList() |
|||
} else { |
|||
this.getGroupBuyList() |
|||
} |
|||
}, |
|||
getSdsList () { |
|||
const para = { |
|||
type: '2', |
|||
pageIndex: this.data.pageIndex, |
|||
pageSize: this.data.pageSize |
|||
} |
|||
api.getSdsList(para).then(res => { |
|||
console.log(res) |
|||
this.setData({ |
|||
sdslist: [...this.data.sdslist,...res.data], |
|||
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', |
|||
loadMoreVisible: res.data.length === this.data.pageSize ? false : true |
|||
}) |
|||
if (this.data.sdslist.length == 0) { |
|||
this.setData({ |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
} |
|||
}).catch(err => { |
|||
this.setData({ |
|||
sdslist: [], |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
getGroupBuyList () { |
|||
const para = { |
|||
isMe: '1', |
|||
pageIndex: this.data.pageIndex, |
|||
pageSize: this.data.pageSize |
|||
} |
|||
api.getGroupBuyList(para).then(res => { |
|||
console.log(res) |
|||
this.setData({ |
|||
groupbuylist: [...this.data.groupbuylist,...res.data], |
|||
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', |
|||
loadMoreVisible: res.data.length === this.data.pageSize ? false : true |
|||
}) |
|||
if (this.data.groupbuylist.length == 0) { |
|||
this.setData({ |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
} |
|||
}).catch(err => { |
|||
this.setData({ |
|||
groupbuylist: [], |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
|
|||
deleteSds (e) { |
|||
console.log('删除', e.detail.id) |
|||
api.sdsDelete(e.detail.id).then(res => { |
|||
console.log(res.data) |
|||
this.setData({ |
|||
pageIndex: 1, |
|||
sdslist: [] |
|||
}) |
|||
this.getMyList() |
|||
}) |
|||
}, |
|||
|
|||
deleteGroupBuy (e) { |
|||
console.log('删除', e.detail.id) |
|||
api.groupBuyDelete(e.detail.id).then(res => { |
|||
console.log(res.data) |
|||
this.setData({ |
|||
pageIndex: 1, |
|||
groupbuylist: [] |
|||
}) |
|||
this.getMyList() |
|||
}) |
|||
} |
|||
}) |
|||
@ -0,0 +1,8 @@ |
|||
{ |
|||
"navigationBarTitleText": "我的发布", |
|||
"usingComponents": { |
|||
"notice": "../../components/noticeNew/noticeNew", |
|||
"load-more": "/components/loadMore/loadMore", |
|||
"no-data": "/components/nodata/nodata" |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
<!--subpages/heart/pages/noticeNewList/noticeNewList.wxml--> |
|||
<view class="drop-by-list"> |
|||
<view class="item-list" wx:if="{{type == '0'}}"> |
|||
<notice list="{{sdslist}}" type="{{2}}" bind:delete="deleteSds"></notice> |
|||
</view> |
|||
<view class="item-list" wx:else> |
|||
<notice list="{{groupbuylist}}" type="{{3}}" bind:delete="deleteGroupBuy"></notice> |
|||
</view> |
|||
</view> |
|||
|
|||
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |
|||
@ -0,0 +1,7 @@ |
|||
/* subpages/heart/pages/noticeNewList/noticeNewList.wxss */ |
|||
page { |
|||
width: 100%; |
|||
height: auto; |
|||
overflow-y: auto; |
|||
background: #f7f7f7; |
|||
} |
|||
@ -0,0 +1,83 @@ |
|||
var fly = require("../../../utils/request.js") |
|||
module.exports = { |
|||
getSdsList, |
|||
getSdsDetail, |
|||
sdsUpdate, |
|||
sdsDelete, |
|||
sdsCall, |
|||
getGroupBuyList, |
|||
getGroupBuyDetail, |
|||
groupBuyUpdate, |
|||
groupBuyDelete, |
|||
groupBuyCall, |
|||
getImgUrl, |
|||
getVolunteerVerify, |
|||
} |
|||
|
|||
//顺道捎-首页列表
|
|||
function getSdsList ({ type, pageIndex, pageSize }) { |
|||
return fly.get("custom/sds/getSdsList", { |
|||
type, |
|||
pageIndex, |
|||
pageSize |
|||
}) |
|||
} |
|||
|
|||
//顺道捎-我需要捎我可以捎详情接口
|
|||
function getSdsDetail (id) { |
|||
return fly.get(`custom/sds/getSdsDetail/${id}`) |
|||
} |
|||
|
|||
//顺道捎-发布/修改
|
|||
function sdsUpdate (para) { |
|||
return fly.post("custom/sds/publishOrUpdate", para) |
|||
} |
|||
|
|||
//顺道捎-删除
|
|||
function sdsDelete (id) { |
|||
return fly.get(`custom/sds/delete/${id}`) |
|||
} |
|||
|
|||
//顺道捎-拨打电话次数
|
|||
function sdsCall (id) { |
|||
return fly.get(`custom/sds/callMobile/${id}`) |
|||
} |
|||
|
|||
//拼团购-首页列表
|
|||
function getGroupBuyList ({ isMe, pageIndex, pageSize }) { |
|||
return fly.get("custom/groupBuy/getGroupBuyList", { |
|||
isMe, |
|||
pageIndex, |
|||
pageSize |
|||
}) |
|||
} |
|||
|
|||
//拼团购-详情接口
|
|||
function getGroupBuyDetail (id) { |
|||
return fly.get(`custom/groupBuy/getGroupBuyDetail/${id}`) |
|||
} |
|||
|
|||
//拼团购-发布/修改
|
|||
function groupBuyUpdate (para) { |
|||
return fly.post("custom/groupBuy/publishOrUpdate", para) |
|||
} |
|||
|
|||
//拼团购-删除
|
|||
function groupBuyDelete (id) { |
|||
return fly.get(`custom/groupBuy/delete/${id}`) |
|||
} |
|||
|
|||
//拼团购-拨打电话次数
|
|||
function groupBuyCall (id) { |
|||
return fly.get(`custom/groupBuy/callMobile/${id}`) |
|||
} |
|||
|
|||
// 获取配置图片
|
|||
function getImgUrl (imgType) { |
|||
return fly.get(`imgConfig/getImgUrl/${imgType}`) |
|||
} |
|||
|
|||
// 获取志愿者认证标志
|
|||
function getVolunteerVerify () { |
|||
return fly.get(`app-user/user/volunteerVerify`) |
|||
} |
|||
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 356 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 130 KiB |
@ -1,166 +0,0 @@ |
|||
// subpages/understandJs/pages/archives/archives.js
|
|||
const api = require('../../../../utils/understandJs') |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
pageIndex: 1, |
|||
pageSize: 10, |
|||
deptList: [], |
|||
nodata: false, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
swiperBannerList: [], |
|||
indicatorDots: false, //指示点
|
|||
autoplay: true, //true,//自动播放
|
|||
circular: true, //衔接滑动
|
|||
interval: 5000, //自动播放间隔时长(ms)
|
|||
duration: 500, //幻灯片切换时长(ms)
|
|||
currentSwiper: 0, |
|||
showTitle: true, //视频标题
|
|||
dictType: 'notice_yjfu_lbzx', // 居务公开,老兵在线
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
dictType: options.modulecode |
|||
}) |
|||
if (options.modulecode == 'notice_jwgk') { |
|||
wx.setNavigationBarTitle({ |
|||
title: '居务公开' |
|||
}) |
|||
this.getBannerList('8') |
|||
} else if (options.modulecode == 'notice_yjfu_lbzx') { |
|||
wx.setNavigationBarTitle({ |
|||
title: '老兵在线' |
|||
}) |
|||
this.getBannerList('7') |
|||
} |
|||
this.getFullDictInfo() |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
this.setData({ |
|||
searchContent: '' |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.setData({ |
|||
loadMoreVisible: true |
|||
}) |
|||
if (this.data.loadMoreType === 'loading') { |
|||
this.setData({ |
|||
pageIndex: this.data.pageIndex + 1, |
|||
pageSize: this.data.pageSize, |
|||
}) |
|||
this.getFullDictInfo() |
|||
} |
|||
}, |
|||
|
|||
getFullDictInfo () { |
|||
const dictType = this.data.dictType |
|||
api.modulelist(dictType).then(res => { |
|||
this.setData({ |
|||
deptList: res.data, |
|||
}) |
|||
if (this.data.deptList.length == 0) { |
|||
this.setData({ |
|||
nodata: true |
|||
}) |
|||
} |
|||
}).catch(err => { |
|||
this.setData({ |
|||
deptList: [], |
|||
nodata: true |
|||
}) |
|||
console.log(err) |
|||
}) |
|||
// api.getFullDictInfo(dictType).then(res => {
|
|||
// console.log(res)
|
|||
// this.setData({
|
|||
// deptList: [...this.data.deptList,...res.data],
|
|||
// loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none',
|
|||
// loadMoreVisible: res.data.length === this.data.pageSize ? false : true
|
|||
// })
|
|||
// if (this.data.deptList.length == 0) {
|
|||
// this.setData({
|
|||
// nodata: true,
|
|||
// loadMoreType: 'none',
|
|||
// loadMoreVisible: false,
|
|||
// })
|
|||
// }
|
|||
// }).catch(err => {
|
|||
// this.setData({
|
|||
// deptList: [],
|
|||
// nodata: true,
|
|||
// loadMoreType: 'none',
|
|||
// loadMoreVisible: false,
|
|||
// })
|
|||
// console.log(err)
|
|||
// })
|
|||
}, |
|||
getBannerList: function(bannerNum) { |
|||
let that = this |
|||
api.bannerList(bannerNum).then(function(res) { |
|||
// console.log('res==', res.data)
|
|||
that.setData({ |
|||
swiperBannerList: res.data |
|||
}) |
|||
}) |
|||
}, |
|||
swiperChange: function(e) { |
|||
wx.createVideoContext('video'+this.data.currentSwiper).pause() |
|||
this.setData({ |
|||
currentSwiper: e.detail.current, |
|||
autoplay: true |
|||
}) |
|||
}, |
|||
bindplay() { |
|||
this.setData({ |
|||
autoplay: false |
|||
}) |
|||
wx.getNetworkType({ |
|||
success (res) { |
|||
const networkType = res.networkType |
|||
if (res.networkType != 'wifi') { |
|||
wx.showToast({ |
|||
title: '当前为非WI-FI环境,请注意流量消耗', |
|||
icon: 'none', |
|||
duration: 3000 |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
bindended() { |
|||
this.setData({ |
|||
autoplay: true |
|||
}) |
|||
}, |
|||
bindcontrolstoggle(e) { |
|||
this.setData({ |
|||
showTitle: e.detail.show |
|||
}) |
|||
}, |
|||
/** |
|||
* 跳转页面 |
|||
*/ |
|||
navigateToDict (e) { |
|||
console.log(e.currentTarget.dataset.dict) |
|||
wx.navigateTo({ |
|||
url: `../laobingzaixianDict/laobingzaixianDict?dictName=${e.currentTarget.dataset.dict.name}&dictType=${this.data.dictType}&dictValue=${e.currentTarget.dataset.dict.moduleCode}` |
|||
}) |
|||
} |
|||
}) |
|||
@ -1,7 +0,0 @@ |
|||
{ |
|||
"navigationBarTitleText": "", |
|||
"usingComponents": { |
|||
"load-more": "../../../../components/loadMore/loadMore", |
|||
"no-data":"../../../../components/nodata/nodata" |
|||
} |
|||
} |
|||
@ -1,48 +0,0 @@ |
|||
<view class="dept-list"> |
|||
<!-- banner swiperBannerList --> |
|||
<view class="banner" wx:if="{{swiperBannerList.length>0}}"> |
|||
<view class="page-section page-section-spacing swiper"> |
|||
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperChange"> |
|||
<block wx:for="{{swiperBannerList}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
|||
<swiper-item> |
|||
<view data-banner="{{item}}"> |
|||
<view class="swiper-item" data-id="{{item.id}}"> |
|||
<!-- <view class="altitle"> |
|||
<view class="altitle-name">{{item.title}}</view> |
|||
</view> --> |
|||
<image wx:if="{{item.imgUrl}}" class="banner" src='{{item.imgUrl}}' mode="aspectFill" /> |
|||
<block wx:elif="{{item.videoUrl}}"> |
|||
<video id="video{{index}}" class="banner" src="{{item.videoUrl}}" title="{{item.title}}" bindcontrolstoggle="bindcontrolstoggle" bindpause="bindended" bindplay='bindplay' bindended='bindended'/> |
|||
<view class="video-title" hidden="{{!showTitle}}">{{item.title}}</view> |
|||
</block> |
|||
</view> |
|||
</view> |
|||
</swiper-item> |
|||
</block> |
|||
</swiper> |
|||
<!-- 重置小圆点的样式 --> |
|||
<view class="dots"> |
|||
<block wx:for="{{ swiperBannerList }}" wx:key="index"> |
|||
<view class="dot {{index == currentSwiper ? ' active' : '' }}"></view> |
|||
</block> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<view |
|||
wx:for="{{deptList}}" |
|||
wx:for-index="index" |
|||
wx:for-item="item" |
|||
wx:key="index" |
|||
class="list-item" bindtap="navigateToDict" data-dict="{{item}}"> |
|||
<view class="list-name"> |
|||
<image src="{{item.imgUrl}}" class="list-icon"/>{{item.name}} |
|||
</view> |
|||
<image src="../../images/right.png" class="list-arrow"></image> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- <load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> --> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |
|||
|
|||
@ -1,265 +0,0 @@ |
|||
page { |
|||
background: #f7f7f7; |
|||
height: auto; |
|||
} |
|||
|
|||
/* .top { |
|||
margin-top: 3rpx; |
|||
width: 100%; |
|||
height: 94rpx; |
|||
background: #fff; |
|||
display: flex; |
|||
justify-content: center; |
|||
} |
|||
.topbk { |
|||
position: absolute; |
|||
width: 100%; |
|||
height: 376rpx; |
|||
top: 0rpx; |
|||
} |
|||
.search { |
|||
width: calc(100% - 60rpx); |
|||
height: 66rpx; |
|||
background: rgba(255, 255, 255, 1); |
|||
border-radius: 33rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
position: absolute; |
|||
} |
|||
|
|||
.search .item-all { |
|||
height: 30rpx; |
|||
width: 100%; |
|||
width: calc(100% - 60rpx); |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.search .item-all .item-left { |
|||
width: calc(100% - 73rpx); |
|||
height: 30rpx; |
|||
border-right: 1rpx solid #BFBFBF; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.search .item-all .item-left image { |
|||
width: 30rpx; |
|||
height: 28rpx; |
|||
} |
|||
|
|||
.search .item-all .item-left input { |
|||
width: calc(100% - 41rpx); |
|||
height: 30rpx; |
|||
font-size: 28rpx; |
|||
color: #333; |
|||
} |
|||
|
|||
.placeholder-style { |
|||
font-size: 28rpx; |
|||
font-weight: 500; |
|||
color: rgba(168, 168, 168, 1); |
|||
} |
|||
|
|||
.search .item-all .item-right { |
|||
font-size: 28rpx; |
|||
font-weight: 500; |
|||
color: rgba(51, 51, 51, 1); |
|||
background-color: #fff; |
|||
} |
|||
|
|||
button { |
|||
width: 100rpx; |
|||
height: 58rpx; |
|||
padding: 0; |
|||
border-radius: 0; |
|||
line-height: 58rpx; |
|||
} |
|||
|
|||
button::after { |
|||
border-radius: 0px; |
|||
border: none; |
|||
} */ |
|||
|
|||
/* 列表 */ |
|||
.dept-list { |
|||
display: grid; |
|||
grid-template-columns: 1fr; |
|||
place-items: center; |
|||
gap: 24rpx 0; |
|||
width: 690rpx; |
|||
padding: 20rpx 0; |
|||
margin: 0rpx auto; |
|||
position: relative; |
|||
z-index: 999; |
|||
} |
|||
.dept-list .list-item:nth-of-type(1) { |
|||
margin-top: 12rpx; |
|||
} |
|||
.list-item { |
|||
width: 100%; |
|||
height: 160rpx; |
|||
background: #fff; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
border-radius: 14rpx; |
|||
} |
|||
|
|||
.list-item .list-name { |
|||
font-size:32rpx; |
|||
font-family:PingFang SC; |
|||
font-weight:bold; |
|||
color:rgba(51,51,51,1); |
|||
margin-left: 42rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
.list-item .list-arrow { |
|||
width: 16rpx; |
|||
height: 26rpx; |
|||
margin-right: 42rpx; |
|||
} |
|||
.list-item .list-name .list-icon { |
|||
width: 106rpx; |
|||
height: 106rpx; |
|||
margin-right: 14rpx; |
|||
} |
|||
|
|||
/* 轮播图start */ |
|||
|
|||
.altitle { |
|||
position: absolute; |
|||
width: 100%; |
|||
height: 66rpx; |
|||
background-color: black; |
|||
margin-top: 237rpx; |
|||
border-bottom-right-radius: 16rpx; |
|||
border-bottom-left-radius: 16rpx; |
|||
opacity: 0.5; |
|||
font-size: 22rpx; |
|||
font-weight: 500; |
|||
color: rgba(255, 255, 255, 1); |
|||
} |
|||
|
|||
.altitle-name { |
|||
margin: 10rpx 20rpx; |
|||
} |
|||
|
|||
.container { |
|||
width: 100vw; |
|||
} |
|||
|
|||
.page-body { |
|||
padding-top: 30rpx; |
|||
background: #fff; |
|||
height: 350rpx; |
|||
} |
|||
|
|||
.page-section { |
|||
width: 100%; |
|||
margin-bottom: 60rpx; |
|||
} |
|||
|
|||
.page-section_center { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
} |
|||
|
|||
.page-section:last-child { |
|||
margin-bottom: 0; |
|||
} |
|||
|
|||
.page-section-gap { |
|||
box-sizing: border-box; |
|||
padding: 0 30rpx; |
|||
} |
|||
|
|||
.page-section-spacing { |
|||
box-sizing: border-box; |
|||
/* padding: 0 20rpx; */ |
|||
height: 350rpx; |
|||
background-color: #fff; |
|||
} |
|||
|
|||
.page-section-title { |
|||
font-size: 28rpx; |
|||
color: #999; |
|||
margin-bottom: 10rpx; |
|||
padding-left: 30rpx; |
|||
padding-right: 30rpx; |
|||
} |
|||
|
|||
.page-section-gap .page-section-title { |
|||
padding-left: 0; |
|||
padding-right: 0; |
|||
} |
|||
|
|||
.swiper-item { |
|||
display: block; |
|||
height: 350rpx; |
|||
} |
|||
|
|||
.banner { |
|||
overflow: hidden; |
|||
height: 350rpx; |
|||
display: flex; |
|||
width: 100%; |
|||
border-radius: 16rpx; |
|||
margin-bottom: 8rpx; |
|||
} |
|||
|
|||
.dots { |
|||
display: flex; |
|||
justify-content: center; |
|||
margin-top: -16rpx; |
|||
z-index: 999; |
|||
position: relative; |
|||
} |
|||
|
|||
.dots .dot { |
|||
width: 8rpx; |
|||
height: 8rpx; |
|||
border-radius: 8rpx; |
|||
margin-left: 10rpx; |
|||
background: #d2d5da; |
|||
transition: all 0.3s; |
|||
} |
|||
|
|||
.dots .dot.active { |
|||
width: 24rpx; |
|||
background: #fff; |
|||
} |
|||
|
|||
.page-section-title { |
|||
margin-top: 60rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
swiper { |
|||
width: 710rpx; |
|||
height: 350rpx; |
|||
box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1); |
|||
border-radius: 16rpx; |
|||
overflow: hidden; |
|||
-webkit-backface-visibility: hidden; |
|||
-webkit-transform: translate3d(0, 0, 0); |
|||
} |
|||
|
|||
.video-title { |
|||
width: 100%; |
|||
height: 50rpx; |
|||
line-height: 50rpx; |
|||
padding-left: 40rpx; |
|||
color: white; |
|||
background: linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0)); |
|||
background: -webkit-linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0)); |
|||
position: absolute; |
|||
top: 0; |
|||
} |
|||
/* 轮播图end */ |
|||
|
|||
@ -1,86 +0,0 @@ |
|||
// subpages/understandJs/pages/sclerotia/sclerotia.js
|
|||
const api = require("../../../../utils/understandJs") |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
pageIndex: 1, |
|||
pageSize: 10, |
|||
sclerotialist: [], |
|||
nodata: false, |
|||
loadMoreType: "none", |
|||
loadMoreVisible: false, |
|||
dictType: '', |
|||
dictValue: '', |
|||
dictName: '', |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
wx.setNavigationBarTitle({ |
|||
title: options.dictName |
|||
}) |
|||
this.setData({ |
|||
dictName: options.dictName, |
|||
dictType: options.dictType, |
|||
dictValue: options.dictValue |
|||
}) |
|||
console.log(options) |
|||
this.getSclerotiaList() |
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.setData({ |
|||
loadMoreVisible: true |
|||
}) |
|||
if (this.data.loadMoreType === 'loading') { |
|||
this.setData({ |
|||
pageIndex: this.data.pageIndex + 1, |
|||
pageSize: this.data.pageSize, |
|||
}) |
|||
this.getSclerotiaList() |
|||
} |
|||
}, |
|||
|
|||
getSclerotiaList: function() { |
|||
let that = this |
|||
let para = { |
|||
pageIndex: this.data.pageIndex, |
|||
pageSize: this.data.pageSize, |
|||
noticeCategory: this.data.dictValue |
|||
} |
|||
api.noticelist(para).then(function(res) { |
|||
that.setData({ |
|||
sclerotialist: that.data.sclerotialist.concat(res.data), |
|||
loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none', |
|||
}) |
|||
if (that.data.sclerotialist.length == 0) { |
|||
that.setData({ |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false |
|||
}) |
|||
} |
|||
}).catch(() => { |
|||
that.setData({ |
|||
nodata: true, |
|||
loadMoreType: "none", |
|||
loadMoreVisible: false, |
|||
sclerotialist: [] |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
toDetail (e) { |
|||
wx.navigateTo({ |
|||
url: `../noticeDetail/noticeDetail?modulename=${this.data.dictName}&modulecode=${this.data.dictType}&modulevalue=${this.data.dictValue}&id=${e.currentTarget.dataset.id}` |
|||
}) |
|||
} |
|||
}) |
|||
@ -1,7 +0,0 @@ |
|||
{ |
|||
"navigationBarTitleText": "", |
|||
"usingComponents": { |
|||
"load-more": "../../../../components/loadMore/loadMore", |
|||
"no-data":"../../../../components/nodata/nodata" |
|||
} |
|||
} |
|||
@ -1,32 +0,0 @@ |
|||
<wxs module="filter" src="../../../../utils/filter.wxs"></wxs> |
|||
<!-- 列表 --> |
|||
<view class="list-all" wx:if="{{dictType == 'notice_yjfu_lbzx'}}"> |
|||
<view class="list-item" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{sclerotialist}}" data-id="{{item.id}}" bindtap="toDetail"> |
|||
<image src="{{item.imgUrl}}"></image> |
|||
<view class="item-info"> |
|||
<view class="item-info-name">{{item.noticeTitle}}</view> |
|||
<view class="item-info-time"> |
|||
<text>{{item.deptName}}</text> |
|||
<text>{{filter.formatTime(item.noticeTime, 'yyyy-MM-dd')}}</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="list-all" wx:else> |
|||
<view class="list-item-2" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{sclerotialist}}" bindtap="toDetail" data-id="{{item.id}}"> |
|||
<view class="name">{{item.noticeTitle}}</view> |
|||
<view class="info"> |
|||
<text>{{common.getStr(item.noticeContent)}}</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!--加载更多提示--> |
|||
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |
|||
|
|||
<wxs module="common"> |
|||
module.exports.getStr = function(content) { |
|||
return content.replace(getRegExp('<\/?.+?\/?>|[ ]','g'),'') |
|||
} |
|||
</wxs> |
|||
@ -1,120 +0,0 @@ |
|||
page { |
|||
background: #f7f7f7; |
|||
} |
|||
|
|||
/* 列表样式 */ |
|||
|
|||
.list-all { |
|||
/* width: calc(100% - 48rpx); |
|||
margin-left: 21rpx; |
|||
margin-top: 50rpx;*/ |
|||
width: 100%; |
|||
background-color: #fff; |
|||
} |
|||
|
|||
.list-all .list-item { |
|||
border-bottom: 1rpx solid #eaeaea; |
|||
margin-top: 16rpx; |
|||
padding: 40rpx 18rpx 30rpx 16rpx; |
|||
display: flex; |
|||
/* align-items: center; */ |
|||
} |
|||
|
|||
.list-all .list-item:first-child { |
|||
border-top: 1rpx solid #eaeaea; |
|||
} |
|||
|
|||
.list-all .list-item:last-child { |
|||
border-bottom: none; |
|||
} |
|||
|
|||
.list-all .list-item .item-info { |
|||
width: calc(100% - 220rpx); |
|||
height: 146rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.list-all .list-item .item-info .item-info-name { |
|||
width: calc(100% - 47rpx); |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: rgba(63, 63, 63, 1); |
|||
line-height: 50rpx; |
|||
display: -webkit-box; |
|||
-webkit-box-orient: vertical; |
|||
-webkit-line-clamp: 2; |
|||
overflow: hidden; |
|||
margin: 0 auto; |
|||
} |
|||
|
|||
.list-all .list-item .item-info .item-info-time { |
|||
width: calc(100% - 47rpx); |
|||
height: 22rpx; |
|||
position: absolute; |
|||
bottom: 5rpx; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
left: 22rpx; |
|||
} |
|||
|
|||
.list-all .list-item .item-info .item-info-time text { |
|||
font-size: 22rpx; |
|||
font-weight: 500; |
|||
color: rgba(170, 170, 170, 1); |
|||
line-height: 22rpx; |
|||
} |
|||
|
|||
.list-all .list-item image { |
|||
width: 220rpx; |
|||
height: 146rpx; |
|||
border-radius: 10rpx; |
|||
} |
|||
|
|||
.list-all .list-item .label { |
|||
position: absolute; |
|||
z-index: 999; |
|||
width: 34rpx; |
|||
height: 34rpx; |
|||
right: 45rpx; |
|||
} |
|||
|
|||
.list-all .list-item .label image { |
|||
position: absolute; |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
|
|||
.list-all .list-item-2 { |
|||
width: 100%; |
|||
padding: 40rpx 28rpx; |
|||
margin-top: 16rpx; |
|||
background: #fff; |
|||
box-sizing: border-box; |
|||
} |
|||
|
|||
.list-all .list-item-2 .name { |
|||
font-size: 34rpx; |
|||
font-weight: 500; |
|||
color: rgba(51, 51, 51, 1); |
|||
line-height: 50rpx; |
|||
} |
|||
|
|||
.list-all .list-item-2 .info { |
|||
margin-top: 15rpx; |
|||
font-size: 28rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: rgba(153, 153, 153, 1); |
|||
} |
|||
|
|||
.list-all .list-item-2 .info text { |
|||
line-height: 46rpx; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
word-wrap: break-word; |
|||
display: -webkit-box; |
|||
-webkit-line-clamp: 2; |
|||
-webkit-box-orient: vertical; |
|||
font-size: 30rpx; |
|||
} |
|||
@ -1,110 +0,0 @@ |
|||
// subpages/home/pages/noticeNew/noticeNew.js
|
|||
const api = require('../../../../utils/understandJs') |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
pageIndex: 1, |
|||
pageSize: 10, |
|||
noticeCategory: 'notice_navigation_hot',// 通知:notice_navigation_new
|
|||
noticelist: [], |
|||
// selectTab: 'tab1',
|
|||
nodata: false, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}, |
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
noticeCategory: options.modulecode |
|||
}) |
|||
wx.setNavigationBarTitle({ |
|||
title: options.modulecode == 'notice_navigation_hot' ? '最热政策' : options.modulecode == 'notice_navigation_new' ? '最新通知' : '' |
|||
}) |
|||
this.noticelist(); |
|||
}, |
|||
|
|||
// 加载网格长管辖的网格列表
|
|||
noticelist() { |
|||
let that = this |
|||
|
|||
let params = { |
|||
pageIndex: that.data.pageIndex, |
|||
pageSize: that.data.pageSize, |
|||
noticeCategory: that.data.noticeCategory |
|||
} |
|||
|
|||
api.noticelist(params).then(res => { |
|||
that.setData({ |
|||
noticelist: that.data.noticelist.concat(res.data), |
|||
loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none', |
|||
loadMoreVisible: res.data.length === that.data.pageSize ? false : true |
|||
}) |
|||
if (that.data.noticelist.length == 0) {//没有值
|
|||
that.setData({ |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
} |
|||
}).catch(err => { |
|||
that.setData({ |
|||
noticelist: [], |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
|
|||
// tab 切换
|
|||
//模块编码(政策导航-最热政策:notice_navigation_hot、了解锦水-印象:notice_impression、了解锦水-味道:notice_taste、政策导航-最新通知: notice_navigation_new、了解锦水-警示:notice_warning)
|
|||
// onTabChange(e) {
|
|||
// if (e.currentTarget.dataset.tab == 'tab1') {
|
|||
// this.setData({
|
|||
// noticeCategory: 'notice_navigation_hot',
|
|||
// })
|
|||
// } else {
|
|||
// this.setData({
|
|||
// noticeCategory: 'notice_navigation_new',
|
|||
// })
|
|||
// }
|
|||
// this.setData({
|
|||
// selectTab: e.currentTarget.dataset.tab,
|
|||
// pageIndex: 1,
|
|||
// pageSize: 10,
|
|||
// noticelist: [],
|
|||
// loadMoreType: 'loading',
|
|||
// loadMoreVisible: true,
|
|||
// nodata: false,
|
|||
// })
|
|||
|
|||
// this.noticelist();
|
|||
// },
|
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.setData({ |
|||
loadMoreVisible: true |
|||
}) |
|||
if (this.data.loadMoreType === 'loading') { |
|||
this.setData({ |
|||
pageIndex: this.data.pageIndex + 1, |
|||
pageSize: this.data.pageSize, |
|||
}) |
|||
this.noticelist(); |
|||
} |
|||
}, |
|||
|
|||
toDetail(e) { |
|||
console.log(e.currentTarget.dataset.id) |
|||
wx.navigateTo({ url: '/subpages/home/pages/noticeDetail/noticeDetail?id=' + e.currentTarget.dataset.id +'&code=' + this.data.noticeCategory }) |
|||
} |
|||
}) |
|||
@ -1,7 +0,0 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"load-more": "../../../../components/loadMore/loadMore", |
|||
"no-data":"../../../../components/nodata/nodata" |
|||
}, |
|||
"navigationBarTitleText": "" |
|||
} |
|||
@ -1,25 +0,0 @@ |
|||
<!-- tabbar --> |
|||
<!-- <view class="tab-bar"> |
|||
<view class="tab tab1 {{selectTab === 'tab1' ? 'select-tab' : ''}}" data-tab="tab1" bindtap="onTabChange">最热政策 |
|||
</view> |
|||
<view class="tab tab2 {{selectTab === 'tab2' ? 'select-tab' : ''}}" data-tab="tab2" bindtap="onTabChange">最新通知 |
|||
</view> |
|||
<view class="select-bar {{selectTab === 'tab1' ? 'tab1' : 'tab2'}}"></view> |
|||
</view> --> |
|||
<!-- 列表 --> |
|||
<view class="list-lu" wx:if="{{noticelist.length > 0}}"> |
|||
<view class="list-li" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{noticelist}}" |
|||
bindtap="toDetail" data-id="{{item.id}}"> |
|||
<view class="item-name">{{item.noticeTitle}}</view> |
|||
<view class="item-info"> |
|||
<image src="../../images/ic_zhengce.png" /> |
|||
<view class="street">{{item.deptName}}</view> |
|||
<view class="time">{{item.noticeTime}}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<!--加载更多提示--> |
|||
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |
|||
@ -1,96 +0,0 @@ |
|||
page { |
|||
background: #f7f7f7; |
|||
} |
|||
|
|||
.tab-bar { |
|||
width: 100%; |
|||
height: 80rpx; |
|||
background: #fff; |
|||
display: flex; |
|||
justify-content: space-around; |
|||
position: relative; |
|||
} |
|||
|
|||
.tab-bar .tab { |
|||
flex: 1; |
|||
height: 80rpx; |
|||
line-height: 80rpx; |
|||
text-align: center; |
|||
width: 50%; |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: rgba(153, 153, 153, 1); |
|||
} |
|||
|
|||
.tab-bar .select-tab { |
|||
color: #b20004; |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.tab-bar .select-bar { |
|||
width: 40rpx; |
|||
height: 8rpx; |
|||
border-radius: 5rpx; |
|||
background: #b20004; |
|||
position: absolute; |
|||
bottom: 0rpx; |
|||
} |
|||
|
|||
.tab-bar .select-bar.tab1 { |
|||
left: calc(25% - 15rpx); |
|||
transition: left linear 0.4s; |
|||
} |
|||
|
|||
.tab-bar .select-bar.tab2 { |
|||
left: calc(75% - 15rpx); |
|||
transition: left linear 0.4s; |
|||
} |
|||
|
|||
/* 列表样式 */ |
|||
.list-lu .list-li:first-child { |
|||
margin-top: 27rpx; |
|||
} |
|||
|
|||
.list-li { |
|||
width: 100%; |
|||
background: #fff; |
|||
padding: 38rpx 30rpx; |
|||
margin-top: 16rpx; |
|||
box-sizing: border-box; |
|||
} |
|||
|
|||
.list-li .item-name { |
|||
width: 100%; |
|||
font-size: 34rpx; |
|||
font-weight: 500; |
|||
color: rgba(51, 51, 51, 1); |
|||
line-height: 52rpx; |
|||
} |
|||
|
|||
.list-li .item-info { |
|||
width: calc(100% - 60rpx); |
|||
height: 28rpx; |
|||
margin-top: 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
|
|||
.list-li .item-info image { |
|||
width: 28rpx; |
|||
height: 28rpx; |
|||
} |
|||
|
|||
.list-li .item-info .street { |
|||
margin-left: 11rpx; |
|||
font-size: 24rpx; |
|||
font-weight: 500; |
|||
color: rgba(153, 153, 153, 1); |
|||
} |
|||
|
|||
.list-li .item-info .time { |
|||
margin-left: 22rpx; |
|||
font-size: 24rpx; |
|||
font-weight: 500; |
|||
color: rgba(153, 153, 153, 1); |
|||
} |
|||
@ -1,42 +0,0 @@ |
|||
// subpages/oneKeyService/pages/search/search.js
|
|||
const api = require('../../../../utils/understandJs') |
|||
Page({ |
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
searchContent: '', |
|||
deptId: '', |
|||
historylist: [ |
|||
{ |
|||
label: '就业', |
|||
hot: true |
|||
}, |
|||
{ |
|||
label: '创业', |
|||
hot: false |
|||
} |
|||
] |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
console.log(options) |
|||
this.setData({ |
|||
searchContent: options.searchContent, |
|||
deptId: options.deptId |
|||
}) |
|||
}, |
|||
|
|||
bindInputValue (e) { |
|||
this.setData({ |
|||
searchContent: e.detail.value |
|||
}) |
|||
}, |
|||
|
|||
searchFile () { |
|||
|
|||
} |
|||
}) |
|||
@ -1,5 +0,0 @@ |
|||
{ |
|||
"usingComponents": { |
|||
}, |
|||
"navigationBarTitleText": "搜索" |
|||
} |
|||
@ -1,22 +0,0 @@ |
|||
<!--subpages/oneKeyService/pages/search/search.wxml--> |
|||
<view class="top"> |
|||
<view class="search"> |
|||
<view class="item-all"> |
|||
<view class="item-left"> |
|||
<image src="../../images/search.png"></image> |
|||
<input placeholder-class="placeholder-style" placeholder="输入档案关键字" bindinput="bindInputValue" value="{{searchContent}}"></input> |
|||
</view> |
|||
<button class="item-right" bindtap="searchFile" hover-class="none">搜索</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="history"> |
|||
<view |
|||
class="history-label {{item.hot?'hot-label':''}}" |
|||
wx:for="{{historylist}}" |
|||
wx:for-index="index" |
|||
wx:for-item="item" |
|||
wx:key="index"> |
|||
{{item.label}} |
|||
</view> |
|||
</view> |
|||
@ -1,96 +0,0 @@ |
|||
/* subpages/oneKeyService/pages/search/search.wxss */ |
|||
page { |
|||
background: #fff; |
|||
} |
|||
|
|||
.top { |
|||
margin-top: 3rpx; |
|||
width: 100%; |
|||
height: 94rpx; |
|||
background: #fff; |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
|
|||
.search { |
|||
/* margin-top: 17rpx; */ |
|||
width: calc(100% - 60rpx); |
|||
height: 66rpx; |
|||
margin-left: 30rpx; |
|||
background: rgba(242, 242, 242, 1); |
|||
border-radius: 33rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.search .item-all { |
|||
height: 30rpx; |
|||
width: 100%; |
|||
width: calc(100% - 60rpx); |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.search .item-all .item-left { |
|||
/* background: red; */ |
|||
width: calc(100% - 73rpx); |
|||
height: 30rpx; |
|||
border-right: 1rpx solid #BFBFBF; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.search .item-all .item-left image { |
|||
width: 30rpx; |
|||
height: 28rpx; |
|||
} |
|||
|
|||
.search .item-all .item-left input { |
|||
width: calc(100% - 41rpx); |
|||
height: 30rpx; |
|||
font-size: 28rpx; |
|||
color: #333; |
|||
} |
|||
|
|||
.placeholder-style { |
|||
font-size: 28rpx; |
|||
font-weight: 500; |
|||
color: rgba(168, 168, 168, 1); |
|||
} |
|||
|
|||
.search .item-all .item-right { |
|||
font-size: 28rpx; |
|||
font-weight: 500; |
|||
color: rgba(51, 51, 51, 1); |
|||
background-color: rgba(242, 242, 242, 1); |
|||
} |
|||
|
|||
button { |
|||
width: 100rpx; |
|||
height: 58rpx; |
|||
padding: 0; |
|||
border-radius: 0; |
|||
line-height: 58rpx; |
|||
} |
|||
|
|||
button::after { |
|||
border-radius: 0px; |
|||
border: none; |
|||
} |
|||
|
|||
.history { |
|||
padding-left: 30rpx; |
|||
} |
|||
.history-label { |
|||
width: 100rpx; |
|||
border-radius: 25rpx; |
|||
text-align: center; |
|||
height: 50rpx; |
|||
background-color: lightgray; |
|||
} |
|||
.hot-label { |
|||
background-color: lightblue; |
|||
} |
|||
@ -1,196 +0,0 @@ |
|||
// subpages/understandJs/pages/warning/warning.js
|
|||
const api = require('../../../../utils/understandJs') |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
pageIndex: 1, |
|||
pageSize: 10, |
|||
noticelist: [], |
|||
nodata: false, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
noticeCategory: '',//模块编码(政策导航-最热政策:notice_navigation_hot、了解锦水-印象:notice_impression、了解锦水-味道:notice_taste、政策导航-最新通知: notice_navigation_new、了解锦水-警示:notice_warning)
|
|||
noticeContentNew:'', |
|||
swiperBannerList: [], |
|||
indicatorDots: false, //指示点
|
|||
autoplay: true, //true,//自动播放
|
|||
circular: true, //衔接滑动
|
|||
interval: 5000, //自动播放间隔时长(ms)
|
|||
duration: 500, //幻灯片切换时长(ms)
|
|||
currentSwiper: 0, |
|||
showTitle: true, //视频标题
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
noticeCategory:options.modulecode |
|||
}) |
|||
if(options.modulecode == 'notice_impression'){ |
|||
wx.setNavigationBarTitle({ |
|||
title: '锦水印象' |
|||
}) |
|||
}else if(options.modulecode == 'notice_zcwsc'){ |
|||
this.getBannerList('4') |
|||
wx.setNavigationBarTitle({ |
|||
title: '众创卫生城' |
|||
}) |
|||
}else if(options.modulecode == 'notice_aq'){ |
|||
this.getBannerList('5') |
|||
wx.setNavigationBarTitle({ |
|||
title: '安全365' |
|||
}) |
|||
}else if(options.modulecode == 'notice_cgjj'){ |
|||
this.getBannerList('6') |
|||
wx.setNavigationBarTitle({ |
|||
title: '城管聚焦' |
|||
}) |
|||
}else if(options.modulecode == 'notice_jwgk'){ |
|||
// this.getBannerList('6')
|
|||
wx.setNavigationBarTitle({ |
|||
title: '居务公开' |
|||
}) |
|||
}else{ |
|||
this.getBannerList('2') |
|||
wx.setNavigationBarTitle({ |
|||
title: '锦水警事' |
|||
}) |
|||
} |
|||
|
|||
this.noticelist() |
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.setData({ |
|||
loadMoreVisible: true |
|||
}) |
|||
if (this.data.loadMoreType === 'loading') { |
|||
this.setData({ |
|||
pageIndex: this.data.pageIndex + 1, |
|||
pageSize: this.data.pageSize, |
|||
}) |
|||
this.noticelist(); |
|||
} |
|||
}, |
|||
|
|||
noticelist() { |
|||
let that = this; |
|||
let params = { |
|||
pageIndex: that.data.pageIndex, |
|||
pageSize: that.data.pageSize, |
|||
noticeCategory: that.data.noticeCategory, |
|||
} |
|||
api.noticelist(params).then(function (res) { //了解锦水-模块管理接口
|
|||
let noticelistObj = {} |
|||
let noticelistItem = [] |
|||
for(var i = 0; i < res.data.length; i++){ |
|||
noticelistObj= res.data[i] |
|||
noticelistObj.noticeContentNew = res.data[i].noticeContent.replace(/<img/gi, '<img style="display:none" '); |
|||
noticelistItem.push(noticelistObj) |
|||
} |
|||
that.setData({ |
|||
noticelist: that.data.noticelist.concat(noticelistItem), |
|||
loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none', |
|||
loadMoreVisible: res.data.length === that.data.pageSize ? false : true |
|||
}) |
|||
if (that.data.noticelist.length == 0) {//没有值
|
|||
that.setData({ |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
} |
|||
}).catch(err => { |
|||
that.setData({ |
|||
noticelist: [], |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
|
|||
//跳转倒详情页面
|
|||
toDetail(e){ |
|||
wx.navigateTo({ |
|||
url: `../noticeDetail/noticeDetail?id=${e.currentTarget.dataset.id}&modulecode=${this.data.noticeCategory}` |
|||
}) |
|||
}, |
|||
|
|||
getBannerList: function(bannerNum) { |
|||
let that = this |
|||
api.bannerList(bannerNum).then(function(res) { |
|||
// console.log('res==', res.data)
|
|||
that.setData({ |
|||
swiperBannerList: res.data |
|||
}) |
|||
}) |
|||
}, |
|||
swiperChange: function(e) { |
|||
wx.createVideoContext('video'+this.data.currentSwiper).pause() |
|||
this.setData({ |
|||
currentSwiper: e.detail.current, |
|||
autoplay: true |
|||
}) |
|||
}, |
|||
bindplay() { |
|||
this.setData({ |
|||
autoplay: false |
|||
}) |
|||
wx.getNetworkType({ |
|||
success (res) { |
|||
const networkType = res.networkType |
|||
if (res.networkType != 'wifi') { |
|||
wx.showToast({ |
|||
title: '当前为非WI-FI环境,请注意流量消耗', |
|||
icon: 'none', |
|||
duration: 3000 |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
bindended() { |
|||
this.setData({ |
|||
autoplay: true |
|||
}) |
|||
}, |
|||
bindcontrolstoggle(e) { |
|||
this.setData({ |
|||
showTitle: e.detail.show |
|||
}) |
|||
}, |
|||
// swiperChange2: function(e) {
|
|||
// this.setData({
|
|||
// 'options2.currentSwiper': e.detail.current,
|
|||
// currentIndex: e.detail.current
|
|||
// })
|
|||
// },
|
|||
// 跳转到banner详情
|
|||
//navigatetoBannerDetail(e) {
|
|||
// const {
|
|||
// id,
|
|||
// url,
|
|||
// newsflag
|
|||
// } = e.currentTarget.dataset
|
|||
// console.log(id, url, newsflag)
|
|||
// if (newsflag == '0') {
|
|||
// wx.navigateTo({
|
|||
// url: `/subpages/home/pages/webview/webview?url=${url}`
|
|||
// })
|
|||
// } else if (newsflag == '1') {
|
|||
// wx.navigateTo({
|
|||
// url: `/subpages/home/pages/newsDetail/newsDetail?id=${id}`
|
|||
// })
|
|||
// }
|
|||
//}
|
|||
}) |
|||
@ -1,7 +0,0 @@ |
|||
{ |
|||
"navigationBarTitleText": "", |
|||
"usingComponents": { |
|||
"load-more": "../../../../components/loadMore/loadMore", |
|||
"no-data":"../../../../components/nodata/nodata" |
|||
} |
|||
} |
|||
@ -1,54 +0,0 @@ |
|||
<!-- banner swiperBannerList --> |
|||
<view class="banner" wx:if="{{swiperBannerList.length>0}}"> |
|||
<view class="page-section page-section-spacing swiper"> |
|||
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperChange"> |
|||
<block wx:for="{{swiperBannerList}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
|||
<swiper-item> |
|||
<view data-banner="{{item}}"> |
|||
<view class="swiper-item" data-id="{{item.id}}"> |
|||
<!-- <view class="altitle"> |
|||
<view class="altitle-name">{{item.title}}</view> |
|||
</view> --> |
|||
<image wx:if="{{item.imgUrl}}" class="banner" src='{{item.imgUrl}}' mode="aspectFill" /> |
|||
<block wx:elif="{{item.videoUrl}}"> |
|||
<video id="video{{index}}" class="banner" src="{{item.videoUrl}}" title="{{item.title}}" bindcontrolstoggle="bindcontrolstoggle" bindpause="bindended" bindplay='bindplay' bindended='bindended'/> |
|||
<view class="video-title" hidden="{{!showTitle}}">{{item.title}}</view> |
|||
</block> |
|||
</view> |
|||
</view> |
|||
</swiper-item> |
|||
</block> |
|||
</swiper> |
|||
<!-- 重置小圆点的样式 --> |
|||
<view class="dots"> |
|||
<block wx:for="{{ swiperBannerList }}" wx:key="index"> |
|||
<view class="dot {{index == currentSwiper ? ' active' : '' }}"></view> |
|||
</block> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="list-item" |
|||
wx:if="{{noticelist.length > 0}}" |
|||
wx:for-index="index" |
|||
wx:for-item="item" |
|||
wx:key="index" |
|||
wx:for="{{noticelist}}" |
|||
bindtap="toDetail" |
|||
data-id="{{item.id}}"> |
|||
<view class="name">{{item.noticeTitle}}</view> |
|||
<view class="info"> |
|||
<!-- <rich-text space="nbsp" nodes="{{item.noticeContentNew}}"></rich-text> --> |
|||
<text>{{common.getStr(item.noticeContentNew)}}</text> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<!--加载更多提示--> |
|||
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> |
|||
|
|||
<no-data isShow="{{nodata}}"></no-data> |
|||
<wxs module="common"> |
|||
module.exports.getStr = function(content) { |
|||
return content.replace(getRegExp('<\/?.+?\/?>|[ ]','g'),'') |
|||
} |
|||
</wxs> |
|||