Commit a4b6d590 by wjw

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

parents f2a6f545 565c0be5
...@@ -2,32 +2,58 @@ let App = getApp() ...@@ -2,32 +2,58 @@ let App = getApp()
Page({ Page({
data: { data: {
imageResourcesBase: App.globalData.appResourcesBase,
showMenu: false, showMenu: false,
menu: '全 部', menu: '全 部',
menuList: [ menuList: [{
{id: 0, name: '全 部'}, id: '',
{id: 1, name: '获 取'}, name: '全 部'
{id: 2, name: '已使用'} },
{
id: 0,
name: '获 取'
},
{
id: 1,
name: '已使用'
}
], ],
pageNo: '1', pageNo: '1',
pageSize: '-1', pageSize: '-1',
type: '', // "" 全部 0 获取 1消费(0 发放 1 兑换) type: '', // "" 全部 0 获取 1消费(0 发放 1 兑换)
accumulateList: [], accumulateList: [],
selectedList: [] selectedList: [],
integral: '0',
type: ''
}, },
onLoad: function (options) { onLoad: function (options) {
this.getAccumulate() let integral = options.integral
this.setData({
integral: integral
})
App.login({
timeout: 0,
success: (result) => {
this.getAccumulate()
},
})
}, },
// 获取积分列表 // 获取积分列表
getAccumulate: function () { getAccumulate: function () {
wx.showLoading({
title: '加载中',
})
App.wxRequest({ App.wxRequest({
url: '/api/v1/smUser/getIntegralDetails', url: '/api/v1/smUser/getIntegralDetails',
data: { data: {
'pageNo': this.data.pageNo, 'pageNo': this.data.pageNo,
'pageSize': this.data.pageSize, 'pageSize': this.data.pageSize,
type: '' type: this.data.type
}, },
success: (response) => { success: (response) => {
wx.hideLoading({
success: (res) => {},
})
let accumulateList = response.data let accumulateList = response.data
let selectedList = accumulateList let selectedList = accumulateList
this.setData({ this.setData({
...@@ -57,18 +83,23 @@ Page({ ...@@ -57,18 +83,23 @@ Page({
* @returns * @returns
*/ */
onTabMenu: function (event) { onTabMenu: function (event) {
let { index } = event.currentTarget.dataset let {
index,
type
} = event.currentTarget.dataset
let menu = this.data.menuList[index].name let menu = this.data.menuList[index].name
let selectedList = [] let selectedList = []
if (index === 0) { if (index === 0) {
selectedList = this.data.accumulateList selectedList = this.data.accumulateList
} else { } else {
selectedList = selectedList.filter(v => v.type === index-1) selectedList = selectedList.filter(v => v.type === index - 1)
} }
this.setData({ this.setData({
menu, menu,
selectedList selectedList,
type: type
}) })
this.onHideMenu() this.onHideMenu()
this.getAccumulate()
} }
}) })
\ No newline at end of file
...@@ -2,22 +2,24 @@ ...@@ -2,22 +2,24 @@
<view class="container con-s" bindtap="onHideMenu"> <view class="container con-s" bindtap="onHideMenu">
<!-- 积分背景图 --> <!-- 积分背景图 -->
<image class="banner" src=""></image> <image class="banner" src="{{imageResourcesBase + 'mine/home/integral-bg.png'}}"></image>
<view class="opacity-cover"></view>
<view class="my-accumulate"> <view class="my-accumulate">
<text>1888</text> <text>{{integral}}</text>
</view> </view>
<view class="accumulate-tips"> <view class="accumulate-tips">
<text>积分用于兑换积分商品,积分商城即将上线,敬请期待</text> <text>积分用于兑换积分商品,积分商城即将上线,敬请期待</text>
</view> </view>
<view class="banner-menu row con-b align-c" catchtap="onShowMenu"> <view class="banner-menu row con-b align-c" catchtap="onShowMenu">
<text>{{menu}}</text> <text>{{menu}}</text>
<image src="/image/icon/arrow-b-2.png"></image> <image src="/image/icon/arrow-b-2.png"></image>
<view class="banner-menu-down col" wx:if="{{showMenu}}"> <view class="banner-menu-down col" wx:if="{{showMenu}}">
<block wx:for="{{menuList}}" wx:key="id"> <block wx:for="{{menuList}}" wx:key="id">
<text class="{{menu === item.name ? 'selected' : ''}}" catchtap="onTabMenu" data-index="{{index}}">{{item.name}}</text> <text class="{{menu === item.name ? 'selected' : ''}}" data-type="{{item.id}}" catchtap="onTabMenu"
data-index="{{index}}">{{item.name}}</text>
</block> </block>
</view> </view>
</view> </view>
......
...@@ -9,6 +9,15 @@ page { ...@@ -9,6 +9,15 @@ page {
.banner { .banner {
position: fixed; position: fixed;
z-index: -2;
top: 0;
left: 0;
width: 750rpx;
height: 480rpx;
}
.opacity-cover {
position: fixed;
z-index: -1; z-index: -1;
top: 0; top: 0;
left: 0; left: 0;
...@@ -54,11 +63,11 @@ page { ...@@ -54,11 +63,11 @@ page {
width: 166rpx; width: 166rpx;
height: 180rpx; height: 180rpx;
background: rgba(255, 255, 255, 0.95); background: rgba(255, 255, 255, 0.95);
box-shadow: 10px 4px 40px 0px rgba(181,164,164,0.3); box-shadow: 10px 4px 40px 0px rgba(181, 164, 164, 0.3);
border-radius: 4rpx; border-radius: 4rpx;
} }
.banner-menu-down text{ .banner-menu-down text {
flex: 1; flex: 1;
padding-left: 24rpx; padding-left: 24rpx;
color: #959CA8; color: #959CA8;
...@@ -123,9 +132,11 @@ page { ...@@ -123,9 +132,11 @@ page {
font-size: 30rpx; font-size: 30rpx;
color: #E66060; color: #E66060;
} }
.accumulate-right text { .accumulate-right text {
margin-left: 6rpx; margin-left: 6rpx;
} }
.accumulate-type-color { .accumulate-type-color {
color: #959DA9; color: #959DA9;
} }
\ No newline at end of file
// pages/myActivity/myActivity.js // pages/myAppointment/myAppointment.js
const app = getApp() const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
navItem: [{ navItem: [
content: '全部', // {content:'全部',type:'0'},
type: '0'
},
{ {
content: '未开始', content: '夜间入园预约',
type: '1' type: '1'
}, },
{ {
content: '进行中', content: '看房预约',
type: '2' type: '2'
}, },
{
content: '已结束',
type: '3'
},
], ],
height: 0, data: [ // 假数据数组,type=0入园预约,type=1 看房预约
data: [], // {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,
pageNo: 1, height: 0,
pageSize: 10,
loading: false,
moreData: true,
},
goPlay() {
wx.switchTab({
url: '../../pages/play/play',
})
}, },
// 点击导航切换,默认是全部的
chageNav(e) { chageNav(e) {
let index = e.currentTarget.dataset.index let index = e.currentTarget.dataset.index
this.setData({ this.setData({
active: index, active: index
pageNo: 1,
}) })
this.getMyActivityList() this.getList(index)
}, },
activityDetail(e) { //预约凭证
gohotelAccommodation(e) {
console.log(e)
wx.navigateTo({ wx.navigateTo({
url: '../activityDetail/activityDetail?enrollid=' + e.currentTarget.dataset.enrollid, url: '../hotelAccommodation/hotelAccommodation?detail=' + JSON.stringify(e.currentTarget.dataset.item),
}) })
}, },
//预约
goAppoint(e) {
let type = e.currentTarget.dataset.index;
wx.navigateTo({
url: '/pages/appointment/appointment?type=' + type,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) { onLoad: function(options) {
this.setData({ this.setData({
height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度 height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度
}) })
this.getMyActivityList() this.getList(this.data.active)
}, },
// 我的活动 // 预约列表/我的预约
getMyActivityList() { getList(index) {
let state = '' let type = ''
switch (Number(this.data.active)) { switch (index) {
case 0: case 0:
state = ''; type = 0;
break; break;
case 1: case 1:
state = 0; type = 1;
break;
case 2:
state = 1;
break;
case 3:
state = 2;
break; break;
} }
var that = this let that = this
app.login({ app.wxRequest({
success: function() { url: '/api/v1/subscribe/getList',
that.setData({ data: {
loading: true state: '',
}) type: type //0 入园预约 1 看房预约 全部 空字符
app.wxRequest({ },
url: '/api/v1/activity/getMyActivityList', success: function(res) {
data: { let tmpArr = []
activeState: state, res.data.forEach(item => {
pageSize: that.data.pageSize, let type = item.type * 1
pageNo: that.data.pageNo let title = ''
}, let url = ''
success: function(res) { switch (type) {
let list = res.data.list case 0:
let tmpArr = [] title = '夜间入园预约'
list.forEach(item => { url = 'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'
let state = item.activeState * 1 break;
let type = 0 case 1:
switch (state) { title = '看房预约'
case 0: url = 'http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'
type = 1; break;
break; }
case 1: let obj = {
type = 0; title: title,
break; type: type,
case 2: time: item.subscribeDate.substring(5, 11).replace('-', '月').replace(' ', '日') + ((type == 0) ? ' 20:00-24:00' : ''),
type = 2; num: item.subscribeNum,
break; url: url,
} id: item.id,
let obj = { mobile: item.mobile,
time: item.enrollDate, //item.activeDate + ' ' + item.activeTime, name: item.name,
type: type,
content: item.address,
title: item.name,
enrollId: item.enrollId,
cover: item.cover,
}
tmpArr.push(obj)
})
if (that.data.pageNo != 1) {
tmpArr = that.data.data.concat(tmpArr)
}
that.setData({
data: tmpArr,
loading: false,
})
that.setData({
moreData: (that.data.data.length >= res.data.count * 1) ? false : true
})
},
fail: function(err) {
that.setData({
loading: false
})
} }
tmpArr.push(obj)
})
that.setData({
data: tmpArr
}) })
} }
}) })
}, }
onReachBottom: function() {
if (this.data.loading || !this.data.moreData) {
return
}
this.data.pageNo += 1
this.getMyActivityList()
},
}) })
\ No newline at end of file
<navigation class="navigation" titleText="我的活动" backIcon="/image/back.png"></navigation> <!--pages/myAppointment/myAppointment.wxml-->
<navigation class="navigation" titleText="我的预约" backIcon="/image/back.png"></navigation>
<view class="container all"> <view class="container all">
<view class="myActivity-container" style="min-height:{{height}}px;"> <view class="myActivity-container" style="min-height:{{height}}px;">
<view class="activity-nav"> <view class="myAppointment-nav">
<!-- 遍历头部导航 --> <!-- 遍历头部导航 -->
<view bindtap="chageNav" data-index="{{index}}" wx:for="{{navItem}}" wx:key="index" class="navItem {{index == active? 'active':''}}">{{item.content}}</view> <view bindtap="chageNav" data-index="{{index}}" wx:for="{{navItem}}" wx:key="index" class="navItem {{index == active? 'active':''}}">{{item.content}}</view>
</view> </view>
<view class="activity-body"> <view class="myAppointment-body">
<view class="my-activities-item " data-enrollid="{{item.enrollId}}" wx:for="{{data}}" wx:key="index" bindtap="activityDetail"> <view class="myAppointment-item" wx:for="{{data}}" wx:key="index">
<view class="my-activities-top {{item.type == 2?'timeendColor':''}}"> <image src="{{item.url}}" class="item-img"></image>
{{item.time}} <view class="item-content">
</view> <view class="item-title {{item.type == 0 ?'item-num-1' : ''}}">{{item.title}}</view>
<view class="my-activities-bottom"> <view class="item-time {{item.type == 1 ?'item-time-1' : ''}}">预约时间 {{item.time}}</view>
<view class="activity-status {{item.type == 1 ?'stautsColor':(item.type == 2?'contentEndColor':'')}}">{{status.status(item.type)}}</view> <view wx:if="{{item.type == 0}}" class="item-num">预约人数 {{item.num}}人</view>
<view class="activity-contanier">
<image class="activity-contanier-img {{item.type == 2?'opcity':''}}" src="{{item.cover}}"></image>
<view class="my-activities-content">
<view class="my-activities-title {{item.type == 2?'contentEndColor':''}} clamp-ellipsis">{{item.title}}</view>
<view class="ellipsis itemContent {{item.type == 2?'contentEndColor':''}}">{{item.content}}</view>
</view>
<view style="width:80rpx;height:100%;display:flex;align-items: center;flex-direction: row-reverse;">
<l-icon name="right" color="rgb(172,172,174)" size="26" />
</view>
</view>
</view> </view>
<view class="button" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view>
</view> </view>
</view>
<view class="noActive" hidden="{{data.length > 0}}">
<view class="noActive-title">暂无已报名的活动</view>
<view class="noActive-botton" bindtap="goPlay">发现畅玩活动</view>
</view> </view>
</view>
<view class="noActive" hidden="{{data.length > 0 || active == 1}}">
<view class="noActive-title">暂无夜间入园预约</view>
<view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view>
</view>
<view class="noActive" hidden="{{data.length > 0 || active == 0}}">
<view class="noActive-title">暂无看房预约</view>
<view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view>
</view> </view>
</view> </view>
<!-- 状态值格式化 --> <wxs module="m1">
<wxs module="status"> var getDate = function(date, type) {
var status = function(type) { return date.substring(5, 11).replace('-', '月').replace(' ', '日') + ((type == 0) ? ' 20:00-24:00' : '');
if (type == 0) {
return '进行中'
} else if (type == 1) {
return '未开始'
} else {
return '已结束'
}
} }
module.exports.status = status; module.exports.getDate = getDate;
</wxs> </wxs>
\ No newline at end of file
/* pages/myActivity/myActivity.wxss */ /* pages/myAppointment/myAppointment.wxss */
.myAppointment-nav {
width: 750rpx;
padding-top: 150rpx;
/* height: 95rpx; */
border-bottom: 1px solid rgb(238, 238, 238);
background: -webkit-linear-gradient(rgb(255, 255, 255), rgb(249, 249, 251)); /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(rgb(255, 255, 255), rgb(249, 249, 251)); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(rgb(255, 255, 255), rgb(249, 249, 251)); /* Firefox 3.6 - 15 */
background: linear-gradient(rgb(255, 255, 255), rgb(249, 249, 251)); /* 标准的语法(必须放在最后) */
display: flex;
justify-content: space-around;
}
.all { .all {
background-color: rgba(243, 244, 246, 1); background-color: rgba(243, 244, 246, 1);
} }
.myActivity-container { .navItem {
font-size: 26rpx;
line-height: 95rpx;
color: rgb(156, 158, 163);
}
.active {
border-bottom: 3px solid rgb(0, 0, 2);
color: rgb(28, 27, 30);
}
.myAppointment-body {
width: 750rpx; width: 750rpx;
height: 100%; /* min-height: 1000rpx; */
height: auto;
/* background-color: rgb(245, 244, 249); */
padding-top: 50rpx;
} }
.noActive { .noActive {
...@@ -47,167 +74,68 @@ ...@@ -47,167 +74,68 @@
margin-top: 64rpx; margin-top: 64rpx;
} }
.activity-nav { .myAppointment-item {
width: 750rpx; width: 670rpx;
padding-top: 224rpx; height: 360rpx;
/* height: 95rpx; */ margin: auto;
border-bottom: 1px solid rgb(238, 238, 238);
background: -webkit-linear-gradient(rgb(255, 255, 255), rgb(249, 249, 251)); /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(rgb(255, 255, 255), rgb(249, 249, 251)); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(rgb(255, 255, 255), rgb(249, 249, 251)); /* Firefox 3.6 - 15 */
background: linear-gradient(rgb(255, 255, 255), rgb(249, 249, 251)); /* 标准的语法(必须放在最后) */
display: flex;
justify-content: space-around;
}
.navItem {
line-height: 95rpx;
color: #959da9;
}
.active {
border-bottom: 3px solid rgb(0, 0, 2);
color: #15191f;
}
.itemContent {
font-size: 26rpx;
color: rgba(149, 157, 169, 1);
}
.activity-body {
width: 750rpx;
/* min-height: 1400rpx; */
padding-top: 50rpx;
background-color: rgb(243, 244, 246, 1);
height: auto;
position: relative;
}
.my-activities-item {
width: 675rpx;
height: 280rpx;
position: relative;
margin: 0 auto;
margin-bottom: 50rpx; margin-bottom: 50rpx;
background-color: rgb(220, 214, 220);
border-radius: 4px;
position: relative;
overflow: hidden;
} }
.my-activities-top { .item-img {
position: absolute;
top: 0;
padding: 0 25rpx 0 25rpx;
height: 60rpx;
background-color: rgb(2, 0, 2);
color: white;
line-height: 60rpx;
z-index: 2;
border-radius: 3px;
font-size: 30rpx;
}
.my-activities-bottom {
width: 100%; width: 100%;
height: 250rpx;
position: absolute; position: absolute;
bottom: 0; height: 360rpx;
background-color: white;
border-radius: 3px;
}
.my-activities-title {
line-height: 2;
color: rgba(21, 25, 31, 1);
font-size: 30rpx;
} }
.my-activities-content { .item-content {
color: rgb(169, 174, 181); width: 610rpx;
font-size: 26rpx; height: auto;
padding-left: 50rpx; position: absolute;
line-height: 2; bottom: 45rpx;
left: 30rpx;
} }
.subscribe { .item-title {
width: 150rpx; font-size: 36rpx;
height: 70rpx;
position: absolute;
border: 1px solid rgb(134, 137, 145);
border-radius: 3px;
right: 50rpx;
line-height: 70rpx; line-height: 70rpx;
text-align: center;
font-size: 26rpx;
top: 92rpx;
} }
.activity-status { .item-time {
text-align: right; line-height: 48rpx;
/* line-height: 65rpx; */
padding-top: 32rpx;
padding-right: 30rpx;
color: rgb(154, 192, 227);
font-size: 28rpx; font-size: 28rpx;
color: rgb(220, 214, 220);
} }
.activity-contanier { .item-num {
height: 160rpx; font-size: 28rpx;
width: 600rpx; color: rgb(220, 214, 220);
margin: auto; line-height: 48rpx;
display: flex;
align-items: center;
}
.activity-contanier-img {
width: 140rpx;
height: 136rpx;
}
.my-activities-content {
height: 140rpx;
width: 380rpx;
display: flex;
flex-direction: column;
justify-content: center;
}
.my-activities-title {
font-weight: 500;
letter-spacing: 1px;
}
/* 超出部分省略 */
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* 两行超出部分省略 */
.clamp-ellipsis {
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
} }
.opcity { /* 入园标题样式 */
opacity: 0.6;
}
.timeendColor { .item-num-1 {
background: rgba(217, 222, 231, 1); color: rgb(244, 254, 255);
} }
.contentEndColor { .item-time-1 {
color: rgba(194, 199, 207, 1); color: rgb(40, 50, 56);
} }
/* 未开始字体颜色 */ .button {
width: 170rpx;
.stautsColor { height: 70rpx;
color: rgb(164, 183, 133) !important; position: absolute;
bottom: 45rpx;
right: 30rpx;
line-height: 70rpx;
text-align: center;
color: white;
background: rgba(255, 255, 255, 0.53);
border-radius: 3px;
font-size: 28rpx;
} }
...@@ -8,6 +8,7 @@ Page({ ...@@ -8,6 +8,7 @@ Page({
data: { data: {
isCheckPermission: false, isCheckPermission: false,
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
imageResourcesBase: App.globalData.appResourcesBase,
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影 orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
...@@ -42,35 +43,10 @@ Page({ ...@@ -42,35 +43,10 @@ Page({
showMoreOrder: false, // 查看更多订单 showMoreOrder: false, // 查看更多订单
showMoreActivity: false, // 查看更多活动 showMoreActivity: false, // 查看更多活动
myOrder: { myOrder: {
passOrder: [{ passOrder: [],
id: 0,
logo: '',
store: '儿童营地',
title: '精灵鸟理想国年卡',
time: '有效期至 2020.09.30',
name: '文*海',
idNum: '211222****08080090'
},
{
id: 0,
logo: '',
store: '儿童营地',
title: '精灵鸟理想国年卡',
time: '有效期至 2020.09.30',
name: '文*海',
idNum: '211222****08080090'
},
],
artOrder: { artOrder: {
logo: '', logo: '',
orderList: [{ orderList: []
id: 0,
store: '海错图展馆',
cover: '../../pay/order-detail/image/goods_item.png',
title: '《海错图》展览单人门票',
time: '有效期至 2020.09.30',
quantity: '共1张门票'
}, ]
} }
}, },
appointmentList: [{ appointmentList: [{
...@@ -79,8 +55,18 @@ Page({ ...@@ -79,8 +55,18 @@ Page({
title: '日落观光游船体验活动之船行碧波共赏美景', title: '日落观光游船体验活动之船行碧波共赏美景',
num: 3 num: 3
}], }],
orderListBackup: [] orderListBackup: [],
integral: 0, //积分
shopConfig: App.globalData.shopId,
isYearCard: true,
isMonthCard: false,
},
// 跳转订单详情
onOrderDetail: function (event) {
let funcItem = event.currentTarget.dataset.item
wx.navigateTo({
url: '/pages/pay/order-detail/order-detail?id=' + funcItem.orderId,
})
}, },
close() { close() {
this.setData({ this.setData({
...@@ -90,14 +76,7 @@ Page({ ...@@ -90,14 +76,7 @@ Page({
animation: true, animation: true,
}) })
}, },
maskShow() {
this.setData({
mask: true
});
wx.hideTabBar({
animation: true,
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -108,6 +87,13 @@ Page({ ...@@ -108,6 +87,13 @@ Page({
onShow: function () { onShow: function () {
this.setUserInfo() this.setUserInfo()
}, },
// 查看积分明细
goIntegralDetail(event) {
let integral = event.currentTarget.dataset.integral
wx.navigateTo({
url: '/pages/mine/accumulate/accumulate?integral=' + integral,
})
},
// 去核销 // 去核销
goCouponInput(event) { goCouponInput(event) {
wx.navigateTo({ wx.navigateTo({
...@@ -115,7 +101,7 @@ Page({ ...@@ -115,7 +101,7 @@ Page({
}) })
}, },
// 获取核销权限 // 获取核销权限
// api/v1/login/getPermissions权限更上去了
getPermissions() { getPermissions() {
let that = this let that = this
App.wxRequest({ App.wxRequest({
...@@ -143,6 +129,23 @@ Page({ ...@@ -143,6 +129,23 @@ Page({
} }
}) })
}, },
// 获取积分
getIntegral() {
let that = this
App.wxRequest({
url: '/api/v1/smUser/getIntegral', //api/v1/smUser/getIntegral
data: {},
success: function (res) {
let integral = res.data ? res.data.integral : '0'
that.setData({
integral: integral
})
}
})
},
//获取待使用订单 //获取待使用订单
getWillUseOrders() { getWillUseOrders() {
let that = this let that = this
...@@ -155,9 +158,20 @@ Page({ ...@@ -155,9 +158,20 @@ Page({
pageSize: -1 pageSize: -1
}, },
success: function (res) { success: function (res) {
let tmpArr = [] console.log('that.shopConfig', that.data.shopConfig);
console.log('daishiyongdingdan', res);
let list = res.data let list = res.data.map(item => {
let shopFilter = that.data.shopConfig.filter(k => {
return k.name.toLowerCase() == item.officeName.toLowerCase()
})
item.logo = shopFilter.length > 0 ? shopFilter[0].logo : ''
if (item.smOrderDetails.length > 3) {
item.smOrderDetailsSlice3 = item.smOrderDetails.slice(0, 3)
}
item.expireTimeEnd = item.expireTime.substr(12)
return item
})
let listBackUp = JSON.parse(JSON.stringify(list)) //备份数据 let listBackUp = JSON.parse(JSON.stringify(list)) //备份数据
let orderList = `myOrder.artOrder.orderList` let orderList = `myOrder.artOrder.orderList`
...@@ -182,15 +196,31 @@ Page({ ...@@ -182,15 +196,31 @@ Page({
pageSize: -1 pageSize: -1
}, },
success: function (res) { success: function (res) {
let tmpArr = []
console.log('卡片数据', res);
let list = res.data.map(item => { 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 : ''
return item return item
}) })
let filterList = list.filter(item => {
return item.officeName == '儿童营地'
})
let passOrder = `myOrder.passOrder` let passOrder = `myOrder.passOrder`
that.setData({ that.setData({
[passOrder]: list [passOrder]: filterList
}) })
} }
}) })
...@@ -227,10 +257,16 @@ Page({ ...@@ -227,10 +257,16 @@ Page({
isRegister: true, isRegister: true,
userInfo: funcUserInfo userInfo: funcUserInfo
}) })
this.getMyActivityList() App.login({
this.getCardList() timeout: 0,
this.getWillUseOrders() success: (result) => {
this.getPermissions() this.getMyActivityList()
this.getCardList()
this.getWillUseOrders()
this.getPermissions()
this.getIntegral()
},
})
} else { } else {
this.setData({ this.setData({
isRegister: false, isRegister: false,
......
...@@ -23,6 +23,26 @@ ...@@ -23,6 +23,26 @@
padding: 220rpx 0 0 48rpx; padding: 220rpx 0 0 48rpx;
} }
.user-type {
width: 126rpx;
height: 40rpx;
font-weight: 500;
font-size: 22rpx;
color: #fff;
background-color: #6783AE;
text-align: center;
line-height: 40rpx;
border-radius: 4rpx;
letter-spacing: 10rpx;
margin-top: 20rpx;
}
.owner-tag {
height: 80rpx;
width: 142rpx;
/* margin-top: 8rpx!important; */
}
.mine-avatar { .mine-avatar {
z-index: 11; z-index: 11;
margin-right: 32rpx; margin-right: 32rpx;
...@@ -41,6 +61,44 @@ ...@@ -41,6 +61,44 @@
font-weight: bolder; font-weight: bolder;
} }
.padding-l-18 {
padding-left: 18rpx;
}
/* 积分 */
.integral {
color: #0D0D0E;
text-align: right;
}
.glod {
color: #F0DABB;
}
.integral-num {
font-size: 54rpx;
line-height: 76rpx;
padding-right: 80rpx;
}
.integral-title {
display: flex;
height: 80rpx;
align-items: center;
font-size: 26rpx;
line-height: 36rpx;
flex-direction: row;
justify-content: flex-end;
padding-right: 40rpx;
}
.arrow-r {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
}
.mine-info view:nth-child(1) image { .mine-info view:nth-child(1) image {
z-index: 11; z-index: 11;
width: 40rpx; width: 40rpx;
...@@ -64,7 +122,7 @@ ...@@ -64,7 +122,7 @@
padding: 41rpx 32rpx; padding: 41rpx 32rpx;
background-color: #fff; background-color: #fff;
border-radius: 4rpx; border-radius: 4rpx;
margin-top:48rpx; margin-top: 48rpx;
} }
.cpopon-info { .cpopon-info {
...@@ -336,10 +394,10 @@ ...@@ -336,10 +394,10 @@
border-radius: 4rpx; border-radius: 4rpx;
} }
.order-activity image { /* .order-activity image {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
} } */
.order-activity-title-wrapper { .order-activity-title-wrapper {
height: 48rpx; height: 48rpx;
...@@ -412,6 +470,13 @@ ...@@ -412,6 +470,13 @@
opacity: 0.81; opacity: 0.81;
} }
.card-bg {
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
.pass-bg-one { .pass-bg-one {
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -442,9 +507,9 @@ ...@@ -442,9 +507,9 @@
} }
.pass-logo-wrapper image { .pass-logo-wrapper image {
width: 64rpx; /* width: 64rpx;
height: 50rpx; height: 50rpx; */
background-color: #ccc; /* background-color: #ccc; */
} }
.pass-logo-wrapper text { .pass-logo-wrapper text {
...@@ -486,6 +551,7 @@ ...@@ -486,6 +551,7 @@
.goods-logo-wrapper { .goods-logo-wrapper {
height: 100rpx; height: 100rpx;
margin-top: 40rpx; margin-top: 40rpx;
margin-bottom: 10rpx;
} }
.goods-logo-wrapper text { .goods-logo-wrapper text {
...@@ -505,6 +571,7 @@ ...@@ -505,6 +571,7 @@
height: 136rpx; height: 136rpx;
margin-right: 32rpx; margin-right: 32rpx;
background-color: #ccc; background-color: #ccc;
border-radius: 5px;
} }
.goods-content text { .goods-content text {
...@@ -557,8 +624,6 @@ ...@@ -557,8 +624,6 @@
border-radius: 4rpx; border-radius: 4rpx;
} }
.appointment-activity-content {}
.appointment-activity-img { .appointment-activity-img {
width: 140rpx; width: 140rpx;
height: 136rpx; height: 136rpx;
...@@ -616,6 +681,8 @@ ...@@ -616,6 +681,8 @@
} }
.more image { .more image {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx; margin-left: 8rpx;
} }
...@@ -639,7 +706,25 @@ ...@@ -639,7 +706,25 @@
height: 32rpx; height: 32rpx;
} }
.all-order-icon {
width: 32rpx;
height: 32rpx;
}
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
}
.logo-box {
width: 100rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
margin-right: 20rpx;
}
.logo-box image {
max-width: 100% !important;
max-height: 100% !important;
} }
\ No newline at end of file
...@@ -344,10 +344,10 @@ page { ...@@ -344,10 +344,10 @@ page {
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
text-align: center; text-align: center;
margin-right: 20rpx;
} }
.logo-box image { .logo-box image {
max-width: 100%!important; max-width: 100%!important;
max-height: 100%!important; max-height: 100%!important;
} }
\ No newline at end of file
...@@ -828,6 +828,7 @@ image { ...@@ -828,6 +828,7 @@ image {
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
text-align: center; text-align: center;
margin-right: 20rpx;
} }
.logo-box image { .logo-box image {
......
...@@ -18,6 +18,7 @@ Page({ ...@@ -18,6 +18,7 @@ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
animation: {}, animation: {},
shopInfo: {}, shopInfo: {},
orderId: '', orderId: '',
...@@ -113,7 +114,6 @@ Page({ ...@@ -113,7 +114,6 @@ Page({
case 1: case 1:
this.setData({ this.setData({
orderType: logicData.option.type, orderType: logicData.option.type,
buyContent: this.data.shoppingCartList[0].cover,
quantityTitle: '选择购买数量', quantityTitle: '选择购买数量',
quantityTipText: '剩余库存', quantityTipText: '剩余库存',
...@@ -158,7 +158,6 @@ Page({ ...@@ -158,7 +158,6 @@ Page({
case 3: case 3:
this.setData({ this.setData({
orderType: logicData.option.type, orderType: logicData.option.type,
buyContent: this.data.shoppingCartList[0].cover,
quantityTitle: '选择购买数量', quantityTitle: '选择购买数量',
quantityTipText: '剩余库存', quantityTipText: '剩余库存',
contactTitle: '填写购票人信息', contactTitle: '填写购票人信息',
...@@ -340,6 +339,8 @@ Page({ ...@@ -340,6 +339,8 @@ Page({
shoppingCartList: funcShoppingCart, shoppingCartList: funcShoppingCart,
payAmount: App.modular.utils.formatAmount(funcPayAmount), payAmount: App.modular.utils.formatAmount(funcPayAmount),
}) })
console.log('shoppingCartList', this.data.shoppingCartList)
}, },
/** /**
...@@ -397,8 +398,42 @@ Page({ ...@@ -397,8 +398,42 @@ Page({
if (funcResponse.inventorie) { if (funcResponse.inventorie) {
funcRegisterTitle = funcResponse.inventorie[0].cardName funcRegisterTitle = funcResponse.inventorie[0].cardName
funcQuantityStock = funcResponse.inventorie[0].number funcQuantityStock = funcResponse.inventorie[0].number
switch (funcRegisterTitle) {
case '年卡':
this.setData({
buyContent: 'pay/order-input/card-1.png',
})
break
case '月卡':
this.setData({
buyContent: 'pay/order-input/card-2.png',
})
break
case '':
this.setData({
buyContent: 'pay/order-input/card-3.png',
})
break
}
} else { } else {
funcQuantityStock = funcResponse.number funcQuantityStock = funcResponse.number
switch (this.data.shopInfo.appId) {
case 1:
this.setData({
buyContent: 'pay/order-input/card-4.png',
})
break
case 3:
this.setData({
buyContent: 'pay/order-input/card-3.png',
})
break
}
} }
this.setData({ this.setData({
registerTitle: funcRegisterTitle, registerTitle: funcRegisterTitle,
...@@ -662,7 +697,10 @@ Page({ ...@@ -662,7 +697,10 @@ Page({
'totalMoney': Number(this.data.payAmount), 'totalMoney': Number(this.data.payAmount),
'office': { 'id': this.data.shopInfo.id }, 'office': { 'id': this.data.shopInfo.id },
'smOrderDetails': funcCommodity, 'smOrderDetails': funcCommodity,
'smPersonalDetails': funcUserInfo 'smPersonalDetails': funcUserInfo,
'name': funcRegisterInfo[0].name,
'mobilePhone': funcRegisterInfo[0].phone,
'goodType': this.data.shopInfo.shopType,
}, },
success: (response) => { success: (response) => {
if (/价格不一致/.test(response.data.msg)) { if (/价格不一致/.test(response.data.msg)) {
......
...@@ -5,7 +5,23 @@ ...@@ -5,7 +5,23 @@
<view class="buy-content" wx:if="{{winBuyContent}}"> <view class="buy-content" wx:if="{{winBuyContent}}">
<!-- 年卡月卡 --> <!-- 年卡月卡 -->
<view class="buy-content-pass" wx:if="{{orderType === 1}}"> <view class="buy-content-pass" wx:if="{{orderType === 1}}">
<image src="{{buyContent}}"></image> <image src="{{resourcesBase + buyContent}}"></image>
<view class="buy-content-pass-content col con-b">
<view class="col">
<text class="pass-content-title">{{shoppingCartList[0].name}}</text>
<text class="pass-content-price">{{'¥' + shoppingCartList[0].priceFinal + '/人'}}</text>
</view>
<view class="col">
<view class="row align-c">
<text class="pass-content-tip">{{'使用次数 '}}</text>
<text class="pass-content-tip">{{'不限'}}</text>
</view>
<view class="row align-c">
<text class="pass-content-tip">{{'有效期 '}}</text>
<text class="pass-content-tip">{{shoppingCartList[0].dateValid + ' - ' + shoppingCartList[0].dateInvalid}}</text>
</view>
</view>
</view>
</view> </view>
<!-- 普通商品 --> <!-- 普通商品 -->
...@@ -21,7 +37,23 @@ ...@@ -21,7 +37,23 @@
<!-- 次票 --> <!-- 次票 -->
<view class="buy-content-pass" wx:if="{{orderType === 3}}"> <view class="buy-content-pass" wx:if="{{orderType === 3}}">
<image src="{{buyContent}}"></image> <image src="{{resourcesBase + buyContent}}"></image>
<view class="buy-content-pass-content col con-b">
<view class="col">
<text class="pass-content-title">{{shoppingCartList[0].name}}</text>
<text class="pass-content-price">{{'¥' + shoppingCartList[0].priceFinal + '/人'}}</text>
</view>
<view class="col">
<view class="row align-c">
<text class="pass-content-tip">{{'使用次数 '}}</text>
<text class="pass-content-tip">{{'1次'}}</text>
</view>
<view class="row align-c">
<text class="pass-content-tip">{{'有效期 '}}</text>
<text class="pass-content-tip">{{shoppingCartList[0].dateValid + ' - ' + shoppingCartList[0].dateInvalid}}</text>
</view>
</view>
</view>
</view> </view>
<!-- 文创商品 --> <!-- 文创商品 -->
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
/* 购买内容 - pass */ /* 购买内容 - pass */
.buy-content-pass { .buy-content-pass {
position: relative;
width: 670rpx; width: 670rpx;
height: 356rpx; height: 356rpx;
border-radius: 4px; border-radius: 4px;
...@@ -64,6 +65,40 @@ ...@@ -64,6 +65,40 @@
height: 356rpx; height: 356rpx;
} }
.buy-content-pass-content {
position: absolute;
top: 30rpx;
left: 24rpx;
width: 606rpx;
height: 276rpx;
}
.pass-content-title {
height: 58rpx;
font-size: 42rpx;
font-weight: 500;
line-height: 58rpx;
color: #FFFFFF;
}
.pass-content-price {
height: 58rpx;
margin-top: 8rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #FFFFFF;
}
.pass-content-tip {
height: 32rpx;
margin-top: 8rpx;
font-size: 22rpx;
font-weight: 500;
line-height: 32rpx;
color: #FFFFFF;
}
/* 购买内容 - service */ /* 购买内容 - service */
.buy-content-service { .buy-content-service {
width: 670rpx; width: 670rpx;
......
...@@ -2,6 +2,8 @@ const App = getApp() ...@@ -2,6 +2,8 @@ const App = getApp()
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
// formType: 1, // formType: 1,
// entryComplete: false, // entryComplete: false,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="entry-complete row con-c align-c" wx:if="{{entryComplete}}"> <view class="entry-complete row con-c align-c" wx:if="{{entryComplete}}">
<view class="entry-complete-tip"> <view class="entry-complete-tip">
<image src="./image/tip-1.png"></image> <image src="./image/tip.png"></image>
<l-button l-class="button" plain="{{true}}" bind:lintap="onEntryComplete">我知道了</l-button> <l-button l-class="button" plain="{{true}}" bind:lintap="onEntryComplete">我知道了</l-button>
</view> </view>
</view> </view>
...@@ -96,11 +96,11 @@ ...@@ -96,11 +96,11 @@
</view> </view>
<view class="input-wrap row con-b align-c" style="padding: 0"> <view class="input-wrap row con-b align-c" style="padding: 0">
<l-button special="{{true}}" bind:lintap="onQuantityCut"> <l-button special="{{true}}" bind:lintap="onQuantityCut">
<image class="input-icon" src="../../image/cut.png"></image> <image class="input-icon" src="{{imageBase + 'icon/cut-1.png'}}"></image>
</l-button> </l-button>
<text>{{formInto.quantity}}</text> <text>{{formInto.quantity}}</text>
<l-button special="{{true}}" bind:lintap="onQuantityAdd"> <l-button special="{{true}}" bind:lintap="onQuantityAdd">
<image class="input-icon" src="../../image/add.png"></image> <image class="input-icon" src="{{imageBase + 'icon/add-1.png'}}"></image>
</l-button> </l-button>
</view> </view>
</view> </view>
......
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