Commit cff87a0c by 严立

Merge branch 'master' of http://120.77.182.185/yanl/mini-shimao

parents f2a01694 333d55b2
...@@ -8,6 +8,7 @@ let logicData = { ...@@ -8,6 +8,7 @@ let logicData = {
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
appResourcesBase: App.globalData.appResourcesBase,
showPopup: false, showPopup: false,
winSide: true, winSide: true,
sideHeight: 1250, sideHeight: 1250,
...@@ -32,12 +33,35 @@ Page({ ...@@ -32,12 +33,35 @@ Page({
this.queryDetail() this.queryDetail()
this.queryActivity() this.queryActivity()
}, },
onShow: function () {
this.setShopInfo(3, 1)
},
setSideHeight: function () { setSideHeight: function () {
this.setData({ this.setData({
sideHeight: this.data.sideHeight * wx.getStorageSync('unitProportion') sideHeight: this.data.sideHeight * wx.getStorageSync('unitProportion')
}) })
}, },
// 缓存商店信息
setShopInfo: function (funcShopAppId, funcShopType) {
// 获取门店基本信息
let funcShopId = App.globalData.shopId
for (let i = 0, l = funcShopId.length; i < l; i++) {
if (funcShopAppId === funcShopId[i].appId) {
let funcShopInfo = {
'id': funcShopId[i].id,
'appId': funcShopId[i].appId,
'name': funcShopId[i].title[funcShopType],
'logo': funcShopId[i].logo,
'cover': funcShopId[i].cover,
'shopType': funcShopType,
'commodityLogo': funcShopId[i].commodityLogo
}
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
break
}
}
},
// 获取后台信息 // 获取后台信息
queryDetail: function () { queryDetail: function () {
let that = this let that = this
...@@ -54,20 +78,21 @@ Page({ ...@@ -54,20 +78,21 @@ Page({
// 获取活动信息 // 获取活动信息
queryActivity: function () { queryActivity: function () {
let that = this let that = this
let shopInfo = wx.getStorageInfoSync('shopInfoBuffer')
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getList', url: '/api/v1/activity/getList',
data: { data: {
'listType': '1', 'listType': '1',
'pageSize': '5', 'pageSize': '5',
'pageNo': '1', 'pageNo': '1',
'tagId': '103' 'tagId': '103',
'officeId': shopInfo.id
}, },
success: function(res) { success: function(res) {
let funcData = res.data.list let funcData = res.data.list
let childActivity = funcData.filter(v => v.childImg !== '') console.log(funcData)
console.log(childActivity)
that.setData({ that.setData({
childActivity childActivity: funcData
}) })
} }
}) })
...@@ -100,7 +125,6 @@ Page({ ...@@ -100,7 +125,6 @@ Page({
this.setData({ this.setData({
winSide: false winSide: false
}) })
wx.hideTabBar({animation: true})
} }
let funcOpacity = (funcEvent.scrollTop - this.data.sideHeight) / 40 let funcOpacity = (funcEvent.scrollTop - this.data.sideHeight) / 40
...@@ -114,7 +138,6 @@ Page({ ...@@ -114,7 +138,6 @@ Page({
winSide: true, winSide: true,
navigationAnimationShow: 0 navigationAnimationShow: 0
}) })
wx.showTabBar({animation: true})
} }
// 恢复滚动事件 // 恢复滚动事件
...@@ -160,15 +183,32 @@ Page({ ...@@ -160,15 +183,32 @@ Page({
}) })
}, },
// 跳转到购买饮品界面 // 跳转到购买饮品界面
onBuySnacks() { onBuySnacks(event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 5
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
wx.navigateTo({ wx.navigateTo({
url: '/pages/commodity/menu-snacks/menu-snacks', url: '/pages/commodity/menu-food/menu-food',
}) })
}, },
// 跳转到购买文创界面 // 跳转到购买文创界面
onBuyArt() { onBuyArt(event) {
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 4
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
wx.navigateTo({
url: '/pages/commodity/menu-food/menu-food',
})
},
// 跳转到活动详情
onActivityDetail: function (event) {
let id = event.currentTarget.dataset.id
wx.navigateTo({ wx.navigateTo({
url: '/pages/commodity/menu-art/menu-art', url: '/pages/play/activity-detail/activity-detail?id=' + id,
}) })
}, },
// 点击分享图标 // 点击分享图标
...@@ -199,4 +239,10 @@ Page({ ...@@ -199,4 +239,10 @@ Page({
url: '/pages/home/guide/guide?id=' + 10 url: '/pages/home/guide/guide?id=' + 10
}) })
}, },
// 点击全部活动
onAllActivity: function () {
wx.navigateTo({
url: '/pages/play/activity/activity',
})
},
}) })
\ No newline at end of file
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<!-- 饮品预订 文创周边--> <!-- 饮品预订 文创周边-->
<view class="buy-other row con-b"> <view class="buy-other row con-b">
<!-- 饮品预订 --> <!-- 饮品预订 -->
<view class="buy-snacks row" bindtap="onBuySnacks"> <view class="buy-snacks row" bindtap="onBuySnacks" data-id="{{6}}">
<view class="buy-left col con-c"> <view class="buy-left col con-c">
<image src="./image/yinpinyuding.png"></image> <image src="./image/yinpinyuding.png"></image>
</view> </view>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</view> </view>
</view> </view>
<!-- 文创周边 --> <!-- 文创周边 -->
<view class="buy-art row" bindtap="onBuyArt"> <view class="buy-art row" bindtap="onBuyArt" data-id="{{1}}">
<view class="buy-left col con-c"> <view class="buy-left col con-c">
<image src="./image/wenchuangzhoubian.png"></image> <image src="./image/wenchuangzhoubian.png"></image>
</view> </view>
...@@ -74,16 +74,21 @@ ...@@ -74,16 +74,21 @@
</view> </view>
</view> </view>
<!-- 全部活动 -->
<view class="activity" bindtap="onAllActivity">
<image src="{{appResourcesBase + 'campsite/title.png'}}"></image>
</view>
<!-- 滚动图片 --> <!-- 滚动图片 -->
<!-- 单张图片 --> <!-- 单张图片 -->
<view class="swiper" wx:if="{{childActivity.length <= 1}}"> <view class="swiper" wx:if="{{childActivity.length <= 1}}">
<image mode="aspectFit" src="{{childActivity[0].childImg}}"></image> <image mode="scaleToFill" src="{{childActivity[0].childImg}}"></image>
</view> </view>
<!-- 多张图片 --> <!-- 多张图片 -->
<swiper class="swiper" indicator-dots indicator-color="#F6DADA" indicator-active-color="#E57C99" autoplay circular wx:else> <swiper class="swiper" indicator-dots indicator-color="#F6DADA" indicator-active-color="#E57C99" autoplay circular wx:else>
<block wx:for="{{childActivity}}" wx:key="id"> <block wx:for="{{childActivity}}" wx:key="id">
<swiper-item> <swiper-item>
<image mode="aspectFit" src="{{item.childImg}}"></image> <image mode="scaleToFill" src="{{item.cover}}" bindtap="onActivityDetail" data-id="{{item.id}}"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
width: 670rpx; width: 670rpx;
height: 312rpx; height: 312rpx;
padding: 40rpx 32rpx; padding: 40rpx 32rpx;
background: rgba(255, 255, 255, 0.65); background: rgba(255, 255, 255, 0.85);
box-shadow: 8rpx 10rpx 52rpx 0rpx rgba(238,211,153,0.3); box-shadow: 8rpx 10rpx 52rpx 0rpx rgba(238,211,153,0.3);
border-radius: 4rpx; border-radius: 4rpx;
} }
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
.snacks-img { .snacks-img {
position: absolute; position: absolute;
top: 28rpx; top: 38rpx;
left: 42rpx; left: 42rpx;
width: 50rpx; width: 50rpx;
height: 76rpx; height: 76rpx;
...@@ -151,12 +151,22 @@ ...@@ -151,12 +151,22 @@
.art-img { .art-img {
position: absolute; position: absolute;
top: 30rpx; top: 42rpx;
left: 12rpx; left: 12rpx;
width: 86rpx; width: 86rpx;
height: 70rpx; height: 70rpx;
} }
.activity {
position: absolute;
top: 1602rpx;
}
.activity image{
width: 160rpx;
height: 34rpx;
}
.swiper { .swiper {
width: 750rpx; width: 750rpx;
height: 1160rpx; height: 1160rpx;
......
...@@ -28,8 +28,10 @@ Page({ ...@@ -28,8 +28,10 @@ Page({
}, },
navigationScroll: 0, navigationScroll: 0,
navItem: [ navItem: [{
{content:'主题活动',type:'0'}, content: '主题活动',
type: '0'
},
{ {
content: '夜间入园预约', content: '夜间入园预约',
type: '1' type: '1'
...@@ -110,8 +112,20 @@ Page({ ...@@ -110,8 +112,20 @@ Page({
// }, // },
], ],
data: [ // 假数据数组,type=0入园预约,type=1 看房预约 data: [ // 假数据数组,type=0入园预约,type=1 看房预约
{title:'夜间入园预约',type:'0',time:'6月30日 20:00-24:00',num:3,url:'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'}, {
{title:'看房预约',type:'1',time:'6月30日',num:3,url:' http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'}, title: '夜间入园预约',
type: '0',
time: '6月30日 20:00-24:00',
num: 3,
url: 'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'
},
{
title: '看房预约',
type: '1',
time: '6月30日',
num: 3,
url: ' http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'
},
], ],
active: 0, active: 0,
height: 0, height: 0,
...@@ -138,19 +152,35 @@ Page({ ...@@ -138,19 +152,35 @@ Page({
//预约 //预约
goAppoint(e) { goAppoint(e) {
let type = e.currentTarget.dataset.index; let type = e.currentTarget.dataset.index;
let url = ''
if (type == 0) {
//活动列表
url = '/pages/play/activity/activity'
} else if (type == 1) {
// 夜间入园预约
url = '/pages/home/night-appointment/night-appointment'
} else if (type == 2) {
url = "/pages/commodity/room-appointment/room-appointment"
}
wx.navigateTo({ wx.navigateTo({
url: '/pages/appointment/appointment?type=' + type, url: url
}) })
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function(options) { onLoad: function (options) {
let type = options.tab ? 1 * options.tab : 0
this.setData({ this.setData({
height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度 height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度
active: type
}) })
// this.getList(this.data.active) if (type === 0) {
this.getActivity() this.getActivity()
} else {
this.getList(type)
}
}, },
// 页面滚动 // 页面滚动
onPageScroll: function (funcEvent) { onPageScroll: function (funcEvent) {
...@@ -170,6 +200,9 @@ Page({ ...@@ -170,6 +200,9 @@ Page({
// 我的活动 // 我的活动
getActivity: function () { getActivity: function () {
let that = this let that = this
wx.showLoading({
title: '加载中',
})
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getMyActivityList', url: '/api/v1/activity/getMyActivityList',
data: { data: {
...@@ -178,7 +211,10 @@ Page({ ...@@ -178,7 +211,10 @@ Page({
pageNo: '1', pageNo: '1',
type: '1' type: '1'
}, },
success: function(res) { success: function (res) {
wx.hideLoading({
success: (res) => {},
})
let funcData = res.data.list let funcData = res.data.list
let tmpArr = [] let tmpArr = []
funcData.forEach(item => { funcData.forEach(item => {
...@@ -215,13 +251,19 @@ Page({ ...@@ -215,13 +251,19 @@ Page({
break; break;
} }
let that = this let that = this
wx.showLoading({
title: '加载中',
})
App.wxRequest({ App.wxRequest({
url: '/api/v1/subscribe/getList', url: '/api/v1/subscribe/getList',
data: { data: {
state: '', state: '',
type: type //0 入园预约 1 看房预约 全部 空字符 type: type //0 入园预约 1 看房预约 全部 空字符
}, },
success: function(res) { success: function (res) {
wx.hideLoading({
success: (res) => {},
})
let tmpArr = [] let tmpArr = []
res.data.forEach(item => { res.data.forEach(item => {
let type = item.type * 1 let type = item.type * 1
......
...@@ -221,15 +221,15 @@ ...@@ -221,15 +221,15 @@
<view class="noActive" wx:if="{{data.length === 0 && active === 2}}"> <view class="noActive" wx:if="{{data.length === 0 && active === 2}}">
<view class="noActive-title">暂无夜间入园预约</view> <view class="noActive-title">暂无夜间入园预约</view>
<view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view> <view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view> <view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view>
</view> </view>
<view class="noActive" wx:if="{{data.length === 0 && active === 1}}"> <view class="noActive" wx:if="{{data.length === 0 && active === 1}}">
<view class="noActive-title">暂无看房预约</view> <view class="noActive-title">暂无看房预约</view>
<view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view> <view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view>
</view> </view>
<view class="noActive" wx:if="{{activityList.length === 0 && active === 0}}"> <view class="noActive" wx:if="{{activityList.length === 0 && active === 0}}">
<view class="noActive-title">暂无活动预约</view> <view class="noActive-title">暂无活动预约</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view> <view class="noActive-botton" data-index="0" bindtap="goAppoint">去预约</view>
</view> </view>
</view> </view>
......
...@@ -7,35 +7,107 @@ Page({ ...@@ -7,35 +7,107 @@ Page({
passListType: 1, // 0为单张卡 1为多张卡 passListType: 1, // 0为单张卡 1为多张卡
privateStatus: true, privateStatus: true,
swiperCurrent: 0, swiperCurrent: 0,
passList: [ shopConfig: App.globalData.shopId,
{ imageResourcesBase: App.globalData.appResourcesBase,
id: 0, passList: []
title: '精灵鸟理想国年卡',
name: '文碧海',
privateName: '文*海',
phone: '17633564488',
privatePhone: '176****4455',
idNum: '211222009900990090',
privateIdNum: '211222****0090',
codeNum: '2719 7092 0925',
codeImg: '',
useTime: '2019.09.30 - 2020.12.30'
}
]
}, },
onLoad: function (options) { onLoad: function (options) {
// if (options.type) options.type = Number(options.type) // if (options.type) options.type = Number(options.type)
// this.setData({ // this.setData({
// passListType: options.type // passListType: options.type
// }) // })
this.setView() // this.setView()
App.login({
timeout: 0,
success: (result) => {
this.getCardList()
},
})
},
// 跳转订单详情
onOrderDetail: function (event) {
let orderId = event.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/pay/order-detail/order-detail?id=' + orderId,
})
},
// 多二维码 复制券码
setClipboard(e) {
const code = e.currentTarget.dataset.code
wx.setClipboardData({
data: code,
success(res) {
wx.showToast({
title: '复制成功',
})
}
})
},
//获取卡数据
getCardList() {
let that = this
wx.showLoading({
title: '加载中',
})
App.wxRequest({
url: '/api/v1/volume/getVolumeList',
data: {
status: "", //0已过期1待使用2已使用(""全部)
pageNo: 1,
pageSize: -1
},
success: function (res) {
wx.hideLoading({
success: (res) => {},
})
let list = res.data.map(item => {
let shopFilter = that.data.shopConfig.filter(k => {
return k.name.toLowerCase() == item.officeName.toLowerCase()
})
if (item.name.indexOf('年卡') != -1) {
item.cardType = 1
} else if (item.name.indexOf('月卡') != -1) {
item.cardType = 2
} else {
// 次票
item.cardType = 3
}
item.logo = shopFilter.length > 0 ? shopFilter[0].logo : ''
// 名字隐私
if (item.personName.length > 2) {
item.privateName = item.personName.substr(0, 1) + '*' + item.personName.substr(item.personName.length - 1)
} else {
item.privateName = item.personName.substr(0, 1) + '*'
}
// 手机号隐私
item.privatePhone = item.cellphone.substr(0, 3) + '****' + item.cellphone.substr(item.cellphone.length - 4)
// 身份证隐私
item.privateIdNum = item.identityCard.substr(0, 6) + '****' + item.identityCard.substr(item.identityCard.length - 4)
item.privateStatus = true
return item
})
let filterList = list.filter(item => {
return item.officeName == '儿童营地'
})
that.setData({
passList: filterList
})
}
})
}, },
setView: function () { setView: function () {
switch (this.data.passListType) { switch (this.data.passListType) {
case 0: case 0:
this.setData({ this.setData({
passList: [ passList: [{
{
id: 0, id: 0,
title: '精灵鸟理想国年卡', title: '精灵鸟理想国年卡',
name: '文碧海', name: '文碧海',
...@@ -47,14 +119,12 @@ Page({ ...@@ -47,14 +119,12 @@ Page({
codeNum: '2719 7092 0925', codeNum: '2719 7092 0925',
codeImg: '', codeImg: '',
useTime: '2019.09.30 - 2020.12.30' useTime: '2019.09.30 - 2020.12.30'
} }]
]
}) })
break break
case 1: case 1:
this.setData({ this.setData({
passList: [ passList: [{
{
id: 0, id: 0,
title: '精灵鸟理想国年卡', title: '精灵鸟理想国年卡',
name: '文碧海', name: '文碧海',
...@@ -65,7 +135,8 @@ Page({ ...@@ -65,7 +135,8 @@ Page({
privateIdNum: '211222****0090', privateIdNum: '211222****0090',
codeNum: '2719 7092 0925', codeNum: '2719 7092 0925',
codeImg: '', codeImg: '',
useTime: '2019.09.30 - 2020.12.30' useTime: '2019.09.30 - 2020.12.30',
cardType: 1
}, },
{ {
id: 0, id: 0,
...@@ -78,7 +149,8 @@ Page({ ...@@ -78,7 +149,8 @@ Page({
privateIdNum: '211222****0090', privateIdNum: '211222****0090',
codeNum: '2719 7092 0925', codeNum: '2719 7092 0925',
codeImg: '', codeImg: '',
useTime: '2019.09.30 - 2020.12.30' useTime: '2019.09.30 - 2020.12.30',
cardType: 2
}, },
{ {
id: 0, id: 0,
...@@ -91,7 +163,8 @@ Page({ ...@@ -91,7 +163,8 @@ Page({
privateIdNum: '211222****0090', privateIdNum: '211222****0090',
codeNum: '2719 7092 0925', codeNum: '2719 7092 0925',
codeImg: '', codeImg: '',
useTime: '2019.09.30 - 2020.12.30' useTime: '2019.09.30 - 2020.12.30',
cardType: 1
} }
] ]
}) })
...@@ -99,18 +172,23 @@ Page({ ...@@ -99,18 +172,23 @@ Page({
} }
}, },
// 滑动swiper // 滑动swiper
eventSwiperChange: function(e) { eventSwiperChange: function (e) {
let swiperCurrent = e.detail.current let swiperCurrent = e.detail.current
this.setData({ this.setData({
swiperCurrent swiperCurrent
}) })
}, },
//点击信息是否加密 //点击信息是否加密
onShowPrivate: function () { onShowPrivate: function (event) {
let privateStatus = !this.data.privateStatus let index = event.currentTarget.dataset.index
let passList = `passList[${index}].privateStatus`
this.setData({ this.setData({
privateStatus [passList]: !this.data.passList[index].privateStatus
}) })
} }
}) })
\ No newline at end of file
...@@ -2,14 +2,20 @@ ...@@ -2,14 +2,20 @@
<view class="container con-s"> <view class="container con-s">
<!-- 单张卡 --> <!-- 单张卡 -->
<view class="card-wrapper" wx:if="{{passListType === 0}}"> <view class="card-wrapper" wx:if="{{passList.length == 1}}">
<view class="card-header"> <view class="card-header">
<image wx:if="{{passList[0].cardType==1}}" class="card-bg year-bg"
src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image>
<image wx:elif="{{passList[0].cardType==2}}" class="card-bg year-bg"
src="{{imageResourcesBase +'pay/order-input/card-2.png'}}"></image>
<image wx:else class="card-bg month-bg" src="{{imageResourcesBase +'pay/order-input/card-3.png'}}">
</image>
<view class="use-notice row align-c"> <view class="use-notice row align-c">
<text>使用须知</text> <text>使用须知</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image> <image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
<view class="card-header-title"> <view class="card-header-title">
<text>{{passList[0].title}}</text> <text>{{passList[0].name}}</text>
</view> </view>
<view class="card-header-info"> <view class="card-header-info">
<view class="row align-c"> <view class="row align-c">
...@@ -18,12 +24,12 @@ ...@@ -18,12 +24,12 @@
<text>名</text> <text>名</text>
</view> </view>
<view class="card-header-info-right"> <view class="card-header-info-right">
<text wx:if="{{privateStatus}}">{{passList[0].privateName}}</text> <text wx:if="{{passList[0].privateStatus}}">{{passList[0].privateName}}</text>
<text wx:else>{{passList[0].name}}</text> <text wx:else>{{passList[0].personName}}</text>
</view> </view>
<view class="card-info-visible"> <view class="card-info-visible" data-index="0" bindtap="onShowPrivate">
<image wx:if="{{privateStatus}}"></image> <image src="{{imageBase+'icon/eyes_close.png'}}" wx:if="{{passList[0].privateStatus}}"></image>
<image wx:else></image> <image src="{{imageBase+'icon/eyes_open.png'}}" wx:else></image>
</view> </view>
</view> </view>
<view class="row align-c"> <view class="row align-c">
...@@ -33,8 +39,8 @@ ...@@ -33,8 +39,8 @@
<text>号</text> <text>号</text>
</view> </view>
<view class="card-header-info-right"> <view class="card-header-info-right">
<text wx:if="{{privateStatus}}">{{passList[0].privatePhone}}</text> <text wx:if="{{passList[0].privateStatus}}">{{passList[0].privatePhone}}</text>
<text wx:else>{{passList[0].phone}}</text> <text wx:else>{{passList[0].cellphone}}</text>
</view> </view>
</view> </view>
<view class="row align-c"> <view class="row align-c">
...@@ -45,8 +51,8 @@ ...@@ -45,8 +51,8 @@
<text>号</text> <text>号</text>
</view> </view>
<view class="card-header-info-right"> <view class="card-header-info-right">
<text wx:if="{{privateStatus}}">{{passList[0].privateIdNmu}}</text> <text wx:if="{{passList[0].privateStatus}}">{{passList[0].privateIdNmu}}</text>
<text wx:else>{{passList[0].privateIdNmu}}</text> <text wx:else>{{passList[0].identityCard}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -54,33 +60,43 @@ ...@@ -54,33 +60,43 @@
<view class="card-main col align-c"> <view class="card-main col align-c">
<view class="code-num-wrapper row align-c con-c"> <view class="code-num-wrapper row align-c con-c">
<text class="code-num-title">券码:</text> <text class="code-num-title">券码:</text>
<text class="code-num">{{passList[0].codeNum}}</text> <text class="code-num">{{passList[0].serialNumber}}</text>
<text class="code-copy">复制</text> <text class="code-copy" bindtap="setClipboard" data-code="{{passList[0].serialNumber}}">复制</text>
</view> </view>
<view class="QRcode"> <view class="QRcode">
<image src="{{passList[0].codeImg}}"></image> <image src="{{'data:image/jpg;base64,'+passList[0].qrcode}}"></image>
</view> </view>
<view class="code-use-time"> <view class="code-use-time">
<text>{{passList[0].useTime}}</text> <text>{{passList[0].useTime}}</text>
</view> </view>
<view class="look-order row align-c con-c"> <view class="look-order row align-c con-c" bindtap="onOrderDetail" data-id="{{passList[0].orderId}}">
<text>查看订单</text> <text>查看订单</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image> <image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
</view> </view>
</view> </view>
<!-- 多张卡 --> <!-- 多张卡 -->
<swiper class="card-list" wx:else indicator-dots indicator-color="#fff" indicator-active-color="#E57C99" next-margin="44rpx" bindchange="eventSwiperChange"> <swiper class="card-list" wx:else indicator-dots indicator-color="#fff" indicator-active-color="#E57C99"
next-margin="44rpx" bindchange="eventSwiperChange">
<block wx:for="{{passList}}" wx:key="id"> <block wx:for="{{passList}}" wx:key="id">
<swiper-item> <swiper-item>
<view class="card-wrapper {{index === swiperCurrent ? 'item-right' : ''}} {{swiperCurrent === passList.length-1 ? 'item-center' : ''}}"> <view
class="card-wrapper {{index === swiperCurrent ? 'item-right' : ''}} {{swiperCurrent === passList.length-1 ? 'item-center' : ''}}">
<view class="card-header"> <view class="card-header">
<image wx:if="{{item.cardType==1}}" class="card-bg year-bg"
src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image>
<image wx:elif="{{item.cardType==2}}" class="card-bg year-bg"
src="{{imageResourcesBase +'pay/order-input/card-2.png'}}"></image>
<image wx:else class="card-bg month-bg"
src="{{imageResourcesBase +'pay/order-input/card-3.png'}}">
</image>
<view class="use-notice row align-c"> <view class="use-notice row align-c">
<text>使用须知</text> <text>使用须知</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image> <image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
<view class="card-header-title"> <view class="card-header-title">
<text>{{item.title}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="card-header-info"> <view class="card-header-info">
<view class="row align-c"> <view class="row align-c">
...@@ -89,12 +105,15 @@ ...@@ -89,12 +105,15 @@
<text>名</text> <text>名</text>
</view> </view>
<view class="card-header-info-right"> <view class="card-header-info-right">
<text wx:if="{{privateStatus}}">{{item.privateName}}</text> <text wx:if="{{item.privateStatus}}">{{item.privateName}}</text>
<text wx:else>{{item.name}}</text> <text wx:else>{{item.personName}}</text>
</view> </view>
<view class="card-info-visible" bindtap="onShowPrivate"> <view class="card-info-visible" data-index="{{index}}" bindtap="onShowPrivate">
<image wx:if="{{true}}"></image> <!-- <image wx:if="{{true}}"></image>
<image wx:else></image> <image wx:else></image> -->
<image src="{{imageBase+'icon/eyes_close.png'}}" wx:if="{{item.privateStatus}}">
</image>
<image src="{{imageBase+'icon/eyes_open.png'}}" wx:else></image>
</view> </view>
</view> </view>
<view class="row align-c"> <view class="row align-c">
...@@ -104,8 +123,8 @@ ...@@ -104,8 +123,8 @@
<text>号</text> <text>号</text>
</view> </view>
<view class="card-header-info-right"> <view class="card-header-info-right">
<text wx:if="{{privateStatus}}">{{item.privatePhone}}</text> <text wx:if="{{item.privateStatus}}">{{item.privatePhone}}</text>
<text wx:else>{{item.phone}}</text> <text wx:else>{{item.cellphone}}</text>
</view> </view>
</view> </view>
<view class="row align-c"> <view class="row align-c">
...@@ -116,8 +135,8 @@ ...@@ -116,8 +135,8 @@
<text>号</text> <text>号</text>
</view> </view>
<view class="card-header-info-right"> <view class="card-header-info-right">
<text wx:if="{{privateStatus}}">{{item.privateIdNum}}</text> <text wx:if="{{item.privateStatus}}">{{item.privateIdNum}}</text>
<text wx:else>{{item.idNum}}</text> <text wx:else>{{item.identityCard}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -125,16 +144,16 @@ ...@@ -125,16 +144,16 @@
<view class="card-main col align-c"> <view class="card-main col align-c">
<view class="code-num-wrapper row align-c con-c"> <view class="code-num-wrapper row align-c con-c">
<text class="code-num-title">券码:</text> <text class="code-num-title">券码:</text>
<text class="code-num">{{item.codeNum}}</text> <text class="code-num">{{item.serialNumber}}</text>
<text class="code-copy">复制</text> <text class="code-copy" bindtap="setClipboard" data-code="{{item.serialNumber}}">复制</text>
</view> </view>
<view class="QRcode"> <view class="QRcode">
<image src="{{item.codeImg}}"></image> <image src="{{'data:image/jpg;base64,'+item.qrcode}}"></image>
</view> </view>
<view class="code-use-time"> <view class="code-use-time">
<text>{{item.useTime}}</text> <text>{{item.useTime}}</text>
</view> </view>
<view class="look-order row align-c con-c"> <view class="look-order row align-c con-c" bindtap="onOrderDetail" data-id="{{item.orderId}}">
<text>查看订单</text> <text>查看订单</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image> <image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
......
...@@ -3,7 +3,12 @@ ...@@ -3,7 +3,12 @@
padding-top: 232rpx; padding-top: 232rpx;
background: linear-gradient(180deg, #FFFCFC 0%, #F6DADA 100%); background: linear-gradient(180deg, #FFFCFC 0%, #F6DADA 100%);
} }
.card-bg {
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
.card-list { .card-list {
width: 750rpx; width: 750rpx;
height: 1062rpx; height: 1062rpx;
...@@ -24,8 +29,9 @@ ...@@ -24,8 +29,9 @@
height: 326rpx; height: 326rpx;
padding: 48rpx 32rpx; padding: 48rpx 32rpx;
color: #fff; color: #fff;
background: linear-gradient(137deg, #BEDAF9 0%, #7BB2F0 100%); /* background: linear-gradient(137deg, #BEDAF9 0%, #7BB2F0 100%); */
border-radius: 4rpx; border-radius: 4rpx;
z-index: 0;
} }
.use-notice { .use-notice {
position: absolute; position: absolute;
...@@ -56,10 +62,10 @@ ...@@ -56,10 +62,10 @@
line-height: 52rpx; line-height: 52rpx;
} }
.card-info-visible { .card-info-visible {
width: 36rpx; width: 40rpx;
height: 20rpx; height: 40rpx;
margin-left: 18rpx; margin-left: 18rpx;
background-color: #ccc; /* background-color: #ccc; */
} }
.card-main { .card-main {
......
...@@ -31,6 +31,7 @@ Page({ ...@@ -31,6 +31,7 @@ Page({
type: 0, //判断是否是认证的了 type: 0, //判断是否是认证的了
approveList: ['园区门票优惠', '餐厅价格优惠', 'SPA服务优惠', '免费观看电影', '无须预约入园', '尽享多重特权'], approveList: ['园区门票优惠', '餐厅价格优惠', 'SPA服务优惠', '免费观看电影', '无须预约入园', '尽享多重特权'],
activityList: [], activityList: [],
activityListBackup: [],
isRegister: false, // 是否注册, isRegister: false, // 是否注册,
// 右上角消息 // 右上角消息
...@@ -61,8 +62,18 @@ Page({ ...@@ -61,8 +62,18 @@ Page({
isYearCard: true, isYearCard: true,
isMonthCard: false, isMonthCard: false,
authInfo: null, authInfo: null,
goodTypeCountData: {} goodTypeCountData: {},
enrollSubscribeData: {}
}, },
// 去活动预约列表
goAppointment: function (e) {
let type = e.currentTarget.dataset.type
wx.navigateTo({
url: '/pages/mine/appointment/appointment?tab=' + type,
})
},
// 去客服中心
goQuestion: function () { goQuestion: function () {
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/question/question', url: '/pages/mine/question/question',
...@@ -256,6 +267,21 @@ Page({ ...@@ -256,6 +267,21 @@ Page({
} }
}) })
}, },
//活动预约统计
getCountEnrollSubscribe() {
let that = this
App.wxRequest({
url: '/api/v1/activity/getCountEnrollSubscribe',
data: {},
success: function (res) {
console.log(res, '获取分类统计');
let data = res.data ? res.data : {}
that.setData({
enrollSubscribeData: data
})
}
})
},
setUserInfo: function () { setUserInfo: function () {
let funcUserInfo = wx.getStorageSync('userInfo') let funcUserInfo = wx.getStorageSync('userInfo')
...@@ -296,8 +322,8 @@ Page({ ...@@ -296,8 +322,8 @@ Page({
this.getWillUseOrders() this.getWillUseOrders()
this.getPermissions() this.getPermissions()
this.getIntegral() this.getIntegral()
this.getList()
this.getCountByGoodType() this.getCountByGoodType()
this.getCountEnrollSubscribe()
}, },
}) })
} else { } else {
...@@ -351,7 +377,13 @@ Page({ ...@@ -351,7 +377,13 @@ Page({
}) })
} }
}, },
// 点分类跳转订单
goOrderByclass(e) {
let type = e.currentTarget.dataset.type
wx.navigateTo({
url: '/pages/mine/order/order?goodType=' + type
})
},
//我的活动详情 //我的活动详情
activityDetail(e) { activityDetail(e) {
wx.navigateTo({ wx.navigateTo({
...@@ -380,38 +412,23 @@ Page({ ...@@ -380,38 +412,23 @@ Page({
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getMyActivityList', url: '/api/v1/activity/getMyActivityList',
data: { data: {
activeState: '0,1', activeState: '1',
pageSize: 10, pageSize: 2,
pageNo: 1 pageNo: 1,
type: 1
}, },
success: function (res) { success: function (res) {
let list = res.data.list let list = res.data.list
let tmpArr = [] let sliceList = []
list.forEach(item => { let activityListBackup = JSON.parse(JSON.stringify(list))
let state = item.activeState * 1 if (list.length > 2) {
let type = 0 sliceList = list.slice(0, 2)
switch (state) { } else {
case 0: sliceList = list
type = 1;
break;
case 1:
type = 0;
break;
case 2:
type = 2;
break;
}
let obj = {
time: item.enrollDate, //activeDate + ' ' + item.activeTime,
type: type,
content: item.address,
title: item.name,
enrollId: item.enrollId,
} }
tmpArr.push(obj)
})
that.setData({ that.setData({
activityList: tmpArr activityList: sliceList,
activityListBackup
}) })
} }
}) })
...@@ -468,7 +485,7 @@ Page({ ...@@ -468,7 +485,7 @@ Page({
// 二期代码 // 二期代码
onOrder: function () { onOrder: function () {
console.log('onOrder')
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/order/order' url: '/pages/mine/order/order'
}) })
...@@ -489,8 +506,6 @@ Page({ ...@@ -489,8 +506,6 @@ Page({
let showMoreOrder = !this.data.showMoreOrder let showMoreOrder = !this.data.showMoreOrder
let orderList = `myOrder.artOrder.orderList` let orderList = `myOrder.artOrder.orderList`
console.log(JSON.parse(JSON.stringify(this.data.orderListBackup)));
if (showMoreOrder) { if (showMoreOrder) {
// 展开 // 展开
this.setData({ this.setData({
...@@ -512,10 +527,27 @@ Page({ ...@@ -512,10 +527,27 @@ Page({
}, },
// 我的预约 展开 收起
onShowMoreActivity: function () { onShowMoreActivity: function () {
let showMoreActivity = !this.data.showMoreActivity let showMoreActivity = !this.data.showMoreActivity
if (showMoreActivity) {
//展开
this.setData({
activityList: JSON.parse(JSON.stringify(this.data.activityListBackup))
})
} else {
// 收起
let list = JSON.parse(JSON.stringify(this.data.activityListBackup))
let sliceList = list.slice(0, 2)
this.setData({ this.setData({
showMoreActivity activityList: sliceList
}) })
} }
this.setData({
showMoreActivity,
})
}
}) })
\ No newline at end of file
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
</view> </view>
<!-- 订单分类icno --> <!-- 订单分类icno -->
<view class="order-activity-icon-list row con-b"> <view class="order-activity-icon-list row con-b">
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c" data-type="3" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_ticket.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/or_ticket.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['1'] > 9 ? 'badge-widen' : ''}}" <view class="order-activity-badge {{ goodTypeCountData['1'] > 9 ? 'badge-widen' : ''}}"
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</view> </view>
<text>门票</text> <text>门票</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c" data-type="5" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_food.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/or_food.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['2'] > 9 ? 'badge-widen' : ''}}" <view class="order-activity-badge {{ goodTypeCountData['2'] > 9 ? 'badge-widen' : ''}}"
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
</view> </view>
<text>餐饮</text> <text>餐饮</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c" data-type="3" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_movice.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/or_movice.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['3'] > 9 ? 'badge-widen' : ''}}" <view class="order-activity-badge {{ goodTypeCountData['3'] > 9 ? 'badge-widen' : ''}}"
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
</view> </view>
<text>影票</text> <text>影票</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c" data-type="2" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_spa.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/or_spa.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['4'] > 9 ? 'badge-widen' : ''}}" <view class="order-activity-badge {{ goodTypeCountData['4'] > 9 ? 'badge-widen' : ''}}"
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
</view> </view>
<text>SPA</text> <text>SPA</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c" data-type="4" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_art.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/or_art.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['5'] > 9 ? 'badge-widen' : ''}}" <view class="order-activity-badge {{ goodTypeCountData['5'] > 9 ? 'badge-widen' : ''}}"
...@@ -229,71 +229,56 @@ ...@@ -229,71 +229,56 @@
</view> </view>
<!-- 预约分类icno --> <!-- 预约分类icno -->
<view class="order-activity-icon-list row con-b"> <view class="order-activity-icon-list row con-b">
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c" data-type='0' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/yy_theme.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/yy_theme.png'}}"></image>
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}"> <view class="order-activity-badge {{ enrollSubscribeData.active > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.active}}">
{{badge}}</view> {{enrollSubscribeData.active}}</view>
</view> </view>
<text>主题活动</text> <text>主题活动</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c" data-type='1' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/yy_night.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/yy_night.png'}}"></image>
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}"> <view class="order-activity-badge {{ enrollSubscribeData.garden > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.garden}}">
{{badge}}</view> {{enrollSubscribeData.garden}}</view>
</view> </view>
<text>夜间入园预约</text> <text>夜间入园预约</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c" data-type='2' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/yy_house.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/yy_house.png'}}"></image>
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}"> <view class="order-activity-badge {{ enrollSubscribeData.scanHouse > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.scanHouse}}">
{{badge}}</view> {{enrollSubscribeData.scanHouse}}</view>
</view> </view>
<text>看房预约</text> <text>看房预约</text>
</view> </view>
</view> </view>
<!-- 预约卡片 --> <!-- 预约卡片 -->
<view class="appintment" > <view class="appintment">
<!-- 主题活动 --> <!-- 主题活动 -->
<view class="appointment-wrapper"> <view class="appointment-wrapper" wx:for="{{activityList}}" wx:key="*this">
<view class="appointment-time">8月15日-7月15日 10:00-12:00</view> <view class="appointment-time">{{item.activeTime}}</view>
<view class="appointment-activity-content row"> <view class="appointment-activity-content row">
<view class="appointment-activity-img"> <view class="appointment-activity-img">
<image src=""></image> <image src="{{item.cover}}"></image>
</view> </view>
<view class="appointment-activity-info col con-a"> <view class="appointment-activity-info col con-a">
<view class="appointment-activity-title"> <view class="appointment-activity-title">
<text>日落观光游船体验活动</text> <text>{{item.name}}</text>
</view> </view>
<view class="appointment-activity-num"> <view class="appointment-activity-num">
<text>报名人数 3人</text> <text>报名人数 {{item.number}}人</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="appointment-wrapper">
<view class="appointment-time">
<text>8月15日-7月15日 10:00-12:00</text>
</view>
<view class="appointment-activity-content row">
<view class="appointment-activity-img">
<image src=""></image>
</view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
<text>日落观光游船体验活动之船行碧波共赏美景</text>
</view>
<view class="appointment-activity-num">
<text>报名人数 3人</text>
</view>
</view>
</view>
</view>
<!-- 夜间入园预约 --> <!-- 夜间入园预约 -->
<view class="appointment-wrapper"> <!-- <view class="appointment-wrapper">
<view class="appointment-time"> <view class="appointment-time">
<text>7月15日 10:00-12:00</text> <text>7月15日 10:00-12:00</text>
</view> </view>
...@@ -307,12 +292,12 @@ ...@@ -307,12 +292,12 @@
</view> </view>
</view> </view>
<view class="border-right"></view> <view class="border-right"></view>
<!-- <view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证 <view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证
</view> -->
</view> </view>
</view> </view>
</view> -->
<!-- 看房预约 --> <!-- 看房预约 -->
<view class="appointment-wrapper"> <!-- <view class="appointment-wrapper">
<view class="appointment-time"> <view class="appointment-time">
<text>7月15日 10:00-12:00</text> <text>7月15日 10:00-12:00</text>
</view> </view>
...@@ -326,10 +311,11 @@ ...@@ -326,10 +311,11 @@
<view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证 <view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证
</view> </view>
</view> </view>
</view> </view> -->
</view> </view>
<!-- more --> <!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreActivity" >
<view class="more row align-c con-c" bindtap="onShowMoreActivity" wx:if="{{activityList.length>1}}">
<text wx:if="{{!showMoreActivity}}">展开更多</text> <text wx:if="{{!showMoreActivity}}">展开更多</text>
<text wx:else>收起</text> <text wx:else>收起</text>
<image wx:if="{{!showMoreActivity}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image> <image wx:if="{{!showMoreActivity}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
......
...@@ -506,11 +506,7 @@ ...@@ -506,11 +506,7 @@
height: 50rpx; height: 50rpx;
} }
.pass-logo-wrapper image {
/* width: 64rpx;
height: 50rpx; */
/* background-color: #ccc; */
}
.pass-logo-wrapper text { .pass-logo-wrapper text {
height: 50rpx; height: 50rpx;
...@@ -628,6 +624,7 @@ ...@@ -628,6 +624,7 @@
width: 140rpx; width: 140rpx;
height: 136rpx; height: 136rpx;
background-color: #ccc; background-color: #ccc;
border-radius: 5px;
} }
.appointment-activity-info { .appointment-activity-info {
......
...@@ -6,7 +6,6 @@ Page({ ...@@ -6,7 +6,6 @@ Page({
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
option: {}, option: {},
orderTypeTitle: '全部分类', orderTypeTitle: '全部分类',
orderTypeHeight: 0, orderTypeHeight: 0,
orderType: [], orderType: [],
...@@ -38,10 +37,9 @@ Page({ ...@@ -38,10 +37,9 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
option: options option: options,
orderTypeActive: options.goodType != undefined ? 1 * options.goodType : 0
}) })
console.log('onload-----------');
// App.login({ // App.login({
// timeout: 0, // timeout: 0,
// success: (result) => { // success: (result) => {
...@@ -82,9 +80,8 @@ Page({ ...@@ -82,9 +80,8 @@ Page({
if (this.data.isFinished) return if (this.data.isFinished) return
let that = this; let that = this;
let funcName = this.data.orderType[this.data.orderTypeActive].value // let funcName = this.data.orderType[this.data.orderTypeActive].value
let funcValue = this.data.statusList[this.data.statusActive].value // let funcValue = this.data.statusList[this.data.statusActive].value
this.setData({ this.setData({
isLoading: true isLoading: true
}) })
...@@ -94,7 +91,7 @@ Page({ ...@@ -94,7 +91,7 @@ Page({
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/getOrderList', url: '/api/v1/order/getOrderList',
data: { data: {
'goodType': this.data.orderType[this.data.orderTypeActive].value, 'goodType': this.data.orderTypeActive ? this.data.orderType[this.data.orderTypeActive].value : '',
'status': this.data.statusList[this.data.statusActive].value, 'status': this.data.statusList[this.data.statusActive].value,
'pageSize': 10, 'pageSize': 10,
'pageNo': this.data.orderPages, 'pageNo': this.data.orderPages,
...@@ -185,7 +182,7 @@ Page({ ...@@ -185,7 +182,7 @@ Page({
'type': 'good_type', 'type': 'good_type',
}, },
success: (response) => { success: (response) => {
console.log(response)
let funcResponse = response.data let funcResponse = response.data
let funcList = [{ let funcList = [{
'value': '', 'value': '',
...@@ -198,9 +195,13 @@ Page({ ...@@ -198,9 +195,13 @@ Page({
} }
funcList.push(funcItem) funcList.push(funcItem)
} }
let typeTitle = '全部分类' //
if (this.data.orderTypeActive) {
typeTitle = funcList[this.data.orderTypeActive].name
}
this.setData({ this.setData({
'orderType': funcList 'orderType': funcList,
orderTypeTitle: typeTitle
}) })
this.queryOrder() this.queryOrder()
......
...@@ -21,16 +21,16 @@ ...@@ -21,16 +21,16 @@
"checkSiteMap": false, "checkSiteMap": false,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false, "compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useApiHook": true,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"useIsolateContext": true, "useIsolateContext": true,
"useCompilerModule": false, "useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false, "userConfirmedUseCompilerModuleSwitch": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [], "packNpmRelationList": [],
"enableEngineNative": false "enableEngineNative": false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment