Commit bc436867 by 严立

LL - 重构我的中心,俱乐部创建

parent 265199e6
Showing with 1318 additions and 540 deletions
...@@ -6,6 +6,8 @@ import iRule from './utils/rule/rule.js' ...@@ -6,6 +6,8 @@ import iRule from './utils/rule/rule.js'
import iRequest from './utils/request/corvus.js' import iRequest from './utils/request/corvus.js'
import iEnvironmental from './environmental.js' import iEnvironmental from './environmental.js'
import iOption from './utils/request/option.js'
App({ App({
modular: { modular: {
'rule': iRule, 'rule': iRule,
...@@ -26,8 +28,7 @@ App({ ...@@ -26,8 +28,7 @@ App({
token: '', token: '',
refreshToken: '', refreshToken: '',
userInfo: null, userInfo: null,
baseUrl: 'https://sm-web2.meiqicloud.com',//测试 baseUrl: iOption.baseUrl,//测试
// baseUrl: 'https://smbhyh-web.meiqicloud.com',//生产
debug: true, debug: true,
isRefreshToken: false, isRefreshToken: false,
...@@ -48,7 +49,7 @@ App({ ...@@ -48,7 +49,7 @@ App({
setAppStatus: function () { setAppStatus: function () {
this.wxRequest({ this.wxRequest({
url: '/api/v1/common/getDictByType', url: 'v1/common/getDictByType',
method: 'POST', method: 'POST',
data: { data: {
'type': 'is_open' 'type': 'is_open'
...@@ -160,7 +161,7 @@ App({ ...@@ -160,7 +161,7 @@ App({
success: res => { success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId // 发送 res.code 到后台换取 openId, sessionKey, unionId
this.wxRequest({ this.wxRequest({
url: '/api/v1/login/getSmallSession?code=' + res.code, url: 'v1/login/getSmallSession?code=' + res.code,
method: 'GET', method: 'GET',
success: (response) => { success: (response) => {
this.globalData.isRefreshToken = false this.globalData.isRefreshToken = false
...@@ -222,7 +223,7 @@ App({ ...@@ -222,7 +223,7 @@ App({
*/ */
registUserInfo: function (obj) { registUserInfo: function (obj) {
this.wxRequest({ this.wxRequest({
url: '/api/v1/login/getDecryptData', url: 'v1/login/getDecryptData',
data: obj.param, data: obj.param,
success: (res) => { success: (res) => {
if (obj.success) { if (obj.success) {
...@@ -246,7 +247,7 @@ App({ ...@@ -246,7 +247,7 @@ App({
*/ */
queryUserStatus: function () { queryUserStatus: function () {
this.wxRequest({ this.wxRequest({
url: '/api/v1/userAuth/getAuth', url: 'v1/userAuth/getAuth',
method: 'GET', method: 'GET',
success: (response) => { success: (response) => {
let funcResponse = response.data let funcResponse = response.data
...@@ -307,7 +308,7 @@ App({ ...@@ -307,7 +308,7 @@ App({
this.globalData.isRefreshToken = true this.globalData.isRefreshToken = true
this.wxRequest({ this.wxRequest({
url: '/api/v1/login/refreshToken', url: 'v1/login/refreshToken',
header: { header: {
token: this.globalData.token, token: this.globalData.token,
refreshToken: this.globalData.refreshToken refreshToken: this.globalData.refreshToken
...@@ -359,6 +360,20 @@ App({ ...@@ -359,6 +360,20 @@ App({
}, },
/** /**
* 全局函数 - 获取商店信息
* @function
* @param
* @returns
*/
getShopInfo: function(funcShopId) {
for (let i = 0, l = iEnvironmental.shopId.length; i < l; i++) {
if (funcShopId === iEnvironmental.shopId[i].id) {
return iEnvironmental.shopId[i]
}
}
},
/**
* 全局函数 - 设置商品信息 * 全局函数 - 设置商品信息
* @function * @function
* @param {object} - { commodity: '商品数据对象', complete: '回调函数' } * @param {object} - { commodity: '商品数据对象', complete: '回调函数' }
......
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
height: 32rpx; height: 32rpx;
} }
.icon {
width: 32rpx;
height: 32rpx;
}
/* 业主标记 */
.owner-mark { .owner-mark {
height: 32rpx; height: 32rpx;
padding: 0 12rpx; padding: 0 12rpx;
......
...@@ -14,7 +14,6 @@ function showToast (funcOption) { ...@@ -14,7 +14,6 @@ function showToast (funcOption) {
// 如果传参包含 duration 数值,使用该数值。 // 如果传参包含 duration 数值,使用该数值。
// 删除该属性是为了不污染 toast 组件中的默认值。 // 删除该属性是为了不污染 toast 组件中的默认值。
console.log(App.ui.toast.data)
let funcToastDuration = App.ui.toast.data.duration let funcToastDuration = App.ui.toast.data.duration
if (funcOption.duration) { if (funcOption.duration) {
funcToastDuration = funcOption.duration funcToastDuration = funcOption.duration
......
...@@ -3,12 +3,23 @@ Component({ ...@@ -3,12 +3,23 @@ Component({
styleIsolation: 'apply-shared' styleIsolation: 'apply-shared'
}, },
properties: { properties: {
inputId: { type: String, value: '' },
className: { type: String, value: '' }, className: { type: String, value: '' },
placeholder: { type: String, value: '' }, placeholder: { type: String, value: '' },
value: { value: {
type: String, type: String,
value: '' value: ''
},
type: {
type: String,
value: 'text'
},
maxlength: {
type: Number,
value: 140
} }
}, },
...@@ -20,23 +31,27 @@ Component({ ...@@ -20,23 +31,27 @@ Component({
methods: { methods: {
onInput: function (event) { onInput: function (event) {
console.log(event.detail.value) console.log('[m-input] onInput')
this.setData({ // this.setData({
value: event.detail.value // value: event.detail.value
}) // })
}, },
onInputFocus: function() { onInputFocus: function() {
console.log('onInputFocus') console.log('[m-input]onInputFocus')
}, },
onInputBlur: function() { onInputBlur: function (event) {
console.log('onInputBlur') console.log('[m-input] onInputBlur')
this.setData({
value: event.detail.value
})
this.setInputHidden() this.setInputHidden()
this.triggerEvent('blur', { id: this.data.inputId, value: this.data.value} )
}, },
onInputConfirm: function() { onInputConfirm: function() {
console.log('onInputConfirm') console.log('[m-input] onInputConfirm')
this.setInputHidden() this.setInputHidden()
}, },
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
<input <input
class="row ac" class="row ac"
value="{{value}}" value="{{value}}"
type="{{type}}"
maxlength="{{maxlength}}"
placeholder="{{placeholder}}" placeholder="{{placeholder}}"
placeholder-class="container-text-placeholder" placeholder-class="container-text-placeholder"
focus="{{inputFocus}}" focus="{{inputFocus}}"
......
...@@ -11,7 +11,7 @@ Component({ ...@@ -11,7 +11,7 @@ Component({
// 导航栏是否固定在视图顶部 // 导航栏是否固定在视图顶部
isFixed: { isFixed: {
type: Boolean, type: Boolean,
value: true, value: false,
}, },
fixedTop: { fixedTop: {
......
...@@ -3,6 +3,7 @@ Component({ ...@@ -3,6 +3,7 @@ Component({
styleIsolation: 'apply-shared' styleIsolation: 'apply-shared'
}, },
properties: { properties: {
inputId: { type: String, value: '' },
className: { type: String, value: '' }, className: { type: String, value: '' },
placeholder: { type: String, value: '' }, placeholder: { type: String, value: '' },
value: { type: String, value: '' }, value: { type: String, value: '' },
...@@ -19,7 +20,6 @@ Component({ ...@@ -19,7 +20,6 @@ Component({
methods: { methods: {
onInput: function (event) { onInput: function (event) {
this.setData({ this.setData({
value: event.detail.value,
inputQuantity: event.detail.value.length inputQuantity: event.detail.value.length
}) })
...@@ -30,8 +30,12 @@ Component({ ...@@ -30,8 +30,12 @@ Component({
console.log('onInputFocus') console.log('onInputFocus')
}, },
onInputBlur: function() { onInputBlur: function(event) {
this.setData({
value: event.detail.value,
})
this.setInputHidden() this.setInputHidden()
this.triggerEvent('blur', { id: this.data.inputId, value: this.data.value })
}, },
onInputConfirm: function() { onInputConfirm: function() {
......
.swiper-point { .swiper-point {
z-index: 1100; z-index: 4;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
......
...@@ -61,7 +61,7 @@ Page({ ...@@ -61,7 +61,7 @@ Page({
queryDetail: function () { queryDetail: function () {
let that = this let that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/park/getList', url: 'v1/park/getList',
success: function(res) { success: function(res) {
let funcData = res.list.filter(v => v.name === '儿童营地') let funcData = res.list.filter(v => v.name === '儿童营地')
that.setData({ that.setData({
...@@ -75,7 +75,7 @@ Page({ ...@@ -75,7 +75,7 @@ Page({
let that = this let that = this
let shopInfo = wx.getStorageSync('shopInfoBuffer') let shopInfo = wx.getStorageSync('shopInfoBuffer')
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getList', url: 'v1/activity/getList',
data: { data: {
'listType': '1', 'listType': '1',
'pageSize': '5', 'pageSize': '5',
......
...@@ -64,7 +64,7 @@ Page({ ...@@ -64,7 +64,7 @@ Page({
queryDetail: function () { queryDetail: function () {
let that = this let that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/park/getList', url: 'v1/park/getList',
success: function(res) { success: function(res) {
let funcData = res.list.filter(v => v.name === '儿童营地') let funcData = res.list.filter(v => v.name === '儿童营地')
that.setData({ that.setData({
...@@ -78,7 +78,7 @@ Page({ ...@@ -78,7 +78,7 @@ Page({
let that = this let that = this
let shopInfo = wx.getStorageSync('shopInfoBuffer') let shopInfo = wx.getStorageSync('shopInfoBuffer')
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getList', url: 'v1/activity/getList',
data: { data: {
'listType': '1', 'listType': '1',
'pageSize': '5', 'pageSize': '5',
......
let App = getApp() let App = getApp()
Page({ Page({
establishBuffer: {
'clubName': '',
'clubDescribe': '',
'userName': '',
'userPhone': '',
'errorClubName': '',
'errorClubDescribe': '',
'errorUserName': '',
'errorUserPhone': '',
},
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
establishInfo: {}
isButtonBottom: false,
}, },
onLoad: function (options) { onLoad: function (options) {
this.setData({
establishInfo: this.establishBuffer
})
},
onInputBlur: function (funcEvent) {
let funcType = funcEvent.detail.id
let funcValue = funcEvent.detail.value
switch (funcType) {
case 'clubName':
this.establishBuffer.clubName = funcValue
this.establishBuffer.errorClubName = App.modular.rule.item('required', funcValue)
if (this.establishBuffer.errorClubName !== '') this.establishBuffer.errorClubName = '俱乐部名称' + this.establishBuffer.errorClubName
break
case 'clubDescribe':
this.establishBuffer.clubDescribe = funcValue
this.establishBuffer.errorClubDescribe = App.modular.rule.item('required', funcValue)
if (this.establishBuffer.errorClubDescribe !== '') this.establishBuffer.errorClubDescribe = '俱乐部描述' + this.establishBuffer.errorClubName
break
case 'userName':
this.establishBuffer.userName = funcValue
this.establishBuffer.errorUserName = App.modular.rule.item('name', funcValue)
break
case 'userPhone':
this.establishBuffer.userPhone = funcValue
this.establishBuffer.errorUserPhone = App.modular.rule.item('phone', funcValue)
break
}
this.setData({
establishInfo: this.establishBuffer
})
console.log(funcEvent)
}, },
onEstablish: function () {
let funcPass = true
let funcEstablishInfoKey = Object.keys(this.data.establishInfo)
for (let i = 0, l = funcEstablishInfoKey.length; i < l; i++) {
// error 信息验证,如果存在非空字段,则表示有数据校验不通过。
if (funcEstablishInfoKey[i].indexOf('error') >= 0 && this.data.establishInfo[funcEstablishInfoKey[i]]) {
console.log('验证不通过')
funcPass = false
}
// 常规字段验证,确保没有非空字段。
if (funcEstablishInfoKey[i].indexOf('error') < 0 && this.data.establishInfo[funcEstablishInfoKey[i]] === '') {
this.onInputBlur({ detail: { id: funcEstablishInfoKey[i], value: '' }})
console.log('验证不通过')
funcPass = false
}
}
if (!funcPass) true
console.log('验证通过')
App.request({
url: 'v3/club/createClub',
params: {
'name': this.data.establishInfo.clubName,
'summary': this.data.establishInfo.describe,
'userName': this.data.establishInfo.userName,
'mobile': this.data.establishInfo.userPhone,
'wxAccount': 'wxAccount'
}
}).then((response) => {
wx.setStorageSync('tempEstablish', true)
wx.navigateBack()
}).catch((response) => {
console.log('resolve', response)
})
}
}) })
\ No newline at end of file
<m-nav titleText="申请加入俱乐部"></m-nav> <m-nav titleText="申请创建俱乐部" styleIndex="{{1}}"></m-nav>
<view class="container">
<view class="club-info col cc ac">
<image class="club-info-logo" src=""></image>
<view class="club-info-name column cc ac">
<text class="title">马术俱乐部</text>
</view>
</view>
<view class="container">
<view class="club-enter"> <view class="club-enter">
<view class="form-item col"> <view class="form-item col">
<text>俱乐部名称</text> <text>俱乐部名称</text>
<m-input className="form-item-input row ac" placeholder="请输入俱乐部名称"></m-input> <m-input
<text>错误提示</text> inputId="clubName"
className="form-item-input row ac"
placeholder="请输入俱乐部名称"
bindblur="onInputBlur"
></m-input>
<text>{{establishInfo.errorClubName}}</text>
</view> </view>
<view class="form-item col"> <view class="form-item col">
<text>俱乐部简要说明</text> <text>俱乐部简要说明</text>
<m-textarea className="form-item-textarea" placeholder="请输入俱乐部简要说明,如创建俱乐部的宗旨、意义及简要规划等" inputMax="{{200}}"></m-textarea> <m-textarea
<text>错误提示</text> inputId="clubDescribe"
className="form-item-textarea"
placeholder="请输入俱乐部简要说明,如创建俱乐部的宗旨、意义及简要规划等"
inputMax="{{200}}"
bindblur="onInputBlur"
></m-textarea>
<text>{{establishInfo.errorClubDescribe}}</text>
</view> </view>
<view class="form-item col"> <view class="form-item col">
<text>姓名</text> <text>姓名</text>
<m-input className="form-item-input row ac" placeholder="请输入姓名"></m-input> <m-input
<text>错误提示</text> inputId="userName"
className="form-item-input row ac"
placeholder="请输入姓名"
bindblur="onInputBlur"
></m-input>
<text>{{establishInfo.errorUserName}}</text>
</view> </view>
<view class="form-item col"> <view class="form-item col">
<text>手机号</text> <text>手机号</text>
<m-input className="form-item-input row ac" placeholder="请输入手机号"></m-input> <m-input
<text>错误提示</text> inputId="userPhone"
</view> className="form-item-input row ac"
<view class="form-item col"> type="number"
<text>微信号</text> maxlength="{{11}}"
<m-input className="form-item-input row ac" placeholder="请输入微信号"></m-input> placeholder="请输入手机号"
<text>错误提示</text> bindblur="onInputBlur"
></m-input>
<text>{{establishInfo.errorUserPhone}}</text>
</view> </view>
</view> </view>
...@@ -42,4 +55,4 @@ ...@@ -42,4 +55,4 @@
</view> </view>
</view> </view>
<m-button-bottom text="提交申请" isDisable="{{isButtonBottom}}"></m-button-bottom> <m-button-bottom text="提交申请" bindtap="onEstablish"></m-button-bottom>
\ No newline at end of file \ No newline at end of file
...@@ -47,6 +47,10 @@ ...@@ -47,6 +47,10 @@
padding: 0 40rpx; padding: 0 40rpx;
} }
.form-item {
margin: 40rpx 0 0 0;
}
.form-item > text:nth-child(1) { .form-item > text:nth-child(1) {
height: 42rpx; height: 42rpx;
font-size: 30rpx; font-size: 30rpx;
...@@ -72,6 +76,7 @@ ...@@ -72,6 +76,7 @@
.form-item-textarea { .form-item-textarea {
width: 670rpx; width: 670rpx;
height: 320rpx; height: 320rpx;
margin: 16rpx 0 8rpx 0;
padding: 24rpx; padding: 24rpx;
border-radius: 4px; border-radius: 4px;
border: 1px solid #DBDFE5; border: 1px solid #DBDFE5;
......
let App = getApp() let App = getApp()
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
bannerCreatTop: wx.getStorageSync('navTitleHeight') + 30,
tabItem: [ tabItem: [
{ 'text': '全部', 'value': '' }, { 'text': '全部', 'value': '' },
{ 'text': '亲子教育', 'value': '' }, { 'text': '亲子教育', 'value': '' },
...@@ -10,12 +15,25 @@ Page({ ...@@ -10,12 +15,25 @@ Page({
], ],
clubList: [], clubList: [],
winPowerInfo: false, // 非业主创建俱乐部提示
winSubmitSuccess: false, // 创建提交成功提示
}, },
onLoad: function (options) { onLoad: function (options) {
this.queryClub() this.queryClub()
}, },
onShow: function () {
let funcWinSubmitSuccess = wx.getStorageSync('tempEstablish')
if (funcWinSubmitSuccess) {
this.setData({
winSubmitSuccess: true
})
wx.removeStorageSync('tempEstablish')
}
},
queryClub: function () { queryClub: function () {
let funcResponse = [ let funcResponse = [
{ {
...@@ -44,6 +62,48 @@ Page({ ...@@ -44,6 +62,48 @@ Page({
* @param {object} - funcEvent * @param {object} - funcEvent
* @returns * @returns
*/ */
onCreatClub: function () {
let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo.userType === 0) {
this.setData({
winPowerInfo: true
})
return
}
wx.navigateTo({ url: '/pages/club/create/create' })
},
/**
* 创建俱乐部提交成功关闭弹窗
* @function
* @param
* @returns
*/
onSubmitSuccess: function () {
this.setData({
winSubmitSuccess: false,
})
},
/**
* 权限提醒
* @function
* @param
* @returns
*/
onPowerInfo: function () {
this.setData({
winPowerInfo: false
})
},
/**
* 页面滚动事件
* @function
* @param {object} - funcEvent
* @returns
*/
onPageScroll: function (funcEvent) { onPageScroll: function (funcEvent) {
App.pageScroll(funcEvent, this) App.pageScroll(funcEvent, this)
}, },
......
<nav titleText="俱乐部" styleIndex="2" scrollHeight="{{navScroll}}" isOccupy="{{false}}"></nav> <m-nav titleText="俱乐部" styleIndex="{{2}}" scrollHeight="{{navScroll}}" isOccupy="{{false}}"></m-nav>
<!-- 权限提醒 -->
<view class="member-power row cc ac" wx:if="{{winPowerInfo}}">
<view class="member-power-info col cc ac">
<text>权限提醒</text>
<text>仅业主可创建俱乐部,如果您是业主,可前往【我的】页面进行业主认证。</text>
<button class="row cc ac" bindtap="onPowerInfo">我知道了</button>
</view>
</view>
<!-- 提交成功 -->
<view class="submit-success row cc ac" wx:if="{{winSubmitSuccess}}">>
<image src="{{resourcesBase + 'club/establish-tip.png'}}" bindtap="onSubmitSuccess"></image>
</view>
<view class="container"> <view class="container">
<!-- banner --> <!-- banner -->
<view class="banner"> <view class="banner">
<image></image> <button class="row cc ac" style="{{'top: ' + bannerCreatTop + 'px;'}}" bindtap="onCreatClub">创建俱乐部</button>
<image src="{{resourcesBase + 'club/banner.png'}}"></image>
</view> </view>
<!-- tab --> <!-- tab -->
......
.banner image { /* 创建俱乐部成功提示 */
.submit-success {
z-index: 7;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .7);
}
.submit-success > image {
width: 606rpx;
height: 974rpx;
}
/* 权限提醒 */
.member-power {
z-index: 7;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .7);
}
.member-power-info {
width: 606rpx;
height: 538rpx;
padding: 56rpx 40rpx 48rpx 40rpx;
border-radius: 4px;
background: #FFFFFF;
}
.member-power-info > text:nth-child(1) {
height: 72rpx;
font-size: 50rpx;
font-weight: 800;
line-height: 72rpx;
color: #15191F;
}
.member-power-info > text:nth-child(2) {
width: 526rpx;
height: 138rpx;
margin-top: 48rpx;
font-size: 30rpx;
font-weight: 400;
line-height: 46rpx;
color: #656E7B;
}
.member-power-info > button {
width: 526rpx;
height: 80rpx;
margin-top: 96rpx;
border-radius: 4px;
border: 1px solid #15191F;
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
color: #15191F;
}
.banner {
position: relative;
}
.banner > button {
position: absolute;
top: 0;
left: 540rpx;
width: 170rpx;
height: 60rpx;
background: #afb1b5;
border-radius: 4px;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #FFFFFF;
}
.banner > image {
width: 750rpx; width: 750rpx;
height: 998rpx; height: 998rpx;
background: #999999; background: #999999;
......
...@@ -45,7 +45,7 @@ Page({ ...@@ -45,7 +45,7 @@ Page({
queryShopCover: function () { queryShopCover: function () {
function shopCover(funcType, funcIndex) { function shopCover(funcType, funcIndex) {
App.wxRequest({ App.wxRequest({
url: '/api/v1/banner/getOfficeByBanner', url: 'v1/banner/getOfficeByBanner',
data: { data: {
'smColumnId': funcType, 'smColumnId': funcType,
}, },
...@@ -161,7 +161,7 @@ Page({ ...@@ -161,7 +161,7 @@ Page({
// 顶部第一商店推荐 // 顶部第一商店推荐
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/recommend', url: 'v1/commodity/recommend',
data: { data: {
'officeId': funcShopInfo[0].shopId, 'officeId': funcShopInfo[0].shopId,
'genre': 5, 'genre': 5,
...@@ -190,7 +190,7 @@ Page({ ...@@ -190,7 +190,7 @@ Page({
// 顶部第二商店推荐 // 顶部第二商店推荐
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/recommend', url: 'v1/commodity/recommend',
data: { data: {
'officeId': funcShopInfo[1].shopId, 'officeId': funcShopInfo[1].shopId,
'genre': 5, 'genre': 5,
...@@ -219,7 +219,7 @@ Page({ ...@@ -219,7 +219,7 @@ Page({
// 底部第一商店推荐 // 底部第一商店推荐
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/recommend', url: 'v1/commodity/recommend',
data: { data: {
'officeId': funcShopInfo[2].shopId, 'officeId': funcShopInfo[2].shopId,
'genre': 4, 'genre': 4,
...@@ -248,7 +248,7 @@ Page({ ...@@ -248,7 +248,7 @@ Page({
// 底部第二商店推荐 // 底部第二商店推荐
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/recommend', url: 'v1/commodity/recommend',
data: { data: {
'officeId': funcShopInfo[3].shopId, 'officeId': funcShopInfo[3].shopId,
'genre': 4, 'genre': 4,
...@@ -326,6 +326,7 @@ Page({ ...@@ -326,6 +326,7 @@ Page({
* @returns * @returns
*/ */
onBuyRecommendFood: function (event) { onBuyRecommendFood: function (event) {
console.log('onBuyRecommendFood', event)
// funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的 // funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let funcShopType = 5 let funcShopType = 5
let funcShopAppId = event.currentTarget.dataset.id let funcShopAppId = event.currentTarget.dataset.id
......
...@@ -37,6 +37,8 @@ Page({ ...@@ -37,6 +37,8 @@ Page({
option: option option: option
}) })
console.log(option)
this.resetShoppingCart() this.resetShoppingCart()
}, },
...@@ -148,7 +150,7 @@ Page({ ...@@ -148,7 +150,7 @@ Page({
*/ */
querySideBar: function () { querySideBar: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getClassifys', url: 'v1/commodity/getClassifys',
data: { data: {
'officeId': this.data.shopInfo.id, 'officeId': this.data.shopInfo.id,
'genre': this.data.shopInfo.shopType, 'genre': this.data.shopInfo.shopType,
...@@ -199,7 +201,7 @@ Page({ ...@@ -199,7 +201,7 @@ Page({
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getCommoditys', url: 'v1/commodity/getCommoditys',
data: { data: {
'officeId': this.data.shopInfo.id, 'officeId': this.data.shopInfo.id,
// 'classifyId': this.data.sideBar[this.data.sideBarIndex].id, // 'classifyId': this.data.sideBar[this.data.sideBarIndex].id,
...@@ -420,7 +422,7 @@ Page({ ...@@ -420,7 +422,7 @@ Page({
let funcItem = event.currentTarget.dataset.item let funcItem = event.currentTarget.dataset.item
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getCommodityParticulars', url: 'v1/commodity/getCommodityParticulars',
data: { data: {
'commodityId': funcItem.id, 'commodityId': funcItem.id,
'classifyId': funcItem.typeId, 'classifyId': funcItem.typeId,
......
...@@ -67,7 +67,7 @@ Page({ ...@@ -67,7 +67,7 @@ Page({
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getCommoditys', url: 'v1/commodity/getCommoditys',
data: { data: {
'officeId': this.data.shopInfo.id, 'officeId': this.data.shopInfo.id,
'genre': this.data.shopInfo.shopType, 'genre': this.data.shopInfo.shopType,
...@@ -178,7 +178,7 @@ Page({ ...@@ -178,7 +178,7 @@ Page({
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getCommoditys', url: 'v1/commodity/getCommoditys',
data: { data: {
'officeId': this.data.shopInfo.id, 'officeId': this.data.shopInfo.id,
'genre': 3, 'genre': 3,
......
...@@ -35,7 +35,7 @@ Page({ ...@@ -35,7 +35,7 @@ Page({
queryBanner: function () { queryBanner: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/banner/getOfficeByBanner', url: 'v1/banner/getOfficeByBanner',
data: { data: {
'smColumnId': 1, 'smColumnId': 1,
}, },
...@@ -74,7 +74,7 @@ Page({ ...@@ -74,7 +74,7 @@ Page({
} }
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getCommoditys', url: 'v1/commodity/getCommoditys',
data: { data: {
'officeId': funcShopId, 'officeId': funcShopId,
'genre': funcCommodityType, 'genre': funcCommodityType,
...@@ -184,7 +184,7 @@ Page({ ...@@ -184,7 +184,7 @@ Page({
funcCommodityList = [funcCommodityItem] funcCommodityList = [funcCommodityItem]
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getSpaPriceRange', url: 'v1/commodity/getSpaPriceRange',
data: { data: {
}, },
...@@ -275,7 +275,7 @@ Page({ ...@@ -275,7 +275,7 @@ Page({
// 跳转商品下单,需要查询商品参数 // 跳转商品下单,需要查询商品参数
if (funcItme.targetId === '') return if (funcItme.targetId === '') return
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getCommodityParticulars', url: 'v1/commodity/getCommodityParticulars',
data: { data: {
'commodityId': funcItme.targetId 'commodityId': funcItme.targetId
}, },
......
...@@ -198,7 +198,7 @@ Page({ ...@@ -198,7 +198,7 @@ Page({
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/subscribe/doSubscribe', url: 'v1/subscribe/doSubscribe',
data: { data: {
mobile: this.data.formPhone, mobile: this.data.formPhone,
subscribeNum: this.data.formQuantity, subscribeNum: this.data.formQuantity,
......
...@@ -19,7 +19,7 @@ Page({ ...@@ -19,7 +19,7 @@ Page({
getNoticeDetail() { getNoticeDetail() {
var that = this var that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/dynamic/getDetail', url: 'v1/dynamic/getDetail',
data: { id: that.data.id }, data: { id: that.data.id },
success: function (res) { success: function (res) {
var content = res.data.content.replace(/<img/gi, '<img style="width:100%;height:auto;display:block" ') var content = res.data.content.replace(/<img/gi, '<img style="width:100%;height:auto;display:block" ')
......
...@@ -26,7 +26,7 @@ Page({ ...@@ -26,7 +26,7 @@ Page({
getNoticeList() { getNoticeList() {
var that = this var that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/dynamic/getList', url: 'v1/dynamic/getList',
data: { pageSize: that.data.pageSize, pageNo: that.data.pageNo }, data: { pageSize: that.data.pageSize, pageNo: that.data.pageNo },
success: function (res) { success: function (res) {
that.setData({ that.setData({
......
...@@ -22,7 +22,7 @@ Page({ ...@@ -22,7 +22,7 @@ Page({
getBrands: function (index) { getBrands: function (index) {
App.wxRequest({ App.wxRequest({
url: '/api/v1/common/getBrands', url: 'v1/common/getBrands',
success: (response) => { success: (response) => {
let history = response.data[index] let history = response.data[index]
this.setData({ this.setData({
......
...@@ -232,7 +232,7 @@ Page({ ...@@ -232,7 +232,7 @@ Page({
duration: 60000, duration: 60000,
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/subscribe/doSubscribe', url: 'v1/subscribe/doSubscribe',
data: { data: {
mobile: this.data.formPhone, mobile: this.data.formPhone,
subscribeNum: this.data.formQuantity, subscribeNum: this.data.formQuantity,
...@@ -275,7 +275,7 @@ Page({ ...@@ -275,7 +275,7 @@ Page({
// 预约入园查询返回剩余名额 // 预约入园查询返回剩余名额
queryQuota: function () { queryQuota: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/subscribe/getResidue', url: 'v1/subscribe/getResidue',
data: { data: {
subscribeDate: this.data.formDate + ' 00:00:00', subscribeDate: this.data.formDate + ' 00:00:00',
type: 0, type: 0,
......
...@@ -52,7 +52,7 @@ Page({ ...@@ -52,7 +52,7 @@ Page({
title: '加载中', title: '加载中',
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/smUser/getIntegralDetails', url: 'v1/smUser/getIntegralDetails',
data: { data: {
'pageNo': this.data.pageNo, 'pageNo': this.data.pageNo,
'pageSize': this.data.pageSize, 'pageSize': this.data.pageSize,
......
...@@ -147,7 +147,7 @@ Page({ ...@@ -147,7 +147,7 @@ Page({
isDoing: true, isDoing: true,
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/doCancel', url: 'v1/activity/doCancel',
data: { data: {
'enrollId': this.data.activityId, 'enrollId': this.data.activityId,
'type': type, 'type': type,
...@@ -202,7 +202,7 @@ Page({ ...@@ -202,7 +202,7 @@ Page({
title: '加载中', title: '加载中',
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/getVolumesByOrderId', url: 'v1/order/getVolumesByOrderId',
data: { data: {
'orderId': this.data.orderInfo.id 'orderId': this.data.orderInfo.id
}, },
...@@ -237,7 +237,7 @@ Page({ ...@@ -237,7 +237,7 @@ Page({
*/ */
queryOrderDetail: function () { queryOrderDetail: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/getOrderDetail', url: 'v1/order/getOrderDetail',
data: { data: {
'orderId': this.data.orderInfo.id 'orderId': this.data.orderInfo.id
}, },
...@@ -338,7 +338,7 @@ Page({ ...@@ -338,7 +338,7 @@ Page({
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/volume/getVolume', url: 'v1/volume/getVolume',
data: { data: {
'volumeId': funcOrderInfo.codeId 'volumeId': funcOrderInfo.codeId
}, },
......
<m-toast></m-toast> <m-toast></m-toast>
<m-dialog></m-dialog> <m-dialog></m-dialog>
<m-nav titleText="订单详情" styleIndex="{{1}}" bind:navBack="onNavBack"></m-nav> <m-nav titleText="报名详情" styleIndex="{{1}}" bind:navBack="onNavBack"></m-nav>
<view class="container"> <view class="container">
<!-- 订单状态 --> <!-- 订单状态 -->
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
</view> </view>
<view class="notice-wrapper row con-e" bindtap="handleNotice"> <view class="notice-wrapper row con-e" bindtap="handleNotice">
<view class="notice">使用须知</view> <view class="notice">活动须知</view>
<!-- <view class="notice">活动须知</view> <!-- <view class="notice">活动须知</view>
<view class="notice">观影须知</view> --> <view class="notice">观影须知</view> -->
<l-icon name="right" color="#959DAA" size="22" /> <l-icon name="right" color="#959DAA" size="22" />
...@@ -353,10 +353,10 @@ ...@@ -353,10 +353,10 @@
<view class="order-btn" bindtap="onOrderAgain" wx:if="{{orderInfo.state===-1}}">再次下单</view> <view class="order-btn" bindtap="onOrderAgain" wx:if="{{orderInfo.state===-1}}">再次下单</view>
</view> </view>
<!-- 使用须知 --> <!-- 活动须知 -->
<l-popup show="{{showNotice}}" content-align="bottom"> <l-popup show="{{showNotice}}" content-align="bottom">
<view class="notice-popup-wrapper"> <view class="notice-popup-wrapper">
<view class="notice-popup-title">使用须知</view> <view class="notice-popup-title">活动须知</view>
<scroll-view scroll-y class="notice-popup-content"> <scroll-view scroll-y class="notice-popup-content">
<view> <view>
<rich-text nodes="{{orderInfo.particulars}}"></rich-text> <rich-text nodes="{{orderInfo.particulars}}"></rich-text>
......
...@@ -14,9 +14,9 @@ Page({ ...@@ -14,9 +14,9 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(options) let detail = JSON.parse(options.detail)
console.log('onLoad')
let detail = JSON.parse(options.detail); console.log(detail)
let yyDate = detail.subscribeDate ? Date.parse(detail.subscribeDate.replace(/-/g, '/')) : 0 let yyDate = detail.subscribeDate ? Date.parse(detail.subscribeDate.replace(/-/g, '/')) : 0
let nowStr = new Date().toLocaleString().substr(0, 10).replace(/-/g, '/') + " 00:00:00" let nowStr = new Date().toLocaleString().substr(0, 10).replace(/-/g, '/') + " 00:00:00"
let now = Date.parse(nowStr) let now = Date.parse(nowStr)
...@@ -60,7 +60,7 @@ Page({ ...@@ -60,7 +60,7 @@ Page({
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/subscribe/cancelSubscribe', url: 'v1/subscribe/cancelSubscribe',
data: { data: {
'id': this.data.tickerInfo.id 'id': this.data.tickerInfo.id
}, },
......
/* pages/hotelAccommodation/hotelAccommodation.wxss */
.Img { .Img {
position: absolute; position: absolute;
z-index: -2; z-index: -2;
......
...@@ -29,6 +29,21 @@ Page({ ...@@ -29,6 +29,21 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(options)
switch (options.tab) {
case 'active':
options.tab = 0
break
case 'garden':
options.tab = 1
break
case 'scanHouse':
options.tab = 2
break
}
let type = options.tab ? 1 * options.tab : 0 let type = options.tab ? 1 * options.tab : 0
this.setData({ this.setData({
option: options, option: options,
...@@ -178,7 +193,7 @@ Page({ ...@@ -178,7 +193,7 @@ Page({
}) })
let funcItem = event.target.dataset.item let funcItem = event.target.dataset.item
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/doCancel', url: 'v1/activity/doCancel',
data: { data: {
'enrollId': funcItem.enrollId, 'enrollId': funcItem.enrollId,
'type': type, //0取消1删除 'type': type, //0取消1删除
...@@ -224,7 +239,7 @@ Page({ ...@@ -224,7 +239,7 @@ Page({
isLoading: true isLoading: true
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getMyActivityList', url: 'v1/activity/getMyActivityList',
data: { data: {
'activeState': '', //""全部 0 未开始 1进行中 2已结束 'activeState': '', //""全部 0 未开始 1进行中 2已结束
'pageSize': this.data.pageSize, 'pageSize': this.data.pageSize,
...@@ -286,7 +301,7 @@ Page({ ...@@ -286,7 +301,7 @@ Page({
isLoading: true isLoading: true
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/subscribe/getList', url: 'v1/subscribe/getList',
data: { data: {
state: 1, //未过期 1,其他 空字符"" state: 1, //未过期 1,其他 空字符""
type: type //0 入园预约 1 看房预约 全部 空字符 type: type //0 入园预约 1 看房预约 全部 空字符
......
...@@ -94,7 +94,7 @@ Page({ ...@@ -94,7 +94,7 @@ Page({
getAuth() { getAuth() {
let that = this let that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/userAuth/getAuth', url: 'v1/userAuth/getAuth',
method: 'GET', method: 'GET',
success: function(res) { success: function(res) {
let state = res.data.state * 1 // 0 待审核 1 审核通过 2 不通过 let state = res.data.state * 1 // 0 待审核 1 审核通过 2 不通过
...@@ -153,7 +153,7 @@ Page({ ...@@ -153,7 +153,7 @@ Page({
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/userAuth/doAuth', url: 'v1/userAuth/doAuth',
data: { data: {
mobile: phone, mobile: phone,
name: name, name: name,
......
...@@ -48,7 +48,7 @@ Page({ ...@@ -48,7 +48,7 @@ Page({
'duration': 60000 'duration': 60000
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/volume/getVolumeList', url: 'v1/volume/getVolumeList',
data: { data: {
status: '', //0已过期1待使用2已使用(""全部) status: '', //0已过期1待使用2已使用(""全部)
pageNo: 1, pageNo: 1,
...@@ -208,7 +208,7 @@ Page({ ...@@ -208,7 +208,7 @@ Page({
let funcItem = event.currentTarget.dataset.item let funcItem = event.currentTarget.dataset.item
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/getOrderDetail', url: 'v1/order/getOrderDetail',
data: { data: {
'orderId': funcItem.orderId 'orderId': funcItem.orderId
}, },
......
...@@ -19,6 +19,9 @@ Page({ ...@@ -19,6 +19,9 @@ Page({
// 是否有券码核销权限 // 是否有券码核销权限
isCouponPermissions: false, isCouponPermissions: false,
// 年卡月卡
membershipCard: [],
// 我的订单分类 tab // 我的订单分类 tab
orderCategory: [ orderCategory: [
{ {
...@@ -49,7 +52,33 @@ Page({ ...@@ -49,7 +52,33 @@ Page({
} }
], ],
orderList: [], orderList: [],
isOrderMore: false, isMoreOrder: false, // 查看更多订单
// 我的预约分类 tab
appointmentCategory: [
{
icon: './image/appointment-1.png',
name: '主题活动',
quantity: 0,
type: 'active',
}, {
icon: './image/appointment-2.png',
name: '夜间入园预约',
quantity: 0,
type: 'garden',
}, {
icon: './image/appointment-3.png',
name: '看房预约',
quantity: 0,
type: 'scanHouse',
}
],
appointmentList: [],
appointmentActivityListBuffer: [], // 活动预约列表缓存,页面不渲染此数组。
appointmentOtherListBuffer: [], // 其他预约列表,页面不渲染此数组。
isMoreAppointment: false,
mobile: '', mobile: '',
nickName: '', nickName: '',
...@@ -68,8 +97,7 @@ Page({ ...@@ -68,8 +97,7 @@ Page({
spaBadge: 0, spaBadge: 0,
artBadge: 101, artBadge: 101,
isMoreOrder: false, // 查看更多订单
isMoreActivity: false, // 查看更多活动
myOrder: { myOrder: {
passOrder: [], passOrder: [],
artOrder: { artOrder: {
...@@ -77,16 +105,11 @@ Page({ ...@@ -77,16 +105,11 @@ Page({
orderList: [] orderList: []
} }
}, },
appointmentList: [],
orderListBackup: [], orderListBackup: [],
integral: 0, //积分 integral: 0, //积分
shopConfig: App.globalData.shopId, shopConfig: App.globalData.shopId,
isYearCard: true,
isMonthCard: false, isMonthCard: false,
authInfo: null, authInfo: null,
enrollSubscribeData: {},
isLoadingOrder: true,
}, },
onShow: function () { onShow: function () {
...@@ -96,9 +119,15 @@ Page({ ...@@ -96,9 +119,15 @@ Page({
}) })
this.setData({ appStatus: App.globalData.appStatus }) this.setData({ appStatus: App.globalData.appStatus })
this.setUserInfo() this.setUserInfo() // 设置用户信息
this.queryCouponPermissions() this.queryIntegral() // 查询积分
this.queryOrderCategory() this.queryCouponPermissions() // 查询券码核销权限
this.queryMembershipCard() // 查询年卡月卡
this.queryOrderCategory() // 查询订单分类
this.queryOrder() // 查询订单列表
this.queryAppointmentCategory() // 查询预约分类
this.queryAppointmentActivity() // 查询活动预约
this.queryAppointmentOther() // 查询其他预约
}, },
/** /**
...@@ -135,14 +164,27 @@ Page({ ...@@ -135,14 +164,27 @@ Page({
statusText: funcStatusText, statusText: funcStatusText,
userInfo: funcUserInfo userInfo: funcUserInfo
}) })
}
},
this.getMyActivityList() /**
this.getCardList() * 查询积分
this.queryOrder() * @function
this.getIntegral() * @param
* @returns
this.getCountEnrollSubscribe() */
queryIntegral() {
let that = this
App.wxRequest({
url: 'v1/smUser/getIntegral',
data: {},
success: function (res) {
let integral = res.data ? res.data.integral : '0'
that.setData({
integral: integral
})
} }
})
}, },
/** /**
...@@ -167,6 +209,51 @@ Page({ ...@@ -167,6 +209,51 @@ Page({
}, },
/** /**
* 查询年卡月卡
* @function
* @param
* @returns
*/
queryMembershipCard: function () {
App.request({
url: 'v1/volume/getVolumeList',
params: {
'status': '',
'pageNo': 1,
'pageSize': -1
}
}).then((response) => {
let funcData = response.data
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'bgi': funcData[i].name === '年卡' ? 'pay/order-input/card-1.png' : 'pay/order-input/card-2.png',
'bgc': funcData[i].name === '年卡' ? '#F7B3C5' : '#8EB9E7',
'orderId': funcData[i].orderId,
'orderStatus': funcData[i].status,
'shopAppId': 3,
'shopName': '',
'shopLogo': '',
'timeExpire': '有效期至 ' + funcData[i].expireTime.replace(/-/g, '.'),
'identity': funcData[i].identityCard.substring(0, 5) + '****' + funcData[i].identityCard.substring(8, 18),
'userName': funcData[i].personName.charAt(0) + '**',
'cardName': '精灵鸟理想国' + funcData[i].name
}
// 设置门店信息
let funcShopInfo = App.setShopInfo(funcItem.shopAppId)
funcItem.shopName = funcShopInfo.name
funcItem.shopLogo = funcShopInfo.logo
funcList.push(funcItem)
}
this.setData({
membershipCard: funcList
})
}).catch((response) => { })
},
/**
* 查询我的订单分类统计数量 * 查询我的订单分类统计数量
* -2 - 电影,2 - SPA,3 - 门票,4 - 文创,5 - 餐饮 * -2 - 电影,2 - SPA,3 - 门票,4 - 文创,5 - 餐饮
* @function * @function
...@@ -186,7 +273,7 @@ Page({ ...@@ -186,7 +273,7 @@ Page({
let funcData = response.data let funcData = response.data
let funcOrderCategory = this.data.orderCategory let funcOrderCategory = this.data.orderCategory
for (let i = 0, l = funcOrderCategory.length; i < l; i++) { for (let i = 0, l = funcOrderCategory.length; i < l; i++) {
funcOrderCategory[i].quantity = funcData[funcOrderCategory[i].type] funcOrderCategory[i].quantity = funcData[funcOrderCategory[i].type] ? funcData[funcOrderCategory[i].type] : 0
if (funcOrderCategory[i].quantity > 99) funcOrderCategory[i].quantity = '...' if (funcOrderCategory[i].quantity > 99) funcOrderCategory[i].quantity = '...'
} }
...@@ -203,9 +290,6 @@ Page({ ...@@ -203,9 +290,6 @@ Page({
* @returns * @returns
*/ */
queryOrder: function () { queryOrder: function () {
this.setData({
isLoadingOrder: true
})
App.request({ App.request({
url: 'v1/order/getOrderList', url: 'v1/order/getOrderList',
params: { params: {
...@@ -218,15 +302,19 @@ Page({ ...@@ -218,15 +302,19 @@ Page({
let funcData = response.data let funcData = response.data
let funcList = [] let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) { for (let i = 0, l = funcData.length; i < l; i++) {
let fcunItem = { let funcItem = {
'orderId': funcData[i].orderId, 'orderId': funcData[i].orderId,
'orderStatus': funcData[i].status, 'orderStatus': funcData[i].status,
'orderDetail': [], 'orderDetail': [],
'shopName': funcData[i].officeName, 'shopId': funcData[i].officeId,
'shopLogo': 'shop/logo-1.png', 'shopName': '',
'shopLogo': '',
'payAmount': funcData[i].totalMoney, 'payAmount': funcData[i].totalMoney,
'timeExpire': funcData[i].expireTime, 'timeExpire': funcData[i].expireTime,
'commodityType': '-2' 'commodityType': funcData[i].goodType,
'tipDate': '',
'tipQuantity': '',
'cardStyle': 0
} }
let funcOrderDetail = funcData[i].smOrderDetails let funcOrderDetail = funcData[i].smOrderDetails
...@@ -238,161 +326,169 @@ Page({ ...@@ -238,161 +326,169 @@ Page({
'name': funcOrderDetail[ii].name, 'name': funcOrderDetail[ii].name,
'priceTotal': funcOrderDetail[ii].totalPrices 'priceTotal': funcOrderDetail[ii].totalPrices
} }
fcunItem.orderDetail.push(funcDetailItem) funcItem.orderDetail.push(funcDetailItem)
} }
funcList.push(fcunItem) // 设置门店信息
let funcShopInfo = App.getShopInfo(funcItem.shopId)
funcItem.shopName = funcShopInfo.name
funcItem.shopLogo = funcShopInfo.logo
// 根据商品类别,设置对应的提示信息
// -2 - 电影,2 - SPA,3 - 门票,4 - 文创,5 - 餐饮
let funcDate = funcItem.timeExpire.match(/[0-9\-]+/g)[0]
let funcTime = funcItem.timeExpire.match(/[0-9]{2}:[0-9]{2}/g)
switch (funcItem.commodityType) {
case '-2':
funcItem.tipDate = funcDate.replace(/-/g, '.') + ' ' + funcTime[0] + '-' + funcTime[1]
funcItem.tipQuantity = '共' + funcItem.orderDetail.length + '张电影票'
funcItem.cardStyle = 0
break
case '2':
funcItem.tipDate = '有效期至 ' + funcDate.replace(/-/g, '.')
funcItem.tipQuantity = '共' + funcItem.orderDetail.length + '件商品'
funcItem.cardStyle = 0
break
case '3':
funcItem.tipDate = '有效期至 ' + funcDate.replace(/-/g, '.')
funcItem.tipQuantity = '共' + funcItem.orderDetail.length + '张门票'
funcItem.cardStyle = 0
break
case '4':
funcItem.tipDate = '有效期至 ' + funcDate.replace(/-/g, '.')
funcItem.tipQuantity = '共' + funcItem.orderDetail.length + '件商品'
funcItem.cardStyle = 1
break
case '5':
funcItem.tipDate = '有效期至 ' + funcDate.replace(/-/g, '.')
funcItem.tipQuantity = '共' + funcItem.orderDetail.length + '件餐品'
funcItem.cardStyle = 1
break
}
// 排除年卡月卡类型
if (funcItem.commodityType !== '1') funcList.push(funcItem)
} }
this.setData({ this.setData({
orderList: funcList orderList: funcList
}) })
console.log(funcList)
}).catch((response) => {}) }).catch((response) => {})
}, },
// 去活动预约列表 /**
goAppointment: function (e) { * 查询我的预约分类统计数量
let type = e.currentTarget.dataset.type * -2 - 电影,2 - SPA,3 - 门票,4 - 文创,5 - 餐饮
wx.navigateTo({ * @function
url: '/pages/mine/appointment/appointment?tab=' + type, * @param
}) * @returns
}, */
// 去客服中心 queryAppointmentCategory: function () {
goQuestion: function () { App.request({
wx.navigateTo({ url: 'v1/activity/getCountEnrollSubscribe',
url: '/pages/mine/question/question', }).then((response) => {
}) let funcData = response.data
}, let funcAppointmentCategory = this.data.appointmentCategory
// 跳转订单详情 for (let i = 0, l = funcAppointmentCategory.length; i < l; i++) {
onOrderDetail: function (event) { funcAppointmentCategory[i].quantity = funcData[funcAppointmentCategory[i].type]
let funcItem = event.currentTarget.dataset.item if (funcAppointmentCategory[i].quantity > 99) funcAppointmentCategory[i].quantity = '...'
wx.navigateTo({ }
url: '/pages/pay/order-detail/order-detail?id=' + funcItem.orderId,
})
},
close() {
this.setData({ this.setData({
mask: false appointmentCategory: funcAppointmentCategory
});
wx.showTabBar({
animation: true,
}) })
}).catch((response) => { })
}, },
/** /**
* 跳转积分明细 * 查询我的活动预约列表
* @function * @function
* @param * @param
* @returns * @returns
*/ */
onIntegralDetail: function (event) { queryAppointmentActivity: function () {
let integral = event.currentTarget.dataset.integral App.request({
wx.navigateTo({ url: 'v1/activity/getMyActivityList',
url: '/pages/mine/accumulate/accumulate?integral=' + integral, params: {
}) 'enrollState': '2',
}, 'activeState': '',
// 去核销 'pageSize': -1,
goCouponInput(event) { 'pageNo': 1,
wx.navigateTo({ 'type': '1',
url: '/pages/pay/coupon-input/coupon-input?authInfo=' + JSON.stringify(this.data.authInfo), }
}) }).then((response) => {
}, let funcData = response.data.list
let funcList = []
// 获取积分 for (let i = 0, l = funcData.length; i < l; i++) {
getIntegral() { let funcItem = {
let that = this 'orderId': funcData[i].orderId,
App.wxRequest({ 'enrollId': funcData[i].enrollId,
url: '/api/v1/smUser/getIntegral', //api/v1/smUser/getIntegral 'name': funcData[i].name,
data: {}, 'cover': funcData[i].cover,
success: function (res) { 'quantity': '报名人数 ' + funcData[i].number + '人',
'date': funcData[i].activeDate,
let integral = res.data ? res.data.integral : '0' 'time': funcData[i].activeTime,
'cardStyle': 0,
that.setData({ }
integral: integral funcList.push(funcItem)
})
} }
})
},
//获取卡数据
getCardList() {
let that = this
App.wxRequest({
url: '/api/v1/volume/getVolumeList',
data: {
status: "", //0已过期1待使用2已使用(""全部)
pageNo: 1,
pageSize: -1
},
success: function (res) {
let list = res.data.map(item => {
let shopFilter = that.data.shopConfig.filter(k => { this.setData({
return k.name.toLowerCase() == item.officeName.toLowerCase() appointmentList: funcList.concat(this.data.appointmentOtherListBuffer),
appointmentActivityListBuffer: funcList,
}) })
}).catch((response) => { })
},
item.expireTime = item.expireTime.replace(/-/g, '.') /**
* 查询我的活动预约列表
if (item.name.indexOf('年卡') != -1) { * @function
item.cardType = 1 * @param
} else if (item.name.indexOf('月卡') != -1) { * @returns
item.cardType = 2 */
} else { queryAppointmentOther: function () {
item.cardType = 3 App.request({
} url: 'v1/subscribe/getList',
// 姓名隐私 params: {
if (item.personName.length > 2) { state: 1,
item.privateName = item.personName.substr(0, 1) + '*' + item.personName.substr(item.personName.length - 1) type: ''
} else {
item.privateName = item.personName.substr(0, 1) + '*'
} }
// 身份证隐私 }).then((response) => {
item.privateIdNum = item.identityCard.substr(0, 6) + '****' + item.identityCard.substr(item.identityCard.length - 4) let funcData = response.data
item.logo = shopFilter.length > 0 ? shopFilter[0].logo : '' let funcList = []
return item for (let i = 0, l = funcData.length; i < l; i++) {
}) let funcItem = {
let filterList = list.filter(item => { 'orderId': funcData[i].id,
return item.officeName == '儿童营地' 'enrollId': '',
}) 'name': Number(funcData[i].type),
let passOrder = `myOrder.passOrder` 'cover': '',
that.setData({ 'quantity': '预约人数 ' + funcData[i].subscribeNum + '人',
[passOrder]: filterList 'phone': funcData[i].mobile,
}) 'date': funcData[i].subscribeDate,
'time': funcData[i].subscribeDate,
'cardStyle': 1,
} }
}) funcList.push(funcItem)
},
//获取活动预约统计
getCountEnrollSubscribe() {
let that = this
App.wxRequest({
url: '/api/v1/activity/getCountEnrollSubscribe',
data: {},
success: function (res) {
let data = res.data ? res.data : {}
that.setData({
enrollSubscribeData: data
})
} }
})
},
// 登录注册页 this.setData({
onSignIn: function () { appointmentList: this.data.appointmentActivityListBuffer.concat(funcList),
if (this.data.userInfo.isSignIn) { appointmentOtherListBuffer: funcList,
return true
} else {
wx.navigateTo({
url: '/pages/login/login',
}) })
return false }).catch((response) => { })
}
}, },
//去认证 /**
goApprove() { * 业主身份认证申请
* @function
* @param
* @returns
*/
onAuthentication: function () {
if (this.onSignIn()) { if (this.onSignIn()) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/authentication-input/authentication-input', url: '/pages/mine/authentication-input/authentication-input',
...@@ -400,142 +496,88 @@ Page({ ...@@ -400,142 +496,88 @@ Page({
} }
}, },
myActivity() { /**
if (this.onSignIn()) { * 跳转积分明细
* @function
* @param
* @returns
*/
onIntegralDetail: function (event) {
let integral = event.currentTarget.dataset.integral
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/appointment/appointment', url: '/pages/mine/accumulate/accumulate?integral=' + integral,
}) })
}
}, },
myAppointment() { /**
if (this.onSignIn()) { * 年卡月卡
* @function
* @param
* @returns
*/
onMembership: function () {
wx.navigateTo({ wx.navigateTo({
url: '../myAppointment/myAppointment', url: '/pages/mine/card/card'
}) })
}
}, },
customerService() { /**
if (this.onSignIn()) { * 我的订单 - 分类
wx.navigateTo({ * @function
url: "/pages/mine/question/question", * @param
}) * @returns
} */
}, onOrderCategory: function (funcEvent) {
// 点分类跳转订单 let type = funcEvent.currentTarget.dataset.type
goOrderByclass(e) {
let type = e.currentTarget.dataset.type
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/order/order?goodType=' + type url: '/pages/mine/order/order?goodType=' + type
}) })
}, },
//我的活动详情
activityDetail(e) {
wx.navigateTo({
url: '../activityDetail/activityDetail?enrollid=' + e.currentTarget.dataset.enrollid,
})
},
//预约凭证
gohotelAccommodation(e) {
wx.navigateTo({
url: '../hotelAccommodation/hotelAccommodation?detail=' + JSON.stringify(e.currentTarget.dataset.item),
})
},
//点击前往修改页面 /**
onEditInfo: function () { * 我的订单 - 查看全部
if (this.onSignIn()) { * @function
* @param
* @returns
*/
onOrderList: function () {
let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo.isSignIn) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/info/info', url: '/pages/mine/order/order'
}) })
}
},
// 获取我的活动
getMyActivityList() {
var that = this
App.wxRequest({
url: '/api/v1/activity/getMyActivityList',
data: {
enrollState: 2, //待使用
activeState: '1', //""全部 0 未开始 1进行中 2已结束
pageSize: -1,
pageNo: 1,
type: 1, //0 影片 1 活动
},
success: function (res) {
let list = res.data.list
let sliceList = []
let activityListBackup = JSON.parse(JSON.stringify(list))
if (list.length > 2) {
sliceList = list.slice(0, 2)
} else { } else {
sliceList = list wx.navigateTo({
} url: '/pages/login/login'
that.setData({
activityList: sliceList,
activityListBackup
}) })
} }
})
}, },
// 预约列表/我的预约 /**
getList() { * 我的订单 - 查看详情
let that = this * @function
App.wxRequest({ * @param
url: '/api/v1/subscribe/getList', * @returns
data: { */
state: '1', onOrderDetail: function (funcEvent) {
type: '' //0 入园预约 1 看房预约 全部 空字符 let funcItem = funcEvent.currentTarget.dataset.item
}, wx.navigateTo({
success: function (res) { url: '/pages/pay/order-detail/order-detail?id=' + funcItem.orderId,
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({
appointmentList: tmpArr
})
}
}) })
}, },
toHide: function (array) { /**
var mphone = array.substring(0, 3) + '****' + array.substring(7); * 我的预约 - 查看全部
return mphone; * @function
}, * @param
* @returns
// 二期代码 */
onOrder: function () { onAppointmentList: function (funcEvent) {
let funcUserInfo = wx.getStorageSync('userInfo') let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo.isSignIn) { if (funcUserInfo.isSignIn) {
let funcType = funcEvent.currentTarget.dataset.type
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/order/order' url: '/pages/mine/appointment/appointment?tab=' + funcType
}) })
} else { } else {
wx.navigateTo({ wx.navigateTo({
...@@ -544,22 +586,95 @@ Page({ ...@@ -544,22 +586,95 @@ Page({
} }
}, },
onAppointment: function () { /**
let funcUserInfo = wx.getStorageSync('userInfo') * 我的预约 - 预约凭证
if (funcUserInfo.isSignIn) { * @function
* @param
* @returns
*/
onAppointmentTicket: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item
console.log('onAppointmentTicket')
console.log(funcItem)
// {
// 'orderId': funcData[i].id,
// 'enrollId': '',
// 'name': Number(funcData[i].type),
// 'cover': '',
// 'quantity': '预约人数 ' + funcData[i].subscribeNum + '人',
// 'phone': funcData[i].mobile,
// 'date': funcData[i].subscribeDate,
// 'time': funcData[i].subscribeDate,
// 'cardStyle': 1,
// }
let funcOptionItem
if (funcItem.name === 0) {
funcOptionItem = {
'id': funcItem.orderId,
'mobile': funcItem.phone,
'name': funcItem.name,
'num': funcItem.quantity.match(/[0-9]+/)[0],
'subscribeDate': funcItem.date,
'time': App.modular.miment(funcItem.time).format('MM月DD日') + ' 20:00-24:00',
'title': '夜间入园预约',
'type': 0,
'url': 'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg',
}
}
if (funcItem.name === 1) {
funcOptionItem = {
'id': funcItem.orderId,
'mobile': funcItem.phone,
'name': funcItem.name,
'num': funcItem.quantity.match(/[0-9]+/)[0],
'subscribeDate': funcItem.date,
'time': App.modular.miment(funcItem.time).format('MM月DD日 hh:mm'),
'title': '看房预约',
'type': 1,
'url': 'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg',
}
}
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/appointment/appointment' url: '/pages/mine/appointment-ticket/appointment-ticket?detail=' + JSON.stringify(funcOptionItem)
}) })
},
/**
* 客服中心
* @function
* @param
* @returns
*/
onService: function () {
if (this.onSignIn()) {
wx.navigateTo({
url: "/pages/mine/question/question",
})
}
},
// 登录注册页
onSignIn: function () {
if (this.data.userInfo.isSignIn) {
return true
} else { } else {
wx.navigateTo({ wx.navigateTo({
url: '/pages/login/login' url: '/pages/login/login',
}) })
return false
} }
}, },
handleToCard: function () {
//点击前往修改页面
onEditInfo: function () {
if (this.onSignIn()) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/card/card' url: '/pages/mine/info/info',
}) })
}
}, },
/** /**
...@@ -569,54 +684,25 @@ Page({ ...@@ -569,54 +684,25 @@ Page({
* @returns * @returns
*/ */
onMoreOrder: function () { onMoreOrder: function () {
let isMoreOrder = !this.data.isMoreOrder
let orderList = `myOrder.artOrder.orderList`
if (isMoreOrder) {
// 展开
this.setData({ this.setData({
[orderList]: JSON.parse(JSON.stringify(this.data.orderListBackup)), isMoreOrder: !this.data.isMoreOrder
})
} else {
// 收起
let list = JSON.parse(JSON.stringify(this.data.orderListBackup))
list.length = 1
this.setData({
[orderList]: list,
})
}
this.setData({
isMoreOrder,
}) })
}, },
/** /**
* 查看更多预约 * 查看更多订单
* @function * @function
* @param * @param
* @returns * @returns
*/ */
onMoreActivity: function () { onMoreAppointment: function () {
let isMoreActivity = !this.data.isMoreActivity
if (isMoreActivity) {
//展开
this.setData({
activityList: JSON.parse(JSON.stringify(this.data.activityListBackup))
})
} else {
// 收起
let list = JSON.parse(JSON.stringify(this.data.activityListBackup))
let sliceList = list.slice(0, 2)
this.setData({ this.setData({
activityList: sliceList isMoreAppointment: !this.data.isMoreAppointment
})
}
this.setData({
isMoreActivity,
}) })
},
onToClub: function () {
wx.navigateTo({ url: '/pages/club/home/home' })
}, },
/** /**
...@@ -628,4 +714,20 @@ Page({ ...@@ -628,4 +714,20 @@ Page({
onPageScroll: function (funcEvent) { onPageScroll: function (funcEvent) {
App.pageScroll(funcEvent, this) App.pageScroll(funcEvent, this)
}, },
close() {
this.setData({
mask: false
});
wx.showTabBar({
animation: true,
})
},
// 去核销
goCouponInput(event) {
wx.navigateTo({
url: '/pages/pay/coupon-input/coupon-input?authInfo=' + JSON.stringify(this.data.authInfo),
})
},
}) })
\ No newline at end of file
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<text>业主认证</text> <text>业主认证</text>
<text>享受业主尊贵特权,预定消费专属优惠</text> <text>享受业主尊贵特权,预定消费专属优惠</text>
</view> </view>
<view class="status-operation row cc ac" bindtap="goApprove"> <view class="status-operation row cc ac" bindtap="onAuthentication">
<image wx:if="{{statusText == '审核失败'}}" src="/image/fail-icon.png"></image> <image wx:if="{{statusText == '审核失败'}}" src="/image/fail-icon.png"></image>
<image wx:if="{{statusText == '审核中'}}" src="/image/sh-icon.png"></image> <image wx:if="{{statusText == '审核中'}}" src="/image/sh-icon.png"></image>
<text>{{statusText}}</text> <text>{{statusText}}</text>
...@@ -99,14 +99,14 @@ ...@@ -99,14 +99,14 @@
<view wx:if="{{appStatus}}" class="list-order card"> <view wx:if="{{appStatus}}" class="list-order card">
<view class="card-title row cb ac"> <view class="card-title row cb ac">
<text>我的订单</text> <text>我的订单</text>
<text bindtap="onOrder">查看全部</text> <text bindtap="onOrderList">查看全部</text>
<image class="arrow-more" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image> <image class="arrow-more" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
<!-- 分类 tab --> <!-- 分类 tab -->
<view class="card-category row cb ac"> <view class="card-category row cb ac">
<block wx:for="{{orderCategory}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{orderCategory}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="card-category-item column cc ac" data-type="{{item.type}}" bindtap="goOrderByclass"> <view class="card-category-item column cc ac" data-type="{{item.type}}" bindtap="onOrderCategory">
<view class="card-item-quantity row cc ac" wx:if="{{item.quantity === 0 ? false : true}}"> <view class="card-item-quantity row cc ac" wx:if="{{item.quantity === 0 ? false : true}}">
<text>{{item.quantity}}</text> <text>{{item.quantity}}</text>
</view> </view>
...@@ -120,105 +120,159 @@ ...@@ -120,105 +120,159 @@
<!-- 订单卡片展示 --> <!-- 订单卡片展示 -->
<view class="card-list"> <view class="card-list">
<block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="index" wx:key="index"> <!-- 年卡月卡 -->
<!-- 电影样式 --> <block wx:if="{{membershipCard.length > 0}}">
<view class="card-list-item"> <view class="card-membership-more">
<view class="row ac"> <view style="{{'background: ' + membershipCard[0].bgc + ';'}}"></view>
<image src="{{resourcesBase + item.shopLogo}}"></image> <view style="{{'background: ' + membershipCard[0].bgc + ';'}}"></view>
</view>
<view class="card-membership" bindtap="onMembership">
<image src="{{resourcesBase + membershipCard[0].bgi}}"></image>
<view class="card-membership-info column">
<view class="card-membership-info-shop row ac">
<view class="card-list-item-logo">
<image mode="aspectFill" src="{{resourcesBase + membershipCard[0].shopLogo}}"></image>
</view>
<text>{{membershipCard[0].shopName}}</text>
</view>
<view class="card-membership-info-date column">
<text>{{membershipCard[0].cardName}}</text>
<text>{{membershipCard[0].timeExpire}}</text>
</view>
<view class="card-membership-info-user column">
<text>{{membershipCard[0].userName}}</text>
<text>{{membershipCard[0].identity}}</text>
</view>
</view>
</view>
</block>
<block wx:for="{{isMoreOrder ? orderList : [orderList[0]]}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<!-- 星空影院,元养水韵SPA,海错图展馆样式 -->
<view class="card-list-item" wx:if="{{item.cardStyle === 0}}" data-item="{{item}}" bindtap="onOrderDetail">
<view class="card-list-item-shop row ac">
<view class="card-list-item-logo">
<image mode="aspectFit" src="{{resourcesBase + item.shopLogo}}"></image>
</view>
<text>{{item.shopName}}</text> <text>{{item.shopName}}</text>
</view> </view>
<view class="row ac"> <view class="card-list-item-commodity row ac">
<image src="{{item.orderDetai[0].cover}}"></image> <view class="card-list-item-cover">
<text>{{item.orderDetai[0].name}}</text> <image mode="aspectFill" src="{{item.orderDetail[0].cover}}"></image>
</view>
<text>{{item.orderDetail[0].name}}</text>
</view>
<view class="card-list-item-tip row cb ac">
<text>{{item.tipDate}}</text>
<text>{{item.tipQuantity}}</text>
</view>
</view>
<!-- 海错图文创店,原味舒食,原野MOJITO,儿童营地样式 -->
<view class="card-list-item" wx:if="{{item.cardStyle === 1}}" data-item="{{item}}" bindtap="onOrderDetail">
<view class="card-list-item-shop row ac">
<view class="card-list-item-logo">
<image mode="aspectFit" src="{{resourcesBase + item.shopLogo}}"></image>
</view>
<text>{{item.shopName}}</text>
</view>
<view class="card-list-item-commodity row ac">
<block wx:for="{{item.orderDetail}}" wx:for-item="itemCover" wx:for-index="indexCover" wx:key="indexCover">
<view class="card-list-item-cover">
<image mode="aspectFill" src="{{itemCover.cover}}"></image>
</view>
</block>
</view> </view>
<view class="row cb ac"> <view class="card-list-item-tip row cb ac">
<text>有效期至</text> <text>{{item.tipDate}}</text>
<text>共1张门票</text> <text>{{item.tipQuantity}}</text>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
<!-- 展开更多 --> <!-- 展开更多 -->
<view class="order-more row cc ac"> <view class="order-more row cc ac" wx:if="{{orderList.length > 1}}" bindtap="onMoreOrder">
<text>{{isOrderMore ? '收起' : '展开更多'}}</text> <text>{{isMoreOrder ? '收起' : '展开更多'}}</text>
<image class="arrow-more" src="{{isOrderMore ? imageBase + 'icon/arrow-t-2.png' : imageBase + 'icon/arrow-b-2.png'}}"></image> <image class="arrow-more" src="{{isMoreOrder ? imageBase + 'icon/arrow-t-2.png' : imageBase + 'icon/arrow-b-2.png'}}"></image>
</view> </view>
</view> </view>
<!-- 我的预约 --> <!-- 我的预约 -->
<view class="list-activity"> <view class="list-order card">
<view class="order-activity"> <view class="card-title row cb ac">
<view class="order-activity-title-wrapper row con-b align-c">
<view class="order-activity-title row align-c">
<text>我的预约</text> <text>我的预约</text>
<text data-type="0" bindtap="onAppointmentList">查看全部</text>
<image class="arrow-more" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
<view class="order-activity-all row align-c" bindtap="onAppointment">
<text>查看全部</text> <!-- 分类 tab -->
<image class="all-order-icon" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image> <view class="card-category row cb ac">
</view> <block wx:for="{{appointmentCategory}}" wx:for-index="index" wx:for-item="item" wx:key="index">
</view> <view class="card-category-item column cc ac" data-type="{{item.type}}" bindtap="onAppointmentList">
<!-- 预约分类icno --> <view class="card-item-quantity row cc ac" wx:if="{{item.quantity === 0 ? false : true}}">
<view class="order-activity-icon-list row con-b"> <text>{{item.quantity}}</text>
<view class="order-activity-icon-wrapper col align-c" data-type='0' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c">
<image src="{{resourcesBase+'mine/home/yy_theme.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.active > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.active}}">
{{enrollSubscribeData.active}}</view>
</view>
<text>主题活动</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c" data-type='1' bindtap="goAppointment"> <view class="card-category-item-icon row cc ac">
<view class="order-activity-icon row con-c align-c"> <image src="{{item.icon}}"></image>
<image src="{{resourcesBase+'mine/home/yy_night.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.garden > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.garden}}">
{{enrollSubscribeData.garden}}</view>
</view> </view>
<text>夜间入园预约</text> <text>{{item.name}}</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c" data-type='2' bindtap="goAppointment"> </block>
<view class="order-activity-icon row con-c align-c">
<image src="{{resourcesBase+'mine/home/yy_house.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.scanHouse > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.scanHouse}}">
{{enrollSubscribeData.scanHouse}}</view>
</view> </view>
<text>看房预约</text>
<!-- 预约卡片展示 -->
<view class="card-list">
<block wx:for="{{isMoreAppointment ? appointmentList : [appointmentList[0]]}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<!-- 活动预约样式 -->
<view class="card-list-appointment row cb ac" wx:if="{{item.cardStyle === 0}}" data-type="0" bindtap="onAppointmentList">
<view class="card-list-item-date row cc ac">
<text>{{item.date}}</text>
</view> </view>
<view class="card-list-item-cover">
<image mode="aspectFill" src="{{item.cover}}"></image>
</view> </view>
<!-- 预约卡片 --> <view class="column">
<view class="appointment"> <text class="card-list-appointment-name">{{item.name}}</text>
<!-- 主题活动 --> <text class="card-list-appointment-tip">{{item.quantity}}</text>
<view class="appointment-wrapper" wx:for="{{activityList}}" wx:key="{{index}}" wx:key="index" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-time">{{item.activeTime}}</view>
<view class="appointment-activity-content row">
<view class="appointment-activity-img">
<image src="{{item.cover}}"></image>
</view> </view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
<text>{{item.name}}</text>
</view> </view>
<view class="appointment-activity-num">
<text>报名人数 {{item.number}}人</text> <!-- 夜间入园预约,看房预约 -->
<view class="card-list-appointment row cb ac" wx:if="{{item.cardStyle === 1}}" data-type="{{item.name === 0 ? '1' : '2'}}" bindtap="onAppointmentList">
<view class="card-list-item-date row cc ac">
<text>{{item.date}}</text>
</view> </view>
<view class="column">
<text class="card-list-appointment-name">{{item.name === 0 ? '夜间入园预约' : '看房预约'}}</text>
<text class="card-list-appointment-tip">{{item.quantity}}</text>
</view> </view>
<view class="card-list-item-operation">
<button class="row cc ac" data-item="{{item}}" catchtap="onAppointmentTicket">预约凭证</button>
</view> </view>
</view> </view>
</block>
</view> </view>
<!-- more -->
<view class="more row align-c con-c" bindtap="onMoreActivity" wx:if="{{activityListBackup.length>2}}"> <!-- 展开更多 -->
<text wx:if="{{!isMoreActivity}}">展开更多</text> <view class="order-more row cc ac" wx:if="{{appointmentList.length > 1}}" bindtap="onMoreAppointment">
<text wx:else>收起</text> <text>{{isMoreAppointment ? '收起' : '展开更多'}}</text>
<image wx:if="{{!isMoreActivity}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image> <image class="arrow-more" src="{{isMoreAppointment ? imageBase + 'icon/arrow-t-2.png' : imageBase + 'icon/arrow-b-2.png'}}"></image>
<image wx:else src="{{imageBase + 'up.png'}}"></image>
</view> </view>
</view> </view>
<!-- 我的俱乐部 -->
<!--
<view class="club row con-b align-c" bindtap="onToClub">
<text>我的俱乐部</text>
<image class="icon" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
-->
<!-- 客服中心 --> <!-- 客服中心 -->
<view class="service row con-b align-c" bindtap="goQuestion"> <view class="service row con-b align-c" bindtap="onService">
<text>客服中心</text> <text>客服中心</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image> <image class="icon" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
</view> </view>
......
...@@ -236,7 +236,7 @@ page { ...@@ -236,7 +236,7 @@ page {
right: 0; right: 0;
min-width: 32rpx; min-width: 32rpx;
max-width: 48rpx; max-width: 48rpx;
padding: 0 14rpx; padding: 0 4rpx;
height: 32rpx; height: 32rpx;
border-radius: 16rpx; border-radius: 16rpx;
background: #E66060; background: #E66060;
...@@ -267,14 +267,222 @@ page { ...@@ -267,14 +267,222 @@ page {
height: 48rpx; height: 48rpx;
} }
/* 年卡月卡 */
.card-membership-more {
position: relative;
width: 606rpx;
height: 32rpx;
margin: 72rpx 0 0 0;
}
.card-membership-more > view:nth-child(1) {
position: absolute;
top: 16rpx;
left: 16rpx;
width: 574rpx;
height: 16rpx;
border-radius: 4px 4px 0 0;
opacity: .6;
}
.card-membership-more > view:nth-child(2) {
position: absolute;
top: 0;
left: 32rpx;
width: 542rpx;
height: 32rpx;
border-radius: 4px 4px 0 0;
opacity: .3;
}
.card-membership {
position: relative;
width: 606rpx;
height: 338rpx;
border-radius: 4px;
}
.card-membership > image {
z-index: 0;
position: absolute;
top: 0;
left: 0;
width: 606rpx;
height: 338rpx;
}
.card-membership-info {
padding: 26rpx 32rpx 0 32rpx;
}
.card-membership-info text {
z-index: 2;
}
.card-membership-info-shop > text {
height: 36rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #FFFFFF;
}
.card-membership-info-date > text:nth-child(1) {
height: 58rpx;
margin: 24rpx 0 0 0;
font-size: 42rpx;
font-weight: 600;
line-height: 58rpx;
color: #FFFFFF;
}
.card-membership-info-date > text:nth-child(2) {
height: 36rpx;
margin: 8rpx 0 0 0;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #FFFFFF;
}
.card-membership-info-user > text:nth-child(1) {
height: 32rpx;
margin: 32rpx 0 0 0;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #FFFFFF;
}
.card-membership-info-user > text:nth-child(2) {
height: 32rpx;
margin: 8rpx 0 0 0;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #FFFFFF;
}
/* 卡片列表样式 */ /* 卡片列表样式 */
.card-list-item { .card-list-item {
width: 606rpx; width: 606rpx;
height: 328rpx; height: 328rpx;
margin-top: 24rpx; margin-top: 24rpx;
padding: 20rpx 32rpx 32rpx 32rpx;
border-radius: 4px;
background: #F5F6F8;
}
.card-list-item-shop > text {
height: 36rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #15191F;
}
.card-list-item-commodity {
margin: 20rpx 0 0 0;
}
.card-list-item-commodity > text {
height: 42rpx;
font-size: 30rpx;
font-weight: 800;
line-height: 42rpx;
color: #15191F;
}
.card-list-item-tip {
margin: 24rpx 0 0 0;
}
.card-list-item-tip > text {
height: 36rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #959DA9;
}
.card-list-item-logo {
z-index: 2;
width: 75rpx;
height: 60rpx;
margin-right: 20rpx;
}
.card-list-item-logo > image {
z-index: 2;
max-width: 100%;
max-height: 100%;
}
.card-list-item-cover {
width: 140rpx;
height: 136rpx;
margin: 0 32rpx 0 0;
}
.card-list-item-cover > image {
max-width: 100%;
max-height: 100%;
}
.card-list-item-date {
position: absolute;
top: -28rpx;
left: 0;
height: 56rpx;
padding: 0 24rpx;
border-radius: 4px;
background: #000000;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
color: #FFFFFF;
}
/* 活动预约 */
.card-list-appointment {
position: relative;
width: 606rpx;
height: 248rpx;
margin-top: 64rpx;
padding: 54rpx 32rpx 32rpx 32rpx;
border-radius: 4px; border-radius: 4px;
background: #F5F6F8; background: #F5F6F8;
border: 1px red solid; }
.card-list-appointment-name {
height: 42rpx;
font-size: 30rpx;
font-weight: 800;
line-height: 42rpx;
color: #15191F;
}
.card-list-appointment-tip {
height: 36rpx;
margin: 16rpx 0 0 0;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #959DA9;
}
.card-list-item-operation > button {
width: 150rpx;
height: 68rpx;
border-radius: 2px;
border: 1px solid #15191F;
font-size: 25rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 800;
line-height: 68rpx;
color: #15191F;
} }
/* 更多,收起 */ /* 更多,收起 */
...@@ -700,6 +908,7 @@ page { ...@@ -700,6 +908,7 @@ page {
margin-left: 8rpx; margin-left: 8rpx;
} }
.club,
.service { .service {
width: 670rpx; width: 670rpx;
height: 128rpx; height: 128rpx;
...@@ -709,27 +918,18 @@ page { ...@@ -709,27 +918,18 @@ page {
border-radius: 4rpx; border-radius: 4rpx;
} }
.club text,
.service text { .service text {
font-size: 34rpx; font-size: 34rpx;
color: #15191f; color: #15191f;
font-weight: 600; font-weight: 600;
} }
.service image {
width: 32rpx;
height: 32rpx;
}
.all-order-icon { .all-order-icon {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
} }
image {
width: 100%;
height: 100%;
}
.logo-box { .logo-box {
width: 64rpx; width: 64rpx;
height: 50rpx; height: 50rpx;
......
...@@ -126,7 +126,7 @@ Page({ ...@@ -126,7 +126,7 @@ Page({
birthday: this.data.userInfo.birthday, birthday: this.data.userInfo.birthday,
} }
App.wxRequest({ App.wxRequest({
url: '/api/v1/smUser/doUpdateInfo', url: 'v1/smUser/doUpdateInfo',
data: param, data: param,
success: (res) => { success: (res) => {
let funcUserInfo = wx.getStorageSync('userInfo') let funcUserInfo = wx.getStorageSync('userInfo')
......
...@@ -36,12 +36,15 @@ Page({ ...@@ -36,12 +36,15 @@ Page({
isFinished: false, isFinished: false,
optionsGoodType: '' optionsGoodType: ''
}, },
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
option: options, option: options,
optionsGoodType: options.goodType != undefined ? 1 * options.goodType : '' optionsGoodType: options.goodType != undefined ? 1 * options.goodType : ''
}) })
this.setNavTop()
}, },
onShow: function () { onShow: function () {
this.setData({ this.setData({
orderPages: 1, orderPages: 1,
...@@ -50,6 +53,14 @@ Page({ ...@@ -50,6 +53,14 @@ Page({
}) })
this.setOrderType() this.setOrderType()
}, },
setNavTop: function () {
let funcStatusHeight = wx.getStorageSync('navStatusHeight')
let funcTitleHeight = wx.getStorageSync('navTitleHeight')
// 这个数值需要和 css 中的高度同步。
let funcCategoryHeight = 176
},
refresh: function () { refresh: function () {
this.setOrderType() this.setOrderType()
}, },
...@@ -71,7 +82,7 @@ Page({ ...@@ -71,7 +82,7 @@ Page({
isLoading: true isLoading: true
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/getOrderList', url: 'v1/order/getOrderList',
data: { data: {
'goodType': this.data.orderTypeActive ? this.data.orderType[this.data.orderTypeActive].value : '', 'goodType': this.data.orderTypeActive ? this.data.orderType[this.data.orderTypeActive].value : '',
'status': this.data.statusList[this.data.statusActive].value, 'status': this.data.statusList[this.data.statusActive].value,
...@@ -164,7 +175,7 @@ Page({ ...@@ -164,7 +175,7 @@ Page({
setOrderType: function () { setOrderType: function () {
let that = this; let that = this;
App.wxRequest({ App.wxRequest({
url: '/api/v1/common/getDictByType', url: 'v1/common/getDictByType',
data: { data: {
'type': 'order_good_type', 'type': 'order_good_type',
}, },
...@@ -342,7 +353,7 @@ Page({ ...@@ -342,7 +353,7 @@ Page({
}) })
let funcItem = event.target.dataset.item let funcItem = event.target.dataset.item
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/cancelOrder', url: 'v1/order/cancelOrder',
data: { data: {
'orderId': funcItem.id, 'orderId': funcItem.id,
'type': 0, 'type': 0,
...@@ -389,7 +400,7 @@ Page({ ...@@ -389,7 +400,7 @@ Page({
}) })
let funcItem = event.target.dataset.item let funcItem = event.target.dataset.item
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/cancelOrder', url: 'v1/order/cancelOrder',
data: { data: {
'orderId': funcItem.id, 'orderId': funcItem.id,
'type': 1, 'type': 1,
......
...@@ -48,7 +48,7 @@ Page({ ...@@ -48,7 +48,7 @@ Page({
// 常见问题 // 常见问题
getCommonProblem: function (type) { getCommonProblem: function (type) {
App.wxRequest({ App.wxRequest({
url: '/api/v1/smCommonProblem/getList', url: 'v1/smCommonProblem/getList',
data: { data: {
type: type, // 1 入住 2门票 3 服务 type: type, // 1 入住 2门票 3 服务
top: '', top: '',
......
...@@ -175,7 +175,7 @@ Page({ ...@@ -175,7 +175,7 @@ Page({
'duration': 60000 'duration': 60000
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/smFeedback/doFeedBack', url: 'v1/smFeedback/doFeedBack',
data: { data: {
content: that.data.remark content: that.data.remark
}, },
...@@ -203,7 +203,7 @@ Page({ ...@@ -203,7 +203,7 @@ Page({
getCommonProblem() { getCommonProblem() {
let that = this let that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/smCommonProblem/getList', url: 'v1/smCommonProblem/getList',
data: { data: {
type: '', type: '',
top: 1, top: 1,
......
...@@ -75,7 +75,7 @@ Page({ ...@@ -75,7 +75,7 @@ Page({
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/volume/doVolume', url: 'v1/volume/doVolume',
data: { data: {
volumeId: this.data.couponDetail.volumeId, volumeId: this.data.couponDetail.volumeId,
}, },
......
...@@ -56,7 +56,7 @@ Page({ ...@@ -56,7 +56,7 @@ Page({
duration: 60000 duration: 60000
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/volume/getVolumeDetails', url: 'v1/volume/getVolumeDetails',
data: { data: {
serialNumber: couponCode, serialNumber: couponCode,
}, },
......
...@@ -43,7 +43,7 @@ Page({ ...@@ -43,7 +43,7 @@ Page({
queryOrderDetail: function () { queryOrderDetail: function () {
let that = this let that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/getOrderDetail', url: 'v1/order/getOrderDetail',
data: { data: {
'orderId': this.data.orderInfo.orderId 'orderId': this.data.orderInfo.orderId
}, },
...@@ -220,7 +220,7 @@ Page({ ...@@ -220,7 +220,7 @@ Page({
mask: true mask: true
}) })
wx.uploadFile({ wx.uploadFile({
url: App.globalData.baseUrl + '/api/v1/common/upload', url: App.globalData.baseUrl + 'v1/common/upload',
filePath: urlArr[i], filePath: urlArr[i],
name: 'file', name: 'file',
header: { header: {
...@@ -298,7 +298,7 @@ Page({ ...@@ -298,7 +298,7 @@ Page({
duration: 60000 duration: 60000
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/doAppraise', url: 'v1/order/doAppraise',
data: { data: {
'orderId': formData.orderId, 'orderId': formData.orderId,
'imgUrls': formData.imgUrls, 'imgUrls': formData.imgUrls,
......
...@@ -141,7 +141,7 @@ Page({ ...@@ -141,7 +141,7 @@ Page({
isDoing: true, isDoing: true,
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/cancelOrder', url: 'v1/order/cancelOrder',
data: { data: {
'orderId': this.data.orderInfo.id, 'orderId': this.data.orderInfo.id,
'type': type, 'type': type,
...@@ -191,7 +191,7 @@ Page({ ...@@ -191,7 +191,7 @@ Page({
duration: 60000, duration: 60000,
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/getVolumesByOrderId', url: 'v1/order/getVolumesByOrderId',
data: { data: {
'orderId': this.data.orderInfo.id 'orderId': this.data.orderInfo.id
}, },
...@@ -227,7 +227,7 @@ Page({ ...@@ -227,7 +227,7 @@ Page({
queryOrderDetail: function () { queryOrderDetail: function () {
console.log('queryOrderDetail') console.log('queryOrderDetail')
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/getOrderDetail', url: 'v1/order/getOrderDetail',
data: { data: {
'orderId': this.data.orderInfo.id 'orderId': this.data.orderInfo.id
}, },
...@@ -335,7 +335,7 @@ Page({ ...@@ -335,7 +335,7 @@ Page({
duration: 60000, duration: 60000,
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/volume/getVolume', url: 'v1/volume/getVolume',
data: { data: {
'volumeId': funcOrderInfo.codeId 'volumeId': funcOrderInfo.codeId
}, },
......
...@@ -305,7 +305,7 @@ Page({ ...@@ -305,7 +305,7 @@ Page({
} }
} }
App.wxRequest({ App.wxRequest({
url: '/api/v1/park/getDetail', url: 'v1/park/getDetail',
data: { data: {
'id': funcPointId 'id': funcPointId
}, },
...@@ -385,7 +385,6 @@ Page({ ...@@ -385,7 +385,6 @@ Page({
funcRegisterInfo[funcIndex].remarks = funcValue funcRegisterInfo[funcIndex].remarks = funcValue
funcRegisterInfo[funcIndex].errorRemarks = funcMessage funcRegisterInfo[funcIndex].errorRemarks = funcMessage
break break
} }
this.setData({ this.setData({
...@@ -402,7 +401,7 @@ Page({ ...@@ -402,7 +401,7 @@ Page({
setEntryTime: function (funcEntryId) { setEntryTime: function (funcEntryId) {
let funcItem = wx.getStorageSync('shoppingCartBuffer')[0] let funcItem = wx.getStorageSync('shoppingCartBuffer')[0]
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getEnrollView', url: 'v1/activity/getEnrollView',
data: { data: {
'id': funcItem.id, 'id': funcItem.id,
}, },
...@@ -559,7 +558,7 @@ Page({ ...@@ -559,7 +558,7 @@ Page({
let funcItem = this.data.shoppingCartList[0] let funcItem = this.data.shoppingCartList[0]
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getCommodityParticulars', url: 'v1/commodity/getCommodityParticulars',
data: { data: {
'commodityId': funcItem.id, 'commodityId': funcItem.id,
'classifyId': funcItem.typeId, 'classifyId': funcItem.typeId,
...@@ -672,7 +671,7 @@ Page({ ...@@ -672,7 +671,7 @@ Page({
case 6: case 6:
case 7: case 7:
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getDetail', url: 'v1/activity/getDetail',
data: { 'id': this.data.shoppingCartList[0].id }, data: { 'id': this.data.shoppingCartList[0].id },
success: (response) => { success: (response) => {
let funcResponse = response.data let funcResponse = response.data
...@@ -690,7 +689,7 @@ Page({ ...@@ -690,7 +689,7 @@ Page({
default: default:
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getNotification', url: 'v1/commodity/getNotification',
data: { data: {
'notificationId': this.data.shoppingCartList[0].notificationId 'notificationId': this.data.shoppingCartList[0].notificationId
}, },
...@@ -941,7 +940,7 @@ Page({ ...@@ -941,7 +940,7 @@ Page({
// 发送下单请求 // 发送下单请求
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/doOrder', url: 'v1/order/doOrder',
data: { data: {
'isPayment': Number(this.data.payAmount) === 0 ? 0 : 2, 'isPayment': Number(this.data.payAmount) === 0 ? 0 : 2,
'totalMoney': Number(this.data.payAmount), 'totalMoney': Number(this.data.payAmount),
...@@ -1064,7 +1063,7 @@ Page({ ...@@ -1064,7 +1063,7 @@ Page({
*/ */
paySubmitActivity: function () { paySubmitActivity: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/doActivityEnroll', url: 'v1/activity/doActivityEnroll',
data: { data: {
'activityId': this.data.shoppingCartList[0].id, 'activityId': this.data.shoppingCartList[0].id,
'activityTimesId': this.data.entryId, 'activityTimesId': this.data.entryId,
...@@ -1168,7 +1167,7 @@ Page({ ...@@ -1168,7 +1167,7 @@ Page({
App.globalData.payStateTimer = setInterval(() => { App.globalData.payStateTimer = setInterval(() => {
if (!pagePayId) return if (!pagePayId) return
App.wxRequest({ App.wxRequest({
url: '/api/v1/order/getOrderStatus', url: 'v1/order/getOrderStatus',
data: { data: {
'orderId': pagePayId 'orderId': pagePayId
}, },
......
...@@ -26,7 +26,7 @@ Page({ ...@@ -26,7 +26,7 @@ Page({
//主题活动详情 //主题活动详情
queryActivityDetail: function () { queryActivityDetail: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getDetail', url: 'v1/activity/getDetail',
data: { id: this.data.id }, data: { id: this.data.id },
success: (response) => { success: (response) => {
let funcResponse = response.data let funcResponse = response.data
......
...@@ -3,7 +3,7 @@ Page({ ...@@ -3,7 +3,7 @@ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
tabItem: [], tabItem: [{ text: '全部', value: 0 }],
tabTop: 0, tabTop: 0,
tabClass: '', tabClass: '',
...@@ -26,7 +26,7 @@ Page({ ...@@ -26,7 +26,7 @@ Page({
}) })
} }
this.queryTab() // this.queryTab()
this.queryActivityLately() this.queryActivityLately()
this.queryActivityExpire() this.queryActivityExpire()
}, },
...@@ -82,7 +82,13 @@ Page({ ...@@ -82,7 +82,13 @@ Page({
'priceSpecial': funcData[i].ownerPrice, // 业主价 'priceSpecial': funcData[i].ownerPrice, // 业主价
'priceSpecialText': App.modular.utils.formatAmount(funcData[i].ownerPrice), // 业主价文本格式 'priceSpecialText': App.modular.utils.formatAmount(funcData[i].ownerPrice), // 业主价文本格式
'priceType': 1, 'priceType': 1,
'isCanEenroll': false,
} }
// 判断活动是否已经开始,能否报名。
let funcActiveDateStart = new Date().getFullYear() + '年' + funcData[i].activeDate.match(/[\w月日]+/g)[0]
if (App.modular.miment(funcActiveDateStart).stamp() < App.modular.miment().stamp()) funcItem.isCanEenroll = true
funcList.push(funcItem) funcList.push(funcItem)
} }
funcList = App.setPriceType(funcList) funcList = App.setPriceType(funcList)
......
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
<text>{{item.price == '0' ? '免费' : item.priceText}}</text> <text>{{item.price == '0' ? '免费' : item.priceText}}</text>
</view> </view>
<view> <view>
<button class="row con-c align-c" catchtap="onReport" data-item="{{item}}">报名</button> <button wx:if="{{!isCanEenroll}}" class="row con-c align-c">未开始</button>
<button wx:if="{{isCanEenroll}}" class="row con-c align-c" catchtap="onReport" data-item="{{item}}">报名</button>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -9,6 +9,8 @@ Page({ ...@@ -9,6 +9,8 @@ Page({
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
clubList: [],
strategy: [], strategy: [],
strategyList: [], strategyList: [],
strategyOriginList: [], strategyOriginList: [],
...@@ -25,10 +27,6 @@ Page({ ...@@ -25,10 +27,6 @@ Page({
movieList: [], movieList: [],
swiperMovieCurrent: 0, swiperMovieCurrent: 0,
touristRouteList: [], touristRouteList: [],
}, },
...@@ -53,7 +51,7 @@ Page({ ...@@ -53,7 +51,7 @@ Page({
*/ */
queryActivity: function () { queryActivity: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getList', url: 'v1/activity/getList',
data: { data: {
listType: 1, listType: 1,
pageSize: 10, pageSize: 10,
...@@ -89,7 +87,7 @@ Page({ ...@@ -89,7 +87,7 @@ Page({
*/ */
queryMovie: function () { queryMovie: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/film/getAllFilm', url: 'v1/film/getAllFilm',
data: { data: {
'pageNo': '1', 'pageNo': '1',
'pageSize': '-1', 'pageSize': '-1',
...@@ -218,6 +216,10 @@ Page({ ...@@ -218,6 +216,10 @@ Page({
}) })
}, },
onToClubList: function () {
wx.navigateTo({ url: '/pages/club/home/home' })
},
/** /**
* 查询游客攻略 * 查询游客攻略
* @function * @function
...@@ -226,7 +228,7 @@ Page({ ...@@ -226,7 +228,7 @@ Page({
*/ */
routeList: function () { routeList: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/strategy/getList', url: 'v1/strategy/getList',
data: { data: {
'pageSize': this.data.pageSize + '', 'pageSize': this.data.pageSize + '',
'pageNo': this.data.pageNo + '' 'pageNo': this.data.pageNo + ''
......
...@@ -89,6 +89,31 @@ ...@@ -89,6 +89,31 @@
</view> </view>
</block> </block>
<!-- 俱乐部 -->
<!--
<view class="title row con-b align-c">
<image src="./image/title-club.png"></image>
<text bindtap="onAllRecent" bindtap="onToClubList">查看全部</text>
</view>
<view class="club-list">
<block wx:for="{{activityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="club-item row cc" data-item="{{item}}" bindtap="onActivityDetail">
<view class="club-item-info column ac">
<image src="{{item.cover}}"></image>
<text class="club-item-info-name">音乐剧话剧俱乐部</text>
<text class="club-item-info-owner owner-mark">业主专享</text>
</view>
</view>
</block>
</view>
<block wx:if="{{activityList.length === 0}}">
<view class="item-nothing col con-c align-c">
<image class="nothing-activity" src="{{imageBase + 'icon/fireworks-2.png'}}"></image>
<text>暂无俱乐部信息</text>
</view>
</block>
-->
<!-- 游客攻略 --> <!-- 游客攻略 -->
<view class="route"> <view class="route">
<block wx:if="{{touristRouteList.length > 0}}"> <block wx:if="{{touristRouteList.length > 0}}">
......
...@@ -212,7 +212,6 @@ ...@@ -212,7 +212,6 @@
color: #656e7b; color: #656e7b;
overflow: hidden; overflow: hidden;
white-space:nowrap; white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis; text-overflow:ellipsis;
} }
...@@ -229,6 +228,57 @@ ...@@ -229,6 +228,57 @@
border-radius: 4rpx; border-radius: 4rpx;
} }
/* 俱乐部 */
.club-list {
width: 710rpx;
height: 440rpx;
margin: 48rpx 0 0 40rpx;
white-space: nowrap;
overflow-x: scroll;
}
.club-item {
display: inline-block;
position: relative;
width: 480rpx;
height: 440rpx;
margin: 0 24rpx 0 0;
padding: 34rpx 0 0 0;
}
.club-item-info {
width: 480rpx;
height: 406rpx;
border-radius: 4px;
background: #F5F6F8;
}
.club-item-info > image {
position: relative;
top: -34rpx;
width: 400rpx;
height: 320rpx;
border-radius: 4px;
background: #999999;
}
.club-item-info-name {
height: 44rpx;
font-size: 30rpx;
font-weight: 800;
line-height: 44rpx;
color: #15191F;
}
.club-item-info-owner {
position: absolute;
top: 20rpx;
left: 320rpx;
width: 96rpx;
height: 32rpx;
}
/* 游客攻略 */ /* 游客攻略 */
.route { .route {
width: 750rpx; width: 750rpx;
......
...@@ -46,7 +46,7 @@ Page({ ...@@ -46,7 +46,7 @@ Page({
// 获取电影详情场次 // 获取电影详情场次
queryDetail: function (activityId) { queryDetail: function (activityId) {
App.wxRequest({ App.wxRequest({
url: '/api/v1/film/getFilmDetail', url: 'v1/film/getFilmDetail',
data: { data: {
'activityId': activityId, 'activityId': activityId,
}, },
......
...@@ -115,7 +115,7 @@ Page({ ...@@ -115,7 +115,7 @@ Page({
} }
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/film/getTodayFilm', url: 'v1/film/getTodayFilm',
data: { data: {
'pageNo': this.data.queryParams.pageNo, 'pageNo': this.data.queryParams.pageNo,
'pageSize': this.data.queryParams.pageSize, 'pageSize': this.data.queryParams.pageSize,
...@@ -197,7 +197,7 @@ Page({ ...@@ -197,7 +197,7 @@ Page({
let movieNextWeek = [] let movieNextWeek = []
//本周热映 //本周热映
App.wxRequest({ App.wxRequest({
url: '/api/v1/film/getAllFilm', url: 'v1/film/getAllFilm',
data: { data: {
'pageNo': this.data.queryParams.pageNo, 'pageNo': this.data.queryParams.pageNo,
'pageSize': this.data.queryParams.pageSize, 'pageSize': this.data.queryParams.pageSize,
...@@ -262,7 +262,7 @@ Page({ ...@@ -262,7 +262,7 @@ Page({
} }
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/film/getAllFilm', url: 'v1/film/getAllFilm',
data: { data: {
'pageNo': this.data.queryParams.pageNo, 'pageNo': this.data.queryParams.pageNo,
'pageSize': this.data.queryParams.pageSize, 'pageSize': this.data.queryParams.pageSize,
......
...@@ -295,7 +295,7 @@ Page({ ...@@ -295,7 +295,7 @@ Page({
// 查询景点信息 // 查询景点信息
App.wxRequest({ App.wxRequest({
url: '/api/v1/park/getList', url: 'v1/park/getList',
success: (res) => { success: (res) => {
let funcData = res.list let funcData = res.list
funcDetail.forEach(shop => { funcDetail.forEach(shop => {
...@@ -360,7 +360,7 @@ Page({ ...@@ -360,7 +360,7 @@ Page({
*/ */
queryActivity: function() { queryActivity: function() {
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getList', url: 'v1/activity/getList',
data: { data: {
'listType': 1, 'listType': 1,
'pageSize': 10, 'pageSize': 10,
...@@ -386,6 +386,7 @@ Page({ ...@@ -386,6 +386,7 @@ Page({
'date': funcResponse[i].activeDate + ' ' + funcResponse[i].activeTime, // 活动时间 'date': funcResponse[i].activeDate + ' ' + funcResponse[i].activeTime, // 活动时间
'priceType': 1, 'priceType': 1,
} }
let funcUserType = wx.getStorageSync('userInfo').userType let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型 // 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价 // 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
...@@ -420,7 +421,7 @@ Page({ ...@@ -420,7 +421,7 @@ Page({
*/ */
queryCommodity: function() { queryCommodity: function() {
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/recommend', url: 'v1/commodity/recommend',
data: { data: {
'officeId': this.data.shopInfo.id, 'officeId': this.data.shopInfo.id,
'genre': this.data.shopInfo.shopType, 'genre': this.data.shopInfo.shopType,
...@@ -481,7 +482,7 @@ Page({ ...@@ -481,7 +482,7 @@ Page({
*/ */
queryMovie: function() { queryMovie: function() {
App.wxRequest({ App.wxRequest({
url: '/api/v1/film/getAllFilm', url: 'v1/film/getAllFilm',
data: { data: {
'weekType': 0, 'weekType': 0,
'pageSize': 10, 'pageSize': 10,
...@@ -534,7 +535,7 @@ Page({ ...@@ -534,7 +535,7 @@ Page({
*/ */
getAppraise: function() { getAppraise: function() {
App.wxRequest({ App.wxRequest({
url: '/api/v1/appraise/getList', url: 'v1/appraise/getList',
data: { data: {
'pageNo': '1', 'pageNo': '1',
'pageSize': '-1', 'pageSize': '-1',
...@@ -862,7 +863,7 @@ Page({ ...@@ -862,7 +863,7 @@ Page({
let that = this let that = this
let officeId = wx.getStorageSync('shopInfoBuffer').id let officeId = wx.getStorageSync('shopInfoBuffer').id
App.wxRequest({ App.wxRequest({
url: '/api/v1/appraise/getOfficeAppraise', url: 'v1/appraise/getOfficeAppraise',
data: { data: {
'officeId': officeId 'officeId': officeId
}, },
......
...@@ -39,7 +39,7 @@ Page({ ...@@ -39,7 +39,7 @@ Page({
queryCommodityDetail: function () { queryCommodityDetail: function () {
let funcCommodity = wx.getStorageSync('shoppingCartBuffer')[0] let funcCommodity = wx.getStorageSync('shoppingCartBuffer')[0]
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getCommodityParticulars', url: 'v1/commodity/getCommodityParticulars',
data: { data: {
'commodityId': funcCommodity.id, 'commodityId': funcCommodity.id,
'genre': funcCommodity.typeId, 'genre': funcCommodity.typeId,
......
...@@ -89,7 +89,7 @@ Page({ ...@@ -89,7 +89,7 @@ Page({
}, },
] ]
App.wxRequest({ App.wxRequest({
url: '/api/v1/park/getList', url: 'v1/park/getList',
success: function(res) { success: function(res) {
let funcData = res.list let funcData = res.list
response.forEach(res => { response.forEach(res => {
......
...@@ -41,7 +41,7 @@ Page({ ...@@ -41,7 +41,7 @@ Page({
*/ */
queryTouristRouteDetail() { queryTouristRouteDetail() {
App.wxRequest({ App.wxRequest({
url: '/api/v1/strategy/getDetail', url: 'v1/strategy/getDetail',
data: { id: this.data.id }, data: { id: this.data.id },
success: (res) => { success: (res) => {
// 此代码段处理目的为,匹配富文本代码中的 <img> 标签,并将其图片的宽度修改为适应屏幕 // 此代码段处理目的为,匹配富文本代码中的 <img> 标签,并将其图片的宽度修改为适应屏幕
...@@ -78,7 +78,7 @@ Page({ ...@@ -78,7 +78,7 @@ Page({
} }
App.wxRequest({ App.wxRequest({
url: '/api/v1/park/getParksByParkIds', url: 'v1/park/getParksByParkIds',
data: { smParkIds: parkIds }, data: { smParkIds: parkIds },
success: (response) => { success: (response) => {
let funcResponse = response.data let funcResponse = response.data
......
const output = {
// 测试环境
baseUrl: 'https://sm-web2.meiqicloud.com/api/',
// 正式环境
// baseUrl: 'https://xsslc.cndrealty.com/',
}
export default output
\ No newline at end of file
...@@ -2,6 +2,7 @@ const output = { ...@@ -2,6 +2,7 @@ const output = {
// 测试环境 // 测试环境
baseUrl: 'https://sm-web2.meiqicloud.com/api/', baseUrl: 'https://sm-web2.meiqicloud.com/api/',
// 正式环境 // 正式环境
// baseUrl: 'https://xsslc.cndrealty.com/', // baseUrl: 'https://xsslc.cndrealty.com/',
} }
......
let Output = { let Output = {
/** /**
* 必填验证
* @function
* @param {string} value
* @returns {string}
*/
'required': function (value) {
let funMessage = ''
if (value === '') {
funMessage = '不能为空'
}
return funMessage
},
/**
* 姓名校验 * 姓名校验
* @function * @function
* @param {string} value * @param {string} value
......
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