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()
Page({
data: {
imageResourcesBase: App.globalData.appResourcesBase,
showMenu: false,
menu: '全 部',
menuList: [
{id: 0, name: '全 部'},
{id: 1, name: '获 取'},
{id: 2, name: '已使用'}
menuList: [{
id: '',
name: '全 部'
},
{
id: 0,
name: '获 取'
},
{
id: 1,
name: '已使用'
}
],
pageNo: '1',
pageSize: '-1',
type: '', // "" 全部 0 获取 1消费(0 发放 1 兑换)
type: '', // "" 全部 0 获取 1消费(0 发放 1 兑换)
accumulateList: [],
selectedList: []
selectedList: [],
integral: '0',
type: ''
},
onLoad: function (options) {
this.getAccumulate()
let integral = options.integral
this.setData({
integral: integral
})
App.login({
timeout: 0,
success: (result) => {
this.getAccumulate()
},
})
},
// 获取积分列表
getAccumulate: function () {
wx.showLoading({
title: '加载中',
})
App.wxRequest({
url: '/api/v1/smUser/getIntegralDetails',
data: {
'pageNo': this.data.pageNo,
'pageSize': this.data.pageSize,
type: ''
type: this.data.type
},
success: (response) => {
wx.hideLoading({
success: (res) => {},
})
let accumulateList = response.data
let selectedList = accumulateList
this.setData({
......@@ -57,18 +83,23 @@ Page({
* @returns
*/
onTabMenu: function (event) {
let { index } = event.currentTarget.dataset
let {
index,
type
} = event.currentTarget.dataset
let menu = this.data.menuList[index].name
let selectedList = []
if (index === 0) {
selectedList = this.data.accumulateList
} else {
selectedList = selectedList.filter(v => v.type === index-1)
selectedList = selectedList.filter(v => v.type === index - 1)
}
this.setData({
menu,
selectedList
selectedList,
type: type
})
this.onHideMenu()
this.getAccumulate()
}
})
\ No newline at end of file
......@@ -2,22 +2,24 @@
<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">
<text>1888</text>
<text>{{integral}}</text>
</view>
<view class="accumulate-tips">
<text>积分用于兑换积分商品,积分商城即将上线,敬请期待</text>
</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>
<image src="/image/icon/arrow-b-2.png"></image>
<view class="banner-menu-down col" wx:if="{{showMenu}}">
<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>
</view>
</view>
......
......@@ -9,6 +9,15 @@ page {
.banner {
position: fixed;
z-index: -2;
top: 0;
left: 0;
width: 750rpx;
height: 480rpx;
}
.opacity-cover {
position: fixed;
z-index: -1;
top: 0;
left: 0;
......@@ -54,11 +63,11 @@ page {
width: 166rpx;
height: 180rpx;
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;
}
.banner-menu-down text{
.banner-menu-down text {
flex: 1;
padding-left: 24rpx;
color: #959CA8;
......@@ -123,9 +132,11 @@ page {
font-size: 30rpx;
color: #E66060;
}
.accumulate-right text {
margin-left: 6rpx;
}
.accumulate-type-color {
color: #959DA9;
}
\ No newline at end of file
// pages/myActivity/myActivity.js
// pages/myAppointment/myAppointment.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
navItem: [{
content: '全部',
type: '0'
},
navItem: [
// {content:'全部',type:'0'},
{
content: '未开始',
content: '夜间入园预约',
type: '1'
},
{
content: '进行中',
content: '看房预约',
type: '2'
},
{
content: '已结束',
type: '3'
},
],
height: 0,
data: [],
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'},
],
active: 0,
pageNo: 1,
pageSize: 10,
loading: false,
moreData: true,
},
goPlay() {
wx.switchTab({
url: '../../pages/play/play',
})
height: 0,
},
// 点击导航切换,默认是全部的
chageNav(e) {
let index = e.currentTarget.dataset.index
this.setData({
active: index,
pageNo: 1,
active: index
})
this.getMyActivityList()
this.getList(index)
},
activityDetail(e) {
//预约凭证
gohotelAccommodation(e) {
console.log(e)
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) {
this.setData({
height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度
})
this.getMyActivityList()
this.getList(this.data.active)
},
// 我的活动
getMyActivityList() {
let state = ''
switch (Number(this.data.active)) {
// 预约列表/我的预约
getList(index) {
let type = ''
switch (index) {
case 0:
state = '';
type = 0;
break;
case 1:
state = 0;
break;
case 2:
state = 1;
break;
case 3:
state = 2;
type = 1;
break;
}
var that = this
app.login({
success: function() {
that.setData({
loading: true
})
app.wxRequest({
url: '/api/v1/activity/getMyActivityList',
data: {
activeState: state,
pageSize: that.data.pageSize,
pageNo: that.data.pageNo
},
success: function(res) {
let list = res.data.list
let tmpArr = []
list.forEach(item => {
let state = item.activeState * 1
let type = 0
switch (state) {
case 0:
type = 1;
break;
case 1:
type = 0;
break;
case 2:
type = 2;
break;
}
let obj = {
time: item.enrollDate, //item.activeDate + ' ' + item.activeTime,
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
})
let that = this
app.wxRequest({
url: '/api/v1/subscribe/getList',
data: {
state: '',
type: type //0 入园预约 1 看房预约 全部 空字符
},
success: function(res) {
let tmpArr = []
res.data.forEach(item => {
let type = item.type * 1
let title = ''
let url = ''
switch (type) {
case 0:
title = '夜间入园预约'
url = 'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'
break;
case 1:
title = '看房预约'
url = 'http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'
break;
}
let obj = {
title: title,
type: type,
time: item.subscribeDate.substring(5, 11).replace('-', '月').replace(' ', '日') + ((type == 0) ? ' 20:00-24:00' : ''),
num: item.subscribeNum,
url: url,
id: item.id,
mobile: item.mobile,
name: item.name,
}
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="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>
<view class="activity-body">
<view class="my-activities-item " data-enrollid="{{item.enrollId}}" wx:for="{{data}}" wx:key="index" bindtap="activityDetail">
<view class="my-activities-top {{item.type == 2?'timeendColor':''}}">
{{item.time}}
</view>
<view class="my-activities-bottom">
<view class="activity-status {{item.type == 1 ?'stautsColor':(item.type == 2?'contentEndColor':'')}}">{{status.status(item.type)}}</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 class="myAppointment-body">
<view class="myAppointment-item" wx:for="{{data}}" wx:key="index">
<image src="{{item.url}}" class="item-img"></image>
<view class="item-content">
<view class="item-title {{item.type == 0 ?'item-num-1' : ''}}">{{item.title}}</view>
<view class="item-time {{item.type == 1 ?'item-time-1' : ''}}">预约时间 {{item.time}}</view>
<view wx:if="{{item.type == 0}}" class="item-num">预约人数 {{item.num}}人</view>
</view>
<view class="button" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</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 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>
<!-- 状态值格式化 -->
<wxs module="status">
var status = function(type) {
if (type == 0) {
return '进行中'
} else if (type == 1) {
return '未开始'
} else {
return '已结束'
}
<wxs module="m1">
var getDate = function(date, type) {
return date.substring(5, 11).replace('-', '月').replace(' ', '日') + ((type == 0) ? ' 20:00-24:00' : '');
}
module.exports.status = status;
module.exports.getDate = getDate;
</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 {
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;
height: 100%;
/* min-height: 1000rpx; */
height: auto;
/* background-color: rgb(245, 244, 249); */
padding-top: 50rpx;
}
.noActive {
......@@ -47,167 +74,68 @@
margin-top: 64rpx;
}
.activity-nav {
width: 750rpx;
padding-top: 224rpx;
/* 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;
}
.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;
.myAppointment-item {
width: 670rpx;
height: 360rpx;
margin: auto;
margin-bottom: 50rpx;
background-color: rgb(220, 214, 220);
border-radius: 4px;
position: relative;
overflow: hidden;
}
.my-activities-top {
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 {
.item-img {
width: 100%;
height: 250rpx;
position: absolute;
bottom: 0;
background-color: white;
border-radius: 3px;
}
.my-activities-title {
line-height: 2;
color: rgba(21, 25, 31, 1);
font-size: 30rpx;
height: 360rpx;
}
.my-activities-content {
color: rgb(169, 174, 181);
font-size: 26rpx;
padding-left: 50rpx;
line-height: 2;
.item-content {
width: 610rpx;
height: auto;
position: absolute;
bottom: 45rpx;
left: 30rpx;
}
.subscribe {
width: 150rpx;
height: 70rpx;
position: absolute;
border: 1px solid rgb(134, 137, 145);
border-radius: 3px;
right: 50rpx;
.item-title {
font-size: 36rpx;
line-height: 70rpx;
text-align: center;
font-size: 26rpx;
top: 92rpx;
}
.activity-status {
text-align: right;
/* line-height: 65rpx; */
padding-top: 32rpx;
padding-right: 30rpx;
color: rgb(154, 192, 227);
.item-time {
line-height: 48rpx;
font-size: 28rpx;
color: rgb(220, 214, 220);
}
.activity-contanier {
height: 160rpx;
width: 600rpx;
margin: auto;
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;
.item-num {
font-size: 28rpx;
color: rgb(220, 214, 220);
line-height: 48rpx;
}
.opcity {
opacity: 0.6;
}
/* 入园标题样式 */
.timeendColor {
background: rgba(217, 222, 231, 1);
.item-num-1 {
color: rgb(244, 254, 255);
}
.contentEndColor {
color: rgba(194, 199, 207, 1);
.item-time-1 {
color: rgb(40, 50, 56);
}
/* 未开始字体颜色 */
.stautsColor {
color: rgb(164, 183, 133) !important;
.button {
width: 170rpx;
height: 70rpx;
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({
data: {
isCheckPermission: false,
imageBase: App.globalData.appImageBase,
imageResourcesBase: App.globalData.appResourcesBase,
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
......@@ -42,35 +43,10 @@ Page({
showMoreOrder: false, // 查看更多订单
showMoreActivity: false, // 查看更多活动
myOrder: {
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'
},
],
passOrder: [],
artOrder: {
logo: '',
orderList: [{
id: 0,
store: '海错图展馆',
cover: '../../pay/order-detail/image/goods_item.png',
title: '《海错图》展览单人门票',
time: '有效期至 2020.09.30',
quantity: '共1张门票'
}, ]
orderList: []
}
},
appointmentList: [{
......@@ -79,8 +55,18 @@ Page({
title: '日落观光游船体验活动之船行碧波共赏美景',
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() {
this.setData({
......@@ -90,14 +76,7 @@ Page({
animation: true,
})
},
maskShow() {
this.setData({
mask: true
});
wx.hideTabBar({
animation: true,
})
},
/**
* 生命周期函数--监听页面加载
*/
......@@ -108,6 +87,13 @@ Page({
onShow: function () {
this.setUserInfo()
},
// 查看积分明细
goIntegralDetail(event) {
let integral = event.currentTarget.dataset.integral
wx.navigateTo({
url: '/pages/mine/accumulate/accumulate?integral=' + integral,
})
},
// 去核销
goCouponInput(event) {
wx.navigateTo({
......@@ -115,7 +101,7 @@ Page({
})
},
// 获取核销权限
// api/v1/login/getPermissions权限更上去了
getPermissions() {
let that = this
App.wxRequest({
......@@ -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() {
let that = this
......@@ -155,9 +158,20 @@ Page({
pageSize: -1
},
success: function (res) {
let tmpArr = []
console.log('daishiyongdingdan', res);
let list = res.data
console.log('that.shopConfig', that.data.shopConfig);
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 orderList = `myOrder.artOrder.orderList`
......@@ -182,15 +196,31 @@ Page({
pageSize: -1
},
success: function (res) {
let tmpArr = []
console.log('卡片数据', 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 : ''
return item
})
let filterList = list.filter(item => {
return item.officeName == '儿童营地'
})
let passOrder = `myOrder.passOrder`
that.setData({
[passOrder]: list
[passOrder]: filterList
})
}
})
......@@ -227,10 +257,16 @@ Page({
isRegister: true,
userInfo: funcUserInfo
})
this.getMyActivityList()
this.getCardList()
this.getWillUseOrders()
this.getPermissions()
App.login({
timeout: 0,
success: (result) => {
this.getMyActivityList()
this.getCardList()
this.getWillUseOrders()
this.getPermissions()
this.getIntegral()
},
})
} else {
this.setData({
isRegister: false,
......
......@@ -23,6 +23,26 @@
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 {
z-index: 11;
margin-right: 32rpx;
......@@ -41,6 +61,44 @@
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 {
z-index: 11;
width: 40rpx;
......@@ -64,7 +122,7 @@
padding: 41rpx 32rpx;
background-color: #fff;
border-radius: 4rpx;
margin-top:48rpx;
margin-top: 48rpx;
}
.cpopon-info {
......@@ -336,10 +394,10 @@
border-radius: 4rpx;
}
.order-activity image {
/* .order-activity image {
width: 32rpx;
height: 32rpx;
}
} */
.order-activity-title-wrapper {
height: 48rpx;
......@@ -412,6 +470,13 @@
opacity: 0.81;
}
.card-bg {
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
.pass-bg-one {
position: absolute;
left: 0;
......@@ -442,9 +507,9 @@
}
.pass-logo-wrapper image {
width: 64rpx;
height: 50rpx;
background-color: #ccc;
/* width: 64rpx;
height: 50rpx; */
/* background-color: #ccc; */
}
.pass-logo-wrapper text {
......@@ -486,6 +551,7 @@
.goods-logo-wrapper {
height: 100rpx;
margin-top: 40rpx;
margin-bottom: 10rpx;
}
.goods-logo-wrapper text {
......@@ -505,6 +571,7 @@
height: 136rpx;
margin-right: 32rpx;
background-color: #ccc;
border-radius: 5px;
}
.goods-content text {
......@@ -557,8 +624,6 @@
border-radius: 4rpx;
}
.appointment-activity-content {}
.appointment-activity-img {
width: 140rpx;
height: 136rpx;
......@@ -616,6 +681,8 @@
}
.more image {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
}
......@@ -639,7 +706,25 @@
height: 32rpx;
}
.all-order-icon {
width: 32rpx;
height: 32rpx;
}
image {
width: 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 {
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
......@@ -828,6 +828,7 @@ image {
height: 80rpx;
line-height: 80rpx;
text-align: center;
margin-right: 20rpx;
}
.logo-box image {
......
......@@ -18,6 +18,7 @@ Page({
data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
animation: {},
shopInfo: {},
orderId: '',
......@@ -113,7 +114,6 @@ Page({
case 1:
this.setData({
orderType: logicData.option.type,
buyContent: this.data.shoppingCartList[0].cover,
quantityTitle: '选择购买数量',
quantityTipText: '剩余库存',
......@@ -158,7 +158,6 @@ Page({
case 3:
this.setData({
orderType: logicData.option.type,
buyContent: this.data.shoppingCartList[0].cover,
quantityTitle: '选择购买数量',
quantityTipText: '剩余库存',
contactTitle: '填写购票人信息',
......@@ -340,6 +339,8 @@ Page({
shoppingCartList: funcShoppingCart,
payAmount: App.modular.utils.formatAmount(funcPayAmount),
})
console.log('shoppingCartList', this.data.shoppingCartList)
},
/**
......@@ -397,8 +398,42 @@ Page({
if (funcResponse.inventorie) {
funcRegisterTitle = funcResponse.inventorie[0].cardName
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 {
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({
registerTitle: funcRegisterTitle,
......@@ -662,7 +697,10 @@ Page({
'totalMoney': Number(this.data.payAmount),
'office': { 'id': this.data.shopInfo.id },
'smOrderDetails': funcCommodity,
'smPersonalDetails': funcUserInfo
'smPersonalDetails': funcUserInfo,
'name': funcRegisterInfo[0].name,
'mobilePhone': funcRegisterInfo[0].phone,
'goodType': this.data.shopInfo.shopType,
},
success: (response) => {
if (/价格不一致/.test(response.data.msg)) {
......
......@@ -5,7 +5,23 @@
<view class="buy-content" wx:if="{{winBuyContent}}">
<!-- 年卡月卡 -->
<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>
<!-- 普通商品 -->
......@@ -21,7 +37,23 @@
<!-- 次票 -->
<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>
<!-- 文创商品 -->
......
......@@ -52,6 +52,7 @@
/* 购买内容 - pass */
.buy-content-pass {
position: relative;
width: 670rpx;
height: 356rpx;
border-radius: 4px;
......@@ -64,6 +65,40 @@
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 */
.buy-content-service {
width: 670rpx;
......
......@@ -2,6 +2,8 @@ const App = getApp()
Page({
data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
// formType: 1,
// entryComplete: false,
......
......@@ -3,7 +3,7 @@
<view class="entry-complete row con-c align-c" wx:if="{{entryComplete}}">
<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>
</view>
</view>
......@@ -96,11 +96,11 @@
</view>
<view class="input-wrap row con-b align-c" style="padding: 0">
<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>
<text>{{formInto.quantity}}</text>
<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>
</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