Commit a4b6d590 by wjw

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

parents f2a6f545 565c0be5
...@@ -78,6 +78,7 @@ Page({ ...@@ -78,6 +78,7 @@ Page({
} }
this.queryCommodity() this.queryCommodity()
if (this.data.shopInfo.appId === 3) this.queryCommodityChild()
}, },
onPageScroll: function (funcEvent) { onPageScroll: function (funcEvent) {
// 优化滚动事件触发频率 // 优化滚动事件触发频率
...@@ -117,6 +118,8 @@ Page({ ...@@ -117,6 +118,8 @@ Page({
'id': funcResponse[i].id, // 商品标识 'id': funcResponse[i].id, // 商品标识
'typeId': funcResponse[i].genre, // 商品类型 'typeId': funcResponse[i].genre, // 商品类型
'inventoriesId': funcResponse[i].inventorie[0].inventoriesId, // 仓库标识 'inventoriesId': funcResponse[i].inventorie[0].inventoriesId, // 仓库标识
'dateValid': App.modular.miment().format('YYYY.MM.DD'), // 有效时间
'dateInvalid': funcResponse[i].inventorie[0].cardNam, // 失效时间
'name': funcResponse[i].name, 'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面 'cover': funcResponse[i].coverImg, // 商品封面
'price': funcResponse[i].inventorie[0].sightseerPrice, // 普通价 'price': funcResponse[i].inventorie[0].sightseerPrice, // 普通价
...@@ -159,6 +162,8 @@ Page({ ...@@ -159,6 +162,8 @@ Page({
'id': funcResponse[i].id, // 商品标识 'id': funcResponse[i].id, // 商品标识
'typeId': funcResponse[i].genre, // 商品分类标识 'typeId': funcResponse[i].genre, // 商品分类标识
'inventoriesId': funcResponse[i].inventoriesId, // 仓库标识 'inventoriesId': funcResponse[i].inventoriesId, // 仓库标识
'dateValid': App.modular.miment().format('YYYY.MM.DD'), // 有效时间
'dateInvalid': App.modular.miment().format('YYYY.MM.DD'), // 失效时间
'name': funcResponse[i].name, 'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面 'cover': funcResponse[i].coverImg, // 商品封面
'price': funcResponse[i].sightseerPrice, // 普通价 'price': funcResponse[i].sightseerPrice, // 普通价
...@@ -193,8 +198,121 @@ Page({ ...@@ -193,8 +198,121 @@ Page({
this.setData({ this.setData({
winLoading: false, winLoading: false,
commodityList: funcCommodityList, commodityList: this.data.commodityList.concat(funcCommodityList),
}) })
console.log('1111', this.data.commodityList)
},
})
},
queryCommodityChild: function () {
this.setData({
shopInfo: wx.getStorageSync('shopInfoBuffer')
})
App.wxRequest({
url: '/api/v1/commodity/getCommoditys',
data: {
'officeId': this.data.shopInfo.id,
'genre': 3,
},
success: (response) => {
let funcCommodityList = []
let funcResponse = response.data
switch (3) {
// 年卡月卡
case 1:
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'id': funcResponse[i].id, // 商品标识
'typeId': funcResponse[i].genre, // 商品类型
'inventoriesId': funcResponse[i].inventorie[0].inventoriesId, // 仓库标识
'dateValid': App.modular.miment().format('YYYY.MM.DD'), // 有效时间
'dateInvalid': funcResponse[i].inventorie[0].cardNam, // 失效时间
'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面
'price': funcResponse[i].inventorie[0].sightseerPrice, // 普通价
'priceText': App.modular.utils.formatAmount(funcResponse[i].inventorie[0].sightseerPrice), // 普通价文本格式
'priceSpecial': funcResponse[i].inventorie[0].ownerPrice, // 业主价
'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].inventorie[0].ownerPrice), // 业主价文本格式
'priceDiscount': funcResponse[i].inventorie[0].price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcResponse[i].inventorie[0].price), // 活动价文本格式
'priceType': 1,
'describe': funcResponse[i].synopsis,
'tags': funcResponse[i].tags,
'notificationId': funcResponse[i].notificationId, // 下单须知
}
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if (funcItem.priceDiscount) {
funcItem.priceType = 1
} else {
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if (funcItem.price !== funcItem.priceSpecial && funcUserType) {
funcItem.priceType = 2
} else {
funcItem.priceType = 3
}
}
funcCommodityList.push(funcItem)
}
break
// 普通商品
case 2:
// 门票商品
case 3:
default:
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'id': funcResponse[i].id, // 商品标识
'typeId': funcResponse[i].genre, // 商品分类标识
'inventoriesId': funcResponse[i].inventoriesId, // 仓库标识
'dateValid': App.modular.miment().format('YYYY.MM.DD'), // 有效时间
'dateInvalid': App.modular.miment().format('YYYY.MM.DD'), // 失效时间
'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面
'price': funcResponse[i].sightseerPrice, // 普通价
'priceText': App.modular.utils.formatAmount(funcResponse[i].sightseerPrice), // 普通价文本格式
'priceSpecial': funcResponse[i].ownerPrice, // 业主价
'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].ownerPrice), // 业主价文本格式
'priceDiscount': funcResponse[i].price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcResponse[i].price), // 活动价文本格式
'priceType': 1,
'describe': funcResponse[i].synopsis,
'tags': funcResponse[i].tags,
'notificationId': funcResponse[i].notificationId, // 下单须知
}
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if (funcItem.priceDiscount) {
funcItem.priceType = 1
} else {
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if (funcItem.price !== funcItem.priceSpecial && funcUserType) {
funcItem.priceType = 2
} else {
funcItem.priceType = 3
}
}
funcCommodityList.push(funcItem)
}
break
}
this.setData({
winLoading: false,
commodityList: this.data.commodityList.concat(funcCommodityList),
})
console.log('2222', this.data.commodityList)
}, },
}) })
}, },
...@@ -210,7 +328,7 @@ Page({ ...@@ -210,7 +328,7 @@ Page({
wx.setStorageSync('shoppingCartBuffer', [funcCommodityInfo]) wx.setStorageSync('shoppingCartBuffer', [funcCommodityInfo])
wx.navigateTo({ wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + this.data.shopInfo.shopType url: '/pages/pay/order-input/order-input?type=' + funcCommodityInfo.typeId
}) })
}, },
}) })
\ No newline at end of file
...@@ -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) {
let integral = options.integral
this.setData({
integral: integral
})
App.login({
timeout: 0,
success: (result) => {
this.getAccumulate() 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,10 +2,11 @@ ...@@ -2,10 +2,11 @@
<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">
...@@ -17,7 +18,8 @@ ...@@ -17,7 +18,8 @@
<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({
success: function() {
that.setData({
loading: true
})
app.wxRequest({ app.wxRequest({
url: '/api/v1/activity/getMyActivityList', url: '/api/v1/subscribe/getList',
data: { data: {
activeState: state, state: '',
pageSize: that.data.pageSize, type: type //0 入园预约 1 看房预约 全部 空字符
pageNo: that.data.pageNo
}, },
success: function(res) { success: function(res) {
let list = res.data.list
let tmpArr = [] let tmpArr = []
list.forEach(item => { res.data.forEach(item => {
let state = item.activeState * 1 let type = item.type * 1
let type = 0 let title = ''
switch (state) { let url = ''
switch (type) {
case 0: case 0:
type = 1; title = '夜间入园预约'
url = 'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'
break; break;
case 1: case 1:
type = 0; title = '看房预约'
break; url = 'http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'
case 2:
type = 2;
break; break;
} }
let obj = { let obj = {
time: item.enrollDate, //item.activeDate + ' ' + item.activeTime, title: title,
type: type, type: type,
content: item.address, time: item.subscribeDate.substring(5, 11).replace('-', '月').replace(' ', '日') + ((type == 0) ? ' 20:00-24:00' : ''),
title: item.name, num: item.subscribeNum,
enrollId: item.enrollId, url: url,
cover: item.cover, id: item.id,
mobile: item.mobile,
name: item.name,
} }
tmpArr.push(obj) tmpArr.push(obj)
}) })
if (that.data.pageNo != 1) {
tmpArr = that.data.data.concat(tmpArr)
}
that.setData({
data: tmpArr,
loading: false,
})
that.setData({ that.setData({
moreData: (that.data.data.length >= res.data.count * 1) ? false : true data: tmpArr
})
},
fail: function(err) {
that.setData({
loading: false
}) })
} }
}) })
} }
})
},
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 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>
<view class="my-activities-bottom"> <view class="button" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view>
<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>
<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="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>
</view> <view class="noActive" hidden="{{data.length > 0 || active == 0}}">
<view class="noActive-title">暂无看房预约</view>
</view> <view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view>
<view class="noActive" hidden="{{data.length > 0}}">
<view class="noActive-title">暂无已报名的活动</view>
<view class="noActive-botton" bindtap="goPlay">发现畅玩活动</view>
</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
}) })
App.login({
timeout: 0,
success: (result) => {
this.getMyActivityList() this.getMyActivityList()
this.getCardList() this.getCardList()
this.getWillUseOrders() this.getWillUseOrders()
this.getPermissions() this.getPermissions()
this.getIntegral()
},
})
} else { } else {
this.setData({ this.setData({
isRegister: false, isRegister: false,
......
...@@ -9,12 +9,13 @@ ...@@ -9,12 +9,13 @@
</view> </view>
<view wx:if="{{isRegister}}" class="mine-info col"> <view wx:if="{{isRegister}}" class="mine-info col">
<view class="row align-c"> <view class="row align-c" style="height:76rpx">
<text>{{userInfo.name}}</text> <text>{{userInfo.name}}</text>
<image src="./image/inform.png" bindtap="goMyInfo"></image> <image src="./image/inform.png" bindtap="goMyInfo"></image>
</view> </view>
<view> <view class="owner-tag">
<text>{{userInfo.phone}}</text> <!-- <text>{{userInfo.phone}}</text> -->
<button class="user-type">游客</button>
</view> </view>
</view> </view>
<view wx:else class="mine-info col"> <view wx:else class="mine-info col">
...@@ -22,27 +23,39 @@ ...@@ -22,27 +23,39 @@
<text style="color:#333333;font-weight:500;">登录/注册</text> <text style="color:#333333;font-weight:500;">登录/注册</text>
</view> </view>
</view> </view>
<view bindtap="goIntegralDetail" data-integral="{{integral}}" class="integral "
style="position:relative;z-index:2; flex:1">
<view class="integral-num">{{integral}}</view>
<view class="integral-title">我的积分 <image class="arrow-r"
src="{{imageResourcesBase+'mine/home/huise_arrow_right.png'}}"></image>
</view>
</view>
</view> </view>
</view> </view>
<view class="mine" style="height:512rpx" wx:if="{{type == 1}}"> <view class="mine" style="height:512rpx" wx:if="{{type == 1}}">
<image class="background-image" style="height:512rpx;" src="http://upload.miaomiao-bao.com/8f046202008201043321555.jpg"></image> <image class="background-image" style="height:512rpx;"
src="http://upload.miaomiao-bao.com/8f046202008201043321555.jpg"></image>
<view class="row align-c approve"> <view class="row align-c approve">
<view class="mine-avatar"> <view class="mine-avatar">
<l-avatar size="112" src="{{userInfo.avatar}}"/> <l-avatar size="112" src="{{userInfo.avatar}}" />
</view> </view>
<view class="mine-info col"> <view class="mine-info col">
<view class="row align-c"> <view class="row align-c" style="height:76rpx">
<text style="color:#F0DABB;font-weight:500;">{{userInfo.name}}</text> <text style="color:#F0DABB;font-weight:500;" class="padding-l-18">{{userInfo.name}}</text>
<image src="/image/inform-w.png" bindtap="goMyInfo"></image> <image src="/image/inform-w.png" bindtap="goMyInfo"></image>
</view> </view>
<view> <view class="owner-tag">
<text>{{userInfo.phone}}</text> <!-- <text>{{userInfo.phone}}</text> -->
<image mode="aspectFill" src="{{imageResourcesBase+'mine/home/ownerTag.png'}}"></image>
</view>
</view> </view>
<view bindtap="goIntegralDetail" data-integral="{{integral}}" class=" integral glod"
style="position:relative;z-index:2; flex:1">
<view class="integral-num">{{integral}}</view>
<view class="integral-title">我的积分 <image class="arrow-r"
src="{{imageResourcesBase+'mine/home/glod_arrow_right.png'}}"></image>
</view> </view>
<view bindtap="maskShow" class="align-c" style="positive:relative;margin-left:68rpx;display:flex;">
<image src="http://upload.miaomiao-bao.com/62e04202008201417045326.png" class="approve-icon"></image>
<view class="rule">园区业主</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -79,7 +92,7 @@ ...@@ -79,7 +92,7 @@
</view> </view>
<view class="row align-c" bindtap="onOrder"> <view class="row align-c" bindtap="onOrder">
<text>查看全部</text> <text>查看全部</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image> <image class="all-order-icon" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
</view> </view>
<!-- 订单分类icno --> <!-- 订单分类icno -->
...@@ -87,35 +100,40 @@ ...@@ -87,35 +100,40 @@
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image> <image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ passBadge > 9 ? 'badge-widen' : ''}}" wx:if="{{passBadge > 0}}">{{passBadge > 99 ? '···' : passBadge}}</view> <view class="order-activity-badge {{ passBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{passBadge > 0}}">{{passBadge > 99 ? '···' : passBadge}}</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">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image> <image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ foodBadge > 9 ? 'badge-widen' : ''}}" wx:if="{{foodBadge > 0}}">{{foodBadge > 99 ? '···' : foodBadge}}</view> <view class="order-activity-badge {{ foodBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{foodBadge > 0}}">{{foodBadge > 99 ? '···' : foodBadge}}</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">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image> <image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ movieBadge > 9 ? 'badge-widen' : ''}}" wx:if="{{movieBadge > 0}}">{{movieBadge > 99 ? '···' : movieBadge}}</view> <view class="order-activity-badge {{ movieBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{movieBadge > 0}}">{{movieBadge > 99 ? '···' : movieBadge}}</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">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image> <image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ spaBadge > 9 ? 'badge-widen' : ''}}" wx:if="{{spaBadge > 0}}">{{spaBadge > 99 ? '···' : spaBadge}}</view> <view class="order-activity-badge {{ spaBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{spaBadge > 0}}">{{spaBadge > 99 ? '···' : spaBadge}}</view>
</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">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image> <image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ artBadge > 9 ? 'badge-widen' : ''}}" wx:if="{{artBadge > 0}}">{{artBadge > 99 ? '···' : artBadge}}</view> <view class="order-activity-badge {{ artBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{artBadge > 0}}">{{artBadge > 99 ? '···' : artBadge}}</view>
</view> </view>
<text>文创</text> <text>文创</text>
</view> </view>
...@@ -124,14 +142,23 @@ ...@@ -124,14 +142,23 @@
<!-- 订单卡片 --> <!-- 订单卡片 -->
<!-- 年卡 --> <!-- 年卡 -->
<view class="pass-wrapper" wx:if="{{myOrder.passOrder}}" bindtap="handleToCard"> <view class="pass-wrapper" wx:if="{{myOrder.passOrder}}" bindtap="handleToCard">
<image wx:if="{{ myOrder.passOrder[0].cardType==1}}" class="card-bg year-bg"
src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image>
<image wx:elif="{{myOrder.passOrder[0].cardType==2}}" class="card-bg month-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="pass-bg-one" wx:if="{{myOrder.passOrder.length > 1}}"></view> <view class="pass-bg-one" wx:if="{{myOrder.passOrder.length > 1}}"></view>
<view class="pass-bg-two" wx:if="{{myOrder.passOrder.length > 1}}"></view> <view class="pass-bg-two" wx:if="{{myOrder.passOrder.length > 1}}"></view>
<view class="pass-logo-wrapper row align-c"> <view class="pass-logo-wrapper row align-c">
<image src="{{myOrder.passOrder[0].logo}}"></image> <view class="logo-box">
<image mode="aspectFit" src="{{imageResourcesBase+ myOrder.passOrder[0].logo}}"></image>
</view>
<text>{{myOrder.passOrder[0].officeName}}</text> <text>{{myOrder.passOrder[0].officeName}}</text>
</view> </view>
<view class="pass-title"> <view class="pass-title">
<text>精灵鸟理想国{{myOrder.passOrder[0].name}}</text> <text>{{myOrder.passOrder[0].name}}</text>
</view> </view>
<view class="pass-time"> <view class="pass-time">
<text>有效期至{{myOrder.passOrder[0].expireTime}}</text> <text>有效期至{{myOrder.passOrder[0].expireTime}}</text>
...@@ -145,20 +172,30 @@ ...@@ -145,20 +172,30 @@
</view> </view>
<!-- 商品 --> <!-- 商品 -->
<view class="goods-wrapper" wx:for="{{myOrder.artOrder.orderList}}" wx:key="*this"> <view class="goods-wrapper" wx:for="{{myOrder.artOrder.orderList}}" wx:key="*this" data-item="{{item}}"
bindtap="onOrderDetail">
<view class="goods-logo-wrapper row align-c"> <view class="goods-logo-wrapper row align-c">
<view class="art-logo"> <view class="logo-box">
<image src="{{myOrder.artOrder.logo}}"></image> <image mode="aspectFit" src="{{imageResourcesBase+ item.logo}}"></image>
</view> </view>
<text>{{item.officeName}}</text> <text>{{item.officeName}}</text>
</view> </view>
<view class="goods-content row align-c"> <view class="goods-content row align-c">
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetails}}" wx:for-item="k" wx:key="*this"></image> <block wx:if="{{item.smOrderDetails.length>3}}">
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetailsSlice3}}" wx:for-item="k"
wx:key="*this">
</image>
</block>
<block wx:else>
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetails}}" wx:for-item="k" wx:key="*this">
</image>
</block>
<text wx:if="{{item.smOrderDetails.length == 1}}">{{item.smOrderDetails[0].name}}</text> <text wx:if="{{item.smOrderDetails.length == 1}}">{{item.smOrderDetails[0].name}}</text>
</view> </view>
<view class="goods-footer row align-c con-b"> <view class="goods-footer row align-c con-b">
<text>有效期至{{item.time}}</text> <text>有效期{{item.expireTimeEnd}}</text>
<text>共{{item.smOrderDetails.length}}</text> <text>共{{item.smOrderDetails.length}}</text>
</view> </view>
</view> </view>
...@@ -179,7 +216,7 @@ ...@@ -179,7 +216,7 @@
</view> </view>
<view class="row align-c" bindtap="onOrder"> <view class="row align-c" bindtap="onOrder">
<text>查看全部</text> <text>查看全部</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image> <image class="all-order-icon" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
</view> </view>
<!-- 预约分类icno --> <!-- 预约分类icno -->
...@@ -187,21 +224,24 @@ ...@@ -187,21 +224,24 @@
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image> <image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">{{badge}}</view> <view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">
{{badge}}</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">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image> <image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">{{badge}}</view> <view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">
{{badge}}</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">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image> <image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">{{badge}}</view> <view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">
{{badge}}</view>
</view> </view>
<text>看房预约</text> <text>看房预约</text>
</view> </view>
...@@ -258,7 +298,8 @@ ...@@ -258,7 +298,8 @@
</view> </view>
</view> </view>
<view class="border-right"></view> <view class="border-right"></view>
<view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view> <view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证
</view>
</view> </view>
</view> </view>
<!-- 看房预约 --> <!-- 看房预约 -->
...@@ -273,7 +314,8 @@ ...@@ -273,7 +314,8 @@
</view> </view>
</view> </view>
<view class="border-right"></view> <view class="border-right"></view>
<view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view> <view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -300,7 +342,8 @@ ...@@ -300,7 +342,8 @@
<view class="row con-c"> <view class="row con-c">
<image src="http://upload.miaomiao-bao.com/ea238202008201146199955.png" class="mask-img"></image> <image src="http://upload.miaomiao-bao.com/ea238202008201146199955.png" class="mask-img"></image>
</view> </view>
<image src="http://upload.miaomiao-bao.com/62e04202008201417045326.png" style="width:750rpx;height:458rpx;margin-left:-73.5rpx;"></image> <image src="http://upload.miaomiao-bao.com/62e04202008201417045326.png"
style="width:750rpx;height:458rpx;margin-left:-73.5rpx;"></image>
<view class="row align-c con-c" style="margin-top:20rpx;"> <view class="row align-c con-c" style="margin-top:20rpx;">
<image src="/image/xingxing.png" class="mask-icon"></image> <image src="/image/xingxing.png" class="mask-icon"></image>
<text class="mask-font">业主特权</text> <text class="mask-font">业主特权</text>
...@@ -311,6 +354,6 @@ ...@@ -311,6 +354,6 @@
</view> </view>
</view> </view>
<view class="close" bindtap="close"> <view class="close" bindtap="close">
<l-icon name="close" color="black" size="28"/> <l-icon name="close" color="black" size="28" />
</view> </view>
</l-mask> </l-mask>
\ No newline at end of file
...@@ -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