Browse Source

更新下

master
Myth 5 years ago
parent
commit
97e61afc89
  1. 3
      app.json
  2. 159
      pages/info/groupOrderInfo/index.js
  3. 5
      pages/info/groupOrderInfo/index.json
  4. 30
      pages/info/groupOrderInfo/index.wxml
  5. 103
      pages/info/groupOrderInfo/index.wxss
  6. 14
      pages/info/museumInfo/index.js
  7. 2
      pages/info/museumInfo/index.wxml
  8. 11
      pages/order/components/contact/index.js
  9. 2
      pages/order/components/contact/index.wxml
  10. 5
      pages/order/components/date/index.js
  11. 164
      pages/order/joinOrder/index.js
  12. 5
      pages/order/joinOrder/index.json
  13. 11
      pages/order/joinOrder/index.wxml
  14. 25
      pages/order/joinOrder/index.wxss
  15. 44
      pages/order/scene/index.js
  16. 10
      pages/order/scene/index.wxml
  17. 96
      pages/pbService/group/index.js
  18. 5
      pages/pbService/group/index.json
  19. 23
      pages/pbService/group/index.wxml
  20. 116
      pages/pbService/group/index.wxss
  21. 5
      pages/pbService/index.wxml
  22. 2
      pages/pbService/web/index.js
  23. 14
      project.private.config.json
  24. 4
      utils/https.js

3
app.json

@ -18,6 +18,7 @@
"pages/order/scene/index", "pages/order/scene/index",
"pages/order/hotel/index", "pages/order/hotel/index",
"pages/order/card/index", "pages/order/card/index",
"pages/order/joinOrder/index",
"pages/order/postOrder/index", "pages/order/postOrder/index",
"pages/order/showOrder/index", "pages/order/showOrder/index",
"pages/info/newsInfo/index", "pages/info/newsInfo/index",
@ -35,6 +36,7 @@
"pages/info/showInfo/index", "pages/info/showInfo/index",
"pages/info/strategyInfo/index", "pages/info/strategyInfo/index",
"pages/info/guideInfo/index", "pages/info/guideInfo/index",
"pages/info/groupOrderInfo/index",
"pages/user/user", "pages/user/user",
"pages/user/retail/index", "pages/user/retail/index",
"pages/user/retail/apply/index", "pages/user/retail/apply/index",
@ -121,6 +123,7 @@
"pages/pbService/wwcx/index", "pages/pbService/wwcx/index",
"pages/pbService/wwcx/info/index", "pages/pbService/wwcx/info/index",
"pages/pbService/wwcx/search/index", "pages/pbService/wwcx/search/index",
"pages/pbService/group/index",
"pages/ask/index", "pages/ask/index",
"pages/ask/info/index", "pages/ask/info/index",
"pages/ask/my/index", "pages/ask/my/index",

159
pages/info/groupOrderInfo/index.js

@ -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
}
}
}
})

5
pages/info/groupOrderInfo/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

30
pages/info/groupOrderInfo/index.wxml

@ -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>

103
pages/info/groupOrderInfo/index.wxss

@ -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;
}

14
pages/info/museumInfo/index.js

