24 changed files with 826 additions and 32 deletions
@ -0,0 +1,159 @@ |
|||
// pages/info/groupOrderInfo/index.js
|
|||
import commonApi from "../../../utils/https/common" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
info:null, |
|||
keywords:"", |
|||
id:null, |
|||
img:null |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
id:options.id |
|||
}) |
|||
|
|||
}, |
|||
edit:function(e){ |
|||
let item = e.currentTarget.dataset.item |
|||
wx.navigateTo({ |
|||
url: '/pages/order/joinOrder/index?id='+item.team_id+'&mid='+item.id+'&oid='+this.data.id |
|||
}) |
|||
}, |
|||
delItem:function(e){ |
|||
// 删除团员
|
|||
let item = e.currentTarget.dataset.item,index = e.currentTarget.dataset.index,info = this.data.info,that = this |
|||
wx.showModal({ |
|||
title:"提示", |
|||
content:"确定删除该团员吗?", |
|||
success:function(res){ |
|||
if(res.confirm){ |
|||
commonApi.user_post("team_order/del",{ |
|||
team_id:item.team_id, |
|||
member_id:item.id |
|||
}).then(res=>{ |
|||
if(res.code==1){ |
|||
wx.showToast({ |
|||
title: '删除成功', |
|||
icon:'success' |
|||
}) |
|||
info.list.members.splice(index,1) |
|||
that.setData({ |
|||
info:info |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
changeKeywords:function(e){ |
|||
this.setData({ |
|||
keywords:e.detail.value |
|||
}) |
|||
}, |
|||
search:function(e){ |
|||
commonApi.user_post("team_order/get_team_detail",{ |
|||
order_id:this.data.id, |
|||
name:this.data.keywords |
|||
}).then(res=>{ |
|||
if(res.code==1){ |
|||
this.setData({ |
|||
info:res.data |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
order:function(){ |
|||
commonApi.user_post("team_order/create",{ |
|||
team_id:this.data.info.list.id |
|||
}).then(res=>{ |
|||
if(res.code==1){ |
|||
// todo
|
|||
wx.navigateTo({ |
|||
url: '/pages/user/order/groupOrderInfo/index?id=', |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
commonApi.user_post("team_order/get_team_detail",{ |
|||
order_id:this.data.id |
|||
}).then(res=>{ |
|||
if(res.code==1){ |
|||
this.setData({ |
|||
info:res.data |
|||
}) |
|||
commonApi._post("scene/detail_for_venue",{ |
|||
id:res.data.list.scene_id |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
img:res.data.headimg |
|||
}) |
|||
this.onShareAppMessage() |
|||
}) |
|||
|
|||
} |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
if(this.data.info){ |
|||
return { |
|||
title:"加入我的旅游团", |
|||
path:"/pages/order/joinOrder/index?id="+this.data.info.list.id+'&uid='+this.data.info.list.user_id+'&oid='+this.data.id, |
|||
imageUrl:this.data.img |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
<!--pages/info/groupOrderInfo/index.wxml--> |
|||
<title title="团队信息"></title> |
|||
<view class="box" wx:if="{{info && info.list}}"> |
|||
<view class="code">邀请码:{{info.list.id}}</view> |
|||
<view class="top-tips"> |
|||
<view class="top-tip">预约人数:{{info.list.member_num}}</view> |
|||
<view class="line"></view> |
|||
<view class="top-tip">填写信息人数:{{info.list.members_count}}</view> |
|||
</view> |
|||
<view class="top-btn">立即邀请</view> |
|||
<view class="top-btn full" bindtap="order">提交订单</view> |
|||
</view> |
|||
<view class="box" wx:if="{{info && info.list}}"> |
|||
<view class="box-title">已填写信息团员</view> |
|||
<view class="search-box"> |
|||
<view class="iconfont icon-sousuo"></view> |
|||
<input bindinput="changeKeywords" placeholder="请输入关键字查找" /> |
|||
<view class="btn" bindtap="search">搜索</view> |
|||
</view> |
|||
<view class="item" wx:for="{{info.list.members}}"> |
|||
<view class="item-top"> |
|||
<text>{{item.name}} {{item.mobile}}</text> |
|||
<text>{{item.id_number}}</text> |
|||
</view> |
|||
<view class="item-btns" wx:if="{{info && info.type==1}}"> |
|||
<view bindtap="edit" data-item="{{item}}" class="item-btn">修改</view> |
|||
<view class="item-btn" bindtap="delItem" data-index="{{index}}" data-item="{{item}}">删除</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
@ -0,0 +1,103 @@ |
|||
/* pages/info/groupOrderInfo/index.wxss */ |
|||
page { |
|||
background: #f2f2f2; |
|||
font-size: 30rpx; |
|||
color: #333333; |
|||
} |
|||
.box { |
|||
margin: 30rpx; |
|||
padding: 30rpx; |
|||
border-radius: 20rpx; |
|||
background: white; |
|||
text-align: center; |
|||
} |
|||
.code { |
|||
color: #0B898E; |
|||
font-size: 40rpx; |
|||
font-weight: bold; |
|||
line-height: 100rpx; |
|||
} |
|||
.top-tips { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
margin-top: 30rpx; |
|||
margin-bottom: 50rpx; |
|||
} |
|||
.top-tip { |
|||
width: 50%; |
|||
} |
|||
.top-tips .line { |
|||
width: 2rpx; |
|||
height: 40rpx; |
|||
background: #0B898E; |
|||
flex-shrink: 0; |
|||
} |
|||
.top-btn { |
|||
line-height: 68rpx; |
|||
border: 1rpx solid #0B898E; |
|||
border-radius: 10rpx; |
|||
box-sizing: border-box; |
|||
font-weight: 500; |
|||
color: #0B898E; |
|||
margin-top: 20rpx; |
|||
} |
|||
.top-btn.full { |
|||
background: #0B898E; |
|||
color: #fff; |
|||
} |
|||
.box-title { |
|||
text-align: left; |
|||
font-weight: bold; |
|||
} |
|||
.search-box { |
|||
background: #f2f2f2; |
|||
border-radius: 30rpx; |
|||
height: 60rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
margin: 20rpx 0; |
|||
text-align: left; |
|||
} |
|||
.icon-sousuo { |
|||
font-size: 30rpx; |
|||
color: #666; |
|||
flex-shrink: 0; |
|||
margin: 0 20rpx; |
|||
} |
|||
.search-box input { |
|||
flex: 1; |
|||
font-size: 26rpx; |
|||
display: block; |
|||
width: 500rpx; |
|||
} |
|||
.search-box .btn { |
|||
line-height: 40rpx; |
|||
text-align: center; |
|||
border-left: 1rpx solid #CCCCCC; |
|||
color: #0B898E; |
|||
width: 110rpx; |
|||
flex-shrink: 0; |
|||
font-size: 26rpx; |
|||
} |
|||
.item { |
|||
padding: 30rpx 0; |
|||
border-bottom: 1rpx solid #D8D8D8; |
|||
} |
|||
.item-top { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
.item-btns { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: flex-end; |
|||
color: #0B898E; |
|||
font-size: 26rpx; |
|||
margin-top: 20rpx; |
|||
} |
|||
.item-btn { |
|||
margin-left: 50rpx; |
|||
} |
|||
@ -0,0 +1,164 @@ |
|||
// pages/order/joinOrder/index.js
|
|||
import commonApi from "../../../utils/https/common" |
|||
import util from "../../../utils/util" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
team_id:null, |
|||
info:{}, |
|||
mobile:"" |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
if(!options.id){ |
|||
util.back() |
|||
return; |
|||
} |
|||
this.setData({ |
|||
team_id:options.id, |
|||
info:{ |
|||
team_id:options.id |
|||
} |
|||
}) |
|||
commonApi.user_post("uservice/user/getMyInfo",{}).then(res=>{ |
|||
if(res.code==1){ |
|||
this.setData({ |
|||
mobile:res.data.mobile |
|||
}) |
|||
if(options.uid && res.data.id && options.uid==res.data.id && !options.mid){ |
|||
// 是发起人的话 直接取团购订单详情页
|
|||
wx.redirectTo({ |
|||
url: '/pages/info/groupOrderInfo/index?id='+options.oid, |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
if(options.mid && options.oid){ |
|||
// 如果是编辑来的
|
|||
commonApi.user_post("team_order/get_team_detail",{ |
|||
order_id:options.oid |
|||
}).then(res=>{ |
|||
if(res.code==1){ |
|||
let item = res.data.list.members.find(i=>i.id==options.mid); |
|||
let info = { |
|||
team_id:options.id, |
|||
member_id:options.mid, |
|||
name:item.name, |
|||
id_number:item.id_number, |
|||
mobile:item.mobile |
|||
} |
|||
this.setData({ |
|||
info:info |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
changeName:function(e){ |
|||
let info = this.data.info |
|||
info.name=e.detail.value |
|||
this.setData({ |
|||
info:info |
|||
}) |
|||
}, |
|||
changeId:function(e){ |
|||
let info = this.data.info |
|||
info.id_number=e.detail.value |
|||
this.setData({ |
|||
info:info |
|||
}) |
|||
}, |
|||
submit:function(e){ |
|||
let info = this.data.info |
|||
|
|||
if(!info.name){ |
|||
wx.showToast({ |
|||
title: '请输入姓名', |
|||
icon:'none' |
|||
}) |
|||
return; |
|||
} |
|||
if(info.id_number.length!=18){ |
|||
wx.showToast({ |
|||
title: '请输入正确的身份证号码', |
|||
icon:'none' |
|||
}) |
|||
return; |
|||
} |
|||
let service="team_order/appoint" |
|||
if(info.member_id){ |
|||
// 编辑的
|
|||
service="team_order/update" |
|||
} |
|||
else { |
|||
info.type=2 |
|||
info.mobile = this.data.mobile |
|||
} |
|||
commonApi.user_post(service,info).then(res=>{ |
|||
if(res.code==1){ |
|||
wx.showToast({ |
|||
title: '操作成功', |
|||
icon:'success' |
|||
}) |
|||
setTimeout(()=>{ |
|||
util.back() |
|||
},500) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
<!--pages/order/joinOrder/index.wxml--> |
|||
<title title="团员资料填写"></title> |
|||
<view class="input-item"> |
|||
<view class="input-left">姓名:</view> |
|||
<input type="text" bindinput="changeName" value="{{info.name}}" placeholder="请填写预约人姓名" /> |
|||
</view> |
|||
<view class="input-item"> |
|||
<view class="input-left">身份证:</view> |
|||
<input type="text" bindinput="changeId" value="{{info.id_number}}" placeholder="请填写预约人身份证号码" /> |
|||
</view> |
|||
<view bindtap="submit" class="btn">提交</view> |
|||
@ -0,0 +1,25 @@ |
|||
/* pages/order/joinOrder/index.wxss */ |
|||
.input-item { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
font-size: 30rpx; |
|||
margin:0 30rpx; |
|||
height: 120rpx; |
|||
border-bottom: 1rpx solid #d8d8d8; |
|||
} |
|||
.input-item input { |
|||
display: block; |
|||
width: 560rpx; |
|||
} |
|||
.btn { |
|||
width: 632rpx; |
|||
line-height: 70rpx; |
|||
text-align: center; |
|||
background: #0B898E; |
|||
border-radius: 20rpx; |
|||
margin: 0 auto; |
|||
margin-top: 400rpx; |
|||
color: #ffffff; |
|||
font-size: 30rpx; |
|||
} |
|||
@ -0,0 +1,96 @@ |
|||
// pages/pbService/group/index.js
|
|||
import commonApi from "../../../utils/https/common" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
list:[], |
|||
count:1, |
|||
keywords:'', |
|||
realKeywords:"" |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.getList() |
|||
}, |
|||
changeKeywords:function(e){ |
|||
this.setData({ |
|||
keywords:e.detail.value |
|||
}) |
|||
}, |
|||
search:function(){ |
|||
this.setData({ |
|||
realKeywords:this.data.keywords, |
|||
list:[], |
|||
count:1 |
|||
}) |
|||
this.getList() |
|||
}, |
|||
getList:function(){ |
|||
if(this.data.count<=this.data.list.length) return; |
|||
commonApi._post('team_order/get_team_scene_list',{ |
|||
offset:this.data.list.length, |
|||
limit:10, |
|||
title:this.data.realKeywords |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
list:this.data.list.concat(res.data.list), |
|||
count:res.data.count |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.getList() |
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
<!--pages/pbService/group/index.wxml--> |
|||
<title title="场馆列表"></title> |
|||
<view class="fixed-search"> |
|||
<view class="search-box"> |
|||
<view class="iconfont icon-sousuo"></view> |
|||
<input bindinput="changeKeywords" placeholder="请输入关键字查找" /> |
|||
<view class="btn" bindtap="search">搜索</view> |
|||
</view> |
|||
</view> |
|||
<view style="height:60rpx"></view> |
|||
<navigator url="/pages/info/museumInfo/index?id={{item.id}}&isGroup=1" class="group-item" wx:for="{{list}}"> |
|||
<image src="{{item.headimg}}" mode="aspectFill"></image> |
|||
<view class="group-info"> |
|||
<view class="group-title textOver">{{item.title}}</view> |
|||
<view class="iconfont textOver"><text class="icon-dianhua3"></text>电话:{{item.tel}}</view> |
|||
<view class="iconfont textOver"><text class="icon-location1"></text>{{item.address}}</view> |
|||
<view class="group-bottom"> |
|||
<view class="group-price" wx:if="{{!item.price || item.price==0}}">免费</view> |
|||
<view class="group-price group-price-tip" wx:else>{{item.price/100}}</view> |
|||
<view class="group-btn">点击预约</view> |
|||
</view> |
|||
</view> |
|||
</navigator> |
|||
@ -0,0 +1,116 @@ |
|||
/* pages/pbService/group/index.wxss */ |
|||
.search-box { |
|||
background: white; |
|||
border-radius: 30rpx; |
|||
height: 60rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
.fixed-search { |
|||
position: fixed; |
|||
padding: 9rpx 30rpx; |
|||
background: #F2F2F2; |
|||
} |
|||
.icon-sousuo { |
|||
font-size: 30rpx; |
|||
color: #666; |
|||
flex-shrink: 0; |
|||
margin: 0 20rpx; |
|||
} |
|||
.fixed-search input { |
|||
flex: 1; |
|||
font-size: 26rpx; |
|||
display: block; |
|||
width: 500rpx; |
|||
} |
|||
.search-box .btn { |
|||
line-height: 40rpx; |
|||
text-align: center; |
|||
border-left: 1rpx solid #CCCCCC; |
|||
color: #0B898E; |
|||
width: 110rpx; |
|||
flex-shrink: 0; |
|||
font-size: 26rpx; |
|||
} |
|||
page { |
|||
background: #F2F2F2; |
|||
} |
|||
.group-item { |
|||
margin: 30rpx; |
|||
background: white; |
|||
border-radius: 20rpx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
padding: 20rpx; |
|||
} |
|||
.group-item image { |
|||
width: 220rpx; |
|||
height: 220rpx; |
|||
display: block; |
|||
flex-shrink: 0; |
|||
border-radius: 10rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
.group-info { |
|||
flex: 1; |
|||
width: 400rpx; |
|||
height: 220rpx; |
|||
} |
|||
.group-item .iconfont { |
|||
color: #888888; |
|||
font-size: 26rpx; |
|||
line-height: 50rpx; |
|||
} |
|||
.group-item .iconfont text { |
|||
color: #0B898E; |
|||
font-size: 30rpx; |
|||
margin-right: 10rpx; |
|||
} |
|||
.group-title { |
|||
color: #333333; |
|||
font-size: 30rpx; |
|||
font-weight: bold; |
|||
margin-bottom: 10rpx; |
|||
} |
|||
.group-bottom { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
.group-price { |
|||
font-weight: bold; |
|||
color: #FF5555; |
|||
font-size: 30rpx; |
|||
} |
|||
.group-btn { |
|||
width: 140rpx; |
|||
line-height: 50rpx; |
|||
background: #0B898E; |
|||
border-radius: 25rpx; |
|||
text-align: center; |
|||
color: #fff; |
|||
font-size: 26rpx; |
|||
margin-top: 10rpx; |
|||
font-weight: 500; |
|||
} |
|||
.group-price-tip::before{ |
|||
content:"¥"; |
|||
font-size: 26rpx; |
|||
font-weight: normal; |
|||
} |
|||
.group-price-tip::after{ |
|||
content:"起"; |
|||
color: #666; |
|||
font-size: 22rpx; |
|||
display: inline-block; |
|||
width: 26rpx; |
|||
text-align: right; |
|||
font-weight: normal; |
|||
} |
|||
.group-price-tip { |
|||
font-size: 36rpx; |
|||
} |
|||
.iconfont text.icon-dianhua3 { |
|||
font-size: 28rpx; |
|||
} |
|||
Loading…
Reference in new issue