作者 吴孟雨

暂存

正在显示 50 个修改的文件 包含 2130 行增加664 行删除
... ... @@ -213,7 +213,7 @@ App({
let Y = over.getFullYear() + '.' + (month > 9 ? month : ('0' + month)) + '.' + (day > 9 ? day : ('0' + day));
let H = (hours > 9 ? hours - hour_num : ('0' + hours - hour_num)) + ':' + (minutes > 9 ? minutes : ('0' + minutes));
let time = [];
console.log('Y,H,month', Y, H,month);
// console.log('Y,H,month', Y, H,month);
time.push(Y,H);
let new_time = time.join(' ');
return new_time;
... ...
... ... @@ -21,7 +21,8 @@
"pages/my/about/about",
"pages/meal/meal",
"pages/order/complain/complain",
"pages/order/order-detail/order-detail"
"pages/order/order-detail/order-detail",
"pages/comment/comment"
],
"window": {
"backgroundTextStyle": "light",
... ...
@font-face {font-family: "iconfont";
src: url('//at.alicdn.com/t/font_961048_fflo66h0q25.eot?t=1545961536104'); /* IE9*/
src: url('//at.alicdn.com/t/font_961048_fflo66h0q25.eot?t=1545961536104#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff;charset=utf-8;base64,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') format('woff'),
url('//at.alicdn.com/t/font_961048_fflo66h0q25.ttf?t=1545961536104') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('//at.alicdn.com/t/font_961048_fflo66h0q25.svg?t=1545961536104#iconfont') format('svg'); /* iOS 4.1- */
src: url('//at.alicdn.com/t/font_961048_kzif4jn6os.eot?t=1546407359461'); /* IE9*/
src: url('//at.alicdn.com/t/font_961048_kzif4jn6os.eot?t=1546407359461#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff;charset=utf-8;base64,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') format('woff'),
url('//at.alicdn.com/t/font_961048_kzif4jn6os.ttf?t=1546407359461') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('//at.alicdn.com/t/font_961048_kzif4jn6os.svg?t=1546407359461#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
... ... @@ -15,12 +15,22 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-shoucang1:before { content: "\e60a"; }
.icon-zan1:before { content: "\e64f"; }
.icon-z-likeFill:before { content: "\e6c1"; }
.icon-jia:before { content: "\e6a9"; }
.icon-shoucang2:before { content: "\e63b"; }
.icon-fenxiang2:before { content: "\e61e"; }
.icon-arrow-down:before { content: "\e63d"; }
.icon-shoucang3:before { content: "\e645"; }
.icon-xiangxia:before { content: "\e614"; }
.icon-zan:before { content: "\e870"; }
... ...
... ... @@ -9,7 +9,31 @@ Page({
images: [],
images_params:[],
type_picker_list:[],
start_time:app.nowDate()
start_time:app.nowDate(),
title:'',
content:'',
min_num:'',
max_num:'',
date:'',
time:'',
address:'',
address_position:'',
over_time:'',
is_showRelease_modal:false,
},
//查看我的发布
goMyRelease() {
wx.redirectTo({url:'/pages/activity/detail/detail?id=' + this.data.id})
},
//完成按钮
goBack() {
wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 1})
},
disableScroll() {
},
handleBackground() {
console.log('dianji');
this.setData({is_showRelease_modal:false,})
},
//输入标题
inputTitle(e) {
... ... @@ -25,7 +49,11 @@ Page({
},
//输入最高人数
inputMaxNum(e) {
this.setData({max_num:e.detail.value})
this.setData({max_num:e.detail.value});
if(this.data.min_num>this.data.max_num) {
wx.showToast({title:'最低人数不能高于最高人数',icon:'none'});
this.setData({max_num:''});
}
},
//输入地点
inputAddress(e) {
... ... @@ -74,6 +102,29 @@ Page({
//确定发布
confirmRelease(e) {
console.log('e', e,e.detail.formId);
if(this.data.title === '') {
wx.showToast({title:'请填写标题',icon:'none'})
}else if(this.data.content === '') {
wx.showToast({title:'请填写描述',icon:'none'})
}else if(this.data.images_params.length === 0) {
wx.showToast({title:'请上传图片',icon:'none'})
}else if (this.data.min_num === '') {
wx.showToast({title:'请填写最低人数',icon:'none'})
}else if (this.data.max_num === '') {
wx.showToast({title:'请填写最高人数',icon:'none'})
}else if(this.data.current_type === undefined) {
wx.showToast({title:'请选择类别',icon:'none'})
}else if(this.data.date === '') {
wx.showToast({title:'请选择日期',icon:'none'})
}else if(this.data.time === '') {
wx.showToast({title:'请选择时间',icon:'none'})
}else if(this.data.address === '') {
wx.showToast({title:'请填写地点',icon:'none'})
}else if(this.data.address_position === '') {
wx.showToast({title:'请定位地址',icon:'none'})
}else if(this.data.over_time === '') {
wx.showToast({title:'请填写截止时间',icon:'none'})
}else {
this.data.type_list.forEach((item,index) => {
if(this.data.current_type === index) {
// console.log('index', index, item.id);
... ... @@ -99,17 +150,22 @@ Page({
address: this.data.address_position,
latng: this.data.latng,
over_time:this.data.over_time,// 报名截止时间
formId: e.detail.formId,
// formId: e.detail.formId,
};
var list = [];
app.post(url, params, {}).then((res) => {
console.log('确定发布', res);
if(+res.code === 1 && res.message == '发布成功') {
this.setData({is_showRelease_modal:true,id:+res.data.id})
}else {
wx.showToast({title:res.message,icon:'none'})
}
// res.list.forEach((item) => {
// list.push(item.name)
// });
// console.log('list', list);
// this.setData({picker_list: list, student_list: res.list})
})
}
},
//上传图片
choose(e) { //这里是选取图片的方法
... ...
<!--pages/activity/activity.wxml-->
<form bindsubmit="confirmRelease" bindreset="formReset" report-submit="true">
<view class="content">
<!--<form bindsubmit="confirmRelease" bindreset="formReset" report-submit="true">-->
<view class="content">
<view class="input-box">
<input type="text" placeholder="标题" bindinput="inputTitle" maxlength="15" placeholder-class="placeholder"/>
<textarea maxlength="-1" type="text" placeholder="发布描述..." bindinput="inputContent"
... ... @@ -93,8 +93,18 @@
</view>
</view>
<button class="complete" form-type="submit">
<!--<button class="complete" form-type="submit">-->
<view class="complete" bindtap="confirmRelease">
<view class="btn">确定发布</view>
</button>
</view>
</form>
<!--</button>-->
</view>
<!--发布成功弹框-->
<view class="modal" wx:if="{{is_showRelease_modal}}" catchtouchmove="disableScroll">
<image class="sorry-img" src="../../images/success@2x.png"></image>
<view class="title">恭喜您发布成功</view>
<view class="view-btn" catchtap="goMyRelease">查看我的发布</view>
<view class="complete-btn" catchtap="goBack">完成</view>
</view>
<view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<!--</form>-->
... ...
... ... @@ -191,3 +191,68 @@
.complete::after {
border:0;
}
.modal {
width: 73%;
/* height: 1100rpx; */
background: #ffffff;
display: flex;
align-items: center;
flex-direction: column;
z-index:999;
position: fixed;
top: 48%;
left: 50%;
transform: translate(-50%,-50%);
padding: 46rpx 0rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-radius: 40rpx;
}
.modal image {
width: 110rpx;
height: 110rpx;
border-radius: 50%;
margin-bottom: 34rpx;
}
.modal .title {
color: #333333;
font-size: 36rpx;
margin-bottom: 46rpx;
}
.modal .tips {
color: #333333;
font-size: 24rpx;
margin-bottom: 26rpx;
}
.modal .view-btn {
height: 66rpx;
width: 364rpx;
border:1rpx solid #323232;
border-radius: 6rpx;
color:#323232;
text-align: center;
line-height: 66rpx;
font-size: 30rpx;
}
.modal .complete-btn {
width: 364rpx;
height: 66rpx;
background-color: #323232;
border-radius: 6rpx;
color:#E2C8B1;
font-size: 30rpx;
text-align: center;
line-height: 66rpx;
margin-top: 26rpx;
}
/*弹框样式*/
.modal_box {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 10;
background: rgba(0,0,0,0.3);
}
\ No newline at end of file
... ...
... ... @@ -9,33 +9,95 @@ Page({
*/
data: {
current_swiper:0,
slide: [{image: 'http://pk86rwhci.bkt.clouddn.com/banner.png'}, {image: 'http://pk86rwhci.bkt.clouddn.com/banner.png'}],
peopleList: [
{img:'../../../images/avatar@2x.png',name:'张丹'},
{img:'../../../images/avatar@2x.png',name:'Jony'},
{img:'../../../images/avatar@2x.png',name:'Beautiful life'},
{img:'../../../images/avatar@2x.png',name:'Beautiful life'},
{img:'../../../images/avatar@2x.png',name:'Beautiful life'},
{img:'../../../images/avatar@2x.png',name:'Beautiful life'},
{img:'../../../images/avatar@2x.png',name:'Beautiful life'},
{img:'../../../images/avatar@2x.png',name:'Beautiful life'},
{img:'../../../images/avatar@2x.png',name:'Beautiful life'},
{img:'../../../images/avatar@2x.png',name:'Beautiful life'},
{img:'../../../images/avatar@2x.png',name:'Beautiful life'},
{img:'../../../images/avatar@2x.png',name:'Beautiful life'},
],
slide: [],
peopleList: [],
num:1,
actEndTimeList: [],
is_zan:false,
},
// 问一问
ask(e) {
wx.navigateTo({url:'/pages/comment/comment?activity_id=' + this.data.detail_id
+ '&common_id=' + 0
})
// console.log('问',e.detail.value);
// this.setData({focus:true})
},
//回复
reply(e) {
const id = e.currentTarget.dataset.id;
wx.navigateTo({url:'/pages/comment/comment?is_reply=' + true
+ '&activity_id=' + this.data.detail_id + '&common_id=' + id
})
},
//收藏/取消收藏
collect() {
console.log('收藏');
let self = this;
let url = '/portal/Active/collection';
let url_del = '/portal/Active/delCollection';
let header = {
"XX-Token": wx.getStorageSync('token')
};
let params = {
token: wx.getStorageSync('token'),
activeId: self.data.detail_id,
};
if(self.data.is_collect) {
app.post(url_del, params, header).then((res) => {
console.log('取消收藏',res);
if(+res.code === 1) {
wx.showToast({title:res.message,icon:'none'});
self.setData({
is_collect: 0
});
}
})
}else {
app.post(url, params, header).then((res) => {
console.log('收藏',res);
if(+res.code === 1) {
wx.showToast({title:res.message,icon:'none'});
self.setData({
is_collect: 1
});
}
})
}
},
//点赞
clickZan(e) {
let self = this;
const id = e.currentTarget.dataset.id;
const index = e.currentTarget.dataset.index;
let url = '/portal/Active/perfect';
let header = {
"XX-Token": wx.getStorageSync('token')
};
let params = {
token: wx.getStorageSync('token'),
commonId: id,
};
app.post(url, params, {}).then((res) => {
console.log('点赞', res);
if (+res.code === 1) { //
wx.showToast({title:res.message,icon:'none'});
self.setData({
[`commentList[${index}].is_prefect`]: true,
[`commentList[${index}].prefect`]: +self.data.commentList[index].prefect +1,
});
// console.log('paise_user', paise_user);
}
})
},
swiperChange(e) {
// console.log(e);
this.setData({current_swiper: e.detail.current})
},
onPageScroll(e) {
console.log('页面滚动', e);
// console.log('页面滚动', e);
if(e.scrollTop > 140) {
this.setData({hidden_top:true})
}else if(e.scrollTop <=140){
... ... @@ -73,6 +135,7 @@ Page({
let url = '/portal/Active/activeDetail';
let params = {
activeId: self.data.detail_id,
token:wx.getStorageSync('token'),
};
let header = {
"token": wx.getStorageSync('token')
... ... @@ -84,10 +147,14 @@ Page({
detail: res.data.active,
end_time: res.data.active.time,
over_hours:res.data.active.over_time,//几小时截止
join_people: res.data.son,
commentList:res.data.common,
is_collect:res.data.is_collect,
count:res.data.count,
});
self.countDown();
}
wx.hideLoading()
// wx.hideLoading()
})
},
... ... @@ -135,7 +202,22 @@ Page({
// countDownList: countDownArr,
'detail.time': countDownArr,
});
console.log('time',this.data.detail.time);
// console.log('time',this.data.detail.time);
},
//导航
getNavigate() {
const self = this;
const arr = self.data.detail.latng.split();
console.log('arr', arr[0], arr[1]);
wx.openLocation({//​使用微信内置地图查看位置。
latitude: +arr[0],//要去的纬度-地址
longitude: +arr[1],//要去的经度-地址
// lat:39.086437,
// lng:117.122583,
name: "",
address: self.data.detail.address
})
},
/**
* 生命周期函数--监听页面加载
... ... @@ -143,7 +225,6 @@ Page({
onLoad: function (options) {
console.log('详情options', options);
this.setData({detail_id:+options.id?+options.id:''});
this.getDetail();
},
/**
... ... @@ -157,7 +238,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getDetail();
},
/**
... ... @@ -191,7 +272,27 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
let self = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '火柴西路', // 默认是小程序的名称(可以写slogan等)
path: '', // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function(res) {
if (res.errMsg == 'shareAppMessage:ok') {}
},
fail: function() {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function() {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
},
})
\ No newline at end of file
... ...
... ... @@ -10,13 +10,24 @@
</view>
<view class="right">
<view class="collect" bindtap="collect">
<view class="iconfont icon-shoucang"></view>
<view class="iconfont icon-shoucang" wx:if="{{!is_collect}}"></view>
<view class="iconfont icon-shoucang2" wx:if="{{is_collect}}"></view>
<text>收藏</text>
</view>
<view class="share" bindtap="share">
<!--&lt;!&ndash;未收藏&ndash;&gt;-->
<!--<view class='collect_box' catchtap='sethits_yes' data-index='{{index}}' wx:if='{{items.is_hits==0}}'>-->
<!--<text class='iconfont icon-shoucang1 '></text>-->
<!--<text class="collect_word">收藏</text>-->
<!--</view>-->
<!--&lt;!&ndash;已收藏&ndash;&gt;-->
<!--<view class='collect_box active' catchtap='sethits_no' data-index='{{index}}' wx:else>-->
<!--<text class='iconfont icon-shoucang0 star2'></text>-->
<!--<text class="collect_word">收藏</text>-->
<!--</view>-->
<button class="share" open-type="share">
<view class="iconfont icon-fenxiang2"></view>
<text>分享</text>
</view>
</button>
</view>
</view>
<swiper indicator-dots="{{false}}" current="{{current}}" bindchange="swiperChange"
... ... @@ -25,6 +36,7 @@
<navigator url="{{item}}" hover-class="navigator-hover">
<swiper-item>
<image src="{{item}}" class="slide-image"/>
<!--<image src="http://pk86rwhci.bkt.clouddn.com/banner.png" class="slide-image"></image>-->
</swiper-item>
</navigator>
</block>
... ... @@ -39,7 +51,7 @@
<!--地点-->
<view class="area-box">
<view class="title-box">
<view class="title">{{detail.address}}</view>
<view class="title">{{detail.title}}</view>
<view class="over-time">
<text class=''>{{detail.time[0].hou}}:{{detail.time[0].min}}:{{detail.time[0].sec}}</text>
后停止拼餐</view>
... ... @@ -52,28 +64,26 @@
<!--</view>-->
</view>
<view class="area-content">
<text>云峰山风景区坐落于密云水库北不老屯镇,燕落村北三公里,处于
密云区东西两大风景区之间,东靠密云古北口 ──司马台长城──
雾灵山风景区。</text>
<text>{{detail.content}}</text>
</view>
</view>
<!--详细时间-->
<view class="detail-box">
<text>时间:2018.04.08 17:30</text>
<text>餐厅:Opera Bombana</text>
<view class="position">
<text class="address">地址:侨福芳草地B2 OPERA BOMBANA</text>
<text>时间:{{end_time}}</text>
<text>餐厅:{{detail.addr}}</text>
<view class="position" bindtap="getNavigate">
<text class="address">地址:{{detail.address}}</text>
<text class="iconfont icon-location"></text>
</view>
<text>菜系:意大利菜</text>
<text>类别:{{detail.selectName}}</text>
</view>
<!--已加入人员-->
<view class="join-num">已加入人员</view>
<view class="people-list" wx:if="{{peopleList.length>0}}">
<view class="people" wx:for="{{peopleList}}" wx:key="index" bindtap="goPetDetail" data-id="{{item.id}}">
<view class="bg"><image src="{{item.img}}" class="people-img"></image></view>
<view class="people-list" wx:if="{{join_people.length>0}}">
<view class="people" wx:for="{{join_people}}" wx:key="index">
<view class="bg"><image src="{{item.pic}}" class="people-img"></image></view>
<view class="name">{{item.name}}</view>
</view>
</view>
... ... @@ -81,8 +91,8 @@
<!--留言板 问一问-->
<view class="comment-box">
<view class="title-box">
<text class="comment-num">留言板 (28)</text>
<view class="ask-btn">
<text class="comment-num">留言板 ({{count}})</text>
<view class="ask-btn" bindtap="ask">
<text class="iconfont icon-bianji"></text>
<text>问一问</text>
</view>
... ... @@ -90,34 +100,38 @@
<!--评论-->
<view class="comment-list-box">
<view class="comment-item">
<view class="comment-item" wx:for="{{commentList}}" wx:key="index" wx:for-item="comment">
<view class="top-content">
<view class="top-left">
<image src="../../../images/avatar@2x.png" class="release-img"></image>
<text>旦巴 2018-08-09</text>
<!--<image src="../../../images/avatar@2x.png" class="release-img"></image>-->
<image src="{{comment.userPic}}" class="release-img"></image>
<text>{{comment.userName}} {{comment.create_time}}</text>
</view>
<view class="top-right">
<text>20</text>
<text class="iconfont icon-zan"></text>
<view class="top-right" bindtap="clickZan" data-id="{{comment.id}}" data-index="{{index}}">
<text>{{comment.prefect}}</text>
<text class="iconfont icon-zan" wx:if="{{!comment.is_prefect}}"></text>
<text class="iconfont icon-z-likeFill" wx:if="{{comment.is_prefect}}"></text>
</view>
</view>
<view class="comment-detail">
<view class="user-release">
<view class="release-comment">第一次拼餐,心里还是比较兴奋的,但是又担心拼友会比较无 聊,但是没想到拼友和餐厅都非常好!绝对不会有无聊的时候。 整个旅途非常开心!</view>
<text class="reply-btn">回复</text>
<view class="release-comment">{{comment.content}}</view>
<text class="reply-btn" bindtap="reply" data-id="{{comment.id}}">回复</text>
</view>
<view class="user-reply">
<view class="user-reply" wx:if="{{comment.son.length>0}}">
<view class='triangle'></view>
<view class="comment">
<text class="reply-name">蚂蚁: </text>
<text>第一次拼餐,心里还是比较兴奋的,但是又担心拼友会比较无聊,但是没想到拼友和餐厅都非常好!</text>
</view>
<block wx:for="{{comment.son}}" wx:key="index">
<!--<view class="comment">-->
<!--<text class="reply-name">蚂蚁: </text>-->
<!--<text>{{item.content}}第一次拼餐,心里还是比较兴奋的,但是又担心拼友会比较无聊,但是没想到拼友和餐厅都非常好!</text>-->
<!--</view>-->
<view class="reply">
<text class="reply-name">旦巴</text>
<text class="reply-name">{{detail.userName}}</text>
<text>回复</text>
<text class="reply-name">蚂蚁:</text>
<text>第一次拼餐,心里还是比较兴奋的,但是又担心拼友会比较无聊,但是没想到拼友和餐厅都非常好!</text>
<text class="reply-name">{{comment.userName}}:</text>
<text>{{item.content}}</text>
</view>
</block>
</view>
</view>
</view>
... ...
... ... @@ -66,6 +66,17 @@
flex-direction: column;
align-items: center;
justify-content: space-between;
line-height: 34rpx;
/*height: 34rpx;*/
}
.share {
border-radius: 0;
margin: 0;
padding: 0;
background: transparent;
}
.share::after {
border:0;
}
.head .position .right .collect {
margin-right: 42rpx;
... ... @@ -74,6 +85,14 @@
font-size: 30rpx;
color: #ffffff;
}
.icon-shoucang2 {
color:#DA4F2A;
font-size: 30rpx;
}
.icon-z-likeFill {
color:#DC4E48;
/*font-size: ;*/
}
.icon-fenxiang2 {
font-size: 30rpx;
color: #ffffff;
... ... @@ -139,10 +158,12 @@ swiper {
font-size: 28rpx;
}
.area-box .title-box .over-time {
width: 34%;
color: #999999;
font-size: 22rpx;
}
.area-box .title-box .over-time text {
text-align: right;
color:#DA4F2A;
font-size: 24rpx;
margin-right: 18rpx;
... ... @@ -309,6 +330,7 @@ swiper {
color: #333333;
width: 138rpx;
margin-left: 30rpx;
text-align: right;
}
.user-reply {
padding: 20rpx 14rpx;
... ...
// pages/my/suggest/suggest.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
placeholder: '请输入您的评论',
content:'',
},
//
input(e) {
this.setData({content:e.detail.value})
},
//提交
submit(e) {
console.log('e', e,e.detail.formId);
if(this.data.content === '' ) {
wx.showToast({title:'请输入内容',icon:'none'})
}else {
let url = '/portal/Active/common';
let params = {
token:wx.getStorageSync('token'),
activeId:this.data.activity_id,
commonId: this.data.common_id,
content:this.data.content,
formId:e.detail.formId,
};
app.post(url,params,{}).then((res)=>{
console.log('提交评论',res);
if(+res.code === 1) {
wx.showToast({title:res.message,icon:'none',
success:function () {
setTimeout(function () {
wx.navigateBack({delta:1})
},500)
}
})
}
})
}
}
,
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
is_reply: options.is_reply ? options.is_reply : '',
activity_id: options.activity_id?options.activity_id:'',
common_id:options.common_id?options.common_id:'',
})
}
,
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
}
,
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
if (this.data.is_reply == 'true') {
wx.setNavigationBarTitle({title: '回复'});
this.setData({placeholder: '请输入您的回复'})
}
}
,
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
}
,
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
}
,
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
}
,
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
}
,
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "评论"
}
\ No newline at end of file
... ...
<!--pages/my/suggest/suggest.wxml-->
<form bindsubmit="submit" bindreset="formReset" report-submit="true">
<view class="content">
<!--<view class="title">意见反馈</view>-->
<view class="input">
<textarea name="" id="" cols="30" rows="10"
placeholder="{{placeholder}}" maxlength="200"
placeholder-class="placeholder" bindinput="input"
></textarea>
<view class="num">
<view class="iconfont icon-bianji"></view>
<text>限200字以内</text>
</view>
</view>
<!--<view class="btn-box" bindtap="submit">-->
<!--<view class="btn">提交</view>-->
<!--</view>-->
<button class="btn-box" form-type="submit">
<view class="btn">提交</view>
</button>
</view>
</form>
... ...
/* pages/my/suggest/suggest.wxss */
page {
width: 100%;
height: 100%;
background-color: #f2f2f2;
}
.content {
width: 100%;
height: 100%;
position: relative;
}
.title {
border-bottom: 1rpx solid #ebebeb;
padding: 28rpx 32rpx 28rpx 32rpx;
color:#292525;
font-size: 30rpx;
font-weight: bold;
}
.input {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 68rpx 32rpx 32rpx 32rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
position: relative;
}
textarea {
width:80%;
border-radius: 16rpx;
background-color: #ffffff;
height: 360rpx;
color: #666666;
font-size: 28rpx;
padding: 30rpx;
}
.placeholder {
color: #999999;
font-size: 28rpx;
}
.btn-box {
width: 100%;
padding: 0 32rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin-top: 102rpx;
}
.btn {
height: 98rpx;
color: #E1C8AF;
font-size: 30rpx;
background-color: #323232;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
}
.num {
position: absolute;
right:100rpx;
bottom:50rpx;
font-size: 24rpx;
color: #999999;
display: flex;
align-items: center;
}
.icon-bianji {
color: #999999;
font-size: 46rpx;
margin-right: 20rpx;
}
\ No newline at end of file
... ...
// pages/index/answer-question/answer-question.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {},
data: {
current_que: 0,
current_answer: 0,
choose: false,
},
clickQuestion(e) {
// console.log('e', e);
const current_que = +e.currentTarget.dataset.pindex;
const que_list = this.data.questionList;
// const choose = +e.currentTarget.dataset.choose;
que_list[current_que].choose = true;
this.setData({current_que: current_que, que_list: que_list});
console.log('父级点击事件que_list', que_list, current_que);
// return false
// this.radioChange(e)
},
//选择答案
chooseAnswer(e) {
const current = +e.currentTarget.dataset.index;
console.log(current);
this.setData({current:current})
const current = +e.currentTarget.dataset.sindex;
const pindex = +e.currentTarget.dataset.pindex;
const score = +e.currentTarget.dataset.score;
console.log('label事件分数', score);
this.setData({current_ans: current,});
// [`questionList[${this.data.current_que}].content[${current}].checked`]:!this.data.choose
},
radioChange(e) {
const current_index = e.detail.value;
const pindex = +e.currentTarget.dataset.pindex;//父级index
let que_arr = [];
this.data.questionList.forEach((item) => {
que_arr.push({...item, choose: false});
});
let answer = que_arr[pindex].content;
answer[current_index]['checked'] = true;
answer.forEach((item) => {
if (item.answer !== answer[current_index].answer) {
item.checked = false;
}
});
// if (this.data.current_answer === +e.detail.value) {
// answer[current_index]['checked'] = true;
// answer.forEach((item) => {
// if(item.answer !== answer[current_index].answer) {
// item.checked = false;
// }
// })
// }else {
// console.log('下一题answer', answer,current_index);
// answer[current_index]['checked'] = true;
// answer.forEach((item) => {
// if(item.answer !== answer[current_index].answer) {
// item.checked = false;
// }
// })
// }
this.setData({current_answer: +e.detail.value, [`questionList[${pindex}].content`]: answer});
console.log('questionList', this.data.questionList);
},
//题目列表
answerList() {
const self = this;
let url = '/portal/Send/index';
let params = {
token: wx.getStorageSync('token'),
};
let header = {
"token": wx.getStorageSync('token')
};
app.post(url, params, {}).then((res) => {
console.log('题目', res);
if (+res.code === 1) {
res.data.list.forEach(((item) => {
item.choose = false;
item.content.forEach((item) => {
item.checked = false
})
}));
self.setData({
questionList: res.data.list,
});
console.log(self.data.questionList);
}
})
},
//提交
submit() {
this.data.questionList.forEach((item) => {
if (item.choose === false) {
wx.showToast({title: '请答完所有的题', icon: 'none'});
} else {
this.setData({is_all_answer: true})
}
});
if (this.data.is_all_answer) {
let total_score = 0;
this.data.questionList.forEach((item) => {
item.content.forEach((i, index) => {
if (i.checked) {
const score = +i.score;
total_score += score;
}
})
});
console.log('total_score', total_score);
this.setData({score: total_score});
let url = '/portal/Send/answer';
let params = {
token: wx.getStorageSync('token'),
score: this.data.score,
};
app.post(url, params, {}).then((res) => {
console.log('提交答案', res);
if (+res.code === 1) {
// self.setData({
// questionList: res.data.list,
// });
// console.log(self.data.questionList);
}
});
console.log('111')
}
},
/**
* 生命周期函数--监听页面加载
... ... @@ -29,7 +147,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.answerList();
},
/**
... ...
... ... @@ -8,25 +8,45 @@
</view>
<view class="questions-box">
<view class="question-list">
<view class="question-item">
<view class="question">1. 周末更乐意选择哪种休闲方式?</view>
<view class="section" bindtap="chooseAnswer" data-index="0">
<text class="{{current===0?'active':''}}">A. 宅家补觉,看书看片</text>
<image src="../../../images/choose@2x.png" wx:if="{{current===0}}" class="img"></image>
</view>
<view class="section" bindtap="chooseAnswer" data-index="1">
<text class="{{current===1?'active':''}}">B. 户外郊游或运动</text>
<image src="../../../images/choose@2x.png" wx:if="{{current===1}}" class="img"></image>
</view>
<view class="section" bindtap="chooseAnswer" data-index="2">
<text class="{{current===2?'active':''}}">C. 朋友小聚,聚餐嗨皮</text>
<image src="../../../images/choose@2x.png" wx:if="{{current===2}}" class="img"></image>
<view class="question-item" wx:for="{{questionList}}" wx:key="index" wx:for-index="idx" data-pindex="{{idx}}" bindtap="clickQuestion" data-choose="{{item.choose}}">
<view class="question">{{idx+1}}. {{item.title}}</view>
<!--<view wx:for="{{item.content}}" wx:key="index" bindtap="chooseAnswer" data-score="{{item.score}}" data-sindex="{{index}}">-->
<!--<view class="section">-->
<!--<text class="{{current_que===idx&&current_ans===index?'active':''}}">{{index+1 === 1?'A':index+1 === 2?'B':index+1 === 3?'C':'D'}}. {{item.answer}}</text>-->
<!--<image src="../../../images/choose@2x.png" wx:if="{{current_que===idx&&current_ans===index}}" class="img"></image>-->
<radio-group class="section" bindchange="radioChange" data-pindex="{{idx}}">
<label class="radio" wx:for="{{item.content}}" wx:key="index" bindtap="chooseAnswer" data-score="{{item.score}}" data-sindex="{{index}}" data-pindex="{{idx}}">
<text class="{{item.checked?'active':''}}">{{index+1 === 1?'A':index+1 === 2?'B':index+1 === 3?'C':'D'}}. {{item.answer}}{{item.checked}}</text>
<radio value="{{index}}" checked="{{item.checked}}" color='#fff'/>
</label>
</radio-group>
<!--<checkbox-group class="section" bindchange="radioChange">-->
<!--<label class="radio" wx:for="{{item.content}}" wx:key="index" bindtap="chooseAnswer"-->
<!--data-score="{{item.score}}" data-sindex="{{index}}">-->
<!--<text class="{{item.checked?'active':''}}">{{index+1 === 1?'A':index+1 === 2?'B':index+1 ===-->
<!--3?'C':'D'}}. {{item.answer}}{{item.checked}}-->
<!--</text>-->
<!--<checkbox value="{{index}}" checked="{{item.checked}}" color='#fff'/>-->
<!--</label>-->
<!--</checkbox-group>-->
</view>
<view class="section" bindtap="chooseAnswer" data-index="3">
<text class="{{current===3?'active':''}}">D. 看展看演出/上课进修自我提升/参加活动认识新朋友</text>
<image src="../../../images/choose@2x.png" wx:if="{{current===3}}" class="img"></image>
</view>
<!--</view>-->
<!--</view>-->
<!--<view class="section" bindtap="chooseAnswer" data-index="1">-->
<!--<text class="{{current===1?'active':''}}">B. 户外郊游或运动</text>-->
<!--<image src="../../../images/choose@2x.png" wx:if="{{current===1}}" class="img"></image>-->
<!--</view>-->
<!--<view class="section" bindtap="chooseAnswer" data-index="2">-->
<!--<text class="{{current===2?'active':''}}">C. 朋友小聚,聚餐嗨皮</text>-->
<!--<image src="../../../images/choose@2x.png" wx:if="{{current===2}}" class="img"></image>-->
<!--</view>-->
<!--<view class="section" bindtap="chooseAnswer" data-index="3">-->
<!--<text class="{{current===3?'active':''}}">D. 看展看演出/上课进修自我提升/参加活动认识新朋友</text>-->
<!--<image src="../../../images/choose@2x.png" wx:if="{{current===3}}" class="img"></image>-->
<!--</view>-->
</view>
<!--<view class="question-item">-->
<!--<view class="question">1. 周末更乐意选择哪种休闲方式?</view>-->
... ... @@ -50,4 +70,8 @@
<!--</view>-->
</view>
</view>
<view class="btn" bindtap="submit">
<text>提交</text>
</view>
</view>
... ...
... ... @@ -39,7 +39,8 @@
}
.question-item .section {
display: flex;
align-items: center;
/*align-items: center;*/
flex-direction: column;
justify-content: flex-start;
}
.question-item .section text {
... ... @@ -55,3 +56,52 @@
.question-item .section .active {
color:#E2C8B1;
}
.btn {
width: 364rpx;
background-color: #323232;
color:#E2C8B1;
font-size: 30rpx;
border-radius: 6rpx;
text-align: center;
}
.btn text {
height: 66rpx;
line-height: 66rpx;
}
.checkbox {
display: flex;
/*align-items: center;*/
justify-content: space-between;
margin-bottom: 21rpx;
}
radio .wx-radio-input {
border: none;
color: #ffffff;
}
radio .wx-radio-input.wx-radio-input-checked{
border: none;
background: #ffffff;
}
/*选中后的对勾样式*/
radio .wx-radio-input.wx-radio-input-checked::before{
color: #E3CAB3;
background: #ffffff;
border: none;
}
checkbox .wx-checkbox-input {
border: none;
color: #ffffff;
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked{
border: none;
background: #ffffff;
}
/*选中后的对勾样式*/
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
color: #E3CAB3;
background: #ffffff;
border: none;
}
\ No newline at end of file
... ...
... ... @@ -20,18 +20,20 @@ Page({
{pic: '../../images/wutaiju@2x.png', name: '舞台剧'},
],
meal_banner: [
{pic: 'http://pk86rwhci.bkt.clouddn.com/banner.png',address:'Opera Bombana',time:'2018.4.28'},
{pic: 'http://pk86rwhci.bkt.clouddn.com/b1@2x%20%281%29.png',address:'Opera Bombana',time:'2018.4.28'},
{pic: 'http://pk86rwhci.bkt.clouddn.com/b1@2x%20%281%29.png',address:'Opera Bombana',time:'2018.4.28'},
{pic: 'http://pk86rwhci.bkt.clouddn.com/banner.png',address:'Opera Bombana',time:'2018.4.28'}],
{pic: 'http://pk86rwhci.bkt.clouddn.com/banner.png', address: 'Opera Bombana', time: '2018.4.28'},
{pic: 'http://pk86rwhci.bkt.clouddn.com/b1@2x%20%281%29.png', address: 'Opera Bombana', time: '2018.4.28'},
{pic: 'http://pk86rwhci.bkt.clouddn.com/b1@2x%20%281%29.png', address: 'Opera Bombana', time: '2018.4.28'},
{pic: 'http://pk86rwhci.bkt.clouddn.com/banner.png', address: 'Opera Bombana', time: '2018.4.28'}],
currentBannerIndex: 0,
tabcurrent: {tab: 0, bubble: ''},
noticeList: [],
is_showAnswer: false,
is_showUserInfo: false,
is_answer: true,
current_swiper:0,
page_number:1,
is_showRelease:false,
is_write:2,//1:已填写,2:未填写
is_answer: false,
current_swiper: 0,
page_number: 1,
motto: 'Hello World',
... ... @@ -45,24 +47,28 @@ Page({
},
//发布拼活动
releaseActivity() {
this.setData({is_showRelease:false,});
wx.navigateTo({
url: '/pages/activity/activity',
})
});
},
//发布拼餐
releaseMeal() {
this.setData({is_showRelease:false,});
wx.navigateTo({
url: '/pages/meal/meal',
})
},
//完善个人信息
goUserInfo() {
this.setData({is_showUserInfo: false});
wx.navigateTo({
url: '/pages/my/edit-info/edit-info',
})
},
//去答题
goAnswer() {
this.setData({is_showAnswer: false});
wx.navigateTo({
url: '/pages/index/answer-question/answer-question',
})
... ... @@ -71,12 +77,13 @@ Page({
},
handleBackground() {
console.log('dianji');
this.setData({is_showAnswer: false, is_showUserInfo: false,})
this.setData({is_showAnswer: false, is_showUserInfo: false,is_showRelease:false,})
},
//进入分类详情
goTypeDetail() {
goTypeDetail(e) {
const id = +e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/index/type-detail/type-detail',
url: '/pages/index/type-detail/type-detail?id=' + id,
})
},
//进入号外公告详情
... ... @@ -94,7 +101,7 @@ Page({
},
//进入拼餐详情
goMealDetail(e) {
console.log('拼餐详情e',e);
console.log('拼餐详情e', e);
const id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/meal/detail/detail?id=' + id,
... ... @@ -102,7 +109,7 @@ Page({
},
//进入拼活动详情
goActivityDetail(e) {
console.log('活动详情e',e);
console.log('活动详情e', e);
const id = e.detail.activity_id;
wx.navigateTo({
url: '/pages/activity/detail/detail?id=' + id,
... ... @@ -186,14 +193,21 @@ Page({
release(e) {
console.log('发布');
const self = this;
if (!self.data.is_answer) {
if (+self.data.is_write === 2 && wx.getStorageSync('is_canSend') === 2 ){ //没填写个人信息并且不可以发布 =>去填写
self.setData({
is_showAnswer: true
is_showUserInfo: true //弹出 去填写个人信息弹框
});
} else {
} else if(+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 2) { //已填写且不能发布=>去答题
self.setData({
is_showAnswer: true //弹出 去答题弹框
});
}else if(+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 1 && wx.getStorageSync('is_answer') === 1){ //已填写且可以发布 =>去发布
self.setData({
is_showUserInfo: true
is_showRelease: true //弹出 去答题弹框
});
}else {
wx.showToast({title:'等级不够,无法使用发布功能',icon:'none'})
}
},
//订单-导航
... ... @@ -237,7 +251,7 @@ Page({
type: 'wgs84', //返回可以用于wx.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息
success: function (res) {
console.log('获取当前经纬度', res);
self.setData({lat: res.latitude,lng:res.longitude});
self.setData({lat: res.latitude, lng: res.longitude});
// app.loginCallback();
// app.loginCallback = res => {
// console.log('show-callback-res', res);
... ... @@ -251,7 +265,7 @@ Page({
},
//获取首页内容
getIndex(res) {
console.log('token', res,wx.getStorageSync('token'));
console.log('token', res, wx.getStorageSync('token'));
const self = this;
let url = '/portal/Index/index';
let params = {
... ... @@ -265,20 +279,45 @@ Page({
};
app.post(url, params, {}).then((res) => {
console.log('获取首页', res);
if(+res.code === 1) {
if (+res.code === 1) {
self.setData({
slide: res.data.banner,
cate:res.data.cate,
china_city: res.data.city,
noticeList:res.data.extra,
meal_banner:res.data.meal,
items:res.data.active,
cate: res.data.cate,
china_city: res.data.city.city,
noticeList: res.data.extra,
meal_banner: res.data.meal,
items: res.data.active,
is_canSend:res.data.is_canSend,
});
wx.setStorageSync('is_canSend',res.data.is_canSend);//1:可以发布2:不可以发布
wx.setStorageSync('is_answer',res.data.is_answer);//1:已答题2:未答题
// is_answer
self._doRefreshMasonry(res.data.active);
// console.log(this.data.this_week_test_info);
}
})
},
//是否填写个人信息
getIsWrite() {
const self = this;
let url = '/portal/Send/isWrite';
let params = {
token: wx.getStorageSync('token'),
};
let header = {
"token": wx.getStorageSync('token')
};
app.post(url, params, {}).then((res) => {
console.log('是否填写个人信息', res);
if (+res.code === 1) {
self.setData({
is_write:res.data.is_write,//1:已填写2:未填写
});
wx.setStorageSync('is_write',res.data.is_write);//1:已填写2:未填写
// console.log(this.data.this_week_test_info);
}
})
},
onShow() {
this.getLat();//获取经纬度
// wx.chooseLocation({
... ... @@ -295,13 +334,14 @@ Page({
// })
console.log('index-show');
console.log(app.globalData.userInfo);
this.getIsWrite();
},
onPageScroll(e) {
// console.log('页面滚动', e);
if(e.scrollTop > 140) {
this.setData({hidden_top:true})
}else if(e.scrollTop <=140){
this.setData({hidden_top:false})
if (e.scrollTop > 140) {
this.setData({hidden_top: true})
} else if (e.scrollTop <= 140) {
this.setData({hidden_top: false})
}
},
});
... ...
... ... @@ -5,7 +5,7 @@
<view class="position {{hidden_top?'hidden-active':'visible-active'}}">
<view class="left">
<view class="iconfont icon-location"></view>
<text>天津</text>
<text>{{china_city}}</text>
<view class="iconfont icon-arrow-down"></view>
</view>
<view class="right" bindtap="search">
... ... @@ -19,7 +19,6 @@
<navigator url="{{item.link}}" hover-class="navigator-hover">
<swiper-item>
<!--<image src="{{item.pic}}" class="slide-image"/>-->
<!--写死的图-->
<image src="http://pk86rwhci.bkt.clouddn.com/banner.png" class="slide-image"/>
</swiper-item>
</navigator>
... ... @@ -35,7 +34,7 @@
<!--分类导航-->
<view class="padding-box">
<view class="navigator-box">
<view class="img-box" wx:for="{{cate}}" wx:key="index" bindtap="goTypeDetail" data-index="{{index}}">
<view class="img-box" wx:for="{{cate}}" wx:key="index" bindtap="goTypeDetail" data-id="{{item.id}}">
<!--<image src="{{item.pic}}"></image>-->
<!--<view class="text">{{item.name}}</view>-->
<image src="{{item.pic}}"></image>
... ... @@ -150,7 +149,9 @@
<view class="title">请先完善个人信息</view>
<view class="answer-btn" bindtap="goUserInfo">完成</view>
</view>
<view class="release-btn-box" wx:if="{{is_showUserInfo}}">
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<!--发布-->
<view class="release-btn-box" wx:if="{{is_showRelease}}">
<view class="left-btn" bindtap="releaseMeal">
<image src="../../images/pincan@2x.png"></image>
<view class="text">发布拼餐</view>
... ... @@ -160,5 +161,5 @@
<view class="text">发布拼活动</view>
</view>
</view>
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<view class="modal_box" wx:if="{{is_showRelease}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
</view>
... ...
... ... @@ -21,10 +21,19 @@ Page({
page_number:1,
hasMore:true,
},
goPostDetail() {
goPostDetail(e) {
const id = +e.currentTarget.dataset.id;
const type = +e.currentTarget.dataset.type;
console.log('type', type);
if(type === 1) { //1是活动,2是拼餐
wx.navigateTo({
url: '/pages/activity/detail/detail',
url: '/pages/activity/detail/detail?id=' + id,
})
}else {
wx.navigateTo({
url: '/pages/meal/detail/detail?id=' + id,
})
}
},
//搜索
search() {
... ... @@ -134,7 +143,8 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log('options', options);
this.setData({select_id:+options.id?+options.id:''})
},
/**
... ...
... ... @@ -78,7 +78,7 @@
<view class='content_box'>
<view class="no-data" wx:if="{{list.length === 0}}">暂无活动</view>
<view class='content_item' wx:for='{{list}}' wx:key="index" wx:if="{{list.length>0}}"
bindtap='goPostDetail' data-index="{{index}}">
bindtap='goPostDetail' data-id="{{item.id}}" data-type="{{item.type}}">
<!--<image src="http://pk86rwhci.bkt.clouddn.com/activity_img@2x.png"></image>-->
<image src="{{item.pic}}"></image>
<view class="title">
... ...
// pages/activity/detail/detail.js
const app = getApp();
var t = null;
Page({
/**
... ... @@ -22,16 +25,91 @@ Page({
{img:'../../../images/avatar@2x.png',name:'Beautiful life'},
],
num:1,
actEndTimeList: [],
is_zan:false,
},
// 问一问
ask(e) {
wx.navigateTo({url:'/pages/comment/comment?activity_id=' + this.data.detail_id
+ '&common_id=' + 0
})
// console.log('问',e.detail.value);
// this.setData({focus:true})
},
//回复
reply(e) {
const id = e.currentTarget.dataset.id;
wx.navigateTo({url:'/pages/comment/comment?is_reply=' + true
+ '&activity_id=' + this.data.detail_id + '&common_id=' + id
})
},
//收藏/取消收藏
collect() {
console.log('收藏');
let self = this;
let url = '/portal/Active/collection';
let url_del = '/portal/Active/delCollection';
let header = {
"XX-Token": wx.getStorageSync('token')
};
let params = {
token: wx.getStorageSync('token'),
activeId: self.data.detail_id,
};
if(self.data.is_collect) {
app.post(url_del, params, header).then((res) => {
console.log('取消收藏',res);
if(+res.code === 1) {
wx.showToast({title:res.message,icon:'none'});
self.setData({
is_collect: 0
});
}
})
}else {
app.post(url, params, header).then((res) => {
console.log('收藏',res);
if(+res.code === 1) {
wx.showToast({title:res.message,icon:'none'});
self.setData({
is_collect: 1
});
}
})
}
},
//点赞
clickZan(e) {
let self = this;
const id = e.currentTarget.dataset.id;
const index = e.currentTarget.dataset.index;
let url = '/portal/Active/perfect';
let header = {
"XX-Token": wx.getStorageSync('token')
};
let params = {
token: wx.getStorageSync('token'),
commonId: id,
};
app.post(url, params, {}).then((res) => {
console.log('点赞', res);
if (+res.code === 1) { //
wx.showToast({title:res.message,icon:'none'});
self.setData({
[`commentList[${index}].is_prefect`]: true,
[`commentList[${index}].prefect`]: +self.data.commentList[index].prefect +1,
});
// console.log('paise_user', paise_user);
}
})
},
swiperChange(e) {
// console.log(e);
this.setData({current_swiper: e.detail.current})
},
onPageScroll(e) {
console.log('页面滚动', e);
// console.log('页面滚动', e);
if(e.scrollTop > 140) {
this.setData({hidden_top:true})
}else if(e.scrollTop <=140){
... ... @@ -62,13 +140,153 @@ Page({
num: num
});
},
//获取详情
getDetail() {
const self = this;
console.log('city',self.data.city);
let url = '/portal/Active/mealDetail';
let params = {
token:wx.getStorageSync('token'),
activeId: self.data.detail_id,
};
let header = {
"token": wx.getStorageSync('token')
};
app.post(url, params, {}).then((res) => {
console.log('获取详情', res);
if (+res.code === 1) {
self.setData({
detail: res.data.active,
end_time: res.data.active.time,
over_hours:res.data.active.over_time,//几小时截止
join_people: res.data.son,
commentList:res.data.common,
is_collect:res.data.is_collect,
count:res.data.count,
});
self.countDown();
}
wx.hideLoading()
})
},
//确认拼餐
confirmJoin() {
const self = this;
let url = '/portal/Active/join';
let params = {
token: wx.getStorageSync('token'),
number: self.data.num,
activeId: self.data.detail_id,
};
let header = {
"token": wx.getStorageSync('token')
};
app.post(url, params, {}).then((res) => {
console.log('确认拼餐', res);
if (+res.code === 1) {
wx.showToast({title:'拼餐成功',icon:'success'})
// self.setData({
// detail: res.data.active,
// end_time: res.data.active.time,
// over_hours:res.data.active.over_time,//几小时截止
// join_people: res.data.son,
// commenList:res.data.common
// });
// self.countDown();
}
})
},
timeFormat(param) { //小于10的格式化函数
return param < 10 ? '0' + param : param;
},
countDown() { //倒计时函数
// 获取当前时间,同时得到活动结束时间数组
t = setTimeout(this.countDown, 1000);
let newTime = new Date().getTime();//当前时间戳
let end_time = app.nextTime(this.data.end_time, this.data.over_hours);//截止时间
let endTime = new Date(end_time).getTime(); //截止时间戳
let countDownArr = [];
// 对结束时间进行处理渲染到页面
let obj = null;
// 如果活动未结束,对时间进行处理
if (endTime - newTime > 0) {
let time = (endTime - newTime) / 1000;
// 获取天、时、分、秒
let day = parseInt(time / (60 * 60 * 24));
let hou = parseInt(time % (60 * 60 * 24) / 3600);
let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
obj = {
day: this.timeFormat(day),
hou: this.timeFormat(hou),
min: this.timeFormat(min),
sec: this.timeFormat(sec)
};
t;
} else { //活动已结束,全部设置为'00'
obj = {
day: '00',
hou: '00',
min: '00',
sec: '00'
};
clearTimeout(t)
}
countDownArr.push(obj);
// 渲染,然后每隔一秒执行一次倒计时函数
this.setData({
// countDownList: countDownArr,
'detail.time': countDownArr,
});
// console.log('time',this.data.detail.time);
},
//导航
getNavigate() {
const self = this;
const arr = self.data.detail.latng.split();
console.log('arr', arr[0], arr[1]);
wx.openLocation({//​使用微信内置地图查看位置。
latitude: +arr[0],//要去的纬度-地址
longitude: +arr[1],//要去的经度-地址
// lat:39.086437,
// lng:117.122583,
name: "",
address: self.data.detail.address
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log('详情options', options);
this.setData({detail_id:+options.id?+options.id:''});
},
onShareAppMessage: function() {
let self = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '火柴西路', // 默认是小程序的名称(可以写slogan等)
path: '', // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function(res) {
if (res.errMsg == 'shareAppMessage:ok') {}
},
fail: function() {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function() {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ... @@ -80,7 +298,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getDetail();
},
/**
... ... @@ -94,7 +312,7 @@ Page({
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
clearTimeout(t)
},
/**
... ... @@ -110,11 +328,4 @@ Page({
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
... ... @@ -4,32 +4,45 @@
<view class="head">
<view class="position {{hidden_top?'hidden-active':'visible-active'}}">
<view class="left">
<image src="../../../images/avatar@2x.png" class="user-avatar"></image>
<text>旦巴</text>
<!--<image src="../../../images/avatar@2x.png" class="user-avatar"></image>-->
<image src="{{detail.userPic}}" class="user-avatar"></image>
<text>{{detail.userName}}</text>
</view>
<view class="right">
<view class="collect" bindtap="collect">
<view class="iconfont icon-shoucang"></view>
<view class="iconfont icon-shoucang" wx:if="{{!is_collect}}"></view>
<view class="iconfont icon-shoucang2" wx:if="{{is_collect}}"></view>
<text>收藏</text>
</view>
<view class="share" bindtap="share">
<!--&lt;!&ndash;未收藏&ndash;&gt;-->
<!--<view class='collect_box' catchtap='sethits_yes' data-index='{{index}}' wx:if='{{items.is_hits==0}}'>-->
<!--<text class='iconfont icon-shoucang1 '></text>-->
<!--<text class="collect_word">收藏</text>-->
<!--</view>-->
<!--&lt;!&ndash;已收藏&ndash;&gt;-->
<!--<view class='collect_box active' catchtap='sethits_no' data-index='{{index}}' wx:else>-->
<!--<text class='iconfont icon-shoucang0 star2'></text>-->
<!--<text class="collect_word">收藏</text>-->
<!--</view>-->
<button class="share" open-type="share">
<view class="iconfont icon-fenxiang2"></view>
<text>分享</text>
</view>
</button>
</view>
</view>
<swiper indicator-dots="{{false}}" current="{{current}}" bindchange="swiperChange"
autoplay="{{true}}" interval="3000" duration="1000">
<block wx:for="{{slide}}" wx:key="index">
<navigator url="{{item.url}}" hover-class="navigator-hover">
<block wx:for="{{detail.banner}}" wx:key="index">
<navigator url="{{item}}" hover-class="navigator-hover">
<swiper-item>
<image src="{{item.image}}" class="slide-image"/>
<image src="{{item}}" class="slide-image"/>
<!--<image src="http://pk86rwhci.bkt.clouddn.com/banner.png" class="slide-image"></image>-->
</swiper-item>
</navigator>
</block>
</swiper>
<view class="dots">
<block wx:for="{{slide}}" wx:key="index" wx:for-index="idx">
<block wx:for="{{detail.banner}}" wx:key="index" wx:for-index="idx">
<view class="dot{{idx == current_swiper ? ' active' : ''}}"></view>
</block>
</view>
... ... @@ -38,32 +51,44 @@
<!--地点-->
<view class="area-box">
<view class="title-box">
<view class="title">北京密云云峰山</view>
<view class="over-time"><text>23:54:26</text> 后停止拼餐</view>
<view class="title">{{detail.title}}</view>
<view class="over-time">
<text class=''>{{detail.time[0].hou}}:{{detail.time[0].min}}:{{detail.time[0].sec}}</text>
后停止拼餐</view>
<!--<view>-->
<!--<text class=''>{{detail.time[0].hou}}</text>-->
<!--<text>:</text>-->
<!--<text class=''>{{detail.time[0].min}}</text>-->
<!--<text>:</text>-->
<!--<text class=' '>{{detail.time[0].sec}}</text>-->
<!--</view>-->
</view>
<view class="area-content">
<text>云峰山风景区坐落于密云水库北不老屯镇,燕落村北三公里,处于
密云区东西两大风景区之间,东靠密云古北口 ──司马台长城──
雾灵山风景区。</text>
<text>{{detail.content}}</text>
<!--云峰山风景区坐落于密云水库北不老屯镇,燕落村北三公里,处于-->
<!--密云区东西两大风景区之间,东靠密云古北口 ──司马台长城──-->
<!--雾灵山风景区。-->
</view>
</view>
<!--详细时间-->
<view class="detail-box">
<text>时间:2018.04.08 17:30</text>
<text>餐厅:Opera Bombana</text>
<view class="position">
<text class="address">地址:侨福芳草地B2 OPERA BOMBANA</text>
<text>时间:{{end_time}}</text>
<text>餐厅:{{detail.addr}}</text><!--餐厅-->
<view class="position" bindtap="getNavigate">
<text class="address">地址:{{detail.address}}</text><!--地址:-->
<!--侨福芳草地B2 OPERA BOMBANA-->
<text class="iconfont icon-location"></text>
</view>
<text>菜系:意大利菜</text>
<text>菜系:{{detail.selectName}}</text>
<!--意大利菜-->
</view>
<!--已加入人员-->
<view class="join-num">已加入人员</view>
<view class="people-list" wx:if="{{peopleList.length>0}}">
<view class="people" wx:for="{{peopleList}}" wx:key="index" bindtap="goPetDetail" data-id="{{item.id}}">
<view class="bg"><image src="{{item.img}}" class="people-img"></image></view>
<view class="people-list" wx:if="{{join_people.length>0}}">
<view class="people" wx:for="{{join_people}}" wx:key="index">
<view class="bg"><image src="{{item.pic}}" class="people-img"></image></view>
<view class="name">{{item.name}}</view>
</view>
</view>
... ... @@ -71,43 +96,48 @@
<!--留言板 问一问-->
<view class="comment-box">
<view class="title-box">
<text class="comment-num">留言板 (28)</text>
<view class="ask-btn">
<text class="comment-num">留言板 ({{count}})</text>
<view class="ask-btn" bindtap="ask">
<text class="iconfont icon-bianji"></text>
<text>问一问</text>
<!--<input type="text" class="ask-input" bindinput="ask" focus="{{focus}}"/>-->
</view>
</view>
<!--评论-->
<view class="comment-list-box">
<view class="comment-item">
<view class="comment-item" wx:for="{{commentList}}" wx:key="index" wx:for-item="comment">
<view class="top-content">
<view class="top-left">
<image src="../../../images/avatar@2x.png" class="release-img"></image>
<text>旦巴 2018-08-09</text>
<!--<image src="../../../images/avatar@2x.png" class="release-img"></image>-->
<image src="{{comment.userPic}}" class="release-img"></image>
<text>{{comment.userName}} {{comment.create_time}}</text>
</view>
<view class="top-right">
<text>20</text>
<text class="iconfont icon-zan"></text>
<view class="top-right" bindtap="clickZan" data-id="{{comment.id}}" data-index="{{index}}">
<text>{{comment.prefect}}</text>
<text class="iconfont icon-zan" wx:if="{{!comment.is_prefect}}"></text>
<text class="iconfont icon-z-likeFill" wx:if="{{comment.is_prefect}}"></text>
</view>
</view>
<view class="comment-detail">
<view class="user-release">
<view class="release-comment">第一次拼餐,心里还是比较兴奋的,但是又担心拼友会比较无 聊,但是没想到拼友和餐厅都非常好!绝对不会有无聊的时候。 整个旅途非常开心!</view>
<text class="reply-btn">回复</text>
<view class="release-comment">{{comment.content}}</view>
<text class="reply-btn" bindtap="reply" data-id="{{comment.id}}">回复</text>
</view>
<view class="user-reply">
<view class="user-reply" wx:if="{{comment.son.length>0}}">
<view class='triangle'></view>
<view class="comment">
<text class="reply-name">蚂蚁: </text>
<text>第一次拼餐,心里还是比较兴奋的,但是又担心拼友会比较无聊,但是没想到拼友和餐厅都非常好!</text>
</view>
<block wx:for="{{comment.son}}" wx:key="index">
<!--<view class="comment">-->
<!--<text class="reply-name">蚂蚁: </text>-->
<!--<text>{{item.content}}第一次拼餐,心里还是比较兴奋的,但是又担心拼友会比较无聊,但是没想到拼友和餐厅都非常好!</text>-->
<!--</view>-->
<view class="reply">
<text class="reply-name">旦巴</text>
<text class="reply-name">{{detail.userName}}</text>
<text>回复</text>
<text class="reply-name">蚂蚁:</text>
<text>第一次拼餐,心里还是比较兴奋的,但是又担心拼友会比较无聊,但是没想到拼友和餐厅都非常好!</text>
<text class="reply-name">{{comment.userName}}:</text>
<text>{{item.content}}</text>
</view>
</block>
</view>
</view>
</view>
... ... @@ -123,7 +153,7 @@
<view class='iconfont icon-jia1' bindtap='addCount'></view>
</view>
</view>
<view class="confirm-join-btn">
<view class="confirm-join-btn" bindtap="confirmJoin">
<text>确认拼餐</text>
</view>
</view>
... ...
... ... @@ -66,6 +66,17 @@
flex-direction: column;
align-items: center;
justify-content: space-between;
line-height: 34rpx;
/*height: 34rpx;*/
}
.share {
border-radius: 0;
margin: 0;
padding: 0;
background: transparent;
}
.share::after {
border:0;
}
.head .position .right .collect {
margin-right: 42rpx;
... ... @@ -74,10 +85,18 @@
font-size: 30rpx;
color: #ffffff;
}
.icon-shoucang2 {
color:#DA4F2A;
font-size: 30rpx;
}
.icon-fenxiang2 {
font-size: 30rpx;
color: #ffffff;
}
.icon-z-likeFill {
color:#DC4E48;
/*font-size: ;*/
}
swiper {
width: 100%;
... ... @@ -139,6 +158,7 @@ swiper {
font-size: 28rpx;
}
.area-box .title-box .over-time {
width:34%;
color: #999999;
font-size: 22rpx;
}
... ... @@ -309,6 +329,7 @@ swiper {
color: #333333;
width: 138rpx;
margin-left: 30rpx;
text-align: right;
}
.user-reply {
padding: 20rpx 14rpx;
... ... @@ -401,3 +422,8 @@ swiper {
text-align: center;
line-height: 40rpx;
}
.ask-input {
position: absolute;
top: -4000rpx;
left: -4000rpx;
}
\ No newline at end of file
... ...
// pages/activity/activity.js
const app = getApp();
Page({
/**
... ... @@ -6,7 +7,147 @@ Page({
*/
data: {
images: [],
typeList: ['川菜', '粤菜', '湖北菜'],
images_params:[],
type_picker_list:[],
start_time:app.nowDate(),
title:'',
content:'',
min_num:'',
date:'',
time:'',
address:'',
address_position:'',
over_time:'',
is_showRelease_modal:false,
},
//查看我的订单
goMyRelease() {
wx.redirectTo({url:'/pages/order/order-detail/order-detail?id=' + this.data.order_id})
},
//完成按钮
goBack() {
wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 0})
},
//输入标题
inputTitle(e) {
this.setData({title:e.detail.value})
},
//输入内容
inputContent(e) {
this.setData({content:e.detail.value})
},
//输入最低人数
inputMinNum(e) {
this.setData({min_num:e.detail.value})
},
//输入最高人数
inputMaxNum(e) {
this.setData({max_num:e.detail.value})
},
//输入地点
inputAddress(e) {
this.setData({address:e.detail.value})
},
//获取地址
choosePosition() {
//选择当前地址,经纬度
const self = this;
wx.chooseLocation({
success(res) {
console.log(res);
self.setData({address_position: res.address,latng:res.latitude + ',' + res.longitude})
},
})
//打开地图导航
// wx.getLocation({ //获取当前经纬度
// type: 'wgs84', //返回可以用于wx.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息
// success: function (res) {
// console.log('获取当前经纬度', res);
// wx.openLocation({//​使用微信内置地图查看位置。
// latitude: res.latitude,//要去的纬度-地址
// longitude: res.longitude,//要去的经度-地址
// name: "",
// address: ""
// })
// }
// })
},
//输入截止时间
inputOverTime(e) {
this.setData({over_time:e.detail.value})
},
//获取分类
getType() {
let url = '/portal/Send/select';
const list = [];
app.post(url, {}, {}).then((res) => {
console.log('获取分类', res);
res.data.meals.forEach((item) => {
list.push(item.name)
});
this.setData({type_picker_list: list,type_list: res.data.meals})
})
},
//确定发布
confirmRelease(e) {
if(this.data.title === '') {
wx.showToast({title:'请填写标题',icon:'none'})
}else if(this.data.content === '') {
wx.showToast({title:'请填写描述',icon:'none'})
}else if(this.data.images_params.length === 0) {
wx.showToast({title:'请上传图片',icon:'none'})
}else if (this.data.min_num === '') {
wx.showToast({title:'请填写最低人数',icon:'none'})
}else if(this.data.current_type === undefined) {
wx.showToast({title:'请选择类别',icon:'none'})
}else if(this.data.date === '') {
wx.showToast({title:'请选择日期',icon:'none'})
}else if(this.data.time === '') {
wx.showToast({title:'请选择时间',icon:'none'})
}else if(this.data.address === '') {
wx.showToast({title:'请填写地点',icon:'none'})
}else if(this.data.address_position === '') {
wx.showToast({title:'请定位地址',icon:'none'})
}else if(this.data.over_time === '') {
wx.showToast({title:'请填写截止时间',icon:'none'})
}else {
console.log('e', e,e.detail.formId);
this.data.type_list.forEach((item,index) => {
if(this.data.current_type === index) {
// console.log('index', index, item.id);
this.setData({type_id:item.id})
}
});
const images_params = this.data.images_params.join(',');
console.log('发布-images_params', images_params);
let url = '/portal/Send/sendMeals';
let header = {
"XX-token": wx.getStorageSync('token')
};
let params = {
token: wx.getStorageSync('token'),
title: this.data.title,
content:this.data.content,
pic: images_params,
number:this.data.min_num,
select_id: this.data.type_id,//类别
time: this.data.date + ' ' + this.data.time,
name: this.data.address,
address: this.data.address_position,
latng: this.data.latng,
over_time:this.data.over_time,// 报名截止时间
// formId: e.detail.formId,
};
var list = [];
app.post(url, params, {}).then((res) => {
console.log('确定发布', res);
if(+res.code === 1 && res.message == '发布成功') {
this.setData({is_showRelease_modal:true,order_id:+res.data.id})
}else {
wx.showToast({title:res.message,icon:'none'})
}
})
}
},
//上传图片
choose(e) { //这里是选取图片的方法
... ... @@ -15,7 +156,7 @@ Page({
count: 6, //最多可以选择的图片总数
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
success: function(res) {
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
let tempFilePaths = res.tempFilePaths;
//启动上传等待中...
... ... @@ -30,7 +171,7 @@ Page({
let uploadImgCount = 0;
for (let i = 0, h = tempFilePaths.length; i < h; i++) {
wx.uploadFile({
url: 'https://www.magipocket.com/api/home/home/upload',
url: 'http://wmatchrd.com/portal/Index/upload',
filePath: tempFilePaths[i],
name: 'file',
formData: {
... ... @@ -41,23 +182,26 @@ Page({
'XX-Token': token,
'XX-Device-Type': 'wxapp',
},
success: function (res) {
success: function(res) {
uploadImgCount++;
let data = JSON.parse(res.data);
// console.log('data',data);
if (data.code == 20000) {
console.log('data',data);
if (+data.code == 1) {
wx.hideToast();
//服务器返回格式: { "Catalog": "testFolder", "FileName": "1.jpg", "Url": "https://test.com/1.jpg" }
let images = that.data.images;
images.push(data.msg);
let images_params = that.data.images_params;
images.push(data.data.preview_url);
images_params.push(data.data.filepath);
that.setData({
images: images
images: images,
images_params:images_params,
});
// console.log(images)
console.log('images---images_params',images,images_params)
//如果是最后一张,则隐藏等待中
if (uploadImgCount == tempFilePaths.length) {
wx.hideToast();
}
// if (uploadImgCount == tempFilePaths.length) {
// wx.hideToast();
// }
} else {
wx.hideToast();
wx.showModal({
... ... @@ -68,14 +212,13 @@ Page({
}
},
fail: function (res) {
fail: function(res) {
wx.hideToast();
wx.showModal({
title: '错误提示',
content: '上传图片失败',
showCancel: false,
success: function (res) {
}
success: function(res) {}
})
}
});
... ... @@ -86,10 +229,13 @@ Page({
// 删除图片
deleteImg(e) {
var imgs = this.data.images;
var images_params = this.data.images_params;
var index = e.currentTarget.dataset.index;
imgs.splice(index, 1);
images_params.splice(index, 1);
this.setData({
images: imgs
images: imgs,
images_params:images_params,
});
},
... ... @@ -108,17 +254,17 @@ Page({
},
//选择分类
bindTypeChange(e) {
this.setData({current_sex: e.detail.value})
this.setData({current_type: +e.detail.value})
},
//选择时间
bindTimeChange(e) {
this.setData({time: e.detail.value, hour: e.detail.value.split(':')[0], minute: e.detail.value.split(':')[1]})
console.log(e.detail.value.split(':'), e.detail.value.split(':')[0], e.detail.value.split(':')[1]);
this.setData({time:e.detail.value,hour:e.detail.value.split(':')[0],minute: e.detail.value.split(':')[1]})
console.log(e.detail.value.split(':'),e.detail.value.split(':')[0],e.detail.value.split(':')[1]);
},
//选择日期
bindDateChange(e) {
this.setData({date: e.detail.value, month: e.detail.value.split('-')[1], day: e.detail.value.split('-')[2]})
console.log(e.detail.value.split('-'), e.detail.value.split('-')[1], e.detail.value.split('-')[2]);
this.setData({date:e.detail.value,month:e.detail.value.split('-')[1],day: e.detail.value.split('-')[2]})
console.log(e.detail.value.split('-'),e.detail.value.split('-')[1],e.detail.value.split('-')[2]);
},
/**
* 生命周期函数--监听页面加载
... ... @@ -138,7 +284,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getType();
},
/**
... ...
<!--pages/activity/activity.wxml-->
<!--<form bindsubmit="confirmRelease" bindreset="formReset" report-submit="true">-->
<view class="content">
<view class="input-box">
<input type="text" placeholder="标题" bindinput="inputTitle" maxlength="15" placeholder-class="placeholder"/>
<textarea maxlength="-1" type="text" placeholder="发布描述..." bindinput="inputTitle" placeholder-class="placeholder"></textarea>
<textarea maxlength="-1" type="text" placeholder="发布描述..." bindinput="inputContent"
placeholder-class="placeholder"></textarea>
</view>
<view class='upload_box'>
... ... @@ -33,10 +35,10 @@
<!--<text class="iconfont icon-xiangxia min-icon"></text>-->
<!--</view>-->
<view class="min-num">
<text class="title type-title">菜系</text>
<picker bindchange="bindTypeChange" value="{{current_sex}}" range="{{typeList}}" class="picker">
<text class="title type-title">类别</text>
<picker bindchange="bindTypeChange" value="{{current_sex}}" range="{{type_picker_list}}" class="picker">
<view class="input">
<text class="variety-text">{{typeList[current_sex]}}</text>
<text class="variety-text">{{type_picker_list[current_type]}}</text>
<!--<text class="variety-text" wx:else>{{pet_info.sex===2?'MM':'GG'}}</text>-->
<!-- <view class="iconfont icon-arrow-down"></view> -->
</view>
... ... @@ -79,19 +81,30 @@
<text class="address-title">餐厅</text>
<input type="text" bindinput="inputAddress" class="input"/>
</view>
<view class="address-box">
<view class="address-box" bindtap="choosePosition">
<text class="address-title">地址</text>
<input type="text" bindinput="inputPosition" value="" class="input"/>
<!--<input type="text" bindtap="choosePosition" value="" class="input"/>-->
<text class="input">{{address_position}}</text>
<text class="iconfont icon-location"></text>
</view>
<view class="time-limit">
<text class="limit-title">时限 开餐前</text>
<input type="number" bindinput="inputPosition" value=""/>
<input type="number" bindinput="inputOverTime" value=""/>
<text>小时 停止拼餐</text>
</view>
</view>
<view class="complete">
<view class="complete" bindtap="confirmRelease">
<view class="btn">确定发布</view>
</view>
</view>
<!--发布成功弹框-->
<view class="modal" wx:if="{{is_showRelease_modal}}" catchtouchmove="disableScroll">
<image class="sorry-img" src="../../images/success@2x.png"></image>
<view class="title">恭喜您拼餐成功</view>
<view class="view-btn" catchtap="goMyRelease">查看我的订单</view>
<view class="complete-btn" catchtap="goBack">完成</view>
</view>
<view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground"
catchtouchmove="disableScroll"></view>
<!--</form>-->
\ No newline at end of file
... ...
... ... @@ -21,3 +21,9 @@
width:173rpx;
text-align: right;
}
.variety-text {
overflow : hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
\ No newline at end of file
... ...
// pages/my/edit-info/edit-info.js
const app = getApp();
Page({
/**
... ... @@ -9,7 +11,12 @@ Page({
maxlength: 50,
minlength: 0,
currentnum: 0,
country:'',
city:'',
phone_number:'',
introduce:'',
},
//选择性别
sexPickerChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
... ... @@ -17,6 +24,13 @@ Page({
is_sex_change: true
})
},
//输入手机号
inputPhone(e) {
this.setData({
phone_number: e.detail.value,
})
},
//自动获取手机号
getPhoneNumber(e) {
console.log(e.detail.errMsg)
console.log(e.detail.iv)
... ... @@ -49,9 +63,45 @@ Page({
} else {
this.setData({
currentnum: len,
content: textcontent,
introduce: textcontent,
})
}
},
//保存
submit() {
if(this.data.current_sex === undefined) {
wx.showToast({title:'请选择性别',icon:'none'})
}else if(this.data.country === '') {
wx.showToast({title:'请填写国家',icon:'none'})
}else if(this.data.city === '') {
wx.showToast({title:'请填写城市',icon:'none'})
}else if (this.data.phone_number === '') {
wx.showToast({title:'请填写手机号',icon:'none'})
}else if(this.data.introduce === '') {
wx.showToast({title:'请填写简介',icon:'none'})
}else {
let url = '/portal/Member/detail';
let params = {
token: wx.getStorageSync('token'),
sex: this.data.sexList[this.data.current_sex] === '男'?1:2,
country:this.data.country,
city:this.data.city,
tel:this.data.phone_number,
introduce:this.data.introduce
};
app.post(url, params, {}).then((res) => {
console.log('保存', res);
if (+res.code === 1) {
wx.showToast({title:res.message,icon:'none',
success:function () {
setTimeout(function () {
wx.navigateBack({delta:1})
},500)
}
})
}
});
}
},
/**
* 生命周期函数--监听页面加载
... ...
... ... @@ -27,7 +27,7 @@
<view class="flex-box">
<view class="title">手机号:</view>
<view class="phone-box">
<input type="text" bindinput="inputCountry"/>
<input type="text" bindinput="inputCountry" bindinput="inputPhone"/>
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="phone-btn">自动填写</button>
</view>
</view>
... ... @@ -38,7 +38,7 @@
<view class='word_num'>{{currentnum}}/{{maxlength}}</view>
</view>
</view>
<view class="complete">
<view class="complete" bindtap="submit">
<view class="btn">完成</view>
</view>
</view>
... ...
... ... @@ -28,7 +28,7 @@
font-size: 26rpx;
color: #666666;
}
.text input {
.text input, .phone-box input {
font-size: 26rpx;
color: #666666;
}
... ...
// pages/my/my-collect/my-collect.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
postList:
[
{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:1,},
{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:2,},
{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:3,},
{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:4,},
],
collectList: [],
page_number:1,
hasMore:true,
},
goPostDetail() {
goPostDetail(e) {
const id = +e.currentTarget.dataset.activity_id;
const type = +e.currentTarget.dataset.type;
console.log('type', type);
if(type === 1) { //1是活动,2是拼餐
wx.navigateTo({
url: '/pages/activity/detail/detail',
url: '/pages/activity/detail/detail?id=' + id,
})
}else {
wx.navigateTo({
url: '/pages/meal/detail/detail?id=' + id,
})
}
},
//获取收藏列表
getCollectList() {
let url = '/portal/Member/collection';
let params = {
token: wx.getStorageSync('token'),
};
app.post(url, params, {}).then((res) => {
console.log('获取收藏列表', res);
if (+res.code === 1) {
this.setData({
collectList: this.data.collectList.concat(res.data),
});
// console.log(self.data.questionList);
}
});
},
/**
* 生命周期函数--监听页面加载
... ... @@ -36,7 +58,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.setData({collectList: [],page_number:1,has_more: true});
this.getCollectList()
},
/**
... ... @@ -64,7 +87,22 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
const self = this;
if (self.data.has_more) {
wx.showToast({
title: '加载中~',
icon: 'loading',
duration: 200,
});
self.data.page_number++;
self.getCollectList();
} else {
wx.showToast({
title: '没有更多数据了~',
icon: 'none'
});
}
console.log('上拉加载');
},
/**
... ...
<!--pages/my/my-collect/my-collect.wxml-->
<!--文章内容-->
<view class='content_box post_box' wx:if="{{postList.length > 0}}">
<view class='content_item' wx:for="{{postList}}" wx:key="index" bindtap='goPostDetail' data-index="{{index}}">
<image src="../../../images/lishi@2x.png" class="thumb"></image>
<view class='content_box post_box' wx:if="{{collectList.length > 0}}">
<view class='content_item' wx:for="{{collectList}}" wx:key="index" bindtap='goPostDetail' data-type="{{item.type}}" data-activity_id="{{item.id}}">
<!--<image src="../../../images/lishi@2x.png" class="thumb"></image>-->
<image src="{{item.pic}}" class="thumb"></image>
<view class="lish-right">
<view class="title">{{item.title}}</view>
<view class="time">{{item.time}}</view>
<view class="name-box">
<image src="../../../images/avatar@2x.png" class="avatar"></image>
<text>{{item.name}}</text>
<!--<image src="../../../images/avatar@2x.png" class="avatar"></image>-->
<image src="{{item.userPic}}" class="avatar"></image>
<text>{{item.userName}} {{item.address}}</text>
</view>
</view>
</view>
</view>
<view class="no-data" wx:if="{{collectList.length === 0}}">暂无收藏内容</view>
\ No newline at end of file
... ...
... ... @@ -46,3 +46,12 @@
height: 40rpx;
margin-right: 16rpx;
}
.no-data {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-top: 200rpx;
font-size: 28rpx;
color: #cccccc;
}
\ No newline at end of file
... ...
// pages/my/my-wallet/detail/detail.js
const app = getApp();
Page({
/**
... ... @@ -15,6 +16,23 @@ Page({
console.log('获取屏幕', wx.getSystemInfoSync());
this.setData({screenHeight:wx.getSystemInfoSync().windowHeight})
},
//获取我的钱包详情
getMyWallet() {
let url = '/portal/Member/moneyDetail';
let params = {
token: wx.getStorageSync('token'),
activeId:this.data.id,
};
app.post(url, params, {}).then((res) => {
console.log('获取我的钱包详情', res);
if (+res.code === 1) {
this.setData({
// collectList: this.data.collectList.concat(res.data),
});
// console.log(self.data.questionList);
}
});
},
/**
* 生命周期函数--监听页面加载
*/
... ... @@ -34,6 +52,7 @@ Page({
*/
onShow: function () {
this.getScreenHeight();
this.getMyWallet();
},
/**
... ...
// pages/my/my-wallet/my-wallet.js
const app = getApp();
Page({
/**
... ... @@ -14,6 +15,22 @@ Page({
goDetail() {
wx.navigateTo({url:'/pages/my/my-wallet/detail/detail'})
},
//获取我的钱包
getMyWallet() {
let url = '/portal/Member/money';
let params = {
token: wx.getStorageSync('token'),
};
app.post(url, params, {}).then((res) => {
console.log('获取我的钱包', res);
if (+res.code === 1) {
this.setData({
// collectList: this.data.collectList.concat(res.data),
});
// console.log(self.data.questionList);
}
});
},
/**
* 生命周期函数--监听页面加载
*/
... ... @@ -32,7 +49,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getMyWallet()
},
/**
... ...
... ... @@ -12,27 +12,52 @@ Page({
is_answer: false,
is_class:1,
isLogin: null,
is_write:2,//1:已填写,2:未填写
},
//是否填写个人信息
getIsWrite() {
const self = this;
let url = '/portal/Send/isWrite';
let params = {
token: wx.getStorageSync('token'),
};
let header = {
"token": wx.getStorageSync('token')
};
app.post(url, params, {}).then((res) => {
console.log('是否填写个人信息', res);
if (+res.code === 1) {
self.setData({
is_write:res.data.is_write,//1:已填写2:未填写
});
// console.log(this.data.this_week_test_info);
}
})
},
//发布拼活动
releaseActivity() {
this.setData({is_showRelease:false,});
wx.navigateTo({
url: '/pages/activity/activity',
})
});
},
//发布拼餐
releaseMeal() {
this.setData({is_showRelease:false,});
wx.navigateTo({
url: '/pages/meal/meal',
})
},
// //完善个人信息
// goUserInfo() {
// wx.navigateTo({
// url: '/pages/my/edit-info/edit-info',
// })
// },
//完善个人信息
goUserInfo() {
this.setData({is_showUserInfo: false});
wx.navigateTo({
url: '/pages/my/edit-info/edit-info',
})
},
//去答题
goAnswer() {
this.setData({is_showAnswer: false});
wx.navigateTo({
url: '/pages/index/answer-question/answer-question',
})
... ... @@ -68,7 +93,7 @@ Page({
});
},
//编辑个人信息
goUserInfo() {
EditUserInfo() {
wx.navigateTo({
url: '/pages/my/edit-info/edit-info',
})
... ... @@ -100,7 +125,7 @@ Page({
disableScroll() {},
handleBackground() {
console.log('dianji');
this.setData({is_showAnswer: false,is_showUserInfo:false,})
this.setData({is_showAnswer: false, is_showUserInfo: false,is_showRelease:false,})
},
//首页-导航
service(e) {
... ... @@ -142,13 +167,18 @@ Page({
release(e) {
console.log('发布');
const self = this;
if(!self.data.is_answer) {
if (+self.data.is_write === 2 && wx.getStorageSync('is_canSend') === 2 ){ //没填写个人信息并且不可以发布 =>去填写
self.setData({
is_showAnswer: true
is_showUserInfo: true //弹出 去填写个人信息弹框
});
}else {
} else if(+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 2) { //已填写且不能发布=>去答题
self.setData({
is_showUserInfo: true
is_showAnswer: true //弹出 去答题弹框
});
}else if(+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 1 && wx.getStorageSync('is_answer') === 1){ //已填写且可以发布 =>去发布
self.setData({
is_showRelease: true //弹出 去答题弹框
});
}
},
... ... @@ -196,17 +226,19 @@ Page({
//获取首页内容
getIndex(res) {
let url = '/portal/Member/index';
// let params = {
let params = {
// lat: res.latitude,
// lng: res.longitude,
// };
token: wx.getStorageSync('token'),
};
let header = {
"XX-token": wx.getStorageSync('token')
};
app.post(url, {}, header).then((res) => {
app.post(url, params, {}).then((res) => {
console.log('获取首页', res);
// this.setData({
// })
this.setData({
user:res.data.member
})
// console.log(this.data.this_week_test_info);
})
},
... ... @@ -230,6 +262,8 @@ Page({
onShow: function () {
this.setData({isLogin: app.globalData.isLogin});
this.getIndex();
this.getIsWrite();
},
/**
... ...
<!--pages/my/my.wxml-->
<view class="head-box">
<view wx:if="{{isLogin}}" bindtap="goUserInfo">
<view wx:if="{{isLogin}}" bindtap="EditUserInfo">
<view class="head"></view>
<image src="../../images/user-img@2x.png" class="user-img"></image>
<!--<image src="../../images/user-img@2x.png" class="user-img"></image>-->
<image src="{{user.pic}}" class="user-img"></image>
<view class="left">
<view class="class-box">
<image src="../../images/jin@2x.png" wx:if="{{is_class === 1}}"></image>
<image src="../../images/yin@2x.png" wx:if="{{is_class === 2}}"></image>
<image src="../../images/tong@2x.png" wx:if="{{is_class === 3}}"></image>
<text wx:if="{{is_class === 1}}">金火柴</text>
<text wx:if="{{is_class === 2}}">银火柴</text>
<text wx:if="{{is_class === 3}}">铜火柴</text>
<image src="../../images/jin@2x.png" wx:if="{{user.level === 1}}"></image>
<image src="../../images/yin@2x.png" wx:if="{{user.level === 2}}"></image>
<image src="../../images/tong@2x.png" wx:if="{{user.level === 3}}"></image>
<text wx:if="{{user.level === 1}}">金火柴</text>
<text wx:if="{{user.level === 2}}">银火柴</text>
<text wx:if="{{user.level === 3}}">铜火柴</text>
</view>
</view>
<view class="right">
<view class="name">旦巴小公举</view>
<view class="name">{{user.name}}</view>
<view class="area">
<view class="iconfont icon-dingweiweizhizuobiaoxianxing"></view>
<text>北京</text>
<text>{{user.city || '定位'}}</text>
</view>
<view class="qian">确认过眼神,遇见对的人</view>
<view class="qian">{{user.introduce || '个人简介'}}</view>
</view>
</view>
<view wx:if="{{!isLogin}}" class="login-box">
... ... @@ -104,7 +105,9 @@
<view class="title">请先完善个人信息</view>
<view class="answer-btn" bindtap="goUserInfo">完成</view>
</view>
<view class="release-btn-box" wx:if="{{is_showUserInfo}}">
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<!--发布-->
<view class="release-btn-box" wx:if="{{is_showRelease}}">
<view class="left-btn" bindtap="releaseMeal">
<image src="../../images/pincan@2x.png"></image>
<view class="text">发布拼餐</view>
... ... @@ -114,4 +117,4 @@
<view class="text">发布拼活动</view>
</view>
</view>
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
\ No newline at end of file
<view class="modal_box" wx:if="{{is_showRelease}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
\ No newline at end of file
... ...
// pages/my/suggest/suggest.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
content: '',
},
input(e) {
this.setData({content: e.detail.value})
},
//提交
submit() {
if(this.data.content ==='') {
wx.showToast({title:'请输入反馈意见',icon:'none'})
}else {
let url = '/portal/Member/opinion';
let params = {
token: wx.getStorageSync('token'),
content:this.data.content,
};
app.post(url, params, {}).then((res) => {
console.log('提交', res);
if (+res.code === 1) {
wx.showToast({title:res.message,icon:'none',
success:function () {
setTimeout(function () {
wx.navigateBack({delta:1})
},500)
}
})
}
});
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
... ... @@ -56,7 +83,6 @@ Page({
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
... ...
// pages/order/complain/complain.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
content:'',
images:[],
images_params:[]
},
//输入投诉内容
inputContent(e) {
this.setData({content:e.detail.value})
},
//投诉
submit() {
const self = this;
if(self.data.content === '') {
wx.showToast({title:'请填写投诉内容',icon:'none'})
}else {
let images_params = '';
if(self.data.images_params.length === 0) {
images_params = '';
}else {
images_params = self.data.images_params.join(',')
}
let url = '/portal/Order/complaint';
let params = {
token: wx.getStorageSync('token'),
orderId: self.data.order_id,
content:'',
pic:images_params,
};
app.post(url, params, {}).then((res) => {
console.log('投诉', res);
if (+res.code === 1) {
wx.showToast({title:'投诉成功',icon:'none',
success:function () {
setTimeout(function () {
wx.navigateBack({delta:1})
},500)
}
});
}else {
wx.showToast({title:res.message,icon:'none'});
}
})
}
},
//上传图片
choose(e) { //这里是选取图片的方法
let that = this;
... ... @@ -55,7 +97,7 @@ Page({
images: images,
images_params:images_params,
});
console.log('images---images_params',images,images_params)
console.log('images---images_params',images,images_params);
//如果是最后一张,则隐藏等待中
// if (uploadImgCount == tempFilePaths.length) {
// wx.hideToast();
... ... @@ -112,7 +154,8 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log('options', options,JSON.parse(options.order_detail));
this.setData({order_id:+options.id?+options.id:'',order_detail:JSON.parse(options.order_detail)})
},
/**
... ...
<!--pages/order/complain/complain.wxml-->
<view class="content">
<view class="state-box">
<view class="line"></view>
<!--(0全部,2待处理,4已拼成,5已取消,6已完成)-->
<view class="state1">
<view class="circle"></view>
<view class="circle change"></view>
<text>已拍下</text>
</view>
<view class="state2">
<view class="circle"></view>
<text>已拼成</text>
<view class="circle {{order_detail.status === 4 ||order_detail.status === 5 ?'change':''}}"></view>
<text wx:if="{{order_detail.status === 5}}">已取消</text>
<text wx:if="{{order_detail.status === 4}}">已拼成</text>
<text wx:if="{{order_detail.status === 2}}" class="{{order_detail.status === 2?'change-text':''}}">待拼成</text>
</view>
<view class="state3">
<view class="circle"></view>
<text>已完成</text>
<view class="circle {{order_detail.status === 6?'change':''}}"></view>
<text wx:if="{{order_detail.status === 6}}">已完成</text>
<text wx:if="{{order_detail.status === 4 || order_detail.status === 2 ||order_detail.status === 5}}" class="{{order_detail.status === 4 || order_detail.status === 2 ||order_detail.status === 5?'change-text':''}}">待完成</text>
</view>
</view>
<view class="order-info">
<text class="address text">今日美术展览馆 2018.04.08</text>
<text class="address text">{{order_detail.addr}} {{order_detail.time}}</text>
<view class="top">
<view class="text">拼单发起者: </view>
<image src="../../../images/avatar@2x.png"></image>
<view class="name text">旦巴</view>
<!--<image src="../../../images/avatar@2x.png"></image>-->
<image src="{{order_detail.userPic}}"></image>
<view class="name text">{{order_detail.userName}}</view>
</view>
<text class="text">订单编号:324352346254698762345430</text>
<text class="text">交易时间:2018.04.08 15:20:55</text>
<text class="text">联系方式:153565895845</text>
<text class="text">订单编号:{{order_detail.order_sn}}</text>
<text class="text">交易时间:{{order_detail.create_time}}</text>
<text class="text">联系方式:{{order_detail.userTel || '暂无手机号'}}</text>
<textarea maxlength="-1" name="" id="" cols="30" rows="10" placeholder="请填写您要投诉的内容" placeholder-class="placeholder"></textarea>
<textarea maxlength="-1" placeholder="请填写您要投诉的内容" placeholder-class="placeholder"
bindinput="inputContent"
></textarea>
</view>
... ... @@ -46,7 +54,7 @@
</view>
</view>
<view class="bottom">
<view class="bottom" bindtap="submit">
<text class="confirm-btn">提交投诉</text>
</view>
</view>
... ...
// pages/order/order-detail/order-detail.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {},
//去投诉
goComplain() {
console.log('tousu');
wx.navigateTo({url:'/pages/order/complain/complain'})
const order_detail = JSON.stringify(this.data.detail);
wx.navigateTo({url: '/pages/order/complain/complain?id=' + this.data.order_id
+ '&order_detail=' + order_detail
})
},
//订单详情
getOrderDetail() {
const self = this;
let url = '/portal/Order/detail';
let params = {
token: wx.getStorageSync('token'),
orderId: self.data.order_id,
};
app.post(url, params, {}).then((res) => {
console.log('订单详情', res);
if (+res.code === 1) {
self.setData({
detail: res.data,
});
// console.log(this.data.this_week_test_info);
}
})
},
//取消订单
cancel() {
const self = this;
let url = '/portal/Order/cancel';
let params = {
token: wx.getStorageSync('token'),
orderId: self.data.order_id,
};
app.post(url, params, {}).then((res) => {
console.log('取消订单', res);
if (+res.code === 1) {
wx.showToast({title:'订单已取消',icon:'none'});
// self.setData({
// detail: res.data,
// });
// console.log(this.data.this_week_test_info);
}else {
wx.showToast({title:res.message,icon:'none'});
}
})
},
//完成订单
confirm() {
const self = this;
let url = '/portal/Order/sure';
let params = {
token: wx.getStorageSync('token'),
orderId: self.data.order_id,
};
app.post(url, params, {}).then((res) => {
console.log('完成订单', res);
if (+res.code === 1) {
wx.showToast({title:'订单已完成',icon:'none'});
// self.setData({
// detail: res.data,
// });
// console.log(this.data.this_week_test_info);
}else {
wx.showToast({title:res.message,icon:'none'});
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log('options', options);
this.setData({order_id:+options.id?+options.id:''})
},
/**
... ... @@ -27,7 +94,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getOrderDetail();
},
/**
... ...
... ... @@ -5,37 +5,43 @@
<view class="state-box">
<view class="line"></view>
<!--(0全部,2待处理,4已拼成,5已取消,6已完成)-->
<view class="state1">
<view class="circle"></view>
<view class="circle change"></view>
<text>已拍下</text>
</view>
<view class="state2">
<view class="circle"></view>
<text>已拼成</text>
<view class="circle {{detail.status === 4 ||detail.status === 5 ?'change':''}}"></view>
<text wx:if="{{detail.status === 5}}">已取消</text>
<text wx:if="{{detail.status === 4}}">已拼成</text>
<text wx:if="{{detail.status === 2}}" class="{{detail.status === 2?'change-text':''}}">待拼成</text>
</view>
<view class="state3">
<view class="circle"></view>
<text>已完成</text>
<view class="circle {{detail.status === 6?'change':''}}"></view>
<text wx:if="{{detail.status === 6}}">已完成</text>
<text wx:if="{{detail.status === 4 || detail.status === 2 ||detail.status === 5}}" class="{{detail.status === 4 || detail.status === 2 ||detail.status === 5?'change-text':''}}">待完成</text>
</view>
</view>
<view class="order-info">
<view class="top">
<image src="../../../images/avatar@2x.png"></image>
<text class="name">旦巴</text>
<!--<image src="../../../images/avatar@2x.png"></image>-->
<image src="{{detail.userPic}}"></image>
<text class="name">{{detail.userName}}</text>
</view>
<text class="address">今日美术展览馆</text>
<text class="time">2018.04.08</text>
<text class="address">{{detail.title}}</text>
<text class="time">{{detail.time}}</text>
</view>
<view class="order-detail">
<text>订单编号:324352346254698762345430</text>
<text>交易时间:2018.04.08 15:20:55</text>
<text>订单编号:{{detail.order_sn}}</text>
<text>交易时间:{{detail.create_time}}</text>
</view>
<view class="bottom">
<text class="cancel-btn">取消订单</text>
<text class="confirm-btn">完成</text>
<text class="cancel-btn" wx:if="{{detail.status === 4 || detail.status === 2}}" bindtap="cancel">取消订单</text>
<text class="cancel-btn" wx:if="{{detail.status === 2}}">待拼成</text>
<text class="confirm-btn" wx:if="{{detail.status === 4}}" bindtap="confirm">完成</text>
</view>
</view>
... ...
... ... @@ -22,13 +22,19 @@
width: 46rpx;
height: 46rpx;
border-radius: 50%;
background-color: #E1C8AF;
margin-bottom: 10rpx;
}
.state3 .circle {
background-color: #DEDEDE;
}
.state3 text {
/*.state3 .circle {*/
/*background-color: #E1C8AF;*/
/*}*/
.state-box .change {
background-color: #E1C8AF;
}
/*.state3 text {*/
/*color: #999999;*/
/*}*/
.state-box .change-text {
color: #999999;
}
.state-box .line {
... ...
// pages/order/order.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
current:0,
orderList:
[
{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:1,},
{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:2,},
{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:3,},
{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:4,},
],
tabcurrent: {tab: 3,bubble: ''},
current: 0,
orderList: [],
tabcurrent: {tab: 3, bubble: ''},
is_showAnswer: false,
is_showUserInfo:false,
is_showUserInfo: false,
is_answer: true,
is_write: 0,//1:已填写,2:未填写
},
//是否填写个人信息
getIsWrite() {
const self = this;
let url = '/portal/Send/isWrite';
let params = {
token: wx.getStorageSync('token'),
};
let header = {
"token": wx.getStorageSync('token')
};
app.post(url, params, {}).then((res) => {
console.log('是否填写个人信息', res);
if (+res.code === 1) {
self.setData({
is_write: res.data.is_write,//1:已填写2:未填写
});
// console.log(this.data.this_week_test_info);
}
})
},
//发布拼活动
releaseActivity() {
this.setData({is_showRelease: false,});
wx.navigateTo({
url: '/pages/activity/activity',
})
});
},
//发布拼餐
releaseMeal() {
this.setData({is_showRelease: false,});
wx.navigateTo({
url: '/pages/meal/meal',
})
},
//完善个人信息
goUserInfo() {
this.setData({is_showUserInfo: false});
wx.navigateTo({
url: '/pages/my/edit-info/edit-info',
})
},
//去答题
goAnswer() {
this.setData({is_showAnswer: false});
wx.navigateTo({
url: '/pages/index/answer-question/answer-question',
})
},
goPostDetail() {
goPostDetail(e) {
const id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/order/order-detail/order-detail',
url: '/pages/order/order-detail/order-detail?id=' + id,
})
},
//tab点击事件
chargeTab(e) {
this.setData({
current: e.currentTarget.dataset.current
})
current: +e.currentTarget.dataset.current,
orderList:[],
has_more:true,
page_number:1,
});
this.getOrderList();
},
disableScroll() {
},
disableScroll() {},
handleBackground() {
console.log('dianji');
this.setData({is_showAnswer: false,is_showUserInfo:false,})
this.setData({is_showAnswer: false, is_showUserInfo: false, is_showRelease: false,})
},
//首页-导航
service(e) {
... ... @@ -98,13 +124,18 @@ Page({
release(e) {
console.log('发布');
const self = this;
if(!self.data.is_answer) {
if (+self.data.is_write === 2 && wx.getStorageSync('is_canSend') === 2) { //没填写个人信息并且不可以发布 =>去填写
self.setData({
is_showAnswer: true
is_showUserInfo: true //弹出 去填写个人信息弹框
});
}else {
} else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 2) { //已填写且不能发布=>去答题
self.setData({
is_showUserInfo: true
is_showAnswer: true //弹出 去答题弹框
});
} else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 1 && wx.getStorageSync('is_answer') === 1) { //已填写且可以发布 =>去发布
self.setData({
is_showRelease: true //弹出 去答题弹框
});
}
},
... ... @@ -149,6 +180,29 @@ Page({
})
}
},
// portal/Order/index
//获取订单列表
getOrderList() {
const self = this;
let url = '/portal/Order/index';
let params = {
token: wx.getStorageSync('token'),
status: +self.data.current,
};
let header = {
"token": wx.getStorageSync('token')
};
app.post(url, params, {}).then((res) => {
console.log('获取订单列表', res);
if (+res.code === 1) {
self.setData({
orderList: res.data,
// cate: res.data.cate,
});
}
wx.hideLoading()
})
},
/**
* 生命周期函数--监听页面加载
*/
... ... @@ -167,6 +221,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getIsWrite();
this.getOrderList();
},
... ...
<!--pages/order/order.wxml-->
<view class='tab_box'>
<!--(0全部,2待处理,4已拼成,5已取消,6已完成)-->
<view class="tab_item {{current==0?'active':''}}" data-current='0' bindtap='chargeTab'>全部</view>
<view class="tab_item {{current==1?'active':''}}" data-current='1' bindtap='chargeTab'>待处理</view>
<view class="tab_item {{current==2?'active':''}}" data-current='2' bindtap='chargeTab'>已拼成</view>
<view class="tab_item {{current==3?'active':''}}" data-current='3' bindtap='chargeTab'>已完成</view>
<view class="tab_item {{current==4?'active':''}}" data-current='4' bindtap='chargeTab'>已取消</view>
<view class="tab_item {{current==2?'active':''}}" data-current='2' bindtap='chargeTab'>待处理</view>
<view class="tab_item {{current==4?'active':''}}" data-current='4' bindtap='chargeTab'>已拼成</view>
<view class="tab_item {{current==6?'active':''}}" data-current='6' bindtap='chargeTab'>已完成</view>
<view class="tab_item {{current==5?'active':''}}" data-current='5' bindtap='chargeTab'>已取消</view>
</view>
<!--订单列表-->
<view class="no-data" wx:if="{{orderList.length === 0}}">暂无订单</view>
<view class='content_box post_box' wx:if="{{orderList.length > 0}}">
<view class='content_item' wx:for="{{orderList}}" wx:key="index" bindtap='goPostDetail' data-index="{{index}}">
<image src="../../images/lishi@2x.png" class="thumb"></image>
<view class='content_item' wx:for="{{orderList}}" wx:key="index"
bindtap='goPostDetail' data-index="{{index}}" data-id="{{item.id}}">
<!--<image src="../../images/lishi@2x.png" class="thumb"></image>-->
<image src="{{item.pic}}" class="thumb"></image>
<view class="lish-right">
<view class="title-box">
<view class="title">{{item.title}}</view>
... ... @@ -22,8 +26,9 @@
<view class="time">{{item.time}}</view>
<view class="name-box">
<view class="name-left">
<image src="../../images/avatar@2x.png" class="avatar"></image>
<text>{{item.name}}</text>
<!--<image src="../../images/avatar@2x.png" class="avatar"></image>-->
<image src="{{item.userPic}}" class="avatar"></image>
<text>{{item.userName}} 在{{item.addr}}</text>
</view>
<view class="btn">
<text wx:if="{{item.state === 4 || item.state === 3}}">删除</text>
... ... @@ -66,7 +71,9 @@
<view class="title">请先完善个人信息</view>
<view class="answer-btn" bindtap="goUserInfo">完成</view>
</view>
<view class="release-btn-box" wx:if="{{is_showUserInfo}}">
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<!--发布-->
<view class="release-btn-box" wx:if="{{is_showRelease}}">
<view class="left-btn" bindtap="releaseMeal">
<image src="../../images/pincan@2x.png"></image>
<view class="text">发布拼餐</view>
... ... @@ -76,4 +83,4 @@
<view class="text">发布拼活动</view>
</view>
</view>
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<view class="modal_box" wx:if="{{is_showRelease}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
... ...
... ... @@ -15,6 +15,7 @@
top:0;
left:0;
right:0;
background: #ffffff;
}
.tab_item {
display: inline-block;
... ... @@ -48,6 +49,7 @@
}
.post_box {
margin-top: 92rpx;
padding-bottom:130rpx;
}
.content_item {
display: flex;
... ... @@ -110,4 +112,14 @@
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
border-radius: 50%;
}
.no-data {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: #cccccc;
margin-top: 200rpx;
}
... ...
... ... @@ -15,14 +15,21 @@ Page({
hasMore: true,
pageNumber: 0,
avatar: [],
is_write:2,//1:已填写,2:未填写
},
//初始化postList
initPostList() {
this.setData({
pageNumber: 0,
hasMore: true,
});
this.data.postList = []
goPostDetail(e) {
const id = +e.currentTarget.dataset.id;
const type = +e.currentTarget.dataset.type;
console.log('type', type);
if(type === 1) { //1是活动,2是拼餐
wx.navigateTo({
url: '/pages/activity/detail/detail?id=' + id,
})
}else {
wx.navigateTo({
url: '/pages/meal/detail/detail?id=' + id,
})
}
},
inputFocus() {
this.setData({postList:[]})
... ... @@ -32,273 +39,163 @@ Page({
this.setData({searchValue: e.detail.value})
},
//点击搜索(搜索结果)
// startSearch() {
// let self = this;
// if(!self.data.hasMore) return;
// self.setData({hasMore: false});
// let url = '/home/home/search';
// let params = {
// keyword: self.data.searchValue,
// page: self.data.pageNumber,
// };
// let header = {
// "XX-Token": wx.getStorageSync('token')
// };
// if(self.data.searchValue === '') {
// wx.showToast({title:'搜索内容不能为空~',icon: 'none'})
// }else {
// self.getSearchHistory();
// app.post(url, params, header).then((res) => {
// // console.log('搜索结果', res);
// if(+res.page < res.page_size) {
// self.data.hasMore = true;
// }
// const list = res.data.map((item, index) => {
// return {...item, showlabel_box: false, more: item.more !== '' ? JSON.parse(item.more) : ''}
// });
// self.setData({
// postList: self.data.postList.concat(list)
// });
// // console.log('搜索结果', self.data.postList);
// })
// }
// },
//点击量
// hit(current) {
// let url = '/home/home/hits';
// let params = {
// id: this.data.postList[current].id,
// };
// let header = { "XX-Token": wx.getStorageSync('token') };
// app.post(url, params, header).then((res) => {
// // console.log('点击量',res);
// if(res.message == "操作成功") {
// const post_hits = this.data.postList[current].post_hits +1
// this.setData({
// [`postList[${current}].post_hits`]: post_hits
// });
// }
// })
// },
//清空输入框
clearInput() {
this.setData({searchValue: ''})
},
//搜索结果
startSearch() {
let self = this;
if(!self.data.hasMore) return;
self.setData({hasMore: false});
let url = '/home/home/search';
let params = {
keyword: self.data.searchValue,
page: self.data.pageNumber,
};
let url = '/portal/Active/findRes';
let header = {
"XX-Token": wx.getStorageSync('token')
};
if(self.data.searchValue === '') {
wx.showToast({title:'搜索内容不能为空~',icon: 'none'})
}else {
self.getSearchHistory();
app.post(url, params, header).then((res) => {
// console.log('搜索结果', res);
if(+res.page < res.page_size) {
self.data.hasMore = true;
}
const list = res.data.map((item, index) => {
return {...item, showlabel_box: false, more: item.more !== '' ? JSON.parse(item.more) : ''}
});
self.setData({
postList: self.data.postList.concat(list)
});
// console.log('搜索结果', self.data.postList);
})
}
},
//点击量
hit(current) {
let url = '/home/home/hits';
let params = {
id: this.data.postList[current].id,
token: wx.getStorageSync('token'),
keyword:self.data.searchValue,
};
let header = { "XX-Token": wx.getStorageSync('token') };
app.post(url, params, header).then((res) => {
// console.log('点击量',res);
if(res.message == "操作成功") {
const post_hits = this.data.postList[current].post_hits +1
this.setData({
[`postList[${current}].post_hits`]: post_hits
console.log('搜索历史列表', res);
wx.hideLoading();
if(+res.code === 1) {
if(res.data.list.length === 0) {
wx.showToast({title:'暂无更多内容',icon:'none'})
}else {
self.setData({
postList: res.data.list
});
}
}
})
},
//清空输入框
clearInput() {
this.setData({searchValue: ''})
},
//搜索历史列表
getSearchHistory() {
let self = this;
let url = '/home/home/search_history';
let header = {
"XX-Token": wx.getStorageSync('token')
};
app.post(url, {}, header).then((res) => {
// console.log('搜索历史列表', res);
self.setData({
searchHistory: res
//点击热门搜索
clickHot(e) {
const current = e.currentTarget.dataset.index;
this.setData({
searchValue: this.data.hot[current].title,
});
})
wx.showLoading({title: '加载中',});
this.startSearch();
this.getSearchHistory()
},
//点击搜索历史
clickHistory(e) {
const current = e.currentTarget.dataset.index;
const list = [{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多'}]//假数据
this.setData({
searchValue: this.data.searchHistory[current].keyword,
postList:list,
searchValue: this.data.history[current].title,
});
this.startSearch()
wx.showLoading({title: '加载中',});
this.startSearch();
this.getSearchHistory()
},
//清空历史搜索
clearHistory() {
let self = this;
let url = '/home/home/clear_search';
let header = {
"XX-Token": wx.getStorageSync('token')
let url = '/portal/Active/delHistory';
let params = {
token: wx.getStorageSync('token'),
};
app.post(url, {}, header).then((res) => {
// console.log('清空搜索历史列表', res);
app.post(url, params, {}).then((res) => {
console.log('清空搜索历史列表', res);
wx.showLoading({title: '加载中',});
if(+res.code === 1) {
wx.showToast({title:res.message,icon:'none'})
}
self.getSearchHistory()
})
},
//个人信息弹框
showModal(e) {
let that = this;
const current = e.currentTarget.dataset.index;
if(that.data.currentModal === current) {
that.data.postList[current].showlabel_box = !that.data.postList[current].showlabel_box;
}else {
that.data.postList[current].showlabel_box = !that.data.postList[current].showlabel_box;
that.data.postList[that.data.currentModal].showlabel_box = false;
}
that.setData({
postList: that.data.postList,
currentModal: current
});
},
//复制微信号
clickCopy(e) {
const current = e.currentTarget.dataset.index;
wx.setClipboardData({
data: this.data.postList[current].wxn,
success:function (res) {
// console.log('复制微信号',res);
}
});
this.setData({
[`postList[${this.data.currentModal}].showlabel_box`]: false
});
},
//进入主页
enterHomePage(e) {
let self = this;
const current = e.currentTarget.dataset.index;
wx.navigateTo({
url: '/pages/service/myindex/myindex?user_id=' + self.data.postList[current].user_id
});
self.setData({
[`postList[${self.data.currentModal}].showlabel_box`]: false
});
},
//举报
report(e) {
let self = this;
const current = e.currentTarget.dataset.index;
const to_user_id = self.data.postList[current].user_id;
const post_id = self.data.postList[current].id;
wx.navigateTo({url:'/pages/report/report?to_user_id=' + to_user_id + '&post_id=' + post_id});
self.setData({
[`postList[${self.data.currentModal}].showlabel_box`]: false
});
},
//查看文章详情
goPostDetail(e) {
const current = e.currentTarget.dataset.index;
const list = this.data.postList.map((item,index) => {
return {...item, showlabel_box: false}
});//进入详情时关闭所有弹框
this.setData({
postList: list,
currentPost: current
});
this.hit(current);
wx.navigateTo({
url: '../../rentingDetail/rentingDetail?post_id=' + this.data.postList[current].id,
})
// //查看文章详情
// goPostDetail(e) {
// const current = e.currentTarget.dataset.index;
// const list = this.data.postList.map((item,index) => {
// return {...item, showlabel_box: false}
// });//进入详情时关闭所有弹框
// this.setData({
// postList: list,
// currentPost: current
// });
// this.hit(current);
// wx.navigateTo({
// url: '../../rentingDetail/rentingDetail?post_id=' + this.data.postList[current].id,
// })
},
//收藏、取消收藏
delArticles(e) {
let self = this;
const current = e.currentTarget.dataset.index;
let url = '/home/home/collect';
let url_del = '/home/home/collect_del';
let header = {
"XX-Token": wx.getStorageSync('token')
};
let params = {
id: self.data.postList[current].id,
};
if(self.data.postList[current].is_hits) {
app.post(url_del, params, header).then((res) => {
// console.log('取消收藏', res);
if(res.message == "操作成功") {
self.setData({
[`postList[${current}].is_hits`]: 0
});
}
})
}else {
app.post(url, params, header).then((res) => {
// console.log('收藏', res);
if(res.message == "操作成功") {
self.setData({
[`postList[${current}].is_hits`]: 1
});
}
})
}
},
//点赞/取消赞
clickZan(e) {
let self = this;
let current = e.currentTarget.dataset.index;
let postList = self.data.postList;
let url = '/home/home/like';
let url_del = '/home/home/like_del';
let header = {
"XX-Token": wx.getStorageSync('token')
};
// },
//获取热门搜索和搜索历史
getSearchHistory() {
const self = this;
let url = '/portal/Active/find';
let params = {
id: self.data.postList[current].id,
// activeId: self.data.detail_id,
token: wx.getStorageSync('token'),
};
if(postList[current].is_paise) {
app.post(url_del, params, header).then((res) => {
// console.log('取消赞', res);
if(res.message == "操作成功") {//局部刷新赞数和头像
const post_like = postList[current].post_like - 1;
self.setData({
[`postList[${current}].is_paise`]: 0,
[`postList[${current}].post_like`]: post_like,
});
const paise_user = [];
postList[current].paise_user.map((item) => {
if(item !== res.data) {
paise_user.push(item)
}
});
self.setData({
[`postList[${current}].paise_user`]: paise_user,
})
}
})
}else {
app.post(url, params, header).then((res) => {
// console.log('点赞', res);
if(res.message == "操作成功") {//局部刷新赞数和头像
const post_like = postList[current].post_like + 1;
// let header = {
// "token": wx.getStorageSync('token')
// };
app.post(url, params, {}).then((res) => {
console.log('获取热门搜索和搜索历史', res);
if (+res.code === 1) {
wx.hideLoading();
self.setData({
[`postList[${current}].is_paise`]: 1,
[`postList[${current}].post_like`]: post_like,
hot: res.data.hot,
history:res.data.history
// end_time: res.data.active.time,
// over_hours:res.data.active.over_time,//几小时截止
});
if(postList[current].paise_user !== undefined) {
const paise_user = postList[current].paise_user;
self.setData({
[`postList[${current}].paise_user`]: paise_user.concat(res.data),
})
}else {
const paise_user = [];
paise_user.push(res.data);
self.setData({
[`postList[${current}].paise_user`]: paise_user,
})
}
}
})
// self.countDown();
}
},
//去评论
goComment() {
wx.navigateTo({
url: '/pages/service/comment/comment?post_id=' +
this.data.postList[this.data.currentPost].id +
'&is_post_list=' + true
})
},
//获取用户id
personInfo() {
let url = '/home/me/index';
let header = {
"XX-Token": wx.getStorageSync('token')
};
let params = {}
app.post(url, params, header).then((res) => {
console.log(res)
this.setData({
userId: res.id,
});
console.log(this.data.userId)
// wx.hideLoading()
})
},
onLoad: function (options) {
const self = this;
... ... @@ -307,54 +204,8 @@ Page({
order: +options.order,
select_id: +options.select_id,
});
self.personInfo();
self.getSearchHistory();
},
refreshPostCollect() {
const postList = this.data.postList;
const currentPost = this.data.currentPost;
// console.log('刷新前长度', postList[currentPost].is_hits);
if(this.data.is_collect) {
this.setData({
[`postList[${currentPost}].is_hits`]: 1,
})
}else {
this.setData({
[`postList[${currentPost}].is_hits`]: 0,
})
}
// console.log('刷新后长度', postList[currentPost].is_hits);
},
refreshPostComment() {
const postList = this.data.postList;
const currentPost = this.data.currentPost;
// console.log('刷新前长度', postList[currentPost].comments.length);
if(this.data.is_comment) {
this.setData({[`postList[${currentPost}].comments[0].length`]: this.data.length})
}
// console.log('刷新后长度', postList[currentPost].comments[0].length);
},
refreshPostLike() {
const postList = this.data.postList;
const currentPost = this.data.currentPost;
if(this.data.is_paise) {
const post_like = postList[currentPost].post_like +1;
this.setData({
[`postList[${currentPost}].is_paise`]: 1,
[`postList[${currentPost}].post_like`]: post_like,
[`postList[${currentPost}].paise_user`]: this.data.paise_user,
})
// console.log('点赞', postList[currentPost].post_like);
}else {
const post_like = postList[currentPost].post_like -1;
this.setData({
[`postList[${currentPost}].is_paise`]: 0,
[`postList[${currentPost}].post_like`]: post_like,
[`postList[${currentPost}].paise_user`]: this.data.paise_user,
})
// console.log('取消赞', postList[currentPost].post_like);
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ... @@ -366,7 +217,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
wx.showLoading({title: '加载中',});
},
/**
... ...
... ... @@ -14,9 +14,9 @@
<view class="title">热门搜索</view>
</view>
<view class="history_list {{searchHistory.length === 0?'text-center':''}}">
<text wx:if="{{searchHistory.length === 0}}">暂无搜索历史~</text>
<view wx:elseif wx:for="{{searchHistory}}" wx:key="index" bindtap="clickHistory" data-index="{{index}}">{{item.keyword}}</view>
<view class="history_list {{hot.length === 0?'text-center':''}}">
<text wx:if="{{hot.length === 0}}">暂无热门搜索~</text>
<view wx:elseif wx:for="{{hot}}" wx:key="index" bindtap="clickHot" data-index="{{index}}">{{item.title}}</view>
</view>
</view>
... ... @@ -29,22 +29,26 @@
</view>
</view>
<view class="history_list {{searchHistory.length === 0?'text-center':''}}">
<text wx:if="{{searchHistory.length === 0}}">暂无搜索历史~</text>
<view wx:elseif wx:for="{{searchHistory}}" wx:key="index" bindtap="clickHistory" data-index="{{index}}">{{item.keyword}}</view>
<view class="history_list {{history.length === 0?'text-center':''}}">
<text wx:if="{{history.length === 0}}">暂无搜索历史~</text>
<view wx:elseif wx:for="{{history}}" wx:key="index" bindtap="clickHistory" data-index="{{index}}">{{item.title}}</view>
</view>
</view>
<!--文章内容-->
<view class='content_box post_box' wx:if="{{postList.length > 0}}">
<view class='content_item' wx:for="{{postList}}" wx:key="index" bindtap='goPostDetail' data-index="{{index}}">
<image src="../../images/lishi@2x.png" class="thumb"></image>
<!--<view class="no-data" wx:if="{{postList.length === 0}}">暂无内容</view>-->
<view class='content_item' wx:for="{{postList}}" wx:key="index" bindtap='goPostDetail'
data-id="{{item.id}}" data-type="{{item.type}}">
<!--<image src="../../images/lishi@2x.png" class="thumb"></image>-->
<image src="{{item.pic}}" class="thumb"></image>
<view class="lish-right">
<view class="title">{{item.title}}</view>
<view class="title">{{item.address}}</view>
<view class="time">{{item.time}}</view>
<view class="name-box">
<image src="../../images/avatar@2x.png" class="avatar"></image>
<text>{{item.name}}</text>
<!--<image src="../../images/avatar@2x.png" class="avatar"></image>-->
<image src="{{item.userPic}}" class="avatar"></image>
<text>{{item.userName}}</text>
</view>
</view>
</view>
... ...
... ... @@ -41,37 +41,64 @@ Page({
is_showAnswer: false,
is_showUserInfo:false,
is_answer: false,
is_write:2,//1:已填写,2:未填写
},
goActivityDetail() {
//是否填写个人信息
getIsWrite() {
const self = this;
let url = '/portal/Send/isWrite';
let params = {
token: wx.getStorageSync('token'),
};
let header = {
"token": wx.getStorageSync('token')
};
app.post(url, params, {}).then((res) => {
console.log('是否填写个人信息', res);
if (+res.code === 1) {
self.setData({
is_write:res.data.is_write,//1:已填写2:未填写
});
// console.log(this.data.this_week_test_info);
}
})
},
goActivityDetail(e) {
const id = +e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/activity/detail/detail',
url: '/pages/activity/detail/detail?id=' + id,
})
},
goMealDetail() {
goMealDetail(e) {
const id = +e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/meal/detail/detail',
url: '/pages/meal/detail/detail?id=' + id,
})
},
//发布拼活动
releaseActivity() {
this.setData({is_showRelease:false,});
wx.navigateTo({
url: '/pages/activity/activity',
})
});
},
//发布拼餐
releaseMeal() {
this.setData({is_showRelease:false,});
wx.navigateTo({
url: '/pages/meal/meal',
})
},
//完善个人信息
goUserInfo() {
this.setData({is_showUserInfo: false});
wx.navigateTo({
url: '/pages/my/edit-info/edit-info',
})
},
//去答题
goAnswer() {
this.setData({is_showAnswer: false});
wx.navigateTo({
url: '/pages/index/answer-question/answer-question',
})
... ... @@ -79,7 +106,7 @@ Page({
disableScroll() {},
handleBackground() {
console.log('dianji');
this.setData({is_showAnswer: false,is_showUserInfo:false,})
this.setData({is_showAnswer: false, is_showUserInfo: false,is_showRelease:false,})
},
//搜索
search() {
... ... @@ -230,13 +257,18 @@ Page({
release(e) {
console.log('发布');
const self = this;
if(!self.data.is_answer) {
if (+self.data.is_write === 2 && wx.getStorageSync('is_canSend') === 2 ){ //没填写个人信息并且不可以发布 =>去填写
self.setData({
is_showAnswer: true
is_showUserInfo: true //弹出 去填写个人信息弹框
});
}else {
} else if(+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 2) { //已填写且不能发布=>去答题
self.setData({
is_showAnswer: true //弹出 去答题弹框
});
}else if(+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 1 && wx.getStorageSync('is_answer') === 1){ //已填写且可以发布 =>去发布
self.setData({
is_showUserInfo: true
is_showRelease: true //弹出 去答题弹框
});
}
},
... ... @@ -355,7 +387,8 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log('options', options);
this.setData({current:+options.current?+options.current:0})
},
/**
... ... @@ -371,6 +404,7 @@ Page({
onShow: function () {
const self = this;
self.getLocation();
self.getIsWrite();
},
/**
... ...
... ... @@ -16,8 +16,8 @@
</view>
<view class='tab_box'>
<view class="tab_item {{current==0?'active':''}}" data-current='0' bindtap='chargeTab'>拼餐</view>
<view class="tab_item {{current==1?'active':''}}" data-current='1' bindtap='chargeTab'>拼活动</view>
<view class="tab_item {{current==0?'active':''}}" data-current='{{0}}' bindtap='chargeTab'>拼餐</view>
<view class="tab_item {{current==1?'active':''}}" data-current='{{1}}' bindtap='chargeTab'>拼活动</view>
</view>
<view class="sort-select-box">
... ... @@ -85,31 +85,35 @@
<view class='content_box' wx:if='{{current==0}}'>
<view class="no-data" wx:if="{{list.length === 0}}">暂无拼餐活动</view>
<view class='content_item' wx:for='{{list}}' wx:key="index" wx:if="{{list.length>0}}"
bindtap='goMealDetail' data-index="{{index}}">
<image src="http://pk86rwhci.bkt.clouddn.com/activity_img@2x.png"></image>
bindtap='goMealDetail' data-index="{{index}}" data-id="{{item.id}}">
<!--<image src="http://pk86rwhci.bkt.clouddn.com/activity_img@2x.png"></image>-->
<image src="{{item.pic}}"></image>
<view class="title">
<text class="area">{{item.area}}</text>
<text class="num">还差{{item.num}}人</text>
<text class="area">{{item.address}}</text>
<text class="num">还差{{item.people}}人</text>
</view>
<view class="user">
<image src="../../images/avatar@2x.png" class="avatar"></image>
<text>{{item.name}}</text>
<!--<image src="../../images/avatar@2x.png" class="avatar"></image>-->
<image src="{{item.userPic}}" class="avatar"></image>
<text>{{item.userName}}</text>
</view>
</view>
</view>
<!--拼活动-->
<view class="content_box" wx:if='{{current==1}}'>
<view class="no-data" wx:if="{{list.length === 0}}">暂无拼活动</view>
<view class="no-data" wx:if="{{list.length === 0}}">暂无拼活动</view>
<view class='content_item' wx:for='{{list}}' wx:key="index" wx:if="{{list.length>0}}"
bindtap='goActivityDetail' data-index="{{index}}">
<image src="http://pk86rwhci.bkt.clouddn.com/b1@2x%20%281%29.png"></image>
bindtap='goActivityDetail' data-index="{{index}}" data-id="{{item.id}}">
<!--<image src="http://pk86rwhci.bkt.clouddn.com/b1@2x%20%281%29.png"></image>-->
<image src="{{item.pic}}"></image>
<view class="title">
<text class="area">{{item.area}}</text>
<text class="num">还差{{item.num}}人</text>
<text class="area">{{item.address}}</text>
<text class="num">还差{{item.people}}人</text>
</view>
<view class="user">
<image src="../../images/avatar@2x.png" class="avatar"></image>
<text>{{item.name}}</text>
<!--<image src="../../images/avatar@2x.png" class="avatar"></image>-->
<image src="{{item.userPic}}" class="avatar"></image>
<text>{{item.userName}}</text>
</view>
</view>
</view>
... ... @@ -133,7 +137,9 @@
<view class="title">请先完善个人信息</view>
<view class="answer-btn" bindtap="goUserInfo">完成</view>
</view>
<view class="release-btn-box" wx:if="{{is_showUserInfo}}">
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<!--发布-->
<view class="release-btn-box" wx:if="{{is_showRelease}}">
<view class="left-btn" bindtap="releaseMeal">
<image src="../../images/pincan@2x.png"></image>
<view class="text">发布拼餐</view>
... ... @@ -143,4 +149,4 @@
<view class="text">发布拼活动</view>
</view>
</view>
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
\ No newline at end of file
<view class="modal_box" wx:if="{{is_showRelease}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
\ No newline at end of file
... ...