@ -22,7 +22,8 @@ Page({
product:null, product:null,
time:null, time:null,
date:null, date:null,
retailId:"" retailId:"",
isGroup:null
}, },
/** /**
@ -32,6 +33,11 @@ Page({
this.setData({ this.setData({
id:options.id id:options.id
}) })
if(options.isGroup){
this.setData({
isGroup:options.isGroup
})
}
if(options.retailId){ if(options.retailId){
this.setData({ this.setData({
retailId:options.retailId retailId:options.retailId
@ -67,7 +73,7 @@ Page({
this.getAct() this.getAct()
}, },
getAct:function(){ getAct:function(){
if(this.data.actList.length>=this.data.actTotal) return; if(this.data.actList.length>=this.data.actTotal || this.data.isGroup==1) return;
commonApi._post('scene/get_scene_act_list',{ commonApi._post('scene/get_scene_act_list',{
scene_id:this.data.id, scene_id:this.data.id,
page_no:1, page_no:1,
@ -146,7 +152,8 @@ Page({
product:this.data.info.product_venue, product:this.data.info.product_venue,
sku:this.data.info.product_venue.sku[0], sku:this.data.info.product_venue.sku[0],
infoDate:this.data.date, infoDate:this.data.date,
infoTime:this.data.time infoTime:this.data.time,
isGroup:this.data.isGroup
} }
wx.navigateTo({ wx.navigateTo({
url: '/pages/order/scene/index?type=museum' url: '/pages/order/scene/index?type=museum'
@ -203,6 +210,7 @@ Page({
}, },
onPageScroll:function(e){ onPageScroll:function(e){
if(this.data.isGroup) return;
let topHeight = this.data.top + (102 * ratio),that = this; let topHeight = this.data.top + (102 * ratio),that = this;
wx.createSelectorQuery().select('#content').boundingClientRect(function(rect){ wx.createSelectorQuery().select('#content').boundingClientRect(function(rect){
if(rect.top<=topHeight){ if(rect.top<=topHeight){

2
pages/info/museumInfo/index.wxml

@ -14,7 +14,7 @@
<view class="location"><text class="iconfont icon-location"></text>{{info.address}}</view> <view class="location"><text class="iconfont icon-location"></text>{{info.address}}</view>
<view class="location" style="margin-bottom:0"><text class="iconfont icon-dianhua2"></text>{{info.tel}}</view> <view class="location" style="margin-bottom:0"><text class="iconfont icon-dianhua2"></text>{{info.tel}}</view>
</view> </view>
<view class="menu-box{{fixed?' menu-fixed':''}}" style="top:{{top}}px"> <view class="menu-box{{fixed?' menu-fixed':''}}" style="top:{{top}}px" wx:if="{{isGroup!=1}}">
<view class="menu-item{{type==1?' active':''}}" bindtap="changeType" data-type="1">场馆介绍</view> <view class="menu-item{{type==1?' active':''}}" bindtap="changeType" data-type="1">场馆介绍</view>
<view class="menu-item{{type==2?' active':''}}" bindtap="changeType" data-type="2">场馆活动</view> <view class="menu-item{{type==2?' active':''}}" bindtap="changeType" data-type="2">场馆活动</view>
</view> </view>

11
pages/order/components/contact/index.js

@ -28,13 +28,17 @@ Component({
selectLinkman:[], selectLinkman:[],
linkmanList:[], linkmanList:[],
showMask:false, showMask:false,
editId:null editId:null,
isGroup:null
}, },
lifetimes: { lifetimes: {
attached: function() { attached: function() {
// 在组件实例进入页面节点树时执行 // 在组件实例进入页面节点树时执行
// 获取默认联系人 // 获取默认联系人
commonApi.user_post("token/check").then(res=>{ commonApi.user_post("token/check").then(res=>{
this.setData({
isGroup:app.globalData.product.isGroup
})
if(res.code==1){ if(res.code==1){
userApi.user_post("user/getDefaultContact",{ userApi.user_post("user/getDefaultContact",{
contactType:"CONTACT" contactType:"CONTACT"
@ -57,6 +61,7 @@ Component({
pageLifetimes: { pageLifetimes: {
show: function() { show: function() {
// 页面被展示 // 页面被展示
if(this.data.editId){ if(this.data.editId){
let editId = this.data.editId; let editId = this.data.editId;
userApi.user_post("user/getContactInfoById",{ userApi.user_post("user/getContactInfoById",{
@ -219,9 +224,9 @@ Component({
}) })
console.log(traveller_limit_num,num,item) console.log(traveller_limit_num,num,item)
// 如果是要新增选中 并且当前选中数量已经超过或者等于了最大出行人限制 // 如果是要新增选中 并且当前选中数量已经超过或者等于了最大出行人限制
if((app.globalData.kjId || this.properties.type=='activity') && num==1 && item.selected!=1){ if((app.globalData.kjId || this.properties.type=='activity' || app.globalData.product.isGroup==1) && num==1 && item.selected!=1){
wx.showToast({ wx.showToast({
title: '最多只能选择一个出行人', title: app.globalData.product.isGroup==1?'单次只能选择一个发起人':'最多只能选择一个出行人',
icon:'none' icon:'none'
}) })
return; return;

2
pages/order/components/contact/index.wxml

@ -1,6 +1,6 @@
<view class="box"> <view class="box">
<view class="box-title"> <view class="box-title">
<view style="flex:1">出行人信息</view> <view style="flex:1">{{isGroup==1?'发起人信息':'出行人信息'}}</view>
<view class="contact-add" bindtap="showLinkman" wx:if="{{selectLinkman.length>0}}"><text class="iconfont icon-add-select"></text>添加</view> <view class="contact-add" bindtap="showLinkman" wx:if="{{selectLinkman.length>0}}"><text class="iconfont icon-add-select"></text>添加</view>
</view> </view>
<view class="contacts-list" wx:if="{{selectLinkman.length>0}}"> <view class="contacts-list" wx:if="{{selectLinkman.length>0}}">

5
pages/order/components/date/index.js

@ -55,8 +55,10 @@ Component({
}).then(res=>{ }).then(res=>{
// 如果之前已经在详情页面选择了日期的话 默认日期不能是第一个有库存的日期了 // 如果之前已经在详情页面选择了日期的话 默认日期不能是第一个有库存的日期了
if(app.globalData.product.infoDate){ if(app.globalData.product.infoDate){
let dateIndex = res.data.slice(0,3).findIndex(item=>item.date==app.globalData.product.infoDate.date)
this.setData({ this.setData({
activeDate:app.globalData.product.infoDate activeDate:app.globalData.product.infoDate,
moreFlag:dateIndex!=-1
}) })
this.getTimeStock() this.getTimeStock()
this.triggerEvent("onChangeDate",app.globalData.product.infoDate) this.triggerEvent("onChangeDate",app.globalData.product.infoDate)
@ -141,7 +143,6 @@ Component({
} }
}) })
e.detail.short_date = e.detail.date.substr(5,5); e.detail.short_date = e.detail.date.substr(5,5);
console.log(e.detail)
this.setData({ this.setData({
activeDate:e.detail, activeDate:e.detail,
showMoreDateFlag:false, showMoreDateFlag:false,

164
pages/order/joinOrder/index.js

@ -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 () {
}
})

5
pages/order/joinOrder/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

11
pages/order/joinOrder/index.wxml

@ -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>

25
pages/order/joinOrder/index.wxss

@ -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;
}

44
pages/order/scene/index.js

@ -19,7 +19,8 @@ Page({
coupon:app.globalData.couponInfo, coupon:app.globalData.couponInfo,
isLogin:false, isLogin:false,
kjId:null, kjId:null,
gp_id:null gp_id:null,
groupName:""
}, },
/** /**
@ -44,10 +45,15 @@ Page({
product:app.globalData.product, product:app.globalData.product,
singlePrice:this.data.gp_id?app.globalData.product.sku.event_price:app.globalData.product.sku.price singlePrice:this.data.gp_id?app.globalData.product.sku.event_price:app.globalData.product.sku.price
}) })
if(!this.data.kjId && !this.data.gp_id){ if(!this.data.kjId && !this.data.gp_id && this.data.product.isGroup!=1){
this.couponCom = this.selectAllComponents("#coupon")[0]; this.couponCom = this.selectAllComponents("#coupon")[0];
} }
}, },
changeGroupName:function(e){
this.setData({
groupName:e.detail.value
})
},
setLinkman:function(e){ setLinkman:function(e){
let linkmanList = e.detail; let linkmanList = e.detail;
if(this.data.productNum!=linkmanList.length && this.data.coupon){ if(this.data.productNum!=linkmanList.length && this.data.coupon){
@ -55,7 +61,7 @@ Page({
title: '订单价格发生变化,请重新选择优惠券', title: '订单价格发生变化,请重新选择优惠券',
icon: 'none' icon: 'none'
}) })
if(!this.data.kjId && !this.data.gp_id){ if(!this.data.kjId && !this.data.gp_id && this.data.product.isGroup!=1){
this.couponCom.setNullCoupon() this.couponCom.setNullCoupon()
} }
app.globalData.couponInfo = null; app.globalData.couponInfo = null;
@ -92,7 +98,7 @@ Page({
icon: 'none' icon: 'none'
}) })
} }
if(!this.data.kjId && !this.data.gp_id){ if(!this.data.kjId && !this.data.gp_id && this.data.product.isGroup!=1){
this.couponCom.setNullCoupon() this.couponCom.setNullCoupon()
} }
app.globalData.couponInfo = null; app.globalData.couponInfo = null;
@ -110,7 +116,7 @@ Page({
this.setData({ this.setData({
coupon:null coupon:null
}) })
if(!this.data.kjId && !this.data.gp_id){ if(!this.data.kjId && !this.data.gp_id && this.data.product.isGroup!=1){
this.couponCom.setNullCoupon() this.couponCom.setNullCoupon()
} }
app.globalData.couponInfo = null; app.globalData.couponInfo = null;
@ -134,7 +140,7 @@ Page({
order:function(){ order:function(){
let linkmanList = this.data.linkmanList,productNum = this.data.productNum,date = this.data.date,time = this.data.time,remark=this.data.remark,product= this.data.product; let linkmanList = this.data.linkmanList,productNum = this.data.productNum,date = this.data.date,time = this.data.time,remark=this.data.remark,product= this.data.product;
let linkmanIds=[]; let linkmanIds=[];
if(linkmanList.length<productNum){ if(linkmanList.length<productNum && app.globalData.product.isGroup!=1){
wx.showToast({ wx.showToast({
title: '请选择'+productNum+"个出行人", title: '请选择'+productNum+"个出行人",
icon:"none" icon:"none"
@ -155,6 +161,13 @@ Page({
}) })
return return
} }
if(app.globalData.product.isGroup==1 && !this.data.groupName){
wx.showToast({
title: '请输入团队主体名称',
icon:'none'
})
return;
}
linkmanList.map(item=>{ linkmanList.map(item=>{
linkmanIds.push(item.id) linkmanIds.push(item.id)
}) })
@ -170,7 +183,7 @@ Page({
use_date:date.date, use_date:date.date,
visitors:linkmanIds.join(","), visitors:linkmanIds.join(","),
remark:remark, remark:remark,
product_num:productNum product_num:app.globalData.product.isGroup==1?1:productNum
}], }],
originate_order_id:this.data.kjId, originate_order_id:this.data.kjId,
gp_id:app.globalData.gp_id, gp_id:app.globalData.gp_id,
@ -186,9 +199,16 @@ Page({
if(app.globalData.category_id){ if(app.globalData.category_id){
data.category_id = app.globalData.category_id; data.category_id = app.globalData.category_id;
} }
commonApi.user_post("order/create",{ let service = 'order/create',postData={
data:JSON.stringify(data) data:JSON.stringify(data)
}).then(res=>{ }
if(app.globalData.product.isGroup==1){
service = "team_order/appoint"
postData.member_num = this.data.productNum
postData.team_name = this.data.groupName
postData.type = 1;
}
commonApi.user_post(service,postData).then(res=>{
if(app.globalData.kjId){ if(app.globalData.kjId){
this.setData({ this.setData({
kjId:null kjId:null
@ -201,6 +221,12 @@ Page({
}); });
app.globalData.gp_id = null; app.globalData.gp_id = null;
} }
if(res.code==1 && app.globalData.product.isGroup==1){
// 团购跳转到团购详情
wx.navigateTo({
url: '/pages/info/groupOrderInfo/index?id='+res.data.order_id
})
}
}) })
}, },
// 活动预约 // 活动预约

10
pages/order/scene/index.wxml

@ -14,13 +14,19 @@
</view> </view>
</view> </view>
<contact wx:if="{{isLogin}}" type="{{type}}" bind:setLinkman="setLinkman"></contact> <contact wx:if="{{isLogin}}" type="{{type}}" bind:setLinkman="setLinkman"></contact>
<coupon wx:if="{{!kjId && !gp_id && type!='activity'}}" id="coupon" money="{{singlePrice * productNum}}" sku="{{product.sku.id}}"></coupon> <coupon wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1}}" id="coupon" money="{{singlePrice * productNum}}" sku="{{product.sku.id}}"></coupon>
<view class="box" wx:if="{{type!='activity'}}"> <view class="box" wx:if="{{type!='activity' && product && product.isGroup!=1}}">
<view class="box-title"> <view class="box-title">
<view style="flex-shrink:0">订单备注</view> <view style="flex-shrink:0">订单备注</view>
<input type="text" bindinput="changeRemark" placeholder="选填"></input> <input type="text" bindinput="changeRemark" placeholder="选填"></input>
</view> </view>
</view> </view>
<view class="box" wx:if="{{product && product.isGroup==1}}">
<view class="box-title">
<view style="flex-shrink:0">团队主体名称:</view>
<input type="text" bindinput="changeGroupName"></input>
</view>
</view>
<view style="{{type=='museum' || type=='activity'?'height:138rpx':'height:113rpx'}}"></view> <view style="{{type=='museum' || type=='activity'?'height:138rpx':'height:113rpx'}}"></view>
<view class="fixed-bottom" wx:if="{{type!='museum' && type!='activity'}}"> <view class="fixed-bottom" wx:if="{{type!='museum' && type!='activity'}}">
<view class="fixed-price-box" wx:if="{{kjId}}"><text>合计:</text><text class="price">¥0</text></view> <view class="fixed-price-box" wx:if="{{kjId}}"><text>合计:</text><text class="price">¥0</text></view>

96
pages/pbService/group/index.js

@ -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 () {
}
})

5
pages/pbService/group/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

23
pages/pbService/group/index.wxml

@ -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>

116
pages/pbService/group/index.wxss

@ -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;
}

5
pages/pbService/index.wxml

@ -93,6 +93,9 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/pb16.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/index/pb16.png" mode="widthFix"></image>
<view>精彩回顾</view> <view>精彩回顾</view>
</view> </view>
<view class="pb-item" data-title="团队预约" bindtap="gotoPath" data-path="/pages/pbService/group/index">
<image src="https://static.ticket.sz-trip.com/xcxImages/pbservice/pb21.png" mode="widthFix"></image>
<view>团队预约</view>
</view>
</view> </view>
</view> </view>

2
pages/pbService/web/index.js

@ -14,7 +14,7 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
webUrl:app.globalData.weburl webUrl:"https://m.cloud.sz-trip.com/"
}) })
}, },

14
project.private.config.json

@ -13,15 +13,15 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "pages/activity/huawei/upload/index", "name": "pages/pbService/group/index",
"pathName": "pages/activity/huawei/upload/index", "pathName": "pages/pbService/group/index",
"query": "id=6", "query": "id=6",
"scene": null "scene": null
}, },
{ {
"name": "pages/activity/huawei/list/index", "name": "pages/info/groupOrderInfo/index",
"pathName": "pages/activity/huawei/list/index", "pathName": "pages/info/groupOrderInfo/index",
"query": "id=6&user_id=18", "query": "id=59532108251510343335",
"scene": null "scene": null
}, },
{ {
@ -55,8 +55,8 @@
"scene": null "scene": null
}, },
{ {
"name": "pages/culture/index", "name": "pages/pbService/web/index",
"pathName": "pages/culture/index", "pathName": "pages/pbService/web/index",
"query": "id=10973", "query": "id=10973",
"scene": null "scene": null
} }

4
utils/https.js

@ -1,8 +1,8 @@
var app = getApp(); var app = getApp();
import util from "../utils/util" import util from "../utils/util"
import userApi from "../utils/https/user.js"; import userApi from "../utils/https/user.js";
// const baseUrl = "https://test.api.cloud.sz-trip.com/api/"; const baseUrl = "https://test.api.cloud.sz-trip.com/api/";
const baseUrl = "https://api.cloud.sz-trip.com/api/"; // const baseUrl = "https://api.cloud.sz-trip.com/api/";
const orders = ['','weight','distance','sale_number','sale_price','price']; const orders = ['','weight','distance','sale_number','sale_price','price'];
//封装GET请求 //封装GET请求
function _get(url,data) { function _get(url,data) {

Loading…
Cancel
Save